Skip to content

Add Civ Lite barbarian camps and events#61

Merged
leocagli merged 6 commits into
Bitcoindefi:mainfrom
YfengJ:codex/barbarian-events-21
Jun 30, 2026
Merged

Add Civ Lite barbarian camps and events#61
leocagli merged 6 commits into
Bitcoindefi:mainfrom
YfengJ:codex/barbarian-events-21

Conversation

@YfengJ

@YfengJ YfengJ commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a deterministic Civ Lite barbarian/event model for camp placement, spawn cadence, raider creation, event selection, and event-choice effects.
  • Integrate neutral barbarian camps and hostile raider turns into the game loop so barbarians threaten both player and bot units.
  • Add a Frontier Event sidebar panel with deterministic turn events, choice buttons, effect text, event logs, camp tooltips, minimap camp markers, and player rewards for clearing camps.

Validation

  • node --test demo/civ-lite/barbarian-model.test.mjs
  • node --check demo/civ-lite/barbarian-model.js && node --check demo/civ-lite/game.js && node --check demo/civ-lite/sprites.js
  • git diff --check
  • Playwright smoke on http://127.0.0.1:4201/demo/civ-lite/: page loaded, canvas pixel sample was non-empty, Frontier Event panel rendered, Turn 4 deterministic event appeared, and choosing an event option updated resources and cleared the panel.

Closes #21

@YfengJ

YfengJ commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the failing Build Godot Web export job is still stopping at the existing Godot Web preset configuration error: Cannot export project with preset Web due to configuration errors. This PR only changes demo/civ-lite JS/HTML/CSS plus a local barbarian-model test. Local validation passed: node --test demo/civ-lite/barbarian-model.test.mjs; node --check demo/civ-lite/barbarian-model.js; node --check demo/civ-lite/game.js; node --check demo/civ-lite/sprites.js; git diff --check; and a Playwright smoke check for page load, non-empty canvas, Frontier Event rendering, deterministic Turn 4 event display, and event-choice resource updates. SonarCloud Quality Gate passes with 0 new issues on latest head d74db63.

YfengJ and others added 3 commits June 30, 2026 09:47
# Conflicts:
#	demo/civ-lite/game.js
#	demo/civ-lite/index.html
#	demo/civ-lite/styles.css
@leocagli leocagli merged commit 17f301e into Bitcoindefi:main Jun 30, 2026
1 check passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gameplay: bárbaros, campamentos neutrales y eventos aleatorios

2 participants