From 966d8b453de6a123c4717f9eb3b8e096632e63d7 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Tue, 22 Mar 2011 10:46:32 +0000 Subject: [PATCH] reworked landhome ability, to fix a reported bug where it simply becomes tapped on opponents turn for no reason. --- projects/mtg/include/AllAbilities.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 9dd4e744c..e52b38fef 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3665,12 +3665,15 @@ public: void Update(float dt) { - if (source->isAttacker()) + if (newPhase != currentPhase && (newPhase == Constants::MTG_PHASE_COMBATBEGIN || newPhase == Constants::MTG_PHASE_COMBATATTACKERS)) { - if (!game->opponent()->game->inPlay->hasType(land)) + if (source->controller()->opponent()->game->inPlay->hasType(land)) { - source->toggleAttacker(); - //TODO Improve, there can be race conditions here + source->basicAbilities[Constants::CANTATTACK] = 0; + } + else + { + source->basicAbilities[Constants::CANTATTACK] = 1; } } Player * player = source->controller();