mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- "DamageDone" replacement effects can now have the parameter "PreventionEffect$ True" to mark them as damage prevention effects.
- Fixed Vigor.
This commit is contained in:
@@ -4,7 +4,7 @@ Types:Creature Elemental Incarnation
|
||||
Text:no text
|
||||
PT:6/6
|
||||
K:Trample
|
||||
R:Event$ DamageDone | ValidTarget$ Creature.YouCtrl+Other | ReplaceWith$ Counters | Description$ If damage would be dealt to a creature you control other than Vigor, prevent that damage. Put a +1/+1 counter on that creature for each 1 damage prevented this way.
|
||||
R:Event$ DamageDone | ValidTarget$ Creature.YouCtrl+Other | ReplaceWith$ Counters | PreventionEffect$ True | Description$ If damage would be dealt to a creature you control other than Vigor, prevent that damage. Put a +1/+1 counter on that creature for each 1 damage prevented this way.
|
||||
SVar:Counters:AB$PutCounter | Cost$ 0 | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ X
|
||||
SVar:X:ReplaceCount$DamageAmount
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user