Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duration.UntilYourNextTurn is not checked for in DelayedTriggeredAbility #11634

Closed
jimga150 opened this issue Jan 12, 2024 · 2 comments · Fixed by #12233
Closed

Duration.UntilYourNextTurn is not checked for in DelayedTriggeredAbility #11634

jimga150 opened this issue Jan 12, 2024 · 2 comments · Fixed by #12233
Labels
refactoring Developers topics about code and programming

Comments

@jimga150
Copy link
Contributor

This issue seems to have been referenced in #2078, but the issue was closed with a workaround instead of addressing the root cause.

DelayedTriggeredAbility only has support for EndOfTurn and EndOfCombat. Other durations arent checked for, it seems. I dug in to see what would need to be added to add support for UntilYourNextTurn, and it looks like it would involve adding a new method in DelayedTriggeredAbility as well as some checks in CleanupStep, but the logic for persisting until the controlling player's next turn is a little above my understanding of this codebase.

@JayDi85
Copy link
Member

JayDi85 commented Jan 12, 2024

Need cards example and reproduceable steps for that bug.

@xenohedron
Copy link
Contributor

xenohedron commented Jan 13, 2024

It's not a bug, but a refactor to support using standard duration parameter instead of workaround. Code already has TODO:

public void removeEndOfTurnAbilities(Game game) {
this.removeIf(ability -> ability.getDuration() == Duration.EndOfTurn); // TODO: add Duration.EndOfYourTurn like effects
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Developers topics about code and programming
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants