mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Simple one-line implementation of getTriggeringAbility
This commit is contained in:
@@ -527,11 +527,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SpellAbility getTriggeringAbility() {
|
public SpellAbility getTriggeringAbility() {
|
||||||
SpellAbility trigSa = this;
|
return this.isTrigger() ? this : this.getRootAbility();
|
||||||
if (!trigSa.isTrigger()) {
|
|
||||||
trigSa = trigSa.getRootAbility();
|
|
||||||
}
|
|
||||||
return trigSa;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> getTriggeringObjects() {
|
public Map<String, Object> getTriggeringObjects() {
|
||||||
|
|||||||
Reference in New Issue
Block a user