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

View File

@@ -52,7 +52,7 @@ int CardPrimitive::init()
magicTexts.clear();
spellTargetType = "";
alias = 0;
bool hasRestriction = false;
hasRestriction = false;
return 1;
}

View File

@@ -44,11 +44,8 @@ GuiHand::GuiHand(MTGHand* hand) :
GuiHand::~GuiHand()
{
if(cards.size())
{
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
delete (*it);
}
}
void GuiHand::Update(float dt)

View File

@@ -2798,7 +2798,7 @@ int AbilityFactory::computeX(Spell * spell, MTGCardInstance * card)
{
if (spell)
return spell->computeX(card);
if(card) return card->X;
if(card) return card->X;
return 0;
}
@@ -2807,7 +2807,8 @@ int AbilityFactory::computeXX(Spell * spell, MTGCardInstance * card)
{
if (spell)
return spell->computeXX(card);
if(card) return card->XX;
if(card)
return card->XX;
return 0;
}

View File

@@ -46,7 +46,7 @@ if(!allowedToCast(card,player))
return 1;
}
}
else if ((card->hasType("instant")) || card->basicAbilities[Constants::FLASH]
else if ((card->hasType("instant")) || card->has(Constants::FLASH)
|| (player == currentPlayer && !game->isInterrupting
&& (game->currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN
|| game->currentGamePhase == Constants::MTG_PHASE_SECONDMAIN))

View File

@@ -161,11 +161,8 @@ int WEventDamage::getValue()
Targetable * WEventLife::getTarget(int target)
{
switch (target)
if (target)
{
case TARGET_TO:
return player;
case TARGET_FROM:
return player;
}
return NULL;