Merge pull request #793 from kevlahnota/master

Fix CDA vs Flip/Transforms
This commit is contained in:
Anthony Calosa
2016-07-27 07:07:47 +08:00
committed by GitHub
2 changed files with 63 additions and 41 deletions

View File

@@ -4616,8 +4616,8 @@ toughness=2
name=Archangel Avacyn name=Archangel Avacyn
abilities=flash,flying,vigilance abilities=flash,flying,vigilance
auto=all(creature|mybattlefield) indestructible ueot auto=all(creature|mybattlefield) indestructible ueot
auto=@movedto(*[-angel]|graveyard) from(mybattlefield): flip(Avacyn, the Purifier) auto=@movedto(creature[-angel]|graveyard) from(mybattlefield) once:phaseaction[upkeep once,sourceinplay] flip(Avacyn, the Purifier)
text=flash, flying, vigilance -- when Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn -- when a non-angel you control dies, transform Archangel Avacyn text=Flash -- Flying, vigilance -- When Archangel Avacyn enters the battlefield, creatures you control gain indestructible until end of turn. -- When a non-Angel creature you control dies, transform Archangel Avacyn at the beginning of the next upkeep.
mana={3}{W}{W} mana={3}{W}{W}
type=Legendary Creature type=Legendary Creature
subtype=Angel subtype=Angel
@@ -5180,6 +5180,7 @@ auto={C(0/0,-6,Loyalty)}:name(emblem) emblem transforms((,newability[lord(creatu
text=+1: creatures you control get +1/+1 and trample until end of turn -- -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player, flip -- -6: you get an emblem with 'creatures you control have haste and '{T}: this creature deals damage equal to its power to target creature or player' text=+1: creatures you control get +1/+1 and trample until end of turn -- -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player, flip -- -6: you get an emblem with 'creatures you control have haste and '{T}: this creature deals damage equal to its power to target creature or player'
type=Planeswalker type=Planeswalker
subtype=Arlinn subtype=Arlinn
color=red,green
[/card] [/card]
[card] [card]
name=Arm with AEther name=Arm with AEther
@@ -6634,6 +6635,7 @@ auto=damage:3 opponent
text=flying -- when this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent text=flying -- when this creature transforms into Avacyn, the Purifier, it deals 3 damage to each other creature and each opponent
type=Legendary Creature type=Legendary Creature
subtype=Angel subtype=Angel
color=red
power=6 power=6
toughness=5 toughness=5
[/card] [/card]
@@ -7242,6 +7244,7 @@ auto=moveto(ownerhand) all(creature[-horror])
text=When this creature transforms into Awoken Horror, return all non-Horror creatures to their owners' hands. text=When this creature transforms into Awoken Horror, return all non-Horror creatures to their owners' hands.
type=Creature type=Creature
subtype=Kraken Horror subtype=Kraken Horror
color=blue
power=7 power=7
toughness=8 toughness=8
[/card] [/card]
@@ -13407,6 +13410,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Convicted Kille
text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler. text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=red
power=4 power=4
toughness=4 toughness=4
[/card] [/card]
@@ -19512,6 +19516,7 @@ name=Clue
auto={2}{s}: draw:1 auto={2}{s}: draw:1
text={2}, sacrifice this token, draw a card text={2}, sacrifice this token, draw a card
type=Artifact type=Artifact
subtype=Clue
[/card] [/card]
[card] [card]
name=Clutch of Currents name=Clutch of Currents
@@ -25402,7 +25407,7 @@ type=Artifact
[card] [card]
name=Declaration in Stone name=Declaration in Stone
target=creature target=creature
auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[@movedto(exile) all([share!name!])token(Clue) controller])) auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[moveto(exile)],newability[token(Clue) controller]))
text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way. text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way.
mana={1}{W} mana={1}{W}
type=Sorcery type=Sorcery
@@ -26216,6 +26221,7 @@ auto=destroy target(creature)
text=When this creature transforms into Demon-Possessed Witch, you may destroy target creature. text=When this creature transforms into Demon-Possessed Witch, you may destroy target creature.
type=Creature type=Creature
subtype=Human Shaman subtype=Human Shaman
color=black
power=4 power=4
toughness=3 toughness=3
[/card] [/card]
@@ -37969,6 +37975,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Kessig Forgemas
text=Whenever Flameheart Werewolf blocks or becomes blocked by a creature, Flameheart Werewolf deals 2 damage to that creature. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Flameheart Werewolf. text=Whenever Flameheart Werewolf blocks or becomes blocked by a creature, Flameheart Werewolf deals 2 damage to that creature. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Flameheart Werewolf.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=red
power=3 power=3
toughness=2 toughness=2
[/card] [/card]
@@ -41364,6 +41371,7 @@ abilities=menace
text=Menace (This creature can't be blocked except by two or more creatures.) -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Gatstaf Ravagers. text=Menace (This creature can't be blocked except by two or more creatures.) -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Gatstaf Ravagers.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=red
power=6 power=6
toughness=5 toughness=5
[/card] [/card]
@@ -53948,6 +53956,7 @@ auto=@combat(notblocked) source(this):may flip(Elusive Tormentor)
text=Hexproof, indestructible -- Insidious Mist can't block and can't be blocked. -- Whenever Insidious Mist attacks and isn't blocked, you may pay {2}{B}. If you do, transform it. text=Hexproof, indestructible -- Insidious Mist can't block and can't be blocked. -- Whenever Insidious Mist attacks and isn't blocked, you may pay {2}{B}. If you do, transform it.
type=Creature type=Creature
subtype=Elemental subtype=Elemental
color=blue
power=0 power=0
toughness=1 toughness=1
[/card] [/card]
@@ -59545,6 +59554,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Duskwatch Recru
text=Creature spells you cast cost {1} less to cast. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler. text=Creature spells you cast cost {1} less to cast. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=green
power=3 power=3
toughness=3 toughness=3
[/card] [/card]
@@ -60411,6 +60421,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Lambholt Pacifi
text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lambholt Butcher. text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lambholt Butcher.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=green
power=4 power=4
toughness=4 toughness=4
[/card] [/card]
@@ -60427,7 +60438,7 @@ toughness=2
[card] [card]
name=Lambholt Pacifist name=Lambholt Pacifist
abilities=cantattack abilities=cantattack
auto=aslongas(creature[power>3]|mybattlefield)-cantattack auto=aslongas(creature[power>=4]|mybattlefield) transforms((,newability[-cantattack]))
auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Lambholt Butcher) auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Lambholt Butcher)
text=Lambholt Pacifist can't attack unless you control a creature with power 4 or greater. -- At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist. text=Lambholt Pacifist can't attack unless you control a creature with power 4 or greater. -- At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist.
mana={1}{G} mana={1}{G}
@@ -62978,6 +62989,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Hermit of the N
text=Whenever an opponent casts a spell during your turn, draw two cards. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lone Wolf of the Natterknolls. text=Whenever an opponent casts a spell during your turn, draw two cards. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Lone Wolf of the Natterknolls.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=green
power=3 power=3
toughness=5 toughness=5
[/card] [/card]
@@ -63829,6 +63841,7 @@ auto=may (blink)forsrc target(creature)
text=When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield. text=When this creature transforms into Lunarch Inquisitors, you may exile another target creature until Lunarch Inquisitors leaves the battlefield.
type=Creature type=Creature
subtype=Human Cleric subtype=Human Cleric
color=white
power=4 power=4
toughness=4 toughness=4
[/card] [/card]
@@ -70419,6 +70432,7 @@ text=Menace (This creature can't be blocked except by two or more creatures.) --
abilities=menace abilities=menace
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=red
power=2 power=2
toughness=2 toughness=2
[/card] [/card]
@@ -72665,6 +72679,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Breakneck Rider
text=Attacking creatures you control get +1/+0 and have trample. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Neck Breaker. text=Attacking creatures you control get +1/+0 and have trample. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Neck Breaker.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=red
power=4 power=4
toughness=3 toughness=3
[/card] [/card]
@@ -76030,6 +76045,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Solitary Hunter
text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform One of the Pack. text=At the beginning of each upkeep, if a player cast two or more spells last turn, transform One of the Pack.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=green
power=5 power=5
toughness=6 toughness=6
[/card] [/card]
@@ -82276,8 +82292,8 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Prized Amalgam name=Prized Amalgam
autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard):phaseactionmulti[endofturn once] moveto(mybattlefield) && tap autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap
autograveyard=@movedto(other creature|mystack) from(mygraveyard):phaseactionmulti[endofturn once] moveto(mybattlefield) && tap autograveyard=@movedto(other creature|mystack) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap
text=Whenever a creature enters the battlefield, if it entered from your graveyard or you cast it from your graveyard, return Prized Amalgam from your graveyard to the battlefield tapped at the beginning of the next end step. text=Whenever a creature enters the battlefield, if it entered from your graveyard or you cast it from your graveyard, return Prized Amalgam from your graveyard to the battlefield tapped at the beginning of the next end step.
mana={1}{U}{B} mana={1}{U}{B}
type=Creature type=Creature
@@ -112858,6 +112874,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Hinterland Logg
text=Trample -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Timber Shredder. text=Trample -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Timber Shredder.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=green
power=4 power=4
toughness=2 toughness=2
[/card] [/card]
@@ -113153,7 +113170,7 @@ toughness=3
[card] [card]
name=Tireless Tracker name=Tireless Tracker
auto=@movedto(land|mybattlefield):token(Clue) controller auto=@movedto(land|mybattlefield):token(Clue) controller
auto=@sacrificed(clue|mybattlefield):(counter(1/1,1) auto=@sacrificed(clue|mybattlefield):counter(1/1,1)
text=Whenever a land enters the battlefield under your control, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. text=Whenever a land enters the battlefield under your control, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker.
mana={2}{G} mana={2}{G}
type=Creature type=Creature
@@ -117382,7 +117399,7 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Urabrask the Hidden name=Urabrask the Hidden
auto=lord(creature|mybattlefield) haste auto=emblem transforms((,newability[aslongas(Urabrask the Hidden|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot
auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)]))
text=Creatures you control have Haste. -- Creatures your opponents control enter the battlefield tapped. text=Creatures you control have Haste. -- Creatures your opponents control enter the battlefield tapped.
mana={3}{R}{R} mana={3}{R}{R}
@@ -119753,6 +119770,7 @@ auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Geier Reach Ban
text=Whenever a Werewolf enters the battlefield under your control, you may transform it. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Vildin-Pack Alpha. text=Whenever a Werewolf enters the battlefield under your control, you may transform it. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Vildin-Pack Alpha.
type=Creature type=Creature
subtype=Werewolf subtype=Werewolf
color=red
power=4 power=4
toughness=3 toughness=3
[/card] [/card]
@@ -123588,11 +123606,12 @@ type=Land
[/card] [/card]
[card] [card]
name=Westvale Cult Leader name=Westvale Cult Leader
auto=foreach(creature|mybattlefield) 1/1 anyzone=type:creature:mybattlefield/type:creature:mybattlefield cdaactive
auto=@each my endofturn:token(Human Cleric,Creature Human Cleric,1/1,white,black) auto=@each my endofturn:token(Human Cleric,Creature Human Cleric,1/1,white,black)
text=Westvale Cult Leader's power and toughness are each equal to the number of creatures you control. -- At the beginning of your end step, put a 1/1 white and black Human Cleric creature token onto the battlefield. text=Westvale Cult Leader's power and toughness are each equal to the number of creatures you control. -- At the beginning of your end step, put a 1/1 white and black Human Cleric creature token onto the battlefield.
type=Creature type=Creature
subtype=Human Cleric subtype=Human Cleric
color=white
power=* power=*
toughness=* toughness=*
[/card] [/card]

View File

@@ -1126,27 +1126,27 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card,
} }
} }
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++) for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
{ {
MTGCardInstance * cardFirst = *it; MTGCardInstance * cardFirst = *it;
if (cardFirst->isLand()) if (cardFirst->isLand())
continue; continue;
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i) for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
{ {
if (cardFirst->hasColor(i)) if (cardFirst->hasColor(i))
{ {
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++) for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
{ {
MTGCardInstance * cardSecond = *secondit; MTGCardInstance * cardSecond = *secondit;
if (cardSecond->isLand()) if (cardSecond->isLand())
continue; continue;
if (cardSecond->hasColor(i) && cardFirst != cardSecond) if (cardSecond->hasColor(i) && cardFirst != cardSecond)
{ {
repeating = true; repeating = true;
} }
} }
} }
} }
} }
do do
@@ -1183,18 +1183,18 @@ AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card,
} }
} }
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++) for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
{ {
MTGCardInstance * cardFirst = *it; MTGCardInstance * cardFirst = *it;
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++) for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
{ {
MTGCardInstance * cardSecond = *secondit; MTGCardInstance * cardSecond = *secondit;
if (cardSecond->name == cardFirst->name && cardFirst != cardSecond) if (cardSecond->name == cardFirst->name && cardFirst != cardSecond)
{ {
repeating = true; repeating = true;
} }
} }
} }
do do
@@ -3224,11 +3224,14 @@ int AAFlip::resolve()
{ {
toughMod =_target->toughness - _target->origtoughness; toughMod =_target->toughness - _target->origtoughness;
} }
if(!_target->isCDA)
{
_target->power = powerlessThanOriginal?myFlip->power - powerMod:myFlip->power + powerMod; _target->power = powerlessThanOriginal?myFlip->power - powerMod:myFlip->power + powerMod;
_target->life = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod; _target->life = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod;
_target->toughness = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod; _target->toughness = toughLessThanOriginal?myFlip->toughness - toughMod:myFlip->toughness + toughMod;
_target->origpower = myFlip->origpower; _target->origpower = myFlip->origpower;
_target->origtoughness = myFlip->origtoughness; _target->origtoughness = myFlip->origtoughness;
}
SAFE_DELETE(myFlip); SAFE_DELETE(myFlip);
_target->mPropertiesChangedSinceLastUpdate = true; _target->mPropertiesChangedSinceLastUpdate = true;
} }