Page 2 of 3

Re: Modular

PostPosted: 04 Oct 2009, 13:12
by Chris H.
zerker2000 wrote:Eclipse seems to not like your code: I extract it, base a new project off of it, and get this when I try to run it:

Code: Select all
java.io.FileNotFoundException: forge.properties (No such file or directory)
`
The 10-03 source did not include the forge.properties file, I moved a copy of this file from the 10-02 version and placed it in the root folder of 10-03 project that I built. This will take care of your problem.

The 10-03 source also has the res folder along with the source code. You can also move this folder to the the root folder of 10-03 project. It should build OK. :wink:

Re: Modular

PostPosted: 04 Oct 2009, 16:46
by zerker2000
Ok got it working thanks chris.

Bug: Master Transmuter doesn't tap or require U to activate. And before you ask, this happened on a fresh downloaded version without any of my code :?.

EDIT:Caught, targeting is set beforePayMana instead of after. Anyone care to check whether that's the case in 10.02?

P.S Which should have been, by the way, be called in Input_PayManaCost similarly to beforPayMana in GameAction.PlaySpellAbility, or removed from SpellAbility completely if noone decided to use it. Either way, I have now added it where it belongs and fixed Master Transmuter.

Re: Modular

PostPosted: 04 Oct 2009, 17:02
by DennisBergkamp
Oh shoot, yes. I must've forgotten to include it. The 10-02 version should have it, grab it from there.
Sorry about that :(

Re: Modular

PostPosted: 04 Oct 2009, 17:17
by DennisBergkamp
Bug: Master Transmuter doesn't tap or require U to activate. And before you ask, this happened on a fresh downloaded version without any of my code :?.
Ah, you are right:
Fix it by updating the input code:

Code: Select all
public void selectCard(Card c, PlayerZone zone)
          {
           PlayerZone play = AllZone.getZone(Constant.Zone.Play,card.getController());
            if(c.isArtifact() && AllZone.GameAction.isCardInZone(c, play))
            {
              PlayerZone hand = AllZone.getZone(Constant.Zone.Hand,card.getController());
             
              play.remove(c);
              hand.add(c);
              ability.setTargetCard(c);
              //AllZone.Stack.add(ability);
              stopSetNext(new Input_PayManaCost(ability));
            }
          }//selectCard()

Re: Modular

PostPosted: 04 Oct 2009, 17:45
by Chris H.
DennisBergkamp wrote:Oh shoot, yes. I must've forgotten to include it. The 10-02 version should have it, grab it from there.
Sorry about that :(
`
Most of the forge.properties file is comments, there is only a single line that is not a comment and it is the last line of the file. It is easy for anyone to miss the fact that this file is required. :wink:

Re: Modular

PostPosted: 04 Oct 2009, 17:52
by zerker2000
DennisBergkamp wrote:
Bug: Master Transmuter doesn't tap or require U to activate. And before you ask, this happened on a fresh downloaded version without any of my code :?.
Ah, you are right:
Fix it by updating the input code:

Code: Select all
public void selectCard(Card c, PlayerZone zone)
          {
           PlayerZone play = AllZone.getZone(Constant.Zone.Play,card.getController());
            if(c.isArtifact() && AllZone.GameAction.isCardInZone(c, play))
            {
              PlayerZone hand = AllZone.getZone(Constant.Zone.Hand,card.getController());
             
              play.remove(c);
              hand.add(c);
              ability.setTargetCard(c);
              //AllZone.Stack.add(ability);
              stopSetNext(new Input_PayManaCost(ability));
            }
          }//selectCard()
Well, technically it's pay first, bounce second ... see edit above.

Re: Modular

PostPosted: 04 Oct 2009, 19:37
by DennisBergkamp
Ah, alright, good :)

Re: Modular

PostPosted: 04 Oct 2009, 21:12
by Chris H.
DennisBergkamp wrote:- Added a few extra cards.
`
The spell Field of Mists has the wrong card name, it should be Cloak of Mists. Several of the jpg urls do not download a file with the .jpg extension, they are missing.

Re: Modular

PostPosted: 05 Oct 2009, 03:42
by zerker2000
Ok, I'm finished, the rats were done as a calm-down exercise :D .
ForgeSource1004.zip
The updated source.
(558.93 KiB) Downloaded 174 times

Re: Modular

PostPosted: 05 Oct 2009, 16:23
by DennisBergkamp
NICE!! I will play with it later this afternoon :)
Which other bugs did you fix, by the way?

Re: Modular

PostPosted: 05 Oct 2009, 23:09
by zerker2000
Other? As in ones that cropped up independently of the Mana Pool/Ability_Mana/Gemstone Array merging? Well, replacing all instances of
Code: Select all
card.removeInstrinsicKeyword("tap: add...
card.setText(card.getText() + ability)
card.addInstrinsicKeyword(...
with simply card.setText(card.getSpellText() + ability) might count... Also, more of a heads-up than a bug fix, SpellAbility now contains "Object[] choices_made;", to use as you see fit (so far it's used for GemstoneArray, However It could be a good idea to reroute i.e. SpellAbility. targetPlayer and SpellAbility.targetCard to choices_made[0] and choices_made[1], respectively, maybe even make set/getTagretCard(int number){...choices_made[number]} for multitargeting... just basically, use to discretion).
EDIT: Oh, and fixed a couple of String == "<value>" to String.equals("<value>") here and there ... should prevent a couple future bugs :P.

Re: Modular

PostPosted: 06 Oct 2009, 01:27
by DennisBergkamp
Alright, awesome :)
I was just wondering, because I usually post a little changelog of all the changes whenever I upload a new version.

Re: Modular

PostPosted: 06 Oct 2009, 02:33
by zerker2000
Import my code as a new project in eclipse, select the two projects in project/package browser, and RClick-"Compare With"-"Each Other" should do it.

Re: Modular

PostPosted: 06 Oct 2009, 02:48
by DennisBergkamp
Nice, didn't know this was possible in Eclipse :)
I'll make some more changes of my own, and I'll upload next release in the next day or two.

Re: Modular

PostPosted: 06 Oct 2009, 03:09
by zerker2000
How'd you think I did half my merging?!