more fixes to the review
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,13 +43,10 @@ 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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user