this(damaged)
added
targetchooser [damaged] status
added
targetchooser [controllerdamager]
targetchooser [opponentdamager]

basically checks for whos doing damage to who in a match per turn.
This commit is contained in:
omegablast2002@yahoo.com
2011-02-02 18:22:08 +00:00
parent 2993388a6e
commit e7fc20bd4c
9 changed files with 123 additions and 12 deletions
+10
View File
@@ -171,8 +171,18 @@ int Damage::resolve()
//return the left over amount after effects have been applied to them.
a = target->dealDamage(damage);
target->damageCount += 1;
if (target->type_as_damageable == DAMAGEABLE_MTGCARDINSTANCE)
((MTGCardInstance*)target)->wasDealtDamage = true;
if (target->type_as_damageable == DAMAGEABLE_PLAYER)
{
if(target == source->controller())
{
((MTGCardInstance*)source)->damageToController = true;
}
else
{
((MTGCardInstance*)source)->damageToOpponent = true;
}
target->lifeLostThisTurn += damage;
WEvent * lifed = NEW WEventLife((Player*)target,-damage);
GameObserver * game = GameObserver::GetInstance();