- Some additional NPE protection in applyPotentialAttackCloneTriggers.

git-svn-id: http://svn.slightlymagic.net/forge/trunk@35769 269b9781-a132-4a9b-9d4e-f004f1b56b58
This commit is contained in:
Agetian 2017-09-25 13:28:19 +00:00
parent e043743c46
commit 524fe288de

View File

@ -2543,6 +2543,9 @@ public class ComputerUtilCombat {
// Test for some special triggers that can change the creature in combat
for (Trigger t : attacker.getTriggers()) {
if (t.getMode() == TriggerType.Attacks && t.hasParam("Execute")) {
if (!attacker.hasSVar(t.getParam("Execute"))) {
continue;
}
SpellAbility exec = AbilityFactory.getAbility(attacker, t.getParam("Execute"));
if (exec != null) {
if (exec.getApi() == ApiType.Clone && "Self".equals(exec.getParam("CloneTarget"))