Modular
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Modular
by Chris H. » 04 Oct 2009, 13:12
`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.
-
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: Modular
by zerker2000 » 04 Oct 2009, 16:46
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.
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.
Last edited by zerker2000 on 04 Oct 2009, 17:49, edited 1 time in total.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by DennisBergkamp » 04 Oct 2009, 17:02
Oh shoot, yes. I must've forgotten to include it. The 10-02 version should have it, grab it from there.
Sorry about that
Sorry about that
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by DennisBergkamp » 04 Oct 2009, 17:17
Ah, you are right: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 .
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()
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by Chris H. » 04 Oct 2009, 17:45
`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.
-
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: Modular
by zerker2000 » 04 Oct 2009, 17:52
Well, technically it's pay first, bounce second ... see edit above.DennisBergkamp wrote:Ah, you are right: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 .
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()
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by Chris H. » 04 Oct 2009, 21:12
`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.
-
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: Modular
by zerker2000 » 05 Oct 2009, 03:42
Ok, I'm finished, the rats were done as a calm-down exercise .
- ForgeSource1004.zip
- The updated source.
- (558.93 KiB) Downloaded 245 times
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by DennisBergkamp » 05 Oct 2009, 16:23
NICE!! I will play with it later this afternoon
Which other bugs did you fix, by the way?
Which other bugs did you fix, by the way?
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by zerker2000 » 05 Oct 2009, 23:09
Other? As in ones that cropped up independently of the Mana Pool/Ability_Mana/Gemstone Array merging? Well, replacing all instances of
EDIT: Oh, and fixed a couple of String == "<value>" to String.equals("<value>") here and there ... should prevent a couple future bugs .
- Code: Select all
card.removeInstrinsicKeyword("tap: add...
card.setText(card.getText() + ability)
card.addInstrinsicKeyword(...
EDIT: Oh, and fixed a couple of String == "<value>" to String.equals("<value>") here and there ... should prevent a couple future bugs .
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by DennisBergkamp » 06 Oct 2009, 01:27
Alright, awesome
I was just wondering, because I usually post a little changelog of all the changes whenever I upload a new version.
I was just wondering, because I usually post a little changelog of all the changes whenever I upload a new version.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by zerker2000 » 06 Oct 2009, 02:33
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.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by DennisBergkamp » 06 Oct 2009, 02:48
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.
I'll make some more changes of my own, and I'll upload next release in the next day or two.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
by zerker2000 » 06 Oct 2009, 03:09
How'd you think I did half my merging?!
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
39 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 89 guests