reimplement "don't cause abilities to trigger" effects (#11242)

This commit is contained in:
xenohedron 2023-10-01 22:50:14 -04:00 committed by GitHub
parent 2ec532b157
commit bfbdf6b103
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 171 additions and 289 deletions

View file

@ -21,11 +21,9 @@ public interface TriggeredAbility extends Ability {
boolean checkEventType(GameEvent event, Game game);
/**
* This method checks if the event has to trigger the ability. It's
* important to do nothing unique within this method, that can't be done
* multiple times. Because some abilities call this to check if an ability
* is relevant (e.g. Torpor Orb), so the method is called multiple times for
* the same event.
* This method checks if the event has to trigger the ability,
* and if it does trigger, may set targets and other values in associated effects
* before returning true.
*/
boolean checkTrigger(GameEvent event, Game game);