Stabilize battle unit hitboxes

This commit is contained in:
2026-07-03 17:56:33 +09:00
parent 43dab94ba6
commit 3c65e71c67
8 changed files with 68 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

View File

@@ -0,0 +1,40 @@
# Battle Unit Hitbox Verification
Date: 2026-07-03
## Change
- Unit sprites no longer receive pointer input from the full enlarged sprite rectangle.
- Each unit now owns an invisible tile-sized hit zone centered on its tactical tile.
- The hit zone follows unit movement, visibility, retreat state, and map visibility.
- Attack/support target markers stay above unit hit zones, so target selection keeps priority during targeting.
## Local Verification
- Command: `pnpm build`
- URL: `http://127.0.0.1:4193/heros_web/?debug&debugBattleSetup=attack-preview&v=unit-hitbox-local`
- Adjacent unit selection: clicked Liu Bei, Guan Yu, and Zhang Fei by tile center; final selection was Zhang Fei.
- Command menu: clicked Zhang Fei tile center again; Zhang Fei command menu opened.
- Targeting: selected Guan Yu attack, clicked the adjacent Yellow Turban target, and opened combat prediction.
- Console errors: 0
Screenshots:
- `docs/battle-unit-hitbox-local-selection.png`
- `docs/battle-unit-hitbox-local-command-menu.png`
- `docs/battle-unit-hitbox-local-target-chosen.png`
## Deployed Verification
- Command: `pnpm deploy:nas`
- URL: `https://comtropy.synology.me/heros_web/?debug&debugBattleSetup=attack-preview&v=unit-hitbox-20260703`
- Adjacent unit selection: clicked Liu Bei, Guan Yu, and Zhang Fei by tile center; final selection was Zhang Fei.
- Command menu: clicked Zhang Fei tile center again; Zhang Fei command menu opened.
- Targeting: selected Guan Yu attack, clicked the adjacent Yellow Turban target, and opened combat prediction.
- Console errors: 0
Screenshots:
- `docs/battle-unit-hitbox-prod-selection.png`
- `docs/battle-unit-hitbox-prod-command-menu.png`
- `docs/battle-unit-hitbox-prod-target-chosen.png`