- Fixed getTriggeringAbility not finding triggering abilities in the middle of a subability chain, which can happen when e.g. a delayed trigger is generated in the middle of a chain (fixes Goblin Kites).

This commit is contained in:
Agetian
2017-10-06 12:44:55 +00:00
parent b3c372a803
commit a40c362764

View File

@@ -541,7 +541,11 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
}
public SpellAbility getTriggeringAbility() {
return this.isTrigger() ? this : this.getRootAbility();
SpellAbility sa = this;
while (sa.getParent() != null && !sa.isTrigger()) {
sa = sa.getParent();
}
return sa;
}
public Map<String, Object> getTriggeringObjects() {