[PR #611] [MERGED] Fix Game Mode combat target selection #4692

Closed
opened 2026-10-22 04:09:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/611
Author: @cha1latte
Created: 5/9/2026
Status: ✅ Merged
Merged: 5/9/2026
Merged by: @cha1latte

Base: main ← Head: fix/issue-605-combat-targets


📝 Commits (1)

  • c61341b Fix combat target selection

📊 Changes

5 files changed (+15 additions, -6 deletions)

View changed files

➕ docs/pr-evidence/issue-605/after.png (+0 -0)
➕ docs/pr-evidence/issue-605/before.png (+0 -0)
➕ docs/pr-evidence/issue-605/heal.png (+0 -0)
➕ docs/pr-evidence/issue-605/skill.png (+0 -0)
📝 packages/client/src/components/game/GameCombatUI.tsx (+15 -6)

📄 Description

Linked issue

Closes #605

Why this change

Game Mode combat let the user choose Attack or a skill, but clicking the visible enemy card area could fail to send the selected target. Skill targeting also entered target-select without preserving that the selected action was a skill, so special abilities could appear targetable while never resolving against the chosen enemy.

What changed

  • Made the full combatant card the selectable target control instead of only the small sprite/avatar square.
  • Preserved selectedAction="skill" when choosing a skill in both desktop and mobile combat layouts so enemy/ally target classification works.
  • Added scoped PR evidence screenshots for the before/after and skill/heal target proof.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Codex verification performed:

  • Reproduced the original issue in a scratch browser harness using the real GameCombatUI: after selecting Attack, clicking the visible enemy label/card area sent zero combat-round requests.
  • Verified the original repro after the fix: the same click sends { "type": "attack", "targetId": "enemy-1" }.
  • Verified offensive skill targeting: choosing Spark and clicking the enemy sends { "type": "skill", "skillId": "spark", "targetId": "enemy-1" }.
  • Verified healing skill targeting: choosing Mend and clicking the ally sends { "type": "skill", "skillId": "mend", "targetId": "player-1" }.
  • Ran pnpm check after restoring the real client entrypoint; it passed.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

No docs or version files changed.

UI evidence (if applicable)

Before: clicking the visible enemy card area after Attack sent no target action.

Before combat target click

After: the same visible enemy card click sends the attack target action.

After combat target click

Offensive skill target proof:

Skill target proof

Healing skill target proof:

Healing target proof

Summary by CodeRabbit

  • Bug Fixes

    • Fixed skill selection behavior in combat to properly register when players choose skills from the mobile and desktop skill lists.
  • Improvements

    • Enhanced combat card interaction areas for better usability and responsiveness on touch and click interfaces.

Review Change Stack


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/611 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/9/2026 **Status:** ✅ Merged **Merged:** 5/9/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `fix/issue-605-combat-targets` --- ### 📝 Commits (1) - [`c61341b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c61341bcef910ed05afab587a849e3c798444c89) Fix combat target selection ### 📊 Changes **5 files changed** (+15 additions, -6 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-605/after.png` (+0 -0) ➕ `docs/pr-evidence/issue-605/before.png` (+0 -0) ➕ `docs/pr-evidence/issue-605/heal.png` (+0 -0) ➕ `docs/pr-evidence/issue-605/skill.png` (+0 -0) 📝 `packages/client/src/components/game/GameCombatUI.tsx` (+15 -6) </details> ### 📄 Description ## Linked issue Closes #605 ## Why this change Game Mode combat let the user choose Attack or a skill, but clicking the visible enemy card area could fail to send the selected target. Skill targeting also entered target-select without preserving that the selected action was a skill, so special abilities could appear targetable while never resolving against the chosen enemy. ## What changed - Made the full combatant card the selectable target control instead of only the small sprite/avatar square. - Preserved `selectedAction="skill"` when choosing a skill in both desktop and mobile combat layouts so enemy/ally target classification works. - Added scoped PR evidence screenshots for the before/after and skill/heal target proof. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Codex verification performed: - Reproduced the original issue in a scratch browser harness using the real `GameCombatUI`: after selecting Attack, clicking the visible enemy label/card area sent zero combat-round requests. - Verified the original repro after the fix: the same click sends `{ "type": "attack", "targetId": "enemy-1" }`. - Verified offensive skill targeting: choosing Spark and clicking the enemy sends `{ "type": "skill", "skillId": "spark", "targetId": "enemy-1" }`. - Verified healing skill targeting: choosing Mend and clicking the ally sends `{ "type": "skill", "skillId": "mend", "targetId": "player-1" }`. - Ran `pnpm check` after restoring the real client entrypoint; it passed. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) No docs or version files changed. ## UI evidence (if applicable) Before: clicking the visible enemy card area after Attack sent no target action. ![Before combat target click](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/c61341bcef910ed05afab587a849e3c798444c89/docs/pr-evidence/issue-605/before.png) After: the same visible enemy card click sends the attack target action. ![After combat target click](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/c61341bcef910ed05afab587a849e3c798444c89/docs/pr-evidence/issue-605/after.png) Offensive skill target proof: ![Skill target proof](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/c61341bcef910ed05afab587a849e3c798444c89/docs/pr-evidence/issue-605/skill.png) Healing skill target proof: ![Healing target proof](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/c61341bcef910ed05afab587a849e3c798444c89/docs/pr-evidence/issue-605/heal.png) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed skill selection behavior in combat to properly register when players choose skills from the mobile and desktop skill lists. * **Improvements** * Enhanced combat card interaction areas for better usability and responsiveness on touch and click interfaces. [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/611) <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:09:52 +07: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.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4692
No description provided.