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:
@@ -1108,7 +1108,7 @@ void GameObserver::Affinity()
|
|||||||
// DoReduceIncrease = true;
|
// DoReduceIncrease = true;
|
||||||
//if (!DoReduceIncrease)
|
//if (!DoReduceIncrease)
|
||||||
// continue;
|
// 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;
|
continue;
|
||||||
//above we check if there are even any cards that effect cards manacost
|
//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
|
//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);
|
SAFE_DELETE(ev);
|
||||||
eventsQueue.pop();
|
eventsQueue.pop();
|
||||||
}
|
}
|
||||||
|
AffinityNeedsUpdate = true;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -328,7 +328,6 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone
|
|||||||
bool shufflelibrary = card->basicAbilities[(int)Constants::SHUFFLELIBRARYDEATH];
|
bool shufflelibrary = card->basicAbilities[(int)Constants::SHUFFLELIBRARYDEATH];
|
||||||
bool inplaytoinplay = false;
|
bool inplaytoinplay = false;
|
||||||
bool ripToken = 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"))
|
if (g->players[0]->game->battlefield->hasName("Rest in Peace")||g->players[1]->game->battlefield->hasName("Rest in Peace"))
|
||||||
ripToken = true;
|
ripToken = true;
|
||||||
//Madness or Put in Play...
|
//Madness or Put in Play...
|
||||||
|
|||||||
Reference in New Issue
Block a user