Merge pull request #732 from kevlahnota/master

"previousbattlefield" for mover
This commit is contained in:
Anthony Calosa
2016-07-09 04:33:41 +08:00
committed by GitHub
5 changed files with 29 additions and 19 deletions

View File

@@ -673,7 +673,7 @@ toughness=4
[card] [card]
name=Act of Aggression name=Act of Aggression
target=creature|opponentbattlefield target=creature|opponentbattlefield
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
color=red color=red
text=({p(R)} may be paid for with either {R} or 2 life.) -- Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. (It can attack and {T} this turn.) text=({p(R)} may be paid for with either {R} or 2 life.) -- Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. (It can attack and {T} this turn.)
mana={3}{p(R)}{p(R)} mana={3}{p(R)}{p(R)}
@@ -682,7 +682,7 @@ type=Instant
[card] [card]
name=Act of Treason name=Act of Treason
target=creature target=creature
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. (It can attack and {T} this turn.) text=Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. (It can attack and {T} this turn.)
mana={2}{R} mana={2}{R}
type=Sorcery type=Sorcery
@@ -10752,7 +10752,7 @@ toughness=3
[card] [card]
name=Blind with Anger name=Blind with Anger
target=creature[-legendary] target=creature[-legendary]
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Untap target nonlegendary creature and gain control of it until end of turn. That creature gains haste until end of turn. text=Untap target nonlegendary creature and gain control of it until end of turn. That creature gains haste until end of turn.
mana={3}{R} mana={3}{R}
type=Instant type=Instant
@@ -27596,7 +27596,7 @@ type=Instant
name=Disharmony name=Disharmony
target=creature[attacking] target=creature[attacking]
auto=removefromcombat auto=removefromcombat
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap])) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap])) ueot)!
restriction=blockersonly restriction=blockersonly
text=Cast Disharmony only during combat before blockers are declared. -- Untap target attacking creature and remove it from combat. Gain control of that creature until end of turn. text=Cast Disharmony only during combat before blockers are declared. -- Untap target attacking creature and remove it from combat. Gain control of that creature until end of turn.
mana={2}{R} mana={2}{R}
@@ -38116,7 +38116,7 @@ toughness=2
name=Flash Conscription name=Flash Conscription
target=creature target=creature
auto=if spent({W}) then teach(creature) spiritlink ueot auto=if spent({W}) then teach(creature) spiritlink ueot
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. If {W} was spent to cast Flash Conscription, the creature gains "Whenever this creature deals combat damage, you gain that much life" until end of turn. text=Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. If {W} was spent to cast Flash Conscription, the creature gains "Whenever this creature deals combat damage, you gain that much life" until end of turn.
mana={5}{R} mana={5}{R}
type=Instant type=Instant
@@ -63159,7 +63159,7 @@ toughness=8
name=Lose Calm name=Lose Calm
target=creature target=creature
auto=menace auto=menace
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Gain control of target creature until end of turn. Untap that creature. It gains haste and menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) text=Gain control of target creature until end of turn. Untap that creature. It gains haste and menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.)
mana={3}{R} mana={3}{R}
type=Sorcery type=Sorcery
@@ -64869,7 +64869,7 @@ type=Enchantment
name=Malevolent Whispers name=Malevolent Whispers
target=creature target=creature
auto=2/0 ueot auto=2/0 ueot
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
abilities=madness abilities=madness
autoexile=restriction{discarded} pay({3}{r}) name(pay 3r to cast) activate name(pay 3r to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) autoexile=restriction{discarded} pay({3}{r}) name(pay 3r to cast) activate name(pay 3r to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard)
text=Gain control of target creature until end of turn. Untap that creature. It gets +2/+0 and gains haste until end of turn. -- Madness {3}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) text=Gain control of target creature until end of turn. Untap that creature. It gets +2/+0 and gains haste until end of turn. -- Madness {3}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.)
@@ -65782,7 +65782,7 @@ subtype=Aura
name=Mark of Mutiny name=Mark of Mutiny
target=creature target=creature
auto=counter(1/1,1) auto=counter(1/1,1)
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Gain control of target creature until end of turn. Put a +1/+1 counter on it and untap it. That creature gains haste until end of turn. text=Gain control of target creature until end of turn. Put a +1/+1 counter on it and untap it. That creature gains haste until end of turn.
mana={2}{R} mana={2}{R}
type=Sorcery type=Sorcery
@@ -66273,7 +66273,7 @@ type=Enchantment
[card] [card]
name=Mass Mutiny name=Mass Mutiny
target=creature|opponentbattlefield target=creature|opponentbattlefield
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=For each opponent, gain control of up to one target creature that player controls until end of turn. Untap those creatures. They gain haste until end of turn. text=For each opponent, gain control of up to one target creature that player controls until end of turn. Untap those creatures. They gain haste until end of turn.
mana={3}{R}{R} mana={3}{R}{R}
type=Sorcery type=Sorcery
@@ -67613,7 +67613,7 @@ type=Instant
[card] [card]
name=Metallic Mastery name=Metallic Mastery
target=artifact target=artifact
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Untap target artifact and gain control of it until end of turn. That artifact gains haste until end of turn. text=Untap target artifact and gain control of it until end of turn. That artifact gains haste until end of turn.
mana={2}{R} mana={2}{R}
type=Sorcery type=Sorcery
@@ -81135,7 +81135,7 @@ type=Artifact
[card] [card]
name=Portent of Betrayal name=Portent of Betrayal
target=creature target=creature
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
auto=scry:1 scrycore delayed dontshow donothing scrycoreend scryend auto=scry:1 scrycore delayed dontshow donothing scrycoreend scryend
text=Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) text=Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.)
mana={3}{R} mana={3}{R}
@@ -85349,7 +85349,7 @@ toughness=3
[card] [card]
name=Ray of Command name=Ray of Command
target=creature|opponentBattlefield target=creature|opponentBattlefield
auto=moveto(mybattlefield) and!(transforms((,newability[phaseactionmulti[endofturn sourceinplay] moveTo(ownerbattlefield) && tap],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseactionmulti[endofturn sourceinplay] moveTo(previousbattlefield) && tap],newability[untap],haste)) ueot)!
text=Untap target creature an opponent controls and gain control of it until end of turn. That creature gains haste until end of turn. When you lose control of the creature, tap it. text=Untap target creature an opponent controls and gain control of it until end of turn. That creature gains haste until end of turn. When you lose control of the creature, tap it.
mana={3}{U} mana={3}{U}
type=Instant type=Instant
@@ -110121,7 +110121,7 @@ type=Sorcery
[card] [card]
name=Temporary Insanity name=Temporary Insanity
target=creature[power <=type:*:mygraveyard] target=creature[power <=type:*:mygraveyard]
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Untap target creature with power less than the number of cards in your graveyard and gain control of it until end of turn. That creature gains haste until end of turn. text=Untap target creature with power less than the number of cards in your graveyard and gain control of it until end of turn. That creature gains haste until end of turn.
mana={3}{R} mana={3}{R}
type=Instant type=Instant
@@ -111949,7 +111949,7 @@ subtype=Aura
[card] [card]
name=Threaten name=Threaten
target=creature target=creature
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. (It can attack and {T} this turn.) text=Untap target creature and gain control of it until end of turn. That creature gains haste until end of turn. (It can attack and {T} this turn.)
mana={2}{R} mana={2}{R}
type=Sorcery type=Sorcery
@@ -114189,7 +114189,7 @@ toughness=4
[card] [card]
name=Traitorous Blood name=Traitorous Blood
target=creature target=creature
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste,trample)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste,trample)) ueot)!
text=Gain control of target creature until end of turn. Untap it. It gains trample and haste until end of turn. text=Gain control of target creature until end of turn. Untap it. It gains trample and haste until end of turn.
mana={1}{R}{R} mana={1}{R}{R}
type=Sorcery type=Sorcery
@@ -114198,7 +114198,7 @@ type=Sorcery
name=Traitorous Instinct name=Traitorous Instinct
target=creature target=creature
auto=2/0 auto=2/0
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Gain control of target creature until end of turn. Untap that creature. Until end of turn it gets +2/+0 and gains haste. text=Gain control of target creature until end of turn. Untap that creature. Until end of turn it gets +2/+0 and gains haste.
mana={3}{R} mana={3}{R}
type=Sorcery type=Sorcery
@@ -115639,7 +115639,7 @@ type=Instant
[card] [card]
name=Turn Against name=Turn Against
target=creature target=creature
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Devoid (This card has no color.) -- Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn. text=Devoid (This card has no color.) -- Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
mana={4}{R} mana={4}{R}
abilities=devoid abilities=devoid
@@ -117080,7 +117080,7 @@ type=Sorcery
name=Unwilling Recruit name=Unwilling Recruit
target=creature target=creature
auto=X/0 auto=X/0
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Gain control of target creature until end of turn. Untap that creature. It gets +X/+0 and gains haste until end of turn. text=Gain control of target creature until end of turn. Untap that creature. It gets +X/+0 and gains haste until end of turn.
mana={X}{R}{R}{R} mana={X}{R}{R}{R}
type=Sorcery type=Sorcery
@@ -125622,7 +125622,7 @@ type=Instant
[card] [card]
name=Word of Seizing name=Word of Seizing
target=*|battlefield target=*|battlefield
auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot)! auto=moveto(mybattlefield) and!(transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(previousbattlefield)],newability[untap],haste)) ueot)!
text=Split second (As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.) -- Untap target permanent and gain control of it until end of turn. It gains haste until end of turn. text=Split second (As long as this spell is on the stack, players can't cast spells or activate abilities that aren't mana abilities.) -- Untap target permanent and gain control of it until end of turn. It gains haste until end of turn.
mana={3}{R}{R} mana={3}{R}{R}
type=Instant type=Instant

View File

@@ -113,6 +113,7 @@ public:
bool isDualWielding; bool isDualWielding;
bool stillNeeded; bool stillNeeded;
Player * lastController; Player * lastController;
Player * previousController;
MTGGameZone * getCurrentZone(); MTGGameZone * getCurrentZone();
MTGGameZone * previousZone; MTGGameZone * previousZone;
MTGCardInstance * previous; MTGCardInstance * previous;

View File

@@ -3843,6 +3843,13 @@ AAMover::AAMover(GameObserver* observer, int _id, MTGCardInstance * _source, MTG
MTGGameZone * AAMover::destinationZone(Targetable * target) MTGGameZone * AAMover::destinationZone(Targetable * target)
{ {
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if(destination == "previousbattlefield")
{
if(_target->previousController)
return _target->previousController->inPlay();
else
return _target->controller()->inPlay();
}
return MTGGameZone::stringToZone(game, destination, source, _target); return MTGGameZone::stringToZone(game, destination, source, _target);
} }

View File

@@ -49,6 +49,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
if (arg_belongs_to) if (arg_belongs_to)
owner = arg_belongs_to->library->owner; owner = arg_belongs_to->library->owner;
lastController = owner; lastController = owner;
previousController = owner;
defenser = NULL; defenser = NULL;
banding = NULL; banding = NULL;
life = toughness; life = toughness;

View File

@@ -576,6 +576,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card, int createCopy
copy->storedCard = card->storedCard; copy->storedCard = card->storedCard;
copy->storedSourceCard = card->storedSourceCard; copy->storedSourceCard = card->storedSourceCard;
copy->lastController = card->controller(); copy->lastController = card->controller();
copy->previousController = card->controller();
for (int i = 0; i < ManaCost::MANA_PAID_WITH_OVERLOAD +1; i++) for (int i = 0; i < ManaCost::MANA_PAID_WITH_OVERLOAD +1; i++)
copy->alternateCostPaid[i] = card->alternateCostPaid[i]; copy->alternateCostPaid[i] = card->alternateCostPaid[i];