Card Development Questions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Card Development Questions
by friarsol » 03 Jul 2011, 16:12
Hmm.. It feels like it should be part of the ValidTgts portion, but isValidCard down to hasProperty take the Controller and the Card source, where we would need to have access to the Ability. (So it can then check it's parents Targets). This code is used in a lot of places, and we are close to a beta release, so I don't want to just go changing that without proper discussion.
For general purpose, I think using Remember when we already have the information in Targeted isn't the right way to handle this situation, since it can have adverse effects.
For general purpose, I think using Remember when we already have the information in Targeted isn't the right way to handle this situation, since it can have adverse effects.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 03 Jul 2011, 22:53
Would Horde of Notions be doable as a ChangeZone?
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 03 Jul 2011, 23:14
Not really. We need AF_Cast for that.jeffwadsworth wrote:Would Horde of Notions be doable as a ChangeZone?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 05 Jul 2011, 00:09
Genju of the Fens:
When the Swamp is a 2/2, I am not able to tap it for mana. I can only activate the pump. Does someone see the issue?
- | Open
- Name:Genju of the Fens
ManaCost:B
Types:Enchantment Aura
Text:no text
K:Enchant Swamp
A:SP$ Attach | Cost$ B | ValidTgts$ Swamp | AILogic$ Pump
A:AB$ Animate | Cost$ 2 | Defined$ Enchanted | Power$ 2 | Toughness$ 2 | Types$ Creature,Spirit | Colors$ Black | Abilities$ ABPump | SpellDescription$ Until end of turn, enchanted Swamp becomes a 2/2 black Spirit creature with "B: This creature gets +1/+1 until end of turn." It's still a land.
T:Mode$ ChangesZone | ValidCard$ Card.AttachedBy | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | Execute$ TrigReturnOwner | OptionalDecider$ You | TriggerDescription$ When enchanted Swamp is put into a graveyard, you may return CARDNAME from your graveyard to your hand.
SVar:ABPump:AB$Pump | Cost$ B | Defined$ Self | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ This creature gets +1/+1 until end of turn.
SVar:TrigReturnOwner:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Graveyard | Destination$ Hand
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/genju_of_the_fens.jpg
End
When the Swamp is a 2/2, I am not able to tap it for mana. I can only activate the pump. Does someone see the issue?
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 05 Jul 2011, 00:17
Summoning Sickness?jeffwadsworth wrote:When the Swamp is a 2/2, I am not able to tap it for mana. I can only activate the pump. Does someone see the issue?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 05 Jul 2011, 00:22
That should not prevent me from tapping for mana. It is still a Land.friarsol wrote:Summoning Sickness?jeffwadsworth wrote:When the Swamp is a 2/2, I am not able to tap it for mana. I can only activate the pump. Does someone see the issue?
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by slapshot5 » 05 Jul 2011, 00:27
I don't know about Genju of the Fens, but it's not unique. The other Genju's that I submitted are affected by this also.
It looks like the SAs are still there since you can see the SpellDescriptions, so it's possibly a problem with the canPlay()?
-slapshot5
It looks like the SAs are still there since you can see the SpellDescriptions, so it's possibly a problem with the canPlay()?
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by slapshot5 » 05 Jul 2011, 00:30
That's exactly what's going on though. Add Permanent$ True to the Animate, and wait til the next turn. Mana abilities work as expected.jeffwadsworth wrote:That should not prevent me from tapping for mana. It is still a Land.friarsol wrote:Summoning Sickness?jeffwadsworth wrote:When the Swamp is a 2/2, I am not able to tap it for mana. I can only activate the pump. Does someone see the issue?
What's the correct ruling on this?
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Card Development Questions
by jeffwadsworth » 05 Jul 2011, 00:32
Ack!
A noncreature permanent that turns into a creature is subject to the "summoning sickness" rule: It can only attack, and its
abilities can only be activated, if its controller has continuously controlled that permanent since the beginning of his or her most recent turn.

A noncreature permanent that turns into a creature is subject to the "summoning sickness" rule: It can only attack, and its


- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 05 Jul 2011, 01:48
I probably should have clarified exactly what I meant. A non-creature type that hasn't been in play since the beginning of your turn that becomes a creature is affected by "summoning sickness"
-Sol, Rules Lawyer
-Sol, Rules Lawyer
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 07 Jul 2011, 01:07
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 07 Jul 2011, 01:21
Do you have the Sample code? I'll try something locally and commit if it works.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by friarsol » 07 Jul 2011, 02:32
Alright to get this functional you need to change in AF_Animate.resolve():
The card is (and I expect to see Sworn Defender soon afterwards)
- Code: Select all
if (tgt != null)
tgts = tgt.getTargetCards();
else
tgts = AbilityFactory.getDefinedCards(source, params.get("Defined"), sa);
- Code: Select all
if (tgt == null || params.containsKey("Defined"))
tgts = AbilityFactory.getDefinedCards(source, params.get("Defined"), sa);
else
tgts = tgt.getTargetCards();
The card is (and I expect to see Sworn Defender soon afterwards)
- Code: Select all
Name:Sentinel
ManaCost:4
Types:Artifact Creature Shapeshifter
Text:no text
PT:1/1
A:AB$ Animate | Cost$ 0 | Defined$ Self | ValidTgts$ Creature.blockingSource,Creature.blockedBySource | TgtPrompt$ Select target creature blocking or blocked by Sentinel | Toughness$ X | Permanent$ True | SpellDescription$ CARDNAME's toughness becomes 1 plus the power of target creature blocking or blocked by CARDNAME. (This effect lasts indefinitely.)
SVar:X:Targeted$CardPower/Plus.1
End
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
by jeffwadsworth » 07 Jul 2011, 02:49
Thanks Sol.
I did have a sample but I didn't expect someone to respond this quickly and grabbed a bite.
Sworn Defender is one of my RARE collection cards.

Sworn Defender is one of my RARE collection cards.
- | Open
- Name:Sworn Defender
ManaCost:2 W W
Types:Creature Human Knight
Text:no text
PT:1/3
A:AB$ Animate | Cost$ 1 | Defined$ Self | ValidTgts$ Creature.blockingSource,Creature.blockedBySource | TgtPrompt$ Select target creature blocking or blocked by CARDNAME | Power$ X | Toughness$ Y | SpellDescription$ CARDNAME's power becomes the toughness of target creature blocking or being blocked by CARDNAME minus 1 until end of turn, and CARDNAME's toughness becomes 1 plus the power of that creature until end of turn.
SVar:X:Targeted$CardToughness/Minus.1
SVar:Y:Targeted$CardPower/Plus.1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/sworn_defender.jpg
End
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Card Development Questions
by friarsol » 07 Jul 2011, 03:08
In your personal collection? I own the whole Alliances set :-d I'm very fond of it.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Who is online
Users browsing this forum: No registered users and 35 guests