update lords

lastcontroller override
This commit is contained in:
Anthony Calosa
2017-03-01 20:51:06 +08:00
parent a66fced2f7
commit fa5b075af5
3 changed files with 147 additions and 186 deletions
+5
View File
@@ -661,6 +661,7 @@ void GameObserver::gameStateBasedEffects()
for (int w = 0; w < zone->nb_cards; w++)
{
MTGCardInstance * card = zone->cards[w];
Player * zPlayer = zone->owner;
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
{
if (card->has(Constants::DEVOID))
@@ -684,6 +685,10 @@ void GameObserver::gameStateBasedEffects()
int onum = w+1;
card->zpos = abs(onum - zone->nb_cards)+1;
}
else if(card && (isInPlay(card)))
{//lastcontroller override
card->lastController = zPlayer;
}
}
+3
View File
@@ -1142,6 +1142,9 @@ MTGGameZone * MTGGameZone::intToZone(GameObserver *g, int zoneId, MTGCardInstanc
else
p2 = target->controller();
//p2 should be either of this two...
if(p != p2 && p->opponent() != p2)
return NULL;
MTGGameZone * result = intToZone(zoneId, p, p2);
if (result) return result;