Merge pull request #617 from kevlahnota/master

additional test for sac event
This commit is contained in:
Xawotihs
2015-08-31 10:45:05 +02:00
8 changed files with 1466 additions and 36 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -3777,7 +3777,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Arc Mage name=Arc Mage
auto={2}{R}{T}:token(-1111113) && damage:1 target(creature,player) auto={2}{R}{T}{discard(*|myhand)}:damage:1 target(creature,player) && activate damage:1 target(creature,player)
text={2}{R}, {T}, Discard a card: Arc Mage deals 2 damage divided as you choose among one or two target creatures and/or players. text={2}{R}, {T}, Discard a card: Arc Mage deals 2 damage divided as you choose among one or two target creatures and/or players.
mana={2}{R} mana={2}{R}
type=Creature type=Creature
@@ -3786,14 +3786,6 @@ power=2
toughness=2 toughness=2
[/card] [/card]
[card] [card]
name=Arc Mage's 2nd Damage
auto=counter(0/0,1,Arc Mage)
auto=@damaged(creature,player):thisforeach(counter{0/0.1.Arc Mage}>0) damage:1 target(creature,player) && counter(0/0,-1,Arc Mage) && counter(0/0,1,Bury)
auto=thisforeach(counter{0/0.1.Bury}>0) bury
id=-1111113
type=Nothing
[/card]
[card]
name=Arc Runner name=Arc Runner
abilities=haste,treason abilities=haste,treason
text=Haste -- At the beginning of the end step, sacrifice Arc Runner. text=Haste -- At the beginning of the end step, sacrifice Arc Runner.
@@ -25043,7 +25035,7 @@ type=Sorcery
[card] [card]
name=Dragon Appeasement name=Dragon Appeasement
auto=phasealter(remove,draw,controller) auto=phasealter(remove,draw,controller)
auto=@sacrificed(creature|mybattlefield):may draw:1 controller auto=@sacrificed(creature|mybattlefield):name(draw) ability$!may draw:1!$ controller
text=Skip your draw step. -- Whenever you sacrifice a creature, you may draw a card. text=Skip your draw step. -- Whenever you sacrifice a creature, you may draw a card.
mana={3}{B}{R}{G} mana={3}{B}{R}{G}
type=Enchantment type=Enchantment
@@ -32660,20 +32652,13 @@ toughness=1
name=Fire at Will name=Fire at Will
target=creature[attacking;blocking] target=creature[attacking;blocking]
auto=damage:1 auto=damage:1
auto=may damage:1 target(creature[attacking;blocking]) auto=damage:1 target(creature[attacking;blocking])
auto=token(-1111121) auto=ability$!name(damage) choice target(creature[attacking;blocking]) damage:1!$ controller
text=Fire at Will deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures. text=Fire at Will deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures.
mana={RW}{RW}{RW} mana={RW}{RW}{RW}
type=Instant type=Instant
[/card] [/card]
[card] [card]
name=Fire at Will's 3rd Damage
auto=@movedto(exile) from(this):may damage:1 target(creature,player)
auto=moveto(exile)
id=-1111121
type=Nothing
[/card]
[card]
name=Firebolt name=Firebolt
target=creature,player target=creature,player
auto=damage:2 auto=damage:2
@@ -51042,7 +51027,7 @@ toughness=1
[card] [card]
name=Kiora, the Crashing Wave name=Kiora, the Crashing Wave
auto=counter(0/0,2,loyalty) auto=counter(0/0,2,loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: Prevention) token(37852101) controller auto={C(0/0,1,Loyalty)}:name(+1: Prevention) target(*|opponentbattlefield) transforms((,newability[preventalldamage from(this)],newability[preventalldamage to(this)])) uynt
auto={C(0/0,-1,Loyalty)}:name(-1: Draw 1 and Lands +1) draw:1 controller && maxPlay(land)+1 ueot auto={C(0/0,-1,Loyalty)}:name(-1: Draw 1 and Lands +1) draw:1 controller && maxPlay(land)+1 ueot
auto={C(0/0,-5,Loyalty)}:emblem name(-5: Emblem) transforms((,newability[@each my endofturn:token(-378521) controller])) forever dontremove auto={C(0/0,-5,Loyalty)}:emblem name(-5: Emblem) transforms((,newability[@each my endofturn:token(-378521) controller])) forever dontremove
text=+1: Until your next turn, prevent all damage that would be dealt to and dealt by target permanent an opponent controls. -- -1: Draw a card. You may play an additional land this turn. -- -5: You get an emblem with "At the beginning of your end step, put a 9/9 blue Kraken creature token onto the battlefield." -- Starting Loyalty (2) text=+1: Until your next turn, prevent all damage that would be dealt to and dealt by target permanent an opponent controls. -- -1: Draw a card. You may play an additional land this turn. -- -5: You get an emblem with "At the beginning of your end step, put a 9/9 blue Kraken creature token onto the battlefield." -- Starting Loyalty (2)
@@ -51051,15 +51036,6 @@ type=Planeswalker
subtype=Kiora subtype=Kiora
[/card] [/card]
[card] [card]
name=Kiora's Prevention
abilities=indestructible,shroud
type=nothing
text=Until your next turn, prevent all damage that would be dealt to and dealt by target permanent an opponent controls.
auto=name(Prevention) target(*|opponentbattlefield) transforms((,newability[preventalldamage from(this)],newability[preventalldamage to(this)])) uynt
auto=@each myuntap:moveto(exile) all(this)
color=green,blue
[/card]
[card]
name=Kiora's Kraken name=Kiora's Kraken
type=Creature type=Creature
subtype=Kraken subtype=Kraken
@@ -62213,7 +62189,7 @@ subtype=Equipment
[/card] [/card]
[card] [card]
name=Mortician Beetle name=Mortician Beetle
auto=@sacrificed(creature):may counter(1/1,1) auto=@sacrificed(creature):name(counter +1/+1) ability$!may counter(1/1,1) all(mystored)!$ controller
text=Whenever a player sacrifices a creature, you may put a +1/+1 counter on Mortician Beetle. text=Whenever a player sacrifices a creature, you may put a +1/+1 counter on Mortician Beetle.
mana={B} mana={B}
type=Creature type=Creature
@@ -68049,7 +68025,7 @@ toughness=4
name=Palace Siege name=Palace Siege
auto=choice name(Khans) transforms((,newability[counter(0/0.1.Khans)],newability[@each my upkeep:moveto(myhand) target(creature|mygraveyard)])) forever auto=choice name(Khans) transforms((,newability[counter(0/0.1.Khans)],newability[@each my upkeep:moveto(myhand) target(creature|mygraveyard)])) forever
auto=choice name(Dragons) transforms((,newability[counter(0/0.1.Dragons)],newability[@each my upkeep:life:-2 opponent && life:2 controller])) forever auto=choice name(Dragons) transforms((,newability[counter(0/0.1.Dragons)],newability[@each my upkeep:life:-2 opponent && life:2 controller])) forever
As Palace Siege enters the battlefield, choose Khans or Dragons. -- ? Khans ? At the beginning of your upkeep, return target creature card from your graveyard to your hand. -- ? Dragons ? At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life. text=As Palace Siege enters the battlefield, choose Khans or Dragons. -- ? Khans ? At the beginning of your upkeep, return target creature card from your graveyard to your hand. -- ? Dragons ? At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life.
mana={3}{B}{B} mana={3}{B}{B}
type=Enchantment type=Enchantment
[/card] [/card]
@@ -68568,8 +68544,7 @@ subtype=Arcane
name=Path of Bravery name=Path of Bravery
auto=this(controllerlife > 19) lord(creature|mybattlefield) 1/1 auto=this(controllerlife > 19) lord(creature|mybattlefield) 1/1
auto=@each my blockers:life:type:creature[attacking]|mybattlefield controller auto=@each my blockers:life:type:creature[attacking]|mybattlefield controller
text=Enchantment. -- As long as your life total is greater than or equal to your starting life total, creatures you control get +1/+1. -- text=Enchantment. -- As long as your life total is greater than or equal to your starting life total, creatures you control get +1/+1. -- Whenever one or more creatures you control attack, you gain life equal to the number of attacking creatures.
Whenever one or more creatures you control attack, you gain life equal to the number of attacking creatures.
mana={2}{W} mana={2}{W}
type=Enchantment type=Enchantment
[/card] [/card]
@@ -78393,7 +78368,7 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Root Spider name=Root Spider
auto=@combat(blocking) source(this):choice 1/0 && first strike ueot auto=@combat(blocking) source(this):all(this) 1/0 ueot && all(this) first strike ueot
text=Whenever Root Spider blocks, it gets +1/+0 and gains first strike until end of turn. text=Whenever Root Spider blocks, it gets +1/+0 and gains first strike until end of turn.
mana={3}{G} mana={3}{G}
type=Creature type=Creature
@@ -80763,7 +80738,7 @@ type=Sorcery
[card] [card]
name=Savra, Queen of the Golgari name=Savra, Queen of the Golgari
auto=@sacrificed(creature[black]|mybattlefield):may life:-2 && ability$!sacrifice notatarget(creature|mybattlefield)!$ opponent auto=@sacrificed(creature[black]|mybattlefield):may life:-2 && ability$!sacrifice notatarget(creature|mybattlefield)!$ opponent
auto=@sacrificed(creature[green]|mybattlefield):may life:2 controller auto=@sacrificed(creature[green]|mybattlefield):name(gain life) ability$!may life:2!$ controller
text=Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature. -- Whenever you sacrifice a green creature, you may gain 2 life. text=Whenever you sacrifice a black creature, you may pay 2 life. If you do, each other player sacrifices a creature. -- Whenever you sacrifice a green creature, you may gain 2 life.
mana={2}{B}{G} mana={2}{B}{G}
type=Legendary Creature type=Legendary Creature
@@ -98073,7 +98048,7 @@ toughness=3
name=Thraximundar name=Thraximundar
abilities=haste abilities=haste
auto=@combat(attacking) source(this):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ opponent auto=@combat(attacking) source(this):ability$!name(sacrifice) notatarget(creature|mybattlefield) sacrifice!$ opponent
auto=@sacrificed(creature):counter(1/1,1) auto=@sacrificed(creature):name(counter +1/+1) ability$!may counter(1/1,1) all(mystored)!$ controller
text=Haste -- Whenever Thraximundar attacks, defending player sacrifices a creature. -- Whenever a player sacrifices a creature, you may put a +1/+1 counter on Thraximundar. text=Haste -- Whenever Thraximundar attacks, defending player sacrifices a creature. -- Whenever a player sacrifices a creature, you may put a +1/+1 counter on Thraximundar.
mana={4}{U}{B}{R} mana={4}{U}{B}{R}
type=Legendary Creature type=Legendary Creature

View File

@@ -0,0 +1,29 @@
# BUG..cast tundra wolves with soul warden in play, kill soul warden with last gasp, you still get a life because the spell resolved
# first before Soul Warden goes to graveyard.
[INIT]
FIRSTMAIN
[PLAYER1]
hand:Tundra Wolves
manapool:{W}
inplay:Soul Warden
life:20
[PLAYER2]
manapool:{B}{B}
hand:Last Gasp
[DO]
Tundra Wolves
no
yes
Last Gasp
Soul Warden
endinterruption
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:Soul Warden
inplay:Tundra Wolves
life:20
[PLAYER2]
graveyard:Last Gasp
life:20
[END]

View File

@@ -16,6 +16,9 @@ choice 0
choice 0 choice 0
choice 0 choice 0
180595 180595
choice 0
180595
choice 1
eot eot
[ASSERT] [ASSERT]
untap untap

View File

@@ -530,6 +530,7 @@ protomatter_powder.txt
prowess_of_the_fair.txt prowess_of_the_fair.txt
prowess_of_the_fair2.txt prowess_of_the_fair2.txt
prowess_of_the_fair3.txt prowess_of_the_fair3.txt
PTInstant.txt
pygmy_troll.txt pygmy_troll.txt
pyknite_i426.txt pyknite_i426.txt
pyroclasm.txt pyroclasm.txt
@@ -655,6 +656,7 @@ thallid.txt
the_tabernacle_at_pendrell_vale.txt the_tabernacle_at_pendrell_vale.txt
thelon_of_havenwood.txt thelon_of_havenwood.txt
threaten.txt threaten.txt
thraximundar.txt
throne_of_bone.txt throne_of_bone.txt
thunder-thrash_elder.txt thunder-thrash_elder.txt
tidal_warrior_i646.txt tidal_warrior_i646.txt

View File

@@ -0,0 +1,20 @@
#Bug: thraximundar ability must resolve first... and survives
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:thraximundar,bloodfire colossus
manapool:{R}
[PLAYER2]
[DO]
bloodfire colossus
choice 0
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:bloodfire colossus
inplay:thraximundar
manapool:{0}
life:14
[PLAYER2]
life:14
[END]

View File

@@ -4363,6 +4363,7 @@ int PTInstant::resolve()
APowerToughnessModifier * a = ability->clone(); APowerToughnessModifier * a = ability->clone();
GenericInstantAbility * wrapper = NEW GenericInstantAbility(game, 1, source, (Damageable *) (this->target), a); GenericInstantAbility * wrapper = NEW GenericInstantAbility(game, 1, source, (Damageable *) (this->target), a);
wrapper->addToGame(); wrapper->addToGame();
((Damageable *) (this->target))->afterDamage();//additional check the negative pt after resolving..
return 1; return 1;
} }
const string PTInstant::getMenuText() const string PTInstant::getMenuText()

View File

@@ -4952,6 +4952,15 @@ int TriggeredAbility::receiveEvent(WEvent * e)
resolve(); resolve();
return 1; return 1;
} }
if(dynamic_cast<WEventCardSacrifice*>(e))
{
//sacrificed event
//thraximundar vs bloodfore collosus, thraximundar
//must be able to survive a sacrificed bloodfire collosus,
//same with mortician beetle vs phyrexian denouncer test
resolve();
return 1;
}
WEventZoneChange * stackCheck = dynamic_cast<WEventZoneChange*>(e); WEventZoneChange * stackCheck = dynamic_cast<WEventZoneChange*>(e);
if(stackCheck && (stackCheck->to == game->currentPlayer->game->stack||stackCheck->to == game->currentPlayer->opponent()->game->stack)) if(stackCheck && (stackCheck->to == game->currentPlayer->game->stack||stackCheck->to == game->currentPlayer->opponent()->game->stack))
{ {