Skip to content

Turns

Turns are the action economy. Most player actions cost turns; defending and quality-of-life actions don't. Turns regenerate continuously, not as a daily reset.

Allocation

  • Default max: 1,000 turns (Player.max_turns, models/player.py).
  • Stored field: Player.turns — current pool, integer.
  • Regen anchor: Player.last_turn_regeneration (falls back to created_at for never-played accounts).
  • No carryover: once at max, regen stops until you spend.

Regeneration formula

From services/movement_service.py and the turn-regen pattern:

base_rate       = 1000 / 86400        # ≈ 0.01157 turns/sec
effective_rate  = base_rate * player.aria_bonus_multiplier
elapsed_seconds = (now - player.last_turn_regeneration).total_seconds()
turns_added     = int(elapsed_seconds * effective_rate)
player.turns    = min(player.max_turns, player.turns + turns_added)
player.last_turn_regeneration = now

In hourly terms: ~41.67 turns/hour at 1.0×; up to 62.5 turns/hour at the top ARIA tier (1.5×).

aria_bonus_multiplier is set by the consciousness-level table updated on combat wins (see combat.md):

ARIA interactions Consciousness Multiplier
0–49 1 1.0×
50+ 2 1.1×
150+ 3 1.2×
400+ 4 1.35×
1,000+ 5 1.5×

Maximum-cap bonuses also come from rank (see ranking.md) — Fleet Admiral grants +120 to max_turns.

Action cost matrix

Sources: services/movement_service.py, services/combat_service.py, services/genesis_service.py, services/trading_service.py.

Action Turns Notes
Sector travel (direct warp) ship.turn_cost (≈1, ship-modified) Locked while docked/landed
Travel via natural warp tunnel 1–3 Distance-based
Travel via player warp gate 0 Major incentive over natural tunnels
Dock at station 1
Undock 1
Buy / sell while docked 0
Land on planet 1
Leave planet 1
Attack player ship min 2; defender's attack_turn_cost Escape pods set very high cost intentionally
Attack sector drones 2
Attack planet 3
Attack port 3
Defend (any) 0 Always free
Ship upgrade 0 Time-based, not turn-based
Quantum Jump (Warp Jumper) high (design: 50) 24-hour real-time cooldown
Genesis sequence reduced action cap during 48h sequence Player locked to sector

Concurrency safety

MovementService.move_player_to_sector opens a row lock (with_for_update) on the player to prevent two simultaneous movement requests from double-spending turns. Combat services use the same pattern.

Player-facing affordances

  • Player state endpoints expose turns, max_turns, last regen timestamp; clients render time-to-full.
  • Low-turn warning UI hints when the pool is below thresholds (design: <50).
  • Out-of-turns players can still defend.

Source map

Topic Path
Turn fields & defaults services/gameserver/src/models/player.py
Movement (turn spend) services/gameserver/src/services/movement_service.py
Combat turn costs services/gameserver/src/services/combat_service.py
ARIA multiplier writes services/gameserver/src/services/combat_service.py (consciousness thresholds)
Rank-based max-turn bonus services/gameserver/src/services/ranking_service.py
Player API services/gameserver/src/api/routes/player.py

Planned (not in code)

🚧 Planned — turn banking (excess pool storage), turn sharing (team turn pool), and dynamic regeneration boosts (sector-based, event-based) are design only.