made a mistake in p cost.

This commit is contained in:
omegablast2002@yahoo.com
2011-04-17 20:20:17 +00:00
parent 4c90d9e0c2
commit 50c5c70479

View File

@@ -114,11 +114,15 @@ LifeorManaCost::LifeorManaCost(TargetChooser *_tc,string manaType) :
int LifeorManaCost::canPay()
{
MTGCardInstance * _target = (MTGCardInstance *) target;
if(_target->controller()->life <= 0)
string buildType ="{";
buildType.append(manaType);
buildType.append("}");
ManaCost * newCost = ManaCost::parseManaCost(buildType);
if(_target->controller()->getManaPool()->canAfford(newCost) || _target->controller()->life > 1)
{
return 0;
return 1;
}
return 1;
return 0;
}
int LifeorManaCost::doPay()