more fixes to the review
This commit is contained in:
@@ -52,7 +52,7 @@ int CardPrimitive::init()
|
||||
magicTexts.clear();
|
||||
spellTargetType = "";
|
||||
alias = 0;
|
||||
bool hasRestriction = false;
|
||||
hasRestriction = false;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user