- Magic 2010: Combat Damages don't go on the stack anymore
- Comp rules: "goes to graveyard" effects don't go on the stack anymore
- Regenerate "fixed" (untested)
- Basic "ReplacementEffect" mechanism for damage prevention. Can be extended to other replacement effects with some limits.
- TODO: Damages don't go on the stack, the abilities that create them do.
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-06-23 14:22:00 +00:00
parent 5dc98359c1
commit ca3c2d30ab
17 changed files with 266 additions and 64 deletions

View File

@@ -45,12 +45,17 @@ int Damage::resolve(){
_target->doDamageTest = 1;
}
int a = target->dealDamage(damage);
GameObserver * g = GameObserver::GetInstance();
WEvent * e = NEW WEventDamage(this);
e = g->replacementEffects->replace(e);
//Send Damage event to listeners
WEventDamage * e = NEW WEventDamage(this);
GameObserver::GetInstance()->receiveEvent(e);
delete e;
int a = 0;
if (damage) a = target->dealDamage(damage);
//Send (Damage/Replaced effect) event to listeners
g->receiveEvent(e);
SAFE_DELETE(e);
return a;
}