openfrontio / openfrontio/OpenFrontIO

Feature: Bounty Market — Pooled Gold Bounties on Hostile Targets

Open
#5,380 2 comments 0 reactions 0 assignees View on GitHub
not-approved
Dominant language
TypeScript
Stars
2.7k
Forks
1.4k
Avg merge
17h 43m
Merged PRs (30d)
310

Description

**Is your feature request related to a problem? Please describe.**
In FFA and diplomacy games, runaway leaders who snowball often become impossible for smaller nations to check individually. Currently, the primary cooperation mechanisms are direct alliances or resource donations. Players frequently lack an economic mechanism to coordinate against common threats or place public contracts on hostile expansionists without committing to an official alliance.

**Describe the solution you'd like**
Introduce an opt-in **Bounty Market** system where players can pool gold on hostile targets:

1. **Pooled Gold Bounties**: Any player can place a gold bounty on another player or nation via a new `place_bounty` intent (accessible via the right-click radial menu and player panel). Multiple players can pool gold into the same target's pot.
2. **Killer-Takes-All Payout**: Whoever lands the decisive conquering blow on the target collects the entire pooled jackpot.
3. **Fairness & Anti-Exploit Rules**:
- Self-collection prevention: Contributors cannot collect their own bounty pool; if a contributor kills the target, contributors are refunded.
- Death without conqueror (e.g., desertion or disconnection): All contributors receive a full refund.
- Cooldowns & Minimums: Minimum bounty amount and cooldowns prevent spam.
- Optional anonymity: Placers can choose anonymous placement with a small burn fee.
4. **AI Bot Strategy**:
- Bots evaluate bounties using an expected-value model comparing kill costs (army + garrison) against the jackpot payout and difficulty margins.
- Tribes hunt high-value jackpots in their target selection.
- Strong or wealthy bots place revenge bounties on persistent attackers.
5. **UI & HUD**:
- Radial menu slice ("Place Bounty") and quick-action in player panel.
- Resource modal with amount presets and slider.
- Live event toasts for placed and collected bounties.
- "Most Wanted" leaderboard in the left sidebar showing active bounty pools.

**Describe alternatives you've considered**
- Direct mercenary contracts: More complex to negotiate and enforce in fast-paced real-time play.
- Unrefunded bounties upon player disconnection: Leads to lost gold without gameplay resolution; refunding preserves player agency.

**Additional context**
- Full end-to-end implementation and test suite (unit tests, bot EV decision tests, and integration tests) are already written, tested with Vitest, and verified clean against the latest main branch.

**Assignment**

- [x] I'd like to be assigned to this issue and work on it myself

**Discord Username**
ayushthepiro_22739

Contributor guide

Open the contributing guide

Research direction

No files or entry points are named. Begin by locating the existing Bounty Market implementation and its Vitest unit, bot EV decision, and integration tests. Done means verifying the end-to-end feature and full test suite against the latest main branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.