openfrontio / openfrontio/OpenFrontIO
Bug/feat: Add target selection strategy to settings - display playername on wheel
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 1.4k
- Avg merge
- 17h 43m
- Merged PRs (30d)
- 310
Description
**Describe the bug**
When you click on a tile to betray a player, the game registers the clicked at tile instead of the player itself. This was previously a bug with donated troops as well - if someone else took over that tile, it targets a different player instead.
**To Reproduce**
Steps to reproduce the behavior:
1. get into a game and ally someone.
2. right click to open the wheel
3. wait for the tile to be captured by another player
4. press "betray" - you will betray the player who captured
**Expected behavior**
1. The game should clearly signify the player the wheel is targeting - hence my suggestion to add the name
2. I propose making a setting that toggles targeting strategy between "tile" and "original player"
- Good players often do these actions quite quickly, and the wrong game-action can be game ruining
- Worse players, that I've seen, and mobile players, might bring up the wheel, look at the map elsewhere and then see the wheel is hovering player B and want to betray them.
- Thus we come to a toggle: It is bad game design to have the element hover over player B while still betraying the original player A. It is however against good player expectation to have it target B.
**Additional context**
Further considerations:
- We could simply "no-op" it if it's pressed and the original tile state doesn't match the new one - but we'd need to implement some warning for this.
- We could just close the wheel if the target changes - again, user might "be about to press" and attack someone instead. Might need to prevent clicks for a short amount of time or so. I think this is a good alternative though.
**Assignment**
- [x] I'd like to be assigned to this issue and work on it myself
Contributor guide
Research direction
Reproduce the betrayal flow in a browser game: ally a player, open the wheel with right click, let the tile change owner, and press “betray.” Trace how the wheel selects its tile and player target, then determine which targeting strategy the setting should control. Done means the wheel clearly shows the targeted player and betrayal cannot unexpectedly affect a different player after the tile changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100