Zethfox found out that a single sacrifice cost as an addition to a normal manacost can be added to the manacost-line of a card!
Here is a code example from the famous card Natural Order (VIS):
[card]
name=Natural Order
auto=moveTo(myBattlefield) target(creature[green]|myLibrary)
text=As an additional cost to cast Natural Order, sacrifice a green creature. -- Search your library for a green creature card and put it onto the battlefield. Then shuffle your library.
mana={2}{G}{G}{s;notatarget(creature[green]|mybattlefield)}
type=Sorcery
[/card]
I tested this excessively and I have to say: This kind of code leads to absolute 100%ers.
- Added 2 tests for this to save it from being broken by future code changes.
- Removed the land cycle from Visions (Coral Atoll, everglades, etc.).
26 lines
570 B
Plaintext
26 lines
570 B
Plaintext
#Testing Shard Volley (--> Sacrifice effects as part of the casting cost).
|
|
#As an additional cost to cast Shard Volley, sacrifice a land. -- Shard Volley deals 3 damage to target creature or player.
|
|
[INIT]
|
|
FIRSTMAIN
|
|
[PLAYER1]
|
|
hand:shard volley,scathe zombies
|
|
inplay:mountain,island,island,swamp
|
|
manapool:{R}
|
|
[PLAYER2]
|
|
inplay:hill giant
|
|
[DO]
|
|
shard volley
|
|
choice 0
|
|
swamp
|
|
choice 0
|
|
hill giant
|
|
[ASSERT]
|
|
FIRSTMAIN
|
|
[PLAYER1]
|
|
hand:scathe zombies
|
|
inplay:mountain,island,island
|
|
graveyard:swamp,shard volley
|
|
manapool{0}
|
|
[PLAYER2]
|
|
graveyard:hill giant
|
|
[END] |