Code Farm economy rebalance: market saturation, infrastructure/defense/cosmetics, mastery track, secondary leaderboards, admin eras, underdog bonus and weekly contracts

Every purchase/upgrade path (new and pre-existing) is now race-safe against concurrent requests via atomic conditional SQL updates.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-22 23:55:46 +02:00
co-authored by Claude Sonnet 5
parent 024edb5291
commit 34f76aad65
54 changed files with 3886 additions and 164 deletions
+13
View File
@@ -0,0 +1,13 @@
<div class="shop-row">
<div class="shop-info">
<strong>Defense: {{ farm.defense_tier_name }} (level {{ farm.defense_level }})</strong>
<span>{% if farm.defense_upkeep_daily %}Costs {{ farm.defense_upkeep_daily }}c/day upkeep - unpaid protection decays a level.{% else %}No upkeep at level 0.{% endif %}</span>
</div>
{% if farm.defense_next_cost %}
<form method="post" action="/game/defense/upgrade" data-game-action="defense">
<button type="submit" class="btn btn-sm btn-primary">Upgrade ({{ farm.defense_next_cost }}c)</button>
</form>
{% else %}
<span class="perk-maxed">Maxed</span>
{% endif %}
</div>