- "DamageDone" replacement effects can now have the parameter "PreventionEffect$ True" to mark them as damage prevention effects.

- Fixed Vigor.
This commit is contained in:
Sloth
2012-02-06 17:40:57 +00:00
parent f2b67e0e30
commit cfb9434cee
3 changed files with 16 additions and 1 deletions

View File

@@ -7994,6 +7994,18 @@ public class Card extends GameEntity implements Comparable<Card> {
return 0;
}
final HashMap<String, Object> repParams = new HashMap<String, Object>();
repParams.put("Event", "DamageDone");
repParams.put("Affected", this);
repParams.put("DamageSource", source);
repParams.put("DamageAmount", damage);
repParams.put("IsCombat", isCombat);
repParams.put("Prevention", false);
if (AllZone.getReplacementHandler().run(repParams)) {
return 0;
}
restDamage = this.staticDamagePrevention(restDamage, source, isCombat);
if (restDamage == 0) {

View File

@@ -48,6 +48,9 @@ public class ReplaceDamage extends ReplacementEffect {
if (!runParams.get("Event").equals("DamageDone")) {
return false;
}
if (!(runParams.containsKey("Prevention") == getMapParams().containsKey("PreventionEffect"))) {
return false;
}
if (getMapParams().containsKey("ValidSource")) {
if (!matchesValid(runParams.get("DamageSource"), getMapParams().get("ValidSource").split(","), getHostCard())) {
return false;