It is currently 26 Apr 2024, 07:00
   
Text Size

Forge version 1.5.16

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Forge version 1.5.16

Postby Chris H. » 22 Apr 2014, 00:02

I did a google search and found this http://stackoverflow.com/questions/17131249/how-to-solve-bad-interpreter-no-such-file-or-directory link.

Looks like a new line character is appearing in the command file as a windows carriage return rather than as a unix based new line.

Needs to be a \n instead of \r\n

I would fix this myself but I am not a terminal freak. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.16

Postby KrazyTheFox » 22 Apr 2014, 00:05

Chris H. wrote:-snip-
After doing a bit of homework, I've found a couple things that might work. The first is to change:
Code: Select all
#!/bin/sh
to
Code: Select all
#!/bin/bash

If that doesn't do it, try changing the whole file to:
Code: Select all
#!/bin/bash
cd "$(dirname "$0")"
java -Xmx1024m -jar forge-gui-desktop-1.5.16-SNAPSHOT-jar-with-dependencies.jar

Unfortunately, shell scripting for non-Windows systems is something I have no experience in, so perhaps someone more familiar could weigh in with a better answer.

EDIT: Ha! We posted at pretty much the same time, so I didn't see your new post. I'll go check the line endings and push a new commit soon. I'm a little busy at the moment getting dinner together.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Forge version 1.5.16

Postby Chris H. » 22 Apr 2014, 00:24

I fixed the forge.command file in forge-gui-desktop/src/main/config/ and I can now build a widows-linux archive that will launch on a Mac via the forge.command file.

And I found a way to do so without using complicated terminal commands. :D
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.16

Postby Chris H. » 22 Apr 2014, 00:27

KrazyTheFox wrote:EDIT: Ha! We posted at pretty much the same time, so I didn't see your new post. I'll go check the line endings and push a new commit soon. I'm a little busy at the moment getting dinner together.
 
No need to as I found a very quick and easy way to do so and have merged the fix into the repo.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.16

Postby KrazyTheFox » 22 Apr 2014, 00:43

Chris H. wrote:No need to as I found a very quick and easy way to do so and have merged the fix into the repo.
Awesome! I've learned a few things about Sublime Text that are very useful in the process, so the fixed file I just made while not refreshing the forums again wasn't a complete loss. :lol:
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Forge version 1.5.16

Postby KrazyTheFox » 24 Apr 2014, 01:26

Is there any reason that enchantments/artifacts/equipment don't stack like tokens or is it just that nobody's programmed that in? If it's the latter, anyone mind if I finish coding and commit it?

Here's the current logic for enchantments... an enchantment will stack if:
  • It does not enchant a creature its controller controls
  • It is not a creature
  • It shares a name with another enchantment under your control that also meets these conditions
  • It has the same type/number of counters as another enchantment under your control that also meets these conditions

Similar rules would apply for equipment and artifacts.

Here's a screenshot of what I've got so far:
EnchantmentStacking.jpg
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Forge version 1.5.16

Postby Marek14 » 24 Apr 2014, 04:33

KrazyTheFox wrote:Is there any reason that enchantments/artifacts/equipment don't stack like tokens or is it just that nobody's programmed that in? If it's the latter, anyone mind if I finish coding and commit it?

Here's the current logic for enchantments... an enchantment will stack if:
  • It does not enchant a creature its controller controls
  • It is not a creature
  • It shares a name with another enchantment under your control that also meets these conditions
  • It has the same type/number of counters as another enchantment under your control that also meets these conditions

Similar rules would apply for equipment and artifacts.

Here's a screenshot of what I've got so far:
EnchantmentStacking.jpg
I would replace "It does not enchant a creature its controller controls" with "It does not enchant a permanent its controller controls" and of course it shouldn't stack if anything is attached TO it.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Forge version 1.5.16

Postby KrazyTheFox » 24 Apr 2014, 05:20

Marek14 wrote:I would replace "It does not enchant a creature its controller controls" with "It does not enchant a permanent its controller controls"
Ah, yes, it does do that currently. I don't know why I wrote creature instead. It checks the owner of the card it's enchanting and excludes it if it matches its own.

Marek14 wrote:and of course it shouldn't stack if anything is attached TO it.
I hadn't thought of that, thanks! I'll go fix that.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Forge version 1.5.16

Postby Marek14 » 24 Apr 2014, 15:19

KrazyTheFox wrote:
Marek14 wrote:I would replace "It does not enchant a creature its controller controls" with "It does not enchant a permanent its controller controls"
Ah, yes, it does do that currently. I don't know why I wrote creature instead. It checks the owner of the card it's enchanting and excludes it if it matches its own.
Should be "controller".


Marek14 wrote:and of course it shouldn't stack if anything is attached TO it.
I hadn't thought of that, thanks! I'll go fix that.
It would be actually nice if you could, for example, right-click on a card and set stacking for that card name on or off.

And one more stacking exemption: a card should not stack if it has any copy effect on itself. Currently this is a problem with Vesuva, for example -- it stacks with normal lands, making it easy to lose track of it.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Forge version 1.5.16

Postby KrazyTheFox » 24 Apr 2014, 17:18

Marek14 wrote:Should be "controller".
This is why I shouldn't try to explain things while this tired. It checks controllers, not owners.


Marek14 wrote:It would be actually nice if you could, for example, right-click on a card and set stacking for that card name on or off.
I'll see what I can do. I'm still fairly unfamiliar with the UI code, so it might be a while while I get acquainted.


Marek14 wrote:And one more stacking exemption: a card should not stack if it has any copy effect on itself. Currently this is a problem with Vesuva, for example -- it stacks with normal lands, making it easy to lose track of it.
Done! In the screenshot below, the Font of Vigor on the left is a Copy Enchantment.


I'm still trying to figure out how to get stacked enchantments on the same row as creatures, but otherwise everything seems to work.
EnchantmentStacking.jpg
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Forge version 1.5.16

Postby Sloth » 24 Apr 2014, 18:51

Will version 1.5.16 be released tomorrow Chris?

Or are there any pending problems?

EDIT: It looks like we don't have oracle texts yet. Mmh...
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Forge version 1.5.16

Postby KrazyTheFox » 24 Apr 2014, 19:22

Oracle texts for new cards is just the text on the card, correct? If so, I'm sitting in my car with nothing to do for the next hour and a half, so I can check out the code on my phone and add the text.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Forge version 1.5.16

Postby friarsol » 24 Apr 2014, 19:37

We have a script that usually does it, but for some reason Gatherer hasn't been updated yet. I'm still not sure why that is.

Edit: Looks like it was supposed to go up on Tuesday, but there was an issue during the card addition. Last I see they were hoping to have it out today? I guess it's still just after noon in Seattle time.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Forge version 1.5.16

Postby Chris H. » 24 Apr 2014, 19:41

Yes, I was planning to release tomorrow.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Forge version 1.5.16

Postby Marek14 » 24 Apr 2014, 21:31

Gatherer should be updated now.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 105 guests

cron

Who is online

In total there are 105 users online :: 0 registered, 0 hidden and 105 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 105 guests

Login Form