Revert "copy/flip limit"

This reverts commit 0c124327de.
This commit is contained in:
Anthony Calosa
2016-08-11 11:03:37 +08:00
parent 0c124327de
commit a10e7ab279
7 changed files with 14 additions and 25 deletions
+2 -1
View File
@@ -119077,7 +119077,8 @@ toughness=4
[/card] [/card]
[card] [card]
name=Vesuva name=Vesuva
auto=may copy notatarget(land) and!( tap(noevent) )! auto=tap(noevent)
auto=may copy notatarget(land)
text=You may have Vesuva enter the battlefield tapped as a copy of any land on the battlefield. text=You may have Vesuva enter the battlefield tapped as a copy of any land on the battlefield.
type=Land type=Land
[/card] [/card]
+2 -4
View File
@@ -1949,8 +1949,7 @@ class AACopier: public ActivatedAbility
{ {
public: public:
MTGAbility * andAbility; MTGAbility * andAbility;
bool activated; AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL);
AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL, bool activated = false);
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AACopier * clone() const; AACopier * clone() const;
@@ -4596,8 +4595,7 @@ public:
string flipStats; string flipStats;
bool isflipcard; bool isflipcard;
bool forcedcopy; bool forcedcopy;
bool activated; AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard = false, bool forcedcopy = false);
AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard = false, bool forcedcopy = false, bool activated = false);
int resolve(); int resolve();
int testDestroy(); int testDestroy();
const string getMenuText(); const string getMenuText();
-1
View File
@@ -89,7 +89,6 @@ public:
bool turningOver; bool turningOver;
bool isMorphed; bool isMorphed;
bool isFlipped; bool isFlipped;
bool activateCF;
string MeldedFrom; string MeldedFrom;
bool isPhased; bool isPhased;
bool isCascaded; bool isCascaded;
+5 -12
View File
@@ -1449,12 +1449,11 @@ AALibraryBottom * AALibraryBottom::clone() const
} }
//AACopier //AACopier
AACopier::AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost, bool _activated) : AACopier::AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target, ManaCost * _cost) :
ActivatedAbility(observer, _id, _source, _cost, 0) ActivatedAbility(observer, _id, _source, _cost, 0)
{ {
target = _target; target = _target;
andAbility = NULL; andAbility = NULL;
activated = _activated;
} }
int AACopier::resolve() int AACopier::resolve()
@@ -1463,7 +1462,6 @@ int AACopier::resolve()
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if (_target) if (_target)
{ {
_target->activateCF = activated;
MTGCard* clone ; MTGCard* clone ;
if(_target->isToken || (_target->isACopier && _target->hasCopiedToken)) if(_target->isToken || (_target->isACopier && _target->hasCopiedToken))
{//fix crash when copying token {//fix crash when copying token
@@ -1484,7 +1482,7 @@ int AACopier::resolve()
* instead of using source->copy(myClone) use * * instead of using source->copy(myClone) use *
* AAFlip with forcedcopy to true * * AAFlip with forcedcopy to true *
*********************************************/ *********************************************/
AAFlip * af = NEW AAFlip(game, game->mLayers->actionLayer()->getMaxId(), source, source, clone->data->name, false, true, activated); AAFlip * af = NEW AAFlip(game, game->mLayers->actionLayer()->getMaxId(), source, source, clone->data->name, false, true);
af->oneShot = 1; af->oneShot = 1;
af->canBeInterrupted = false; af->canBeInterrupted = false;
af->resolve(); af->resolve();
@@ -1534,7 +1532,6 @@ int AACopier::resolve()
andAbilityClone->addToGame(); andAbilityClone->addToGame();
} }
} }
_target->activateCF = false;
return 1; return 1;
} }
return 0; return 0;
@@ -1656,7 +1653,7 @@ AACounter::AACounter(GameObserver* observer, int id, MTGCardInstance * source, M
if (target) if (target)
{ {
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if(_target->isFlipped && (_target->activateCF || _target->hasType(Subtypes::TYPE_PLANESWALKER)))//is flipping && activated flip or activated copy or Planeswalker if(_target->isFlipped && _target->hasType(Subtypes::TYPE_PLANESWALKER))//is flipping pw
{ {
this->forceDestroy = 1; this->forceDestroy = 1;
return 0; return 0;
@@ -3207,11 +3204,10 @@ AAMeld * AAMeld::clone() const
} }
// flip a card // flip a card
AAFlip::AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard, bool forcedcopy, bool _activated) : AAFlip::AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard, bool forcedcopy) :
InstantAbility(observer, id, card, _target),flipStats(flipStats),isflipcard(isflipcard),forcedcopy(forcedcopy) InstantAbility(observer, id, card, _target),flipStats(flipStats),isflipcard(isflipcard),forcedcopy(forcedcopy)
{ {
target = _target; target = _target;
activated = _activated;
} }
int AAFlip::resolve() int AAFlip::resolve()
@@ -3243,7 +3239,6 @@ int AAFlip::resolve()
AbilityFactory af(game); AbilityFactory af(game);
_target->isFlipped = true; _target->isFlipped = true;
_target->activateCF = activated;
GameObserver * game = _target->getObserver(); GameObserver * game = _target->getObserver();
if(flipStats.size()) if(flipStats.size())
{ {
@@ -3291,8 +3286,7 @@ int AAFlip::resolve()
{ {
if (a->oneShot) if (a->oneShot)
{ {
if(!activated) a->resolve();
a->resolve();
SAFE_DELETE(a); SAFE_DELETE(a);
} }
else else
@@ -3374,7 +3368,6 @@ int AAFlip::testDestroy()
//originally added as a safegaurd to insure the ability was removed //originally added as a safegaurd to insure the ability was removed
//it's been so long and so much has changed that it appears to do nothing but cause a crash now //it's been so long and so much has changed that it appears to do nothing but cause a crash now
_target->isFlipped = false; _target->isFlipped = false;
_target->activateCF = false;
return 1; return 1;
} }
} }
+3 -3
View File
@@ -12,10 +12,10 @@ GuiAvatars::GuiAvatars(DuelLayers* duelLayers) :
{ {
Add(self = NEW GuiAvatar(SCREEN_WIDTH, SCREEN_HEIGHT, false, mpDuelLayers->getRenderedPlayer(), GuiAvatar::BOTTOM_RIGHT, this)); Add(self = NEW GuiAvatar(SCREEN_WIDTH, SCREEN_HEIGHT, false, mpDuelLayers->getRenderedPlayer(), GuiAvatar::BOTTOM_RIGHT, this));
self->zoom = 0.9f; self->zoom = 0.9f;
Add(selfGraveyard = NEW GuiGraveyard(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 7, false, mpDuelLayers->getRenderedPlayer(), this)); Add(selfGraveyard = NEW GuiGraveyard(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 1, false, mpDuelLayers->getRenderedPlayer(), this));
Add(selfLibrary = NEW GuiLibrary(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 10 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayer(), this)); Add(selfLibrary = NEW GuiLibrary(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayer(), this));
//myexile //myexile
Add(selfExile = NEW GuiExile(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 34, false, mpDuelLayers->getRenderedPlayer(), this)); Add(selfExile = NEW GuiExile(SCREEN_WIDTH - GuiAvatar::Width - GuiGameZone::Width / 2 - 11, SCREEN_HEIGHT - GuiAvatar::Height - 30, false, mpDuelLayers->getRenderedPlayer(), this));
Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this)); Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this));
opponent->zoom = 0.9f; opponent->zoom = 0.9f;
+2 -3
View File
@@ -2547,7 +2547,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
MTGAbility * a = NEW AACopier(observer, id, card, target); MTGAbility * a = NEW AACopier(observer, id, card, target);
a->oneShot = 1; a->oneShot = 1;
a->canBeInterrupted = false; a->canBeInterrupted = false;
((AACopier*)a)->activated = activated;
//andability //andability
if(storedAndAbility.size()) if(storedAndAbility.size())
{ {
@@ -3394,12 +3393,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
} }
if(card->getdoubleFaced() == "kamiflip") if(card->getdoubleFaced() == "kamiflip")
{//old flip cards kamigawa {//old flip cards kamigawa
MTGAbility * a = NEW AAFlip(observer, id, card, target,flipStats,true,false,activated); MTGAbility * a = NEW AAFlip(observer, id, card, target,flipStats,true);
return a; return a;
} }
else//regular transform else//regular transform
{ {
MTGAbility * a = NEW AAFlip(observer, id, card, target,flipStats,false,false,activated); MTGAbility * a = NEW AAFlip(observer, id, card, target,flipStats);
return a; return a;
} }
} }
-1
View File
@@ -195,7 +195,6 @@ void MTGCardInstance::initMTGCI()
isMorphed = false; isMorphed = false;
MeldedFrom = ""; MeldedFrom = "";
isFlipped = false; isFlipped = false;
activateCF = false;
isPhased = false; isPhased = false;
isCascaded = false; isCascaded = false;
phasedTurn = -1; phasedTurn = -1;