Skip to content

FIX unable to defend - #1

Merged
fbec76 merged 1 commit into
mainfrom
fix-defense
Aug 21, 2025
Merged

FIX unable to defend#1
fbec76 merged 1 commit into
mainfrom
fix-defense

Conversation

@fbec76

@fbec76 fbec76 commented Aug 21, 2025

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings August 21, 2025 20:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the enemy attack defense system to fix an issue where players were unable to defend against enemy attacks. The key change is separating validation logic from the actual defense handling, allowing for proper pre-validation of player capabilities before requiring card selection.

  • Splits handle_enemy_attack into separate validation and defense handling functions
  • Improves user experience by preventing empty input during mandatory discard phases
  • Fixes enemy card display to show only attack value instead of health|attack format

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/game/engine.py Refactors defense logic into validation and handling phases to fix defense capability issues
src/cli/input_handler.py Adds mandatory input requirement for discard phases to prevent empty selections
src/cli/display.py Updates enemy card display format to show attack-only instead of health|attack

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/game/engine.py
@fbec76 fbec76 self-assigned this Aug 21, 2025
@fbec76
fbec76 merged commit 6ce5930 into main Aug 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants