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

@ -27,7 +27,7 @@ public final class RazorPendulum extends CardImpl {
TargetController.EACH_PLAYER,
new DamageTargetEffect(2, true, "that player"),
false, condition
).withTargetPointerSet(true));
));
}
private RazorPendulum(final RazorPendulum card) {

View file

@ -93,9 +93,11 @@ public class OrTriggeredAbility extends TriggeredAbilityImpl {
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;