Cleanup in Aisle 4
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
10 posts
• Page 1 of 1
Cleanup in Aisle 4
by Rob Cashwalker » 17 Mar 2010, 04:31
I just committed two changes to CardFactory. First was removing the commented code for the original Pump abilities and damage spells. Second, I removed the commented card code for:
Saltblast, Sparkspray, Gerrard's Command, Brute Force, Wildsize, Scepter of Insight
Primal Boost and Urza's Blueprints can be converted to keywords.
I also removed the explicit code for Tromp the Domains, because it is also defined by a block of code handling "pump all" spells.
It might be a good idea to go through more of CardFactory to find other commented cards that have had keywords for a couple versions. Also be on the lookout for any cards that should be revised using keywords, and comment the explicit code.
Edit - another example, I'm looking at Goblin Balloon Brigade and Manta Riders in CardFactory_Creatures. These should have been swapped for their keyworded format a long time ago... I'm sure at least the Goblin was one of the cards I included as an example with KPump.
Saltblast, Sparkspray, Gerrard's Command, Brute Force, Wildsize, Scepter of Insight
Primal Boost and Urza's Blueprints can be converted to keywords.
I also removed the explicit code for Tromp the Domains, because it is also defined by a block of code handling "pump all" spells.
It might be a good idea to go through more of CardFactory to find other commented cards that have had keywords for a couple versions. Also be on the lookout for any cards that should be revised using keywords, and comment the explicit code.
Edit - another example, I'm looking at Goblin Balloon Brigade and Manta Riders in CardFactory_Creatures. These should have been swapped for their keyworded format a long time ago... I'm sure at least the Goblin was one of the cards I included as an example with KPump.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Cleanup in Aisle 4
by Chris H. » 17 Mar 2010, 11:17
Thank you Rob. This type of maintenance is not necessarily fun or interesting.
I do think that we are doing a fair job.
I had planned to delete some of the old commented out code a few weeks ago … and then got preoccupied with creating a few X cost cards and the eqPump conversion is still ongoing but it is coming to an end.
I had in the past considered converting Primal Boost to keyword but then realized that Dennis (?) had found a way to code the additional cycling effect with another card. Yeah, Renewed Faith is fully implemented. It did not need a note stating: "When you cycle Renewed Faith, you may gain 2 life." is not implemented.
I thought that I had converted Goblin Balloon Brigade and/or Manta Riders over to keyword only. I could be mistaken.

I had planned to delete some of the old commented out code a few weeks ago … and then got preoccupied with creating a few X cost cards and the eqPump conversion is still ongoing but it is coming to an end.
I had in the past considered converting Primal Boost to keyword but then realized that Dennis (?) had found a way to code the additional cycling effect with another card. Yeah, Renewed Faith is fully implemented. It did not need a note stating: "When you cycle Renewed Faith, you may gain 2 life." is not implemented.
I thought that I had converted Goblin Balloon Brigade and/or Manta Riders over to keyword only. I could be mistaken.

-
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: Cleanup in Aisle 4
by Rob Cashwalker » 17 Mar 2010, 11:42
Thanks Chris.
When I work on testing keyworded cards, I usually go through the CardFactories and comment the original cards, but I never upload those changes, because I know my local copy is a little out of date after spending a couple weeks working on the keywords.
Slightly unrelated - I wish I could mouse over a cardname in eclipse and have it popup the card text like on the forum....
When I work on testing keyworded cards, I usually go through the CardFactories and comment the original cards, but I never upload those changes, because I know my local copy is a little out of date after spending a couple weeks working on the keywords.
Slightly unrelated - I wish I could mouse over a cardname in eclipse and have it popup the card text like on the forum....
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Cleanup in Aisle 4
by Chris H. » 17 Mar 2010, 14:38
`Rob Cashwalker wrote:Urza's Blueprints can be converted to keywords.
I have noticed a problem with Echo. I and the computer have to pay the echo cost for Pouncing Jaguar (and I assume for other creatures) but we do not have to pay the echo cost for Urza's Blueprints?
So, something is happening during that next upkeep after this permanent come under our control. And we are not being prompted to pay the 6 cost or to sacrifice the Urza's Blueprints.
Can you take a look at this Rob? I can go ahead and covert this card from code to keyword since the echo is not working with either implementation of this card.
-
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: Cleanup in Aisle 4
by Rob Cashwalker » 17 Mar 2010, 18:23
I don't know for sure.
GameActionUtil(r531).upkeep_Echo() has a line:
GameActionUtil(r531).upkeep_Echo() has a line:
- Code: Select all
//list = list.getType("Creature");
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Cleanup in Aisle 4
by DennisBergkamp » 17 Mar 2010, 19:54
I added echo a bunch of releases ago. I had to dig around in the code a bit to remember how it all works....
Anyway, basically I added some code in CardFactory_Creatures that adds a "ComesIntoPlay" command which adds a "(Echo unpaid)" keyword to any creature that has the Echo keyword.
I'll do the same to CardFactory, I guess I must've thought that the only permanents with Echo were creatures.
Anyway, basically I added some code in CardFactory_Creatures that adds a "ComesIntoPlay" command which adds a "(Echo unpaid)" keyword to any creature that has the Echo keyword.
I'll do the same to CardFactory, I guess I must've thought that the only permanents with Echo were creatures.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Cleanup in Aisle 4
by Chris H. » 17 Mar 2010, 20:29
Thank you Rob and Dennis.
I have merged most of the abLoseLifeTgt card work into the SVN. With Dennis' r541 update I should be able to give Urza's Blueprints a second shot of clean-up.

I have merged most of the abLoseLifeTgt card work into the SVN. With Dennis' r541 update I should be able to give Urza's Blueprints a second shot of clean-up.
-
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: Cleanup in Aisle 4
by mtgrares » 18 Mar 2010, 18:57
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Cleanup in Aisle 4
by Chris H. » 18 Mar 2010, 19:07
Things look fairly clean at this time. There might still be a card or two that we overlooked, but I think that we are up to date. Once the equip keyword update is finished I will delete the commented-out cards from that section.
-
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: Cleanup in Aisle 4
by Chris H. » 11 May 2010, 14:01
`Chris H. wrote:There might still be a card or two that we overlooked, but I think that we are up to date.
It seems that we were able to update Fledgling Mawcor to use the abDamageTgt keyword. I thought that we had also updated the Mawcor and the Pirate Ship at the same time. Granted, memories tend to fade with time. I will apply the changes later today.
-
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
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 31 guests