[GH-ISSUE #5040] [Issue]: Combat UI treats buff and debuff skills as attacks #2792

Closed
opened 2026-10-21 05:55:35 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Aug 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5040

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The combat UI defaults every skill that is not a heal to an attack, despite the backend correctly parsing buff and debuff types. This causes incorrect target selection and hides the actual skill type in combat labels.

Expected behavior

Buff skills should be selectable for appropriate ally targets, and buff/debuff skills should display their correct localized type and description instead of being labeled as attacks or special attacks.

Actual behavior

Skills parsed as buffs are forced to target enemies and are displayed as "Atk" or "Special attack." Renaming the same skill from "Shield (Buff)" to "Shield (Heal)" makes ally targeting and labels work correctly.

Steps to reproduce

  1. Create a combat skill named "Shield (Buff)".
  2. Enter combat and select the skill.
  3. Observe that the backend parses it as type "buff", but the UI labels it as an attack or special attack and only permits enemy targeting.
  4. Rename the skill to "Shield (Heal)" and use it in combat.
  5. Observe that it is parsed as type "heal", displayed correctly, and can target an ally.

Environment

  • Marinara Engine version: 2.4.3
  • Install type: Not provided
  • OS + version: Windows 10.0
  • Browser or app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36

Logs, screenshots, or video

Screenshot: https://cdn.discordapp.com/attachments/1538049986196144219/1538049986900795452/image.png?ex=6a81442c&is=6a7ff2ac&hm=06d02479d3332fb135d7017aa4daf0f8daa75ea8e9f16bd3a36c96895cd7485d. Recording: https://share.zight.com/01a003c7-67fd-719e-86d4-a13fd6075239. No diagnostic logs were provided.

Additional context

The backend parses skill types through inferCombatSkillType in GameSurface.tsx, but GameCombatUI.tsx uses selectedSkill.type === "heal" for ally targeting and defaults other types to enemy targeting. The same binary logic appears in the skill labels around lines 1937 and 2467, while target selection is around lines 1209-1217. Diagnostics: build 2.4.3+9c658d663242, commit 9c658d6632, Chat Mode Game, GPU ANGLE Intel UHD Graphics, active connection GLM with custom provider and glm-5.2 model. The issue was also reproduced with Gemini flash 3.5.

Discord thread: Bug: Game Mode Combat UI hardcodes binary "heal" vs "attack" logic, breaking Buff/Debuff targeting
Discord thread link: https://discord.com/channels/1417099416812392641/1538049986196144219
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (4 messages)
[2026-08-15T05:01:32.296Z] Crimson Orc: Hey, it's me again with more game mode bullshit! 

I bullied Prof into writing this after a looooong talk.

__

[attached image 1: https://cdn.discordapp.com/attachments/1538049986196144219/1538049986900795452/image.png?ex=6a81442c&is=6a7ff2ac&hm=06d02479d3332fb135d7017aa4daf0f8daa75ea8e9f16bd3a36c96895cd7485d&]
[Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538049986196144219]

[2026-08-15T05:01:46.632Z] Crimson Orc: **Overview:**
The backend correctly parses buff and debuff skill types (via inferCombatSkillType in GameSurface.tsx), but the frontend combat UI treats any skill that isn't explicitly a heal as an attack. This completely breaks buffs by forcing the player to target enemies with them, and masks the actual skill types in the UI. (Defaulting to Special Attack).
[Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538050046325424158]

[2026-08-15T05:01:59.652Z] Crimson Orc: **Issue 1: Targeting logic forces buffs onto enemies**
In packages/client/src/components/game/GameCombatUI.tsx (approx. lines 1209-1217), the target selection phase uses a strict binary check:
typescriptconst selectingAllyTarget =
  (selectedAction === "skill" && selectedSkill?.type === "heal") || // ...

const selectingEnemyTarget =
  selectedAction === "attack" ||
  (selectedAction === "skill" && selectedSkill?.type !== "heal") || // ...
Because selectingAllyTarget strictly requires type === "heal", a parsed buff falls through to selectingEnemyTarget. The player is forced to cast defensive buffs (like shields) on enemies.
[Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538050100935532594]

[2026-08-15T05:02:04.583Z] Crimson Orc: **Issue 2: UI display masks buff/debuff types**
In the same file (GameCombatUI.tsx), the UI rendering also relies on this binary check, hiding the parsed skill types from the player.

Line ~1937:
{skill.type === "heal" ? localizeUi("ui.game.gamecombatui.heal") : localizeUi("ui.game.gamecombatui.atk")} · {skill.mpCost} MP

Line ~2467:
{skill.type === "heal" ? localizeUi("ui.game.gamecombatui.restoresHp") : localizeUi("ui.game.gamecombatui.specialAttack")}

**Steps to Reproduce / Proof:**
Create a skill named "Shield (Buff)". The backend regex correctly parses this as type: "buff".
In combat, the UI labels it "Special attack" / "Atk" and forces you to target an enemy.
Rename the skill to "Shield (Heal)". The backend parses it as type: "heal".
In combat, the UI now correctly allows you to target an ally.

**Suggested Fix by Prof:**
Update GameCombatUI.tsx to recognize buff and debuff types. selectingAllyTarget should include type === "buff", and the UI localization strings should render Buff/Debuff labels instead of defaulting everything non-heal to "Atk".

**Attachments:**
Screenshot paired with this beautiful recording: https://share.zight.com/01a003c7-67fd-719e-86d4-a13fd6075239

**Warning:** This recording contains a small thumbnail of a thick goblin girl and a thick centaur that I could not be bothered to hide (it's mostly SFW though, just... horny, really.)

__

Marinara Engine diagnostics
Version: 2.4.3
Build: 2.4.3+9c658d663242
Chat Mode: Game
Commit: 9c658d663242
OS: Windows 10.0
Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36
GPU: ANGLE (Intel, Intel(R) UHD Graphics (0x0000A788) Direct3D11 vs_5_0 ps_5_0, D3D11)
Active connection: GLM
Connection provider: custom
LLM model: glm-5.2 

// Also tried with Gemini flash 3.5, for reference
Defensive skill 'Above' only targets enemies while heal can target ...
Shared with Zight
[Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538050121617510440]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Aug 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5040 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The combat UI defaults every skill that is not a heal to an attack, despite the backend correctly parsing buff and debuff types. This causes incorrect target selection and hides the actual skill type in combat labels. ## Expected behavior Buff skills should be selectable for appropriate ally targets, and buff/debuff skills should display their correct localized type and description instead of being labeled as attacks or special attacks. ## Actual behavior Skills parsed as buffs are forced to target enemies and are displayed as "Atk" or "Special attack." Renaming the same skill from "Shield (Buff)" to "Shield (Heal)" makes ally targeting and labels work correctly. ## Steps to reproduce 1. Create a combat skill named "Shield (Buff)". 2. Enter combat and select the skill. 3. Observe that the backend parses it as type "buff", but the UI labels it as an attack or special attack and only permits enemy targeting. 4. Rename the skill to "Shield (Heal)" and use it in combat. 5. Observe that it is parsed as type "heal", displayed correctly, and can target an ally. ## Environment - Marinara Engine version: 2.4.3 - Install type: Not provided - OS + version: Windows 10.0 - Browser or app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 ## Logs, screenshots, or video Screenshot: https://cdn.discordapp.com/attachments/1538049986196144219/1538049986900795452/image.png?ex=6a81442c&is=6a7ff2ac&hm=06d02479d3332fb135d7017aa4daf0f8daa75ea8e9f16bd3a36c96895cd7485d. Recording: https://share.zight.com/01a003c7-67fd-719e-86d4-a13fd6075239. No diagnostic logs were provided. ## Additional context The backend parses skill types through inferCombatSkillType in GameSurface.tsx, but GameCombatUI.tsx uses selectedSkill.type === "heal" for ally targeting and defaults other types to enemy targeting. The same binary logic appears in the skill labels around lines 1937 and 2467, while target selection is around lines 1209-1217. Diagnostics: build 2.4.3+9c658d663242, commit 9c658d663242, Chat Mode Game, GPU ANGLE Intel UHD Graphics, active connection GLM with custom provider and glm-5.2 model. The issue was also reproduced with Gemini flash 3.5. Discord thread: Bug: Game Mode Combat UI hardcodes binary "heal" vs "attack" logic, breaking Buff/Debuff targeting Discord thread link: https://discord.com/channels/1417099416812392641/1538049986196144219 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (4 messages)</summary> ```text [2026-08-15T05:01:32.296Z] Crimson Orc: Hey, it's me again with more game mode bullshit! I bullied Prof into writing this after a looooong talk. __ [attached image 1: https://cdn.discordapp.com/attachments/1538049986196144219/1538049986900795452/image.png?ex=6a81442c&is=6a7ff2ac&hm=06d02479d3332fb135d7017aa4daf0f8daa75ea8e9f16bd3a36c96895cd7485d&] [Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538049986196144219] [2026-08-15T05:01:46.632Z] Crimson Orc: **Overview:** The backend correctly parses buff and debuff skill types (via inferCombatSkillType in GameSurface.tsx), but the frontend combat UI treats any skill that isn't explicitly a heal as an attack. This completely breaks buffs by forcing the player to target enemies with them, and masks the actual skill types in the UI. (Defaulting to Special Attack). [Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538050046325424158] [2026-08-15T05:01:59.652Z] Crimson Orc: **Issue 1: Targeting logic forces buffs onto enemies** In packages/client/src/components/game/GameCombatUI.tsx (approx. lines 1209-1217), the target selection phase uses a strict binary check: typescriptconst selectingAllyTarget = (selectedAction === "skill" && selectedSkill?.type === "heal") || // ... const selectingEnemyTarget = selectedAction === "attack" || (selectedAction === "skill" && selectedSkill?.type !== "heal") || // ... Because selectingAllyTarget strictly requires type === "heal", a parsed buff falls through to selectingEnemyTarget. The player is forced to cast defensive buffs (like shields) on enemies. [Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538050100935532594] [2026-08-15T05:02:04.583Z] Crimson Orc: **Issue 2: UI display masks buff/debuff types** In the same file (GameCombatUI.tsx), the UI rendering also relies on this binary check, hiding the parsed skill types from the player. Line ~1937: {skill.type === "heal" ? localizeUi("ui.game.gamecombatui.heal") : localizeUi("ui.game.gamecombatui.atk")} · {skill.mpCost} MP Line ~2467: {skill.type === "heal" ? localizeUi("ui.game.gamecombatui.restoresHp") : localizeUi("ui.game.gamecombatui.specialAttack")} **Steps to Reproduce / Proof:** Create a skill named "Shield (Buff)". The backend regex correctly parses this as type: "buff". In combat, the UI labels it "Special attack" / "Atk" and forces you to target an enemy. Rename the skill to "Shield (Heal)". The backend parses it as type: "heal". In combat, the UI now correctly allows you to target an ally. **Suggested Fix by Prof:** Update GameCombatUI.tsx to recognize buff and debuff types. selectingAllyTarget should include type === "buff", and the UI localization strings should render Buff/Debuff labels instead of defaulting everything non-heal to "Atk". **Attachments:** Screenshot paired with this beautiful recording: https://share.zight.com/01a003c7-67fd-719e-86d4-a13fd6075239 **Warning:** This recording contains a small thumbnail of a thick goblin girl and a thick centaur that I could not be bothered to hide (it's mostly SFW though, just... horny, really.) __ Marinara Engine diagnostics Version: 2.4.3 Build: 2.4.3+9c658d663242 Chat Mode: Game Commit: 9c658d663242 OS: Windows 10.0 Browser / app shell: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 GPU: ANGLE (Intel, Intel(R) UHD Graphics (0x0000A788) Direct3D11 vs_5_0 ps_5_0, D3D11) Active connection: GLM Connection provider: custom LLM model: glm-5.2 // Also tried with Gemini flash 3.5, for reference Defensive skill 'Above' only targets enemies while heal can target ... Shared with Zight [Discord message: https://discord.com/channels/1417099416812392641/1538049986196144219/1538050121617510440] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:55:35 +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#2792
No description provided.