fix usable zone logic for abilities that function from other zones (#12446)

* remove superfluous constructor params

* fix Syrix, Carrier of the Flame

* standardize Zone = Battlefield

* rename class

* remove redundant class

* add docs

* adjustment
This commit is contained in:
xenohedron 2024-06-09 22:15:04 -04:00 committed by GitHub
parent 0d4acf26e5
commit a5488228b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 111 additions and 172 deletions

View file

@ -430,6 +430,12 @@ public abstract class TriggeredAbilityImpl extends AbilityImpl implements Trigge
return this;
}
/**
* For triggered abilities that function from the battlefield that must trigger when the source permanent dies
* and/or for any other events that happen simultaneously to the source permanent dying.
* (Similar logic must be used for any leaves-the-battlefield, but this method assumes to graveyard only.)
* NOTE: If your ability functions from another zone (not battlefield) then must use standard logic, not this.
*/
public static boolean isInUseableZoneDiesTrigger(TriggeredAbility source, GameEvent event, Game game) {
// Get the source permanent of the ability
MageObject sourceObject = null;