Implement BalanceCheckMiddleware and PositionCheckMiddleware #107

Open
opened 2026-03-15 04:13:16 +00:00 by freemo · 0 comments
Owner

Metadata

  • Commit Message: feat(dispatch): add balance and position check middleware
  • Branch: feature/m1-middleware-pipeline

Background and Context

BalanceCheckMiddleware (priority 50) ensures the player has combat balance for actions
that require it. PositionCheckMiddleware (priority 30) ensures the player is in the
required posture (standing, sitting, etc.).

Expected Behavior

  • BalanceCheck reads action.class.requires_balance? and checks player.balance
  • PositionCheck reads action.class.requires_position and checks player.position
  • Both halt with descriptive messages on failure

Acceptance Criteria

  • BalanceCheckMiddleware at priority 50
  • PositionCheckMiddleware at priority 30
  • Proper halting and player feedback
  • BDD scenarios

Subtasks

  • Implement BalanceCheckMiddleware
  • Implement PositionCheckMiddleware
  • Write Cucumber scenarios

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the
    Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata.
  • The commit is submitted as a pull request to master, reviewed, and merged.
## Metadata - **Commit Message**: `feat(dispatch): add balance and position check middleware` - **Branch**: `feature/m1-middleware-pipeline` ## Background and Context BalanceCheckMiddleware (priority 50) ensures the player has combat balance for actions that require it. PositionCheckMiddleware (priority 30) ensures the player is in the required posture (standing, sitting, etc.). ## Expected Behavior - BalanceCheck reads `action.class.requires_balance?` and checks `player.balance` - PositionCheck reads `action.class.requires_position` and checks `player.position` - Both halt with descriptive messages on failure ## Acceptance Criteria - BalanceCheckMiddleware at priority 50 - PositionCheckMiddleware at priority 30 - Proper halting and player feedback - BDD scenarios ## Subtasks - [ ] Implement BalanceCheckMiddleware - [ ] Implement PositionCheckMiddleware - [ ] Write Cucumber scenarios ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged**.
freemo added this to the (deleted) milestone 2026-03-15 04:13:16 +00:00
freemo self-assigned this 2026-03-15 04:25:24 +00:00
freemo modified the milestone from (deleted) to v1.0.0 2026-03-16 00:28:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#107
No description provided.