fix for emblems not sticking, and phasealter not testDestroying.

This commit is contained in:
omegablast2002@yahoo.com
2012-05-02 12:58:39 +00:00
parent ec7a8d219f
commit e67e2e669c
3 changed files with 5 additions and 2 deletions

View File

@@ -2378,7 +2378,7 @@ public:
int removed(MTGCardInstance * card)
{
if (abilities.find(card) != abilities.end())
if (abilities.find(card) != abilities.end() && !(forceDestroy == -1 && forcedAlive == 1))//only embelms have forcedestroy = -1 and forcedalive = 1
{
game->removeObserver(abilities[card]);
abilities.erase(card);
@@ -5095,6 +5095,8 @@ public:
{
if(forceDestroy != -1)
return 1;
if(!(source->hasType(Subtypes::TYPE_INSTANT)||source->hasType(Subtypes::TYPE_INSTANT)) && !source->isInPlay(game))
return 1;
return 0;
}

View File

@@ -1318,7 +1318,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
if (!a1)
return NULL;
return NEW GenericAbilityMod(observer, 1, card,spell?spell->getNextDamageableTarget():(Damageable *) target, a1);;
return NEW GenericAbilityMod(observer, 1, card->controller()->getObserver()->ExtraRules,card->controller()->getObserver()->ExtraRules, a1);
}
//choose a color

View File

@@ -147,6 +147,7 @@ void Rules::addExtraRules(GameObserver* g)
//Trick so that the abilities don't die;
g->ExtraRules[i].currentZone = p->game->inPlay;
g->ExtraRules[i].lastController = p;
g->ExtraRules[i].owner = p;
for (size_t j = 0; j < initState.playerData[i].extraRules.size(); ++j)
{
AbilityFactory af(g);