more fixes to the review

This commit is contained in:
omegablast2002@yahoo.com
2011-01-22 17:14:41 +00:00
parent 07802134e8
commit 62873dc971
5 changed files with 6 additions and 11 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ int CardPrimitive::init()
magicTexts.clear(); magicTexts.clear();
spellTargetType = ""; spellTargetType = "";
alias = 0; alias = 0;
bool hasRestriction = false; hasRestriction = false;
return 1; return 1;
} }
-3
View File
@@ -44,11 +44,8 @@ GuiHand::GuiHand(MTGHand* hand) :
GuiHand::~GuiHand() GuiHand::~GuiHand()
{ {
if(cards.size())
{
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it) for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
delete (*it); delete (*it);
}
} }
void GuiHand::Update(float dt) void GuiHand::Update(float dt)
+2 -1
View File
@@ -2807,7 +2807,8 @@ int AbilityFactory::computeXX(Spell * spell, MTGCardInstance * card)
{ {
if (spell) if (spell)
return spell->computeXX(card); return spell->computeXX(card);
if(card) return card->XX; if(card)
return card->XX;
return 0; return 0;
} }
+1 -1
View File
@@ -46,7 +46,7 @@ if(!allowedToCast(card,player))
return 1; return 1;
} }
} }
else if ((card->hasType("instant")) || card->basicAbilities[Constants::FLASH] else if ((card->hasType("instant")) || card->has(Constants::FLASH)
|| (player == currentPlayer && !game->isInterrupting || (player == currentPlayer && !game->isInterrupting
&& (game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN && (game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN
|| game->currentGamePhase == Constants::MTG_PHASE_SECONDMAIN)) || game->currentGamePhase == Constants::MTG_PHASE_SECONDMAIN))
+1 -4
View File
@@ -161,11 +161,8 @@ int WEventDamage::getValue()
Targetable * WEventLife::getTarget(int target) Targetable * WEventLife::getTarget(int target)
{ {
switch (target) if (target)
{ {
case TARGET_TO:
return player;
case TARGET_FROM:
return player; return player;
} }
return NULL; return NULL;