actually i changed my mind, instead lets update affinity after events are processed, that should take into account cards untapping,moving, ect....

This commit is contained in:
zethfoxster
2016-07-09 00:58:19 -04:00
parent 14f65c55b5
commit b5976035e3
2 changed files with 2 additions and 2 deletions

View File

@@ -1108,7 +1108,7 @@ void GameObserver::Affinity()
// DoReduceIncrease = true;
//if (!DoReduceIncrease)
// continue;
if(!AffinityNeedsUpdate)//we only adjust cost when cards move from anywhere to anywhere.
if(!AffinityNeedsUpdate)//we only adjust cost when events queqes are complete.
continue;
//above we check if there are even any cards that effect cards manacost
//if there are none, leave this function. manacost->copy( is a very expensive funtion
@@ -1585,6 +1585,7 @@ int GameObserver::receiveEvent(WEvent * e)
SAFE_DELETE(ev);
eventsQueue.pop();
}
AffinityNeedsUpdate = true;
return result;
}

View File

@@ -328,7 +328,6 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
bool shufflelibrary = card->basicAbilities[(int)Constants::SHUFFLELIBRARYDEATH];
bool inplaytoinplay = false;
bool ripToken = false;
g->AffinityNeedsUpdate = true;//we refresh affinity whenever a card is moved from anywhere to anywhere.
if (g->players[0]->game->battlefield->hasName("Rest in Peace")||g->players[1]->game->battlefield->hasName("Rest in Peace"))
ripToken = true;
//Madness or Put in Play...