fixed a reported bug where the foelost restrictions for triggers were not activating correctly, also updated the code by making it more flexiable...you can now do foelost(number) instead.

This commit is contained in:
omegablast2002@yahoo.com
2011-03-22 03:20:17 +00:00
parent 55d58b6425
commit 0fb914c0c3
2 changed files with 7 additions and 11 deletions

View File

@@ -556,7 +556,7 @@ int ActionStack::addDamage(MTGCardInstance * _source, Damageable * _target, int
addAction(damage);
_source->thatmuch = _damage;
_target->thatmuch = _damage;
_target->lifeLostThisTurn += _damage;
//_target->lifeLostThisTurn += _damage;
return 1;
}

View File

@@ -335,17 +335,11 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string magicText, int
{
sourceTap = true;
}
found = s.find("foelostthree");
found = s.find("foelost(");
if (found != string::npos)
{
lifelost = true;
lifeamount = 3;
}
found = s.find("foelosttwo");
if (found != string::npos)
{
lifelost = true;
lifeamount = 2;
lifeamount = atoi(s.substr(found + 8,')').c_str());
}
found = s.find("opponentpoisoned");
if ( found != string::npos)
@@ -4388,9 +4382,11 @@ TriggerAtPhase::TriggerAtPhase(int id, MTGCardInstance * source, Targetable * ta
int TriggerAtPhase::trigger()
{
if(source->isPhased) return 0;
if(lifelost && source->controller()->opponent()->lifeLostThisTurn < lifeamount)
if(lifelost)
{
return 0;
int lifeloss = source->controller()->opponent()->lifeLostThisTurn;
if(lifeloss < lifeamount)
return 0;
}
if (sourceUntapped && source->isTapped() == 1)
return 0;