From e8bbbb45de0881a0b4fdab29b6b58783d1032a38 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sun, 6 Mar 2011 16:23:23 +0000 Subject: [PATCH] fixed a reported issue, find it a bit strange tho, as everything else can be adressed in this method without being so specific ie: using hasColor(blah) as in the way "fear" was added in here without addressing "this"....just to be on the safe side im going to specify "this->" becuase doing it without it was returning as tho it could not block even tho the creature did not have "weak" i suspect this could be true with the intemidate and fear... --- projects/mtg/src/MTGCardInstance.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index bfe6e7abc..6b52df87f 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -583,18 +583,18 @@ int MTGCardInstance::canBlock(MTGCardInstance * opponent) return 0; if(opponent->basicAbilities[Constants::STRONG] && power < opponent->power) return 0; - if(has(basicAbilities[Constants::WEAK]) && power < opponent->power) + if(this->basicAbilities[Constants::WEAK] && power < opponent->power) return 0; - if (opponent->basicAbilities[Constants::FEAR] && !(hasType(Subtypes::TYPE_ARTIFACT) || hasColor(Constants::MTG_COLOR_BLACK))) + if (opponent->basicAbilities[Constants::FEAR] && !(this->hasType(Subtypes::TYPE_ARTIFACT) || this->hasColor(Constants::MTG_COLOR_BLACK))) return 0; //intimidate - if (opponent->basicAbilities[Constants::INTIMIDATE] && !(hasType(Subtypes::TYPE_ARTIFACT))) + if (opponent->basicAbilities[Constants::INTIMIDATE] && !(this->hasType(Subtypes::TYPE_ARTIFACT))) { int canblock = 0; for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i) { - if (hasColor(i) && opponent->hasColor(i)) + if (this->hasColor(i) && opponent->hasColor(i)) { canblock = 1; break;