- moved all "loseLife/gainLife" duplicated code into 1 Player method
This commit is contained in:
wagic.the.homebrew@gmail.com
2011-01-23 06:59:00 +00:00
parent 14f2e9b0f2
commit f63aa379e7
9 changed files with 88 additions and 92 deletions

View File

@@ -1868,12 +1868,7 @@ int MTGLifelinkRule::receiveEvent(WEvent * event)
MTGCardInstance * card = d->source;
if (d->damage > 0 && card && card->basicAbilities[Constants::LIFELINK])
{
card->controller()->thatmuch = d->damage;
WEvent * lifed = NULL;
lifed = NEW WEventLife(card->controller(),d->damage);
GameObserver * game = GameObserver::GetInstance();
game->receiveEvent(lifed);
card->controller()->life += d->damage;
card->controller()->gainLife(d->damage);
return 1;
}
}