diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index ea8750b18..94d176f18 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -596,6 +596,10 @@ private: if(card->playerTarget) intValue = card->playerTarget->curses.size(); } + else if (s == "oplifetotal") + { + intValue = target->controller()->opponent()->life; + } else if (s == "lifetotal") { intValue = target->controller()->life; diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index de9b36f6f..91f5404fc 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -635,15 +635,15 @@ Player * MTGCardInstance::controller() int MTGCardInstance::canAttack() { - if (basicAbilities[(int)Constants::CANTATTACK]) + if (has(Constants::CANTATTACK)) return 0; - if (basicAbilities[(int)Constants::FLYERSONLY] && !basicAbilities[(int)Constants::FLYING]) + if (has(Constants::FLYERSONLY) && !has(Constants::FLYING)) return 0; if (tapped) return 0; if (hasSummoningSickness()) return 0; - if (basicAbilities[(int)Constants::DEFENSER] && !basicAbilities[(int)Constants::CANATTACK]) + if (has(Constants::DEFENSER) && !has(Constants::CANATTACK)) return 0; if (!isCreature()) return 0; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 134456d79..6793a2ac1 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -760,7 +760,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * ManaCost * cost = card->getManaCost(); cost->Dump(); #endif - if (alternateManaCost->extraCosts) + if (alternateManaCost->extraCosts && !playerMana->canAfford(card->getManaCost())) { //offerings handle thier own casting and cost payments. //we add this condiational here because offering can also have a completely different