From 4458e61b7545e74a63b7bbfd49c400d3f8fedc6e Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Thu, 16 Dec 2010 16:09:35 +0000 Subject: [PATCH] 2 things, moved poison count wingame to the top with the life, there were cases where it wasnt respecting "cantlose" cards. and 2nd gave Ai *some* direction as to what to do with poison counters. i saw him place poison counters on himself to death in a single round...its was embarrassing. --- projects/mtg/src/GameObserver.cpp | 6 +----- projects/mtg/src/MTGAbility.cpp | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 89e7fa059..c70d5e3fa 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -416,7 +416,7 @@ void GameObserver::gameStateBasedEffects() /////////////////////////////////////////////////////////// //life checks/poison checks also checks cant win or lose.// /////////////////////////////////////////////////////////// - if (players[i]->life <= 0) + if (players[i]->life <= 0 || players[i]->poisonCount >= 10) { int cantlosers = 0; MTGGameZone * z = players[i]->game->inPlay; @@ -443,10 +443,6 @@ void GameObserver::gameStateBasedEffects() { gameOver = players[i]; } - if (players[i]->poisonCount >= 10) - { - gameOver = players[i]; - } } } ////////////////////////////////////////////////////// diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 7fd854cb3..1edee3812 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1973,6 +1973,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ return BAKA_EFFECT_GOOD; if (AALifer * abi = dynamic_cast(a)) return abi->life > 0 ? BAKA_EFFECT_GOOD : BAKA_EFFECT_BAD; + if (AAAlterPoison * abi = dynamic_cast(a)) + return abi->poison < 0 ? BAKA_EFFECT_GOOD : BAKA_EFFECT_BAD; if (dynamic_cast (a)) return BAKA_EFFECT_BAD; if (dynamic_cast (a))