Merge branch 'master' into 'master'

More ELD cards

See merge request core-developers/forge!2148
This commit is contained in:
swordshine
2019-09-21 01:33:27 +00:00
22 changed files with 162 additions and 4 deletions

View File

@@ -27,6 +27,7 @@ public enum GlobalRuleChange {
manapoolsDontEmpty ("Mana pools don't empty as steps and phases end."),
noCycling ("Players can't cycle cards."),
noCreatureETBTriggers ("Creatures entering the battlefield don't cause abilities to trigger."),
noCreatureDyingTriggers ("Creatures dying don't cause abilities to trigger."),
noLegendRule ("The legend rule doesn't apply."),
noPrevention ("Damage can't be prevented."),
/* onlyOneAttackerATurn ("No more than one creature can attack each turn."), */

View File

@@ -540,6 +540,20 @@ public class TriggerHandler {
}
}
} // Torpor Orb check
if (game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noCreatureDyingTriggers)
&& !regtrig.isStatic() && mode.equals(TriggerType.ChangesZone)) {
if (runParams.get(AbilityKey.Destination) instanceof String && runParams.get(AbilityKey.Origin) instanceof String) {
final String dest = (String) runParams.get(AbilityKey.Destination);
final String origin = (String) runParams.get(AbilityKey.Origin);
if (dest.equals("Graveyard") && origin.equals("Battlefield") && runParams.get(AbilityKey.Card) instanceof Card) {
final Card card = (Card) runParams.get(AbilityKey.Card);
if (card.isCreature()) {
return false;
}
}
}
}
return true;
}