fix for emblems not sticking, and phasealter not testDestroying.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user