Page 61 of 141

Re: Card Development Questions

PostPosted: 05 Oct 2011, 06:55
by Hellfish
I've been able to get Johtull to work without the NumBlockersMinus1 parameter with some tinkering to calculateAmount. I think it has to do with how calculateAmount delegates to xCount and some info that isn't retained (and shouldn't be).Will report back with more info and hopefully a fix.

EDIT: Okay, yeah, I see it now. When AF_Pump gets to sees "Number$" in X it delegates the calculation to xCount (omitting the spellability, because xCount must sometimes function without one), then xCount processes the XMath (Times.Z) and recurses to calculate Z. Unfortunately it recurses to xCount again, which doesn't have access to the spellability required to calculate the TriggerCount in Z. To solve this, I added a block to calculateAmount which handles "SVar$" calculations.If it catches one, it recurses to itself to calculate that SVar first, letting you use TriggerCount and whatnot properly.

tl;dr check out r10928. :)

Re: Card Development Questions

PostPosted: 05 Oct 2011, 08:29
by Sloth
jeffwadsworth wrote:I did not notice a "comment" section on the SVN. Doesn't the recently added Teferi's Moat need "Affected$ Creature.withoutFlying+ChosenColor+YouDontCtrl"?
Fixed! Thanks Jeff.

Re: Card Development Questions

PostPosted: 05 Oct 2011, 16:52
by jeffwadsworth
Looking at Blood Lust.

| Open
Name:Blood Lust
ManaCost:1 R
Types:Instant
Text:no text
A:SP$ Pump | Cost$ 1 R | NumAtt$ +4 | NumDef$ -4 | ValidTgts$ Creature | TgtPrompt$ Select target creature | ConditionDefined$ Targeted | ConditionPresent$ toughnessGE5 | ConditionCompare$ EQ1 | SubAbility$ DBPump | SpellDescription$ If target creature has toughness 5 or greater, it gets +4/-4 until end of turn. Otherwise, it gets +4/-X until end of turn, where X is its toughness minus 1.
SVar:DBPump:DB$Pump | NumAtt$ 4 | NumDef$ -X | Defined$ Targeted | ConditionDefined$ Targeted | ConditionPresent$ toughnessLT5 | ConditionCompare$ EQ1
SVar:X:Targeted$CardToughness/Minus.1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/blood_lust.jpg
End


This fires, but the targeted creature does not get the pump at all, even though the generated stack description looks fine. Ideas?

Re: Card Development Questions

PostPosted: 05 Oct 2011, 23:18
by slapshot5
jeffwadsworth wrote:Looking at Blood Lust.

| Open
Name:Blood Lust
ManaCost:1 R
Types:Instant
Text:no text
A:SP$ Pump | Cost$ 1 R | NumAtt$ +4 | NumDef$ -4 | ValidTgts$ Creature | TgtPrompt$ Select target creature | ConditionDefined$ Targeted | ConditionPresent$ toughnessGE5 | ConditionCompare$ EQ1 | SubAbility$ DBPump | SpellDescription$ If target creature has toughness 5 or greater, it gets +4/-4 until end of turn. Otherwise, it gets +4/-X until end of turn, where X is its toughness minus 1.
SVar:DBPump:DB$Pump | NumAtt$ 4 | NumDef$ -X | Defined$ Targeted | ConditionDefined$ Targeted | ConditionPresent$ toughnessLT5 | ConditionCompare$ EQ1
SVar:X:Targeted$CardToughness/Minus.1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/blood_lust.jpg
End


This fires, but the targeted creature does not get the pump at all, even though the generated stack description looks fine. Ideas?
Creature.toughnessGE5 ?

Re: Card Development Questions

PostPosted: 06 Oct 2011, 00:37
by jeffwadsworth
Yes, thanks. That and a little logic switcharoo saved the day.

Re: Card Development Questions

PostPosted: 06 Oct 2011, 16:49
by jeffwadsworth
Testing Lesser Werewolf

| Open
Name:Lesser Werewolf
ManaCost:3 B
Types:Creature Werewolf
Text:no text
PT:2/4
A:AB$ Pump | Cost$ B | NumAtt$ -1 | Defined$ Self | ConditionDefined$ Self | ConditionPresent$ Creature.powerGE1 | ConditionCompare$ EQ1 | SubAbility$ DBPutCounter | ActivationPhases$ Declare Blockers - Play Instants and Abilities | SpellDescription$ If CARDNAME's power is 1 or more, it gets -1/-0 until end of turn and put a -0/-1 counter on target creature blocking or blocked by CARDNAME. Activate this ability only during the declare blockers step.
SVar:DBPutCounter:DB$ PutCounter | ConditionDefined$ Self | ConditionPresent$ Creature.powerGE0 | ConditionCompare$ EQ1 | ValidTgts$ Creature.blockedBySource,Creature.blockingSource | TgtPrompt$ Select target creature blocking or blocked by Lesser Werewolf | CounterType$ M0M1 | CounterNum$ 1
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/lesser_werewolf.jpg
End


The pump works correctly and will not push the power of the Lesser Werewolf below 0. The 0/-1 counter on the defender will keep going even though the Lesser Werewolf is at 0 power. Does anyone see what can be done here?

Re: Card Development Questions

PostPosted: 06 Oct 2011, 16:57
by friarsol
jeffwadsworth wrote:Testing Lesser Werewolf

The pump works correctly and will not push the power of the Lesser Werewolf below 0. The 0/-1 counter on the defender will keep going even though the Lesser Werewolf is at 0 power. Does anyone see what can be done here?
Did you try flipping the Abilities?

Re: Card Development Questions

PostPosted: 06 Oct 2011, 17:13
by jeffwadsworth
friarsol wrote:
jeffwadsworth wrote:Testing Lesser Werewolf

The pump works correctly and will not push the power of the Lesser Werewolf below 0. The 0/-1 counter on the defender will keep going even though the Lesser Werewolf is at 0 power. Does anyone see what can be done here?
Did you try flipping the Abilities?
Switcharoo's FTW. Thanks.

Re: Card Development Questions

PostPosted: 06 Oct 2011, 23:19
by friarsol
Jeff,
Sword of the Ages is wrong. Exiling Creatures is part of the cost, and might even be supported with my recent Cost changes.

Check out Devastating Dreams for a similar Card.

Re: Card Development Questions

PostPosted: 07 Oct 2011, 00:00
by jeffwadsworth
friarsol wrote:Jeff,
Sword of the Ages is wrong. Exiling Creatures is part of the cost, and might even be supported with my recent Cost changes.

Check out Devastating Dreams for a similar Card.
So, something like this? Won't work but just making sure there isn't a better way.

| Open
Name:Sword of the Ages
ManaCost:6
Types:Artifact
Text:no text
K:CARDNAME enters the battlefield tapped.
A:AB$ DealDamage | Cost$ T Exile<1/CARDNAME> Exile<X/Creature.YouCtrl | NumDmg$ Y | CostDesc$ Exile Sword of the Ages and any number of creatures you control: | SpellDescription$ CARDNAME deals X damage to target creature or player, where X is the total power of the creatures exiled this way.
SVar:Y:Exiled$TotalPower
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/sword_of_the_ages.jpg
End

Re: Card Development Questions

PostPosted: 07 Oct 2011, 00:10
by friarsol
Yea that looks right. Not sure if you need the .YouCtrl or not.

Re: Card Development Questions

PostPosted: 07 Oct 2011, 00:16
by jeffwadsworth
Here is a sample script for The Wretched.

| Open
Name:The Wretched
ManaCost:3 B B
Types:Creature Demon
Text:no text
PT:2/5
T:Mode$ AttackerBlocked | ValidCard$ Card.Self | ValidBlocker$ Creature | DelayedTrigger$ DelayedTrig | TriggerDescription$ At end of combat, gain control of all creatures blocking CARDNAME for as long as you control CARDNAME.
SVar:DelayedTrig:Mode$ Phase | Phase$ EndCombat | ValidPlayer$ You | Execute$ TrigGainControl | TriggerDescription$ Gain control of creature that blocked CARDNAME
SVar:TrigGainControl:AB$GainControl | Cost$ 0 | Defined$ TriggeredBlocker | LoseControl$ LeavesPlay
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/the_wretched.jpg
End


Now, this works for 1 creature blocking The Wretched, but not 2 or more. What am I missing?

Re: Card Development Questions

PostPosted: 07 Oct 2011, 02:05
by slapshot5
jeffwadsworth wrote:Now, this works for 1 creature blocking The Wretched, but not 2 or more. What am I missing?
I think TriggeredBlocker will only ever return 1 card. More than 1 is not supported at this time.

-slapshot5

Re: Card Development Questions

PostPosted: 07 Oct 2011, 03:00
by jeffwadsworth
friarsol wrote:Yea that looks right. Not sure if you need the .YouCtrl or not.
It will have to wait until SVar:Y:Exiled$SumPower is done.

Re: Card Development Questions

PostPosted: 07 Oct 2011, 03:25
by slapshot5
jeffwadsworth wrote:
friarsol wrote:Yea that looks right. Not sure if you need the .YouCtrl or not.
It will have to wait until SVar:Y:Exiled$SumPower is done.
Did you try just Exiled$CardPower? I think it might sum the list for you.

-slapshot5