It is currently 19 Apr 2024, 19:51
   
Text Size

Declaring activated ability in card script

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

Declaring activated ability in card script

Postby melvin » 28 Oct 2013, 09:02

There is new syntax in 1.43 for activated abilities which you can write in the ability property of the card script. Below are some examples from current cards.

Legend:
Code: Select all
{S} = Sacrifice this permanent
{E} = Exile this permanent
{C} = Remove a charge counter
{C3} = Remove three charge counters
{+1/+1} = Remove a +1/+1 counter
{O}  = Activate this ability only once each turn
Code: Select all
pay {0}: Return SN to its owner's hand.
pay {0}: SN gets +1/-1 until end of turn.
pay {+1/+1}: SN deals 1 damage to target creature or player.
pay {1}{B}: SN gets +1/+0 until end of turn.
pay {1}{B}: SN gets +1/+1 until end of turn.
pay {1}{B}: SN gets +2/+2 until end of turn.
pay {1}{B}: Target creature you control gains deathtouch until end of turn.
pay {1}{B},{T}: Destroy target creature with shadow.
pay {1},{C}: SN deals 1 damage to target creature or player.
pay {1}{G}, {O}: SN gets +2/+2 until end of turn.
pay {1}{G}: PN puts a 1/1 green Insect creature token onto the battlefield.
pay {1}{G}, Sacrifice an Elf: Target creature gets +3/+3 until end of turn.
pay {1}{R},{+1/+1}: SN deals 1 damage to target creature or player.
pay {1}{R},Sacrifice a Goblin: SN deals 2 damage to target creature or player.
pay {1}{R}: SN deals 1 damage to target creature or player.
pay {1}{R}: SN gets +1/+0 until end of turn.
pay {1}{R}: SN gets +2/+0 until end of turn.
pay {1}{R}: SN gets +3/-3 until end of turn.
pay {1}{R}: Target creature gains haste until end of turn.
pay {1},Sacrifice a Saproling: PN draws a card.
pay {1},{S}: Destroy target artifact or enchantment.
pay {1}: SN gets +1/+0 until end of turn.
pay {1}: SN gets -1/+1 until end of turn.
pay {1}: SN gets +1/-1 until end of turn.
pay {1}: SN gets +1/+1 until end of turn.
pay {1}, {S}: Prevent the next 1 damage that would be dealt to target Sliver creature or player this turn.
pay {1}, {S}: SN deals 1 damage to target creature or player.
pay {1},{S}: SN deals 2 damage to target creature or player.
pay {1}, {S}: Target Sliver creature gets +2/+2 until end of turn.
pay {1}, {T}: Put a +1/+1 counter on SN.
pay {1},{T}: Tap target artifact, creature, or land.
pay {1},{T}: Tap target non-Human creature.
pay {1}{U}: Return SN to its owner's hand.
pay {1}{U}{R}: Return SN to its owner's hand.
pay {1}{U}, {T}: Tap target permanent.
pay {1}{U}, {T}: Untap target permanent.
pay {1}{W}{B},{T}: Destroy target creature or enchantment.
pay {1}{W}: Put a +1/+1 counter on SN.
pay {1}{W}, {S}: Creatures PN controls get +1/+1 until end of turn.
pay {1}{W},{S}: Exile target enchantment.
pay {1}{W}: SN gets +0/+1 until end of turn.
pay {1}{W}: SN gets +0/+3 until end of turn.
pay {1}{W}: SN gets +1/+0 until end of turn.
pay {1}{W}: Target creature gains first strike until end of turn.
pay {1}{W}: Target creature you control gains lifelink until end of turn.
pay {1}{W/U},{Q}: Tap target creature.
pay {1}{W}{W}: Target creature gets +1/+1 until end of turn.
pay {1}{W}{W}: Target Knight creature gets +1/+1 until end of turn.
pay {2}{B}: SN gets +1/+1 until end of turn.
pay {2}{B}: SN gets +2/+2 until end of turn.
pay {2}{G}{G}: PN puts a 3/3 green Centaur creature token onto the battlefield.
pay {2}{G}, {O}: SN gets +2/+2 until end of turn.
pay {2}{G}, {O}: SN gets +3/+3 until end of turn.
pay {2}{G}: PN puts a 1/1 green Saproling creature token onto the battlefield.
pay {2}{G}: PN puts a 2/2 green Wolf creature token onto the battlefield.
pay {2}{G}, {S}: PN puts a 3/3 green Centaur creature token onto the battlefield.
pay {2}: PN puts a 1/1 colorless Sliver creature token onto the battlefield.
pay {2}{R}: Creatures PN controls get +1/+0 until end of turn.
pay {2}{R}, Sacrifice a Samurai: Samurai creatures PN controls gain double strike until end of turn.
pay {2}{R}: SN deals 1 damage to target player.
pay {2}: SN gets +0/+1 until end of turn.
pay {2}: SN gets +1/+0 until end of turn.
pay {2}: SN gets +1/+1 until end of turn.
pay {2},{S}: PN draws a card.
pay {2},{S}: PN gains 4 life.
pay {2},{S}: SN deals 2 damage to target creature or player.
pay {2},{T}: SN deals 1 damage to target creature or player.
pay {2},{T}: Tap target creature.
pay {2}{U}: Tap target creature with flying.
pay {2}{U}: Tap target creature without flying.
pay {2}{U}: Untap SN.
pay {2}{U}{U}: Return SN to its owner's hand.
pay {2}{U}{U},{T}: Counter target spell.
pay {2}{W}, {+1/+1}: PN puts two 1/1 white Spirit creature tokens with flying onto the battlefield.
pay {2}{W}: PN puts a 1/1 white Soldier creature token onto the battlefield.
pay {3}{B}{B}, Sacrifice a Bat: PN puts two 1/1 black Bat creature tokens with flying onto the battlefield.
pay {3}{B}, Discard a card: Target creature gets -2/-2 until end of turn.
pay {3}{G}, {O}: SN gets +2/+2 until end of turn.
pay {3}{G}, {O}: SN gets +3/+3 until end of turn.
pay {3}{G},{S}: SN deals 2 damage to target creature or player.
pay {3}{G}, {T}: Tap target creature.
pay {3}{G}, {T}: Untap target creature.
pay {3}: Return SN to its owner's hand.
pay {3}: SN gets +1/+0 until end of turn.
pay {3},{T},{C}: PN draws a card.
pay {3}{U}: PN draws a card.
pay {3}{U}: Return SN to its owner's hand.
pay {4}{G}{W}: PN puts a 3/3 green Centaur creature token onto the battlefield.
pay {4}: PN draws a card.
pay {4},{T},{E}: Exile target creature.
pay {4},{T}: PN draws a card.
pay {4}{W}: SN gets +1/+2 until end of turn.
pay {5}{G}: SN gets +3/+3 until end of turn.
pay {5}: PN puts a 1/1 colorless Myr artifact creature token onto the battlefield.
pay {5}{R}{R}: PN puts a 5/5 red Dragon creature token with flying onto the battlefield.
pay {7}{W}: PN gains 5 life.
pay {B}{B}: SN gets +1/+0 until end of turn.
pay {B}{G}, {O}: SN gets +1/+1 until end of turn.
pay {B}{G}: SN gets +1/+1 until end of turn.
pay {B/R}: SN gets +1/+0 until end of turn.
pay {B}{R}: SN gets +1/+0 until end of turn.
pay {B},{S}: Destroy target nonblack creature.
pay {B}: SN gets +1/+0 until end of turn.
pay {B}: SN gets +1/-1 until end of turn.
pay {B}: SN gets +1/+1 until end of turn.
pay {B}: SN gets +2/-1 until end of turn.
pay {B},{T}: Target creature gets -1/-1 until end of turn.
pay {C3}: PN puts a 1/1 green Saproling creature token onto the battlefield.
pay {C3}: PN puts a 3/3 colorless Golem artifact creature token onto the battlefield.
pay {C3},{S}: PN draws two cards.
pay {C3},{S}: PN gains 8 life.
pay {C3},{S}: PN puts a 5/5 black Zombie Giant creature token onto the battlefield.
pay {C}: PN gains 2 life.
pay {C}: Prevent the next 2 damage that would be dealt to target creature or player this turn.
pay {C}: SN gets +1/+1 until end of turn.
pay {C}: Tap target creature.
pay {C}: Target creature gets -1/-1 until end of turn.
pay Discard a card: Return SN to its owner's hand.
pay Discard two cards: PN puts a 2/2 black Zombie creature token onto the battlefield.
pay {G}: SN gets +0/+1 until end of turn.
pay {G}: SN gets +1/+1 until end of turn.
pay {G}: SN gets +1/-2 until end of turn.
pay {G}: Target creature gains trample until end of turn.
pay {G}: Target creature gets +1/+1 until end of turn.
pay {G}, {T}: PN puts a 1/1 green Elf Warrior creature token onto the battlefield.
pay {G},{T}: Untap target Elf.
pay {G/W}{G/W}: SN gets +1/+1 until end of turn.
pay Pay 1 life: SN gets +1/+1 until end of turn.
pay Pay 2 life, {O}: SN gets +2/+2 until end of turn.
pay Pay 2 life: Return SN to its owner's hand.
pay Pay 7 life: PN draws seven cards.
pay {R}: Creatures PN controls get +1/+0 until end of turn.
pay {R/G}{R/G}{R/G}: SN gets +3/+0 until end of turn.
pay {R}{G}: SN gets +1/-1 until end of turn.
pay {R}, {O}: SN gets +1/+0 until end of turn.
pay {R}, Sacrifice an artifact: SN gets +3/+0 until end of turn.
pay {R},{S}: Destroy target artifact.
pay {R},{S}: Destroy target land.
pay {R}: SN gets +0/+1 until end of turn.
pay {R}: SN gets +1/+0 until end of turn.
pay {R}: SN gets +1/-1 until end of turn.
pay {R}: SN gets +1/+1 until end of turn.
pay {R}: SN gets +2/-2 until end of turn.
pay {R}: Target creature gets +1/+0 until end of turn.
pay {R}: Target creature you control gains haste until end of turn.
pay {R},{T},Sacrifice a creature: SN deals 2 damage to target creature or player.
pay {R}, {T}: SN deals 1 damage to target creature or player.
pay {R/W}: Red creatures and white creatures PN controls gain first strike until end of turn.
pay {R/W}: SN gets +1/+0 until end of turn.
pay {R}{W}: SN gets +2/+0 until end of turn.
pay Sacrifice a Beast: PN gains 4 life.
pay Sacrifice a creature: Put a +1/+1 counter on SN.
pay Sacrifice a creature: SN deals 1 damage to target creature or player.
pay Sacrifice a creature: SN gets +1/+1 until end of turn.
pay Sacrifice a creature: SN gets +2/+1 until end of turn.
pay Sacrifice a creature: SN gets +2/+2 until end of turn.
pay Sacrifice a land: PN gains 2 life.
pay Sacrifice an artifact: Put a +1/+1 counter on SN.
pay Sacrifice a Saproling: PN gains 2 life.
pay Sacrifice a Saproling: SN gets +1/+2 until end of turn.
pay Sacrifice a Saproling: Target creature gains haste until end of turn.
pay Sacrifice a Saproling: Target creature gets -1/-1 until end of turn.
pay Sacrifice a Saproling: Target creature gets +1/+1 until end of turn.
pay {S}: Counter target instant or sorcery spell unless its controller pays {1}.
pay {S}: Counter target spell unless its controller pays {1}.
pay {S}: Counter target spell with {X} in its mana cost unless its controller pays {3}.
pay {S}: Creatures PN controls gain indestructible until end of turn.
pay {S}: Destroy target nonbasic land.
pay {S}: Destroy target nonblack creature.
pay {S}: PN draws a card.
pay {S}: PN gains 3 life.
pay {S}: PN gains 4 life.
pay {S}: SN deals 1 damage to target creature or player.
pay {S}: SN deals 2 damage to target creature or player.
pay {S}: Target creature gets -1/-1 until end of turn.
pay {S}: Target creature gets +2/+2 until end of turn.
pay {T},{C}: Tap target artifact or creature.
pay {T}: Destroy target creature.
pay {T}: Destroy target creature with power 4 or greater.
pay {T}: Destroy target tapped creature.
pay {T}, Discard a card: PN draws a card.
pay {T}, Pay 1 life: PN draws a card.
pay {T}: PN draws a card.
pay {T}: PN draws a card, then discards a card.
pay {T}: PN draws three cards.
pay {T}: PN gains 2 life.
pay {T}: PN puts a 1/1 white Human creature token onto the battlefield.
pay {T}: PN puts a legendary 2/2 green and white Wolf creature token named Voja onto the battlefield.
pay {T}: PN puts an 8/8 Beast creature token that's red, green, and white onto the battlefield.
pay {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.
pay {T}: Prevent the next 1 damage that would be dealt to target player this turn.
pay {T}: Prevent the next 2 damage that would be dealt to target artifact creature this turn.
pay {T}: Prevent the next 2 damage that would be dealt to target creature or player this turn.
pay {T}: Put a +1/+1 counter on SN.
pay {T},Sacrifice a creature: Put a charge counter on SN.
pay {T},Sacrifice an artifact: SN deals 2 damage to target creature or player.
pay {T},{S}: Destroy target land.
pay {T},{S}: Destroy target nonbasic land.
pay {T}: SN deals 1 damage to target attacking or blocking creature.
pay {T}: SN deals 1 damage to target attacking or blocking Spirit.
pay {T}: SN deals 1 damage to target creature or player.
pay {T}: SN deals 1 damage to target player.
pay {T}: SN deals 3 damage to target creature or player.
pay {T}: SN deals 4 damage to target attacking creature with flying.
pay {T}: Tap target permanent.
pay {T}: Target Assembly-Worker creature gets +1/+1 until end of turn.
pay {T}: Target attacking creature gets +1/+1 until end of turn.
pay {T}: Target creature gets +1/+2 until end of turn.
pay {T}: Untap target Forest.
pay {T}: Untap target Gate.
pay {T}: Untap target land.
pay {U/B}: SN gets +1/+1 until end of turn.
pay {U}, {O}: SN gets +1/+0 until end of turn.
pay {U}: Return SN to its owner's hand.
pay {U/R}: SN gets +1/-1 until end of turn.
pay {U},{S}: Counter target noncreature spell.
pay {U}: SN gets +1/+0 until end of turn.
pay {U}: SN gets -1/+1 until end of turn.
pay {U}: SN gets +1/-1 until end of turn.
pay {U}: SN gets +1/+1 until end of turn.
pay {U},{T}: Return target permanent you control to its owner's hand.
pay {U}, {T}: Tap target creature.
pay {U}, {T}: Target creature gains flying until end of turn.
pay {U}, {T}: Untap target creature.
pay {U}: Untap SN.
pay {U}{U}: Tap target creature without flying.
pay {W/B}{W/B}: SN gets +1/+0 until end of turn.
pay {W/B}{W/B}{W/B}: SN gets +3/+3 until end of turn.
pay {W}: SN gets +0/+1 until end of turn.
pay {W}, {T}: Prevent the next 1 damage that would be dealt to target creature or player this turn.
pay {W},{T}: Tap target creature.
pay {W},{T}: Tap target permanent.
pay {W/U}: SN gets +0/+1 until end of turn.
pay {W}{U}: Target creature gains flying until end of turn.
pay {W}{W}, {O}: SN gets +2/+0 until end of turn.
pay {W}{W}: SN gets +1/+0 until end of turn.
pay {W}{W}: Target creature gains indestructible until end of turn.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: Declaring activated ability in card script

Postby ember hauler » 28 Oct 2013, 09:13

Superb!

Thank you for this mini-guide!
(and new syntax, of course)
ember hauler
 
Posts: 79
Joined: 14 Aug 2013, 08:13
Has thanked: 27 times
Been thanked: 14 times


Return to Magarena

Who is online

Users browsing this forum: No registered users and 58 guests


Who is online

In total there are 58 users online :: 0 registered, 0 hidden and 58 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: No registered users and 58 guests

Login Form