feat(combat): Implement stun mechanic, skip turns and block actions for stunned units#37
Open
lightclient wants to merge 1 commit intoBKDaugherty:mainfrom
Open
feat(combat): Implement stun mechanic, skip turns and block actions for stunned units#37lightclient wants to merge 1 commit intoBKDaugherty:mainfrom
lightclient wants to merge 1 commit intoBKDaugherty:mainfrom
Conversation
- add phase-start stun handling for Player/Enemy units (set Move/AP to 0, mark waited) - wire stun processing into the battle phase effect chain alongside poison - block stunned move/attack in execute_unit_actions via ActiveEffects guards - emit UnitActionCompletedMessage when blocked to prevent turn-flow deadlocks - add tests for phase-scoped stun application and stunned action blocking
BKDaugherty
reviewed
Feb 7, 2026
Comment on lines
+737
to
+747
| if active_effects | ||
| .map(|active_effects| active_effects.prevent_move()) | ||
| .unwrap_or_default() | ||
| { | ||
| command_completed_writer.write(UnitActionCompletedMessage { | ||
| unit: message.entity, | ||
| action: UnitAction::Move, | ||
| }); | ||
| continue; | ||
| } | ||
|
|
Owner
There was a problem hiding this comment.
We probably would want to find a way to prevent the UnitExecuteAction itself as opposed to processing the action, but skipping the completion I think, but pretty impressive that the model came up with this imo
Owner
I mean definitely consider me proven wrong lol. I'm not sure this is how I want it implemented but this is pretty cool. Crazy that you had them playing the game |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds full stun behavior so that stunned units lose their turn entirely.
Disclaimer: this could be slop, it was 100% generated by AI.