Merge pull request #645 from kevlahnota/master

revert guiplay, castcard(putinplay) correction and modified AAcopier
This commit is contained in:
Anthony Calosa
2015-10-17 09:26:58 +08:00
4 changed files with 23 additions and 17 deletions
+1 -1
View File
@@ -1440,7 +1440,7 @@ public:
} }
}; };
//targetted trigger //counter trigger
class TrCounter: public Trigger class TrCounter: public Trigger
{ {
public: public:
+14 -8
View File
@@ -389,20 +389,26 @@ int AACopier::resolve()
{ {
MTGCardInstance * _target = (MTGCardInstance *) target; MTGCardInstance * _target = (MTGCardInstance *) target;
if (_target) if (_target)
{
if(_target->isACopier)
{ {
MTGCard* clone = MTGCollection()->getCardById(_target->copiedID); MTGCard* clone = MTGCollection()->getCardById(_target->copiedID);
MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game); MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game);
source->copy(myClone); source->copy(myClone);
source->isACopier = true; source->isACopier = true;
source->copiedID = _target->copiedID; source->copiedID = _target->copiedID;
} source->modifiedbAbi = _target->modifiedbAbi;
else source->origbasicAbilities = _target->origbasicAbilities;
if(_target->isMorphed)
{ {
source->copy(_target); source->power = 2;
source->isACopier = true; source->life = 2;
source->copiedID = _target->getId(); source->toughness = 2;
source->setColor(0,1);
source->name = "Morph";
source->types.clear();
string cre = "Creature";
source->setType(cre.c_str());
source->basicAbilities.reset();
source->getManaCost()->resetCosts();
} }
return 1; return 1;
} }
@@ -5642,7 +5648,7 @@ void AACastCard::Update(float dt)
toCheck->bypassTC = true; toCheck->bypassTC = true;
TargetChooserFactory tcf(game); TargetChooserFactory tcf(game);
TargetChooser * atc = tcf.createTargetChooser(toCheck->spellTargetType,toCheck); TargetChooser * atc = tcf.createTargetChooser(toCheck->spellTargetType,toCheck);
if (toCheck->hasType(Subtypes::TYPE_AURA) && !atc->validTargetsExist()) if ((toCheck->hasType(Subtypes::TYPE_AURA) && !atc->validTargetsExist())||toCheck->isToken)
{ {
processed = true; processed = true;
this->forceDestroy = 1; this->forceDestroy = 1;
+1 -1
View File
@@ -292,7 +292,7 @@ void CardGui::Render()
} }
JQuadPtr mor; JQuadPtr mor;
if(card->isMorphed && !alternate) if((card->isMorphed||(card->name == "Morph" && card->isACopier)) && !alternate)
{ {
mor = card->getObserver()->getResourceManager()->RetrieveTempQuad("morph.jpg"); mor = card->getObserver()->getResourceManager()->RetrieveTempQuad("morph.jpg");
if (mor && mor->mTex) { if (mor && mor->mTex) {
+2 -2
View File
@@ -195,7 +195,7 @@ void GuiPlay::Replace()
for (iterator it = cards.begin(); it != end_spells; ++it) for (iterator it = cards.begin(); it != end_spells; ++it)
if (!(*it)->card->target) if (!(*it)->card->target)
{ {
if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && !(*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER)) if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && (*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER))
{ {
if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller()) if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller())
++selfSpellsN; ++selfSpellsN;
@@ -231,7 +231,7 @@ void GuiPlay::Replace()
for (iterator it = cards.begin(); it != end_spells; ++it) for (iterator it = cards.begin(); it != end_spells; ++it)
if (!(*it)->card->target) if (!(*it)->card->target)
{ {
if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && !(*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER)) if((!(*it)->card->hasSubtype(Subtypes::TYPE_AURA)|| ((*it)->card->hasSubtype(Subtypes::TYPE_AURA) && (*it)->card->playerTarget)) && !(*it)->card->hasType(Subtypes::TYPE_PLANESWALKER))
{ {
if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller()) if (mpDuelLayers->getRenderedPlayer() == (*it)->card->controller())
selfSpells.Enstack(*it); selfSpells.Enstack(*it);