Stabilize battle unit hitboxes
This commit is contained in:
BIN
docs/battle-unit-hitbox-local-command-menu.png
Normal file
BIN
docs/battle-unit-hitbox-local-command-menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
BIN
docs/battle-unit-hitbox-local-selection.png
Normal file
BIN
docs/battle-unit-hitbox-local-selection.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
BIN
docs/battle-unit-hitbox-local-target-chosen.png
Normal file
BIN
docs/battle-unit-hitbox-local-target-chosen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
BIN
docs/battle-unit-hitbox-prod-command-menu.png
Normal file
BIN
docs/battle-unit-hitbox-prod-command-menu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
BIN
docs/battle-unit-hitbox-prod-selection.png
Normal file
BIN
docs/battle-unit-hitbox-prod-selection.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
BIN
docs/battle-unit-hitbox-prod-target-chosen.png
Normal file
BIN
docs/battle-unit-hitbox-prod-target-chosen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
40
docs/battle-unit-hitbox-report.md
Normal file
40
docs/battle-unit-hitbox-report.md
Normal 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`
|
||||
Reference in New Issue
Block a user