It is currently 16 Apr 2024, 17:45
   
Text Size

Help scripting a custom card

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

Help scripting a custom card

Postby Devlain » 10 Sep 2017, 22:10

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!
Devlain
 
Posts: 2
Joined: 10 Sep 2017, 22:01
Has thanked: 1 time
Been thanked: 0 time

Re: Help scripting a custom card

Postby friarsol » 10 Sep 2017, 22:18

Probably should be: S:Mode$ CantBlockUnless | Attacker$ Creature.Self
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Help scripting a custom card

Postby Devlain » 10 Sep 2017, 22:30

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
Devlain
 
Posts: 2
Joined: 10 Sep 2017, 22:01
Has thanked: 1 time
Been thanked: 0 time


Return to Forge

Who is online

Users browsing this forum: Google [Bot] and 61 guests


Who is online

In total there are 62 users online :: 1 registered, 0 hidden and 61 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: Google [Bot] and 61 guests

Login Form