It is currently 29 Oct 2025, 21:26
   
Text Size

static mana ability pump for basic lands

Post MTG Forge Related Programming Questions Here

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

static mana ability pump for basic lands

Postby slapshot5 » 08 May 2011, 17:17

I think we could simplify several things in our code if we made a static ability pump for basic land types. That way, we could just look at types and assign abilities "on the fly" so to speak.

Example:
Things like Tidal Warrior could just use AF_Animate to change type to Island, then the static pump would handle the mana ability. Also useful for Blood Moon, Urborg, Tomb of Yawgmoth, etc.

Thoughts? Potential hangups?

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: static mana ability pump for basic lands

Postby friarsol » 08 May 2011, 18:41

slapshot5 wrote:I think we could simplify several things in our code if we made a static ability pump for basic land types. That way, we could just look at types and assign abilities "on the fly" so to speak.

Example:
Things like Tidal Warrior could just use AF_Animate to change type to Island, then the static pump would handle the mana ability. Also useful for Blood Moon, Urborg, Tomb of Yawgmoth, etc.

Thoughts? Potential hangups?

-slapshot5
Agreed. When I was converting AFs for Mana I was thinking it would be so much easier for the 5 basic land types to be granted mana abilities, instead of having it written out.

Can Animate handle hiding existing abilities that the card already has?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: static mana ability pump for basic lands

Postby slapshot5 » 08 May 2011, 20:54

friarsol wrote:Can Animate handle hiding existing abilities that the card already has?
Not currently. It can overwrite types and colors only.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: static mana ability pump for basic lands

Postby slapshot5 » 08 May 2011, 21:04

So, I suppose I can just put a call to:

GameActionUtil.stLandManaAbilities.execute() in GameAction.checkStateEffects()?

Or is there a better way to handle it?
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: static mana ability pump for basic lands

Postby slapshot5 » 09 May 2011, 02:33

I've checked something in for this. If you see any problems with basic lands or dual lands with the basic land types, or the auras that change land types, please let me know.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: static mana ability pump for basic lands

Postby slapshot5 » 09 May 2011, 15:57

Also, are there any other cards in Forge that will need to be updated for this? It's not easy to search the source code for things that would need to be changed.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: static mana ability pump for basic lands

Postby Sloth » 09 May 2011, 17:09

slapshot5 wrote:Also, are there any other cards in Forge that will need to be updated for this? It's not easy to search the source code for things that would need to be changed.

-slapshot5
Maybe Spreading Seas and friends?
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: static mana ability pump for basic lands

Postby slapshot5 » 09 May 2011, 20:00

I got the auras. They should work.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 25 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 25 guests

Login Form