mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- 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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user