Page 1 of 1

Help scripting a custom card

PostPosted: 10 Sep 2017, 22:10
by Devlain
Hi there, I was trying to script this card

Code: Select all
Changeling - 1B
Creature - Zerg Shapeshifter
Changeling can't be blocked unless defending player pays {1} for each other attacking creature.
Whenever Changeling attacks and isn't blocked, you draw a card and lose 1 life.
0/1
This is my script:

Code: Select all
Name:Changeling
ManaCost:1 B
Types:Creature Zerg Shapeshifter
PT:0/1
S:Mode$ CantBlockUnless | Attacker$ Creature | Cost$ X | Description$ CARDNAME can't be blocked unless defending player pays {1} for each other attacking creature.
SVar:X:Count$Valid Creature.Other+YouCtrl+attacking
T:Mode$ AttackerUnblocked | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ Whenever CARDNAME attacks and isn't blocked, draw a card and lose 1 life.
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 | SubAbility$ DBLoseLife
SVar:DBLoseLife:DB$LoseLife | Defined$ You | LifeAmount$ 1
Oracle:Changeling can't be blocked unless defending player pays {1} for each other attacking creature.\nWhenever Changeling attacks and isn't blocked, you draw a card and lose 1 life.
Sadly, when I use it against the AI, the computer player just doesn't try to block any of my attackers, even if Changeling is not attacking. What could I have done wrong?
Thanks in advance!

Re: Help scripting a custom card

PostPosted: 10 Sep 2017, 22:18
by friarsol
Probably should be: S:Mode$ CantBlockUnless | Attacker$ Creature.Self

Re: Help scripting a custom card

PostPosted: 10 Sep 2017, 22:30
by Devlain
Now the AI is blocking Changeling without paying any mana

Code: Select all
S:Mode$ CantBlockUnless | Attacker$ Creature.Self | Cost$ X | Description$ CARDNAME can't be blocked unless defending player pays {1} for each other attacking creature.
SVar:X:Count$Valid Creature.Other+YouCtrl+attacking