fertig-classic-games/data
Brian Fertig 4fcae92e59 feat(civ): AI-initiated diplomacy with frustration escalation
Introduce active diplomacy where rival leaders approach the player with
requests, demands, trades, and gifts rather than passively waiting.

New CivilizationDiplomacy.js module handles:
- 9 request kinds (joinWar, breakTreaty, borderUltimatum, demandGold,
  demandTech, techTrade, ceasefire, peace, alliance) with initiative
  tiers so urgent calls to arms aren't drowned out by filler offers
- Cooldowns per (leader, target, kind) plus a per-leader gap so a
  leader can't spam different requests to bypass rate limits
- Frustration grudge (0-100) raised by refusals, decaying each turn
  and dragging attitude toward hostility through the ordinary war path
- Escalation: frustrated leaders demand compensation, then renounce
  treaties at breaking point, with ordinary hostility finishing the job
- Border ultimatum promises checked when pledges expire (double penalty
  for broken word)
- Unprompted gold/tech gifts from leaders with high attitude
- Staleness validation so requests the world invalidated are dropped
- AI-to-AI requests resolve immediately through the same pipeline

UI changes:
- AI requests queued on state.pendingRequests, presented via audience
  popup at the start of the human turn (one per turn, configurable)
- Diplomacy screen shows ACCEPT/REFUSE with consequence hints until
  answered; unanswered requests lapse with half-weight penalties
- New event types: treatyRenounced, pledgeBroken/pledgeKept, aiGift
- Leader dialogue for demands, refusals, gifts, and renouncements
- Tetris Attack menu gets a title art backdrop

Data/infra:
- diplomacyRequests tuning in civilization-rules.json (thresholds,
  cooldowns, attitude weights, per-request config)
- Frustration, requestCooldown, lastRequestTurn, pledges fields on
  civ state — all backward-compatible with old saves
- Full verification suite covering eligibility, resolution, cooldowns,
  frustration arc, serialization, and fuzz testing
2026-07-23 16:26:15 -06:00
..
crosswords
wordlists
advancewars-artwork.json feat(advancewars): add HP text display to battle animations and procedural cursor 2026-07-19 19:04:14 -06:00
advancewars-campaign.json
advancewars-rules.json
adventure-music.json
arcadedark-music.json
balatro-artwork.json
blockfighter.json
bookwork.json
card-backs.json
civilization-artwork.json feat(civilization): add japanese city theme and improve world generation 2026-07-22 23:48:41 -06:00
civilization-rules.json feat(civ): AI-initiated diplomacy with frustration escalation 2026-07-23 16:26:15 -06:00
colorado-defense-cities.json
colored-playfields.json
dotlink.json
dungeonboss-artwork.json
hacker-music.json
jewelquest.json
jumble-riddles.json
jumble.json
katamino.json
music.json
nintendo-music.json feat(tetrisattack): add optional character voice reactions and adjust BGM volume 2026-07-22 21:06:03 -06:00
opponents.json feat(civilization): add japanese city theme and improve world generation 2026-07-22 23:48:41 -06:00
playfields.json
puddingmonsters.json
rushhour.json
shift-artwork.json
slots-artwork.json
spireclimb-artwork.json
star-control-ships.json
superkart-artwork.json
superkart-racers.json
superkart-rules.json feat(superkart): add missed-checkpoint correction for shortcut detection 2026-07-22 13:00:12 -06:00
swdbg-artwork.json
swdbg-cards.json
tetrisattack-artwork.json feat: enhance Advance Wars replay HP display and terrain rendering, add Tetris Attack host backgrounds 2026-07-20 23:20:58 -06:00
tetrisattack-puzzles.json feat: add Tetris Attack (Panel de Pon) with endless, stage clear, and puzzle modes 2026-07-20 00:04:26 -06:00
tetrisattack.json feat(civilization): add japanese city theme and improve world generation 2026-07-22 23:48:41 -06:00
zuma.json