mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Fixed Exalted and possibly other triggers with overwriting ability crashing the trigger checking code in getPossibleNonCombatDamage.
This commit is contained in:
@@ -1383,7 +1383,9 @@ public class ComputerUtil {
|
||||
if (c.isCreature() && c.isInZone(ZoneType.Battlefield) && CombatUtil.canAttack(c)) {
|
||||
for (final Trigger t : c.getTriggers()) {
|
||||
if ("Attacks".equals(t.getParam("Mode")) && t.hasParam("Execute")) {
|
||||
SpellAbility trigSa = AbilityFactory.getAbility(c.getSVar(t.getParam("Execute")), c);
|
||||
String exec = c.getSVar(t.getParam("Execute"));
|
||||
if (!exec.isEmpty()) {
|
||||
SpellAbility trigSa = AbilityFactory.getAbility(exec, c);
|
||||
if (trigSa != null && trigSa.getApi() == ApiType.LoseLife
|
||||
&& trigSa.getParamOrDefault("Defined", "").contains("Opponent")) {
|
||||
trigSa.setHostCard(c);
|
||||
@@ -1392,6 +1394,7 @@ public class ComputerUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user