refactor: shared logic for diff implementation of isInUseableZone, improved docs and readability;

This commit is contained in:
Oleg Agafonov 2024-11-30 03:26:03 +04:00
parent 57ef74da90
commit d49ff89a81
76 changed files with 285 additions and 273 deletions

View file

@ -209,7 +209,7 @@ public class TriggeredAbilities extends LinkedHashMap<String, TriggeredAbility>
if (ability.isInUseableZone(game, object, event)) {
if (event == null || !game.getContinuousEffects().preventedByRuleModification(event, ability, game, false)) {
if (object != null) {
boolean controllerSet = false;
boolean controllerSet = false; // TODO: wtf?!?!? Need rework whole "set" logic here
Set<UUID> eventTargets = CardUtil.getEventTargets(event);
if (ability.getZone() != Zone.COMMAND
&& event != null