Restrictions for Card.isValidCard
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
18 posts
• Page 2 of 2 • 1, 2
Re: Restrictions for Card.isValidCard
by slapshot5 » 16 Jun 2011, 14:19
In the interest of expanding isValidCard to handle things like the Echoing cards (ex. "Destroy target enchantment and all other enchantments with the same name as that enchantment."), what needs to be done? Looks to me like we just pass in the AbilityFactory object when called from an AF, and null otherwise. Then, in hasProperty, we check for null, get the targets, then check the name.
Seem reasonable?
-slapshot5
Seem reasonable?
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Restrictions for Card.isValidCard
by friarsol » 16 Jun 2011, 14:27
Are we passing in the AF or the SA?slapshot5 wrote:In the interest of expanding isValidCard to handle things like the Echoing cards (ex. "Destroy target enchantment and all other enchantments with the same name as that enchantment."), what needs to be done? Looks to me like we just pass in the AbilityFactory object when called from an AF, and null otherwise. Then, in hasProperty, we check for null, get the targets, then check the name.
Seem reasonable?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Restrictions for Card.isValidCard
by slapshot5 » 16 Jun 2011, 20:03
Niether right now. Just (String, sourceCard, controller).
I suppose passing in the SA would be better.
-slapshot5
I suppose passing in the SA would be better.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
18 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 24 guests