Added a new rule to flip back modal dual face card on each phase and after each action, fixed "Aladdin's Lamp" and "Turntimber Symbiosis" primitives, allowed the AI to play back side of modal dual face cards, improved the "doubleside" keyword to flip modal dual face cards, improved filters to target flipped cards using the "isflipped" keyword, fixed a crash when zone pointer was null in GameObserver::logAction method.

This commit is contained in:
Vittorio Alfieri
2021-04-28 17:03:29 +02:00
parent ac273b1947
commit 79716a4533
9 changed files with 93 additions and 13 deletions

View File

@@ -2125,8 +2125,9 @@ void GameObserver::logAction(Player* player, const string& s) {
void GameObserver::logAction(MTGCardInstance* card, MTGGameZone* zone, size_t index, int result) {
stringstream stream;
if(zone == NULL) zone = card->currentZone;
string zoneName = (zone != NULL)?zone->getName():"UnknownZone"; // Fixed a crash when zone pointer was null.
stream << "p" << ((card->controller()==players[0])?"1.":"2.")
<< zone->getName()<< "[" << index << "] "
<< zoneName << "[" << index << "] "
<< result << card->getLCName();
logAction(stream.str());
}