It is currently 23 Aug 2025, 22:03
   
Text Size

Cleanup in Aisle 4

Post MTG Forge Related Programming Questions Here

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

Cleanup in Aisle 4

Postby 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.
The Force will be with you, Always.
User avatar
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

Postby Chris H. » 17 Mar 2010, 11:17

Thank you Rob. This type of maintenance is not necessarily fun or interesting. :wink: 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. :-k
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: Cleanup in Aisle 4

Postby 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....
The Force will be with you, Always.
User avatar
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

Postby 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.
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: Cleanup in Aisle 4

Postby Rob Cashwalker » 17 Mar 2010, 18:23

I don't know for sure.

GameActionUtil(r531).upkeep_Echo() has a line:
Code: Select all
//list = list.getType("Creature");
Which might have explained what you're seeing... I don't know when that line became commented. I'm not even sure I recall when Echo was added....
The Force will be with you, Always.
User avatar
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

Postby 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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: Cleanup in Aisle 4

Postby Chris H. » 17 Mar 2010, 20:29

Thank you Rob and Dennis. :D

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.
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: Cleanup in Aisle 4

Postby mtgrares » 18 Mar 2010, 18:57

Thanks for the cleanup. I remember coding Wildsize, Tromp the Domains, and Brute Force ages ago.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Re: Cleanup in Aisle 4

Postby 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.
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: Cleanup in Aisle 4

Postby 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.
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


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 31 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 31 users online :: 0 registered, 0 hidden and 31 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 31 guests

Login Form