Fix OrTriggeredAbility interaction with AtStepTriggeredAbility, remove unneeded RazorPendulum withTargetPointerSet

This commit is contained in:
Steven Knipe 2025-08-25 22:02:52 -07:00
parent 2ec9b8efa9
commit 924585cb86
2 changed files with 4 additions and 2 deletions

View file

@ -90,12 +90,14 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl {
public boolean checkTrigger(GameEvent event, Game game) {
boolean toRet = false;
for (TriggeredAbility ability : triggeredAbilities) {
for (Effect e : getEffects()) { //Add effects to the sub-abilities so that they can set target pointers
for (Effect e : getEffects()) { // Add effects to the sub-abilities so that they can set target pointers
ability.addEffect(e);
}
ability.getTargets().addAll(this.getTargets()); // AtStepTriggeredAbility automatically sets target pointer if it can't find any targets
if (ability.checkEventType(event, game) && ability.checkTrigger(event, game) && ability.checkTriggerCondition(game)) {
toRet = true;
}
ability.getTargets().clear();
ability.getEffects().clear(); //Remove afterwards, ensures that they remain synced even with copying
}
return toRet;