diff --git a/projects/mtg/src/GameStateDeckViewer.cpp b/projects/mtg/src/GameStateDeckViewer.cpp index b19494810..45a27326d 100644 --- a/projects/mtg/src/GameStateDeckViewer.cpp +++ b/projects/mtg/src/GameStateDeckViewer.cpp @@ -7,7 +7,6 @@ #include "../include/Translate.h" #include "../include/ManaCostHybrid.h" #include "../include/MTGCardInstance.h" -#include "../include/MTGCardInstance.h" #include @@ -1008,7 +1007,6 @@ void GameStateDeckViewer::updateStats() { stw.countLands = myDeck->getCount(Constants::MTG_COLOR_LAND); stw.totalPrice = myDeck->totalPrice(); - stw.countManaProducers = 0; stw.countManaProducers = 0; // Mana cost int currentCount, convertedCost; diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index a8eea90cf..a2a3edf39 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2096,8 +2096,10 @@ ostream& ListMaintainerAbility::toString(ostream& out) const TriggerAtPhase::TriggerAtPhase(int id, MTGCardInstance * source, Targetable * target,int _phaseId, int who):TriggeredAbility(id, source,target),phaseId(_phaseId),who(who){ GameObserver * g = GameObserver::GetInstance(); - newPhase = g->getCurrentGamePhase(); - currentPhase = newPhase; + if (g) { + newPhase = g->getCurrentGamePhase(); + currentPhase = newPhase; + } } int TriggerAtPhase::trigger(){