Compare commits

...
Author SHA1 Message Date
adminandClaude Opus 4.6 7a5bfbd927 Restore .meta files from LFS pointers to text
Re-add DungeonMonsters2D and Raccoon files through the updated
gitattributes filter so .meta files are stored as text (preserving
GUIDs for Unity asset resolution) while all other files stay as
LFS objects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:28:24 -08:00
adminandClaude Opus 4.6 c4ea0850e1 Exclude .meta files from third-party asset pack LFS rules
Unity .meta files contain asset GUIDs needed for reference
resolution. When stored as LFS pointers, Unity can't read them
and all asset references break. Add !filter overrides so .meta
files stay as text while all other files remain LFS-tracked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:27:50 -08:00
c9afc4a6b8 Convert existing asset packs to Git LFS (#6303)
* LFS-track all files under third-party asset pack directories

Track all files under DungeonMonsters2D/, Raccoon/, Polytope Studio/,
and RRFreelance-Characters/ via Git LFS. These are imported third-party
assets that are never manually edited.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Convert DungeonMonsters2D and Raccoon assets to Git LFS

Re-add all files under DungeonMonsters2D/ and Raccoon/ through
the LFS filter so they're stored as LFS objects going forward.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:18:02 -08:00
90f20e25b2 Add psychopath beast type (#6301)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 06:58:27 -08:00
d6c3abd505 Reduce raccoon animal scale from 15 to 5 (#6300)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 21:05:46 -08:00
ee31265ff6 Clean up warmup-binary artifacts after deploy (#6299)
The warmup-binary artifacts from docker_build were accumulating and
exceeding the 500 MB storage threshold. GitHub's retention-days cleanup
wasn't keeping up with deploy frequency. Add explicit artifact deletion
after deploy, matching what mac_build already does.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:58:47 -08:00
e289913e18 Add raccoon beast animation (Sketchfab 3D model) (#6298)
* Add raccoon beast animation using Sketchfab 3D model

Adds Raccoon.fbx (WildMesh 3D, CC BY 4.0) with textures, wires up
raccoonEffectPrefab in ProvinceBeastsController, and updates both
attributions.json files and BEAST_EFFECTS.md.

Editor steps still needed: create RaccoonMapAnims controller, create
RaccoonEffect prefab (duplicate HoneyBadgerEffect), wire in Gameplay.unity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Wire up raccoon animation with Blender-converted FBX

Convert GLB to FBX via Blender (original FBX had no animation data).
Add RaccoonMapAnims controller, RaccoonEffect prefab, materials with
textures, scene wiring, and fix province name (Hella, ID 19).

Known issue: gray sphere artifact under each raccoon.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove Icosphere/hair artifacts from raccoon FBX and update scene

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Smooth 3D animal turning with Quaternion.Slerp

Animals now rotate smoothly toward their target instead of snapping.
UpdateFacing is called every frame during walking, and uses Slerp
with a configurable turnSpeed (default 5) for gradual rotation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:58:19 -08:00
62cba309d8 Replace Unity attributions.json with symlink to canonical copy (#6297)
Eliminates the duplicate attributions.json by making the Unity copy
a symlink to src/main/resources/net/eagle0/attributions.json, ensuring
a single source of truth that can never diverge.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:00:13 -08:00
25d1d2b268 Note controller override in honey badger doc entry (#6296)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:14:11 -08:00
cd7e21cfa4 Add honey badger beast animation (3D model) (#6293)
* Add honey badger 3D model and wire up AnimalEffect

Import HoneyBadger FBX (63 animations) and texture from Sketchfab.
Add honeyBadgerEffectPrefab field and switch case in
ProvinceBeastsController. Still needs Unity Editor setup: Animator
Controller, effect prefab, and scene wiring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix honey badger test province name (ID 1 is Shumal, not Onmaa)

Onmaa is province ID 14, already used by TestWildPig.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Wire up HoneyBadgerEffect prefab and animator controller

- HoneyBadgerMapAnims controller with idle/walk/eat/attack states
  mapped to HoneyBadger FBX clips
- HoneyBadgerEffect prefab with AnimalEffect referencing the model
- Wired into Gameplay.unity ProvinceBeastsController
- Includes Unity-generated .meta files for imported assets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix HoneyBadger FBX avatar setup to enable animations

avatarSetup: 0 (No Avatar) prevented the Animator from driving the
skeleton. Changed to avatarSetup: 1 (Create From This Model) to match
how the Animal Pack Deluxe models are configured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:01:27 -08:00
5bb6b4ca9d Add attribution for new beast animation asset packs (#6294)
* Add attribution for recently added Unity asset packs

Add Animal pack deluxe (janpec), 2D Monster Pack Basic Bundle/PSB
(SP1/DungeonMonsters2D), and Honey Badger 3D model (WildMesh 3D) to
ASSET_AUDIT.md. Update 3D model count in summary table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add 3D model attributions to in-app/website credits

Add Animal pack deluxe, 2D Monster Pack, and Honey Badger
to both server and Unity client attributions.json files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 13:33:55 -08:00
9030c455e0 Add no-chained-commands rule to CLAUDE.md (#6295)
Prevents Claude from combining bash commands with &&, ||, or ;.
Each command must be a separate tool call, which makes permission
rules work correctly per-command.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 11:41:27 -08:00
49c14be159 Add clown beast animation with both Clown Pack models (#6292)
* Add clown beast animation using both Clown Pack models

- Add per-prefab animator controller overrides to AnimalEffect
  (animatorControllers[] array, indexed to match animalPrefabs[])
- Create ClownMapAnims and FatClownMapAnims controllers mapping
  idle/walk/eat/attack states to each model's animation clips
- Create ClownEffect prefab using both Clown and Fat Clown models
- Add clown case to ProvinceBeastsController, remove from HumanBeastNames
- Wire up in Gameplay.unity scene
- Update BEAST_EFFECTS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix ClownEffect prefab (recreated via Unity editor)

The hand-written prefab YAML was rejected by Unity's PrefabImporter.
Recreated by duplicating the working OgreEffect prefab in the editor
and configuring the AnimalEffect fields there.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 10:08:18 -08:00
e63735f428 Update beast effects doc for ogre/troll coverage (#6291)
* Update BEAST_EFFECTS.md: ogre/troll now have custom animation

Reflects the addition of the Orc-Ogre pack AnimalEffect for ogre and
troll beast types (PR #6287). Removes them from the "no custom
animation" list and adds them to the custom animations table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add complete beast coverage details to BEAST_EFFECTS.md

- Add missing animal effect entries (crab, frog, rabbit, salamander,
  scorpion, stag, wild goat, wild pig) to custom animations table
- Add human-type beast breakdown by likelihood with thematic clusters
  for potential visual differentiation beyond the generic Butcher prefab

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:48:57 -08:00
f4b9a9268c Refactor BeastUtils to use pattern matching instead of asInstanceOf (#6290)
Replace unsafe asInstanceOf casts with pattern matching via helper
methods. This is more idiomatic Scala and will give clearer error
messages if the map contains unexpected types.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 08:39:22 -08:00
272badda47 Balance beast danger levels and add powerExponent (#6288)
Fixes two issues with beast balance:

1. Demons and vampires were impossible to defeat - reduced maxCountMultiplier
   from 0.5 to 0.15 so an elite battalion (1000 troops, 100/100 stats) can
   just barely defeat them.

2. Clowns had a 39% chance of being deadlier than demons due to their huge
   power variance (0.8-50). Added a powerExponent field to beasts.tsv that
   controls how the random roll translates to power. Default is 4 (quartic),
   clowns use 20 which reduces the chance of deadly clowns to ~10%.

The casualties formula is: casualties = beastsPower² / totalPower
Where beastsPower = count × relativePower

This means overwhelming force results in minimal casualties (intended),
but also means high beast power causes quadratically more damage.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 08:34:46 -08:00
080329e369 Fix NullReferenceException when clicking map before model loads (#6289)
ProvinceWasSelected accessed Model.AvailableCommandsByProvince and
Model.Provinces without checking if Model was null. This caused a
crash when the user clicked a province before the game model was
received from the server on first load.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:32:31 -08:00
f9afcea9f7 Add ogre/troll beast animation using Orc-Ogre 3D asset pack (#6287)
- Add animatorController override field to AnimalEffect so it can swap
  the prefab's controller at runtime (needed because the Orc-Ogre pack
  uses state names like Ogre_Idle1 instead of the expected idle/walk/etc)
- Create OgreMapAnims.controller with idle/walk/eat/attack states mapped
  to Orc-Ogre FBX animation clips
- Create OgreEffect.prefab using AnimalEffect + controller override
- Add ogre/troll cases to ProvinceBeastsController.GetEffectPrefab()
- Wire OgreEffect in Gameplay.unity scene

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 08:15:49 -08:00
cec058c369 Wire up animations for 8 new beast types (#6286)
* Wire up animations for 8 new beast types

Add effect prefabs and scene wiring for crab, frog, rabbit,
salamander, scorpion, stag, wild goat, and wild pig using
Animal Pack Deluxe 3D models with AnimalEffect controller.

Multi-variant prefabs: frog (3), scorpion (2), rabbit (2),
stag (2), wild goat (2), wild pig (2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix ContextMenu test labels to use real province names

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix animal effect prefab references to use root GameObjects

Each Animal Pack prefab contains many child objects (bones, meshes, etc).
The effect prefabs were incorrectly referencing the first child object
instead of the root prefab object (the one with m_Father: {fileID: 0}).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Tune animal effect scales per beast type

Adjusted animalScale values from the Unity editor after visual testing:
- Frog, salamander, scorpion, crab: 50 (small creatures need more zoom)
- Rabbit, stag, wild goat, wild pig: 20 (medium animals)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 07:35:57 -08:00
679b5ef1ce Add 8 new beast types with matching asset pack animations (#6285)
New beasts from Animal Pack Deluxe:
- crab (0.04): coastal swarm, low power, agriculture damage
- frog (0.10): plague swarm, very high count, minimal power
- rabbit (0.20): crop-destroying swarm, high agriculture damage
- salamander (0.02): rare, poisonous, moderate power
- scorpion (0.15): venomous swarm, like spiders
- stag (0.04): territorial wild deer, moderate power
- wild goat (0.10): mountain crop raiders, agriculture damage
- wild pig (0.10): aggressive crop destroyers

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 07:07:36 -08:00
f44b7351b4 Add spawn likelihood to uncovered beast types in docs (#6284)
Order beasts without custom animations by how commonly they appear,
making it easier to prioritize which to add next.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 07:01:52 -08:00
03e82ae635 Update beast effects docs with full animation coverage (#6283)
Document all three effect types (MonsterEffect, AnimalEffect,
DragonEffect), list all beasts with custom animations vs vulture
fallbacks, and add 3D rendering tips.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:25:18 -08:00
3e4aa6d6d2 Update animal effect prefab scales from 20 to 15 (#6282)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:21:37 -08:00
6bfbf38fb4 Add animal wandering effects for bear, boar, crocodile, snake, wolf (#6281)
* Add animal wandering effect for bear, boar, crocodile, snake, wolf

New AnimalEffect.cs drives Animal Pack Deluxe 3D prefabs using their
lowercase state names (idle, walk, run, eat, attack) and Y-rotation
for facing direction. Wolverine reuses the wolf prefab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add animal effect prefabs and scene wiring for bear, boar, crocodile, snake, wolf

Wire AnimalEffect prefabs to ProvinceBeastsController and include the
Animal Pack Deluxe asset pack. RatEffect now has both MonsterEffect
(2D sprites) and AnimalEffect (3D model) for a mixed group.
Add LFS tracking for .tga and .fbx files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix animal facing direction to use full angle rotation

3D models need to rotate Y by the actual movement angle, not just
0/180 degrees. Use atan2 of the XY direction vector so animals face
their actual travel direction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix animal rendering and remove die animation

Use sortingOrder=103 on 3D mesh renderers instead of Z offset hack
to render animals above the map. Guard against die animation state.
Default scale to 15. Remove unused run state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Disable depth test on animal renderers to prevent map clipping

When 3D animals rotate to face away, their geometry extends into
positive Z and clips behind the map plane. Setting ZTest=Always
ensures they always render on top regardless of orientation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix animal depth clipping with renderQueue and ZWrite/ZTest overrides

Use renderQueue=4000 (Overlay), disable ZWrite, and set ZTest=Always
via SetFloat (compatible with more shader types) to prevent 3D animal
meshes from clipping behind the map when rotated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 21:08:55 -08:00
28560940cb Add Old Marek commentary when King's heroes depart in tutorial (#6280)
The first hero departure notification in the tutorial has no narrative
context. Old Marek now comments when a non-player faction loses a hero,
noting that Bregos has always inspired loyalty and something deeper must
be at work after the upheaval with Tarn.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 20:40:20 -08:00
38d097461d Add wandering monster animations for beast events (#6279)
* Add wandering monster animations for beast events on Eagle map

Replace generic vulture effects with animated DungeonMonsters2D monsters
for skeleton, zombie, rat, spider, demon, orc, and human-type beasts.
Each MonsterEffect spawns a group of 3 monsters that wander randomly,
idle, and occasionally attack within a province.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add ContextMenu test actions for monster effects

MonsterEffect: Test All Idle/Move/Attack/SpecialAttack
ProvinceBeastsController: Test spawn for each beast type in Motcia

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Spread test beast spawns across different provinces

Also add "Test All Beast Types" to spawn all 8 at once.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix monster sprite facing direction

DungeonMonsters2D prefabs default to facing left, so invert the
X scale flip logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove malformed AnimationEvents from SkeletonArcher anims

The asset pack shipped with empty functionName fields on these events,
causing "AnimationEvent has no function name specified" errors at runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Wire humanEffectPrefab in Gameplay scene

The HumanEffect prefab was created but never assigned to the
ProvinceBeastsController Inspector field, so human-type beasts
fell through to generic vultures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add vampire beast type and remove unused DungeonMonsters2D assets

- Add VampireEffect prefab, code mapping, scene wiring, and test entry
- Remove Bat, Ghost, GhostKnight, and four Golem variants (animations,
  characters, PSBs) that aren't mapped to any beast type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove DragonEffect component from monster effect prefabs

These were created by duplicating the dragon prefab, which left a
DragonEffect component that spawned an extra dragon alongside the
intended monsters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 20:32:09 -08:00
ce6bc0b975 Update Eagle appearance trigger for Hedrick and Sadar (#6278)
* Update Eagle appearance trigger for Hedrick and Sadar expansion

Replace Bridget (faction 4) with Hedrick (faction 5) as the tutorial
antagonist, and add a second trigger path: Sadar controlling 4+ provinces.
The Eagle now appears when either Hedrick is eliminated OR the player
faction grows strong enough to warrant attention.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Lower weak King province hero loyalty to 20

Makes the heroes in the King's weak provinces much more likely to
defect, as they barely have any loyalty to the King.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Adjust weak King province hero loyalty to 25

Loyalty 20 was causing heroes to depart too quickly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 20:00:05 -08:00
8ce0a18d09 Fix horseshoe print orientation and duel accepted animation (#6277)
Horseshoe prints were facing forward (open end leading) instead of
trailing behind the horse. Added 180° rotation for mounted units.

Duel accepted animation was never playing because DuelAccepted wasn't
matched as a result of the pending DuelChallenge command. Added it to
IsResultVariant and cached source/target grid indices in
PendingCommandSound so the animation plays even when units have been
removed from the model by later duel combat results in the same batch.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:31:18 -08:00
2befe8b67f Add tutorial-specific initial chronicle text (#6276)
* Add tutorial-specific initial chronicle text

The tutorial was using the same initial chronicle text ID as regular
games, but the text content references "The Eagle" character which
doesn't exist in the tutorial scenario. When the LLM tries to generate
a chronicle update, it looks up the previous chronicle entry's text
as a dependency, causing "Unknown dependency for LLM request" errors.

This adds a tutorial-specific chronicle text that describes the
actual tutorial scenario: Sadar Rakon defending Onmaa against
King Bregos Fyar's army led by Ikhaan Tarn.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update tutorial chronicle text wording

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 19:27:20 -08:00
76cf6f0624 Fix SupportField highlight in tutorial dialogue (#6272)
* Register SupportField dynamically for tutorial dialogue highlight

The SupportField highlight in the tutorial_rebuild_support and
tutorial_support_deadline dialogues wasn't appearing because the
static Inspector reference on TutorialTargetRegistry was not wired up.
Dynamically register the field from EagleGameController, matching the
pattern used for GoToBattleButton and CommandPanel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix Elena's reinforcement dialogue referencing Tarn incorrectly

Tarn and the King are still allies at this point, so "half of them
had already fled before Tarn's men even arrived" doesn't make sense.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Vary Ranil's siege dialogue to avoid repeating Marek's phrasing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix highlight not rendering inside layout groups

The dialogue highlight was invisible when targeting UI elements inside
a layout group (e.g. SupportField). The highlight container was being
treated as a layout child, which collapsed its rendering. Adding
LayoutElement with ignoreLayout=true makes it overlay correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Make Reset Tutorials also reset dialogue and trigger state

ResetAllProgress previously only cleared the old tutorial system's
PlayerPrefs state. Now it also clears DialogueManager's completed
script IDs and TutorialTriggerRegistry's one-shot flags, so all
narrative dialogues can replay without restarting the game.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix NRE: add RectTransform before LayoutElement

LayoutElement is a UI component that auto-creates a RectTransform,
so the subsequent AddComponent<RectTransform>() returned null.
Reorder so RectTransform is added first.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:08:47 -08:00
b0c409d62c Fix support=0 not being applied to weak King provinces (#6275)
The conditional `if po.support > 0` prevented explicitly setting
support to 0. Now support always uses the JSON value directly.
Provinces 37 and 40 already have their support values specified.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 19:01:34 -08:00
b23ee1485b Simplify tutorial battle: no attackers can flee (#6274)
Remove the special case that allowed Ikhaan Tarn to flee.
Now all units in the tutorial battle must fight to the end.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 17:37:59 -08:00
03874da321 Add Hedrick's faction to tutorial AI controllers (#6273)
When we added Hedrick as an independent faction (ID 5), we didn't
add it to the aiFids list in createTutorialGameForUser. This caused
the game to get stuck waiting for commands from a faction that had
no AI controller.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 17:30:05 -08:00
7ca5db5509 Guarantee duel acceptance in tutorial battles (#6271)
Override duel_base_accept_odds to 200 (max roll is 100) for tutorial
games so the player's first duel challenge is always accepted,
ensuring the tutorial can teach dueling mechanics reliably.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 17:07:45 -08:00
2364db42a7 Split reinforcement dialogue into per-hero events (#6268)
* Split reinforcement dialogue into per-hero events for staggered arrivals

Now that reinforcements arrive at different times (Elena round 5, Ranil
round 6), inspect the arriving unit's profession to fire hero-specific
dialogue triggers instead of one generic event for all reinforcements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Update tutorial dialogue and add capture/duel triggers

- Update Elena Fyar's reinforcement dialogue: escaped captivity in Pieska
- Update John Ranil's reinforcement dialogue: pushed through from Nikemi
- Add enemy hero captured dialogue trigger with dynamic hero name
- Add friendly hero captured dialogue with special cases for Marek/Sadar
- Prioritize duel tutorial over melee when target is not Ikhaan Tarn
- Add GetScriptForTrigger to DialogueManager for dynamic text injection
- Cache unit names for capture detection (units removed before processing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix capture detection to scan removed units instead of action type

CapturedWhileFleeing only fires for flee-based captures. Heroes also
leave the battle via duels, destruction, etc. Now scans every action
result's GameStateViewDiff.RemovedUnits for hero units in the name
cache, catching all forms of hero removal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 16:59:38 -08:00
cb1391e417 Make Ranil reinforce from Tarn's direction (#6270)
* Make Ranil reinforce from Tarn's direction

Elena continues to reinforce from position 6, but John Ranil
now enters the battle from the same starting position as Tarn
and the other attackers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Delay Ranil's arrival to round 7

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reduce Sadar's unit sizes by 10%

- Rakon's Loyalists: 511 → 460
- Onmaa Defenders: 300 → 270
- Hunters of the Steppe: 384 → 346

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 16:04:08 -08:00
d940393f3f Refactor beast effect selection for extensibility (#6269)
* Refactor beast prefab selection to switch and add extensibility doc

Replace IsDragon boolean check with GetEffectPrefab switch on beast
name string, providing a clear extension point for adding new
beast-type-specific effects. Add docs/BEAST_EFFECTS.md explaining
the architecture and step-by-step process for adding new beast types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use exact beast name matching from beasts.tsv

Switch from case-insensitive substring matching to exact string
matching on the canonical singularName from beasts.tsv. Update doc
with beasts.tsv reference and candidates for custom effects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:42:08 -08:00
6e484f14ca Add dragon beast animation on eagle map (#6267)
* Add dragon beast animation on eagle map

When a province has a dragon beast event, show an animated 2D dragon
(DungeonMonsters2D DragonRed) circling the province instead of generic
vultures. The dragon plays its Move animation while orbiting and
periodically triggers Attack with fire rain particles falling below.

- New DragonEffect.cs: instantiates animated dragon prefab, drives
  circular orbit with vertical bobbing, flips sprite to face travel
  direction, emits fire rain particle bursts on attack
- ProvinceBeastsController: extracts beast name from BeastsEvent,
  selects dragonEffectPrefab when name contains "dragon"
- Add DragonRed from DungeonMonsters2D asset pack (dragon-only files)
- Add .psb and .psb.meta to Git LFS tracking in .gitattributes
- Add 2D PSD Importer package dependency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix dragon animation and improve fire breath effect

Add com.unity.2d.animation package required for SpriteSkin bone
deformation at runtime. Rewrite fire breath as directional cone aimed
at province center using stretch render mode. Continuously enforce Move
animation state to prevent controller defaulting to Idle. Add context
menu test helpers for spawning dragon effects in editor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add animation variety and disable fire breath for now

Dragon now cycles through Move, Jump, Attack, and SpecialAttack
animations with weighted random selection. Fix IsInTransition check
so action animations play fully before returning to Move. Update
defaults to match tuned Inspector values. Disable fire breath
particle system pending direction/sizing fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 15:30:43 -08:00
e421bac79c Add Hedrick faction in Kojaria, move Bridget to Alah (#6266)
* Add Hedrick faction in Kojaria, move Bridget to Alah

- Move Bridget's faction from Kojaria (39) to Alah (18)
- Create new faction for Hedrick the Hedge-Merchant in Kojaria (39)
  with 300 light infantry, 23 support, same development as Onmaa
- Remove Hedrick from battle reinforcements (now only Elena and
  John Ranil arrive as reinforcements at rounds 6 and 7)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix reinforcement hero IDs and adjust timing

- Update TutorialReinforcementHeroIds to Set(100, 101) to match
  the two remaining reinforcement heroes (John Ranil and Elena)
- Change reinforcement timing: Elena arrives after round 5,
  John Ranil arrives after round 6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 13:40:03 -08:00
960344a9d6 Fix tutorial reinforcements all arriving at once (#6265)
ExecuteReinforcementsAction was placing ALL PENDING_REINFORCEMENT
units when any reinforcement event fired, instead of only the units
belonging to that specific event. Match pending units by eagle_hero_id
against the event's CommonUnit list so each event only activates its
own reinforcement.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 12:34:11 -08:00
5eb195188e Fix tutorial province stats not being applied from JSON (#6264)
The updateWith call was only setting gold and food, ignoring the
support, economy, agriculture, and infrastructure values from the
tutorial_parameters.json configuration. This caused Onmaa to have
default values (0 support, 20/20/20 development) instead of the
configured values (23 support, 45/41/42 development).

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 11:28:35 -08:00
454aa7edf6 Add weak King's provinces to show collapsing authority in tutorial (#6263)
Set up 12 King's provinces with single noProfession heroes, no troops,
no resources, and low loyalty to portray the realm falling apart:

- East Faluria, Regigia, Tegrot, Berkorszag, Oscasland, Wichel,
  Oriyslia, Mesh, Musland, Motcia: loyalty 50-55
- Nikemi, Pieska: loyalty ~40 (even weaker)

Also refactored the attacking army (Ikhaan Tarn's force) to be
created directly in TutorialGameCreation.scala rather than read
from JSON, since the army is already in transit when the game
starts - it's not actually stationed in Nikemi.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 11:08:01 -08:00
aa3bcbb25d Fix fear animations and sound routing (#6262)
* Add fear success and fear resisted animations

Fear success: dark cloud engulfs the target, pulses ominously, then
slowly dissipates. Fear resisted: a white flash at the target deflects
the wave back toward the source where it shrinks and fades.

Split Fear into three animation types (Fear attempt, FearSuccess,
FearResisted) so the server result triggers a distinct visual. The
pending command handler now also plays result animations, not just
sounds. Rename IsFailureVariant to IsResultVariant to handle both
success and failure result matching.

Add test buttons for Fear Success and Fear Resisted in the animation
test controller.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor test controller to use real sound+animation flow and fix fear attempt sound

Route most animation tests through TestPlayAnimationAndSound to exercise
the real two-stage sound pipeline. Consolidate duplicate PlayAnimation
methods and remove ?? fear fallback that caused double-play.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix fear sound routing and remove test debug logging

Add FearSuccess/FearResisted to ActionTypeForSound so they play the
correct result sounds. Pass isOwnCommand=true in test path so Fear
exercises the two-stage attempt sound.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Improve fear success and fear resisted animations

Fear success: tendrils start 2x farther out with ease-in spiral, add
ghost skull at 40% opacity filling the hex. Fear resisted: shield sprite
pops up and bashes the skull back toward the source with spin and flash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 07:33:33 -08:00
05c1a49645 Balance tutorial battle difficulty and Onmaa resources (#6261)
- Cut defending unit sizes by 25% (681→511, 400→300, 512→384)
- Cut reinforcement unit sizes by 25% with battle-worn variation
  (450→443, 375→382, 450→446)
- Double food in Onmaa (2000→4000) to support larger army
- Set Onmaa development stats: 45 economy, 41 agriculture, 42 infrastructure

Reinforcements already arrive one at a time (rounds 5, 6, 7).

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 06:58:47 -08:00
665a4f1e04 Fix tutorial HeroGenerator crash when spawning unaffiliated heroes (#6260)
Tutorial game creation was passing an empty pregeneratedHeroes pool to
HeroGenerator, causing a crash when PerformUnaffiliatedHeroesAction
tried to spawn new heroes in provinces (e.g., when building support in
Onmaa).

Changed to use GameParametersUtils.pregeneratedOthers as the pool,
excluding hero names already used in the tutorial to avoid duplicates.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 06:40:07 -08:00
8fe0779422 Add duel challenge/declined animations and programmatic test buttons (#6259)
* Add duel animations and programmatic test buttons

Add gauntlet throw animation for duel challenges (arcing projectile with
dust landing effect) and duel declined animation (dismissive sword sweep).
Wire duel challenge as a two-stage sound so the challenge clip plays on
command and accepted/declined plays on server response.

Refactor AnimationTestController to generate buttons programmatically
from a prefab instead of requiring manual wiring per animation. Remove
redundant private animator fields in favor of direct gameController
access.

Remove black background from Iron-Etched-Gloves sprite for use as the
gauntlet throw projectile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Make gauntlet throw more aggressive and play sound at impact

Change gauntlet animation from a gentle arc to a violent downward slam
from above the source hex to the lower half of the target hex with
cubic ease-in for an accelerating impact feel.

Move challenge sound into the animator so it plays at impact rather
than when the command is issued. The two-stage system still tracks the
pending command for the accepted/declined result sound.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:30:34 -08:00
1456276710 Allow manual workflow_dispatch to deploy Unity builds (#6258)
Change deploy conditions from event_name == 'push' to
event_name != 'pull_request', matching the pattern already used by
the Upload Addressables step. This allows workflow_dispatch to
trigger a full deploy, which is needed for re-deploying without
a code change.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:12:54 -08:00
8ed3a168dc Replace gh CLI with curl in installer artifact cleanup (#6257)
The self-hosted runner doesn't have gh installed. Use curl + GitHub
REST API directly instead.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 21:12:20 -08:00
6f03ef86f0 Migrate client update system to SHA-addressed blob storage (#6253)
* Migrate client update system to SHA-addressed blob storage

Upload game files and installer to blobs/<sha256> with immutable cache
headers, serve manifests with Cache-Control: no-cache so CDN always
revalidates. This eliminates the need for CDN cache purges after builds.

During the transition period, files are also uploaded to their legacy
paths (unity3d/win/<path> and installer/Eagle0.exe) so existing
installers continue to work until users auto-update.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add blob cleanup workflow and fix installer manifest URL

- Add daily scheduled GitHub Action to garbage-collect unreferenced blobs
- Fix installer_build.yml manifest step to use blobs/<sha> URL instead
  of the legacy installer/Eagle0.exe path
- Add installer_sha256 to manifest for blob cleanup tool

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert installer blob changes — installer staleness is benign

The installer self-updates on next launch, so CDN staleness for
installer/Eagle0.exe is harmless. Keep blob addressing only for
game files where manifest/file mismatch causes download failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use manifest comparison instead of HEAD requests for blob dedup

Fetch the previous manifest to determine which SHAs already exist as
blobs, avoiding N HEAD requests per build. Also only upload to legacy
unity3d/win/ paths when the file at that path actually changed, matching
the old behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove legacy unity3d/win/ uploads — installer self-updates first

Old installers fetch the manifest, see a new installer version, and
self-update before downloading game files. The new installer fetches
from blobs/<sha>, so there's no need to keep uploading to the legacy
unity3d/win/<path> paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Set no-cache on installer and whats-new.json uploads

Both are mutable files at fixed CDN URLs that were relying on default
cache behavior. Setting no-cache ensures the CDN always revalidates,
so users get the latest installer on first download and see current
changelog entries immediately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:50:14 -08:00
d71ad680c5 Add Scala tests for TutorialStrategicEvents (#6256)
Add unit tests for the Eagle strategic tutorial event system:

- Game type tests: verify only Tutorial games trigger events
- Eagle appearance negative cases: events don't fire when:
  - Bridget still has provinces
  - Eagle faction already exists
- Idempotence tests: verify no re-trigger after Eagle appears

Also updates visibility in BUILD files to allow test access.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 13:51:04 -08:00
a4c8c0670e Add comprehensive tests for TutorialBattleController (#6255)
Add C++ unit tests for the Shardok tutorial battle event system:

- RoundTrigger tests: fires at/after trigger round, multiple events
- UnitsLostTrigger tests: threshold, counts statuses, player filtering
- DamageTakenTrigger tests: threshold, sum across units, initial_sizes
- UnitKilledTrigger tests: by unit_id, by eagle_hero_id
- ReinforcementsAction tests: activates pending units, places directly
- FleeAction tests: generates results, specific units, by hero_id
- Fire-once semantics tests: events don't re-fire
- Controller state tests: disabled controller, default constructor

28 total tests covering all trigger types and action execution.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 13:50:42 -08:00
8f219f1f56 Add unit tests for TutorialBattleConfig generation (#6254)
Tests verify the tutorial config structure including:
- 3 reinforcement events with correct IDs
- Round triggers at 5, 6, 7 for Hedrick, Elena, John Ranil
- Correct hero IDs in reinforcement units
- Tarn visibility configured for defender
- Reinforcement heroes and battalions in game state

Also fixes :engine BUILD target to export game_history and
battle_resolution which appear in the Engine interface.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 13:14:02 -08:00
8ce2adfca9 Remove dead battalion backstory update code (#6252)
Battalion backstory updates were never generated - only initial backstories
are created. This removes the unused code:

- BattalionBackstoryUpdateAction.scala
- BattalionBackstoryUpdatePromptGenerator.scala
- BattalionBackstoryUpdateRequest from LlmRequestT sealed trait
- BattalionBackstoryUpdateRequest proto message (field 41 reserved)
- Related cases in LlmResolver and proto converter

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 09:09:39 -08:00
e2bc6df62e Extend unaffiliated hero backstory visibility to new province owner (#6251)
When a province is conquered, the new owner can now see the backstory
text of unaffiliated heroes in that province. This matches the behavior
of PerformReconResolutionAction which extends backstory visibility for
ruling heroes to the faction performing recon.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 07:06:12 -08:00
dc5d342b17 Read What's New data from S3 instead of CDN URL (#6250)
The admin server was fetching whats-new.json from the public CDN URL
(assets.eagle0.net) which caches aggressively. After adding an entry,
the page reload would fetch the stale cached version, making it look
like the entry wasn't saved. Read directly from S3 so the admin server
sees its own writes immediately.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:02:46 -08:00
b0ba44c4d5 Add tutorial dialogue when January taxes are collected (#6241)
Detect NewRoundAction with month=1 after the tutorial battle has ended.
Old Marek explains what taxes provide (gold and food) and advises on
how to spend them wisely.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:49:51 -08:00
d3c3df7772 Replace GraphQL branch creation with plain REST API (#6249)
The GraphQL layer was a workaround for a token permissions issue that
has since been fixed. The REST /git/refs endpoint works correctly with
fine-grained PATs when contents:write is properly configured. This
removes ~90 lines of GraphQL code.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:48:40 -08:00
fb2fcf4497 Replace shift-click and Melee button with right-click to melee attack (#6246)
Right-click (or long-press on mobile) is a well-known RTS convention that
eliminates confusion from having two melee input methods. Left-click remains
the default action (move/archery); right-click triggers melee on adjacent
enemies.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 06:46:49 -08:00
7804d6e160 Add tutorial dialogue for expansion guidance (#6242)
When the player has a stable province (40+ support) but only one province,
Old Marek suggests using March to expand to a neighboring province and
explains the sworn sibling/Warlord control mechanic.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:59:28 -08:00
8836c8f65a Add tutorial dialogue for The Eagle's appearance (#6240)
When the TUTORIAL_FACTION_APPEARS action result fires, Old Marek warns
the player about the Fracture Covenant seizing Ingia and Soria, and
introduces The Eagle as a mysterious new threat.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:58:00 -08:00
21891c2627 Use GraphQL API for branch creation in map editor PR flow (#6244)
The REST /git/refs endpoint returns 403 with fine-grained PATs even
when contents:write is granted. Switch to the GraphQL createRef
mutation which handles the same permission correctly.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 06:42:34 -08:00
18c4c08583 Replace low-bravery tutorial heroes with high-bravery ones (#6239)
Marty McPolitics (BRV 8) and Aldric the Overlooked (BRV 14) would
decline duel challenges in the tutorial, frustrating players trying
to learn dueling mechanics. Replace them with Luke the Prank-tricker
(BRV 100) and Lucia, Queen of the Marshes (BRV 100) from
generated_heroes.tsv. Both are noProfession and would still lose
to Sadar Rakon.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 06:29:25 -08:00
d1eb51f83d Fix stuck BattleAftermath when Tarn removed with other captured heroes (#6238)
When the player wins the tutorial battle, multiple enemy heroes can be
captured (Tarn, Edgtheow, Julius, McPolitics). Only the first captured
hero gets a messageId via CapturedHeroPleaGenerator.

When TutorialTarnDisappearsAction removes Tarn (who was first and had
the only messageId), the remaining captured heroes have no messageId.
This causes BattleAftermath to be stuck:
- capturedHeroes.nonEmpty = true (others remain)
- hasAvailablePlayerCommands = false (no messageId means no commands)

Fix by generating a plea for the next captured hero when Tarn is
removed, ensuring BattleAftermath has valid commands to show.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 22:20:45 -08:00
1cde547501 Pace combat tutorials to show one at a time (#6236)
* Pace combat tutorials to show one at a time with action between each

Archery, melee, charge, and duel tutorials now fire one at a time during
tactical combat. After a tutorial fires, the next one waits until a battle
action occurs (by either player) before showing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Defer battle-running dialogue to player's first turn and pace start fire

- Move shardok_battle_running trigger from setup→running transition to
  the player's first turn in running state, so the dialogue appears when
  the player can act rather than during the enemy's opening move
- Update dialogue text: "The enemy is drawing near" instead of "Now the
  real fight begins"
- Add start_fire_available to the paced combat tutorial set with lowest
  priority

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:46:39 -08:00
fc47f21f33 Space out tutorial reinforcement arrivals across rounds (#6237)
Instead of all three reinforcement heroes arriving at round 5,
they now arrive one at a time:
- Round 5: Hedrick the Hedge-Merchant (longbowmen)
- Round 6: Elena Fyar (heavy infantry)
- Round 7: John Ranil (heavy cavalry)

This gives the player time to position each new unit strategically
as they arrive.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 18:46:27 -08:00
113b6eb564 Fix tutorial attackers fleeing: only Tarn should be able to flee (#6235)
The TarnNameTextId was hardcoded as "hero_name_ikhaan_tarn" but hero
nameTextIds are generated using MurmurHash3 (e.g., "fhn_d331492f").
This caused the hero lookup to fail, making canFleeHeroIds empty.
When canFleeHeroIds is empty, the fallback logic allows ALL units
with fleeProvinceId set to flee.

Fix by using LoadedHero.nameTextId("Ikhaan Tarn") to generate the
correct hash-based ID, so only Tarn can flee as intended.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 18:37:58 -08:00
ff650fb82e Persist Battle button highlight after dialogue is dismissed (#6234)
Add persistHighlight field to DialogueStep. When the final step of a
dialogue has this set, the highlight stays visible after the panel is
dismissed. It clears when the next dialogue trigger fires (e.g. the
player enters the battle) or when a new dialogue starts.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:23:07 -08:00
3731a2886e Add "Create PR" button to map editor (#6233)
Allows map editor changes to be submitted as GitHub PRs directly from
the admin UI. Uses the GitHub REST API with a fine-grained PAT (stored
as ADMIN_GITHUB_TOKEN secret) to create a branch, commit the map file,
and open a PR -- no git credentials needed on the admin server.

The button only appears when GITHUB_TOKEN is set. The flow saves the
map first, then creates the PR, showing a clickable link to the result.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:21:00 -08:00
2a2cd37fbe Add proper names to tutorial battalions and set Onmaa support (#6232)
- Rename Sadar's battalions from generic type names to:
  - "Rakon's Loyalists" (Light Infantry)
  - "Onmaa Defenders" (Light Infantry)
  - "Hunters of the Steppe" (Longbowmen)
- Add names to reinforcement battalions:
  - "Hedrick's Bowmen" (Longbowmen)
  - "Ranil's Riders" (Heavy Cavalry)
  - "Fyar's Vanguard" (Heavy Infantry)
- Set Onmaa's starting support to 23

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 17:11:26 -08:00
97b9a293ab Add initial visibility support for tutorial battles (#6231)
Add ability to specify that certain units should be visible to specific
players from the start of a battle. Used in the tutorial to make Tarn's
unit visible to the player so they can see where he is positioned.

Changes:
- Add visible_to_player_ids field to CommonUnit proto
- Add InitialUnitVisibility message to TutorialBattleConfig proto
- Apply initial visibility in ShardokGamesManager when setting up units
- Set Tarn's unit visible to defender in tutorial config

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 17:01:32 -08:00
47ab61d0ab Add post-battle tutorial dialogues (#6227)
* Plan post-battle tutorial dialogue in docs

Document two narrative dialogues for after the first tutorial battle:
1. Battle Aftermath - Marek on the close call, Tarn's disappearance,
   and recruiting captured lieutenants
2. Rebuild Support - Marek explains Improve and Give Alms to raise
   province support before January taxes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Implement post-battle tutorial dialogues and triggers

Add two narrative dialogues after the tutorial battle:
- Battle aftermath: Marek on Tarn's disappearance and captured lieutenants
- Rebuild support: Marek guides player to use Improve and Give Alms

Trigger detection uses lifecycle flags to ensure correct ordering:
tutorial_battle_ended fires when battle is removed and commands arrive,
tutorial_rebuild_support fires after captured heroes phase completes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix rebuild dialogue: any hero can improve/alms, need 40 for taxes

Engineers and paladins are more effective, not the only ones who can
do it. Support threshold of 40 is required to collect taxes at all,
not just for higher revenue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Highlight SupportField and refine tax instruction text

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add loyalty warning and support deadline tutorial triggers

- November loyalty warning: Marek warns about heroes with <70 loyalty,
  highlights the loyalty label, instructs to use Give Gold or Feast
- December support deadline: Marek urges the player to have Elena give
  alms immediately if support is still below 40
- Register first vassal's loyalty label as LoyaltyLabel highlight target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Drop 'closer than I'd like to admit' from post-battle dialogue

Marek wouldn't admit it was close — he thought it was hopeless.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use default panel position for strategic dialogues, top for combat

Hard-code panel position based on context: if a Shardok model is active,
use "top" (combat); otherwise use default position (strategic map).
Remove panelPosition overrides from strategic dialogue JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 17:00:11 -08:00
19ce34eae4 Change tutorial start date to May 371 (#6230)
Add a separate tutorialStartDate constant so the tutorial starts in May
while regular games continue to start in August.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 16:44:03 -08:00
03114b8c98 Fix tutorial province food/gold and reinforcement loyalty (#6229)
The updateWith() call in TutorialGameCreation was missing the gold and
food parameters from the tutorial config, causing all provinces to start
with default values (0) and immediately trigger starvation.

Also set reinforcement heroes to start with 80 loyalty.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 16:40:35 -08:00
22d4cb755f Replace inappropriate Talismangobbler headshot (#6228)
The AI-generated headshot for The Talismangobbler was too revealing.
Regenerated with a more appropriate image and uploaded to DigitalOcean
Spaces.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:24:22 -08:00
473d1c36fb Replace Silvio with Marty McPolitics in tutorial enemy army (#6226)
Silvio the Smooth (strength 92) was too strong a lieutenant. Marty McPolitics
(strength 24, bravery 8) is a political opportunist who "is no good in a fight"
- Sadar Rakon would clearly defeat him in a duel.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 16:12:12 -08:00
9c06af6963 Warn before navigating away from unsaved map editor changes (#6225)
The beforeunload handler wasn't reliably showing a dialog in all
browsers. Add a click listener that intercepts link navigation with
a confirm() dialog when there are unsaved changes.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 15:54:20 -08:00
9c7c6b5c03 Increase Sadar Rakon's starting battalion size and armament (#6224)
Set Sadar Rakon's first Light Infantry battalion to size 681 (up from 381)
and armament 75 (up from 60) for a stronger starting force in the tutorial.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 14:46:46 -08:00
545433342c Make Ikhaan Tarn disappear after tutorial battle (#6222)
After the tutorial battle resolves, Tarn will either have fled (returning
to Nikemi) or been captured. This creates a TutorialTarnDisappearsAction
that:
- Removes Tarn from captured heroes list if captured
- Removes Tarn from incoming army to Nikemi if fled
- Clears Tarn's faction ID
- Removes Tarn from King's Loyalists leaders list

He remains in the main heroes list but is effectively disappeared.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 14:44:23 -08:00
a534b363be Allow "tarn" user to access tutorial button in lobby (#6223)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:39:51 -08:00
312d7f0852 Add tutorial triggers for duel, engineer bombard, and hide (#6220)
* Add tutorial triggers for duel, engineer bombard, and hide

- Duel: fires when ChallengeDuelCommand is available; Marek warns
  against dueling Tarn but encourages challenging his lieutenants
- Engineer bombard: fires when John Ranil is within 3 hexes of an
  enemy; Ranil explains fortify + reduce workflow
- Hide: fires when Hedrick has HideCommand available; Hedrick
  describes slipping into cover

Adds TMP sprite assets for Duel, Fortify, and Hide icons with
fallback chain in dragoons.asset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix duel tutorial: only champions can duel, loser may be captured

- Marek addresses Sadar directly (you can challenge, not "one of our heroes")
- Instructions clarify that Champions issue duels, target can't be in a castle
- Loser may be captured (not slain), evenly matched duelists may be inconclusive

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:35:44 -08:00
7f873732ca Simplify unit type list to icons and names only (#6221)
Remove verbose descriptions from the unit type instruction panel.
The icons and names are self-explanatory — players don't need to be
told that cavalry are fast or that heavy infantry are slow.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:33:01 -08:00
9e797d73b8 Fix tile image vertical positioning in map editor (#6218)
The tile images are isometric with the hex face compressed to roughly
half the image width in height. The old formula (sqrt(3)*width/2 = 222px)
assumed a non-isometric flat-top hex, but the actual hex face is only
~128px tall. This caused the source crop to include transparent space
above and 3D depth below, making tiles appear shifted down with white
gaps at the top of each hex.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:32:43 -08:00
87e7def2fb Add setup-node step for JS syntax check in CI (#6219)
The self-hosted runner doesn't have Node.js in PATH, causing the
node --check step to fail with 'command not found'.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:25:31 -08:00
7b71ff309e Only allow Ikhaan Tarn to flee in tutorial battle (#6217)
Add canFleeHeroIds field to ShardokBattle that overrides the army-level
fleeProvinceId logic. When this set is non-empty, only heroes in the
set can flee.

For the tutorial:
- Set canFleeHeroIds to only contain Tarn's hero ID
- Set reinforcement units to canFlee = false

This ensures all units except Tarn are locked into the tutorial battle.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 14:19:21 -08:00
3da0688310 Only trigger charge tutorial when Old Marek can charge (#6215)
The charge tutorial previously fired for any unit with a charge
destination. Now it only fires when Old Marek the Learned himself
can charge, and the dialogue has him volunteering to lead the charge.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:10:22 -08:00
33be85fdc5 Add JS syntax checking to CI and merge conflict pre-commit hook (#6216)
A git conflict marker was accidentally left in map_editor.js after a
rebase merge, breaking the map editor in production. This adds two
safeguards:

- CI lint job: `node --check` to catch JS syntax errors
- Pre-commit: `check-merge-conflict` hook to catch conflict markers

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 14:07:09 -08:00
e7d76d99b7 Add surviving reinforcement units to province after battle (#6213)
When defending reinforcement units (from tutorial) survive a battle,
add them to the defending province's rulingFactionHeroIds and
battalionIds. Previously, these units existed in the game state but
were never assigned to a province after the battle ended.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 14:01:14 -08:00
d4089ae399 Remove stray git conflict marker from map_editor.js (#6214)
A rebase conflict marker was accidentally left in the file, causing
a JavaScript syntax error that broke the map editor entirely.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:59:22 -08:00
15955ff139 Fix race conditions in reinforcement hero headshot resolution (#6210)
* Fix race conditions in reinforcement hero headshot resolution

Two race conditions prevented headshots from showing for mid-battle
reinforcement heroes:

1. The eagle NewHeroes update and Shardok ChangedReserveUnits update
   arrive as separate messages with no guaranteed ordering. If the
   Shardok update arrives first, units are created with null headshot
   and name data.

2. Streaming hero name text may not have arrived in ClientTextProvider
   when the dialogue fires, so name-based matching fails.

Fix: propagate NewHeroes from the eagle model to all running
ShardokGameModels (backfilling any units created with missing data),
and retry headshot resolution each frame in DialogueManager until it
succeeds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use case-insensitive name matching and model display names for dialogue

Replace ResolveHeadshotPath with ResolveSpeaker that:
- Uses case-insensitive name matching (fixes "Hedge-Merchant" vs
  "Hedge-merchant" mismatch for Hedrick)
- Returns both the headshot path AND the display name from the model,
  so the dialogue shows the canonical hero name from the game data

Remove the per-frame retry mechanism — reinforcement heroes are in the
eagle game state from the start, so there is no race condition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove unnecessary RegisterNewHeroes propagation

Reinforcement heroes are in the eagle game state from tutorial
creation, so they're already in the ShardokGameModel's dictionaries
when the battle starts. No need to propagate them later.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:58:49 -08:00
fed04aec7c Scale tile images to fill pointy-top hex height (#6212)
The tile images contain flat-top hexes (height = sqrt(3)/2 * width),
but our grid uses pointy-top hexes (height = 2/sqrt(3) * width) which
are ~15% taller for the same width. Scale based on the flat-top hex
height within the source image so the hex content fills the full
canvas hex vertically. Excess width is clipped.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:49:13 -08:00
625155a6c6 Scale tile images to fill pointy-top hex height (#6211)
The tile images contain flat-top hexes (height = sqrt(3)/2 * width),
but our grid uses pointy-top hexes (height = 2/sqrt(3) * width) which
are ~15% taller for the same width. Scale based on the flat-top hex
height within the source image so the hex content fills the full
canvas hex vertically. Excess width is clipped.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:40:12 -08:00
68a6037cc6 Add light cavalry to Ikhaan Tarn's tutorial army (#6206)
Add Silvio the Smooth as a 5th hero in province 31 (before Aldric who
stays behind), and add a light cavalry battalion (size 450) to the
attacking force.

Also give the battalions proper names:
- Doomriders (heavy cavalry)
- The Shardok's Guard (heavy infantry)
- Bowmen of Nikemi (longbowmen)
- Swift Sabres (light cavalry)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 13:31:54 -08:00
b186c059f4 Fix tile image vertical centering in map editor (#6209)
Center the tile image on the hex center (center.y - dh/2) instead of
aligning the image top with the hex top vertex (center.y - HEX_SIZE).
The scaled image is taller than the hex and the hex clip handles
cropping the excess.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:17:47 -08:00
be275a5aaf Revise tutorial dialogue: Tarn characterization, dragoons, reinforcement intros (#6207)
- Remove "cruelty" and "madman" from Tarn description; replace with
  erratic/paranoid/inscrutable behavior (he's not evil, just alarming)
- Add dragoons to Marek's unit rundown and instruction panel
- Rewrite reinforcement hero intros to reference backstories and the
  strategic situation rather than self-introductions of abilities

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:15:04 -08:00
9977fc965a Fix reinforcement hero headshots and make bridge scale configurable (#6205)
Reinforcement heroes (e.g. John Ranil) arrived mid-battle with no
headshot or name because ShardokGameModel's hero dictionaries were
only populated at battle creation. Add a fallback lookup to the eagle
model's Heroes collection so mid-battle heroes resolve correctly.

Also extract the hardcoded bridge scale (15) to an Inspector field on
HexGrid, defaulting to 22.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 13:02:58 -08:00
3076a6727e Add tutorial reinforcement heroes/battalions to Eagle game state (#6203)
Tutorial reinforcement heroes (IDs 100, 101, 102) were being created as
CommonUnit objects for Shardok but never added to Eagle's GameState. This
caused a NoSuchElementException when ResolveBattleAction tried to look up
these heroes after the battle resolved.

The fix adds the reinforcement heroes and battalions to the game state
during tutorial game creation:
- Create HeroC objects from LoadedHero data with specific IDs (100-102)
- Create BattalionC objects with matching IDs
- Add both to the actionResult's newHeroes and newBattalions

The heroes are assigned to the player faction but not to any province,
representing "off-map" reinforcements that will appear during battle.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 13:02:41 -08:00
d89f2c8894 Fix map editor hex geometry, image positioning, and castle tiles (#6204)
Three fixes:

1. Hex overlap: The hexCenter/pointInHex formulas used flat-top spacing
   (col * 1.5 * s, row * sqrt(3) * s) for a pointy-top hex layout.
   Swap to correct pointy-top formulas (col * sqrt(3) * s, row * 1.5 * s).

2. Image vertical offset: Tile images (256x384) have hex art in the
   upper portion with depth effect below. Align image top with hex top
   instead of centering, so the hex art matches the clip region.

3. Castles: Render the castle tile image (hexPlainsCastle00.png) when a
   tile has a castle modifier, matching how Shardok renders castles.
   Remove the brown box overlay for castles.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:44:40 -08:00
0a7f0e4ad5 Add tutorial reinforcements dialogue with dynamic headshots (#6168)
* Add tutorial reinforcements dialogue with dynamic headshot resolution

When reinforcements arrive in the tutorial battle, Marek introduces three
allied heroes (Ranil/Engineer, Fyar/Paladin, Hedrick/Ranger) who each
explain their profession abilities. Hero headshots are resolved at display
time from the ShardokGameModel, the same way UnitInfoPanelController does
it, rather than hardcoding image paths in the dialogue JSON.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix dialogue queuing, charge trigger timing, and start fire condition (#6170)

- Queue dialogue triggers when another dialogue is active so they play
  after the current one ends (fixes reinforcements being dropped when
  thunderstorm dialogue was showing)
- Trigger charge tutorial when a move command has a charge follow-up,
  not when the charge command itself is available (too late)
- Require EnemyHostility for start fire tutorial, not just non-self

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 11:26:38 -08:00
613cf529bc Rename Fluria to East Faluria and Faluria to West Faluria (#6201)
* Add documentation for renaming a province

Documents the files that need to be modified when renaming a province
and explains how province names flow from the server to the client.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Rename Fluria to East Faluria and Faluria to West Faluria

Updated all province name references:
- province_map.tsv: Both province rows and all neighbor references
- MapDescription.scala: LLM prompt geography description
- centroids.json: Client map rendering metadata
- RuntimeValidatorTest.scala: Test strings
- Renamed hex map files: Fluria.e0mj -> East_Faluria.e0mj,
  Faluria.e0mj -> West_Faluria.e0mj

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-22 11:23:54 -08:00
ca38c1df3a Use context-appropriate highlight colors for province borders (#6202)
- Override (faction hover/notification): always black — visible against
  any faction color
- Targeted (right-click): deep purple-red — distinct from red faction
- Selected (left-click): luminance-adaptive — dark factions get white
  highlight, bright factions get black

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:25:46 -08:00
13777a1e83 Skip same-faction borders during faction highlighting (#6200)
When hovering a faction in the Factions table or viewing a faction
notification, borders between provinces of the same faction are now
suppressed so the faction's territory appears as one contiguous
highlighted region.

Adds a cross-province ID map (computed once at startup alongside the
distance map) that stores which province is on the other side of each
pixel's nearest border, plus a 256x1 highlight group lookup texture
that the shader checks to skip highlight borders between same-group
provinces.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:09:28 -08:00
782dc2135a Fetch LFS tile images before admin server Docker build (#6199)
The tile PNGs in static/tiles/ are LFS-tracked but the Docker build
workflow checks out with lfs: false, embedding LFS pointer files
instead of actual images. Add a targeted git lfs pull for just the
admin server tile images (~736KB) before the Bazel build.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 08:05:25 -08:00
a23ba79190 Fix LLM provider selection to prefer primary provider (#6198)
The selectCaller method was load-balancing across all available LLM
providers by selecting whichever caller had the fewest in-flight
requests. This caused requests to be distributed roughly evenly across
Gemini, Claude, and OpenAI instead of preferring the primary provider
(Gemini) and only falling back on capacity limits.

Now selectCaller first tries to find a caller from the primary provider
with available capacity, and only falls back to other providers when the
primary has no capacity.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-21 21:45:05 -08:00
a1dcb8e932 Make province borders resolution-independent (#6196)
* Make province borders resolution-independent using fwidth()

Use screen-space UV derivatives to compute texel-to-pixel ratio in the
shader, so border widths specified in screen pixels remain visually
consistent regardless of render resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Reduce default border width from 0.7 to 0.5 screen pixels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 21:41:56 -08:00
328fa44bf4 Fix static file embedding to include subdirectories (#6197)
The go:embed directive used `static/*` which only matches direct
children. Change to `all:static` so subdirectories like `static/tiles/`
are included in the binary.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 21:33:44 -08:00
4f0ecf66c6 Use hex tile images in map editor instead of flat colors (#6195)
Copy representative PNG tile images from the Unity assets into the admin
server static directory and render them clipped to hex shapes on the
canvas. Falls back to flat CSS colors if an image fails to load.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 21:23:02 -08:00
9a014b38c4 Tweak strategic map UI layout and border width (#6194)
Update province border width from 0.35 to 0.7 and adjust UI element
positioning in the Gameplay scene.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:17:59 -08:00
f6ed3d2bee Merge disconnected Parnia blob into Ingia (#6193)
Reassign 1,242 pixels from a small disconnected blob of Parnia (pid 41)
in the southwest to Ingia (pid 32), which surrounds it.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:12:39 -08:00
d92d37ea68 Hand-tune province label positions (#6192)
* Hand-tune province label positions for border-adjacent provinces

Manual adjustments on top of the algorithmic positioning for provinces
where labels were too close to borders:
- Berkorszag: +30px right
- Kezonoria: +20px right, +5px up
- Grytrand: +15px right
- Oscasland: +20px up
- Oryslia: 10px left
- Pozia: 5px up
- Chia: 5px right

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Further tweak Kezonoria and Pozia label positions

Kezonoria: +25px up total, Pozia: +15px up total (increasing y = up in
Unity's coordinate system).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 18:11:41 -08:00
f5ed0de040 Improve label positioning with clearance-threshold algorithm (#6187) (#6191)
Replace Gaussian-weighted blend with simpler, more predictable approach:
find all pixels with >= 70% of max possible edge clearance, then pick the
one closest to the geometric centroid. This keeps labels well inside province
boundaries while staying visually centered. Most labels barely move from
their current positions; labels near narrow borders (Kezonoria, Grytrand)
get nudged further inside.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:56:28 -08:00
8ff56d7d28 Enable map editor in production admin server deployment (#6190)
Add .e0mj map files as a layer in the admin server Docker image
and pass --maps-dir=/app/maps to enable the web-based map editor
added in #6186.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:53:20 -08:00
66e8f2f605 Delete orphaned .e0s battle files on game rewind (#6189)
When a game is rewound past a battle, truncateTo() cleared in-memory
shardokHistory but left .e0s files on disk. On restart, these orphaned
files got lazy-loaded when the game state still referenced the battle,
causing Eagle to re-send stale battle data to Shardok.

This caused a production crash loop where Eagle kept sending an old
Motcia battle (with pre-fix map data baked into the .e0s file) on
every restart, even after the map fix was deployed.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 17:53:03 -08:00
9c557873c4 Fix province label positions using pole-of-inaccessibility algorithm (#6188)
Replace geometric centroid (mean of pixels) with a distance-transform-based
approach that finds the point inside each province maximally distant from
edges, weighted by proximity to the visual center. This fixes labels that
bled into neighboring provinces or extended over water (Berkorszag, Chia,
Pozia).

Also adds --update-centroids mode to generate_map.py for re-running label
positioning without losing hand-tuned styling fields.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 14:16:17 -08:00
ee8dfba000 Add "Restart Eagle" button to admin console (#6187)
Uses Docker Engine API over mounted Unix socket to restart the active
Eagle container directly from the admin UI. Includes confirmation dialog
and graceful degradation when Docker socket is unavailable.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:41:22 -08:00
98b456d760 Add web-based map editor to admin console (#6186)
Replaces the Unity-based Shardok map editor with a browser-based editor
in the admin console. Supports terrain painting, modifiers (castle/bridge),
starting positions, weather config, undo/redo, and file download.

Enabled via --maps-dir flag pointing to the .e0mj directory.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:39:17 -08:00
413df8bdff Add eagle-restart script for quick active instance restart (#6185)
Useful when Eagle needs to reload game state from persistence
(e.g., after a rewind) without a full blue-green deployment.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 13:21:09 -08:00
c1463ca9c5 Add CI test for attacker/defender starting position overlap (#6184)
Validates that no map has attacker starting positions that overlap
with defender starting positions. This overlap causes the AI's
GameStateGuesser to misplace guessed defender units, leading to
command count mismatches during SET_UP.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 10:27:27 -08:00
d4572c2108 Fix attacker/defender starting position overlap on Motcia map (#6183)
Motcia's attacker starting position index 0 had 7 of 10 positions
overlapping with defender starting positions. This caused the AI's
GameStateGuesser to place a guessed defender unit on an attacker
starting position during SET_UP, blocking it and creating a command
count mismatch (27 vs 30) that crashed the server in a loop.

Moved attacker index 0 positions east into the plains (columns 3-5)
away from the defender's castle compound at (1,0)/(2,0)/(2,1).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 08:36:50 -08:00
223e059e72 Add detailed coords and occupant logging to AI command mismatch diagnostic (#6182)
The guessed state produces 27 PLACE_UNIT_COMMANDs vs 30 real during SET_UP.
This adds target coordinates to the command dump, identifies the specific
missing positions per unit, checks what the guessed state thinks is occupying
them, and dumps all guessed state units for full visibility.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:27:51 -08:00
5077981d41 Replace AI command count assert with diagnostic error logging (#6181)
The assert at ShardokAIClient.cpp:174 was crashing the server with
no diagnostic info when guessed and real command counts diverged.
Now logs both counts, player, round, and a side-by-side dump of
each command (type + actor unit) before throwing an exception that
the server can catch and recover from.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 21:09:16 -08:00
f352d7aca8 Fix duplicate heroes by threading HeroGenerator through game creation (#6180)
The HeroGenerator was being passed to EngineImpl before heroes were
consumed from it during game creation. The randomHeroes() method
consumed heroes from the generator pool but then discarded the updated
generator with .map(_._1). This meant the engine started with a
generator that still contained heroes that had already been spawned.

When new heroes spawned during gameplay, they would duplicate the
heroes already in the game.

Fix: Thread the updated HeroGenerator through the game creation flow
and pass the final generator (after all initial heroes are consumed)
to createEngine().

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 20:27:50 -08:00
c85ce61bef Remove users from lobby when entering a game (#6179)
When a user enters a game via StreamGameRequest, they were remaining in
the lobbyUsers map, causing unnecessary lobby updates to be broadcast to
them and triggering repeated disk reads of games.e0es. Now users are
removed from the lobby when they start streaming a game. They are re-added
when they send EnterLobbyRequest upon returning to the lobby screen.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 20:02:21 -08:00
1ccd5784ee Fix tutorial reinforcement hero ID verification (#6171)
* Change tutorial reinforcements to appear after round 5

Adjusts timing for better tutorial pacing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix tutorial reinforcement hero ID verification

When tutorial reinforcements cause a battle to end, the verification in
ResolveBattleAction was failing because it expected only the originally
sent hero IDs but received the reinforcement hero IDs (100, 101, 102) as
well. This adds reinforcementHeroIds to ShardokBattle and includes them
in the expected heroes set during verification.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 19:46:35 -08:00
5814fb31e5 Tint province background during blizzard (#6178)
Apply a subtle cool blue-gray tint to province colors when a blizzard
event is active, so white snowflakes are visible on light provinces.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:43:09 -08:00
ddfd735e15 Triple blizzard intensity on Eagle strategic map (#6177)
Increase snowEmitRate from 15 to 45 (3x) in both the prefab and code
default, and raise maxParticles from 300 to 900 to accommodate the
higher emission rate.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:42:54 -08:00
d9506fc0a0 Double default province border width from 0.35 to 0.7 (#6176)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:12:27 -08:00
1f0da81ed3 Fix reinforce command crash and broken overlay (#6175)
When clicking a reserve unit during combat, _selectedGridIndex was
cleared unconditionally, losing track of which hex unit is the actor
for the Reinforce command. Now only clear the selection during setup
phase. Also add null guards in RedrawCommandOverlays to prevent NRE
when SelectedCoords or the unit at those coords is null.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:02:25 -08:00
64a15dd616 Smooth province borders and reduce default width (#6174)
* Smooth province borders and reduce default border width

Switch distance-to-border computation from Chebyshev (L∞) to Chamfer
(Euclidean approximation) using √2 diagonal weights, producing smooth
circular contours instead of blocky square stepping. Enable bilinear
texture filtering for additional sub-texel smoothing. Reduce default
border width from 2.0 to 1.5 texels for a cleaner look.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Reduce default border width to 0.75 texels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Make default borders much thinner (account for double-sided drawing)

Both provinces on each side of a boundary draw their own border, so the
visual width is ~2x the configured value. Reduce width to 0.35 texels
(~0.7 total) and tighten the AA ramp from 0.75 to 0.5 for a true
hairline border.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix border width: update serialized scene value to 0.35

The scene's serialized defaultBorderWidth (2.0) was overriding the C#
default at runtime via Awake(). Update the Gameplay.unity scene to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Warp province boundaries for organic look

Apply domain warping to rawGray.gz.bytes using Gaussian-filtered noise
displacement fields. Only land pixels near province boundaries are
affected; ocean and coastline pixels are preserved. Adds a reusable
warp_boundaries.py script with configurable amplitude, scale, and seed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:01:22 -08:00
ad58e4cac2 Make rubber-banding hero spawns appear as residents (#6173)
Rubber-band spawned heroes (for struggling factions) now appear as
Residents instead of Travelers. This makes them more likely to stay
in the province and be recruited by the faction they were spawned to
help. Added optional unaffiliatedHeroType parameter to
UnaffiliatedHeroAppearedAction to support this.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 19:01:04 -08:00
d9e5b47e7f Fix available games not displaying in lobby list (#6172)
Instantiate was called with worldPositionStays=true, causing items to
retain their prefab world position instead of being laid out by the
parent layout group. Changed to false to match running/waiting games.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 19:00:45 -08:00
a8842b0cd3 Change tutorial reinforcements to appear after round 5 (#6169)
Adjusts timing for better tutorial pacing.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 17:55:12 -08:00
044819cd99 Increase tutorial defender unit size and training (#6167)
- Sadar Rakon's battalions increased by 30% size
- Training increased from 60 to 80
- Makes the tutorial battle more challenging

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 16:29:00 -08:00
6471a889a1 Use attacker starting position index for tutorial reinforcements (#6166)
Instead of hardcoding specific (row, column) coordinates in the proto
from Eagle, pass an attacker_starting_position_index that Shardok
resolves against the hex map. Uses index 6 for the tutorial battle
on Onmaa.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 13:42:33 -08:00
115948eea3 Add tutorial reinforcement units to initial game state (#6165)
* Add PENDING_REINFORCEMENT units to game state during tutorial setup

Tutorial reinforcement units (defined in TutorialBattleConfig events)
were never added to the initial game state, so ExecuteReinforcementsAction
could not find any units to activate. Now SetUpController() extracts
CommonUnit protos from reinforcement events, converts them via ConvertUnit(),
and adds them with PENDING_REINFORCEMENT status so they exist in the game
state when the trigger fires.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Exclude PENDING_REINFORCEMENT units from PlacedUnitsForPlayer

PlacedUnitsForPlayer returned all non-RESERVE_UNIT units, which
incorrectly included PENDING_REINFORCEMENT units. This caused them
to appear during the initial unit placement phase. Now they are
excluded alongside RESERVE_UNIT so they remain invisible until
activated by the tutorial trigger.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Preserve PENDING_REINFORCEMENT status in SetupInitialGameState

SetupInitialGameState was overwriting every unit's status to
RESERVE_UNIT, which erased the PENDING_REINFORCEMENT status set
during tutorial game setup. Now units that are already marked
PENDING_REINFORCEMENT retain their status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:58:15 -08:00
58e674d3fd Use cached leader info for unloaded games in lobby (#6164)
The games.e0es file stores factionLeaderCache with resolved names,
but gamesForWithoutBlocking() was ignoring this cache and always
showing "[Loading...]" for unloaded games. Now uses the cached
leader info when available, only falling back to placeholder when
the cache is missing or has no resolved name.

This eliminates the "Loading..." delay in the lobby after deployment.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 10:54:07 -08:00
c94d41952c Avoid unnecessary Unity reimport of generated proto files (#6163)
Stage proto outputs in a temp directory and rsync with --checksum
to preserve timestamps on unchanged files. Previously, rm -rf on
the output directory forced Unity to reimport all protos (~7 min
of script recompilation) even when nothing changed.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 10:29:35 -08:00
3b536f93e2 Replace province fill-color strobing with border-width strobing (#6162)
* Replace province fill-color strobing with border-width strobing

Province highlights (selected, targeted, commands available) now strobe
border thickness instead of fill color, making them visible on small
provinces and dark faction colors. A runtime distance-to-border texture
enables variable-width borders with one extra texture sample per fragment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Restore fill-color strobing, use black border for selection, remove map_borders.png

- Restore fill-color strobing alongside border-width strobing
- Change selected province border color from white to black for contrast
- Remove map_borders.png and make ClickDetector overlay transparent
  (borders now rendered by shader)
- Rename MapBWImage to ClickDetector to reflect its purpose

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 09:49:22 -08:00
d0a07febe7 Replace environment dropdowns with Connect to QA buttons (#6161)
Replace the prod/QA environment dropdowns (connection panel and lobby) with
simple "Connect to QA" buttons that connect directly to localhost:40032 over
plain HTTP with no auth. Buttons are editor-only and hidden in builds.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 08:15:36 -08:00
10dbff3738 Enlarge dialogue sprites and add charge/profession icons (#6160)
* Add charge icon sprite asset and use inline in dialogue

Create TMP sprite asset for the charge horse icon and add it to
the fallback chain. Update charge tutorial instruction text to
show the icon inline instead of describing it as "horse icon".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add profession icon sprite assets for dialogue use

Create TMP sprite assets for Mage, Necromancer, Engineer, Paladin,
Ranger, and Champion profession icons. Added to the fallback chain
on the primary dragoons sprite asset. Available as
<sprite name="Mage"> etc. in rich text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 07:23:09 -08:00
78e130b9dd Add --skip-auth flag for local QA testing (#6159)
When --skip-auth is passed to Eagle server, all requests are
auto-authenticated as 'local-dev' user with admin privileges.
This bypasses JWT validation entirely for local testing.

WARNING is printed to stdout when this flag is active.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 07:15:20 -08:00
e9d724ed88 Fix Waylaid Julius vigor exceeding constitution (#6157)
Vigor (99) was higher than constitution (91), causing a validation
error during battle resolution. Set vigor to match constitution.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 06:53:10 -08:00
8cf22c0bd0 Increase inline sprite size by 25% (#6158)
Scale battalion type sprites from 1.0 to 1.25 for better readability
in dialogue instruction text.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 06:52:50 -08:00
80d8927d6a Fix Start Fire tutorial trigger and clean up sprite asset approach (#6156)
* Add inline battalion type icons to dialogue instruction text

Build a TMP_SpriteAsset at runtime from EagleCommonTextures battalion
textures, enabling <sprite name="LightInfantry"> etc. in rich text.
The unit types panel now shows each battalion's icon next to its name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix read-only spriteCharacterTable/spriteGlyphTable assignment

Use existing lists via .Add() instead of assigning new ones — these
properties are read-only in TMP 3.x.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix non-readable texture error in sprite asset builder

Copy battalion textures to readable copies via RenderTexture blit
before packing into atlas, since the originals may not have Read/Write
enabled in their import settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove runtime TMP_SpriteAsset builder in favor of editor-created asset

The runtime approach fought TMP's initialization — property getters
trigger UpgradeSpriteAsset() which crashes on freshly created instances.
A pre-built sprite asset assigned in the Inspector is the intended workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Only trigger Start Fire tutorial when target has an enemy unit

The start_fire_available event was firing whenever the command existed,
even when targeting empty hexes. Now checks that the command's target
cell contains a non-friendly unit before triggering the dialogue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 22:28:19 -08:00
c75f7d8dda Suppress CANCELLED gRPC errors in Sentry reporting (#6155)
CANCELLED status is transient and will be handled by reconnection logic,
so there's no need to report it to Sentry alongside UNAVAILABLE.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 22:15:29 -08:00
cc710e0f6b Add inline battalion type icons to dialogue text (#6153)
* Add inline battalion type icons to dialogue instruction text

Build a TMP_SpriteAsset at runtime from EagleCommonTextures battalion
textures, enabling <sprite name="LightInfantry"> etc. in rich text.
The unit types panel now shows each battalion's icon next to its name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix read-only spriteCharacterTable/spriteGlyphTable assignment

Use existing lists via .Add() instead of assigning new ones — these
properties are read-only in TMP 3.x.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix non-readable texture error in sprite asset builder

Copy battalion textures to readable copies via RenderTexture blit
before packing into atlas, since the originals may not have Read/Write
enabled in their import settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove runtime TMP_SpriteAsset builder in favor of editor-created asset

The runtime approach fought TMP's initialization — property getters
trigger UpgradeSpriteAsset() which crashes on freshly created instances.
A pre-built sprite asset assigned in the Inspector is the intended workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add inspector-assigned sprite asset for dialogue instruction icons

Replace runtime sprite builder with a TMP_SpriteAsset field on
DialoguePanelController. Sprite assets are created in the editor
and wired via Inspector — the intended TMP workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix sprite vertical alignment and adjust panel background color

Increase m_HorizontalBearingY from 128 to 230 on all sprite assets
so icons align with adjacent text instead of sitting below it.
Update instruction panel background for better icon readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 22:15:16 -08:00
377c1fe726 Increase Sadar Rakon's agility to enable archery in tutorial (#6154)
Changed agility from 70 to 75 (minimum threshold for archery).
Updated stat sum from 430 to 435.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 22:12:59 -08:00
17d2a72ea9 Add battle tutorial dialogues with Old Marek (#6152)
* Add battle tutorial dialogues with Old Marek

Narrative dialogue panels for the Shardok tactical combat tutorial:

- Placement phase: enemy forces (red text), unit types, placement instructions
- Battle running: victory conditions, hold position / End Turn advice
- Archery: purple outlines on targets, longbow effectiveness vs armor
- Melee: Shift-click and Melee button instructions
- Charge: horse icon on move destinations, move-and-charge explanation
- Thunderstorm: prevents archery, extinguishes fires
- Start Fire: setting hexes ablaze when adjacent to enemy

Supporting changes:
- Panel positioning (top/default) via panelPosition field on DialogueScript
- Completion tracking prevents dialogues from re-triggering
- New trigger events: archery_available, melee_available, start_fire_available, thunderstorm
- Register CommitButton and EndTurnButton as tutorial targets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Clean up repetitive dialogue text in battle opening

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:27:17 -08:00
91dab8a28b Add playerId and starting positions to tutorial reinforcements config (#6151)
The ReinforcementsAction was missing playerId and startingPositions, so
the C++ side had no positions to place units at. Set playerId to 1
(defender) and use 3 positions from attacker starting position list 7
on the Onmaa map.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:22:40 -08:00
ebf9a3934f Implement The Eagle's appearance in tutorial (#6149)
* Implement The Eagle's appearance in tutorial

When Bridget loses all provinces in tutorial mode, The Eagle (Fracture
Covenant) appears and takes control of provinces 32 and 6, displacing
any existing occupants to adjacent friendly provinces.

- Add TutorialStrategicEvents to check for tutorial-specific events
- Add EagleAppearsAction to create The Eagle faction with battalions
- Add TutorialEagleAppears and TutorialDisplacement ActionResultTypes
- Hook tutorial events into EngineImpl.withUpdateChecks
- Update visibility in BUILD files for tutorial package access

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Move tutorial code from library to service to fix layering violation

The tutorial code was in library/tutorial/ which violated the architecture
where library/ should be pure game logic without proto/service dependencies.

Changes:
- Move EagleAppearsAction and TutorialStrategicEvents to service/tutorial/
- Add applyActionResults method to Engine trait for service-layer events
- Hook tutorial events into GameController.withHandledEngineAndResults
- Update BUILD.bazel visibility rules for the new location

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Rename TUTORIAL_EAGLE_APPEARS to TUTORIAL_FACTION_APPEARS

More generic name for potential reuse with other factions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 21:19:09 -08:00
5cd1b372cc Fix flaky Hetzner deploy by pre-warming NAT64 and retrying docker pull (#6150)
The Hetzner server uses IPv6-only networking with NAT64 for IPv4. The first
docker pull often fails because the NAT64 gateway hasn't warmed up. Add a
curl pre-warm to the DO registry and retry docker pull up to 3 times with
a 10s backoff.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 20:56:32 -08:00
d543967b44 Place tutorial reinforcements directly on battlefield instead of using placement phase (#6147)
Instead of changing PENDING_REINFORCEMENT units to RESERVE_UNIT and triggering
a placement phase, directly place them as NORMAL_UNIT at available starting
positions. This gives the player immediate control of reinforcement units.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 20:43:36 -08:00
69789dd22e Untrack Assembly-CSharp.csproj and gitignore GeneratedProtos.meta (#6148)
Assembly-CSharp.csproj is auto-generated by Unity and already matched by
the *.csproj gitignore pattern, but was still tracked from a prior commit.
GeneratedProtos.meta is a Unity meta file for a generated directory.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 20:41:00 -08:00
f5c24e68c8 Add narrative dialogue tutorial with Old Marek (#6146)
* Add narrative dialogue tutorial system with Old Marek opening

Replace mechanical modal tutorials with in-world character dialogue.
Old tutorial content is suppressed (early return in RegisterAll) but
preserved for reference. DialogueManager loads JSON scripts from
Resources/Dialogues/, plays them via DialoguePanelController with
speaker headshots, and integrates with the existing highlight system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add province highlighting, strobe animation, and dialogue fixes

- Add province bounding box highlight via MapController proxy RectTransform
- Fix province highlight Y coordinate (byte array y=0 = bottom, matching anchors)
- Add strobe/pulse animation to all highlight borders
- Replace cross-canvas highlighting with child-of-target border approach
- End dialogue on battle transition to prevent highlight persistence
- Fix instruction text to match actual button label ("Battle!")
- Add highlightProvince field to DialogueStep for map province highlighting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 20:37:45 -08:00
c00acc991b Fix tutorial faction IDs to match normal game (#6145)
- King (Bregos Fyar) is now faction 2 (was incorrectly 1)
- The Eagle (faction 1) is reserved for later
- Player (Sadar Rakon) remains faction 3
- Bridget remains faction 4

Also fixed GamesManager to assign player to faction 3 and
AI to factions 2 and 4.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 20:32:55 -08:00
1a9479aa17 Move tutorial faction config to JSON (#6144)
Add factionId and heroLoyalty fields to SetFaction proto message.
Tutorial parameters now specify:
- factionId: explicit faction ID for each faction
- heroLoyalty: loyalty value for heroes in that faction

This moves configuration out of hardcoded Scala into the JSON file,
making it easier to adjust tutorial setup.

Faction config:
- Sadar Rakon (Player): factionId=3, heroLoyalty=90
- Bregos Fyar (King): factionId=1, heroLoyalty=85
- Bridget: factionId=4, heroLoyalty=85

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 20:22:36 -08:00
3a5eb1f760 Tutorial setup improvements (#6142)
Faction IDs:
- King (Bregos Fyar) gets faction ID 1
- Eagle reserved at faction ID 2
- Player (Sadar Rakon) gets faction ID 3
- Other factions get ID 4+

Hero and province setup:
- Player heroes loyalty set to 90
- Provinces 14, 31, 39 start with 50 gold and 2000 food
- Tarn's army marches to Onmaa; Aldric the Overlooked stays to hold Nikemi

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 20:15:26 -08:00
3eaeb031b2 Send Shardok exceptions to Sentry via Eagle (#6143)
Shardok now returns proper gRPC status codes (INVALID_ARGUMENT for client
errors, INTERNAL for server errors) instead of re-throwing exceptions that
resulted in opaque UNKNOWN status. Eagle's ShardokInterfaceGrpcClient now
captures these and other errors via Sentry.captureException at all error
points, skipping transient UNAVAILABLE errors handled by reconnection.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 20:12:26 -08:00
1f29de9012 Pre-place reinforcement units with PENDING_REINFORCEMENT status (#6141)
Instead of creating reinforcement units at event time (which crashes the
ActionResultApplier's "battalion got larger" validation), pre-place them at
battle creation with a new PENDING_REINFORCEMENT status. When the tutorial
reinforcement event fires, simply change their status to RESERVE_UNIT.

Key changes:
- Add PENDING_REINFORCEMENT = 10 to UnitStatus enum in unit.fbs
- ActionResultApplier now reads status from changed unit bytes instead of
  hardcoding NORMAL_UNIT, so reinforcement units correctly get RESERVE_UNIT
- PlaceUnitCommand, PlaceHiddenUnitCommand, and ReinforceCommand now
  explicitly set NORMAL_UNIT status (previously relied on applier default)
- TutorialBattleController finds PENDING_REINFORCEMENT units and changes
  them to RESERVE_UNIT, removing the UnitConversions dependency
- All exhaustive UnitStatus switch statements updated with new enum value

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 19:12:34 -08:00
6640e423b7 Adjust tutorial event timing (#6140)
* Adjust tutorial event timing

- Reinforcements now appear after round 6 (was 5)
- Tarn's flight now triggers after round 7 (was 5)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Replace Alakanda with Elena Fyar in reinforcements

Sadar Rakon is already a Champion, so swapping in Elena Fyar
(Paladin) for more profession variety.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove Tarn flee events from tutorial

Removing both flee triggers (units lost and after round 7) -
keeping the battle to run its natural course.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 18:07:58 -08:00
1b18bb090f Adjust tutorial battle unit sizes for realism (#6139)
* Adjust tutorial battle unit sizes for realism

- Double the defender's longbowmen (200 -> 394)
- Add slight variance to all unit sizes to make them look battle-worn:
  - Defender Light Infantry: 300 -> 293, 308
  - Attacker Heavy Cavalry: 600 -> 592
  - Attacker Heavy Infantry: 500 -> 507
  - Attacker Longbowmen: 300 -> 291

The non-round numbers suggest these units have already been through combat.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Replace Colin with Old Marek the Learned in tutorial

Old Marek will be used extensively in the tutorial, so adding
him as one of the player's starting heroes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 17:29:34 -08:00
c6cb8b4c48 Fix visible map redraw when entering Shardok battle (#6138)
Defer hexGrid.SetUp() by one frame (EnqueueForNextUpdate instead of
Enqueue) so Unity's layout system fully settles after the Shardok
container activation. Previously, mapArea reported a stale size on
the setup frame, causing HexGrid.Update() to detect a size change
and trigger RebuildGrid() on the next frame — visible as the map
snapping to a different size/position.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 17:24:34 -08:00
adminandGitHub 8f205e5e8e Gate tutorials on TUTORIAL game type (#6137) 2026-02-19 08:16:03 -08:00
b3b0de6b15 Expose GameType in client game model (#6136)
Wire GameStateView.GameType through IGameModel so the client can
read the game type (Normal vs Tutorial). Also apply NewGameType
from GameStateViewDiff when present.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 07:11:23 -08:00
4605492f32 Add reinforcement heroes to tutorial battle config at round 5 (#6135)
After round 5, the player's TutorialBattleConfig includes three reinforcement
units configured as CommonUnits:
- Hedrick the Hedge-Merchant with 600 longbowmen (75 training/armament)
- John Ranil with 500 knights (80 training/armament)
- Alakanda with 600 heavy infantry (75 training/armament)

These troops are better equipped than the player's starting forces.

Note: This only configures the reinforcements in the TutorialBattleConfig proto.
The C++ Shardok-side implementation to actually spawn the units in battle is
being done separately.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-19 07:10:54 -08:00
7626a4a958 Implement tutorial reinforcements with placement phase (#6134)
Add a reinforcement placement phase to tutorial battles so that when
reinforcement events fire, the receiving player can place new units
before combat resumes. This introduces a new REINFORCEMENT_PLACEMENT
game state that pauses the turn flow until all reinforcement units
are placed.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 07:10:30 -08:00
d07c3237f2 Sort running games by creation date in lobby (client) (#6132)
Sort lobby running games by CreatedTimestampMillis with GameId as
tiebreaker for existing games that share timestamp 0.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:40:14 -08:00
ad7b3fd0d1 Sort running games by creation date in lobby (server) (#6131)
Add created_timestamp_millis field to RunningGame (internal storage)
and GameInfo (client API) protos. Thread the timestamp through
ControllerInfo, GamePlayerInfo, and all lobby query paths in
GamesManager. Set timestamp on game creation (both regular and
tutorial). Existing games default to 0 (proto3 default).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:17:08 -08:00
8b64872a51 Remove diagnostic step and unnecessary clean:true from bazel_test (#6123)
The Verify workspace step was added to debug the sparse-checkout issue,
which is now fixed by the Clean workspace step. Also removes clean:true
which runs git clean -ffdx and destroys bazel-* symlinks unnecessarily.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 16:44:45 -08:00
17f9521780 Fix tutorial battle flee action and make only Tarn flee (#6128)
* Fix tutorial battle flee action player ID

The FleeAction was using playerId=1 (defender/player) instead of
playerId=0 (attacker/Tarn). This caused the player's units to flee
instead of Ikhaan Tarn's units.

In Shardok battles:
- playerId=0 is the attacker
- playerId=1 is the defender

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add eagle_hero_ids to FleeAction for hero-specific fleeing

Extends FleeAction proto to support targeting specific heroes by their
Eagle hero ID. When eagle_hero_ids is specified, only units with matching
attached heroes will flee.

In the tutorial, this makes only Ikhaan Tarn flee when triggered, rather
than all of his units.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-18 16:43:56 -08:00
2a3ad4cad4 Use pre-built protoc binary instead of compiling from source (#6129)
Enable --incompatible_enable_proto_toolchain_resolution and
--prefer_prebuilt_protoc so Bazel downloads a pre-built protoc
binary from official protobuf releases rather than compiling it.
Protoc plugins and the runtime library still build from source.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 16:26:22 -08:00
5dfd9a7515 Fix skip-if-superseded: use curl instead of gh CLI (#6127)
The gh CLI isn't installed on all self-hosted runners. Replace with
curl + python3 which are available everywhere.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:31:35 -08:00
2021ee2ae8 Skip intermediate docker builds when newer runs are queued (#6126)
When multiple commits are merged to main in quick succession, intermediate
builds can be skipped if a newer docker_build run is already queued.
This avoids wasting runner time on builds that will be immediately
superseded, while never cancelling a build or deploy that's in progress.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 13:27:38 -08:00
37b4039f59 Skip intermediate docker builds when newer runs are queued (#6125)
When multiple commits are merged to main in quick succession, intermediate
builds can be skipped if a newer docker_build run is already queued.
This avoids wasting runner time on builds that will be immediately
superseded, while never cancelling a build or deploy that's in progress.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 12:52:55 -08:00
6e1a462c2c Populate hero names in tutorial game ClientTextStore (#6124)
The tutorial game creation was not calling withPopulatedPregeneratedTexts(),
causing hero names to show as "Hero" instead of their actual names because
the name text IDs couldn't be resolved.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-18 12:36:42 -08:00
84f165ea1d Add GameType enum to track tutorial vs normal games (#6121)
* Add GameType enum to track tutorial vs normal games

- Add GameType enum (NORMAL, TUTORIAL) in common proto and Scala model
- Store gameType in GameState and pass to GameStateView for client
- Add newGameType field to ActionResult for setting game type on creation
- Mark tutorial games as TUTORIAL in TutorialGameCreation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add newGameType field to GameStateViewDiff

Ensures game type changes are sent to clients via diffs, not just
the full GameStateView.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove default value from GameState.gameType parameter

Force callers to explicitly specify gameType when constructing GameState,
making the type requirement more explicit and preventing accidental defaults.

Updates all test files and InMemoryHistory to explicitly pass GameType.Normal.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-18 12:29:41 -08:00
faaac39051 Add workspace cleanup and diagnostics to bazel_test workflow (#6122)
Self-hosted runners can get stuck in sparse-checkout mode from previous
deploy jobs. The actions/checkout@v4 sparse-checkout disable has a bug:
it writes core.sparseCheckout=false to .git/config.worktree, then
immediately unsets extensions.worktreeConfig, causing git to fall back
to .git/config where core.sparseCheckout is still true.

Fix: explicitly set core.sparseCheckout=false in .git/config and
remove the worktree config files entirely before checkout.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 10:46:39 -08:00
57d35e085a Remove sparse checkout from deploy job to prevent corrupting shared runners (#6120)
The deploy job in docker_build.yml used sparse-checkout on [self-hosted, bazel]
runners. This left the workspace in sparse-checkout mode, causing subsequent
jobs on the same runner to fail with "not invoked from within a workspace"
because MODULE.bazel was missing.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 07:06:50 -08:00
4325385544 Adjust tutorial factions: Ikhaan Tarn joins King's Loyalists, add Vengeance (#6119)
- Move Ikhaan Tarn and province 31 into Bregos Fyar's King's Loyalists faction
- Add new Vengeance faction with Bridget and 300 light infantry in Kojaria (province 39)
- Fix startingTrusts to target player faction (was targeting self after reorganization)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-18 06:46:08 -08:00
adminandGitHub 88781d779b Revert "Add persistent Bazel server keepalive for CI runners (#6096)" (#6118)
This reverts commit cccbbb9d37.
2026-02-17 21:23:36 -08:00
b8e1e0d8b5 Add test for tutorial game creation (#6117)
- Add TutorialGameCreationTest to verify tutorial game can be created
  without exceptions
- Fix TutorialGameCreation to properly set provinceOrders from JSON
  config using ProvinceOrderTypeConverter
- Add test visibility for battalion_types resource

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 21:23:01 -08:00
023503e831 Bump rules_rust 0.60.0 → 0.68.1 and apple_support 1.23.1 → 1.24.1 (#6116)
Aligns pinned versions with what the dependency graph was already resolving,
eliminating the --check_direct_dependencies warnings.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 21:10:26 -08:00
3058538772 Add missing orders field to tutorial provinces (#6115)
Provinces 14 (player) and 31 (enemy) were missing the "orders" field,
causing a validation error: "Ruling player present, but province orders
not set".

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 21:04:18 -08:00
fe72e870a2 Add Tutorial button to lobby for launching tutorial games (#6044)
* Add Tutorial button to lobby for launching tutorial games

- Add tutorialButton field to ConnectionHandler for Unity to wire up
- Add CreateTutorialGame() method that creates a game with isTutorial=true
- Modify _internalCreateGame() to accept isTutorial parameter and include
  it in the CreateGameRequest proto message
- Wire up tutorial button click handler in SetupLobbyUI()

The Tutorial button will create a single-player game where Eagle sets up
the hardcoded tutorial scenario (defending Onmaa from Ikhaan Tarn's attack).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Hide tutorial button for non-nolen users

Temporary gate while tutorial is in development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove defensive null checks on Inspector fields in lobby setup

If these fields aren't wired in the editor, we want a
NullReferenceException so the problem is immediately obvious.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 21:04:02 -08:00
69da124203 Use Vellus Kade in tutorial instead of missing Spartacus the Younger (#6113)
Updates tutorial_parameters.json to use Vellus Kade (who already exists
in heroes.tsv) as the ruler of province 40, instead of the non-existent
"Spartacus the Younger". Uses battalion names from game_parameters.json.

Also removes swornBrotherNames for Bregos Fyar in tutorial - Vellus Kade
is just a vassal.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 18:33:09 -08:00
67fad55d47 Skip Mac build on PRs unless Mac-specific files change (#6114)
The Windows build covers shared C#/proto compilation. Mac only needs
to build on PRs when Mac-specific config changes (workflow, build
scripts, Sparkle, code signing, etc.). Mac still builds on every
push to main.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 17:41:17 -08:00
a879243fd8 Remove unused persist_library.sh and restore_library.sh (#6112)
These scripts managed an rsync-based Library/ cache to /tmp/eagle0/ but
are never called from any workflow. Library/ caching now relies on
clean: false preserving the working directory between self-hosted runs.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:54:16 -08:00
a8ded5df45 Only clear Bee/ cache when C# files are added/deleted/renamed (#6111)
Bee's incremental compilation handles content-only .cs modifications
fine. The stale DAG errors that originally motivated unconditional Bee/
deletion are caused by structural changes (files moved/renamed/deleted),
not content edits. This saves significant rebuild time on asset-only
changes like FBX meta edits or texture updates.

The last-built commit SHA is saved after each successful build and
compared on the next run to detect structural C# changes.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:50:22 -08:00
9fbc409df9 Split bridge prefabs into permanent and constructed styles (#6110)
* Split bridge prefabs into permanent and constructed styles

Pre-existing bridges now use stone/wooden models while engineer-built
bridges use hastily-constructed models, selected at render time via
the existing _bridgeBuilderLocations tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Scale up bridge models to better fill hex tiles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 16:04:25 -08:00
ac260323c0 Fix HeroGenerator state threading to prevent duplicate heroes (#6078)
HeroGenerator.getHero() returns a new generator after consuming a hero
from the pool, but this updated generator was never stored back in
EngineImpl. This caused duplicate heroes to appear across rounds since
the same pool was being used repeatedly.

Changes:
- Add PhaseAdvancementResult to hold both results and optional updated generator
- Add resultsWithGenerator() to PerformUnaffiliatedHeroesAction
- Update RoundPhaseAdvancer to return PhaseAdvancementResult
- Add recursiveTransformWithGenerator() to EngineImpl to store updated generator

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 13:45:31 -08:00
3a897b6241 Add Windows code signing to small eagle TODO nice-to-haves (#6109)
Azure Artifact Signing at ~$10/mo eliminates the SmartScreen
"unknown publisher" warning on Windows builds.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 13:25:19 -08:00
161fa78b42 Add CDN cache purge to iOS workflows after addressables upload (#6108)
With the CDN TTL increased to 1 hour, iOS addressables updates need
active cache purging to be visible to clients promptly.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:40:45 -08:00
8dc9d12fdf Set ITSAppUsesNonExemptEncryption in archive script for reliable compliance bypass (#6107)
The Unity DeepLinkPostProcessor depends on UNITY_IOS being defined at
script compilation time, which can fail if the editor starts with a
non-iOS build target. Set the key via PlistBuddy in the archive script
as a reliable fallback that doesn't depend on Unity preprocessor state.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:28:42 -08:00
df105c9e31 Replace CDN sleep with cache purge for faster client notifications (#6106)
Instead of sleeping 60s for CDN cache to expire, actively purge the
DigitalOcean Spaces CDN cache before notifying clients of new builds.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 12:26:52 -08:00
d62120b833 Eliminate Xcode project artifact round-trip in iOS TestFlight workflow (#6105)
Both jobs now run on a dedicated [self-hosted, macOS, testflight]
runner (halfdan), so the Xcode project stays on disk between jobs.
This removes the tar/upload/download/extract cycle through GitHub's
artifact storage, saving ~5-13 minutes per TestFlight build.

Requires adding the 'testflight' label to the halfdan runner.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:34:29 -08:00
de1ad34005 Fix docker_build deploy sparse checkout for individual files (#6104)
Git sparse checkout cone mode only supports directories. Add
sparse-checkout-cone-mode: false to allow the docker-compose.prod.yml
file pattern.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:23:45 -08:00
5f366c04ed Remove duplicate artifact cleanup from mac_build deploy job (#6103)
The cleanup job on ubuntu-latest already deletes these artifacts with
if: always(). The deploy job's copy was redundant.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:20:46 -08:00
dfec602889 Misc CI optimizations: notify offload, skip redundant builds, fix LFS (#6102)
- Move sleep 60 + client notify from self-hosted runners to ubuntu-latest
  jobs in mac_build and unity_build, freeing expensive runners sooner
- Skip eagle_build and shardok_build on main pushes (redundant with
  docker_build and shardok_arm64_build respectively, kept for PRs)
- Add lfs: false to bazel_cache_cleanup (only runs bazel clean)
- Add sparse checkout + lfs: false to docker_build deploy job (only
  needs docker-compose.prod.yml, nginx/, and scripts/)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:10:11 -08:00
3f83cf2c45 Add concurrency groups to prevent redundant CI builds (#6101)
Build-only workflows (bazel_test, eagle_build, shardok_build) cancel
superseded runs for both PRs and main pushes.

Deploy workflows (mac_build, unity_build, ios_addressables,
shardok_arm64) cancel superseded PR builds but queue main pushes to
avoid interrupting in-progress deployments.

docker_build already had concurrency control.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:03:32 -08:00
6edc3fcb34 Stop round-tripping Unity Library/ through /tmp in iOS workflows (#6100)
Same change as #6099 for mac/windows: switch to `clean: false` with
manual `git clean -ffd` to preserve Library/ between runs on
self-hosted runners. Eliminates two rsync operations (~4GB each)
per build.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:03:09 -08:00
846e618fdd Stop round-tripping Unity Library/ through /tmp on self-hosted runners (#6099)
The previous approach used `clean: true` (which runs `git clean -ffdx`,
deleting gitignored files like Library/), then rsync'd ~4GB from /tmp
to restore it, then rsync'd it back after the build.

Since self-hosted runners have persistent working directories, Library/
naturally survives between runs. Switch to `clean: false` with a manual
`git clean -ffd` (without -x) to remove stale untracked files while
preserving gitignored Library/. Bee/ is still cleaned each build to
avoid stale DAG files.

The restore/persist scripts are kept for the iOS workflows.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:43:45 -08:00
759202b310 Fix deploy job artifact cleanup on self-hosted mac runner (#6098)
The deploy job runs on [self-hosted, macOS, unity-mac] which doesn't
have `gh` CLI installed. Replace `gh api` calls with `curl`/`python3`
which are universally available on macOS.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:30:33 -08:00
68e876bc93 Replace dotnet proto build with Bazel-hermetic C# proto generation (#6097)
* Replace dotnet proto build with Bazel-hermetic C# proto generation

Use rules_proto_grpc_csharp to generate .cs source files via Bazel
instead of requiring a locally-installed dotnet SDK to build protos.dll.
This eliminates the dotnet dependency for CI runners and makes the
proto build fully hermetic.

- Add bazel_dep for rules_proto_grpc_csharp 5.8.0
- Bump grpc 1.74.0 -> 1.74.1 (required by rules_proto_grpc_csharp)
- Add csharp_proto_compile/csharp_grpc_compile targets across 8 proto
  BUILD.bazel files (81 .cs files from 78 protos)
- Rewrite build_protos.sh to use bazel build + copy instead of dotnet
- Output goes to Assets/GeneratedProtos/ with package-based subdirs
  to avoid filename collisions (e.g. ActionResultView.cs in both
  shardok/api/ and eagle/views/)
- Add Assets/GeneratedProtos/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove stale Eagle0Protos DLL references

The old build_protos.sh generated protos.dll via dotnet; the new one
generates .cs source files instead. Remove the tracked .meta and
.deps.json files that reference the no-longer-generated DLL, and
gitignore the directory to prevent re-adding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 09:30:26 -08:00
cccbbb9d37 Add persistent Bazel server keepalive for CI runners (#6096)
GitHub Actions kills orphan processes after each job, which kills
the Bazel server and forces a cold reload of the skyframe graph on
every CI run (~15-20s for loading+analysis of 1080 packages / 78k
targets). With a warm server this drops to ~2-3s.

Changes:
- .bazelrc: Set startup --max_idle_secs=0 to prevent idle shutdown
- ci/runners/bazel-keepalive.sh: Pings the Bazel server to keep it alive
- ci/runners/install-bazel-keepalive.sh: One-time setup script that
  installs a macOS launchd agent to run the keepalive every 5 minutes

The launchd agent owns the Bazel server process, so GitHub Actions'
orphan cleanup won't kill it. To set up on a new runner:

  ./ci/runners/install-bazel-keepalive.sh /path/to/actions-runner/_work/eagle0/eagle0

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 07:19:46 -08:00
3e1f303da5 Use cached local crane instead of extracting from bazel runfiles (#6095)
Both docker_build and shardok_arm64_build workflows were running
'bazel build //ci:eagle_server_push' just to extract crane from
its runfiles. In the ARM64 workflow this was especially costly (~29s)
because it triggered 'discarding analysis cache' due to the platform
flag change from linux_arm64 back to the default.

Install crane directly to ~/.local/bin with a version check, cached
across runs. First run downloads it; subsequent runs reuse the cached
binary.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 07:08:22 -08:00
350edc3515 Fix ELF e_machine byte-order check for ARM64 binary (#6094)
od -tx2 reads the 2-byte e_machine field as a 16-bit value in host
byte order (little-endian on macOS ARM64), so the ELF bytes b7 00
are displayed as 00b7, not b700. The check was producing a false
WARNING on every build even though the binary is correct.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 07:07:42 -08:00
f1a87cb1b5 Cache crane binary on production droplet across deploys (#6093)
Instead of downloading crane fresh every deployment, check if the
expected version already exists and skip the download. Saves ~3-5s
per deploy.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 06:58:33 -08:00
8587003f1b Pin eclipse-temurin base image digests for Bazel cache (#6092)
Without an integrity hash, Bazel logs "Fetching without an integrity
hash, result will not be cached" and re-downloads the base image every
build. Pinning the sha256 digest lets Bazel cache the download across
runs, saving ~5-10s.

Includes a comment with the command to update the digest when the base
image needs to be bumped.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 06:51:00 -08:00
e9c63dfb42 Parallelize image pulls on production droplet during deploy (#6091)
Pull all five images (eagle, admin, jfr-sidecar, nginx, certbot)
concurrently, then load the OCI tarballs sequentially. The network
download is the bottleneck, so parallelizing pulls saves ~15-20s.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 06:47:21 -08:00
7ca4038696 Replace duplicate warmup build with artifact transfer (#6090)
The deploy job was rebuilding //ci:warmup_tar (~24s) even though
build-all already built it. Upload the warmup binary as a GitHub
Actions artifact and download it in the deploy job instead.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 06:46:29 -08:00
c7c8dccf3c Parallelize image pushes to container registry (#6089)
Push all three images (eagle, admin, jfr-sidecar) concurrently instead
of sequentially. Each push takes ~15-20s, so this should reduce the
push step from ~58s to ~20s.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 06:45:23 -08:00
63eae8b57d Upgrade Unity from 6000.3.6f1 to 6000.3.8f1 (#6088)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 21:33:39 -08:00
bb18b2f598 Add logging and backstory hint for rubber-band hero spawns (#6087)
* Add logging for rubber-band hero spawns

Logs when a hero is spawned via the rubber-banding mechanic, including:
- Hero ID
- Target province name
- Faction name
- Spawn chance percentage and roll

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add subtle backstory hint for rubber-band spawned heroes

Appends "seeking a worthy cause" to personalityWords for heroes spawned
via the rubber-banding mechanism, providing a subtle narrative hint
without an explicit notification.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 21:25:48 -08:00
2115c3969c Fix ITSAppUsesNonExemptEncryption not set when URL scheme already exists (#6086)
The post-processor returned early if the eagle0:// URL scheme was
already in the plist, skipping the ITSAppUsesNonExemptEncryption write.
Move the encryption key set before the URL scheme check so it's always
written.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 20:59:04 -08:00
03bc1d62ed Show error popup when game creation fails (#6085)
The client received the CreateGameResponse with a failure result but
silently ignored it. Now it calls Debug.LogError which triggers the
existing ErrorHandler popup.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 16:31:16 -08:00
adminandGitHub b76ec8a55d Fix hero ID collision when multiple factions spawn rubber band heroes (#6084) 2026-02-16 14:10:12 -08:00
adminandGitHub bf186ce59b Fix set faction heads getting wrong factionId during game creation (#6083) 2026-02-16 14:09:58 -08:00
87644c610a Reduce lock contention in game loading and stream updates (#6082)
Two changes to reduce time spent holding global locks:

1. GamesManager.ensureGameLoadedUnsafe: Use per-game locks (ConcurrentHashMap)
   so heavy I/O (disk reads, text initialization, hero name fetching) runs
   outside GamesManager.this.synchronized. The main lock is only held briefly
   to check/update gameControllerInfos.

2. EagleServiceImpl.streamOneUpdate: Move isEagleGame() call outside
   lockAndDoWithUserId. isEagleGame calls ensureGameLoaded which can do
   heavy disk I/O on cache miss — previously this blocked all other
   user operations while a game was being loaded.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 13:03:59 -08:00
64931a8aae Handle game creation Future failures instead of silently discarding them (#6081)
When createGame() threw an exception, the Future's failure was silently
discarded (`: Unit`), leaving the client waiting forever for a response.
Now the failure is caught with .recover, logged, reported to Sentry, and
an error response is sent back to the client.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 10:59:49 -08:00
45f1a70ef5 Batch SQLite writes in transactions to eliminate fsync overhead (#6080)
* Batch SQLite writes in transactions to eliminate per-statement fsync overhead

The accumulate fold in handleUnrequestedTexts was taking ~595ms because each
withMarkedRequested/withBypassed call triggered an individual autocommitted
SQLite write (~9ms fsync each × 65 operations). Similarly, the heroNameFetch
timing included 38 name writes at ~9ms each.

Adds beginTransaction/commitTransaction/rollbackTransaction to ClientTextStore
trait (no-op defaults for in-memory implementation) with SQLite overrides that
control autocommit. Wraps the four SQL-heavy folds in UnrequestedTextHandler
with transactions so all writes within each fold share a single fsync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Suppress HeroNameCache log when serving 0 names

takeNames is called on every game tick for every game, and most calls
have no GeneratedHeroName requests. Only log when names were actually served.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Skip hero name and fixed name blocks when there are no requests

takeNames was being called on every game tick even with 0 names needed,
causing noisy logs. Now both the fixed names and hero names blocks short-
circuit when their respective request lists are empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:41:44 -08:00
05e7307e0e Add service-wide hero name cache with async replenishment (#6079)
* Add service-wide hero name cache with async replenishment

Pre-fetches hero names into a service-wide cache to eliminate ~612ms of
synchronous network latency from the game creation hot path. The cache
maintains three gender-specific pools using ConcurrentLinkedQueues,
replenished asynchronously via a single-thread executor. Falls back to
synchronous HeroNameFetcher.names() on cache miss.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Increase hero name cache pool size from 20 to 200

Negligible memory cost, reduces chance of cache misses during bursts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:23:42 -08:00
86861a2ddf Fix crash when no backstory version has resolved text in effectiveBackstory (#6075)
When all backstory versions for a hero are unresolved (e.g., bypassed LLM
requests removed from unrequestedTexts), effectiveBackstory's fallback
`getOrElse(versions.last)` picked a version guaranteed to be unresolved,
causing getText to return TextGenerationDependencyUnknown which crashed
sortedLlmRequestsWithPrompts.

Now handles the no-available-version case gracefully: logs a loud warning
with the hero's backstory version states for investigation, and returns
an empty string so dependent LLM requests can proceed with degraded
quality rather than crashing the command pipeline.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:54:52 -08:00
82de1a01d1 Add warning to never modify hero names (#6077)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:54:34 -08:00
1c90d3eb2d Add timing instrumentation to UnrequestedTextHandler (#6076)
Helps identify where time is spent in synchronizedHandlePostResults
during game creation. Logs breakdown when total exceeds 50ms.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:53:16 -08:00
83c2174a65 Fix prisoner quest message word order (#6073)
Change "wants you to return to X this prisoner" to
"wants you to return this prisoner to X"

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:26:32 -08:00
bd9554b21f Recruit panel layout adjustments (#6071)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:17:54 -08:00
21e41fc3ef Wrap createWithData batch inserts in transaction for performance (#6072)
SqliteClientTextStore.createWithData was doing batch inserts without
an explicit transaction, causing SQLite to auto-commit after each
batch operation. This led to ~3 seconds of disk syncs during game
creation.

Wrap all inserts in a single transaction like withAddedCompleteTexts
does, reducing disk syncs from O(n) to O(1).

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:15:51 -08:00
f8575577db Fix lobby race condition check timing (#6070)
Move the eagleCanvas.activeSelf check inside the MainQueue callback.
The previous location checked at response arrival time, but the queued
work executes later - by which time the game canvas may have become
active, making the connection canvas inactive and causing
GetComponentInParent to fail.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:05:09 -08:00
bd4298d050 Use more distinguishable colors for battle observer mode (#6067)
Changed the dark player colors used when observing battles:
- Defender (idx 0): green instead of black
- Attacker (idx 1): red instead of dark green
- Remaining colors also brightened for better visibility

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:02:22 -08:00
846a9a3f65 Add timing logs for game creation to identify bottlenecks (#6069)
Logs added:
- [CREATE] Received CreateGameRequest from client
- [CREATE:gameId] Starting game creation
- [CREATE:gameId] gameCreation.createGame (with duration)
- [CREATE:gameId] SqliteClientTextStore.createWithData (with duration)
- [CREATE:gameId] withPopulatedPregeneratedTexts (with duration)
- [CREATE:gameId] performAiCommands (with duration)
- [CREATE:gameId] synchronizedHandlePostResults (with duration)
- [CREATE:gameId] Game creation complete
- [CREATE] Sending CreateGameResponse after Xms

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 23:02:04 -08:00
d6ecb9d44e Add bulk insert for pregenerated texts to reduce SQL operations (#6068)
withPopulatedPregeneratedTexts was calling withAddedCompleteText for each
hero name and backstory (~400 calls), with each call doing 3+ SQL operations.
This was a major bottleneck during game creation.

Added withAddedCompleteTexts() that:
- Collects all texts first
- Uses a single transaction
- Batch inserts texts and visibility entries

This reduces ~1200+ individual SQL operations to ~3 batch operations.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 22:52:07 -08:00
15f82c098c Lobby layout fixes (#6066)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 22:35:11 -08:00
f55b766beb Add efficient single-ID visibility lookup to avoid loading entire table (#6065)
accessibleTo() was loading the entire visibility table from SQLite on
every LLM streaming token, causing severe slowdown during game creation.

Added accessibleToForId(id) with a focused SQL query that only retrieves
visibility for a single text ID.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 22:30:24 -08:00
1ef4f05222 Skip lobby UI updates when already in Eagle game (#6064)
When creating a new game, a lobby update arrives after the game has
started. At that point, the connection canvas is inactive, causing
GetComponentInParent<EagleCommonTextures>() to fail since it doesn't
traverse inactive GameObjects.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 22:23:12 -08:00
dc46b07954 Force canvas layout update before building hex grid (#6063)
Prevents visible repositioning on first Shardok battle after launch.
The mapArea rect size wasn't settled when SetUp() was called, causing
the grid to rebuild on the next frame when Update() detected the size
change.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 22:13:59 -08:00
ebb6784e42 Populate pregenerated texts in new games more efficiently (#6062)
Instead of including ALL pregenerated texts (~10K) in getCompleteTextsAccessibleTo(),
which would send them all to every client, call withPopulatedPregeneratedTexts()
when creating new games. This copies only the relevant hero names and backstories
for heroes actually in the game into the SQLite database.

This is the same approach used for loaded games, ensuring consistency.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 22:01:07 -08:00
b7b0c85656 Fix missing pregenerated texts (hero names) for new games (#6061)
getCompleteTextsAccessibleTo() only queried the SQLite database, missing
pregenerated texts stored in PregeneratedClientTextStore. For existing
games this worked because withPopulatedPregeneratedTexts() copies them
to SQLite during load. But new games never had that copy step.

Now getCompleteTextsAccessibleTo() includes pregenerated texts, with
database texts taking precedence for any duplicates.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 21:54:20 -08:00
e850cb53fa Enable UpdateNotificationPanel parent so panel can be shown (#6060)
The optional update notification panel was not appearing when clicked
because its parent GameObject was inactive. SetActive(true) on a child
doesn't make it visible if the parent is inactive.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 21:38:18 -08:00
3928bab616 Restructure Sadar Rakon as potential warlord, add Vellus Kade (#6059)
- Sadar Rakon is no longer a sworn brother of the King; he is now a
  potential warlord (great person) with faction name "The Reclamation"
- Updated Sadar's backstory: rebelled against Tarn's tyranny before
  the Eagle arrived, now fights independently but open to reconciling
  with the King
- Added Vellus Kade as the King's new second-in-command (sworn brother)
- Vellus is a former mercenary captain who proved his loyalty to the Crown
- Vellus commands province 40 with battalions: Frontier Outriders,
  Kade's Company, Crown Vanguard, Ironside Regiment, Borderland Levy,
  Provincial Militia

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 21:20:16 -08:00
0313e0ce54 Add profession image to RunningGameItem (#6058)
- Add professionImage RawImage field
- Remove unused goButton field (whole row is now a button)
- Populate profession image using EagleCommonTextures
- Handle UnknownProfession by returning null (hides image)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 20:38:50 -08:00
32d6830a4b Add hero rubber-banding for struggling factions (#6056)
* Add hero rubber-banding for struggling factions

When a faction has few heroes relative to their territory, they now have
a chance (up to 25%) to spawn a low-power, easy-to-recruit hero each
round. This prevents players from getting stuck due to hero scarcity.

Key features:
- Spawn chance scales from 25% (struggling) to 0% (healthy)
- Spawns only in provinces containing faction leaders
- Low-power heroes have stats 1-50, ambition 1-30, no profession
- These heroes are much easier to recruit due to low power/ambition

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Address PR review comments

- Add FactionUtils.provincesWithLeaders() and use it in PerformUnaffiliatedHeroesAction
- Replace isInstanceOf with pattern matching in FactionStruggleUtils
- Keep constitution range at 60-100 (same as normal heroes) so they can march
- Heavily discount (0.25x) heroes in neighboring provinces since player may not
  know about them and needs to expand to access them
- Add tests for owned vs neighboring province weighting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 20:18:40 -08:00
ceb56060be Cache lobby leader metadata in games.e0es to avoid full game loads (#6057)
When populating the lobby, gamesFor() previously called ensureGameLoaded()
for every game just to extract leader name/profession/image. This loaded
full game history from disk, blocking the lobby response.

Now save() persists a factionLeaderCache in RunningGame, and gamesFor()
reads leader info directly from the cache. Falls back to full load for
old-format files or unresolved names.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 20:17:07 -08:00
877d330e24 Show completed provinces in ReconSpecificProvincesQuest description (#6055)
Display provinces that are already known (owned, allied, or reconned)
with strikethrough and grey color in the quest description. The counter
also reflects actual known province count.

Example: "Recon ~~Onmaa~~, Chapellia (1/2)"

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:52:16 -08:00
0050365e85 Exclude allied provinces from ReconSpecificProvincesQuest (#6054)
Allied provinces are already visible to the player, so it doesn't make
sense to ask them to recon those. This change:

1. Quest creation: filter out provinces owned by allied factions
2. Fulfillment: count allied provinces as already known

Adds FactionUtils.selfAndAlliedFactionIds for efficient lookup.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:42:52 -08:00
c36ff351bb Fix ReconSpecificProvincesQuest: check membership instead of counter (#6053)
The quest was broken because reconning the same target province multiple
times incorrectly incremented the completion counter. This fix changes
the approach:

1. Quest creation: filter out provinces already reconned or owned
2. Fulfillment: check if all targets are in reconnedProvinces or owned
3. Remove counter-increment from PerformReconResolutionAction

This ensures the quest can only be fulfilled by actually reconning each
unique target province (or owning it).

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 19:27:17 -08:00
6b52f781a4 Fix recon quest: clarify it means scouting, require Ranger (#6052)
- Changed LLM prompts to use "scout" instead of "recon" to avoid
  confusion with "reconquest" - the quest is for reconnaissance/scouting
- ReconProvincesQuest and ReconSpecificProvincesQuest now require the
  divining faction to have at least one Ranger hero

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 18:34:37 -08:00
cce889d253 RestProvinceQuest targets current province only (#6051)
* Add tests for RestProvinceQuest increment behavior

Adds two test cases verifying that RestProvinceQuest progress increments
correctly when resting:
- When the free hero is in the same province being rested
- When the free hero is in a different province but has a quest targeting
  the resting province (cross-province scenario)

Both tests pass, confirming the existing logic is correct: the quest
increments based on the quest's targetProvinceId matching the province
where rest happens, regardless of which province the hero is currently in.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* RestProvinceQuest now targets current province only

Changed quest creation to only generate RestProvinceQuest targeting
the province where the free hero is located, rather than creating
quests for all faction provinces. This makes the quest more intuitive -
the hero wants the faction to rest in their province specifically.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 18:23:25 -08:00
7acb90b037 Use polling for OAuth in Unity editor (#6049)
In editor mode, deep links don't work since the editor isn't registered
for the eagle0:// URL scheme. Instead of quitting and waiting for a
deep link relaunch, poll for OAuth completion using the existing
PollForOAuthCompletionAsync infrastructure.

Standalone builds still use the quit-and-relaunch approach.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 17:11:58 -08:00
c71a73dc12 Remove global --stamp to fix remote cache sharing across CI workflows (#6050)
The global `common --stamp` in .bazelrc caused every action's cache key
to include workspace status data, preventing cache reuse between the
bazel_test, eagle_build, and shardok_build workflows. Only three Go
binary targets actually use stamped x_defs values (admin_server,
authservice, installer), so --stamp is now passed only in the CI
workflow commands that build those targets.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:11:32 -08:00
c6b51c4729 Set up tutorial battle to start immediately (#6048)
- Change starting phase from HostileArmySetup to BattleRequest
- Set up hostileArmies with status Attacking (attack decision pre-made)
- Set up defendingArmy (defense decision pre-made)
- User now sees battle immediately upon starting tutorial

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 15:50:40 -08:00
9da7805e16 Wire TutorialBattleConfig from gRPC request to ShardokEngine (#6047)
Thread tutorial_battle_config from NewGameRequest through
EagleInterfaceGrpcServer -> ShardokGamesManager -> SetUpController,
calling engine->SetTutorialBattleConfig() so the TutorialBattleController
is enabled and scripted tutorial events fire during battle.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 15:50:16 -08:00
c91bf118b1 Handle UnknownProfession in lobby display (#6046)
Add UnknownProfession to ProfessionNames and ShortProfessionNames
dictionaries to prevent KeyNotFoundException when displaying games
where leader info isn't fully available (e.g., tutorial games).

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 15:40:24 -08:00
b9c88d28c4 Add King's faction to tutorial parameters (#6045)
Add Bregos Fyar faction with provinces 37 and 40 from game_parameters.json
to tutorial setup. Uses Spartacus the Younger as sworn brother ruling
province 40.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 15:37:59 -08:00
6d1253d6ff Add tutorial battle support to CustomBattleRequest (#6021)
* Add tutorial battle support to CustomBattleRequest

When is_tutorial_battle is set, Eagle constructs a hardcoded tutorial
battle (Sadar Rakon defending against Ikhaan Tarn) with scripted events
via TutorialBattleConfig, ignoring the rest of the request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Move tutorial battle from CustomBattleRequest to CreateGameRequest

Tutorial battles are now triggered via CreateGameRequest.is_tutorial
instead of CustomBattleRequest.is_tutorial_battle, providing plumbing
for a full tutorial Eagle game. CreateGameResponse returns the
shardok_game_id for tutorial games.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove shardok_game_id from CreateGameResponse

The client discovers the battle through the normal Eagle game stream,
so CreateGameResponse doesn't need to return it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Route tutorial through real Eagle game instead of standalone CustomBattle

Instead of creating a standalone Shardok battle via CustomBattleManager,
the tutorial now creates a real Eagle game where the player holds Onmaa
(province 14) and Ikhaan Tarn's army attacks from Nikemi (province 31).
The battle flows through Eagle's normal phase system with
TutorialBattleConfig threaded through to Shardok.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Load tutorial heroes from data files instead of hardcoding

Replace inline hero stats, battalions, and faction config in
TutorialGameCreation with a data-driven approach: heroes loaded from
heroes.tsv and tutorial setup defined in a new tutorial_parameters.json
parsed via ScalaPB's JsonFormat. This follows the same pattern used by
regular game creation in NewGameCreation.

- Add Colin, Agamemnon, Tall Edgtheow, Waylaid Julius to heroes.tsv
- Create tutorial_parameters.json with faction/province/battalion config
- Rewrite TutorialGameCreation to use StartGameActionResultUtils helpers
- Expose tutorialGameParameters lazy val in GameParametersUtils
- Remove 3 duplicate heroes from generated_heroes.tsv (name collisions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add headshot entries for tutorial heroes

The fixed_headshots_present_test requires every hero in heroes.tsv to
have a corresponding entry in headshots.tsv. Add the 4 new tutorial
heroes (agamemnon, colin, tall_edgtheow, waylaid_julius) to the fixed
section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 07:54:17 -08:00
5cb80ce185 Add tooltips to all province event icons (#6043)
Beasts already had a dynamic tooltip ("3 wolves"); now blizzard, flood,
drought, epidemic, and festival icons also show a brief label on
hover/long-press. Extracted a SetEventTooltip helper to reduce
duplication.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 07:08:08 -08:00
adminandGitHub c9c74f5e0d Randomize starting color index for festival fireworks (#6042) 2026-02-14 23:22:12 -08:00
b2ade6b348 Fix overlays not clearing when switching from board unit to reserve unit (#6041)
* Fix overlays not clearing when switching from board unit to reserve unit

When selecting a reserve unit while a board unit was already selected,
the old overlays showing valid moves for the board unit remained visible
alongside the new placement options.

SelectedReserveUnitChangedTo() now:
- Clears _selectedGridIndex (board unit selection)
- Clears overlays before drawing new placement options
- Also clears overlays when deselecting a reserve unit (unit == null)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add swap behavior when clicking reserve unit with board unit selected

In Shardok placement phase, clicking a reserve unit while a board unit is
selected now swaps them: the board unit moves to reserves and the reserve
unit is placed at the board position.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 23:15:23 -08:00
9bc51c918b Fix flashing borders not clearing after unit placement in Shardok (#6040)
PerformPlacementAction() was missing the overlay cleanup that
PerformAction() has. After placing or moving a unit during the
placement phase, the flashing borders showing available positions
would remain visible.

Added hexGrid.ClearOverlays() and HandleEnemyStartingPositionOverlays()
calls to match the cleanup pattern in PerformAction().

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 23:04:47 -08:00
3529d64c4a Add long-press support for touch input (iPad right-click equivalent) (#6039)
TableRowClickDetector:
- Add long-press detection (0.5s) for touch input
- Long-press triggers onRightClick event (same as right-click)
- Cancel if finger moves more than 10 pixels
- Prevents left-click from firing if long-press triggered
- Enables right-click actions on hero/battalion table rows on iPad

MouseHandler:
- Add long-press detection for tactical hex grid touch input
- Long-press triggers HandleSecondaryClick (same as right-click)
- Enables secondary click actions on tactical battle map on iPad

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 22:52:06 -08:00
87d1d2f1ed Increase weather effect visibility (#6038)
* Increase weather effect visibility

- Increase epidemic haze alpha from 0.25 to 0.51 for better visibility
- Increase drought texture scale from 2x to 20x
- Increase rain texture scale from 4x to 8x

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix epidemic skulls invisible on white provinces

The particle material was using Additive blending shader, which adds colors
to the background. On white backgrounds, adding any color results in white,
making particles invisible.

Changed shader from "Legacy Shaders/Particles/Additive" to
"Legacy Shaders/Particles/Alpha Blended" which properly replaces background
pixels based on alpha.

Also increased haze emit rate and size for better visibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 22:43:54 -08:00
ae613954ca Add per-improvement-type lock toggles (#6037)
* Add per-improvement-type lock toggles for ImproveCommandSelector

Replace single lock toggle with four separate lock toggles (one per improvement
type: economy, agriculture, infrastructure, devastation). Only the currently
selected improvement type's lock toggle is enabled; others are grayed out.
When posting a command, only the selected type's lock state is used.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up lock toggles and hide non-selected locks

- Wire up economyLockToggle, agricultureLockToggle, infrastructureLockToggle,
  devastationLockToggle references in Unity
- Hide (SetActive false) lock toggles for non-selected improvement types
- Disable lock toggle if improvement type isn't available

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Simplify lock toggle visibility: only show for selected type

Lock toggle is shown only for the currently selected improvement type,
hidden for all others. Availability doesn't affect lock visibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix lock toggle wiring and visibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 22:28:38 -08:00
6ddf930e5c Fix epidemic effect visibility on white provinces (#6036)
Two fixes:
1. Update prefab hazeColor to use 25% alpha (was 8% due to serialized override)
2. Fix ParticleAlphaBlendMaterial to use proper alpha blending instead of
   additive - adds _ALPHABLEND_ON keyword and explicit blend modes
   (_SrcBlend: 5, _DstBlend: 10)

The additive blending was causing skulls to be invisible on white
backgrounds since adding to white can't make it any darker.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 22:04:18 -08:00
0a0777024e Fix weather effects not moving with map zoom/pan (#6035)
* Fix weather effects not moving with map zoom/pan

- Fix mapContainer references: all weather controllers now use the
  correct Content transform instead of Viewport
- BlizzardEffect now updates map bounds every frame in LateUpdate
  instead of using stale bounds from spawn time
- Removes one-time SetMapBounds in favor of SetMapContainer which
  allows continuous bound recalculation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add zoom compensation for blizzard effect

Maintain consistent screen-space appearance when zooming:
- Counter-scale particle system by 1/zoom for consistent snowflake size
- Expand emission area by zoom to still cover province
- Scale emission rate by zoom² to maintain particle density

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add zoom compensation for flood effect

Apply same fixes as blizzard:
- Update map bounds every frame for correct province masking
- Counter-scale particle systems to maintain screen-space size
- Scale emission rate by zoom² to maintain density

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 20:39:54 -08:00
9ea49e0ac3 Fix epidemic effect visibility on iOS (#6034)
- Bake skull texture directly into material (runtime texture assignment
  doesn't work on iOS Metal renderer)
- Remove unused skullTexture field and RefreshSkullTexture method
- Remove fallback shader code - fail loudly if materials aren't assigned
- Increase haze opacity from 8% to 25% for better visibility

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 19:58:25 -08:00
df8bc8ef36 Fix StartEpidemic quest fulfillment not triggering (#6032)
StartEpidemicCommand was a ProtolessSimpleAction that never checked for
quest fulfillment. Changed it to ProtolessSequentialResultsAction and
added quest matching logic (following the ControlWeatherCommand pattern)
so that StartEpidemicQuest is properly fulfilled when the epidemic
targets the matching province.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:48:16 -08:00
daa5f8c644 Send lobby response immediately, load games in background (#6033)
When a user enters the lobby, we were blocking until all their games
were loaded from disk. With the recent change to load more history
chunks, this could take several seconds for users with multiple games.

Fix: Send lobby response immediately with placeholder info for unloaded
games ("[Loading...]" for leader names), then load games in background.
When loading completes, send an updated lobby response with full info.

Changes:
- Add gamesForWithoutBlocking() that returns immediately with placeholder
  info for unloaded games
- Add loadGamesInBackground() that loads games async and calls callback
- Split lockedSendLobbyUpdate into internal method that takes game list
- On EnterLobbyRequest: send immediate response, start background load,
  send update when done (if user still in lobby)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 19:47:38 -08:00
c97c810de4 Load enough history chunks on game load to avoid disk reads during reconnection (#6031)
When loading a game from disk, we were only loading the last partial
game file (up to 25 results). But reconnection requires the last 100
results (maxInitialResults), causing stateAfter() to load from disk
during reconnection and adding ~450ms latency.

Fix: when loading a game, if recentHistory.length < 100, load additional
chunk files from disk to have enough for reconnection. This loads ~4
chunks instead of 1, adding ~150-300ms to game load but saving ~450ms
on each reconnection.

Also:
- Move minResultsToKeep constant to companion object
- Update log message to show how many chunks were loaded

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 19:35:06 -08:00
59d059656f Fix duplicate stateAfter disk load during game reconnection (#6030)
In streamUpdates() when reconnecting to a large game (>100 results),
stateAfter(history.count - maxInitialResults) was being called twice:
1. Inside filteredResultsFrom() for ActionResultFilter
2. Again for GameStateViewFilter to create the stateView

This caused the same partial game to be loaded from disk twice,
adding ~1 second to reconnection time.

Fix: compute starting state once and pass to both consumers via
new filteredResultsFromWithState() method.

Also fixes a minor issue where history.since() was called twice
in filteredResultsFrom - now called once and reused.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:37:05 -08:00
c4dce575a4 Implement platform-specific update behavior (#6029)
* Implement platform-specific update behavior

- Mac: Trigger Sparkle to check for updates immediately (shows native UI)
- Windows: Relaunch the application before quitting
- iOS: Open TestFlight URL to update
- Also added iOS platform detection for update notifications

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix TestFlight URL to correct app ID

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:29:04 -08:00
24b66b8872 Cache filtered game state views between consecutive action results (#6028)
When filtering action results for a player, we were calling
filteredGameState twice per result (before + after states). But the
"after" state of result N is the "before" state of result N+1.

Now we cache the filtered view and reuse it, cutting the number of
expensive filteredGameState calls from 2N to N+1.

For 100 results, this reduces filter time from ~1600ms to ~800ms.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:13:39 -08:00
22e6ff9b50 Add client update notification system (#6027)
* Add client update notification system

Notify connected clients when a new version is available after CI deploy.

Flow:
1. CI deploys new build and waits 60s for CDN cache
2. CI calls admin server HTTP endpoint with shared secret
3. Admin server calls Eagle via gRPC
4. Eagle broadcasts to all connected lobby users
5. Unity client shows notification with "Restart Now" button

Components:
- Proto: ClientUpdateAvailable message, NotifyClientUpdate RPC
- Eagle: notifyClientUpdate() broadcasts to lobby users
- Admin server: /notify-update HTTP endpoint with secret auth
- Unity: UpdateNotificationManager, Panel, and RequiredModal
- CI: Notify steps in mac_build.yml and unity_build.yml

Note: NOTIFY_SECRET env var must be set on admin server deployment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add UpdateIndicator for top bar update notification

Instead of a popup panel for optional updates, show a pulsing indicator
in the top bar. Clicking it opens the details panel.

- UpdateIndicator: pulsing green circle button for top bar
- UpdateNotificationManager: stores pending update info, shows indicator
- Panel only opens when user clicks indicator

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up update notification UI in Unity scene

- UpdateIndicator in top bar (pulsing green circle)
- UpdateNotificationPanel for optional update details
- UpdateRequiredModal for blocking required updates
- UpdateNotificationManager with all references connected

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix update notification panel showing and simplify fallbacks

- Remove fallback chain when panel/modal references are null
- Just warn and return instead of cascading to other UI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Broadcast update notifications to all connected users

Previously notifications only went to lobby users. Now they also go to
users who are in a game. This ensures players don't miss critical updates
while playing.

- Add broadcastToAllGameUsers() to GamesManager
- Update notifyClientUpdate() to send to both lobby and in-game users
- Log shows breakdown of lobby vs in-game notifications

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove Debug.Log messages from update notification UI

Keep only Debug.LogWarning for actual error conditions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 18:10:21 -08:00
8ef90d9542 Add cached Map for O(1) streaming text status lookups (#6026)
During game join, for each complete text being sent, we were doing
linear searches through streamingTextStatuses (O(n)). With thousands
of texts and statuses, this caused O(n²) behavior.

Added a lazy cached Map keyed by llmIdentifier for O(1) lookups.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 17:55:47 -08:00
08c8a52654 Optimize game join by using single SQL query for accessible texts (#6025)
When joining a game, the code was calling `accessibleTo` (which loads
the entire visibility table) twice per complete text. For games with
thousands of texts, this caused O(n²) database reads.

Added `getCompleteTextsAccessibleTo(factionId)` method that performs
a single SQL query with EXISTS subqueries to fetch only the texts
accessible to the joining player.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 17:25:05 -08:00
226a582838 Remove old text-based client text store migration code (#6024)
* Optimize text store accessors to avoid loading all entries

1. Replace completeTexts.get(id) with getText(id) for individual lookups
   - Avoids loading all complete texts into memory just to look up one

2. Add hasIncompleteTextsAccessibleTo(factionId) method
   - Default implementation uses existing maps (for ClientTextStoreImpl)
   - SQLite implementation uses optimized EXISTS query
   - Avoids loading all incomplete texts to check if any exist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove old text-based client text store migration code

All existing games have been migrated to SQLite, so the migration
code from the old txt file format is no longer needed.

Removes ~136 lines of migration code and two unused dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 17:05:06 -08:00
e890cc8a54 Optimize text store accessors to avoid loading all entries (#6023)
1. Replace completeTexts.get(id) with getText(id) for individual lookups
   - Avoids loading all complete texts into memory just to look up one

2. Add hasIncompleteTextsAccessibleTo(factionId) method
   - Default implementation uses existing maps (for ClientTextStoreImpl)
   - SQLite implementation uses optimized EXISTS query
   - Avoids loading all incomplete texts to check if any exist

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 16:43:36 -08:00
16a4b8f87e Replace file-based ClientTextStore with SQLite implementation (#5553)
* Replace file-based ClientTextStore with SQLite implementation

SQLite provides indexed lookups instead of loading/parsing a 5MB+ text file.
This should significantly reduce the ~142ms spent on loadTextStore during
game loading.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add S3 sync for SQLite client text store

- Store dbPath and optional persister reference in SqliteClientTextStore
- Sync database file to cloud storage in saved() method
- Download from cloud storage on load if local file doesn't exist
- Pass persister to createWithData for new game creation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Sync SQLite to S3 immediately after migration

Prevents data loss if server restarts before saved() is called after
migrating from old text-based format to SQLite.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 16:01:52 -08:00
90ebd1a5be Add timing logs to gameController to diagnose remaining load time (#6022)
Breaking down the ~280ms gap between PersistedHistory and "Finished loading":
- loadTextStore: Loading ClientTextStore from disk (5MB+ completeText.txt)
- pregenAndRecovery: Populating pregenerated texts and recovering missing names
- buildController: Creating HeroGenerator, EngineImpl, and GameController

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 15:15:10 -08:00
7ee5b35696 Only load outstanding shardok battles on game load (#6020)
* Only load outstanding shardok battles on game load

Previously, we loaded ALL .e0s shardok battle files when loading a game,
even though most battles are completed. For a game with 71 battles, this
was loading ~70 unnecessary files.

Now we:
1. Load the e0a file first and reconstruct the GameState
2. Extract the outstanding battle IDs from outstandingBattles
3. Only load .e0s files for battles that are still in progress
4. Use parallel loading (via Futures) if > 4 files need loading

This should significantly reduce game load time for games with many
completed battles.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add timing for file listing and directory parsing

Logs the time to list all files in the game directory and parse the
directory index, to identify the remaining ~400ms gap in game loading.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add lazy loading for shardok battles not loaded on startup

When a client requests data for a shardok battle that wasn't loaded
during game initialization (because it wasn't in outstandingBattles),
we now try to load it from disk on-demand.

This handles the edge case where:
1. Client is watching a battle that's about to end
2. Battle ends but client hasn't received all updates
3. Server restarts and doesn't load the completed battle
4. Client requests the missing battle data

The lazy-loaded battles are cached (including negative results) to
avoid repeated disk access for the same battle ID.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 14:55:45 -08:00
444828221a Add timing logs for game file loading diagnostics (#6019)
Logs how many .e0a and .e0s files exist and how long each takes to load.
This helps diagnose why some games take 1-1.5s to load on first connection.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:59:51 -08:00
b4f87366e7 Reduce LLM log noise and fix usage tracking (#6018)
- Remove verbose per-request logs: "LLM request submitted", "[LLM-Caller]
  Request completed", "[LLM] Submitting", etc.
- Keep error logs prominent with [LLM ERROR] prefix to stderr
- Fix usage tracking bug: always record success when stream completes,
  using 0 for missing token usage (fixes success rate calculation)
- Enhance failure logs with request type, provider, and exception details

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:42:46 -08:00
8b729d61fb Persistent UI and Lobby UX improvements (#6017)
* Move connection status UI to persistent canvas

Centralize connection status management on a persistent canvas that
remains visible across Eagle and Shardok game modes.

Changes:
- Add PersistentUIManager singleton to wire persistent UI elements
- Add PersistentClientConnection.Current static accessor
- Move ConnectionStatusUI to persistent canvas with inspector reference
- Remove connection status wiring from EagleGameController and
  ShardokGameController
- ConnectionStatusUI.statusText is now an inspector field instead of
  using GetComponent

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* WIP: Lobby UX cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix lobby prefab instantiation transforms

Change worldPositionStays from true to false when instantiating lobby
list items. This allows instantiated prefabs to adopt proper local
transforms relative to their parent, fixing rotation and Z-value issues.

Also removes unnecessary localScale resets since the layout system
handles positioning correctly with worldPositionStays=false.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Move Create Game to dedicated lobby section

Replace instantiated CreateGame prefab with a direct scene reference.
The Create Game UI now lives in its own section of the lobby panel.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Simplify Create Game UI and add dropdown zebra striping

- Hard-code total player count to 7, remove totalPlayersDropdown
- Change human player dropdown labels to "1 player", "2 players", etc.
- Change random warlord fallback text from "Random" to "Random Warlord"
- Add AlternatingRowColor component for dropdown zebra striping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Gitignore map generator output folder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Assembly-CSharp.csproj with new script references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:37:11 -08:00
2c4b5d22e7 Add success/failure rate tracking to LLM usage stats (#6016)
Tracks success and failure counts for LLM requests by provider and
request type. Failures are recorded when server errors or timeouts
occur in LlmResolver. The admin console now displays success count,
failure count, and success rate percentage in both the summary cards
and the detailed tables.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:00:51 -08:00
046a6aa3c9 Add LLM Stats page to admin console (#6015)
Add a new page at /llm-stats in the admin console that displays:
- Summary cards showing total calls and token usage
- Stats by provider (OpenAI, Claude, Gemini)
- Stats by request type with averages

The page calls the existing GetLlmUsageStats gRPC endpoint added in #6012.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 07:09:10 -08:00
c672ee5522 Add S3 persistence for LLM usage stats (#6014)
Persist LLM usage stats (by provider and request type) to DigitalOcean
Spaces on graceful shutdown and restore on startup. This follows PR #6012
which added the in-memory tracking.

Changes:
- Add JSON serialization to LlmUsageTracker with PersistedCounters and
  PersistedLlmUsageStats case classes
- Add saveToS3/loadFromS3 methods with callback injection to avoid
  circular dependencies between common and service packages
- Add registerShutdownHook to persist stats on graceful shutdown
- Create LlmUsageTrackerS3 to wire up S3 callbacks using existing S3Utils
- Initialize persistence in Main.scala after S3 warmup

Stats are stored at eagle/llm_usage_stats.json in Spaces. Stats will be
lost on crashes but preserved across graceful deployments.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 22:16:44 -08:00
c0d5ad539d Fix KeyNotFoundException crash when starting new game in same session (#6013)
StopAll() cleared the Model but not CurrentProvince on panel controllers.
When starting a new game, the stale province from the previous game still
held hero IDs that don't exist in the new game's Heroes map, causing a
KeyNotFoundException in SetUpHeroesTable().

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 21:58:04 -08:00
e1444d72e9 Add LLM usage tracking by provider and request type (#6012)
Track total calls and tokens (input/output) for each LLM provider
(Anthropic, OpenAI, Gemini) and request type. Usage data is extracted
from streaming responses and recorded in a thread-safe tracker.

Key changes:
- Add LlmUsageTracker with TokenUsage, LlmUsageRecord, LlmUsageStats
- Extract token usage from Claude, OpenAI, and Gemini streaming responses
- Add tokenUsage field to StreamingTextResults
- Record usage in LlmResolver when streams complete
- Add GetLlmUsageStats RPC to GameAdmin service
- Track stats both by provider and by request type for optimization analysis

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 21:56:52 -08:00
4603e449c0 Make previous backstory text a soft dependency in backstory updates (#6011)
When backstory updates are filtered out for AI-only factions, subsequent
backstory updates for that hero would fail because they had a hard
dependency on the previous backstory text ID.

Now the previous backstory text is optional:
- If available, use it for word count calculation
- If unavailable, estimate word count based on number of backstory
  versions (assuming each grew by the growth rate)
- Only include available previous backstories in the prompt
- Events are always included regardless of previous backstory availability

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 16:23:46 -08:00
6b022f9c9f Sync S3 saves to local storage at startup if local is empty (#6010)
On fresh deployments where the local save directory has no game files,
sync all saves from S3 during server startup. This avoids slow S3 loads
during the first user request.

The sync is skipped entirely when local game directories already exist
(the common case for normal deployments), so there's no overhead in
typical operation.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 16:05:18 -08:00
06aea9ebfd Optimize CompoundPersister.existingKeys to try local first (#6009)
Previously, existingKeys called ALL persisters and combined results,
which meant S3 ListObjectsV2 was called even when local files existed.
This caused slow first-connect latency after deployments.

Now existingKeys tries persisters in order and returns the first
non-empty result, matching the behavior of retrieveAsStream.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 13:42:11 -08:00
645a4fcb89 Use player-agnostic filtering for hero backstory LLM updates (#6008)
* Filter hero backstory LLM updates to human-visible heroes only

Only generate backstory updates for:
- Heroes in human player factions
- Heroes in factions allied with human players
- Unaffiliated heroes in provinces controlled by human factions

Key changes:
- Add humanFactionIds field to GameState (tracks which factions are human-controlled)
- Create HeroDescriptions object with historyDescription() for event-based backstory
- Filter heroes in HeroBackstoryUpdateActionGenerator based on human visibility
- Update HeroDescriptionGenerator.descriptionWithoutFaction to use history descriptions
- Simplify HeroBackstoryUpdatePromptGenerator to use shared HeroDescriptions.textForEvent

This significantly reduces LLM requests for games with AI-only factions while
maintaining full backstory generation for human-visible heroes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Use player-agnostic filtering for hero backstory LLM updates

Replace the previous humanFactionIds-based approach with a cleaner
player-agnostic design that leverages GameController's existing
recipientFactionIds filtering mechanism.

Key changes:
- Set alwaysGenerate=false on HeroBackstoryUpdateAction to enable filtering
- Remove humanFactionIds from GameState, Engine, and related converters
- Simplify HeroBackstoryUpdateActionGenerator to include all heroes
- Add sourceEvents field to BackstoryVersion to preserve events from
  bypassed LLM updates
- Add effectiveBackstory() to HeroDescriptions that returns the most
  recent available backstory plus collected events from bypassed versions
- Update ChronicleEventTextGenerator, HeroDescriptionGenerator, and
  ChronicleUpdatePromptGenerator to use effectiveBackstory()

This approach is cleaner because the engine remains player-agnostic -
it doesn't know which factions are human-controlled. Instead, it relies
on the existing GameController filtering that skips LLM requests where
all recipients are AI factions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 13:07:50 -08:00
ba6d405a04 Update ocean texture and remove unused weather textures (#6007)
* Update ocean texture with Stylize Water Texture asset

- Replace water_caustics with stylized water texture for ocean background
- Adjust ocean tint color for better ocean appearance
- Increase scroll speed for more visible water motion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove unused SnowTex and EpidemicTex from weather shader

Blizzard and Epidemic effects now use 3D particle effects only, so the
2D overlay shader no longer needs snow or epidemic textures. Only Flood
and Drought use the 2D weather overlay.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 07:19:22 -08:00
ab9ce45544 Simplify battalion backstory to single initial text ID (#6006)
Since we no longer generate new backstory versions (only the initial
backstory plus structured event history), simplify the data model:

- Add `initial_backstory_text_id` field to battalion.proto (field 9)
- Deprecate the `backstory_versions` repeated field (field 7)
- Change Scala model from `backstoryVersions: Vector[BackstoryVersion]`
  to `initialBackstoryTextId: Option[ClientTextId]`
- Update BattalionConverter to:
  - Read from new field if non-empty, else fall back to last version
    from deprecated field (for migration)
  - Write only to new field
- Update BattalionDescriptions to use `initialBackstoryTextId` directly

This simplification reduces complexity since battalions now have exactly
one backstory text that never changes.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 07:18:53 -08:00
1522699745 Eliminate battalion backstory LLM updates (Stages 4-5) (#6005)
Stage 4: Replace backstory usage in BattalionDescriptions with initial
backstory + event history by adding historyDescription() method that
combines the first backstory version with structured event data.

Stage 5: Delete BattalionBackstoryUpdateActionGenerator entirely and
remove all calls to it from EndBattleAftermathPhaseAction,
EndVassalCommandsPhaseAction, EndPlayerCommandsPhaseAction, and
EngineImpl.

This eliminates a significant source of LLM requests since battalion
backstories were being regenerated after every battle and phase change.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 06:57:37 -08:00
063ec74193 Add ParticleStandardUnlitMaterial for BeastsEffect builds (#6004)
* Add ParticleStandardUnlitMaterial for BeastsEffect builds

Create material using Particles/Standard Unlit shader and assign to
BeastsEffect.birdMaterial. This ensures the shader is included in
standalone builds where Shader.Find() would otherwise fail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reduce EpidemicEffect green haze intensity

- Make haze color more desaturated (less pure green)
- Lower alpha from 0.12 to 0.08
- Reduce hazeEmitRate and hazeSize

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 06:32:12 -08:00
c7db77e241 Stage 3: Remove backstory_text_id from BattalionView proto (#6003)
Remove the backstory_text_id field from the BattalionView proto message
and corresponding Scala model. This is part of eliminating battalion
backstory updates to reduce LLM request volume.

Changes:
- Mark field 7 as reserved in battalion_view.proto
- Remove backstoryTextId from BattalionView case class
- Update BattalionViewFilter to not set the field
- Update BattalionViewConverter for proto/scala conversion
- Update related tests

See docs/eliminate-battalion-backstory-updates.md for the full plan.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 22:30:57 -08:00
46bc012a7b Remove 2D blizzard effect from ProvinceWeatherController (#5998)
Blizzard now uses only the 3D particle effect (ProvinceBlizzardController).
The 2D shader-based overlay is removed to avoid duplicate effects.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 22:08:26 -08:00
3ddf092f8e Stage 2: Stop populating backstory in BattalionView (#6002)
Set backstoryTextId to empty string instead of the actual value when
constructing BattalionView. This stops sending backstory text IDs to
the client.

Part of eliminating battalion backstory LLM updates.
See docs/eliminate-battalion-backstory-updates.md

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 21:59:02 -08:00
69433cc7f4 Fix BeastsEffect visibility and reduce EpidemicEffect green haze (#6000)
BeastsEffect:
- Change birdColor from dark brown to white so vulture texture renders
  at full brightness instead of being nearly invisible

EpidemicEffect:
- Reduce hazeColor saturation and alpha (0.3 -> 0.12) for subtler effect
- Reduce hazeEmitRate from 25 to 8 particles/sec

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 21:58:33 -08:00
94b5d95dd3 Stage 1: Stop displaying battalion backstories in client (#6001)
Disable the battalion backstory popup that appears on hover in the
Heroes & Battalions panel. This is the first stage of eliminating
battalion backstory LLM updates to reduce request volume.

The popup panel is now always hidden when hovering over battalions.
Hero backstories are unaffected.

See docs/eliminate-battalion-backstory-updates.md for the full plan.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 21:40:20 -08:00
7db53c56ac Fix 3D province effects in standalone builds (#5999)
* Add material fields to effect scripts for standalone build support

Shader.Find() fails in standalone builds because shaders aren't included
unless directly referenced. Add public Material fields to effect scripts
so materials can be assigned in prefabs, ensuring shaders are included.

Effects updated:
- BeastsEffect: birdMaterial
- EpidemicEffect: skullMaterial, hazeMaterial
- BlizzardEffect: particleMaterial
- FloodEffect: particleMaterial

Materials need to be created in Unity and assigned to prefabs:
1. Create material with "Particles/Standard Unlit" shader for Beasts/Epidemic
2. Create material with "Eagle/ProvinceParticle" shader for Blizzard/Flood

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add ProvinceParticleMaterial and include shader in build

- Create ProvinceParticleMaterial.mat referencing ProvinceParticleShader
- Add ProvinceParticleShader to GraphicsSettings always-included shaders
- Ensures shader is available in standalone Mac and iPad builds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up ProvinceParticleMaterial in effect prefabs

Assign the material reference in BlizzardEffect and FloodEffect prefabs
to ensure the ProvinceParticleShader is included in standalone builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add ParticleAlphaBlendMaterial for BeastsEffect and EpidemicEffect

- Create ParticleAlphaBlendMaterial using Legacy Particles/Alpha Blended shader
- Add shader (fileID 200) to GraphicsSettings always-included list
- This fixes vultures showing as black boxes and epidemic lacking transparency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up ParticleAlphaBlendMaterial in BeastsEffect and EpidemicEffect prefabs

- BeastsEffect: assign birdMaterial
- EpidemicEffect: assign skullMaterial and hazeMaterial

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 17:19:36 -08:00
adminandGitHub 98dc80a77e Add LLM provider failover on timeout errors (#5997) 2026-02-11 22:36:51 -08:00
521e87cb91 Add 3D particle effect controllers for province events (#5992)
* Add 3D particle effect controllers for province events

Add controllers for blizzard, drought, flood, and beasts events:
- ProvinceBlizzardController: falling snow particles
- ProvinceDroughtController: rising dust/heat particles
- ProvinceFloodController: rain/water splash particles
- ProvinceBeastsController: circling vultures/crows particles

These follow the same pattern as Festival and Epidemic controllers.
Prefabs need to be created in Unity and wired up in the scene.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update 3D effects doc with implementation status and prefab requirements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add particle effect components for province events

Add MonoBehaviour scripts that programmatically create particle systems
for each province event type:

- BlizzardEffect.cs: Falling snowflakes with wind drift
- DroughtEffect.cs: Rising dust and heat shimmer particles
- FloodEffect.cs: Falling rain streaks with ground splashes
- BeastsEffect.cs: Circling birds (vultures/crows) with orbital motion

Each effect is configurable via Inspector fields (emit rate, colors,
sizes, speeds, etc.) similar to the existing EpidemicEffect.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up province event effect controllers in Unity scene

- Add effect components to prefabs (Blizzard, Drought, Flood, Beasts)
- Add controllers to Map GameObject in Gameplay.unity
- Wire up mapContainer, centroidsJson, and prefab references
- Wire controller references in MapController

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add test controller for province event effects

- Add ProvinceEffectTestController with test methods for each effect type
- Add TestSpawnEffect() and ClearAllEffects() methods to all controllers
- Supports testing effects without game model data

Usage: Add ProvinceEffectTestController to scene, set province IDs,
then use context menu "Test All Effects" or enable "Spawn On Start".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Revert "Add test controller for province event effects"

This reverts commit d13ae05b5661c7b29adb424d8249cec39110efdc.

* Add vulture icon for beasts province effect

- Add griffon-vulture.png icon (Flaticon, requires attribution)
- Fix velocity curve mode error in BeastsEffect.cs
- Wire up vulture texture to BeastsEffect prefab

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Rework province event effects with sun/shimmer drought and masking infrastructure

- DroughtEffect: Replace particle-based effect with pulsing sun icon and
  heat shimmer overlay using custom GrabPass shader
- BlizzardEffect/FloodEffect: Add shader fallback chain for province masking
- Controllers: Add rawGray texture loading and province masking data passing
- Add HeatShimmerShader.shader for drought distortion effect
- Add ProvinceParticleShader.shader for province boundary clipping
- Scale particle emission areas based on province perpendicular_width

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix province masking with screen-space coordinate calculation

- Update shaders to use screen position instead of world position for
  accurate UV calculation in Canvas UI context
- Controllers now properly convert world corners to screen coordinates
- Handle both Screen Space Overlay and other canvas render modes
- Fix map bounds calculation for province ID texture sampling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Enlarge weather effects to fill provinces with shader masking

- DroughtEffect: Fix shimmer by using RawImage with white texture,
  increase shimmer size to 2x province width for full coverage
- BlizzardEffect: Increase emission area, particle count (300),
  emit rate (40/s), and lifetime (4s) for dense snowfall
- FloodEffect: Increase rain emission area, particle count (400),
  emit rate (80/s), and splash coverage
- Controllers now use full province width for emission sizing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Double height of blizzard and rain emission areas

- Blizzard: Y scale 20→40, spawn height 60→120
- Rain: Y scale 20→40, spawn height 70→140

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix particle coverage and disable broken drought shimmer

- Blizzard/Flood: Change emission box to 150x150 with lower spawn point
  so particles spawn at varying heights across the province
- Drought: Disable shimmer effect - GrabPass doesn't work with UI Canvas
  (sun icon still shows)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add gentle waving animation to drought sun

- Sun now waves slowly in X and Y using different sine frequencies
  for an organic floating feel
- Reduce default sun size from 60 to 40
- Wave amounts: X=8, Y=5 at speeds 0.4 and 0.6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove test effects from province event controllers

Remove hardcoded test province spawning and keep-alive logic from all
six province event controllers (blizzard, flood, drought, festival,
epidemic, beasts). Effects will now only appear for provinces that
actually have the corresponding events.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 22:23:27 -08:00
98fb1e773c Cache game state in LLM text requests to avoid repeated disk loads (#5996)
When LLM requests are stuck waiting on dependencies, they were repeatedly
loading game state from disk on each processing cycle. This change caches
the game state directly in the text request (UnrequestedClientText and
IncompleteClientText) so it's loaded once and reused until the request
completes or is removed.

The cache is automatically cleaned up when the request is completed, since
the cached state is attached to the request object itself rather than stored
in a separate map.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 22:18:12 -08:00
18581f003b Enable Medium managed code stripping for iOS builds (#5995)
Change iPhoneStrippingLevel from 0 (Disabled) to 2 and
managedStrippingLevel for iPhone from 1 (Minimal) to 3 (Medium).

This strips unused managed code from the IL2CPP build, potentially
reducing app size by 10-30MB. Medium stripping is safe for most code
but can break heavy reflection usage - protobuf serialization should
be fine.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 16:29:31 -08:00
9ab6aab8e4 Fix Arm Troops gold cost mismatch between client and server (#5994)
The server calculates cost per-battalion with ceiling applied individually,
then sums. The client was summing costs as floats then applying ceiling once.
This caused small discrepancies when multiple battalions had fractional costs.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 16:22:21 -08:00
c7ab71a928 Fix effect animator visibility and MeteorCast animation (#5993)
Two fixes for effect animations:

1. Z-position fix: Changed all effect animator z-positions from 3-6 to 0.
   Effects were rendering behind other elements after sorting layer changes.
   Affects 16 animators: Meteor, RaiseDead, Catapult, Control, Dismiss,
   Duel, Extinguish, Fear, Fire, Flee, Freeze, HolyWave, Lightning,
   Scout, Tool, and Water.

2. MeteorCast animation fix: Added IsServerTriggeredAction helper and a
   new branch in history handler for server-triggered animations
   (like MeteorCast) for the current player.

   This was broken by #5130 which split meteor phases. Before #5130,
   MeteorTargetCommand mapped to AnimationType.MeteorCast, so the
   animation played immediately when targeting. After #5130, it correctly
   mapped to MeteorTarget, but the MeteorCast result from the server
   fell through all history handler branches.

   The fix specifically handles server-triggered actions (MeteorCast,
   MeteorCancel) that happen automatically rather than from direct
   player commands. This avoids double-animating actions like Archery
   that are already animated in PerformAction.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 15:27:05 -08:00
9a6521b4d4 Add tooltip providers to province event icons and 3D effects doc (#5991)
- Add HoveringTooltipTextProvider to all 6 province event images
  (Festival, Blizzard, Epidemic, Flood, Drought, Beasts)
- Add docs/province-event-3d-effects.md with ideas for replacing
  2D shader effects with 3D particle systems

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 14:31:45 -08:00
fe4e390ab9 Fix double-decompress of rawGray province ID map (#5990)
ProvinceIDLoader now exposes the decompressed bytes via DecompressedBytes
property, and MapController uses this instead of decompressing separately.

- ProvinceIDLoader: store decompressed bytes, expose via property
- MapController: remove duplicate decompression, use provinceIDLoader reference
- Gameplay.unity: wire MapController.provinceIDLoader to ProvinceIDLoader component

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 14:06:46 -08:00
b91113039f Map adjustments: connect Chia island, thicken peninsula, fix Pozia (#5989)
- Chia: Connected the large island to the main peninsula via land bridge
- Chia: Thickened the peninsula by 15 pixels to better fit province label
- Pozia: Assigned 199 previously uncolored pixels in southeast region

- Regenerated map_borders.png (borders only, transparent elsewhere)
- Updated centroids.json with recalculated province centroids
- Added edit_provinces.py tool for province map editing

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 13:41:08 -08:00
b6af020fcc Add epidemic particle effect with rising skulls and green haze (#5988)
* Add epidemic particle effect with skulls and green haze

- ProvinceEpidemicController: Spawns effects at province centroids
  when EpidemicEvent is active (similar to ProvinceFestivalController)
- EpidemicEffect: Particle system with configurable skull texture
  reference and green haze/smoke rising from the ground
- Integrate with MapController to update effects when model changes

Skull texture needs to be assigned in Unity Inspector.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up epidemic particle effect in Unity scene

- Add EpidemicEffect.prefab with configured particle systems
- Add ProvinceEpidemicController to Map GameObject
- Wire mapContainer, epidemicEffectPrefab, and centroidsJson references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add test code to show epidemic effect over Musland

Temporary test code - spawns epidemic effect at province ID 5 (Musland)
on Start() for visual testing. Remove after testing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Improve epidemic skull particle effect

- Fix transparency (proper alpha blend settings)
- Remove spinning, add slight random starting tilt
- Skulls grow as they rise (25% to 100%)
- More horizontal sway for drifting motion
- Use white color so texture renders as-is

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add rocking motion, spawn offset, and remove 2D epidemic effect

- Remove epidemic from ProvinceWeatherController (now handled by particles)
- Add vertical spawn offset so skulls rise through province center
- Add noise-based rotation for gentle rocking/swaying motion
- Skulls now sway back and forth ~11° as they rise

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove epidemic test code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 13:05:20 -08:00
adminandGitHub 80d3c341cf Implement neverJoinFactionIds logic for hero recruitment (#5987) 2026-02-11 12:37:43 -08:00
6998b66233 Add WouldNeverJoin recruitment status (#5986)
Add proto enum value and client support for a new recruitment status that
indicates a hero would never join a particular faction. This is plumbing
only - the logic to set this status will come in a follow-up PR.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 11:54:46 -08:00
367ca2d48d Replace hex background with text outlines and soft backings (#5983)
* Replace hex background with text outlines and image backing

Instead of drawing a white translucent background over the entire hex
when a unit is present:

- Text labels now use TMP outline + underlay for readability
- UnitType and Profession images have soft circular backing
- The hex-wide background color is no longer applied

This provides the same readability with less visual obstruction of the
terrain underneath.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix readability with soft circular backings for text and images

- Replace TMP underlay (box-shaped) with soft circular backing images
- Add backing images behind all text labels (upper, lower, overlay)
- Fix z-order bug where UnitTypeImage was moved behind its backing
- Add configurable labelBackingScale and imageBackingScale
- Show/hide backings dynamically based on content presence

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix backing z-order by moving all backings to front of sibling order

Backings from different cells were interleaving with foreground elements,
causing white blur to appear in front of text/images. Moving all backings
to the front of the sibling list ensures they render behind everything.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Use separate container for backings to fix z-order

Create a BackingsContainer as the first child of overlayContent.
All backings are parented to this container, ensuring they render
behind all foreground elements (images and labels) regardless of
cell creation order.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Make text backing elliptical to match text box proportions

Instead of a circle sized to the max dimension, the backing is now
an ellipse that matches the text box width/height ratio.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Configure HexGrid backing settings in scene

Set tuned values for label and image backings:
- Black outline (0.2 width) for text
- Cream-colored backings (1, 1, 0.74) for both labels and images
- Label backing scale 2.1, image backing scale 1.8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 11:27:06 -08:00
005316aea7 Add neverJoinFactionIds data to heroes.tsv (#5984)
Add a new column `never_join_faction_ids` to heroes.tsv and wire it
through the hero loading pipeline:
- LoadedHero: add neverJoinFactionIds field
- FixedHeroes: parse the new column from TSV
- LoadedHeroConversion: pass the field to HeroC and Hero proto

Set initial values:
- Bregos Fyar: never joins faction 1 (The Fracture Covenant)
- Ikhaan Tarn: never joins faction 2 (The King's Loyalists)
- The Eagle: never joins faction 2 (The King's Loyalists)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 09:19:44 -08:00
8c0cacfc96 Add neverJoinFactionIds field to Hero model (#5982)
Add a new field to track faction IDs that a hero will never join under
any circumstances. This field is added to:
- hero.proto (repeated int32 never_join_faction_ids)
- HeroT trait (def neverJoinFactionIds: Set[FactionId])
- HeroC case class (neverJoinFactionIds: Set[FactionId] = Set.empty)
- HeroConverter (toProto and fromProto)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 08:47:53 -08:00
2f45b409b0 Fix Shardok overlay z-order and name HexGrid GameObjects with coordinates (#5981)
* Fix Shardok overlay rendering behind bridges

Set Overlay Container Pos Z to -100 to ensure overlay UI (hero names,
unit info, battalion icons) renders in front of 3D bridge meshes in
the ScreenSpaceCamera canvas.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Name dynamically created HexGrid GameObjects with coordinates

Adds coordinate suffixes (e.g., _3_5) to all dynamically created
GameObjects in HexGrid, making debugging easier. Objects are now
named like Terrain_0_0, UnitType_3_5, PrimaryLabel_2_4, etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 07:54:39 -08:00
a05a836b71 Fix rocket visibility by using explicit velocity with negative Z (#5980)
Rockets were invisible when their Z velocity was positive (moving away
from camera in ScreenSpaceCamera canvas). Fixed by:
- Moving rocket particle system to child GameObject (not on RectTransform)
- Disabling shape module and setting velocity explicitly in EmitParams
- Using negative Z velocity (-1) to keep particles in front of camera
- Adding X variation (±15) for natural angle spread
- Adding velocityOverLifetime Y deceleration (-20) for arcing path

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 07:12:07 -08:00
3b26fccc44 Refactor province event icons to horizontal layout (#5979)
Changes:
- Replace vertical GridLayoutGroup container with HorizontalLayoutGroup
- Remove provinceEventsContainer field and dynamic resizing code
- Event icons now shown/hidden individually without container wrapper
- Adjust icon sizes: min 12x12, preferred 24x24
- Add spacers for layout spacing
- Connect festivalController reference in MapController

This simplifies the layout code - no more dynamic cell size adjustments
based on wide/narrow screen mode.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 22:02:17 -08:00
adminandGitHub 6ba35fc7c6 Revert "Fix rocket visibility by creating particle system on child GameObject…" (#5978)
This reverts commit f33822104c.
2026-02-10 21:49:17 -08:00
f33822104c Fix rocket visibility by creating particle system on child GameObject (#5977)
Rockets were sometimes invisible because the particle system was
attached directly to a RectTransform (UI element). Particle systems
don't render reliably on UI GameObjects.

Fixed by creating the rocket particle system on a child GameObject,
matching how the burst system was already set up.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 21:48:41 -08:00
adminandGitHub 8ed6a21b6b Add epidemic overlay and festival fireworks effects (#5972) 2026-02-10 19:55:13 -08:00
db90fbf126 Fix low food warning incorrectly triggering at end of year (#5976)
The low food warning was incorrectly triggering in December even when
taxes would provide enough food in January. This was caused by an
off-by-one error in calculating consumptions until taxes arrive.

Taxes arrive at the START of January, before January's food consumption.
So in December there are 0 more consumption events before taxes, not 1.
The fix changes from `monthsUntilJanuary` (1 for December) to
`consumptionsUntilTaxes` which is `12 - month` (0 for December).

Added tests for:
- December with sufficient support: no warning (taxes will save)
- December with low support: warning (won't receive taxes)
- November with sufficient food/support: no warning (can survive until taxes)
- November without sufficient food: warning (will starve before taxes)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 19:39:37 -08:00
7980bf69a2 Support ScreenSpaceCamera canvas mode for UI interactions (#5975)
When the Canvas render mode is changed from ScreenSpaceOverlay to
ScreenSpaceCamera (needed for particle system rendering), world
coordinates must be converted to screen coordinates for hit testing.

- PanelPositions: Convert world corners to screen space using camera
- MapPinchZoomHandler: Use canvas camera for coordinate conversion

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 19:39:04 -08:00
6368a64ef7 Reduce debug log spam in console (#5974)
- Disable TutorialManager.DebugLogging in scene (was flooding console)
- Remove music loading debug logs from SoundManager

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 18:43:31 -08:00
09bc074198 Update Gameplay scene UI layout positions (#5973)
Adjust anchor positions and sizes for various UI elements.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 17:41:23 -08:00
d34215308a Initialize panel layout in Start() before first frame renders (#5971)
Call UpdateLayoutForAspectRatio() at end of Start() to set up the
correct layout before the scene becomes visible, avoiding a jarring
rearrangement on first battle load.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 17:40:59 -08:00
b1a8653189 Add ocean texture support to ProvinceMapShader (#5970)
* Add ocean texture support to ProvinceMapShader

Instead of returning transparent for ocean pixels (ID 0/255), sample
an ocean texture with a tint color. This allows MapBWImage to contain
only border lines, reducing its size.

Properties added:
- _OceanTex: tileable ocean texture (or use white for solid color)
- _OceanColor: tint color for the ocean

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add ocean animation (scroll + wave distortion)

New properties:
- _OceanScrollSpeed: slow drift direction (default: 0.02, 0.01)
- _OceanWaveStrength: ripple distortion amount (default: 0.01)
- _OceanWaveSpeed: ripple animation speed (default: 1.0)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add border-only map image generated from rawGray

map_borders.png contains only province border pixels (88 KB vs 6.6 MB
for map_bw.png which includes ocean fill). Generated by checking each
pixel's neighbors for province ID changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix Y-axis orientation in map_borders.png

Flip Y coordinate when reading rawGray to match PNG orientation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove old map_bw images (replaced by map_borders.png)

Delete map_bw.png (6.6 MB) and map_bw_labels.png - ocean is now
rendered by the shader, so only border lines are needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Use hardcoded rawGray dimensions for hit testing

MapController now uses constant dimensions (3786x1834) instead of
reading from mapBWImage.texture, which fixes hit testing after
switching to map_borders.png.

Also includes scene/material updates for ocean texture configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix province ID 1 (Shumal) being treated as ocean

Province ID 1 = 1/255 = 0.00392, which was less than the 0.004
threshold. Lower threshold to 0.002 to only catch ID 0 (ocean).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove unused mapBWImage field from MapController

No longer needed since dimensions are hardcoded and ocean is
rendered by the shader.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 17:21:11 -08:00
e7244fa84f Replace 43 province RawImages with single-draw province rendering (#5969)
* Replace 43 province RawImages with single-draw province rendering

Use rawGray province ID map as source of truth for province boundaries,
eliminating 43+ draw calls and 43 mask textures.

New architecture:
- ProvinceMapShader samples rawGray for province ID, looks up color from
  256x1 texture
- ProvinceColorManager manages the color lookup texture
- ProvinceIDLoader loads rawGray.gz as GPU texture
- ProvinceWeatherMapShader uses same approach for weather overlays

Benefits:
- 1-2 draw calls instead of 43+
- Deleted 43 mask PNG files (~6MB)
- Deleted 43 per-province materials
- Single source of truth (rawGray)
- Simpler, more maintainable code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add _MainTex property to province shaders for Unity UI compatibility

Unity's RawImage component expects shaders to have a _MainTex property.
Add it as a hidden, unused property to satisfy this requirement.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Adjust layer ordering: move MapBWImage in front of province layers

Ensure province borders render on top of province colors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:44:17 -08:00
be28563d29 Province label improvements: area scaling, aspect ratio correction, font size slider (#5968)
* Scale province label font size based on area

Larger provinces now get proportionally larger text labels:
- Reduce baseFontSize from 11 to 7 for smaller overall labels
- Scale font using sqrt(area/avgArea) for gentle area-based sizing
- Clamp area scale to 0.6x-2.5x range
- Still cap font size to fit within province width

This makes large provinces like Yuetia and Berkorszag more readable
while keeping small provinces from having oversized labels.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Keep baseFontSize at 11 for area-scaled labels

The area-based scaling with baseFontSize=7 made labels too small.
Keeping baseFontSize=11 with the sqrt(area) scaling provides better
readability for both large and small provinces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Adjust label rotation and curvature for map aspect ratio

When the map is displayed at a different aspect ratio than the source
(3786x1834), the label angles and curves now adjust dynamically:

- Store source orientation and curvature per label
- Detect aspect ratio changes in Update()
- Transform angles using atan2 to account for horizontal stretch
- Scale curvature inversely with stretch factor

This fixes labels appearing at wrong angles when the map is stretched
to fit different screen resolutions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix NaN rotation when map rect is zero during initialization

- Guard UpdateLabelAngles() against zero rect dimensions
- Apply initial rotation from source orientation during label creation
- Defer aspect ratio correction to first Update() when rect is valid

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add settings slider for province label font size

- Add provinceLabelFontSizeSlider to SettingsPanelController
- Store province data (area, length, name length) for dynamic recalculation
- Add CalculateFontSize() method to compute font size from current baseFontSize
- RefreshLabels() now recalculates all font sizes when base size changes
- Font size persisted to PlayerPrefs

To use: Wire up slider (range ~5-20) in Unity to OnProvinceLabelFontSizeSliderChange

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up province label font size slider in settings panel

- Add slider UI to settings panel (range 0-24, default 11)
- Connect slider to SettingsPanelController.OnProvinceLabelFontSizeSliderChange
- Wire provinceLabelsController reference for live updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:09:10 -08:00
63d553c49f Scale province label font size based on area (#5967)
* Scale province label font size based on area

Larger provinces now get proportionally larger text labels:
- Reduce baseFontSize from 11 to 7 for smaller overall labels
- Scale font using sqrt(area/avgArea) for gentle area-based sizing
- Clamp area scale to 0.6x-2.5x range
- Still cap font size to fit within province width

This makes large provinces like Yuetia and Berkorszag more readable
while keeping small provinces from having oversized labels.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Keep baseFontSize at 11 for area-scaled labels

The area-based scaling with baseFontSize=7 made labels too small.
Keeping baseFontSize=11 with the sqrt(area) scaling provides better
readability for both large and small provinces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 15:38:10 -08:00
827a0d50e6 Add curved province labels with partial zoom scaling (#5966)
* Add curved text support for province labels

- Create CurvedText component that warps TMP mesh vertices along an arc
- Calculate curvature for each province based on shape deviation from principal axis
- Update centroids.json with curvature values for all provinces
- Update Rust map generator to calculate and include curvature

Provinces with notable curvature:
- Berkorszag: -30 (curves downward)
- Yuetia: 30 (curves upward)
- Tegrot: -30 (curves downward)
- Fluria: 25.8 (curves upward)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix curved text direction (was inverted)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reduce curve intensity by 75% (scale factor 0.25)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Make labels grow at half the zoom rate

Labels now scale with 1/sqrt(zoom) instead of 1/zoom, so they
grow slightly as you zoom in rather than staying constant size.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add distance-weighted centroid calculation for province labels

Implements BFS-based distance calculation from province boundaries to
weight interior pixels more heavily when computing centroids. This
produces label positions that are more visually centered within
irregular province shapes.

- Add calculate_weighted_centroid() to Rust map generator
- Update centroids.json with distance-weighted positions
- Key improvements: Yuetia centered (was at north coast), Berkorszag
  now properly within its bounds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 15:19:07 -08:00
64c86ebd2b Add Rust map generator, equalized province maps, and dynamic province labels (#5957)
* Add design doc for programmatic map image generation

Documents the plan to:
- Create a Python tool for regenerating map images with more equalized province sizes
- Implement dynamic province name rendering that scales with zoom
- Preserve topology and neighbor relationships while enlarging small provinces

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Python map generator tool for province size equalization

Implements Part 1 of the programmatic map generation plan:
- Python script using weighted dilation to grow small provinces
- Preserves jagged/natural edges using noise fields
- Allows small provinces to claim limited ocean pixels (20% max)
- Maintains neighbor relationships and realistic coastlines

Results:
- Province size ratio reduced from 110x to 22x
- Smallest province (Kojaria) grew 5x (3,262 → 16,590 pixels)
- All 43 province masks and centroids.json generated

Usage:
  cd tools/map_generator
  python -m venv venv && source venv/bin/activate
  pip install -r requirements.txt
  python generate_map.py --generate

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add ProvinceLabelsController for dynamic map labels

Part 2 of programmatic map generation - dynamic province name rendering:
- Creates TextMeshPro labels at province centroids
- Labels scale inversely with zoom level for readability
- Only visible when zoom >= 1.5x (configurable)
- Font size scales with province area for visual hierarchy
- Includes centroids.json with province positions

To use:
1. Add ProvinceLabelsController component to a GameObject in the scene
2. Assign zoomHandler, mapContent (RectTransform), and centroidsJson TextAsset
3. Optionally configure font, colors, and zoom threshold

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add topology documentation and tendril removal to map generator

- Document new province adjacencies caused by equalization
- Add priority_provinces parameter for boosting specific province growth
- Add remove_tendrils() post-processing to eliminate thin extensions
- Note: Will be restructured to use Bazel in next commit

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Bazel Python support and parallelized map generator

- Add rules_python to MODULE.bazel with Python 3.13
- Move map generator to src/main/python/net/eagle0/eagle/
- Add parallel processing using ProcessPoolExecutor
- Provinces are now grown in parallel across multiple CPU cores

Usage:
  bazel run //src/main/python/net/eagle0/eagle:map_generator -- --generate
  bazel run //src/main/python/net/eagle0/eagle:map_generator -- --workers 8

The old tools/map_generator/ script remains for reference but the Bazel
version is now the primary implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Rust map generator and equalized province maps

- Add Rust map generator (src/main/rust/net/eagle0/eagle/map_generator/)
  - Uses parallel graph coloring for non-adjacent province processing
  - Generates equalized province sizes (smallest ~7x larger than before)
  - Outputs: rawGray.gz.bytes, map_bw.png, province masks, centroids.json
  - Run with: bazel run //src/main/rust/net/eagle0/eagle/map_generator -- --generate

- Update province_map.tsv with neighbor changes from equalization:
  - Usvol gains: Laufarvia, Hella, Grytrand
  - Chapellia loses Nikemi, gains Kojaria
  - Kojaria gains Motcia, Chapellia
  - Motcia gains Kojaria

- Update Unity assets with equalized map:
  - New rawGray.gz.bytes with equalized province boundaries
  - New map_bw.png with textured water, transparent land, dark borders
  - Updated province mask images (1-43.png)
  - Updated centroids.json with orientation data for label rotation

- Update ProvinceLabelsController.cs to support label rotation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix coordinate system for rawGray and province labels

- Fix save_raw_gray to not flip Y coordinates (was causing click detection
  to be inverted)
- Fix ProvinceLabelsController to not flip Y coordinates (was causing
  labels to appear in wrong positions)
- Update rawGray.gz.bytes with correct orientation
- Update Gameplay.unity with ProvinceLabelsController setup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Improve province label rendering

- Reduce max font size scale from 2.0 to 1.3
- Disable word wrapping, allow text overflow
- Fix orientation sign (remove negation)
- Allow near-vertical labels by expanding angle range to [-90, 90]
- Recalculate province orientations with new range

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Scale province label font size based on province dimensions

- Add principal_length and perpendicular_width to centroids.json
- Update ProvinceLabelsController to scale font based on principal_length
- Update Rust map generator to calculate province dimensions via PCA
  eigenvalues (4 * sqrt(eigenvalue) for ±2 std dev coverage)
- Disable text wrapping on labels to prevent unwanted line breaks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reduce province label base font size to 11

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update neighbor positions and hex map starting positions for new borders

TSV changes (neighborPositions for new neighbors):
- Laufarvia: Usvol attacks from dir 4 (E)
- Hella: Usvol attacks from dir 2 (NE)
- Chapellia: Kojaria attacks from dir 4 (E)
- Usvol: Laufarvia=3(W), Hella=5(SW), Grytrand=4(E)
- Kojaria: Chapellia=1(N), Motcia=3(W)
- Grytrand: Usvol attacks from dir 3 (W)

Hex map changes (new attackerStartingPositions):
- Motcia.e0mj: Added direction 0 (NW) for Kojaria
- Chapellia.e0mj: Added direction 4 (SE) for Kojaria
- Kojaria.e0mj: Added directions 1 (N) and 3 (E) for Chapellia/Motcia

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Revert outline width change (made text smaller)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add TMP underlay effect for better label visibility on dark backgrounds

The underlay expands outward (unlike outline which shrinks text inward),
providing a white glow around labels without reducing text size.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 14:30:58 -08:00
bfde365afd Fix Y coordinate orientation in rawGray output (#5965)
The save_raw_gray function was incorrectly flipping Y coordinates,
causing the output to be vertically inverted compared to the input.
This caused click detection in Unity to select the wrong provinces.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 12:48:29 -08:00
f7cc8cc2fc Replace Python map generator with Rust implementation (#5964)
* Replace Python map generator with Rust implementation

- Add Rust map generator at src/main/rust/net/eagle0/eagle/map_generator/
  - Parallel province equalization using graph coloring
  - Generates equalized province sizes with ~7x improvement
  - Run with: bazel run //src/main/rust/net/eagle0/eagle/map_generator -- --generate

- Remove Python map generator (src/main/python/)
  - Rust version is faster and more maintainable
  - Removes rules_python dependency from MODULE.bazel

- Add build test to verify Rust code compiles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove Python from CI test workflow

Python map generator was replaced with Rust in this branch.
Rust tests are already covered by //src/test/...

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 11:02:54 -08:00
47b92265db Rename battle end button from "Back to Eagle" to "Exit Battle" (#5963)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 10:59:32 -08:00
5a91a6c175 Implement contiguous growth algorithm for province equalization (#5962)
- Replace multi-step dilation with single-step contiguous growth
- Prioritize boundary pixels with more same-province neighbors
- Use np.argpartition for efficient top-k selection
- Add two-phase cleanup (3x3 + 5x5 neighborhoods)
- Add neighbor analysis and comparison with TSV
- Update province_map.tsv with new neighbor relationships:
  - Usvol now borders Laufarvia, Hella, Grytrand (was only Faluria)
  - Laufarvia/Faluria no longer neighbors (Usvol between them)
  - Al Raala now borders Tumala
  - Results: 12.9x size ratio (from 110x), 2,263 cleanup pixels

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 07:06:01 -08:00
3eac8bbc0f Fix Organize Troops panel layout (additional fixes) (#5961)
Additional layout improvements for the Organize Troops panel.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 21:56:01 -08:00
d041c68b99 Add tutorial battle system C++ implementation and docs (#5948)
* Add tutorial battle system C++ implementation and docs

Brings in the C++ tutorial battle controller and documentation from the
tutorial-scenario-system branch:
- TutorialBattleController for managing scripted battle scenarios
- Documentation describing the tutorial battle system design

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add proto definitions and ShardokEngine integration for tutorial battles

Proto changes:
- Add TUTORIAL_ENEMY_FLED and TUTORIAL_REINFORCEMENTS_ARRIVED action types
- Add TutorialBattleConfig message to player_info.proto
- Add tutorial_battle_config field to NewGameRequest

C++ changes:
- Remove unused defenderCanFlee field from TutorialBattleController
- Integrate TutorialBattleController into ShardokEngine
- Add SetTutorialBattleConfig method to configure tutorial mode
- Check for scripted flee at end of each round in HandlePlayerTurnEnd

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix visibility for player_info_proto

Allow game_setup_info_proto in //src/main/protobuf/net/eagle0/common
to depend on player_info_proto from shardok/common.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix fire_test by moving early return inside tutorial flee block

The if (GameIsOver()) { return; } check was placed before NewRoundAction,
which caused STRUCTURES_BURNED to be skipped even for normal games. The
early return should only happen when the tutorial flee actually triggers
and ends the game.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Revert "Fix fire_test by moving early return inside tutorial flee block"

This reverts commit b0b08020873cefeaf411c07d6223ade5baad3c4e.

* Reapply "Fix fire_test by moving early return inside tutorial flee block"

This reverts commit 8038d73b57b1cf4e29c4e79e91dcb9e11b49e44d.

* Redesign tutorial system to be event-driven with configurable triggers

Replace hardcoded flee triggers with a flexible event system that supports:
- Trigger types: RoundTrigger, UnitsLostTrigger, DamageTakenTrigger, UnitKilledTrigger
- Action types: FleeAction, ReinforcementsAction
- Events fire in config order and at most once (tracked by event_id)

Key changes:
- Proto: Replace TutorialBattleConfig fields with repeated TutorialEvent
- Controller: Replace ShouldTriggerScriptedFlee/ExecuteScriptedFlee with CheckAndExecuteEvents
- Engine: Update HandlePlayerTurnEnd to use new CheckAndExecuteEvents API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update tutorial battle doc: vassals, 600 cavalry, new event API

- Change defender heroes from "sworn brothers" to "vassals"
- Update attacker heavy cavalry from 400 to 600 troops
- Update proto reference to show new event-driven TutorialBattleConfig
- Update C++ API docs to show CheckAndExecuteEvents method
- Remove completed ShardokEngine integration from "Remaining" section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Move tutorial config to separate proto file

Extract TutorialBattleConfig and related messages from player_info.proto
into tutorial_battle_config.proto to avoid the code smell of having
game_setup_info.proto depend on two different player_info.proto files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Move tutorial_battle_config.proto to common/ package

Since the proto is used by both Eagle (game_setup_info.proto) and
Shardok (TutorialBattleController), it belongs in common/, not
shardok/common/.

Updated package from net.eagle0.shardok.common to net.eagle0.common
and updated all C++ references accordingly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Change ReinforcementsAction to use CommonUnit instead of hero names

This allows the reinforcement units to be fully specified with all
their attributes (hero stats, battalion type/size, etc.) rather than
just referencing heroes by name.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add tutorial_battle_config.proto to Unity C# project

The new proto was missing from protos.csproj, causing Unity builds to fail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add go_package option and include proto in Go build

- Add go_package option to tutorial_battle_config.proto for Go code gen
- Add tutorial_battle_config_proto to common_go_proto target

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 19:08:32 -08:00
60a147e31c Fix Organize Troops panel layout and add Unity Smart Merge config (#5960)
- Fix layout of Organize Troops panel
- Add Unity Smart Merge (.gitattributes) for better merge handling of
  Unity scene files (.unity, .prefab, .asset, etc.)

Note: To use Smart Merge, developers need to configure their ~/.gitconfig:
  [merge]
  tool = unityyamlmerge
  [mergetool "unityyamlmerge"]
  trustExitCode = false
  cmd = '/Applications/Unity/Hub/Editor/*/Unity.app/Contents/Tools/UnityYAMLMerge' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 19:08:02 -08:00
d8402694c2 Add Bazel Python support and parallelized map generator (#5958)
* Add Bazel Python support and parallelized map generator

- Add rules_python to MODULE.bazel with Python 3.13
- Create map generator at src/main/python/net/eagle0/eagle/
- Add parallel processing using ProcessPoolExecutor
- Provinces are grown in parallel across multiple CPU cores

Usage:
  bazel run //src/main/python/net/eagle0/eagle:map_generator -- --analyze
  bazel run //src/main/python/net/eagle0/eagle:map_generator -- --generate
  bazel run //src/main/python/net/eagle0/eagle:map_generator -- --workers 8

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add smoke test for map_generator

Basic unit tests that verify:
- Constants are correct
- Land mask generation works
- Border detection works
- Border pixel filling works

Run with: bazel test //src/main/python/net/eagle0/eagle:map_generator_test

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Include Python tests in CI test job

Add //src/main/python/... to the bazel test command so Python tests
are run alongside other tests in CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 17:32:52 -08:00
e847f4ee80 Fix null references in Gameplay.unity (#5956)
Restore serialized references that had been nulled out.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 22:12:10 -08:00
77e8b1fbe3 Fix Screenshot button onClick in Bug Report panel (#5955)
* Fix Screenshot button onClick in Bug Report panel

The screenshot button's onClick handler was incorrectly pointing to
AttributionsController.Hide with a null target. Update to correctly
call BugReportPanelController.OnScreenshotButtonClicked.

Note: The screenshotButton reference in BugReportPanelController is
still null - this adds a scene-based onClick as a workaround. The
reference should be restored in Unity to fully fix the issue.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Restore BugReportPanelController screenshot references

Restore all the null references that were lost in a previous merge:
- screenshotButton
- screenshotStatusText
- screenshotPreviewContainer
- screenshotPreview
- settingsPanel

This allows the programmatic onClick listener in Awake() to work
correctly, and enables screenshot preview functionality.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix screenshotPreviewContainer reference

Point to "Screenshot Container" (the parent with LayoutElement) instead
of "Screenshot Preview" (the RawImage). This ensures the container is
properly hidden when no screenshot has been captured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix Bug Report panel layout

Restore proper positions and sizes for Bug Report panel UI elements
that were incorrectly zeroed out. Panel is now hidden by default.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 21:28:32 -08:00
b2a0577121 Fix weather effects not clipping when map is zoomed/panned (#5954)
Add RectMask2D clipping support to ProvinceWeatherShader, matching
the fix applied to maskShader. Weather effects (drought, blizzard,
flood) now properly clip to the map bounds during zoom and pan.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 21:12:17 -08:00
b1601e19e0 Fix Report Bug button on exception popup (iPad) (#5953)
The reportBugButton and bugReportPanel references were null ({fileID: 0}),
causing the Report Bug button to not function on the exception popup.
Properly assign these references in the Unity scene.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 21:10:14 -08:00
f83ca0573a Compress province ID map with gzip (6.9MB → 75KB) (#5952)
The rawGray province lookup map compresses extremely well due to
repeated values. Decompress at load time using GZipStream.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 21:01:50 -08:00
2d4b5efac2 Add smooth interpolation to pinch-to-zoom on iPad (#5951)
Use Mathf.SmoothDamp to interpolate toward target zoom level instead
of applying zoom changes immediately. This eliminates jumpiness from
noisy touch input.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 18:25:50 -08:00
7a2f797e13 Update TSV data files from Google Sheets (#5950)
- beasts.tsv
- heroes.tsv
- names.json

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 18:23:19 -08:00
9934fb2ce9 Stop outputting names.tsv (only names.json is used) (#5949)
The names.tsv file was being generated but only names.json is actually
used by BattalionNameGenerator. The TSV was just an intermediate format.

- Update downloadTsvs.sh to send checker output to /dev/null
- Remove .gitignore entry for names.tsv

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 18:06:49 -08:00
8bd143ec67 Fix What's New "Add Entry" form not working (#5947)
The HTMX form was using hx-swap="outerHTML" which replaced the form element
with the response body. When the response body was empty (just HX-Redirect
header), the form would disappear before the redirect could trigger.

Fixed by:
1. Wrapping the form in a container div for proper targeting
2. Using hx-swap="innerHTML" to replace contents, not the container
3. Returning a success message body that HTMX can swap while processing
   the redirect

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 17:51:23 -08:00
adminandGitHub 839f75e697 Suppress low food warning when taxes will replenish supplies (#5946) 2026-02-08 17:36:39 -08:00
466ec331d2 Add pinch-to-zoom for Eagle strategic map (#5945)
* Add pinch-to-zoom support for Eagle map view on iPad

Implements pinch-to-zoom and pan gestures for the strategic map:
- New MapPinchZoomHandler component for touch and scroll input
- Updates MapController.ProvinceFromPoint() to handle zoom/pan offsets
- Supports two-finger pinch/pan on iOS, scroll wheel on desktop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add pinch-to-zoom for Eagle map using ScrollRect

- Rewrite MapPinchZoomHandler to use ScrollRect for proper clipping/panning
- Update maskShader to support RectMask2D clipping while preserving colors
- Configure Gameplay.unity with Map Container (ScrollRect + RectMask2D)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix zoom to center on mouse pointer position

Calculate scroll position adjustment to keep the point under cursor
stationary when zooming in/out.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Revert ProvinceFromPoint to original working logic

The original PanelPositions.MapRect approach works correctly at zoom
level 1. Zoom adjustment still needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix province click detection when map is zoomed

Calculate MapRect size from world corners instead of local rect size,
so it correctly includes the zoom scale from ScrollRect content scaling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up zoomHandler reference in MapController

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 16:51:48 -08:00
ca73c6991b Add AI quest fulfillment for 7 more quest types (#5943)
New quest command choosers:
- SpendOnFeastsQuestCommandChooser: Selects FeastCommand when quest active
- RestProvinceQuestCommandChooser: Rests in target province
- SendSuppliesQuestCommandChooser: Sends food to target province
- ExecutePrisonerQuestCommandChooser: Executes specific prisoner
- ReturnPrisonerQuestCommandChooser: Returns prisoner to faction
- StartEpidemicQuestCommandChooser: Starts epidemic in target province
- SwearBrotherhoodQuestCommandChooser: Swears brotherhood with target hero

Also adds Execute and Return helper methods to ManagePrisonersCommandSelector.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 16:43:36 -08:00
a3174d9d5e Filter out warnings from error alert popups (#5944)
Unity warnings (like audio device changes) are informational and
shouldn't interrupt gameplay with alert popups. Only show alerts
for actual errors and exceptions.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 16:33:14 -08:00
be1f9cc67c Fix SendSuppliesQuest not incrementing when sending supplies (#5942)
SendSuppliesCommand was missing quest fulfillment logic. This adds
the incrementing of SendSuppliesQuest progress using the existing
QuestFulfillmentUtils pattern from RestCommand.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 06:59:59 -08:00
5e173d55ce Add narrow layout support for March command battalions (#5941)
* Add narrow layout support for March command battalions

- Add battalionsColumnNarrow view for narrow screen layouts
- Add availableBattalionsContentNarrow to EventBasedUnitSelector for dual population
- Add PopulateBattalionsContent() helper to populate both content areas
- Toggle between original and narrow battalion views based on aspect ratio
- Keep heroes column always visible (user may march from different province)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix selectionChanged event binding on March unit selector

Clear the erroneous binding to AddTargetedBattalion - the original
SelectionChanged method was removed in 2022 and the binding should
be empty.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 22:32:54 -08:00
0830ccf5d9 Consolidate Overlay Canvas into Shardok Canvas (#5940)
Remove the separate Overlay Canvas and move overlay content into the
main Shardok Canvas. This eliminates the need to duplicate view hierarchy
between the two canvases.

- Remove overlayCanvas reference from HexGrid
- Remove Start() that was setting overlayCanvas.overrideSorting
- Move overlay content to be a sibling after hex grid in Shardok Canvas

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 17:26:14 -08:00
776790e44d Add StartDroughtQuest fulfillment (PR3 of 3) (#5935)
Add quest fulfillment logic to ControlWeatherCommand:
- StartDroughtQuest is fulfilled when a Mage uses ControlWeather to start
  a drought in the target province
- StartBlizzardQuest is also now fulfilled via the same mechanism
- Both quest types were previously marked as "action quest - fulfilled in
  ControlWeatherCommand" but the implementation was missing

Changes:
- ControlWeatherCommand now extends ProtolessSequentialResultsAction instead
  of ProtolessSimpleAction to support returning quest fulfillment results
- Added QuestFulfillmentChecker and allProvinces parameters to ControlWeatherCommand
- Updated CommandFactory to pass new parameters
- Updated tests to use .results instead of .immediateExecute

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 17:16:58 -08:00
34ff1b9a1b Add StartDroughtQuest creation (PR2 of 3) (#5934)
Add quest creation logic for StartDroughtQuest, following the same pattern
as StartBlizzardQuest:
- Requires a Mage in the faction
- Targets provinces reachable by Control Weather (faction provinces + neighbors)
- Filters out provinces that already have a drought

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 17:16:15 -08:00
70079782ec Add AI quest completion for prisoner management quests (#5933)
Implement prisoner management quest choosers that enable the AI to
complete ReleasePrisonerQuest, ExilePrisonerQuest, and
ReleaseAllPrisonersQuest.

New components:
- ManagePrisonersCommandSelector: Reusable selector for prisoner
  management commands (release, exile, return)
- ReleasePrisonerQuestCommandChooser: Releases specific prisoner
- ExilePrisonerQuestCommandChooser: Exiles specific prisoner
- ReleaseAllPrisonersQuestCommandChooser: Releases any available
  prisoner to make progress toward quest completion

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 17:15:47 -08:00
d514606b00 Add StartDroughtQuest client display (PR2 of 3) (#5939)
Add client-side display code for StartDroughtQuest:
- DisplayNames.cs: Add "Start Drought" quest type string
- UnaffiliatedHeroRowController.cs: Add quest description "Start a drought in {provinceName}"

Following the 3-PR approach from docs/ADDING_NEW_QUESTS.md:
- PR1 #5924: Types (merged)
- PR2: Client handling (this PR)
- PR3 #5934/#5935: Quest generation and fulfillment

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 16:50:23 -08:00
61df596aa1 Fix hex grid centering to eliminate magic Y=32 offset (#5938)
HexMetrics: Properly center the grid vertically by setting center.y to
0.75*OuterRadius. Previously the grid center ended up at -0.75*OuterRadius
instead of 0, requiring a compensating Y=32 offset on GameObjects.

Added detailed comments explaining the centering math for future reference.

HexGrid: Remove the OuterRadius/2 vertical offsets from overlay elements
(text labels, unit type images, profession images, secondary images,
terrain modifier images) that were compensating for the old centering bug.

Unity: Set Hex Grid and Overlay Mesh Y positions to 0.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 16:47:44 -08:00
3e33c3c932 Shardok widescreen layout support (#5937)
* Update Shardok layout for widescreen support

Unity scene changes for Shardok layout variants.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Set Weather Canvas screen overlay alpha to 0 in editor

The overlay color is set programmatically at runtime, so setting it
transparent in the editor makes it easier to work with the scene.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Shardok layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Shardok layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add overlay container spacer references for widescreen layout

Add overlayContainerTopSpacer and overlayContainerLeftSpacer references:
- Top spacer active on normal/narrow screens (with top row)
- Left spacer active on widescreen (with left column)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add vertical offset to overlay elements for new layout

Move all overlay elements (labels, unit type images, profession images,
secondary images, terrain modifier images) up by metrics.OuterRadius/2
to align with hex cells in the new layout group structure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Simplify Shardok mesh and hierarchy structure

- Remove -90 rotation requirement from HexMesh by swapping Y/Z coordinates
- HexMesh now uses Y for vertical position, Z for depth (was reversed)
- HexMetrics corners updated to match new coordinate system
- Replace gridCanvas with gridTransform reference in HexGrid
- Update all animators to work with simplified hierarchy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Consolidate HexGrid onto HexMesh GameObject

- Merge HexGrid component onto the HexMesh GameObject (renamed to Hex Grid)
- Remove redundant separate Hex Grid GameObject
- Move Overlay Mesh under Overlay Content to match Hex Grid hierarchy
- Fix Overlay Mesh transform to match Hex Grid (Y=32, no rotation)
- Update component references

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 16:35:41 -08:00
88d3b37a4c Add AI quest completion for TotalDevelopmentQuest (#5932)
Implement TotalDevelopmentQuestCommandChooser that enables the AI to
complete TotalDevelopmentQuest by improving the province until the
total development reaches the quest target.

The chooser:
- Prioritizes repairing devastation if total devastation >= 4
- Otherwise improves the province's lowest development stat (economy,
  agriculture, or infrastructure)
- Uses existing ImproveCommandSelector for command generation

Also reorders quest choosers in FulfillQuestsCommandSelector:
- Move TotalDevelopment right after Improve (higher priority)
- Move Alliance to end of list (lower priority)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 09:48:58 -08:00
794a1fb503 Add automatic failover to backup LLM providers on 5xx errors (#5931)
When the primary LLM provider returns a 5xx error (like 503 Service
Unavailable), the system now automatically fails over to backup providers.

Key changes:
- Add ServerError case to ExternalTextGenerationError for 5xx detection
- OkHttpSseListener now creates appropriate error types based on HTTP status
- ApiKeys gains hasOpenAI/hasAnthropic/hasGemini and availableProviders methods
- LlmResolver tracks provider health with circuit breaker pattern:
  - 3 consecutive 5xx failures marks provider unhealthy for 5 minutes
  - Automatic failover tries providers in order: primary → openai → claude → gemini
  - All failover events are logged with [LLM] prefix

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 08:19:23 -08:00
97c243fa95 Add StartDroughtQuest types (PR1 of 3) (#5924)
Add StartDroughtQuest similar to StartBlizzardQuest and StartEpidemicQuest.
This is PR1 of the 3-PR pattern for new quests (types only).

Changes:
- Proto: Added StartDroughtQuest message and field to QuestDetails oneof
- Scala: Added StartDroughtQuest case class
- Converter: Added toProto/fromProto cases
- Fulfillment: Added case (returns false - action quest)
- Failure: Added case (returns false - never fails)
- LLM prompts: Added descriptions for DivineMessage and QuestEnded
- DivineCommand: Added province ID extraction for notifications

Note: Also added missing StartEpidemicQuest cases in DivineCommand.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 08:00:10 -08:00
e0e0f88358 Fix Shardok reconnect bug passing empty NewGameRequest (#5930)
On stream disconnect, scheduleReconnect was passing None for newGameRequest
instead of using the stored request from pendingBattles. This caused an
infinite error loop when Shardok lost the game state (e.g., after a pod
restart) because it couldn't recreate the game without the map path.

The fix retrieves the stored NewGameRequest and passes it on reconnect,
allowing Shardok to recreate the game from scratch if needed.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 07:40:07 -08:00
8e541e6d11 Restrict iOS app to iPad only (#5929)
The UI is too small on iPhone screens. Change targetDevice from 2
(Universal) to 1 (iPad only) so the app only appears in the App Store
for iPad users.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 22:58:53 -08:00
7afbde69f1 Fix TestFlight upload for Xcode 14+ (#5927)
Replace deprecated altool (removed in Xcode 14) with xcodebuild
-exportArchive using App Store Connect API authentication.

Changes:
- upload_testflight.sh: Use xcodebuild with destination=upload
  and API key authentication instead of altool
- ios_testflight.yml: Pass xcarchive path and use new API key secrets

Required new GitHub secrets:
- APP_STORE_CONNECT_API_KEY_ID
- APP_STORE_CONNECT_API_ISSUER_ID
- APP_STORE_CONNECT_API_KEY (contents of .p8 file)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 22:58:43 -08:00
e02afd112e Add documentation for AI quest completion behavior (#5928)
Documents which quests the AI proactively attempts to complete via
FulfillQuestsCommandSelector and which quests are not handled.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 22:49:23 -08:00
20b82af479 Allow Feast command when no heroes need vigor/loyalty boost (#5926)
Previously, Feast was only available when at least one hero had vigor < constitution
or loyalty < 100. This prevented players from completing SpendOnFeastsQuest when
all heroes were already at full stats.

Now Feast is available whenever the province has enough gold.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 22:37:01 -08:00
282b5fefa9 Add right-click province selection for Move in Manage Prisoners (#5923)
Override TargetedProvince to allow selecting the Move destination by
right-clicking a province on the map. When a valid move destination is
clicked, the Move toggle is enabled and the dropdown is set to that
province.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:47:26 -08:00
9549cf32e4 Fix RestProvinceQuest not incrementing when resting (#5925)
* Fix RestProvinceQuest not incrementing when resting

RestProvinceQuest is a ComponentQuest that should increment progress when the
player uses the Rest command in the target province. The increment logic was
missing.

Changes:
- RestCommand: Added quest increment logic to check for RestProvinceQuest
  where targetProvinceId matches the resting province
- CommandFactory: Pass factionProvinces to RestCommand.make
- BUILD.bazel: Added quest and unaffiliated_hero dependencies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix RestCommandTest to pass factionProvinces parameter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:40:22 -08:00
a1df9e87ee Allow ally-controlled provinces to count for BorderSecurityQuest (#5922)
The "secure borders" quest (BorderSecurityQuest) now counts provinces owned
by allies (actual alliances, not just truces) towards fulfillment. Previously,
only provinces directly controlled by the quest faction would count.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:56:42 -08:00
0bd6319c29 Fix ReconProvincesQuest and ReconSpecificProvincesQuest progress not incrementing (#5921)
When a recon succeeds, the quest counter wasn't being updated. Added logic to
PerformReconResolutionAction to increment quest progress using the existing
QuestFulfillmentUtils.withCountersIncremented pattern.

- ReconProvincesQuest: increments by 1 for any successful recon
- ReconSpecificProvincesQuest: increments by 1 if the reconned province is a target

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:41:33 -08:00
608a5fc0a5 Fix SendSuppliesQuest immediately failing (#5920)
The failure check had inverted logic - it was checking if the target
province is owned by the same faction (which is always true at creation)
instead of checking if we no longer own it. Now uses the same logic as
RestProvinceQuest.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:15:33 -08:00
201f637843 Fix alliance resolution command selector crash (#5918)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 19:49:11 -08:00
fa43fd6f48 Fix RepairDevastationQuest progress not incrementing (#5919)
ImproveCommand was not updating quest progress when repairing devastation.
Added quest progress tracking similar to how FeastCommand handles
SpendOnFeastsQuest - increments componentsFulfilled for any unaffiliated
hero with a RepairDevastationQuest across all faction provinces.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 19:48:35 -08:00
37f9acf847 Add hero backstory popup on hover for free heroes (#5917)
* Add hero backstory popup on hover for free heroes

Add LongHoverRowChanged handler to FreeHeroesTableController to show
the hero backstory popup when hovering over unaffiliated heroes, matching
the behavior of resident heroes in HeroesAndBattalionsPanelController.

Unity wiring needed:
- Wire popupPanel, popupPanelDetailsController, popupPanelBackstory refs
- Set LongHoverRowChangedHandler on unaffiliatedHeroesTable to call
  FreeHeroesTableController.LongHoverRowChanged

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up free hero backstory popup in Unity scene

Connect popup panel references and LongHoverRowChangedHandler for
unaffiliated heroes table.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add TableRowHoverDetector to UnaffiliatedHeroRow prefab

Required for hover detection to work on free hero rows.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 19:33:29 -08:00
2ce4c7f0fb Restrict blizzard and epidemic quests by hero profession (#5915)
Blizzard quests (StartBlizzardQuest) now require the faction to have a
Mage hero, and epidemic quests (StartEpidemicQuest) require a Necromancer.
This matches the profession requirements for the corresponding actions.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 19:14:03 -08:00
9cd57390e7 Handle missing user in streamUpdates gracefully (#5916)
Instead of throwing NoSuchElementException when a userId is not found
in userIdToFactionId (which can happen after server restart), send an
UNAUTHENTICATED error to the client so it knows to reconnect.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 19:13:15 -08:00
a1b26841dc Fix PhysX mesh collider error on empty hex mesh (#5914)
Defer mesh collider assignment to the next frame to avoid PhysX cooking
errors during initial Shardok setup. The error only occurs on the first
battle after launch, suggesting a timing issue with mesh initialization.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:47:16 -08:00
adminandGitHub 61a2d2d988 Shardok layout variants for widescreen support (#5913) 2026-02-06 17:15:03 -08:00
cd5aed4cde Minor layout and notification panel updates (#5912)
* Minor layout update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update notification panel layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 16:35:11 -08:00
f1c825b37e Update diplomacy and quest panel layouts (#5911)
* Update Please Recruit Me quest UI layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Ransom Offer Panel UI layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Alliance, Break Alliance, and Truce offer panel layouts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 16:14:28 -08:00
6d68d5dc8b Update Recon, Start Epidemic, and Swear Brotherhood quest UI layouts (#5910)
* Update Recon quest UI layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Start Epidemic quest UI layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Swear Brotherhood quest UI layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 15:33:35 -08:00
748d5afee2 Show province count progress in Develop/Mobilize quest descriptions (#5909)
Quest descriptions now show both the current province count and months
completed, e.g., "Maintain 3 provinces with Develop orders for 4 months
(2/3 provinces, 1/4 months)"

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 15:19:46 -08:00
c1bbb11edc Convert Manage Prisoners to button-style toggles and update Ransom Panel layout (#5908)
* Convert Manage Prisoners to button-style toggles

- Add ToggleGroup and ConfigureToggle for consistent toggle styling
- Remove individual RawImage icon references
- Use CanvasGroup alpha for disabled state styling (35%)
- Default selection priority: Release > Move > Exile > Execute > Return
- Move dropdown only visible when Move option is selected

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update Ransom Panel layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 15:08:47 -08:00
1e9953bc56 Add ReconSpecificProvincesQuest generation (#5901)
- Add reconSpecificProvincesQuests to QuestCreationUtils
- Creates quests with 2-4 specific province IDs to recon
- Targets provinces not controlled by the faction

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 13:37:52 -08:00
647ad25bb4 Add SpendOnFeastsQuest generation (#5893)
* Add SpendOnFeastsQuest generation

- Add spendOnFeastsQuests to QuestCreationUtils that creates quests
  requiring 2-4 feasts spending 200-500 gold total
- Modify FeastCommand to track quest progress when feasts are held
- Pass factionLeaderProvinces to FeastCommand from CommandFactory
- Add quest_fulfillment_utils, quest, and unaffiliated_hero deps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix FeastCommandTest to pass factionLeaderProvinces parameter

The FeastCommand.make method was updated to require a factionLeaderProvinces
parameter for quest progress tracking, but the test file wasn't updated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Simplify SpendOnFeastsQuest to track total gold spent

- Remove factionLeaderProvinces parameter from FeastCommand
- Track gold spent (componentCount = totalGold, increment by goldCost per feast)
- Only check current province for quest progress
- Simplify quest creation (single random for totalGold target)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Change SpendOnFeastsQuest target gold range to 500-1000

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 13:26:46 -08:00
7221ee48d6 Improve DivineCommandTest stability for notification assertions (#5907)
Check each notification's field associations individually while ignoring
affectedProvinceIds, which varies based on random quest assignment. This
prevents the test from failing every time a new quest type is added.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 13:15:01 -08:00
6bd0934144 Add RepairDevastationQuest generation (#5897)
- Add repairDevastationQuests to QuestCreationUtils
- Creates quests requiring repair of 30-100 devastation points
- Update test expectations for changed random sequence

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 12:52:23 -08:00
b656ba4518 Add ReconProvincesQuest generation (#5896)
* Add ReconProvincesQuest generation

- Add reconProvincesQuests to QuestCreationUtils
- Creates quests requiring reconnaissance of 3-6 provinces
- Update test expectations for changed random sequence

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix DivineCommandTest expected affectedProvinceIds

The random sequence changed with the addition of reconProvincesQuests,
causing the quest generation to produce different quests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:25:56 -08:00
f4902727a5 Optimize BUILD.bazel dependency check and run lint in parallel (#5906)
1. Speed up check_build_deps.sh:
   - Cache expensive `bazel query deps(...)` results
   - Reuse cached deps for all three checks instead of running
     separate bazel query commands
   - Use grep filtering on cached results instead of bazel intersect

2. Run lint job in parallel with test job:
   - Split bazel_test.yml into separate lint and test jobs
   - Jobs run concurrently, reducing total CI time

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:24:09 -08:00
7aee0ee789 Add documentation for rules_apple workspace separation (#5905)
Documents why SparklePlugin is built in a separate workspace due to
rules_swift version conflicts, and provides a checklist for when/how
to reintegrate it into the main workspace.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:09:36 -08:00
961a7c81b2 Disable flaky abstract_mcts_ai_test (#5904)
MCTS is not currently in use. Mark the test as manual to exclude it
from normal test runs.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:09:07 -08:00
d675758a9e Add RestProvinceQuest generation (#5895)
* Add RestProvinceQuest generation

- Add restProvinceQuests to QuestCreationUtils
- Creates quests requiring 2-4 months of rest on faction provinces
- Update test expectations for changed random sequence

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix GrandArmyQuest test to use >= instead of >

The test was using `> 5700` but with the changed random sequence from
adding RestProvinceQuest, the generated value is exactly 5700. Using
`>=` is still valid since the test checks that the quest requests an
army larger than the current count.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:05:04 -08:00
2864bae977 Convert Handle Captured Hero to button-style toggles (#5903)
- Add ToggleGroup and ConfigureToggle for consistent toggle styling
- Remove individual RawImage icon references
- Use CanvasGroup alpha for disabled state styling (35%)
- Default selection priority: Recruit > Imprison > Exile > Execute > Return

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 10:15:31 -08:00
b41b937662 Add Crack Down UI and button-style toggles for decision selectors (#5902)
* Add Crack Down UI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add button-style toggles to Free For All Decision selector

Match the Improve command selector pattern with ToggleGroup and
CanvasGroup for proper disabled state styling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Convert Attack Decision to button-style toggles

- Add ToggleGroup and ConfigureToggle for consistent toggle styling
- Replace individual icon/slider/label references with tributeContainer
- Use CanvasGroup alpha for disabled state styling (35%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Adjust Attack Decision spacing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 09:49:25 -08:00
201fa30acd Rename ReconSpecificProvincesQuest to ReconProvincesQuest and add new ReconSpecificProvincesQuest (#5898)
* Rename ReconSpecificProvincesQuest to ReconProvincesQuest and add new ReconSpecificProvincesQuest

- Rename existing ReconSpecificProvincesQuest (count-based) to ReconProvincesQuest
- Add new ReconSpecificProvincesQuest that tracks specific province IDs to recon
- Update proto definitions, Quest.scala, QuestConverter.scala
- Update LLM prompt generators for both quest types
- Update CheckForFulfilledQuestsAction comment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update C# client for ReconProvincesQuest rename and new ReconSpecificProvincesQuest

- Update DisplayNames.cs with renamed and new quest types
- Update UnaffiliatedHeroRowController.cs to handle both quest types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 08:23:13 -08:00
df1923f076 Improve Issue Orders panel layout and tutorial (#5900)
- Layout improvements to Issue Orders panel
- Update tutorial to explain focus province receives excess vassal supplies

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 07:20:05 -08:00
721382a9e9 Add SendSuppliesQuest generation (#5894)
- Add sendSuppliesQuests to QuestCreationUtils
- Creates quests to send 1000-3000 food to other faction provinces
- Only available if faction has at least 2 provinces

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 06:38:21 -08:00
f006618060 Add StartEpidemicQuest generation (#5888)
Add startEpidemicQuests function to QuestCreationUtils to generate
StartEpidemicQuest for provinces that don't already have an epidemic.

Update DivineCommandTest expectations for new random sequence.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 22:46:12 -08:00
93760dbfb4 Improve Issue Orders panel layout (#5892)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 22:40:20 -08:00
59a0632af2 Add client UI for new quest types (#5887)
Add display names and quest descriptions for:
- StartEpidemicQuest: "Start Epidemic" - Start an epidemic in {province}
- SpendOnFeastsQuest: "Host Feasts" - Host feasts costing X gold
- SendSuppliesQuest: "Send Supplies" - Send X food to {province}
- RestProvinceQuest: "Rest Province" - Keep {province} at rest for X months
- ReconSpecificProvincesQuest: "Recon Provinces" - Recon X provinces
- RepairDevastationQuest: "Repair Devastation" - Repair X devastation

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 22:31:07 -08:00
3c17e89f02 Add bug report system enhancements (#5863)
* Add bug report system enhancements

- Add "Report Bug" button on exception popup with pre-populated info
- Add prompt to include recent exceptions when opening bug report manually
- Add screenshot capture button in bug report panel with Discord upload

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Simplify exception handling: auto-include instead of prompting

Remove exception prompt UI and automatically include recent exceptions
in the bug report description when opening from settings menu.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up bug report UI components in Gameplay scene

- ErrorHandler: reportBugButton, bugReportPanel reference
- BugReportPanelController: screenshot button, status text, preview

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix screenshot preview layout: hide container not just RawImage

Add screenshotPreviewContainer reference to hide/show the entire
container with LayoutElement, so layout group collapses the space
when no screenshot is present.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire screenshotPreviewContainer in Gameplay scene

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 22:30:28 -08:00
0dc5435b9a Add new quest type definitions (#5886)
* Add new quest type definitions

Add proto messages, Scala case classes, and converters for:
- StartEpidemicQuest: Start an epidemic in a target province
- SpendOnFeastsQuest: Spend gold on feasts (component-based)
- SendSuppliesQuest: Send food supplies to a province (component-based)
- RestProvinceQuest: Keep a province in rest orders (component-based)
- ReconSpecificProvincesQuest: Recon a target number of provinces
- RepairDevastationQuest: Repair devastation across provinces

Also adds failure conditions for StartEpidemicQuest, SendSuppliesQuest,
and RestProvinceQuest. Other quests have no specific failure conditions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add StartEpidemicQuest to CheckForFulfilledQuestsAction

Fix pattern match exhaustivity warning by adding case for
StartEpidemicQuest (action quest - fulfilled in ControlWeatherCommand).

Also add clarifying comment for other new ComponentQuest types.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add LLM prompt cases for new quest types

Add pattern match cases for StartEpidemicQuest, SpendOnFeastsQuest,
SendSuppliesQuest, RestProvinceQuest, ReconSpecificProvincesQuest,
and RepairDevastationQuest to both DivineMessagePromptGenerator
and QuestEndedGeneratorUtilities.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:56:55 -08:00
b55df7cf3e Upgrade dependencies: grpc-java, rules_scala, flatbuffers, and more (#5890)
Upgrades:
- grpc-java: 1.71.0 -> 1.78.0
- rules_scala: 7.1.5 -> 7.2.1
- flatbuffers: 25.9.23 -> 25.12.19
- aspect_bazel_lib: 2.22.4 -> 2.22.5
- rules_jvm_external: 6.9 -> 6.10
- Netty: 4.1.110.Final -> 4.1.127.Final (to match grpc-java)

All builds and tests pass.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:55:03 -08:00
19a76d3015 Fix crane path for Bazel 8 module extension naming (#5891)
Bazel 8 changed module extension repository naming from `~~` and `~` to
`++` and `+`. Update workflows to find crane dynamically instead of
using hardcoded paths that break with Bazel version changes.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:48:07 -08:00
adminandGitHub a50bfe36b0 Switch compile-time JDK from 21 to 25 (#5889) 2026-02-05 17:33:13 -08:00
73ba9a3acc Upgrade rules_java to 9.3.0 (enables JDK 25 toolchain support) (#5885)
* Upgrade rules_java to 9.3.0 (enables JDK 25 toolchain support)

This adds an explicit dependency on rules_java 9.3.0, which includes
support for JDK 25 remote toolchains. The build continues to use
Bazel's embedded JDK 24 by default, but JDK 25 toolchains are now
available for future use.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Mark MCTS basic test as flaky

The shardok_mcts_ai_basic_test uses Monte Carlo Tree Search which
has inherent non-determinism. Tests like PrefersArcheryOverEndTurn
and DoesNotPreferStartFireWhenNotBeneficial assert on AI decisions
that may vary between runs depending on random exploration paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:40:58 -08:00
adminandGitHub 2332626198 Add StartBlizzardQuest generation (3/3) (#5878) 2026-02-05 10:55:02 -08:00
adminandGitHub cc463700d9 Add StartBlizzardQuest client UI support (#5877) 2026-02-05 10:53:53 -08:00
adminandGitHub 0788f9a155 Add missing platforms dependency for Bazel 8 cross-compilation (#5884) 2026-02-05 10:52:56 -08:00
adminandGitHub 44f9eba77f Upgrade to Bazel 8.5.1, grpc 1.74.0, protobuf 33.5 (#5883) 2026-02-05 09:47:35 -08:00
adminandGitHub 22f68fc3df Add StartBlizzardQuest type (PR 1/3) (#5875) 2026-02-05 07:57:31 -08:00
b08c1755ac Enable ApprehendOutlawQuest generation (PR 3/3) (#5874)
* Add client UI support for ApprehendOutlawQuest (PR 2/3)

- DisplayNames.cs: Added "Apprehend Outlaw" display name
- UnaffiliatedHeroRowController.cs: Added quest description with
  dynamic hero name lookup for the target outlaw

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Enable ApprehendOutlawQuest generation (PR 3/3)

Add quest generation for ApprehendOutlawQuest. The quest is generated
when there are outlaws in the faction's territory:

- Finds all outlaws across all faction-controlled provinces
- Creates one quest candidate per outlaw
- Quest requires apprehending that specific outlaw

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 06:33:06 -08:00
1b0ede178c Add client UI support for ApprehendOutlawQuest (PR 2/3) (#5873)
- DisplayNames.cs: Added "Apprehend Outlaw" display name
- UnaffiliatedHeroRowController.cs: Added quest description with
  dynamic hero name lookup for the target outlaw

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 06:32:35 -08:00
258f739d02 Move SparklePlugin to separate Bazel workspace to resolve rules_swift conflict (#5882)
* Move SparklePlugin to separate Bazel workspace to resolve rules_swift conflict

The problem: grpc 1.76.0.bcr.1 requires rules_swift 3.x, but rules_apple 4.x
requires rules_swift 2.x. These have different compatibility levels, causing
bzlmod resolution to fail when both are in the same workspace.

The solution: Move SparklePlugin (the only thing using rules_apple) to a
separate Bazel workspace at `sparkle_workspace/`. This workspace has its own
MODULE.bazel with only rules_apple and Sparkle dependencies, completely
isolated from the grpc/flatbuffers dependency tree.

Changes:
- Create sparkle_workspace/ with isolated MODULE.bazel
- Move SparklePlugin source files to sparkle_workspace/
- Update build_sparkle_plugin.sh to build from subworkspace
- Remove rules_apple from main MODULE.bazel
- Add single_version_override for rules_swift 3.1.2 (for grpc/flatbuffers)

All 315 tests pass.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add WORKSPACE.bazel to sparkle_workspace to prevent parent workspace detection

Without this file, Bazel may walk up the directory tree and find the parent
workspace's MODULE.bazel, causing dependency conflicts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 06:23:46 -08:00
f125c8f5f6 Remove unused macos_command_line_application from action_point_distances (#5881)
This target was a development utility that's no longer used.
Removing it helps reduce rules_apple dependencies.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:40:54 -08:00
adminandGitHub 22b0bc00cc Remove unused api_keys_data filegroup (#5879) 2026-02-04 17:51:42 -08:00
45942688a9 Add ApprehendOutlawQuest type (PR 1/3) (#5872)
* Add ApprehendOutlawQuest type (PR 1/3)

Add a new quest type where unaffiliated heroes require the faction to
apprehend a specific outlaw currently in their territory. The quest:

- Proto: Added ApprehendOutlawQuest message with outlaw_hero_id field
- Scala: Added case class with quest fulfillment logic
- Failure: Quest fails if the outlaw is no longer in faction territory
- Fulfillment: Completed when ApprehendOutlawCommand targets the outlaw
- Updated ApprehendOutlawCommand to check for quest fulfillment and
  return multiple results (main result + quest completion if matched)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix ApprehendOutlawQuest failure condition

Only fail if the hero is no longer an outlaw anywhere. Moving to a
different province is fine - quest remains valid. Quest fails only
when someone else apprehends them.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:01:39 -08:00
a7b7b0e444 Upgrade Scala 3.7.4, rules_scala 7.1.5, protobuf 33.0, grpc 1.76.0, Bazel 7.7.1 (#5871)
* Upgrade rules_scala 7.1.5, Scala 3.7.4, protobuf 32.1

- Update rules_scala from 7.1.1 to 7.1.5
- Update Scala from 3.7.2 to 3.7.4
- Update protobuf from 29.2 to 32.1 (required by rules_scala 7.1.5+)
- Add force_version for Maven dependency conflicts (gson, errorprone, guava)
- Update -Wconf pattern in tools/BUILD.bazel for Bazel 7/8 compatibility
- Add -Wno-deprecated-copy-with-dtor to suppress protobuf 32.x warning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add grpc 1.76.0, protobuf 33.0, and Bazel 7.7.1 compatibility fixes

- Upgrade grpc from 1.71.0 to 1.76.0.bcr.1 (required for protobuf 33.0)
- Upgrade protobuf from 32.1 to 33.0 (matches grpc 1.76.0 expectations)
- Upgrade Bazel from 7.6.1 to 7.7.1
- Add single_version_override for rules_swift 3.1.2 (grpc needs 3.x, rules_apple needs 2.x)
- Add --features=-module_maps workaround for grpc cf_event_engine macOS build issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:01:15 -08:00
76be41d841 Enable WinBattlesQuest generation (PR 3/3) (#5870)
* Enable WinBattlesQuest generation (PR 3/3)

Adds WinBattlesQuest to the available quest generators. The quest
requires winning 2-4 battles (randomly determined).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix DivineCommandTest for new quest type random sequence

Adding WinBattlesQuest changed the random sequence during quest creation,
causing hero 12 to get a quest with a province target. Updated test
expectation to match the new (correct) notification output.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:27:06 -08:00
8ee4e1475c Add client UI support for WinBattlesQuest (PR 2/3) (#5869)
- DisplayNames.cs: Add "Win Battles" display name
- UnaffiliatedHeroRowController.cs: Show progress (X/Y battles won)
- DivineMessagePromptGenerator: Add divine message text
- QuestEndedGeneratorUtilities: Add quest ended description

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:20:31 -08:00
c583e216d3 Add WinBattlesQuest type (PR 1/3) (#5868)
* Add WinBattlesQuest type (PR 1/3)

Adds a new quest type where a hero asks the player to win X battles
(where X is 2-4). This is a ComponentQuest that tracks progress.

- Proto: Add WinBattlesQuest message and field
- Quest.scala: Add WinBattlesQuest case class extending ComponentQuest
- QuestConverter: Handle WinBattlesQuest toProto/fromProto
- ResolveBattleAction: Increment quest counter when winning battles
- CheckForFulfilledQuestsAction: Quest is fulfilled via ComponentQuest
  handling when componentsFulfilled >= componentCount

This quest never fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add WinBattlesQuest cases to prompt generators

The exhaustive pattern matching on Quest types requires adding cases
to all prompt generators when a new quest type is added.

Also updates CLAUDE.md to require running full test suite before pushing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:07:01 -08:00
f3dea0306d Enable BorderSecurityQuest and WinBattleOutnumberedQuest generation (#5858)
- BorderSecurityQuest: Creates one quest per border province (provinces
  with neighbors controlled by other factions)
- WinBattleOutnumberedQuest: Simple quest with no parameters

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:24:27 -08:00
acf57f3c96 Enable BetrayAllyQuest generation (PR 3b/3) (#5856)
Adds quest generation for BetrayAllyQuest, which is available when
the faction has at least one ally.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:20:33 -08:00
9cb7cadcdf Change BetrayAllyQuest to target specific ally (#5867)
Instead of a generic "betray any ally" quest, BetrayAllyQuest now
targets a specific faction with `targetFactionId`. This makes the
quest more meaningful and allows players to plan strategically.

Changes:
- Proto: Add target_faction_id field to BetrayAllyQuest message
- Quest.scala: Change from case object to case class with targetFactionId
- QuestConverter: Handle new targetFactionId field
- CheckForFailedQuestsAction: Update failure logic to check if specific
  target faction no longer exists or is no longer an ally
- BreakAllianceResolutionHelpers: Check if broken alliance matches
  quest's target faction for fulfillment
- DivineMessagePromptGenerator & QuestEndedGeneratorUtilities: Update
  quest descriptions to mention specific ally name
- UnaffiliatedHeroRowController (C#): Display specific ally name in UI

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:14:20 -08:00
1bbdd18f9f Fix reconnecting status stuck after sleep/wake (#5864)
* Fix reconnecting status stuck after sleep/wake

Race condition: when device wakes from sleep, CheckForIdleTimeout and
HandleStreamingCall both try to initiate reconnection, leading to
conflicting state updates and duplicate retry timers.

Fix: Cancel thread token in CheckForIdleTimeout before disposing the
streaming call, and check the token in HandleStreamingCall exception
handlers to skip ScheduleReconnect if another path is handling it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix threadToken scope to be accessible in catch blocks

Move threadToken declaration outside try block so exception handlers
can check if the token was cancelled.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:58:14 -08:00
aad241ed77 Upgrade Java build toolchain from 17 to 21 (#5866)
Updates .bazelrc to use Java 21 for compilation.

Requires PR #5865 (URL deprecation fix) to be merged first, otherwise
the build will have deprecation warnings from the old URL constructor.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:57:08 -08:00
4ff93ac8fc Fix deprecated URL constructor in LLM integration classes (#5865)
JDK 20+ deprecates `new URL(String)`. Use `URI.create().toURL` instead.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:56:41 -08:00
e3b88215aa Enable SwearBrotherhoodWithHeroQuest generation (PR 3a/3) (#5855)
Adds quest generation for SwearBrotherhoodWithHeroQuest, which targets
vassal heroes in the province who are not already faction leaders.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:52:43 -08:00
c89a4ef51b Add client UI support for 4 new quest types (PR 2/3) (#5853)
Adds C# client display support for:
- SwearBrotherhoodWithHeroQuest: "Swear brotherhood with {heroName}"
- BetrayAllyQuest: "Break an alliance with an ally"
- BorderSecurityQuest: "Control all provinces bordering {provinceName}"
- WinBattleOutnumberedQuest: "Win a battle while outnumbered"

Changes:
- DisplayNames.cs: Add quest type strings
- UnaffiliatedHeroRowController.cs: Add quest descriptions in SetQuestText and ShortQuestString

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:38:58 -08:00
7d07bd97ad Add 4 new quest types with fulfillment logic (PR 1/3) (#5850)
Adds server-side support for:
- SwearBrotherhoodWithHeroQuest: fulfilled when player swears brotherhood with the target hero
- BetrayAllyQuest: fulfilled when player breaks an alliance with an ally
- BorderSecurityQuest: fulfilled when all neighboring provinces of the target province are controlled
- WinBattleOutnumberedQuest: fulfilled when winning a battle while having fewer troops

Each quest has proto definitions, Scala case classes, converter logic, fulfillment/failure
checks, and LLM prompt generators. PR 2 will add client UI and PR 3 will add quest generation.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:29:01 -08:00
5a80fcf765 Add hero faction membership utility functions to FactionUtils (#5861)
Adds two utility functions for checking hero faction membership:

- heroIsInFaction(heroId, factionId, heroes): Efficiently checks if a
  specific hero belongs to a faction by checking hero.factionId
- heroIdsInFaction(factionId, heroes): Returns Set of all hero IDs
  belonging to a faction

These functions check the hero's factionId field, which is the
authoritative source for faction membership. Heroes retain their
factionId when in a province, in a moving army, or imprisoned. They
lose it when exiled, become outlaws, or depart.

This is more reliable than checking province.rulingFactionHeroIds
which misses heroes in moving armies.

Includes comprehensive tests for various scenarios:
- Heroes in provinces
- Heroes in moving armies (retain factionId)
- Imprisoned heroes (retain factionId)
- Exiled heroes (factionId cleared)
- Outlaws (factionId cleared)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:14:21 -08:00
8a2bc8d984 Upgrade to Java 25 (LTS) (#5859)
Upgrade Eagle server and JFR sidecar from Java 21 to Java 25.

Java 25 is the latest LTS release (September 2025). Scala 3.7.2
fully supports JDK 25.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:04:32 -08:00
50c632a8ea Increase battalion backstory length limits (#5860)
- Initial backstory: 50 → 100 words
- Growth per update: 20 → 50 words
- Soft cap: 150 → 300 words

This allows battalion histories to build up more narrative over time
while still keeping them from growing unbounded.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 13:04:11 -08:00
ac11292778 Upgrade to Java 21 (LTS) (#5851)
Upgrade Eagle server and JFR sidecar from Java 17 to Java 21.

Benefits:
- Better garbage collection (Generational ZGC available)
- General JVM performance improvements
- Foundation for future virtual threads adoption
- Supported until 2031

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:07:48 -08:00
de01fc1451 Fix bug report JSON escaping using Newtonsoft.Json (#5852)
Use JsonConvert.ToString() from Newtonsoft.Json for proper JSON string
escaping instead of manual character replacement. This handles all
control characters and edge cases correctly.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:02:59 -08:00
fde8ccf675 Fix S3 credentials: separate credentials for Eagle and admin (#5854)
Eagle and admin server use different S3 buckets:
- Eagle: eagle0 bucket (game data) - uses DO_SPACES_* secrets
- Admin: eagle0-assets bucket (What's New) - uses ACCESS_KEY_ID/SECRET_KEY secrets

The previous change (#5847) broke Eagle by giving it credentials that only
have access to eagle0-assets. This fix:
- Reverts Eagle to use DO_SPACES_* secrets (eagle0 bucket access)
- Adds ADMIN_S3_* env vars for admin server (eagle0-assets bucket access)
- Admin container receives ADMIN_S3_* values as DO_SPACES_* env vars

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:28:30 -08:00
1033a4b730 Use JRE instead of JDK for Eagle server image (#5849)
The Eagle server only needs to run Java, not compile it. Using the JRE
base image instead of JDK reduces the image size from ~273MB to ~120MB.

The JFR sidecar still uses JDK because it needs jcmd for JFR dumps.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:11:27 -08:00
f3959c8c79 Fix collection modified exception in CancelAllPendingSubscriptionAcks (#5848)
TrySetCanceled() can trigger synchronous continuations that re-enter
the lock (C# locks are reentrant) and call Remove() on the dictionary
while the foreach is still iterating, causing InvalidOperationException.

Fix by snapshotting values and clearing the dictionary before cancelling
the TaskCompletionSources.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:02:55 -08:00
f7b76bb30d Fix admin server S3 credentials: use working secrets (#5847)
The docker_build workflow was using DO_SPACES_ACCESS_KEY/SECRET_KEY
secrets which don't have write access. Use ACCESS_KEY_ID/SECRET_KEY
instead, which are the same secrets that work for CI builds.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:26:13 -08:00
eaae3089de Enable release all prisoners quest generation (PR 3/3) (#5846)
Add quest creation logic to QuestCreationUtils.scala:
- Only available if faction's provinces have at least 3 prisoners
- Returns ReleaseAllPrisonersQuest when condition is met

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:09:38 -08:00
eb2e954c2c Add client handling for release all prisoners quest (PR 2/3) (#5845)
- Add QuestTypeString case in DisplayNames.cs
- Add ShortQuestString case in UnaffiliatedHeroRowController.cs

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 10:09:12 -08:00
95b4201819 Add release all prisoners quest types and handling (PR 1/3) (#5842)
Add ReleaseAllPrisonersQuest that requires the faction to release all
prisoners held in their provinces. The quest fails if any prisoner is
executed, moved, or traded away in ransom.

- Add proto definition and Scala case object
- Add proto converter for serialization
- Add fulfillment check (succeeds when 0 prisoners/moving prisoners)
- Add failure handling in ManagePrisonersCommand (Execute, Move)
- Add failure handling in RansomResolutionHelpers (ransom acceptance)
- Add LLM prompts for divine message and quest ended narratives

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:41:54 -08:00
5ba1948c8e Add missing meta file for duel_challenged.wav (#5844)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:36:25 -08:00
2f6ce2d0b7 Move WhatsNewPanelController to always-active Settings object (#5843)
The controller was on the What's New Panel itself, which starts disabled.
This meant Awake() wouldn't run until the panel was first enabled, but
the WhatsNewManager tries to call Show() before that happens - resulting
in the modal blocker appearing without the panel.

Moving the controller to the always-active Settings object ensures it
initializes properly at startup.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:33:30 -08:00
df916f9c29 Enable battalion diversity quest generation (PR 3/3) (#5838)
* Enable battalion diversity quest generation (PR 3/3)

Adds quest creation logic for BattalionDiversityQuest to QuestCreationUtils.

Quest availability:
- Only if province currently has 1-2 battalion types
- This encourages players to diversify their army composition

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Clarify PR dependency structure in quest docs

PR 2 (client) and PR 3 (generation) both depend on PR 1 (types),
but are independent of each other. They can be developed in parallel
and merged in either order after PR 1.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:11:03 -08:00
ddbc960945 Add aggressive docker image cleanup to prevent disk full (#5841)
The existing cleanup only removed dangling images. Now also removes
images older than 24h to prevent disk space exhaustion while keeping
recent images available for rollback.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:10:35 -08:00
e020a0f66c Add client handling for battalion diversity quest (PR 2/3) (#5837)
Adds C# client handling for BattalionDiversityQuest:
- DisplayNames.QuestTypeString() - returns "Battalion Diversity"
- UnaffiliatedHeroRowController.ShortQuestString() - shows quest description

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 08:53:23 -08:00
d60a9f79ec Fetch What's New data via public HTTP URL (#5839)
The S3 API requires credentials with bucket access, but the file is
publicly accessible at assets.eagle0.net. Use HTTP GET for reading
(no credentials needed) and keep S3 API only for writing.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 08:52:16 -08:00
6b55be9457 Add long-press support for right-click on touch devices (#5827)
* Add long-press support for right-click on touch devices

On iPad and other touch devices, right-click is not available. This adds
long-press detection to GeneralClickDetector (used by the strategic map)
to trigger right-click behavior after holding for 0.5 seconds.

- Tracks pointer down time and position
- Triggers right-click after 0.5s if finger hasn't moved >10 pixels
- Suppresses normal left-click if long-press was triggered
- Cancels long-press detection if finger moves too far

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Only enable long-press for touch input, not mouse

Mouse users can right-click, so long-press should only trigger for
touch devices. Check pointerId >= 0 to distinguish touch (0+) from
mouse (-1, -2, -3 for left, right, middle buttons).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 08:35:58 -08:00
716dd97f75 Fix S3 credentials: support both env var formats (#5840)
Restore support for ACCESS_KEY_ID/SECRET_KEY env vars (used by CI)
while also supporting DO_SPACES_* env vars (used by docker-compose).

Priority order:
1. ~/.s3cfg file
2. DO_SPACES_* env vars
3. ACCESS_KEY_ID/SECRET_KEY env vars

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 08:09:18 -08:00
413f70a3b3 Add battalion diversity quest type (PR 1/3 - types only) (#5836)
Adds BattalionDiversityQuest - a quest where unaffiliated heroes want
to see three different types of battalion at near-full strength (80%
capacity) in the current province.

This PR adds:
- Proto message definition
- Scala case object
- Proto converter
- Fulfillment check (near UpgradeBattalionQuest)
- LLM prompt generators

Does NOT generate the quest yet - that will be in PR 3 after client
handling is added in PR 2.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 07:52:59 -08:00
f2e08cdb5d Replace duel_challenged sound with licensed asset (#5825)
* Replace duel_challenged sound with licensed asset

Replace duel_challenged.mp3 (unknown license) with Weapon Draw Metal 1.wav
from the purchased Medieval Combat Sounds Unity Asset Store pack.

The dramatic sword unsheathing sound fits well for a duel challenge.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Wire up Weapon Draw Metal 5 as duel_challenged sound

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 07:50:49 -08:00
056127c614 Fix S3 credentials: use DO_SPACES_* env vars (#5835)
* Add S3 credentials to admin server container

The admin server needs DO_SPACES_* environment variables to access
S3/Spaces for What's New data storage. Without these, the What's New
Management page fails with "static credentials are empty".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix S3 credentials: use DO_SPACES_* env vars

The aws package was looking for ACCESS_KEY_ID/SECRET_KEY env vars,
but docker-compose passes DO_SPACES_ACCESS_KEY/DO_SPACES_SECRET_KEY.
Updated ReadAwsConfig() to use the correct env var names and also
respect DO_SPACES_ENDPOINT.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 07:20:22 -08:00
95dba55902 Add stale PR refs cleanup to iOS CI workflows (#5832)
* Add stale PR refs cleanup to iOS CI workflows

Self-hosted runners persist .git between runs. When a PR is updated,
old local refs may point to commits that were never fetched, causing
"Could not scan for Git LFS files" errors.

Applied to:
- ios_addressables_build.yml
- ios_testflight.yml

(Same fix already present in mac_build.yml and unity_build.yml)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fetch LFS after checkout to avoid stale ref issues

Move LFS fetching out of actions/checkout and into a separate step.
This ensures our stale PR refs cleanup runs before any LFS operations,
avoiding "Could not scan for Git LFS files" errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix LFS fetch order in mac_build and unity_build workflows

Apply the same fix as ios_* workflows: set lfs: false in checkout
and fetch LFS files manually afterward to avoid stale ref issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 07:14:06 -08:00
30379e3e81 Add S3 credentials to admin server container (#5834)
The admin server needs DO_SPACES_* environment variables to access
S3/Spaces for What's New data storage. Without these, the What's New
Management page fails with "static credentials are empty".

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 07:07:13 -08:00
d1a2434c4a Enable province order quest generation (PR 3/3) (#5833)
Add quest creation logic for DevelopProvincesQuest and MobilizeProvincesQuest
to QuestCreationUtils.

Quest parameters:
- Availability: Only if faction has >= 3 provinces
- Target province count: Random 3-5, capped at current province count
- Target months: Random 3-6

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 07:05:42 -08:00
801ce59e29 Add client handling for province order quests (PR 2/3) (#5830)
- Add ADDING_NEW_QUESTS.md documentation explaining the three-PR
  strategy and listing all files that need modification for new quests
- Add DevelopProvincesQuest and MobilizeProvincesQuest cases to
  DisplayNames.QuestTypeString()
- Add quest description strings to UnaffiliatedHeroRowController
  showing progress (e.g., "3/5 months")

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:59:28 -08:00
67a57c73c8 Add click-to-dismiss on modal blockers as safety net (#5829)
* Add click-to-dismiss on modal blockers as safety net

If a modal panel somehow becomes invisible while its blocker remains
active, users can now tap the dimmed area to dismiss it. This prevents
getting stuck with an unresponsive UI.

Applied to all three controllers that share the modal blocker:
- WhatsNewPanelController
- BugReportPanelController
- SettingsPanelController

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Give each modal panel its own dedicated modal blocker

Previously Settings, Bug Report, and What's New panels shared a single
modal blocker, which could cause state conflicts if one panel's blocker
state affected another.

Now each panel has its own dedicated blocker:
- Settings Panel Modal Blocker
- Bug Report Modal Blocker
- What's New Modal Blocker

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:58:56 -08:00
7bc5149e02 Fix What's New entries not showing (S3 fetch error was silently swallowed) (#5831)
The fetchWhatsNewData function was silently swallowing ALL errors and
returning empty data, not just "file not found" errors. This masked
real issues like permission errors.

Now:
- Only returns empty data for actual "NoSuchKey" (file not found) errors
- Logs and returns other errors so they appear on the page
- Logs successful fetches with entry count for debugging

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:57:17 -08:00
ffe40c0c7b Fix What's New 'Add Entry' button not working (#5828)
The htmx form was receiving both an HX-Redirect header and HTML body content.
This caused htmx to swap the content before processing the redirect, making
the button appear to do nothing.

Fix: Return only the HX-Redirect header without body content on success.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:44:55 -08:00
2130313841 Add province order quest types (PR 1/3 - types only) (#5826)
* Add Province Order Quests (Develop/Mobilize)

Add two new quest types where unaffiliated heroes want the faction to
maintain a certain number of provinces in specific order states
(Develop or Mobilize) for a cumulative number of months.

Quest mechanics:
- Availability: Only if faction has >= 3 provinces
- Target province count: Random 3-5, capped at current province count
- Target months: Random 3-6 (componentCount)
- Progress: Each round, if faction has >= X provinces with the required
  order type, componentsFulfilled increments by 1
- Completion: When componentsFulfilled >= componentCount
- Failure: If faction falls below X total provinces

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove ProvinceOrderQuestProgress action result type

Fold the province order quest progress changes into the EndVassalCommandsPhase
action result instead of creating a separate action result type.

Also improve LLM prompt descriptions to explain what Develop and Mobilize
orders mean (Develop = improve agriculture/economy/infrastructure,
Mobilize = organize/train/arm troops for war).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Remove quest generation for province order quests

Keep the proto definitions, Scala types, converters, and handling code
(fulfillment, failure, progress tracking, LLM prompts) but remove the
actual quest creation logic from QuestCreationUtils.

This allows the client to be updated to understand these quest types
before the server starts generating them.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 06:41:47 -08:00
2191 changed files with 397100 additions and 58427 deletions
+15 -5
View File
@@ -5,6 +5,10 @@ common --ui_event_filters=-INFO
common --enable_bzlmod
# Use pre-built protoc binary instead of compiling from source
common --incompatible_enable_proto_toolchain_resolution
common --@com_google_protobuf//bazel/toolchains:prefer_prebuilt_protoc=true
# Don't use toolchains_llvm for the swift app build
common:mactools --ignore_dev_dependency
@@ -29,14 +33,20 @@ common --javacopt="-Xlint:-options"
# Use host_linkopt for macOS-specific flags to avoid passing them to Linux cross-compilation
common:macos --host_linkopt=-Wl,-no_warn_duplicate_libraries
# Workaround for grpc cf_event_engine build error on macOS with Bazel 7.x
# See: https://github.com/grpc/grpc/issues/37619
common:macos --features=-module_maps
# Fix Xcode version caching issue - avoids need for `bazel clean --expunge` after Xcode updates
common:macos --repo_env=DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
common --java_language_version=17
common --java_runtime_version=remotejdk_17
common --tool_java_language_version=17
common --tool_java_runtime_version=remotejdk_17
common --java_language_version=25
common --java_runtime_version=remotejdk_25
common --tool_java_language_version=25
common --tool_java_runtime_version=remotejdk_25
# Workspace status for build stamping (git commit, timestamp)
# Only targets with stamp=1 will use these values; we intentionally
# do NOT set "common --stamp" so non-stamped targets can share the
# remote cache across CI workflows.
common --workspace_status_command=tools/workspace_status.sh
common --stamp
+1 -1
View File
@@ -1 +1 @@
7.6.1
8.5.1
+33
View File
@@ -5,9 +5,42 @@
*.tif filter=lfs diff=lfs merge=lfs -text
*.bytes filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.psb filter=lfs diff=lfs merge=lfs -text
# PSB meta files contain bone/sprite import data and can be very large
*.psb.meta filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
# Exclude pre-existing font files that were committed as blobs (not LFS pointers)
src/main/csharp/**/GUI[[:space:]]Pro[[:space:]]Kit*/**/*.ttf !filter !diff !merge
src/main/csharp/**/Modern[[:space:]]UI[[:space:]]Pack/**/*.ttf !filter !diff !merge
*.herodata filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.FBX filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
# Third-party asset packs: track all files via LFS (never manually edited)
# IMPORTANT: .meta files must stay as text — Unity needs them to resolve asset GUIDs
src/main/csharp/**/DungeonMonsters2D/** filter=lfs diff=lfs merge=lfs -text
src/main/csharp/**/DungeonMonsters2D/**/*.meta !filter !diff !merge
src/main/csharp/**/Raccoon/** filter=lfs diff=lfs merge=lfs -text
src/main/csharp/**/Raccoon/**/*.meta !filter !diff !merge
src/main/csharp/**/Polytope[[:space:]]Studio/** filter=lfs diff=lfs merge=lfs -text
src/main/csharp/**/Polytope[[:space:]]Studio/**/*.meta !filter !diff !merge
src/main/csharp/**/RRFreelance-Characters/** filter=lfs diff=lfs merge=lfs -text
src/main/csharp/**/RRFreelance-Characters/**/*.meta !filter !diff !merge
# Unity Smart Merge - use UnityYAMLMerge for Unity files
# Requires configuring unityyamlmerge in ~/.gitconfig:
# [merge]
# tool = unityyamlmerge
# [mergetool "unityyamlmerge"]
# trustExitCode = false
# cmd = '/Applications/Unity/Hub/Editor/*/Unity.app/Contents/Tools/UnityYAMLMerge' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
*.unity merge=unityyamlmerge
*.prefab merge=unityyamlmerge
*.asset merge=unityyamlmerge
*.mat merge=unityyamlmerge
*.anim merge=unityyamlmerge
*.controller merge=unityyamlmerge
*.physicsMaterial2D merge=unityyamlmerge
*.physicMaterial merge=unityyamlmerge
+11 -3
View File
@@ -11,6 +11,7 @@ on:
- 'src/main/protobuf/net/eagle0/eagle/internal/auth_internal.proto'
- 'src/main/resources/net/eagle0/attributions.json'
- 'ci/BUILD.bazel'
- '.bazelrc'
- '.github/workflows/auth_build.yml'
workflow_dispatch:
inputs:
@@ -40,7 +41,8 @@ jobs:
set -ex
# Build auth server image (Go binary has explicit goos/goarch in BUILD.bazel)
bazel build //ci:auth_server_image
# --stamp is needed for authservice x_defs (git commit, build time)
bazel build --stamp //ci:auth_server_image
# Save the resolved path before any other bazel command changes bazel-bin symlink
IMAGE_PATH=$(readlink -f bazel-bin/ci/auth_server_image)
@@ -77,8 +79,14 @@ jobs:
# Build the push target to get crane in runfiles
bazel build //ci:auth_server_push
# Use crane directly for push
CRANE="bazel-bin/ci/push_auth_server_push.sh.runfiles/rules_oci~~oci~oci_crane_darwin_arm64/crane"
# Find crane binary in runfiles (path varies by Bazel version)
RUNFILES="bazel-bin/ci/push_auth_server_push.sh.runfiles"
CRANE=$(find "$RUNFILES" -path "*darwin*" -name crane 2>/dev/null | head -1)
if [ -z "$CRANE" ] || [ ! -x "$CRANE" ]; then
echo "ERROR: crane not found in runfiles"
find "$RUNFILES" -name crane 2>/dev/null || echo "No crane found at all"
exit 1
fi
echo "Using crane: $CRANE"
# Push with SHA tag
@@ -13,6 +13,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: false
- name: Show disk usage before cleanup
run: |
+33 -2
View File
@@ -8,6 +8,7 @@ on:
- 'WORKSPACE'
- 'MODULE.bazel'
- 'BUILD.bazel'
- '.bazelrc'
- '.github/workflows/bazel_test.yml'
- '!src/main/csharp/**'
- '!src/test/csharp/**'
@@ -17,24 +18,54 @@ on:
- 'WORKSPACE'
- 'MODULE.bazel'
- 'BUILD.bazel'
- '.bazelrc'
- '.github/workflows/bazel_test.yml'
- '!src/main/csharp/**'
- '!src/test/csharp/**'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
lint:
runs-on: [self-hosted, bazel]
steps:
- name: Clean workspace
run: |
git sparse-checkout disable 2>/dev/null || true
git config --local core.sparseCheckout false 2>/dev/null || true
git config --local --unset extensions.worktreeConfig 2>/dev/null || true
rm -f .git/info/sparse-checkout .git/config.worktree 2>/dev/null || true
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Check BUILD.bazel dependencies
run: ./scripts/check_build_deps.sh --strict
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Check JavaScript syntax
run: node --check src/main/go/net/eagle0/admin_server/static/map_editor.js
test:
runs-on: [self-hosted, bazel]
steps:
- name: Clean workspace
run: |
git sparse-checkout disable 2>/dev/null || true
git config --local core.sparseCheckout false 2>/dev/null || true
git config --local --unset extensions.worktreeConfig 2>/dev/null || true
rm -f .git/info/sparse-checkout .git/config.worktree 2>/dev/null || true
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Run tests
run: bazel test --build_event_json_file=test.json //src/test/... //src/main/go/...
- name: Collect failed test logs
+27
View File
@@ -0,0 +1,27 @@
name: Blob Cleanup
on:
schedule:
# Run daily at 04:00 UTC
- cron: '0 4 * * *'
workflow_dispatch: # Allow manual trigger
permissions:
contents: read
jobs:
cleanup:
runs-on: [self-hosted, bazel]
steps:
- uses: actions/checkout@v4
with:
lfs: false
clean: false
- name: Clean up unreferenced blobs
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
bazel run //src/main/go/net/eagle0/build/blob_cleanup:blob_cleanup -- --min-age=1h
+138 -56
View File
@@ -19,6 +19,7 @@ on:
- 'src/main/resources/**'
- 'ci/BUILD.bazel'
- 'MODULE.bazel'
- '.bazelrc'
- 'docker-compose.prod.yml'
- 'nginx/**'
- '.github/workflows/docker_build.yml'
@@ -30,13 +31,16 @@ on:
default: 'false'
type: boolean
# Only allow one deployment at a time to prevent race conditions
# Only allow one deployment at a time; queue new ones (never cancel a running deploy).
# The build-all job checks if it's still the latest commit on main and skips if not,
# so intermediate commits don't waste time building when a newer one is already queued.
concurrency:
group: docker-build-deploy
cancel-in-progress: false # Don't cancel running deployments, queue new ones
cancel-in-progress: false
permissions:
contents: read
actions: write # Required to delete artifacts after deploy
jobs:
# Single consolidated build job - builds all images with one bazel invocation
@@ -49,20 +53,43 @@ jobs:
admin_image_tag: ${{ steps.push-images.outputs.admin_image_tag }}
jfr_sidecar_image_tag: ${{ steps.push-images.outputs.jfr_sidecar_image_tag }}
steps:
- name: Skip if superseded
id: check-latest
run: |
# Check if there's a newer run of this workflow waiting in the queue.
# If so, skip this build — the queued run will deploy a newer commit.
QUEUED=$(curl -s -H "Authorization: Bearer $GH_TOKEN" \
"https://api.github.com/repos/${{ github.repository }}/actions/workflows/docker_build.yml/runs?status=queued" \
| python3 -c "import sys,json; runs=json.load(sys.stdin).get('workflow_runs',[]); print(len([r for r in runs if r['run_number'] > ${{ github.run_number }}]))")
if [ "$QUEUED" -gt 0 ]; then
echo "::notice::Skipping build — $QUEUED newer run(s) queued for this workflow"
echo "skip=true" >> $GITHUB_OUTPUT
fi
env:
GH_TOKEN: ${{ github.token }}
- name: Checkout repository
if: steps.check-latest.outputs.skip != 'true'
uses: actions/checkout@v4
with:
lfs: false
- name: Fetch LFS files needed for admin server
if: steps.check-latest.outputs.skip != 'true'
run: git lfs pull --include="src/main/go/net/eagle0/admin_server/static/tiles/*"
- name: Build all Docker images
if: steps.check-latest.outputs.skip != 'true'
id: build-all
run: |
set -ex
# Build ALL images in a single bazel command - Bazel parallelizes internally
# Note: Shardok is built separately for ARM64 and deployed to Hetzner
# --stamp is needed for admin_server x_defs (git commit, build time)
echo "=== Building Docker images ==="
bazel build \
--stamp \
--platforms=//:linux_x86_64 \
--extra_toolchains=@llvm_toolchain_linux//:all \
//ci:eagle_server_image \
@@ -88,8 +115,16 @@ jobs:
echo "Admin: $ADMIN_PATH"
echo "JFR Sidecar: $JFR_PATH"
- name: Upload warmup binary
if: steps.check-latest.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: warmup-binary
path: scripts/bin/warmup
retention-days: 1
- name: Login to DigitalOcean Container Registry
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_images == 'true')
if: steps.check-latest.outputs.skip != 'true' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_images == 'true'))
env:
DO_TOKEN: ${{ secrets.DO_REGISTRY_TOKEN }}
run: |
@@ -109,44 +144,59 @@ jobs:
GIT_SHA=$(git rev-parse --short=8 HEAD)
# Get crane from push target runfiles
bazel build //ci:eagle_server_push
CRANE="bazel-bin/ci/push_eagle_server_push.sh.runfiles/rules_oci~~oci~oci_crane_darwin_arm64/crane"
if [ ! -e "$CRANE" ]; then
# Fallback: find any Darwin crane
RUNFILES="bazel-bin/ci/push_eagle_server_push.sh.runfiles"
CRANE=$(find "$RUNFILES" -path "*darwin*" -name crane 2>/dev/null | head -1)
# Get crane (cached across runs to avoid rebuilding bazel target)
CRANE_VERSION="v0.20.2"
CRANE_DIR="${HOME}/.local/bin"
CRANE="${CRANE_DIR}/crane"
if [ ! -x "$CRANE" ] || ! "$CRANE" version 2>/dev/null | grep -q "0.20.2"; then
echo "Installing crane ${CRANE_VERSION}..."
mkdir -p "$CRANE_DIR"
curl -sL "https://github.com/google/go-containerregistry/releases/download/${CRANE_VERSION}/go-containerregistry_Darwin_arm64.tar.gz" | tar xzf - -C "$CRANE_DIR" crane
chmod +x "$CRANE"
else
echo "Using cached crane at $CRANE"
fi
if [ -z "$CRANE" ] || [ ! -e "$CRANE" ]; then
echo "ERROR: crane not found"
exit 1
fi
echo "Using crane: $CRANE"
# Push Eagle image
# Set up image paths and tags
EAGLE_IMAGE="${{ steps.build-all.outputs.eagle_path }}"
EAGLE_TAG="registry.digitalocean.com/eagle0/eagle-server:${GIT_SHA}"
echo "Pushing Eagle: $EAGLE_TAG"
$CRANE push "$EAGLE_IMAGE" "$EAGLE_TAG"
$CRANE copy "$EAGLE_TAG" "registry.digitalocean.com/eagle0/eagle-server:latest"
echo "eagle_image_tag=$EAGLE_TAG" >> $GITHUB_OUTPUT
# Push Admin image
ADMIN_IMAGE="${{ steps.build-all.outputs.admin_path }}"
ADMIN_TAG="registry.digitalocean.com/eagle0/admin-server:${GIT_SHA}"
echo "Pushing Admin: $ADMIN_TAG"
$CRANE push "$ADMIN_IMAGE" "$ADMIN_TAG"
$CRANE copy "$ADMIN_TAG" "registry.digitalocean.com/eagle0/admin-server:latest"
echo "admin_image_tag=$ADMIN_TAG" >> $GITHUB_OUTPUT
# Push JFR Sidecar image
JFR_IMAGE="${{ steps.build-all.outputs.jfr_path }}"
JFR_TAG="registry.digitalocean.com/eagle0/jfr-sidecar:${GIT_SHA}"
# Push all three images in parallel
echo "Pushing Eagle: $EAGLE_TAG"
$CRANE push "$EAGLE_IMAGE" "$EAGLE_TAG" &
PID_EAGLE=$!
echo "Pushing Admin: $ADMIN_TAG"
$CRANE push "$ADMIN_IMAGE" "$ADMIN_TAG" &
PID_ADMIN=$!
echo "Pushing JFR Sidecar: $JFR_TAG"
$CRANE push "$JFR_IMAGE" "$JFR_TAG"
$CRANE copy "$JFR_TAG" "registry.digitalocean.com/eagle0/jfr-sidecar:latest"
$CRANE push "$JFR_IMAGE" "$JFR_TAG" &
PID_JFR=$!
# Wait for all pushes to complete
PUSH_FAILED=0
wait $PID_EAGLE || PUSH_FAILED=1
wait $PID_ADMIN || PUSH_FAILED=1
wait $PID_JFR || PUSH_FAILED=1
if [ $PUSH_FAILED -ne 0 ]; then
echo "ERROR: One or more image pushes failed"
exit 1
fi
echo "All images pushed, tagging :latest..."
# Tag :latest in parallel
$CRANE copy "$EAGLE_TAG" "registry.digitalocean.com/eagle0/eagle-server:latest" &
$CRANE copy "$ADMIN_TAG" "registry.digitalocean.com/eagle0/admin-server:latest" &
$CRANE copy "$JFR_TAG" "registry.digitalocean.com/eagle0/jfr-sidecar:latest" &
wait
echo "eagle_image_tag=$EAGLE_TAG" >> $GITHUB_OUTPUT
echo "admin_image_tag=$ADMIN_TAG" >> $GITHUB_OUTPUT
echo "jfr_sidecar_image_tag=$JFR_TAG" >> $GITHUB_OUTPUT
echo "=== All images pushed successfully ==="
@@ -167,6 +217,9 @@ jobs:
EAGLE_ENABLE_S3: ${{ secrets.EAGLE_ENABLE_S3 }}
DO_SPACES_ACCESS_KEY: ${{ secrets.DO_SPACES_ACCESS_KEY }}
DO_SPACES_SECRET_KEY: ${{ secrets.DO_SPACES_SECRET_KEY }}
# Admin server uses different credentials (for eagle0-assets bucket)
ADMIN_S3_ACCESS_KEY: ${{ secrets.ACCESS_KEY_ID }}
ADMIN_S3_SECRET_KEY: ${{ secrets.SECRET_KEY }}
JWT_PRIVATE_KEY: ${{ secrets.JWT_PRIVATE_KEY }}
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
DISCORD_CLIENT_SECRET: ${{ secrets.DISCORD_CLIENT_SECRET }}
@@ -189,9 +242,12 @@ jobs:
DO_DROPLET_IP: ${{ secrets.DO_DROPLET_IP }}
DO_REGISTRY_TOKEN: ${{ secrets.DO_REGISTRY_TOKEN }}
NOTIFY_SECRET: ${{ secrets.EAGLE_NOTIFY_SECRET }}
GITHUB_TOKEN_FOR_ADMIN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Setup SSH key
run: |
@@ -200,11 +256,11 @@ jobs:
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H "$DO_DROPLET_IP" >> ~/.ssh/known_hosts 2>/dev/null || true
- name: Build warmup tool
run: |
bazel build //ci:warmup_tar
mkdir -p scripts/bin
tar -xf bazel-bin/ci/warmup_tar.tar -C scripts/bin --strip-components=1
- name: Download warmup binary
uses: actions/download-artifact@v4
with:
name: warmup-binary
path: scripts/bin/
- name: Copy config files to droplet
run: |
@@ -288,6 +344,8 @@ jobs:
export EAGLE_ENABLE_S3="${EAGLE_ENABLE_S3:-false}"
export DO_SPACES_ACCESS_KEY="${DO_SPACES_ACCESS_KEY}"
export DO_SPACES_SECRET_KEY="${DO_SPACES_SECRET_KEY}"
export ADMIN_S3_ACCESS_KEY="${ADMIN_S3_ACCESS_KEY}"
export ADMIN_S3_SECRET_KEY="${ADMIN_S3_SECRET_KEY}"
export JWT_PRIVATE_KEY="${JWT_PRIVATE_KEY}"
export DISCORD_CLIENT_ID="${DISCORD_CLIENT_ID}"
export DISCORD_CLIENT_SECRET="${DISCORD_CLIENT_SECRET}"
@@ -309,6 +367,7 @@ jobs:
export FASTMAIL_FROM_NAME="${FASTMAIL_FROM_NAME}"
export DO_REGISTRY_TOKEN="${DO_REGISTRY_TOKEN}"
export NOTIFY_SECRET="${NOTIFY_SECRET}"
export GITHUB_TOKEN="${GITHUB_TOKEN_FOR_ADMIN}"
# Check Docker has IPv6 support
if ! cat /etc/docker/daemon.json 2>/dev/null | grep -q '"ip6tables"'; then
@@ -320,29 +379,34 @@ jobs:
echo "Using images: \$EAGLE_IMAGE, \$ADMIN_IMAGE, \$JFR_SIDECAR_IMAGE"
# Install crane for pulling OCI images
echo "Installing crane..."
rm -f crane
curl -sL https://github.com/google/go-containerregistry/releases/download/v0.20.2/go-containerregistry_Linux_x86_64.tar.gz | tar xzf - crane
chmod +x crane
# Install crane for pulling OCI images (cached across deploys)
CRANE_VERSION="v0.20.2"
if [ ! -x crane ] || ! ./crane version 2>/dev/null | grep -q "0.20.2"; then
echo "Installing crane \${CRANE_VERSION}..."
rm -f crane
curl -sL "https://github.com/google/go-containerregistry/releases/download/\${CRANE_VERSION}/go-containerregistry_Linux_x86_64.tar.gz" | tar xzf - crane
chmod +x crane
else
echo "Using cached crane"
fi
# Pull and load all images
echo "Pulling Eagle image..."
./crane pull "\${EAGLE_IMAGE}" eagle.tar && docker load -i eagle.tar && rm eagle.tar
# Pull all images in parallel, then load sequentially
echo "Pulling all images in parallel..."
./crane pull "\${EAGLE_IMAGE}" eagle.tar &
./crane pull "\${ADMIN_IMAGE}" admin.tar &
./crane pull "\${JFR_SIDECAR_IMAGE}" jfr-sidecar.tar &
docker pull nginx:alpine &
docker pull certbot/certbot &
wait
echo "Pulling Admin image..."
./crane pull "\${ADMIN_IMAGE}" admin.tar && docker load -i admin.tar && rm admin.tar
echo "Loading images..."
docker load -i eagle.tar && rm eagle.tar
docker load -i admin.tar && rm admin.tar
# Tag as :latest locally so docker-compose fallback uses correct image
docker tag "\${ADMIN_IMAGE}" registry.digitalocean.com/eagle0/admin-server:latest
docker load -i jfr-sidecar.tar && rm jfr-sidecar.tar
echo "Pulling JFR Sidecar image..."
./crane pull "\${JFR_SIDECAR_IMAGE}" jfr-sidecar.tar && docker load -i jfr-sidecar.tar && rm jfr-sidecar.tar
# Pull other compose images
docker pull nginx:alpine || true
docker pull certbot/certbot || true
echo "All images pulled successfully"
echo "All images pulled and loaded successfully"
# =================================================================
# Verify Shardok connectivity before proceeding with deployment
@@ -401,7 +465,25 @@ jobs:
fi
echo "Admin image verification passed"
# Cleanup
# Cleanup - remove old images to prevent disk full
docker container prune -f
docker image prune -f
# Remove images older than 24h (keeps recent images for rollback)
docker image prune -a -f --filter "until=24h" || true
DEPLOY_SCRIPT
cleanup:
needs: [build-all, deploy]
if: always()
runs-on: ubuntu-latest
steps:
- name: Delete warmup-binary artifact
env:
GH_TOKEN: ${{ github.token }}
run: |
ARTIFACT_ID=$(gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" \
-q '.artifacts[] | select(.name == "warmup-binary") | .id')
if [ -n "$ARTIFACT_ID" ]; then
echo "Deleting warmup-binary artifact (ID: $ARTIFACT_ID)"
gh api -X DELETE "repos/${{ github.repository }}/actions/artifacts/$ARTIFACT_ID" || true
fi
+6 -10
View File
@@ -1,16 +1,7 @@
name: Eagle Build
on:
push:
branches: [ "main" ]
paths:
- 'src/main/scala/**'
- 'src/main/protobuf/net/eagle0/eagle/**'
- 'src/main/protobuf/net/eagle0/common/**'
- 'WORKSPACE'
- 'MODULE.bazel'
- 'BUILD.bazel'
- '.github/workflows/eagle_build.yml'
# Main pushes are covered by docker_build.yml which builds the same target
pull_request:
paths:
- 'src/main/scala/**'
@@ -19,8 +10,13 @@ on:
- 'WORKSPACE'
- 'MODULE.bazel'
- 'BUILD.bazel'
- '.bazelrc'
- '.github/workflows/eagle_build.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
+21 -6
View File
@@ -112,14 +112,29 @@ jobs:
- name: Delete all installer artifacts
if: success() && github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
GH_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ github.token }}
run: |
# Delete ALL eagle-installer artifacts to free up storage
echo "Fetching all eagle-installer artifacts..."
artifact_ids=$(gh api "repos/${{ github.repository }}/actions/artifacts" \
--paginate -q '.artifacts[] | select(.name == "eagle-installer") | .id')
for id in $artifact_ids; do
echo "Deleting artifact ID: $id"
gh api -X DELETE "repos/${{ github.repository }}/actions/artifacts/$id" || true
page=1
while true; do
response=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/repos/${{ github.repository }}/actions/artifacts?per_page=100&page=$page")
ids=$(echo "$response" | python3 -c "
import json, sys
data = json.load(sys.stdin)
for a in data.get('artifacts', []):
if a['name'] == 'eagle-installer':
print(a['id'])
" 2>/dev/null)
if [ -z "$ids" ]; then
break
fi
for id in $ids; do
echo "Deleting artifact ID: $id"
curl -s -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/repos/${{ github.repository }}/actions/artifacts/$id" || true
done
page=$((page + 1))
done
echo "Cleanup complete"
+37 -15
View File
@@ -20,6 +20,10 @@ on:
- "ci/github_actions/upload_addressables.sh"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
@@ -32,31 +36,38 @@ jobs:
runs-on: [self-hosted, macOS, unity-mac]
steps:
- name: Prune stale PR refs
run: |
# Self-hosted runners persist .git between runs. When a PR is updated,
# old local refs (refs/remotes/pull/*/merge) may point to commits whose
# objects were never fetched or have been pruned. Remove these stale refs
# before checkout to prevent "missing object" errors.
if [ -d ".git" ]; then
echo "Pruning stale PR refs..."
git for-each-ref --format='%(refname)' refs/remotes/pull/ 2>/dev/null | \
xargs -r git update-ref -d 2>/dev/null || true
fi
- uses: actions/checkout@v4
with:
lfs: true
clean: true
lfs: false # Fetch LFS after checkout to avoid stale ref issues
clean: false # Library/ persists between runs on self-hosted runners
- name: Pull LFS files
run: git lfs pull
- name: Clean stale files
run: |
git clean -ffd
rm -rf src/main/csharp/net/eagle0/clients/unity/eagle0/Library/Bee/
- name: Fetch LFS files
run: |
git lfs install
git lfs pull
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh ios
- name: Restore Library/
env:
UNITY_CACHE_PLATFORM: ios
run: ./ci/github_actions/restore_library.sh
- name: Build iOS Addressables
run: ./ci/github_actions/build_ios_addressables.sh "$EAGLE0_BUILD_DIR/editor_ios_addressables.log"
- name: Persist Library/
if: success()
env:
UNITY_CACHE_PLATFORM: ios
run: ./ci/github_actions/persist_library.sh
- name: Upload Addressables to CDN
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
@@ -64,6 +75,17 @@ jobs:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: ./ci/github_actions/upload_addressables.sh iOS
- name: Purge CDN cache for iOS addressables
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
DO_CDN_PAT: ${{ secrets.DO_CDN_PAT }}
run: |
curl -s -X DELETE "https://api.digitalocean.com/v2/cdn/endpoints/8c98df29-6f0c-4704-8e82-ca40a2b81aa8/cache" \
-H "Authorization: Bearer $DO_CDN_PAT" \
-H "Content-Type: application/json" \
-d '{"files": ["addressables/iOS/*"]}' \
--fail || echo "Warning: CDN purge failed (non-fatal)"
- name: Archive Build Log
if: success() || failure()
uses: actions/upload-artifact@v4
+48 -78
View File
@@ -11,7 +11,6 @@ on:
permissions:
contents: read
actions: write
env:
# Runner-specific build directory to allow parallel builds on multiple runners
@@ -21,39 +20,43 @@ env:
jobs:
build-unity:
runs-on: [self-hosted, macOS, unity-mac]
outputs:
xcode_project_path: ${{ steps.build.outputs.xcode_project_path }}
runs-on: [self-hosted, macOS, testflight]
steps:
- name: Prune stale PR refs
run: |
# Self-hosted runners persist .git between runs. When a PR is updated,
# old local refs (refs/remotes/pull/*/merge) may point to commits whose
# objects were never fetched or have been pruned. Remove these stale refs
# before checkout to prevent "missing object" errors.
if [ -d ".git" ]; then
echo "Pruning stale PR refs..."
git for-each-ref --format='%(refname)' refs/remotes/pull/ 2>/dev/null | \
xargs -r git update-ref -d 2>/dev/null || true
fi
- uses: actions/checkout@v4
with:
lfs: true
clean: true
lfs: false # Fetch LFS after checkout to avoid stale ref issues
clean: false # Library/ persists between runs on self-hosted runners
fetch-depth: 0
- name: Pull LFS files
run: git lfs pull
- name: Clean stale files
run: |
git clean -ffd
rm -rf src/main/csharp/net/eagle0/clients/unity/eagle0/Library/Bee/
- name: Fetch LFS files
run: |
git lfs install
git lfs pull
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh ios
- name: Restore Library/
env:
UNITY_CACHE_PLATFORM: ios
run: ./ci/github_actions/restore_library.sh
- name: Build iOS Unity Project
id: build
run: |
./ci/github_actions/build_unity_ios.sh "$EAGLE0_BUILD_DIR/eagle0iOS"
echo "xcode_project_path=$EAGLE0_BUILD_DIR/eagle0iOS" >> $GITHUB_OUTPUT
- name: Persist Library/
if: success()
env:
UNITY_CACHE_PLATFORM: ios
run: ./ci/github_actions/persist_library.sh
- name: Upload Addressables to CDN
if: success()
@@ -62,18 +65,16 @@ jobs:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: ./ci/github_actions/upload_addressables.sh iOS
- name: Zip Xcode project for artifact
- name: Purge CDN cache for iOS addressables
if: success()
env:
DO_CDN_PAT: ${{ secrets.DO_CDN_PAT }}
run: |
cd $EAGLE0_BUILD_DIR
# Use tar for speed - Xcode projects have many small files
tar -czf eagle0iOS.tar.gz eagle0iOS
- name: Upload Xcode project
uses: actions/upload-artifact@v4
with:
name: xcode-project-${{ github.run_id }}
path: ${{ env.EAGLE0_BUILD_DIR }}/eagle0iOS.tar.gz
retention-days: 1
curl -s -X DELETE "https://api.digitalocean.com/v2/cdn/endpoints/8c98df29-6f0c-4704-8e82-ca40a2b81aa8/cache" \
-H "Authorization: Bearer $DO_CDN_PAT" \
-H "Content-Type: application/json" \
-d '{"files": ["addressables/iOS/*"]}' \
--fail || echo "Warning: CDN purge failed (non-fatal)"
- name: Archive Build Log
if: success() || failure()
@@ -82,37 +83,12 @@ jobs:
name: editor_ios.log
path: ${{ env.EAGLE0_BUILD_DIR }}/editor_ios.log
retention-days: 5
- name: Cleanup build directory
if: always()
run: rm -rf "${{ env.EAGLE0_BUILD_DIR }}"
archive-and-upload:
needs: build-unity
runs-on: [self-hosted, macOS, unity-mac]
runs-on: [self-hosted, macOS, testflight]
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
ci
scripts
- name: Clean download directory
run: rm -rf $EAGLE0_BUILD_DIR/eagle0iOS
- name: Download Xcode project
uses: actions/download-artifact@v4
with:
name: xcode-project-${{ github.run_id }}
path: ${{ env.EAGLE0_BUILD_DIR }}
- name: Extract Xcode project
run: |
cd $EAGLE0_BUILD_DIR
tar -xzf eagle0iOS.tar.gz
rm eagle0iOS.tar.gz
ls -la eagle0iOS/
- name: Install Signing Certificate
env:
IOS_CERTIFICATE: ${{ secrets.IOS_CERTIFICATE }}
@@ -171,11 +147,23 @@ jobs:
- name: Upload to TestFlight
if: ${{ github.event.inputs.skip_upload != 'true' }}
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}
# App Store Connect API Key (replaces deprecated altool with Apple ID)
# Create at: https://appstoreconnect.apple.com/access/api
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
# Write API key to file (xcodebuild needs a file path)
API_KEY_PATH=$(mktemp)
echo "$APP_STORE_CONNECT_API_KEY" > "$API_KEY_PATH"
export APP_STORE_CONNECT_API_KEY_PATH="$API_KEY_PATH"
chmod +x ./ci/github_actions/upload_testflight.sh
./ci/github_actions/upload_testflight.sh "$EAGLE0_BUILD_DIR/archive/eagle0.ipa"
./ci/github_actions/upload_testflight.sh "$EAGLE0_BUILD_DIR/archive/eagle0.xcarchive" "$APPLE_TEAM_ID" "$PROFILE_UUID"
# Cleanup
rm -f "$API_KEY_PATH"
- name: Upload IPA artifact
# Only keep artifact if we skipped TestFlight upload (for debugging)
@@ -193,21 +181,3 @@ jobs:
- name: Cleanup build directory
if: always()
run: rm -rf "${{ env.EAGLE0_BUILD_DIR }}"
cleanup:
needs: [build-unity, archive-and-upload]
if: always()
runs-on: ubuntu-latest
steps:
- name: Delete intermediate artifacts
env:
GH_TOKEN: ${{ github.token }}
run: |
artifact_name="xcode-project-${{ github.run_id }}"
echo "Deleting artifact: $artifact_name"
artifact_id=$(gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" \
-q ".artifacts[] | select(.name == \"$artifact_name\") | .id")
if [ -n "$artifact_id" ]; then
gh api -X DELETE "repos/${{ github.repository }}/actions/artifacts/$artifact_id" || true
fi
+63 -53
View File
@@ -25,25 +25,19 @@ on:
- "src/main/csharp/net/eagle0/clients/unity/eagle0/ProjectSettings/ProjectVersion.txt"
- "ci/mac/**"
pull_request:
# On PRs, only build Mac when Mac-specific files change. Shared C#/proto
# changes are covered by the Windows build — if it passes, Mac will too.
paths:
- ".github/workflows/mac_build.yml"
- "src/main/csharp/net/eagle0/clients/unity/**"
- "src/main/protobuf/net/eagle0/common/**"
- "src/main/protobuf/net/eagle0/shardok/**"
- "src/main/protobuf/net/eagle0/eagle/api/**"
- "src/main/protobuf/net/eagle0/eagle/common/**"
- "src/main/protobuf/net/eagle0/eagle/views/**"
- "src/main/go/net/eagle0/build/mac_build_handler/**"
- "scripts/build_mac_plugin.sh"
- "scripts/build_sparkle_plugin.sh"
- "scripts/inject_sparkle.sh"
- "scripts/codesign_mac_app.sh"
- "scripts/notarize_submit.sh"
- "scripts/notarize_wait.sh"
- "ci/github_actions/build_mac.sh"
- "ci/github_actions/build_unity_mac.sh"
- "ci/github_actions/upload_addressables.sh"
- "ci/github_actions/ensure_unity_installed.sh"
- "src/main/csharp/net/eagle0/clients/unity/eagle0/ProjectSettings/ProjectVersion.txt"
- "ci/mac/**"
workflow_dispatch:
inputs:
@@ -53,6 +47,10 @@ on:
default: 'false'
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
actions: write # Required to delete artifacts after deploy
@@ -84,29 +82,45 @@ jobs:
fi
- uses: actions/checkout@v4
with:
lfs: true
clean: true # Remove untracked files like old SparklePlugin.bundle
lfs: false # Fetch LFS after checkout to avoid stale ref issues
clean: false # Library/ persists between runs on self-hosted runners
fetch-depth: 0 # For version numbering from git history
- name: Pull LFS files
run: git lfs pull
- name: Clean stale files
run: |
git clean -ffd
# Only clear Bee/ when C# files were added/deleted/renamed (structural
# changes that stale the DAG). Content-only modifications are handled by
# Bee's incremental compilation. See persist_library.sh for background.
BEE_DIR="src/main/csharp/net/eagle0/clients/unity/eagle0/Library/Bee"
SHA_FILE="src/main/csharp/net/eagle0/clients/unity/eagle0/Library/.last_built_sha"
if [ -f "$SHA_FILE" ] && [ -d "$BEE_DIR" ]; then
LAST_SHA=$(cat "$SHA_FILE")
if git diff --diff-filter=ADR --name-only "$LAST_SHA" HEAD -- '*.cs' '*.csproj' '*.asmdef' 2>/dev/null | grep -q .; then
echo "C# files added/deleted/renamed since $LAST_SHA — clearing Bee/"
rm -rf "$BEE_DIR"
else
echo "No structural C# changes since $LAST_SHA — keeping Bee/"
fi
else
echo "No previous build SHA or no Bee/ — clearing Bee/ as safe default"
rm -rf "$BEE_DIR"
fi
- name: Fetch LFS files
run: |
git lfs install
git lfs pull
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh mac
- name: Restore Library/
env:
UNITY_CACHE_PLATFORM: mac
run: ./ci/github_actions/restore_library.sh
- name: Build Mac Unity
run: ./ci/github_actions/build_unity_mac.sh "${{ env.EAGLE0_BUILD_DIR }}/eagle0MAC"
- name: Persist Library/
- name: Save build SHA for Bee/ cache invalidation
if: success()
env:
UNITY_CACHE_PLATFORM: mac
run: ./ci/github_actions/persist_library.sh
run: git rev-parse HEAD > src/main/csharp/net/eagle0/clients/unity/eagle0/Library/.last_built_sha
- name: Upload Addressables to CDN
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
@@ -283,6 +297,8 @@ jobs:
needs: [build-and-sign, wait-notarization]
if: needs.build-and-sign.outputs.should_deploy == 'true'
runs-on: [self-hosted, macOS, unity-mac]
outputs:
deployed_version: ${{ steps.deploy-mac.outputs.deployed_version }}
steps:
- uses: actions/checkout@v4
@@ -305,6 +321,7 @@ jobs:
rm eagle0.app.zip
- name: Deploy Mac Build
id: deploy-mac
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
@@ -335,44 +352,37 @@ jobs:
rm "$SPARKLE_PRIVATE_KEY_PATH"
# Export version for notify step
echo "DEPLOYED_VERSION=$VERSION" >> $GITHUB_ENV
echo "deployed_version=$VERSION" >> $GITHUB_OUTPUT
- name: Notify clients of update
if: success()
env:
NOTIFY_SECRET: ${{ secrets.EAGLE_NOTIFY_SECRET }}
run: |
# Wait for CDN cache to clear
sleep 60
# Notify via admin server (required=false for normal deploys)
curl -X POST "https://admin.eagle0.net/notify-update?platform=mac&version=$DEPLOYED_VERSION&required=false" \
-H "X-Notify-Secret: $NOTIFY_SECRET" \
--fail --silent --show-error || echo "Warning: Failed to notify clients (non-fatal)"
- name: Delete this run's Mac app artifacts
env:
GH_TOKEN: ${{ github.token }}
run: |
# Delete this run's artifacts (names include run ID to avoid conflicts)
for artifact_name in signed-mac-app-${{ github.run_id }} notarized-mac-app-${{ github.run_id }}; do
echo "Deleting artifact: $artifact_name"
artifact_id=$(gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" \
-q ".artifacts[] | select(.name == \"$artifact_name\") | .id")
if [ -n "$artifact_id" ]; then
echo "Deleting artifact ID: $artifact_id"
gh api -X DELETE "repos/${{ github.repository }}/actions/artifacts/$artifact_id" || true
fi
done
echo "Cleanup complete"
# Artifact cleanup is handled by the cleanup job on ubuntu-latest
- name: Cleanup build directory
if: always()
run: rm -rf "${{ env.EAGLE0_BUILD_DIR }}"
notify-mac:
needs: deploy
if: needs.deploy.outputs.deployed_version != ''
runs-on: ubuntu-latest
steps:
- name: Purge CDN cache and notify clients
env:
NOTIFY_SECRET: ${{ secrets.EAGLE_NOTIFY_SECRET }}
DO_CDN_PAT: ${{ secrets.DO_CDN_PAT }}
run: |
# Purge CDN cache so clients get the latest files immediately
curl -s -X DELETE "https://api.digitalocean.com/v2/cdn/endpoints/8c98df29-6f0c-4704-8e82-ca40a2b81aa8/cache" \
-H "Authorization: Bearer $DO_CDN_PAT" \
-H "Content-Type: application/json" \
-d '{"files": ["mac/*", "addressables/StandaloneOSX/*"]}' \
--fail || echo "Warning: CDN purge failed (non-fatal)"
curl -X POST "https://admin.eagle0.net/notify-update?platform=mac&version=${{ needs.deploy.outputs.deployed_version }}&required=false" \
-H "X-Notify-Secret: $NOTIFY_SECRET" \
--fail --silent --show-error || echo "Warning: Failed to notify clients (non-fatal)"
# Cleanup job runs regardless of success/failure to prevent artifact accumulation
cleanup:
needs: [build-and-sign, wait-notarization, deploy]
needs: [build-and-sign, wait-notarization, deploy, notify-mac]
if: always()
runs-on: ubuntu-latest
+37 -17
View File
@@ -10,6 +10,7 @@ on:
- 'src/main/resources/net/eagle0/shardok/**'
- 'ci/BUILD.bazel'
- 'MODULE.bazel'
- '.bazelrc'
- '.github/workflows/shardok_arm64_build.yml'
workflow_dispatch:
inputs:
@@ -19,6 +20,10 @@ on:
default: 'true'
type: boolean
concurrency:
group: shardok-arm64-deploy
cancel-in-progress: false
permissions:
contents: read
@@ -59,12 +64,14 @@ jobs:
if [ "$MAGIC" = "7f454c46" ]; then
echo "SUCCESS: Binary is ELF format (Linux)"
# Check if it's ARM64 (e_machine = 0xB7 = 183 for aarch64)
# od -tx2 reads as a 16-bit value in host byte order (little-endian on macOS),
# so the little-endian ELF bytes b7 00 are displayed as 00b7.
E_MACHINE=$(od -An -j18 -N2 -tx2 "$LINUX_BIN" | tr -d ' ')
echo "ELF e_machine: $E_MACHINE"
if [ "$E_MACHINE" = "b700" ]; then
if [ "$E_MACHINE" = "00b7" ]; then
echo "SUCCESS: Binary is ARM64 (aarch64)"
else
echo "WARNING: Binary e_machine is $E_MACHINE (expected b700 for aarch64)"
echo "WARNING: Binary e_machine is $E_MACHINE (expected 00b7 for aarch64)"
fi
elif [ "$MAGIC" = "cfaeedfe" ] || [ "$MAGIC" = "cffaedfe" ]; then
echo "ERROR: Binary is Mach-O format (macOS) - cross-compilation failed!"
@@ -127,20 +134,19 @@ jobs:
exit 1
fi
# Build a push target to get crane in runfiles
bazel build //ci:eagle_server_push
# Find the Darwin crane binary
RUNFILES="bazel-bin/ci/push_eagle_server_push.sh.runfiles"
CRANE=$(find "$RUNFILES" -path "*darwin*" -name crane 2>/dev/null | head -1)
if [ -z "$CRANE" ]; then
CRANE=$(find "$RUNFILES" -name crane 2>/dev/null | head -1)
# Get crane (cached across runs to avoid rebuilding bazel target,
# which would discard the ARM64 analysis cache due to platform change)
CRANE_VERSION="v0.20.2"
CRANE_DIR="${HOME}/.local/bin"
CRANE="${CRANE_DIR}/crane"
if [ ! -x "$CRANE" ] || ! "$CRANE" version 2>/dev/null | grep -q "0.20.2"; then
echo "Installing crane ${CRANE_VERSION}..."
mkdir -p "$CRANE_DIR"
curl -sL "https://github.com/google/go-containerregistry/releases/download/${CRANE_VERSION}/go-containerregistry_Darwin_arm64.tar.gz" | tar xzf - -C "$CRANE_DIR" crane
chmod +x "$CRANE"
else
echo "Using cached crane at $CRANE"
fi
if [ -z "$CRANE" ] || [ ! -e "$CRANE" ]; then
echo "ERROR: crane not found"
exit 1
fi
echo "Using crane: $CRANE"
# Push with arm64-prefixed SHA tag (same repo as x86, different tag)
GIT_SHA=$(git rev-parse --short=8 HEAD)
@@ -185,8 +191,22 @@ jobs:
echo "Deploying Shardok ARM64: ${{ needs.build-shardok-arm64.outputs.image_tag }}"
# Pull the new image
docker pull "${{ needs.build-shardok-arm64.outputs.image_tag }}"
# Pre-warm NAT64 path to DigitalOcean registry (IPv6-only Hetzner → IPv4 registry)
curl -sf --max-time 10 https://registry.digitalocean.com/v2/ > /dev/null 2>&1 || true
# Pull the new image (retry up to 3 times for NAT64 connectivity flakiness)
for attempt in 1 2 3; do
echo "Pull attempt $attempt..."
if docker pull "${{ needs.build-shardok-arm64.outputs.image_tag }}"; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "ERROR: docker pull failed after 3 attempts"
exit 1
fi
echo "Pull failed, retrying in 10s..."
sleep 10
done
# Stop and remove any container using port 40042 or named shardok*
docker ps -q --filter "publish=40042" | xargs -r docker stop
+6 -11
View File
@@ -1,17 +1,7 @@
name: Shardok Build
on:
push:
branches: [ "main" ]
paths:
- 'src/main/cpp/**'
- 'src/main/proto/net/eagle0/shardok/**'
- 'src/main/proto/net/eagle0/common/**'
- 'src/main/go/net/eagle0/build/**'
- 'WORKSPACE'
- 'MODULE.bazel'
- 'BUILD.bazel'
- '.github/workflows/shardok_build.yml'
# Main pushes are covered by shardok_arm64_build.yml which builds the same target
pull_request:
paths:
- 'src/main/cpp/**'
@@ -21,8 +11,13 @@ on:
- 'WORKSPACE'
- 'MODULE.bazel'
- 'BUILD.bazel'
- '.bazelrc'
- '.github/workflows/shardok_build.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
+58 -32
View File
@@ -15,8 +15,6 @@ on:
- "scripts/build_plugins.sh"
- "scripts/build_windows_plugin.sh"
- "ci/github_actions/build_unity.sh"
- "ci/github_actions/restore_library.sh"
- "ci/github_actions/persist_library.sh"
- "ci/github_actions/upload_addressables.sh"
- "ci/github_actions/ensure_unity_installed.sh"
- "src/main/csharp/net/eagle0/clients/unity/eagle0/ProjectSettings/ProjectVersion.txt"
@@ -36,14 +34,16 @@ on:
- "scripts/build_plugins.sh"
- "scripts/build_windows_plugin.sh"
- "ci/github_actions/build_unity.sh"
- "ci/github_actions/restore_library.sh"
- "ci/github_actions/persist_library.sh"
- "ci/github_actions/upload_addressables.sh"
- "ci/github_actions/ensure_unity_installed.sh"
- "src/main/csharp/net/eagle0/clients/unity/eagle0/ProjectSettings/ProjectVersion.txt"
- "MODULE.bazel"
- "WORKSPACE"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
@@ -54,6 +54,8 @@ env:
jobs:
windows-unity:
runs-on: [self-hosted, macOS, unity-windows]
outputs:
deployed_version: ${{ steps.get-version.outputs.deployed_version }}
steps:
- name: Prune stale PR refs
@@ -69,23 +71,43 @@ jobs:
fi
- uses: actions/checkout@v4
with:
lfs: true
clean: true # Remove untracked files from previous builds
- name: Pull lfs files
run: git lfs pull
lfs: false # Fetch LFS after checkout to avoid stale ref issues
clean: false # Library/ persists between runs on self-hosted runners
- name: Clean stale files
run: |
git clean -ffd
# Only clear Bee/ when C# files were added/deleted/renamed (structural
# changes that stale the DAG). Content-only modifications are handled by
# Bee's incremental compilation. See persist_library.sh for background.
BEE_DIR="src/main/csharp/net/eagle0/clients/unity/eagle0/Library/Bee"
SHA_FILE="src/main/csharp/net/eagle0/clients/unity/eagle0/Library/.last_built_sha"
if [ -f "$SHA_FILE" ] && [ -d "$BEE_DIR" ]; then
LAST_SHA=$(cat "$SHA_FILE")
if git diff --diff-filter=ADR --name-only "$LAST_SHA" HEAD -- '*.cs' '*.csproj' '*.asmdef' 2>/dev/null | grep -q .; then
echo "C# files added/deleted/renamed since $LAST_SHA — clearing Bee/"
rm -rf "$BEE_DIR"
else
echo "No structural C# changes since $LAST_SHA — keeping Bee/"
fi
else
echo "No previous build SHA or no Bee/ — clearing Bee/ as safe default"
rm -rf "$BEE_DIR"
fi
- name: Fetch LFS files
run: |
git lfs install
git lfs pull
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh windows
- name: Restore Library/
env:
UNITY_CACHE_PLATFORM: windows
run: ./ci/github_actions/restore_library.sh
- name: Build Windows unity
run: ./ci/github_actions/build_unity.sh "${{ env.EAGLE0_BUILD_DIR }}/eagle0WIN"
- name: Persist Library/
- name: Save build SHA for Bee/ cache invalidation
if: success()
env:
UNITY_CACHE_PLATFORM: windows
run: ./ci/github_actions/persist_library.sh
run: git rev-parse HEAD > src/main/csharp/net/eagle0/clients/unity/eagle0/Library/.last_built_sha
- name: Upload Addressables to CDN
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
@@ -93,14 +115,14 @@ jobs:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: ./ci/github_actions/upload_addressables.sh StandaloneWindows64
- name: Deploy Windows unity
if: success() && github.ref == 'refs/heads/main' && github.event_name == 'push'
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: bazel run //src/main/go/net/eagle0/build/unity3d_windows_build_handler:unity3d_windows_build_handler -- "${{ env.EAGLE0_BUILD_DIR }}/eagle0WIN" "/tmp/unity_manifest.txt"
- name: Update unified manifest
if: success() && github.ref == 'refs/heads/main' && github.event_name == 'push'
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
@@ -123,21 +145,12 @@ jobs:
# Cleanup
rm -f /tmp/manifest_signing_key
- name: Notify clients of update
if: success() && github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
NOTIFY_SECRET: ${{ secrets.EAGLE_NOTIFY_SECRET }}
- name: Export deployed version
id: get-version
if: success() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
# Wait for CDN cache to clear
sleep 60
# Get version from manifest
VERSION=$(grep "^version=" /tmp/unity_manifest.txt | cut -d= -f2 || date +%Y.%m.%d)
# Notify via admin server (required=false for normal deploys)
curl -X POST "https://admin.eagle0.net/notify-update?platform=windows&version=$VERSION&required=false" \
-H "X-Notify-Secret: $NOTIFY_SECRET" \
--fail --silent --show-error || echo "Warning: Failed to notify clients (non-fatal)"
echo "deployed_version=$VERSION" >> $GITHUB_OUTPUT
- name: Archive build log
if: success() || failure()
@@ -148,4 +161,17 @@ jobs:
retention-days: 5
- name: Cleanup build directory
if: always()
run: rm -rf "${{ env.EAGLE0_BUILD_DIR }}"
run: rm -rf "${{ env.EAGLE0_BUILD_DIR }}"
notify-windows:
needs: windows-unity
if: needs.windows-unity.outputs.deployed_version != ''
runs-on: ubuntu-latest
steps:
- name: Notify clients of update
env:
NOTIFY_SECRET: ${{ secrets.EAGLE_NOTIFY_SECRET }}
run: |
curl -X POST "https://admin.eagle0.net/notify-update?platform=windows&version=${{ needs.windows-unity.outputs.deployed_version }}&required=false" \
-H "X-Notify-Secret: $NOTIFY_SECRET" \
--fail --silent --show-error || echo "Warning: Failed to notify clients (non-fatal)"
+3
View File
@@ -37,5 +37,8 @@ scripts/refresh_name_layers/refresh_name_layers.zip
.metals
api_keys.txt
src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/GeneratedProtos/
src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Plugins/Eagle0Protos/
src/main/csharp/net/eagle0/clients/unity/eagle0/ProjectSettings/Packages/com.unity.dedicated-server/
node_modules/
tools/map_generator/output/
+1
View File
@@ -5,6 +5,7 @@ repos:
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: no-commit-to-branch
args: [--branch, main]
- repo: https://github.com/pocc/pre-commit-hooks
+13
View File
@@ -1,5 +1,9 @@
# CLAUDE.md
## CRITICAL BASH RULES (NEVER VIOLATE)
**NEVER chain bash commands.** Do not use `&&`, `||`, or `;` to combine commands. Each command must be a separate Bash tool call. Use parallel tool calls when commands are independent.
## CRITICAL GIT RULES (NEVER VIOLATE)
**NEVER push directly to main/master.** No exceptions. Not for "small changes." Not for docs. Not ever.
@@ -110,6 +114,10 @@ bazel run gazelle # Update Go build files
1. **If you modified any BUILD.bazel file:** Run `bazel run gazelle` and stage any changes it makes
2. **If you modified C++ or C# files:** Run `clang-format -i` on the modified files
3. **If you modified Scala files:** scalafmt will run automatically via pre-commit hook
4. **ALWAYS run the full test suite for your language changes before pushing:**
- For Scala changes: `bazel test //src/test/scala/...`
- For C++ changes: `bazel test //src/test/cpp/...`
- This catches exhaustive pattern match errors and other compile-time failures that single-target builds miss
The pre-commit hook runs gazelle but only checks if it succeeds - it does NOT verify the BUILD files are in canonical format. The `gazelle_test` will fail if deps are not alphabetically sorted. **Always run gazelle manually after BUILD file changes.**
@@ -221,6 +229,9 @@ to be used for different players or game situations within the same server proce
- Real-time bidirectional streaming with server via `PersistentClientConnection.cs`
- Strategic map UI in `Assets/Eagle/`, tactical battle UI in `Assets/Shardok/`
- Seamless transition between strategic gameplay and hex-based tactical combat
- **NEVER add defensive null checks on Unity Inspector fields** - these hide configuration bugs. If a field isn't
linked in the editor, it should throw a NullReferenceException so the problem is immediately obvious. Silently
skipping code when a required field is null makes bugs harder to find.
**Go (Build Tools):**
@@ -329,6 +340,8 @@ dotty.tools.dotc.core.MissingType: Cannot resolve reference to type net.eagle0.e
**Configuration:** Game parameters in `/src/main/resources/net/eagle0/eagle/game_parameters.json`
**Data Files:** TSV format for battalions, heroes, and other game data
**NEVER modify hero names.** Do not change names in `heroes.tsv`, `generated_heroes`, or any other hero data files. The names are carefully chosen and are not to be altered.
## Deployment
- Bazel handles multi-language builds and dependencies
+143 -29
View File
@@ -1,9 +1,9 @@
module(name = "net_eagle0")
# Version constants
SCALA_VERSION = "3.7.2"
SCALA_VERSION = "3.7.4"
NETTY_VERSION = "4.1.110.Final"
NETTY_VERSION = "4.1.127.Final"
SCALAPB_VERSION = "1.0.0-alpha.1"
@@ -14,13 +14,14 @@ AWS_SDK_VERSION = "2.41.18"
#
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_pkg", version = "1.2.0")
#
# Language Support - Scala
#
bazel_dep(name = "rules_scala", version = "7.1.1")
bazel_dep(name = "rules_scala", version = "7.2.1")
scala_config = use_extension(
"@rules_scala//scala/extensions:config.bzl",
@@ -126,12 +127,44 @@ use_repo(
)
#
# Platform Support - Apple/iOS
# Language Support - Rust
#
bazel_dep(name = "apple_support", version = "1.21.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "rules_apple", version = "4.3.3", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_swift", version = "2.4.0", repo_name = "build_bazel_rules_swift")
bazel_dep(name = "rules_rust", version = "0.68.1")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(edition = "2021")
use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")
crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
crate.from_cargo(
name = "map_generator_crates",
cargo_lockfile = "//src/main/rust/net/eagle0/eagle/map_generator:Cargo.lock",
manifests = ["//src/main/rust/net/eagle0/eagle/map_generator:Cargo.toml"],
)
use_repo(crate, "map_generator_crates")
#
# Platform Support - Apple/iOS
#
# Note: rules_apple is NOT included in the main workspace due to rules_swift
# version conflicts with grpc. SparklePlugin (which needs rules_apple) is built
# in a separate workspace at sparkle_workspace/ to isolate the conflict.
#
bazel_dep(name = "apple_support", version = "1.24.1", repo_name = "build_bazel_apple_support")
# rules_swift is a transitive dep of grpc and flatbuffers with conflicting versions:
# - grpc 1.76.0.bcr.1 requires rules_swift 3.x (compatibility level 3)
# - flatbuffers requires rules_swift 2.x (compatibility level 2)
# We don't use Swift directly, but we need to force a single version.
# Force 3.x since grpc is more complex and harder to downgrade.
single_version_override(
module_name = "rules_swift",
version = "3.1.2",
)
# Register Apple CC toolchain for Objective-C compilation
apple_cc_configure = use_extension(
@@ -144,10 +177,13 @@ use_repo(apple_cc_configure, "local_config_apple_cc")
# Protocol Buffers & RPC
#
bazel_dep(name = "protobuf", version = "29.2", repo_name = "com_google_protobuf")
bazel_dep(name = "grpc", version = "1.71.0")
bazel_dep(name = "grpc-java", version = "1.71.0")
bazel_dep(name = "flatbuffers", version = "25.9.23")
bazel_dep(name = "protobuf", version = "33.5", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_cc", version = "0.2.14")
bazel_dep(name = "grpc", version = "1.74.1")
bazel_dep(name = "grpc-java", version = "1.78.0")
bazel_dep(name = "rules_proto_grpc_csharp", version = "5.8.0")
bazel_dep(name = "flatbuffers", version = "25.12.19")
#
# Testing
@@ -160,16 +196,29 @@ bazel_dep(name = "googletest", version = "1.17.0")
#
bazel_dep(name = "rules_oci", version = "2.2.7")
bazel_dep(name = "aspect_bazel_lib", version = "2.22.4")
bazel_dep(name = "aspect_bazel_lib", version = "2.22.5")
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# Base image for Eagle (Java 17 JDK - includes jcmd for JFR dumps)
# Base image for Eagle (Java 25 JRE - smaller runtime, no dev tools needed)
# Digest pinned for Bazel repository cache hit; update with:
# TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/eclipse-temurin:pull" | python3 -c "import json,sys; print(json.load(sys.stdin)['token'])")
# curl -s -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" "https://registry-1.docker.io/v2/library/eclipse-temurin/manifests/25-jre" | python3 -c "import json,sys; m=json.load(sys.stdin); [print(p['digest']) for p in m.get('manifests',[]) if p['platform']['architecture']=='amd64']"
oci.pull(
name = "eclipse_temurin_17",
name = "eclipse_temurin_25_jre",
digest = "sha256:98236ffdfb61cff3fc4f8e40e5b80460a5a4c35a0f56a5b4182a926844a7db49",
image = "docker.io/library/eclipse-temurin",
platforms = ["linux/amd64"],
tag = "17-jdk",
tag = "25-jre",
)
# Base image for JFR sidecar (Java 25 JDK - includes jcmd for JFR dumps)
oci.pull(
name = "eclipse_temurin_25_jdk",
digest = "sha256:bc2d562355813350f47bc472b9721b0b84761866671ad95d9a9f1151fa69da6e",
image = "docker.io/library/eclipse-temurin",
platforms = ["linux/amd64"],
tag = "25-jdk",
)
# Base image for Shardok (Ubuntu 24.04 for C++ runtime)
@@ -190,13 +239,14 @@ oci.pull(
platforms = ["linux/amd64"],
tag = "3.21",
)
use_repo(oci, "alpine_linux", "alpine_linux_linux_amd64", "eclipse_temurin_17", "eclipse_temurin_17_linux_amd64", "ubuntu_24_04", "ubuntu_24_04_linux_amd64", "ubuntu_24_04_linux_arm64_v8")
use_repo(oci, "alpine_linux", "alpine_linux_linux_amd64", "eclipse_temurin_25_jdk", "eclipse_temurin_25_jdk_linux_amd64", "eclipse_temurin_25_jre", "eclipse_temurin_25_jre_linux_amd64", "ubuntu_24_04", "ubuntu_24_04_linux_amd64", "ubuntu_24_04_linux_arm64_v8")
#
# Java/Scala Dependencies
#
bazel_dep(name = "rules_jvm_external", version = "6.9")
bazel_dep(name = "rules_java", version = "9.3.0")
bazel_dep(name = "rules_jvm_external", version = "6.10")
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
@@ -259,6 +309,9 @@ maven.install(
# Error tracking
"io.sentry:sentry:8.31.0",
# SQLite for client text storage
"org.xerial:sqlite-jdbc:3.46.1.0",
],
duplicate_version_warning = "error",
fail_if_repin_required = True,
@@ -267,6 +320,27 @@ maven.install(
"https://repo1.maven.org/maven2",
],
)
# Force specific versions for dependencies with conflicts between grpc-java and protobuf
maven.artifact(
artifact = "gson",
force_version = True,
group = "com.google.code.gson",
version = "2.11.0",
)
maven.artifact(
artifact = "error_prone_annotations",
force_version = True,
group = "com.google.errorprone",
version = "2.30.0",
)
maven.artifact(
artifact = "guava",
force_version = True,
group = "com.google.guava",
version = "33.3.1-android",
)
use_repo(maven, "maven", "unpinned_maven")
#
@@ -283,7 +357,14 @@ GTL_SHA = "1969c45dd76eac0dd87e9e2b65cffe358617f4fe1bcd203f72f427742537913a"
http_archive(
name = "gtl",
build_file = "@//external:BUILD.gtl",
build_file_content = """
cc_library(
name = "gtl",
hdrs = glob(["include/gtl/*.hpp"]),
includes = ["include"],
visibility = ["//visibility:public"],
)
""",
sha256 = GTL_SHA,
strip_prefix = "gtl-%s" % GTL_VERSION,
url = "https://github.com/greg7mdp/gtl/archive/refs/tags/v%s.zip" % GTL_VERSION,
@@ -303,16 +384,8 @@ http_archive(
],
)
# Sparkle framework for macOS auto-updates
SPARKLE_VERSION = "2.6.4"
http_archive(
name = "sparkle",
build_file = "@//external:BUILD.sparkle",
sha256 = "50612a06038abc931f16011d7903b8326a362c1074dabccb718404ce8e585f0b",
strip_prefix = "",
url = "https://github.com/sparkle-project/Sparkle/releases/download/%s/Sparkle-%s.tar.xz" % (SPARKLE_VERSION, SPARKLE_VERSION),
)
# Note: Sparkle framework is defined in sparkle_workspace/MODULE.bazel
# (not in main workspace due to rules_swift version conflicts)
# Busybox static binary for Docker health checks (provides nc, wget, etc.)
# Primary: DigitalOcean Spaces (public, reliable)
@@ -346,7 +419,48 @@ LLVM_MINGW_VERSION = "20250305"
http_archive(
name = "llvm_mingw",
build_file = "@//external:BUILD.llvm_mingw",
build_file_content = """
package(default_visibility = ["//visibility:public"])
filegroup(
name = "all_files",
srcs = glob(["**/*"]),
)
filegroup(
name = "compiler_files",
srcs = glob([
"bin/x86_64-w64-mingw32-*",
"bin/clang*",
"bin/llvm-*",
"bin/lld*",
]),
)
filegroup(
name = "windows_x86_64_sysroot",
srcs = glob([
"x86_64-w64-mingw32/**/*",
"generic-w64-mingw32/include/**/*",
]),
)
filegroup(
name = "linker_files",
srcs = glob([
"bin/x86_64-w64-mingw32-*",
"bin/lld*",
"bin/ld.lld*",
"lib/**/*",
"x86_64-w64-mingw32/lib/**/*",
]),
)
exports_files([
"bin/x86_64-w64-mingw32-clang",
"bin/x86_64-w64-mingw32-clang++",
])
""",
sha256 = "32c24fc62fc8b9f8a900bf2c730b78b36767688f816f9d21e97a168289ff44e0",
strip_prefix = "llvm-mingw-%s-ucrt-macos-14.4.1-universal" % LLVM_MINGW_VERSION,
urls = ["https://github.com/fathonix/llvm-mingw-arm64ec-macos/releases/download/%s/llvm-mingw-%s-ucrt-macos-14.4.1-universal.tar.xz" % (LLVM_MINGW_VERSION, LLVM_MINGW_VERSION)],
+2539 -3824
View File
File diff suppressed because one or more lines are too long
+10 -2
View File
@@ -73,7 +73,7 @@ pkg_tar(
oci_image(
name = "eagle_server_image",
base = "@eclipse_temurin_17_linux_amd64",
base = "@eclipse_temurin_25_jre_linux_amd64",
entrypoint = [
"java",
"-Xmx2g",
@@ -243,6 +243,13 @@ pkg_tar(
package_dir = "/app",
)
# Package the .e0mj map files for the map editor
pkg_tar(
name = "admin_maps_layer",
srcs = ["//src/main/resources/net/eagle0/shardok/maps:maps_json"],
package_dir = "/app/maps",
)
oci_image(
name = "admin_server_image",
base = "@alpine_linux_linux_amd64",
@@ -251,6 +258,7 @@ oci_image(
tars = [
":busybox_layer",
":admin_binary_layer",
":admin_maps_layer",
],
workdir = "/app",
)
@@ -288,7 +296,7 @@ pkg_tar(
oci_image(
name = "jfr_sidecar_image",
# Use JDK base image - we need jcmd to dump JFR recordings
base = "@eclipse_temurin_17_linux_amd64",
base = "@eclipse_temurin_25_jdk_linux_amd64",
entrypoint = ["/app/jfr_server_linux_amd64"],
exposed_ports = ["8081/tcp"],
tars = [
+11
View File
@@ -31,6 +31,17 @@ fi
echo "Found Xcode project: $XCODEPROJ"
# Ensure export compliance key is set in Info.plist
# This bypasses the "Missing Compliance" prompt in App Store Connect.
# Set here rather than relying solely on Unity's DeepLinkPostProcessor,
# which depends on UNITY_IOS being defined at script compilation time.
INFO_PLIST="$XCODE_PROJECT_PATH/Info.plist"
if [ -f "$INFO_PLIST" ]; then
/usr/libexec/PlistBuddy -c "Set :ITSAppUsesNonExemptEncryption false" "$INFO_PLIST" 2>/dev/null \
|| /usr/libexec/PlistBuddy -c "Add :ITSAppUsesNonExemptEncryption bool false" "$INFO_PLIST"
echo "Set ITSAppUsesNonExemptEncryption=false in Info.plist"
fi
# Unity always generates "Unity-iPhone" as the main app scheme
SCHEME="Unity-iPhone"
echo "Using scheme: $SCHEME"
-33
View File
@@ -1,33 +0,0 @@
#!/bin/bash
#
# Persist Unity Library/ cache to persistent storage
#
# Environment variables:
# UNITY_CACHE_PLATFORM - Platform identifier (e.g., "mac", "windows")
# Defaults to "mac" if not set
#
# Note: Library/Bee/ is excluded because it contains DAG files with hardcoded
# file paths that become stale when project files change. This prevents
# "Data at the root level is invalid" XML errors from stale references.
set -uxo pipefail
PLATFORM="${UNITY_CACHE_PLATFORM:-mac}"
CACHE_DIR="/tmp/eagle0/Library-${PLATFORM}"
/bin/echo "persist Library/ to $CACHE_DIR (excluding Bee/)"
# rsync may exit with code 23 ("partial transfer due to error") if Unity's
# temporary files vanish during the copy. This is acceptable for a cache.
/usr/bin/rsync -rtlDvq --exclude='Bee/' src/main/csharp/net/eagle0/clients/unity/eagle0/Library/ "$CACHE_DIR/"
rsync_exit=$?
if [ $rsync_exit -eq 0 ]; then
exit 0
elif [ $rsync_exit -eq 23 ]; then
echo "Warning: rsync exited with 23 (some files vanished during copy). This is expected for Unity temp files."
exit 0
else
echo "Error: rsync failed with exit code $rsync_exit"
exit $rsync_exit
fi
-16
View File
@@ -1,16 +0,0 @@
#!/bin/bash
#
# Restore Unity Library/ cache from persistent storage
#
# Environment variables:
# UNITY_CACHE_PLATFORM - Platform identifier (e.g., "mac", "windows")
# Defaults to "mac" if not set
set -euxo pipefail
PLATFORM="${UNITY_CACHE_PLATFORM:-mac}"
CACHE_DIR="/tmp/eagle0/Library-${PLATFORM}"
/bin/echo "restore Library/ from $CACHE_DIR"
/bin/mkdir -p "$CACHE_DIR"
/usr/bin/rsync -rtlDvq "$CACHE_DIR/" src/main/csharp/net/eagle0/clients/unity/eagle0/Library/
+80 -26
View File
@@ -1,48 +1,102 @@
#!/usr/bin/env bash
# Upload IPA to TestFlight using Apple ID credentials (same as Mac notarization)
# Upload xcarchive to TestFlight using App Store Connect API Key
# This replaces the deprecated altool which was removed in Xcode 14+
#
# Uses xcodebuild -exportArchive with destination=upload, which is Apple's
# recommended approach for CI/CD pipelines.
set -euxo pipefail
IPA_PATH=${1:?Usage: upload_testflight.sh <ipa_path>}
# Ensure xcodebuild uses Xcode.app, not Command Line Tools
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
if [ ! -f "$IPA_PATH" ]; then
echo "Error: IPA file not found: $IPA_PATH"
ARCHIVE_PATH=${1:?Usage: upload_testflight.sh <xcarchive_path> <team_id> <profile_uuid>}
TEAM_ID=${2:?Missing team ID}
PROFILE_UUID=${3:?Missing provisioning profile UUID}
if [ ! -d "$ARCHIVE_PATH" ]; then
echo "Error: xcarchive not found: $ARCHIVE_PATH"
exit 1
fi
echo "Uploading to TestFlight: $IPA_PATH"
echo "Uploading to TestFlight: $ARCHIVE_PATH"
# Uses same credentials as Mac notarization:
# - APPLE_ID: Your Apple ID email
# - APP_SPECIFIC_PASSWORD: App-specific password from appleid.apple.com
# Requires App Store Connect API Key:
# - APP_STORE_CONNECT_API_KEY_ID: Key ID from App Store Connect
# - APP_STORE_CONNECT_API_ISSUER_ID: Issuer ID from App Store Connect
# - APP_STORE_CONNECT_API_KEY_PATH: Path to .p8 private key file
#
# To create an API key:
# 1. Go to https://appstoreconnect.apple.com/access/api
# 2. Click the + button to create a new key
# 3. Give it a name and Admin or App Manager access
# 4. Download the .p8 file (you can only download it once!)
# 5. Note the Key ID and Issuer ID shown on the page
if [ -z "${APPLE_ID:-}" ]; then
echo "Error: APPLE_ID environment variable not set"
if [ -z "${APP_STORE_CONNECT_API_KEY_ID:-}" ]; then
echo "Error: APP_STORE_CONNECT_API_KEY_ID environment variable not set"
echo "Create an API key at https://appstoreconnect.apple.com/access/api"
exit 1
fi
if [ -z "${APP_SPECIFIC_PASSWORD:-}" ]; then
echo "Error: APP_SPECIFIC_PASSWORD environment variable not set"
if [ -z "${APP_STORE_CONNECT_API_ISSUER_ID:-}" ]; then
echo "Error: APP_STORE_CONNECT_API_ISSUER_ID environment variable not set"
exit 1
fi
echo "Uploading with xcrun altool..."
# Capture output to check for errors (altool may return 0 even on failure)
OUTPUT=$(xcrun altool --upload-app \
--type ios \
--file "$IPA_PATH" \
--username "$APPLE_ID" \
--password "$APP_SPECIFIC_PASSWORD" 2>&1) || true
echo "$OUTPUT"
# Check for error indicators in output
if echo "$OUTPUT" | grep -q "ERROR:"; then
echo "ERROR: Upload failed. See error messages above."
if [ -z "${APP_STORE_CONNECT_API_KEY_PATH:-}" ]; then
echo "Error: APP_STORE_CONNECT_API_KEY_PATH environment variable not set"
exit 1
fi
if [ ! -f "$APP_STORE_CONNECT_API_KEY_PATH" ]; then
echo "Error: API key file not found: $APP_STORE_CONNECT_API_KEY_PATH"
exit 1
fi
# Create export options plist with upload destination
EXPORT_OPTIONS_PLIST=$(mktemp)
trap "rm -f $EXPORT_OPTIONS_PLIST" EXIT
cat > "$EXPORT_OPTIONS_PLIST" << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>upload</string>
<key>method</key>
<string>app-store-connect</string>
<key>teamID</key>
<string>$TEAM_ID</string>
<key>uploadSymbols</key>
<true/>
<key>signingStyle</key>
<string>manual</string>
<key>signingCertificate</key>
<string>Apple Distribution: Daniel Crosby (UWJ88DX8WQ)</string>
<key>provisioningProfiles</key>
<dict>
<key>net.eagle0.eagle</key>
<string>$PROFILE_UUID</string>
</dict>
</dict>
</plist>
EOF
echo "Export options:"
cat "$EXPORT_OPTIONS_PLIST"
echo "Uploading to App Store Connect..."
# Use xcodebuild to upload with App Store Connect API authentication
xcodebuild -exportArchive \
-archivePath "$ARCHIVE_PATH" \
-exportOptionsPlist "$EXPORT_OPTIONS_PLIST" \
-authenticationKeyPath "$APP_STORE_CONNECT_API_KEY_PATH" \
-authenticationKeyID "$APP_STORE_CONNECT_API_KEY_ID" \
-authenticationKeyIssuerID "$APP_STORE_CONNECT_API_ISSUER_ID"
echo "Upload complete! Check App Store Connect for processing status."
echo "The build should appear in TestFlight within 15-30 minutes after processing."
+10
View File
@@ -208,9 +208,19 @@ services:
- "${JFR_SIDECAR_ADDR:-jfr-sidecar:8081}" # Can be switched for blue-green
- "--http-port"
- "8080"
- "--maps-dir"
- "/app/maps"
environment:
# Secret for CI to authenticate client update notifications
NOTIFY_SECRET: "${NOTIFY_SECRET:-}"
# S3/Spaces credentials for What's New storage (uses eagle0-assets bucket)
DO_SPACES_ENDPOINT: "${DO_SPACES_ENDPOINT:-https://sfo3.digitaloceanspaces.com}"
DO_SPACES_ACCESS_KEY: "${ADMIN_S3_ACCESS_KEY:-}"
DO_SPACES_SECRET_KEY: "${ADMIN_S3_SECRET_KEY:-}"
# GitHub PAT for map editor PR creation (scoped to contents:write + pull_requests:write)
GITHUB_TOKEN: "${GITHUB_TOKEN:-}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# No external port - accessed via nginx at admin.eagle0.net
depends_on:
- auth
+242
View File
@@ -0,0 +1,242 @@
# Adding New Quest Types
This document describes how to add new quest types to Eagle. Quests are tasks that unaffiliated heroes want factions to complete before they'll join.
## Deployment Strategy: Three-PR Approach
When adding new quest types, use a three-PR strategy to ensure clients never see quests they don't understand:
1. **PR 1 - Types Only (Server)**: Add proto definitions, Scala types, converters, and all handling logic (fulfillment, failure, LLM prompts). Do NOT generate the quests yet.
2. **PR 2 - Client Handling**: Add client-side display code (C#/Unity) that can render the new quest type.
3. **PR 3 - Quest Generation (Server)**: Add the actual quest creation logic to `QuestCreationUtils.scala`.
**PR Dependencies:**
```
PR 1 (types)
├── PR 2 (client)
└── PR 3 (generation)
```
PR 2 and PR 3 both depend on PR 1, but are independent of each other. They can be developed in parallel after PR 1 is merged, and merged in either order. The key constraint is that PR 3 should not be deployed before PR 2, so clients understand the quest type before the server starts generating it.
## Files to Modify
### Server-Side (Scala)
#### 1. Proto Definition
**File:** `src/main/protobuf/net/eagle0/eagle/common/unaffiliated_hero_quest.proto`
Add a new message type for your quest and add it to the `QuestDetails` oneof:
```protobuf
message MyNewQuest {
int32 some_field = 1;
string another_field = 2;
}
// In the QuestDetails message, add to the oneof:
oneof sealed_value {
// ... existing quests ...
MyNewQuest my_new_quest = XX; // Use next available field number
}
```
#### 2. Scala Case Class
**File:** `src/main/scala/net/eagle0/eagle/model/state/quest/Quest.scala`
Add a case class (or case object for quests with no parameters):
```scala
case class MyNewQuest(
someField: Int,
anotherField: String
) extends Quest
// For quests with multi-part completion, extend ComponentQuest:
case class MyComponentQuest(
override val componentCount: Int,
override val componentsFulfilled: Int,
targetValue: Int
) extends ComponentQuest {
override def withComponentsFulfilled(componentsFulfilled: Int): Quest =
this.copy(componentsFulfilled = componentsFulfilled)
}
```
#### 3. Proto Converter
**File:** `src/main/scala/net/eagle0/eagle/model/proto_converters/QuestConverter.scala`
Add conversions in both `toProto` and `fromProto` methods:
```scala
// In toProto:
case q: MyNewQuest =>
QuestProto(details = MyNewQuestProto(q.someField, q.anotherField))
// In fromProto:
case MyNewQuestProto(someField, anotherField, _) =>
MyNewQuest(someField, anotherField)
```
#### 4. Quest Fulfillment Check
**File:** `src/main/scala/net/eagle0/eagle/library/actions/impl/action/CheckForFulfilledQuestsAction.scala`
Add a case to `didFulfillQuest` that returns `true` when the quest conditions are met:
```scala
case MyNewQuest(someField, anotherField) =>
// Return true if quest is fulfilled
someConditionIsMet(province, someField)
```
For `ComponentQuest` subclasses, the base case `case q: ComponentQuest => q.componentsFulfilled >= q.componentCount` handles fulfillment automatically.
#### 5. Quest Failure Check
**File:** `src/main/scala/net/eagle0/eagle/library/actions/impl/action/CheckForFailedQuestsAction.scala`
Add a case to `isQuestFailed` if your quest can fail (e.g., if a required faction is destroyed):
```scala
case MyNewQuest(someField, _) =>
// Return true if quest can no longer be completed
!factionWithId(someField).exists(_.isActive)
```
Many quests use the default case that returns `false` (quest never fails automatically).
#### 6. LLM Prompt Generators
**File:** `src/main/scala/net/eagle0/eagle/library/actions/llm_prompt_generators/DivineMessagePromptGenerator.scala`
Add a case to `describeQuest` for when a soothsayer reveals the quest:
```scala
case MyNewQuest(someField, anotherField) =>
TextGenerationSuccess(
s"$divinedHeroName wants ${faction.name} to do something with $someField."
)
```
**File:** `src/main/scala/net/eagle0/eagle/library/actions/llm_prompt_generators/QuestEndedGeneratorUtilities.scala`
Add a case to `pastTenseQuestDescription` for quest fulfilled/failed narratives:
```scala
case MyNewQuest(someField, anotherField) =>
for {
unaffiliatedHeroName <- unaffiliatedHeroNameResult
} yield s"$unaffiliatedHeroName wanted ${faction.name} to do something with $someField."
```
#### 7. Quest Creation (PR 3 only)
**File:** `src/main/scala/net/eagle0/eagle/library/util/quest_creation/QuestCreationUtils.scala`
Add a quest creator function and register it in `availableQuests`:
```scala
private def myNewQuests(
province: ProvinceT,
allProvinces: Vector[ProvinceT],
@unused factions: Vector[FactionT],
@unused battalions: Vector[BattalionT],
functionalRandom: FunctionalRandom
): RandomState[Vector[Quest]] = {
// Return empty if quest shouldn't be available
if (!someCondition) RandomState(Vector(), functionalRandom)
else {
functionalRandom.nextIntInclusive(minValue, maxValue).map { value =>
Vector(MyNewQuest(value, "something"))
}
}
}
// Add to availableQuests list:
def availableQuests(...) = functionalRandom.nextFlatMap(
Vector[QuestCreator](
// ... existing creators ...
myNewQuests
)
) { ... }
```
#### 8. Optional: Quest Command Selectors (AI auto-completion)
**Directory:** `src/main/scala/net/eagle0/eagle/library/util/command_choice_helpers/quest_command_selectors/`
If you want AI players to automatically work toward completing your quest, create a command chooser.
### Client-Side (C#/Unity)
#### 1. Quest Type Display Name
**File:** `src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Eagle/DisplayNames.cs`
Add a case to `QuestTypeString`:
```csharp
case SealedValueOneofCase.MyNewQuest: return "My New Quest";
```
#### 2. Quest Description String
**File:** `src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Eagle/Table Rows/UnaffiliatedHeroRowController.cs`
Add a case to `ShortQuestString` for displaying the quest in the UI:
```csharp
case SealedValueOneofCase.MyNewQuest: {
var details = quest.Details.MyNewQuest;
return $"Do something with {details.SomeField}";
}
```
For quests involving heroes (where you want dynamic name updates), add a case to `SetQuestText` instead.
### Build Files
After making changes, run:
```bash
bazel run gazelle
```
This updates BUILD.bazel files with any new dependencies.
## Quest Type Categories
### Simple Quests
Quests with fixed completion conditions (e.g., `AllianceQuest`, `SuppressRiotByForceQuest`).
### Component Quests
Quests with multi-part completion that track progress via `componentsFulfilled` / `componentCount` (e.g., `AlmsToProvinceQuest`, `DevelopProvincesQuest`). Extend `ComponentQuest` and implement `withComponentsFulfilled`.
### Action Quests
Quests completed by specific player actions rather than state checks. Return `false` in `didFulfillQuest` and handle completion in the relevant command handler (e.g., `ExecutePrisonerQuest` is fulfilled in prisoner management command).
## Testing
1. Build all modified targets:
```bash
bazel build //src/main/scala/net/eagle0/eagle/model/state/quest:quest
bazel build //src/main/scala/net/eagle0/eagle/model/proto_converters:quest_converter
```
2. Run tests:
```bash
bazel test //src/test/scala/...
```
3. Verify proto/Scala parity:
```bash
bazel test //src/test/scala/net/eagle0/eagle/model/action_result/types:action_result_type_parity_test
```
## Current Quest Types (30 total)
- **Diplomacy**: AllianceQuest, TruceWithFactionQuest, TruceCountQuest, DefeatFactionQuest
- **Development**: ImproveAgricultureQuest, ImproveEconomyQuest, ImproveInfrastructureQuest, TotalDevelopmentQuest
- **Expansion**: SpecificExpansionQuest, ExpandToProvincesQuest
- **Military**: GrandArmyQuest, UpgradeBattalionQuest, FightBeastsAloneQuest
- **Resources**: WealthQuest, AlmsToProvinceQuest, AlmsAcrossRealmQuest, GiveToHeroesInProvinceQuest, GiveToHeroesAcrossRealmQuest
- **Personnel**: DismissSpecificVassalQuest, RescueImprisonedLeaderQuest
- **Prisoner**: ExecutePrisonerQuest, ExilePrisonerQuest, ReleasePrisonerQuest, ReturnPrisonerQuest
- **Province Orders**: DevelopProvincesQuest, MobilizeProvincesQuest
- **Events**: SuppressRiotByForceQuest
+30 -3
View File
@@ -12,7 +12,7 @@ This document catalogs all media assets in the Unity project for licensing revie
|----------|-------|-------|
| Images | 10,637 | Mostly PNG icons and UI sprites |
| Audio | 1,778 | 26 music tracks + 1,752 sound effects |
| 3D Models | 52 | Bridge pack only |
| 3D Models | 66+ | Bridge pack, Animal pack deluxe, Honey Badger |
| Fonts | 16 | TTF files |
---
@@ -55,6 +55,30 @@ These are commercial Unity Asset Store purchases tied to your account:
- **Contents:** Bridge construction pieces
- **License:** Unity Asset Store
### Animal pack deluxe
- **Location:** `Assets/Animal pack deluxe/`
- **Publisher:** janpec
- **Asset Store Link:** https://assetstore.unity.com/packages/3d/characters/animals/animal-pack-deluxe-99702
- **Contents:** 26 rigged and animated 3D animal models (bear, boar, crocodile, wolf, frog, crab, rabbit, scorpion, snake, stag, deer, rat, goat, pig, etc.) with idle, walk, run, eat, attack, and die animations
- **Used for:** Beast province effects on the strategic map (AnimalEffect)
- **License:** Unity Asset Store
### 2D Monster Pack: Basic Bundle (+PSB)
- **Location:** `Assets/DungeonMonsters2D/`
- **Publisher:** SP1
- **Asset Store Link:** https://assetstore.unity.com/packages/2d/characters/2d-monster-pack-basic-bundle-psb-328637
- **Contents:** 2D animated monster sprites with PSB (Photoshop) source files. Characters: SkeletonWarrior, SkeletonArcher, SkeletonMage, Zombie, ZombieWarrior, Demon, Succubus, Imp, Spider, Rat, Vampire, DragonRed, Butcher
- **Used for:** Beast province effects (MonsterEffect, DragonEffect) and human-type beast effects on the strategic map
- **License:** Unity Asset Store
### Honey Badger 3D Model
- **Location:** `Assets/HoneyBadger/`
- **Creator:** WildMesh 3D (@WildMesh_3D)
- **Source:** https://sketchfab.com/3d-models/realistic-honey-badger-3d-model-09751ed5383c4afb924cfb6485d313f1
- **Contents:** Rigged 3D honey badger model (FBX) with 63 animations and PBR texture
- **Used for:** Honey badger beast province effect (AnimalEffect)
- **License:** Purchased via Sketchfab/Patreon
### Fantasy Interface Sounds
- **Location:** `Assets/Fantasy Interface Sounds/`
- **Count:** 320 WAV files
@@ -182,11 +206,14 @@ All 26 tracks have CC licenses with proper attribution:
- `failure_horn.mp3` - licensing issue, no replacement found in purchased assets
- ~~`runaway.mp3`~~ - **REPLACED** (2026-01-27) with `MedievalArmyRunningLoop.mp3` from Freesound (CC BY 4.0)
**Presumed from Unity Asset Store purchases (31 files):**
**Verified from [Medieval Combat Sounds](https://assetstore.unity.com/packages/audio/sound-fx/medieval-combat-sounds-100465) (Unity Asset Store):**
- `duel_challenged.wav` - **REPLACED** (2026-02-03) with `Weapon Draw Metal 1.wav` from Medieval Combat Sounds
**Presumed from Unity Asset Store purchases (30 files):**
Owner believes these are from: Fantasy Interface Sounds, Medieval Combat Sounds, Magic Spells Sound Effects LITE, and/or Medieval Battle Sound Pack.
- `archery.mp3`, `battle_shout.mp3`, `boo.mp3`, `braved_water.mp3`
- `build_bridge.mp3`, `build_bridge_failure.mp3`, `charge.mp3`
- `dismiss_unit.mp3`, `duel_challenged.mp3`, `failure_horn.mp3`, `fear.mp3`, `fear_failed.mp3`
- `dismiss_unit.mp3`, `failure_horn.mp3`, `fear.mp3`, `fear_failed.mp3`
- `fire_extinguish.mp3`, `fire_spread.mp3`, `fire_start.mp3`, `fire_start_failure.mp3`
- `freeze.mp3`, `holy_wave.mp3`, `holy_wave_damage.mp3`, `jail_door.mp3`, `lightning.mp3`
- `melee.mp3`, `meteor.mp3`, `mind_control.mp3`, `move.mp3`, `move 1.mp3`
+163
View File
@@ -0,0 +1,163 @@
# Adding Beast-Type-Specific Effects
When a province has a `BeastsEvent`, `ProvinceBeastsController` spawns a visual effect at the province centroid. By default this is the generic `BeastsEffect` (circling vultures/crows). Beast-specific effects can override this based on `BeastInfo.SingularName`.
## Architecture
```
ProvinceBeastsController
├── GetBeastName(province) → reads BeastsEvent.BeastInfo.SingularName
├── GetEffectPrefab(beastName) → switch on name → returns prefab
└── SpawnBeastsEffect(provinceId, beastName) → instantiates at centroid
```
**Key files:**
| File | Purpose |
|------|---------|
| `Assets/Eagle/ProvinceBeastsController.cs` | Routes beast names to prefabs, positions effects |
| `Assets/Eagle/BeastsEffect.cs` | Generic effect (circling birds via particle system) |
| `Assets/Eagle/DragonEffect.cs` | Dragon-specific effect (animated PSD Importer prefab) |
| `Assets/Eagle/MonsterEffect.cs` | Wandering 2D monster group (DungeonMonsters2D prefabs) |
| `Assets/Eagle/AnimalEffect.cs` | Wandering 3D animal group (Animal Pack Deluxe prefabs) |
| `Assets/Eagle/Effects/` | All effect prefabs |
## Adding a new beast type
### 1. Create the effect MonoBehaviour (or reuse an existing one)
Three effect scripts exist for different asset types:
**MonsterEffect** (2D sprites, DungeonMonsters2D): Spawns a group of wandering 2D monsters. Uses PascalCase animator states (`Idle`, `Move`) and triggers (`AttackTrigger`, `SpecialATrigger`). Flips sprite X scale for facing direction. Best for DungeonMonsters2D prefabs.
**AnimalEffect** (3D models, Animal Pack Deluxe): Spawns a group of wandering 3D animals. Uses lowercase animator states (`idle`, `walk`, `eat`, `attack`) with `Animator.Play()`. Rotates model on Y axis for facing. Sets `sortingOrder=103`, `renderQueue=4000`, and `ZTest=Always` to render above the map. Best for Animal Pack Deluxe prefabs.
**DragonEffect** (single animated 2D creature): Spawns one creature that circles the province center. Uses DungeonMonsters2D-style triggers. Best for unique single-creature effects.
**Particle-based** (like `BeastsEffect.cs`): Good for simple effects like swarms or atmospheric particles.
To create a new effect script, use `[RequireComponent(typeof(RectTransform))]` for UI canvas positioning and accept tuning parameters as public fields.
### 2. Create the prefab
1. Create an empty GameObject in `Assets/Eagle/Effects/`
2. Add a `RectTransform` component
3. Add your effect MonoBehaviour
4. Wire up any references (animated prefab, textures, materials)
5. Save as prefab
### 3. Register in ProvinceBeastsController
Add a prefab field and a case in `GetEffectPrefab()`:
```csharp
// In ProvinceBeastsController.cs
// Add inspector field alongside existing ones:
public GameObject wolfEffectPrefab;
// Add case in GetEffectPrefab(), keyed by singularName from beasts.tsv:
private GameObject GetEffectPrefab(string beastName) {
switch (beastName) {
case "dragon": return dragonEffectPrefab;
case "wolf": return wolfEffectPrefab;
default: return beastsEffectPrefab;
}
}
```
### 4. Wire up in the scene
In `Gameplay.unity`, find the `ProvinceBeastsController` component and assign your new prefab to the new field.
### 5. Test
Use `[ContextMenu]` methods on `ProvinceBeastsController` to test:
- "Test Dragon in Motcia (ID 2)" spawns a dragon effect
- Add similar methods for your beast type
- "Clear All Effects" removes all active effects
## Beast name matching
Beast names come from `BeastInfo.SingularName` in the proto, which uses the canonical `singularName` from `src/main/resources/net/eagle0/eagle/beasts.tsv`. The switch in `GetEffectPrefab` uses exact string matching on this canonical name (e.g. `"dragon"`, `"wolf"`, `"skeleton"`).
Human-type beasts (pirates, bandits, etc.) are matched via a `HumanBeastNames` HashSet in `ProvinceBeastsController` rather than individual switch cases.
## Beast animation coverage
### Custom animations
| Beast | Effect Type | Asset Pack | Prefabs Used |
|---|---|---|---|
| dragon | DragonEffect | DungeonMonsters2D | Dragon |
| skeleton | MonsterEffect | DungeonMonsters2D | SkeletonWarrior, SkeletonArcher, SkeletonMage |
| zombie | MonsterEffect | DungeonMonsters2D | Zombie, ZombieWarrior |
| rat | MonsterEffect + AnimalEffect | DungeonMonsters2D + Animal Pack Deluxe | Rat (2D), Rat (3D) |
| spider | MonsterEffect | DungeonMonsters2D | Spider |
| demon | MonsterEffect | DungeonMonsters2D | Demon, Succubus |
| orc | MonsterEffect | DungeonMonsters2D | Imp |
| vampire | MonsterEffect | DungeonMonsters2D | Vampire |
| human types (34 names) | MonsterEffect | DungeonMonsters2D | Butcher |
| clown | AnimalEffect | Clown Pack | Clown, Fat Clown (w/ per-prefab controller overrides) |
| ogre, troll | AnimalEffect | Orc-Ogre Pack | OrcOgre_Animated (w/ OgreMapAnims controller) |
| bear | AnimalEffect | Animal Pack Deluxe | Brown_bear |
| boar | AnimalEffect | Animal Pack Deluxe | Wild_boar |
| crocodile | AnimalEffect | Animal Pack Deluxe | Crocodile |
| snake | AnimalEffect | Animal Pack Deluxe | Viper |
| crab | AnimalEffect | Animal Pack Deluxe | Crab |
| frog | AnimalEffect | Animal Pack Deluxe | Common_frog, Common_frog_v2, Common_frog_v3 |
| rabbit | AnimalEffect | Animal Pack Deluxe | Wild_rabbit, Wild_rabbit_v2 |
| salamander | AnimalEffect | Animal Pack Deluxe | Fire_salamander |
| scorpion | AnimalEffect | Animal Pack Deluxe | Scorpion, Yellow_fattail_scorpion |
| stag | AnimalEffect | Animal Pack Deluxe | Deer, Deer_male |
| wild goat | AnimalEffect | Animal Pack Deluxe | Goat, Ibex |
| wild pig | AnimalEffect | Animal Pack Deluxe | Iron_age_pig, Iron_age_pig_v2 |
| wolf, wolverine | AnimalEffect | Animal Pack Deluxe | Wolf |
| honey badger | AnimalEffect | HoneyBadger (Sketchfab) | HoneyBadger (w/ HoneyBadgerMapAnims controller) |
| raccoon | AnimalEffect | Raccoon (Sketchfab) | Raccoon (w/ RaccoonMapAnims controller) |
### Human-type beasts
All 34 human-type beast names currently use the Butcher prefab (MonsterEffect). Grouped by likelihood:
| Likelihood | Beast Names |
|---|---|
| 0.20 | bandit, brigand |
| 0.10 | agitator, crook, desperado, highwayman, hooligan, instigator, marauder, ne'er-do-well, nihilist, particularist, proud boy, rabble-rouser, robber, ruffian, scalawag, separatist, street tough, thief, traitor |
| 0.05 | asshole, buccaneer, cultist, dacoit, freebooter, heretic, mobster, pirate |
| 0.04 | cannibal, cossack, rebel, terrorist |
| 0.01 | miscreant |
Thematic clusters for potential visual differentiation:
- **Armed outlaws** (bandit, brigand, robber, highwayman, thief, marauder, desperado, dacoit, freebooter) — armed with weapons, ambush travelers
- **Political agitators** (agitator, instigator, rabble-rouser, separatist, particularist, nihilist, proud boy, rebel, traitor) — rabble-rousers and dissidents
- **Thugs/ruffians** (hooligan, street tough, ruffian, scalawag, ne'er-do-well, crook, miscreant, asshole) — petty criminals and troublemakers
- **Pirates/seafarers** (pirate, buccaneer) — nautical outlaws
- **Dark/cultist types** (cultist, heretic, cannibal, terrorist) — sinister or fanatical
- **Organized crime** (mobster, cossack) — organized groups
### No custom animation (falls back to generic vultures)
Ordered by spawn likelihood (most common first):
| Beast | Likelihood | Notes |
|---|---|---|
| mammoth | 0.10 | Fantasy/prehistoric |
| tiger | 0.10 | Big cat |
| elephant | 0.04 | Large animal |
| hippogryph | 0.04 | Fantasy creature |
| hippopotamus | 0.04 | Large animal |
| lion | 0.04 | Big cat |
| chimpanzee | 0.04 | Primate |
| velociraptor | 0.02 | Dinosaur |
| giant | 0.01 | Fantasy creature |
| unknown | 0.00 | Intentional fallback |
## Tips
- Keep effects lightweight; multiple provinces may have beasts simultaneously
- Use `ParticleSystemScalingMode.Hierarchy` so effects scale with the map zoom
- Set appropriate `sortingOrder` on renderers (existing effects use 102-104)
- For animated prefabs, set `AnimatorCullingMode.AlwaysAnimate` since UI elements may be considered offscreen by the culling system
- For 3D models (AnimalEffect), set `renderQueue=4000` and `ZTest=Always` on materials to prevent clipping behind the map
+218
View File
@@ -0,0 +1,218 @@
# Programmatic Map Image Generation
## Overview
Create a tool to programmatically regenerate the Eagle strategic map images with more equalized province sizes while preserving neighbor relationships. Also implement dynamic text rendering for province names that scales with zoom.
## Current Map Assets
| File | Description | Dimensions |
|------|-------------|------------|
| `Assets/Eagle/rawGray.gz.bytes` | Province ID lookup map (gzip compressed) | 3786 x 1834 |
| `Assets/Eagle/map_bw_labels.png` | B&W map with baked-in province labels | 3786 x 1834, RGBA |
| `Assets/Eagle/Materials/1.png` - `43.png` | Individual province mask images | 3786 x 1834, grayscale |
## Province Data
- 43 provinces defined in `src/main/resources/net/eagle0/eagle/province_map.tsv`
- Each has: id, name, neighbors, neighborPositions, hexMapName
- Problem provinces (too small): **Shumal** (id=1), **Kojaria** (id=39), **Usvol** (id=33), **Tumala** (id=35), **Chia** (id=43)
## Goals
1. **Equalize province sizes** - Reduce disparity so small provinces are easier to click
2. **Preserve topology** - Maintain all neighbor relationships
3. **Preserve coastline** - Keep ocean/land boundaries
4. **Dynamic text rendering** - Province names scale with zoom level
---
## Part 1: Province Size Equalization Tool
### Algorithm: Constrained Voronoi Relaxation
1. **Extract current state from rawGray:**
- Calculate centroid of each province
- Calculate area (pixel count) of each province
- Identify ocean pixels (value 0 or 255)
2. **Iterative relaxation:**
```
For each iteration:
For each province:
Calculate target area (average of all provinces)
If province is too small:
Move centroid away from larger neighbors
If province is too large:
Move centroid toward smaller neighbors
Constraint: Don't break neighbor relationships
```
3. **Generate new boundaries:**
- Use weighted Voronoi diagram from relaxed centroids
- Weight by target area
- Mask with original coastline
4. **Output new images:**
- New rawGray (province ID map)
- New province masks (1.png - 43.png)
- New B&W base map (derived from boundaries)
### Implementation Options
**Option A: Python Script (Recommended)**
- Use numpy, scipy, PIL/Pillow
- Can run offline, generate assets once
- Easier to iterate and debug
- Output: New image files to replace existing
**Option B: Unity Editor Script**
- C# with Unity's Texture2D
- Integrated into build process
- Slower, harder to debug
### Tool Location
`tools/map_generator/` or `scripts/generate_map.py`
---
## Part 2: Dynamic Province Name Rendering
### Current State
- Province names are baked into `map_bw_labels.png`
- Not visible when zoomed out, too small when zoomed in
- `SetUpCenterText()` in MapController shows selected/hovered province name in a fixed UI panel
### New Approach
1. **Create province label GameObjects:**
- One TextMeshPro label per province
- Position at province centroid
- Child of map content (moves with zoom/pan)
2. **Dynamic scaling:**
- Scale inversely with zoom level
- At zoom 1.0: Show major provinces only (or none)
- At zoom 2.0+: Show all province names
- Font size adjusts to fit province area
3. **Implementation:**
```csharp
public class ProvinceLabelsController : MonoBehaviour {
public MapPinchZoomHandler zoomHandler;
public TextMeshProUGUI labelPrefab;
private Dictionary<int, TextMeshProUGUI> _labels;
void Update() {
float zoom = zoomHandler.CurrentZoom;
foreach (var label in _labels.Values) {
label.transform.localScale = Vector3.one / zoom;
label.gameObject.SetActive(zoom >= 1.5f);
}
}
}
```
4. **Province centroid data:**
- Add `centroid_x`, `centroid_y` columns to `province_map.tsv`
- Or calculate at runtime from rawGray
---
## Files to Create/Modify
### New Files
| File | Purpose |
|------|---------|
| `tools/map_generator/generate_map.py` | Python script to generate new map images |
| `tools/map_generator/requirements.txt` | Python dependencies |
| `Assets/Eagle/ProvinceLabelsController.cs` | Dynamic province name rendering |
### Modified Files
| File | Changes |
|------|---------|
| `Assets/Eagle/rawGray.gz.bytes` | Replaced with equalized version |
| `Assets/Eagle/Materials/*.png` | Replaced province masks |
| `Assets/Eagle/map_bw_labels.png` | Either: regenerated, or removed if using dynamic labels |
| `province_map.tsv` | Add centroid columns |
| `Assets/Gameplay.unity` | Add ProvinceLabelsController, label prefab instances |
---
## Verification
1. **Visual inspection:**
- Compare old vs new province sizes
- Verify small provinces (Shumal, Kojaria, Usvol) are larger
- Verify neighbor relationships preserved
2. **Functional testing:**
- Click on each province at various zoom levels
- Verify correct province is selected
- Verify province colors/weather still work
3. **Label testing:**
- Zoom in/out, verify labels scale appropriately
- Pan around, verify labels move with map
- Verify labels don't overlap excessively
---
## Design Decisions
1. **Equalization approach:** Reduce disparity only
- Make small provinces (Shumal, Kojaria, Usvol, etc.) 2-3x larger
- Minimal changes to large provinces
- Not targeting perfectly equal areas
2. **Coastline:** Allow simplification
- Coastline can be smoothed/simplified as part of generation
- Voronoi edges are acceptable
3. **Map style:** Solid fills with borders
- Clean, simple look
- Easier to generate programmatically
- Province boundaries rendered as dark lines
---
## Implementation Steps
### Step 1: Python Map Generator Tool
```
tools/map_generator/
├── generate_map.py # Main script
├── requirements.txt # numpy, scipy, Pillow
└── README.md # Usage instructions
```
**Algorithm:**
1. Load current rawGray.gz.bytes, decompress
2. Calculate each province's centroid and area
3. Identify land mask (non-ocean pixels)
4. Run constrained Voronoi relaxation:
- Small provinces push neighbors away
- Large provinces pull neighbors in
- Stop when min province is >= 50% of average
5. Generate weighted Voronoi from relaxed centroids
6. Output:
- `rawGray_new.bytes` (province ID map)
- `1.png` - `43.png` (province masks)
- `map_bw.png` (solid fill + borders)
- `centroids.json` (for label positioning)
### Step 2: Dynamic Province Labels (Unity)
1. Create `ProvinceLabelsController.cs`
2. Load centroids from JSON or calculate from rawGray
3. Spawn TextMeshPro labels at each centroid
4. Update label scale/visibility based on zoom
### Step 3: Integration
1. Replace asset files with generated versions
2. Update `MapController` to use new assets
3. Add `ProvinceLabelsController` to scene
4. Remove baked label image dependency
+79
View File
@@ -0,0 +1,79 @@
# Renaming a Province
This document explains the steps required to rename a province in Eagle0.
## Files to Modify
### 1. Province Map TSV (Server Source of Truth)
**File:** `src/main/resources/net/eagle0/eagle/province_map.tsv`
This is the primary source of province data. Each row contains:
- Province ID
- Province name
- Neighbor IDs
- Neighbor directions
- Province name (repeated)
- Neighbor names (dot-separated)
- Starting food
You need to:
1. Change the province name in its own row (columns 2 and 5)
2. Update the neighbor name references in all neighboring provinces (column 6)
Example: To rename "Fluria" to "NewName", you would need to update:
- Line 26: The Fluria row itself
- Lines 5, 10, 18, 24, 27, 38, 41: All provinces that list Fluria as a neighbor
### 2. LLM Map Description
**File:** `src/main/scala/net/eagle0/eagle/library/actions/llm_prompt_generators/MapDescription.scala`
This file contains a hardcoded geographic description of the map used in LLM prompts for generating narrative text. Update any references to the old province name.
### 3. Client Centroids JSON
**File:** `src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Eagle/centroids.json`
This JSON file contains province metadata used for map rendering (centroid positions, areas, orientations). Each entry has a `name` field that should be updated to match.
Note: The actual province name displayed to players comes from the server via the `ProvinceView` proto, not from this file. However, this file should be kept in sync for consistency and because it may be used for map label positioning.
### 4. Test Files
**File:** `src/test/scala/net/eagle0/eagle/library/util/validations/RuntimeValidatorTest.scala`
Update any test strings that reference the old province name.
## How Province Names Flow to the Client
Province names are sent from the Eagle server to the Unity client via the `ProvinceView` protobuf message:
```protobuf
message ProvinceView {
int32 id = 1;
string name = 6; // <-- Province name sent from server
...
}
```
The server reads province names from `province_map.tsv` at startup. The client receives names through the proto and displays them via `province.Name` in C# code. This means:
- Changing the TSV automatically updates what clients see
- No C# code changes are needed (the code uses `province.Name` generically)
- The `centroids.json` name field is for map rendering/positioning, not display
## Files That Do NOT Need Changes
- **Hero backstory TSV files** (`heroes.tsv`, `generated_heroes.tsv`) - These don't contain province name references
- **C# client code** - Uses `province.Name` from the server proto, not hardcoded names
- **Proto definitions** - No province names are hardcoded in protos
## Checklist
- [ ] Update `province_map.tsv` - province's own row
- [ ] Update `province_map.tsv` - all neighbor references
- [ ] Update `MapDescription.scala`
- [ ] Update `centroids.json`
- [ ] Update any test files with province name references
- [ ] Build and run tests: `bazel test //src/test/scala/...`
+150
View File
@@ -0,0 +1,150 @@
# rules_apple Workspace Separation
This document explains why `rules_apple` is built in a separate Bazel workspace (`sparkle_workspace/`) and what conditions need to be met before it can be reintegrated into the main workspace.
## Background
The main workspace cannot include `rules_apple` due to transitive dependency conflicts with `rules_swift`. Multiple dependencies require different major versions of `rules_swift`:
| Dependency | rules_swift Version | Compatibility Level |
|------------|---------------------|---------------------|
| grpc | 3.x | 3 |
| flatbuffers | 2.x | 2 |
| rules_apple | 2.x | 2 |
Bzlmod's `single_version_override` can force a single version, but compatibility levels 2 and 3 are incompatible. Forcing `rules_swift` 3.x (required for grpc) breaks `rules_apple` and `flatbuffers`.
## Current Solution
The `SparklePlugin` (the only component requiring `rules_apple`) is built in an isolated workspace:
```
sparkle_workspace/
├── MODULE.bazel # Minimal deps: apple_support, rules_apple, sparkle
├── BUILD.bazel # Builds SparklePlugin.bundle
├── SparklePlugin.m # Objective-C source
├── Info.plist # Bundle metadata
└── external/
└── BUILD.sparkle # Build file for Sparkle framework
```
### How It Works
1. **Build script**: `scripts/build_sparkle_plugin.sh` builds the plugin from the separate workspace
2. **Output**: The built `SparklePlugin.bundle` is placed in `Assets/Plugins/macOS/`
3. **CI integration**: `mac_build.yml` calls `inject_sparkle.sh` to embed Sparkle into the Mac app
The main workspace uses `single_version_override` for `rules_swift` 3.x to satisfy grpc, and includes a comment noting that `rules_apple` is intentionally excluded.
## What SparklePlugin Does
SparklePlugin is a native macOS library that:
- Initializes the [Sparkle](https://sparkle-project.org/) auto-update framework
- Exposes C functions for Unity to call via P/Invoke:
- `SparklePlugin_Initialize`
- `SparklePlugin_CheckForUpdates`
- `SparklePlugin_CheckForUpdatesInBackground`
- `SparklePlugin_IsCheckingForUpdates`
- `SparklePlugin_GetAutomaticallyChecksForUpdates`
- `SparklePlugin_SetAutomaticallyChecksForUpdates`
- `SparklePlugin_IsRunningFromReadOnlyVolume`
- `SparklePlugin_ShowDMGWarning`
## Conditions for Reintegration
To move `rules_apple` back into the main workspace, **all** of the following must be true:
### 1. rules_swift Version Alignment
Check if grpc, flatbuffers, and rules_apple all support the same `rules_swift` major version:
```bash
# Check what rules_swift version each dependency requires
bazel mod graph 2>&1 | grep -A2 "rules_swift"
```
Or check BCR directly:
- https://registry.bazel.build/modules/grpc
- https://registry.bazel.build/modules/flatbuffers
- https://registry.bazel.build/modules/rules_apple
**Test**: After updating versions, verify you can add this to MODULE.bazel without errors:
```python
bazel_dep(name = "rules_apple", version = "X.Y.Z")
```
### 2. Build Test
If the dependency can be added, test that both the main build and SparklePlugin work:
```bash
# Main workspace builds
bazel build //src/main/scala/net/eagle0/eagle:eagle_server
bazel build //src/main/cpp/net/eagle0/shardok:shardok-server
bazel build //ci:eagle_server_image
# SparklePlugin builds (would move to main workspace)
bazel build //sparkle:SparklePlugin # After moving files
```
### 3. Files to Move
When reintegrating, move these from `sparkle_workspace/` to the main workspace:
| Source | Destination |
|--------|-------------|
| `sparkle_workspace/SparklePlugin.m` | `src/main/objc/net/eagle0/sparkle/SparklePlugin.m` |
| `sparkle_workspace/Info.plist` | `src/main/objc/net/eagle0/sparkle/Info.plist` |
| `sparkle_workspace/BUILD.bazel` | `src/main/objc/net/eagle0/sparkle/BUILD.bazel` |
| `sparkle_workspace/external/BUILD.sparkle` | (inline into MODULE.bazel http_archive) |
### 4. MODULE.bazel Changes
Add to the main MODULE.bazel:
```python
bazel_dep(name = "rules_apple", version = "X.Y.Z", repo_name = "build_bazel_rules_apple")
# Sparkle framework
http_archive(
name = "sparkle",
build_file_content = """...""", # Contents from external/BUILD.sparkle
sha256 = "...",
url = "https://github.com/sparkle-project/Sparkle/releases/download/...",
)
```
Remove the `single_version_override` for `rules_swift` if no longer needed.
### 5. Update Build Scripts
- Update `scripts/build_sparkle_plugin.sh` to build from main workspace
- Update `scripts/build_plugins.sh` if it references the separate workspace
- Verify `mac_build.yml` still works
### 6. Cleanup
After successful integration:
```bash
rm -rf sparkle_workspace/
```
Update comments in MODULE.bazel that reference the separate workspace.
## Version History
| Date | Event |
|------|-------|
| 2026-02-04 | Separated sparkle_workspace (PR #5882) to enable Bazel 8 upgrade |
| 2026-02-05 | Upgraded to Bazel 8.5.1 (PR #5883) |
## Monitoring
Periodically check if the upstream dependencies have aligned:
1. **grpc releases**: https://github.com/grpc/grpc/releases
2. **flatbuffers releases**: https://github.com/google/flatbuffers/releases
3. **rules_apple releases**: https://github.com/bazelbuild/rules_apple/releases
4. **BCR updates**: https://registry.bazel.build/
When a new version of any of these is released, check if the `rules_swift` requirements have converged.
+1
View File
@@ -77,3 +77,4 @@ Larger set of goals in [The Big Eagle TODO](https://docs.google.com/document/d/1
## Nice to have
- [x] "What's new" changelog (fetch JSON, show entries since last launch)
- [ ] Windows code signing ([Azure Artifact Signing](https://azure.microsoft.com/en-us/products/artifact-signing/), ~$10/mo) to eliminate SmartScreen "unknown publisher" warning
+267
View File
@@ -0,0 +1,267 @@
# Tutorial Battle System
This document describes the tutorial battle system for first-time players. The system provides a scripted introductory battle that teaches combat basics while telling a story.
---
## Overview
When a new player starts their first game in tutorial mode, they experience:
1. **Narrative Intro** - Story screens introducing the scenario
2. **Immediate Battle** - Skip strategic map, start directly in combat
3. **Scripted Flee** - Enemy flees when player is "on the ropes"
4. **Reinforcements** - Allied heroes arrive mid-battle
5. **Heroes Join** - Reinforcement heroes join player's faction after battle
---
## Battle Configuration
### Defender (Player - John Ranil)
- **Heroes**: John Ranil + 2 random vassals (3 total)
- **Units**:
- 2x Light Infantry (300 troops each, 60 training/armament)
- 1x Longbowmen (200 troops, 60 training/armament)
- **Province**: 14 (Onmaa) with 40 support, 500 gold, 3000 food
- **Restriction**: Cannot flee (must defend)
### Attacker (Ikhaan Tarn)
- **Heroes**: Ikhaan Tarn + 2 sworn brothers (3 total)
- **Units**:
- 1x Heavy Cavalry (600 troops, 80 training/armament)
- 1x Heavy Infantry (500 troops, 80 training/armament)
- 1x Longbowmen (300 troops, 80 training/armament)
- **Origin Province**: 32
### Flee Trigger
Attacker flees when ANY of these conditions are met:
- Player loses 1 unit
- 5 rounds have passed
### Reinforcements
When Tarn flees, these heroes arrive as player reinforcements:
- Elena Fyar
- Hedrick
- The Boulder
---
## Implementation Architecture
### Phase 1: Narrative Intro System
**Proto Changes:**
- `game_state_view.proto`: Added `TutorialNarrativeScreen` message and `pending_narrative_screens` field
- `game_parameters.proto`: Added `TutorialNarrativeScreen` and `tutorial_narrative_screens` field
**Unity Client:**
- `NarrativeScreenController.cs`: Modal screen with title, body text, optional image
- `EagleGameController.cs`: Checks for pending narrative screens on game start
**Narrative Content** (defined in `tutorial_game_parameters.json`):
```
Screen 1: "The Engineer of Onmaa" - Player backstory
Screen 2: "The Traitor Arrives" - Tarn's attack
Screen 3: "Defend Your Home" - Call to action
```
### Phase 2: Auto-Start Battle
**Configuration:**
- `tutorial_game_parameters.json`: Contains `tutorialBattle` config with attacker, target, flee conditions
- `game_parameters.proto`: `TutorialBattleConfig` message
**Game Creation:**
- `NewGameCreation.scala`: `setupTutorialBattle()` method creates:
- `HostileArmyGroup` with `Attacking` status (bypasses decision phase)
- `Army` for defender
- Both added to target province
**Battle Creation:**
- When round advances to `BattleRequest` phase, `RequestBattlesAction` automatically creates the `ShardokBattle`
### Phase 3: Scripted Flee Mechanism
**C++ Component:**
- `TutorialBattleController.hpp/cpp`: Controller for scripted battle logic
**Key Methods:**
```cpp
// Check all events and execute triggered actions (called at end of each round)
std::vector<ActionResult> CheckAndExecuteEvents(
const GameStateW& state,
const SettingsGetter& settings,
const std::shared_ptr<RandomGenerator>& randomGenerator);
```
**Integration:**
- `ShardokEngine.cpp`: Calls `CheckAndExecuteEvents()` at end of each round in `HandlePlayerTurnEnd()`
- Events fire in config order, each event fires at most once
### Phase 4: Mid-Battle Reinforcements
**Action Types** (in `action_type.proto`):
- `TUTORIAL_ENEMY_FLED = 78`
- `TUTORIAL_REINFORCEMENTS_ARRIVED = 79`
**Implementation (TODO):**
- When scripted flee triggers, create reinforcement units in defender's reserves
- Units have `UnitStatus_RESERVE_UNIT` status
- Reinforcements enter battle on subsequent turns
### Phase 5: Tutorial Popups
**Content Definitions** (in `TutorialContentDefinitions.cs`):
- `tutorial_battle_started`: "Defend your province!"
- `tutorial_enemy_fled`: "The enemy retreats!"
- `tutorial_reinforcements_arrived`: "Allies have arrived!"
- `tutorial_battle_victory`: Victory celebration
**Trigger Integration:**
- `TutorialTriggerRegistry.cs`: Handles tutorial action types from `ActionResultView`
- `ShardokGameController.cs`: Detects tutorial events and triggers popups
### Phase 6: Post-Battle Hero Joining
**Implementation (TODO):**
- `ResolveBattleAction.scala`: Check if battle was tutorial and defender won
- Create `TutorialHeroJoined` action results adding reinforcement heroes to player faction
- Set appropriate loyalty, vigor, location for joined heroes
### Phase 7: Post-Battle Strategic Dialogue
After the battle ends and the player returns to the strategic map, narrative dialogues guide them through the next steps.
**Dialogue 1: Battle Aftermath** (trigger: `tutorial_battle_ended`)
- Old Marek reflects on the close call
- Tarn has vanished — rumors of sorcery or escape, no one knows
- Captured lieutenants: they followed orders, not to blame for Tarn's madness
- Player should try to recruit them or hold them
- No instruction text needed — Handle Captured Heroes UI is self-explanatory
**Dialogue 2: Rebuild Support** (trigger: `tutorial_rebuild_support`)
- Fires when available commands no longer include HandleCapturedHeroCommand
- Marek explains the province needs support rebuilt after the battle
- Engineers (John Ranil) can **Improve** the province — build infrastructure, develop economy
- Paladins (Elena Fyar) can **Give Alms** — distribute food to win hearts
- Instructions highlight **Improve** and **Give Alms** buttons
- Goal: get Support to **40** before January for tax revenue
**Implementation:**
- Dialogues defined in `tutorial_strategic.json`
- `tutorial_battle_ended`: fire when tutorial battle is removed from `RunningShardokGameModels`
- `tutorial_rebuild_support`: fire when available commands no longer include `HandleCapturedHeroCommand`
- Register `ImproveButton` and `AlmsButton` as highlight targets in `TutorialTargetRegistry`
See `TUTORIAL_CONTENT.md` for full dialogue text.
---
## File Summary
### New Files
| File | Purpose |
|------|---------|
| `TutorialBattleController.hpp/cpp` | C++ scripted flee and reinforcement logic |
| `NarrativeScreenController.cs` | Unity narrative screen display |
### Modified Files
| File | Changes |
|------|---------|
| `tutorial_game_parameters.json` | Battle configuration and narrative content |
| `game_state_view.proto` | Narrative screens field |
| `game_parameters.proto` | Tutorial battle config |
| `player_info.proto` | Tutorial battle flags for Shardok |
| `action_type.proto` | Tutorial action types |
| `NewGameCreation.scala` | Auto-start battle setup |
| `EagleGameController.cs` | Narrative display integration |
| `TutorialContentDefinitions.cs` | Battle tutorial content |
| `TutorialTriggerRegistry.cs` | Tutorial event triggers |
---
## Remaining Implementation
### Disable Player Flee
In `FleeCommandFactory.cpp`:
- Check if tutorial mode is enabled
- If defender, don't offer flee commands
### Reinforcement Units
In `TutorialBattleController::ExecuteScriptedFlee()`:
- Create `Unit` objects for Elena Fyar, Hedrick, The Boulder
- Add to defender's reserve units
- Generate `TUTORIAL_REINFORCEMENTS_ARRIVED` action
### Post-Battle Hero Joining
In Eagle's battle resolution:
- Detect tutorial battle completion
- Create heroes in player's faction with proper stats
- Generate notification action results
---
## Testing Checklist
- [ ] New user sees narrative screens before battle
- [ ] Battle starts immediately after narratives (no strategic map)
- [ ] Player has correct units (3 heroes, 3 battalions)
- [ ] Attacker has correct units (3 heroes, 3 battalions)
- [ ] Player cannot flee
- [ ] Tarn flees after player loses 1 unit
- [ ] Tarn flees after 5 rounds (if no units lost)
- [ ] Reinforcements appear when Tarn flees
- [ ] Tutorial popups appear at correct moments
- [ ] Reinforcement heroes join faction after battle victory
---
## Configuration Reference
### tutorial_game_parameters.json
```json
{
"tutorialBattle": {
"attackerFactionHead": "Ikhaan Tarn",
"targetProvinceId": 14,
"fleeAfterDefenderUnitsLost": 1,
"fleeAfterRounds": 5,
"reinforcements": ["Elena Fyar", "Hedrick", "The Boulder"]
},
"tutorialNarrativeScreens": [
{ "title": "...", "bodyText": "...", "imagePath": "" }
]
}
```
### TutorialBattleConfig Proto (Shardok)
```protobuf
message TutorialBattleConfig {
bool enabled = 1;
repeated TutorialEvent events = 2;
repeated UnitInitialSize initial_sizes = 3; // For damage tracking
}
message TutorialEvent {
string event_id = 1;
TutorialTrigger trigger = 2;
TutorialAction action = 3;
}
message TutorialTrigger {
oneof trigger_type {
RoundTrigger after_round = 1;
UnitsLostTrigger units_lost = 2;
DamageTakenTrigger damage_taken = 3;
UnitKilledTrigger unit_killed = 4;
}
}
message TutorialAction {
oneof action_type {
FleeAction flee = 1;
ReinforcementsAction reinforcements = 2; // Uses CommonUnit
}
}
```
+46
View File
@@ -149,6 +149,52 @@ Triggered during battles when players encounter spells, terrain, or abilities.
---
## Post-Battle Dialogue (Narrative Dialogues)
These fire after the first tutorial battle ends and the player returns to the strategic map. They use the narrative dialogue system (`DialogueManager` / `tutorial_strategic.json`) rather than the modal tutorial system.
### Battle Aftermath
| Field | Value |
|-------|-------|
| ID | `post_battle_aftermath` |
| Trigger | `tutorial_battle_ended` (battle removed from RunningShardokGameModels) |
| Speaker | Old Marek the Learned |
| Panel Position | top |
**Dialogue (Marek):**
> That was closer than I'd like to admit. We held — barely. But Tarn... Tarn is gone. Not retreated — *gone*. The men say he vanished from the field. Some claim sorcery. Others say he slipped away in the chaos. Whatever the truth, no one can find him.
>
> But we captured some of his lieutenants. These are soldiers, Sadar — they followed orders, same as we once did. They're not to blame for Tarn's madness. See if you can bring them to our cause, or at least hold them until they come around.
**Instructions:** *(none — Handle Captured Heroes UI is self-explanatory)*
### Rebuild Support
| Field | Value |
|-------|-------|
| ID | `post_battle_rebuild` |
| Trigger | `tutorial_rebuild_support` (fires when available commands no longer include HandleCapturedHeroCommand) |
| Speaker | Old Marek the Learned |
| Panel Position | top |
**Dialogue (Marek):**
> Good. Now we need to rebuild our support here in Onmaa. The people are shaken — a battle on their doorstep will do that. We need them behind us if we're going to hold this province.
>
> Any of our heroes can develop the land or give alms to the people — nothing wins hearts faster than a full belly. Engineers like John Ranil are especially effective at improving a province, and paladins like Elena Fyar are the best at winning hearts. Either way, we need the people's support before the tax collectors come round in January.
**Instructions:** Use **Improve** and **Give Alms** to raise Support. You must have at least **40** support in the province by January in order to collect gold and food in taxes.
**Highlight targets:** `SupportField`
### Implementation Notes
- Both dialogues go in `tutorial_strategic.json`
- Need new trigger events: `tutorial_battle_ended` and `tutorial_rebuild_support`
- `tutorial_battle_ended` should fire when the tutorial battle is removed from `RunningShardokGameModels` in `EagleGameModel.ApplyGameStateViewDiff`
- `tutorial_rebuild_support` should fire when available commands no longer include `HandleCapturedHeroCommand` (i.e. the captured heroes phase is done and the player has regular commands available)
- The "rebuild" dialogue should highlight the Improve and Give Alms buttons in the command panel (requires registering them as highlight targets)
---
## Display Modes
| Mode | Description | Use For |
+113
View File
@@ -0,0 +1,113 @@
# AI Quest Completion Behavior
This document describes which quests the AI attempts to complete proactively to recruit unaffiliated heroes.
## Overview
The AI attempts to complete quests via `FulfillQuestsCommandSelector`, which is invoked by `MidGameAIClient.chosenFulfillEasyQuestsCommand`. The AI only considers quests from unaffiliated heroes in provinces ruled by a faction leader.
## Quests the AI Actively Completes
### Diplomacy Quests
| Quest | Handler | Conditions |
|-------|---------|------------|
| `AllianceQuest` | `AllianceQuestCommandChooser` | Target faction must meet trust conditions for alliance and not already be in an alliance |
| `TruceWithFactionQuest` | `TruceWithFactionQuestCommandChooser` | Target faction must meet trust conditions for truce |
| `TruceCountQuest` | `TruceCountQuestCommandChooser` | Picks a random faction that meets trust conditions and isn't already in a truce/alliance |
### Resource Giving Quests
| Quest | Handler | Notes |
|-------|---------|-------|
| `AlmsToProvinceQuest` | `AlmsToProvinceQuestCommandChooser` | Gives food to the specified province |
| `AlmsAcrossRealmQuest` | `AlmsAcrossRealmQuestCommandChooser` | Gives food from the province with the largest surplus |
| `GiveToHeroesInProvinceQuest` | `GiveToHeroesInProvinceQuestCommandChooser` | Gives gold to the hero with the lowest loyalty in the specified province |
| `GiveToHeroesAcrossRealmQuest` | `GiveToHeroesAcrossRealmQuestCommandChooser` | Gives gold from the province with the most gold available |
### Province Development Quests
| Quest | Handler | Notes |
|-------|---------|-------|
| `ImproveAgricultureQuest` | `ImproveQuestCommandChooser` | Issues an Improve command with Agriculture type |
| `ImproveEconomyQuest` | `ImproveQuestCommandChooser` | Issues an Improve command with Economy type |
| `ImproveInfrastructureQuest` | `ImproveQuestCommandChooser` | Issues an Improve command with Infrastructure type |
### Other Quests
| Quest | Handler | Conditions |
|-------|---------|------------|
| `DismissSpecificVassalQuest` | `DismissSpecificVassalCommandChooser` | Only if province has more than 2 heroes AND the unaffiliated hero's power >= target hero's power * `RequiredPowerMultiplierForDismiss` |
## Quests the AI Does Not Attempt to Complete
The following quests have no handler in `FulfillQuestsCommandSelector` and must be completed naturally through gameplay:
### Combat/Military Quests
- `DefeatFactionQuest` - Defeat a specific faction
- `GrandArmyQuest` - Accumulate a large number of troops
- `UpgradeBattalionQuest` - Upgrade a battalion to minimum armament/training
- `WinBattleOutnumberedQuest` - Win a battle while outnumbered
- `WinBattlesQuest` - Win a number of battles
- `RescueImprisonedLeaderQuest` - Rescue an imprisoned leader from another faction
### Expansion Quests
- `ExpandToProvincesQuest` - Expand to control a certain number of provinces
- `SpecificExpansionQuest` - Conquer a specific province
- `BorderSecurityQuest` - Have troops in a border province
### Prisoner Quests
- `ExecutePrisonerQuest` - Execute a specific prisoner
- `ExilePrisonerQuest` - Exile a specific prisoner
- `ReleasePrisonerQuest` - Release a specific prisoner
- `ReturnPrisonerQuest` - Return a prisoner to their faction
- `ReleaseAllPrisonersQuest` - Release all prisoners
### Province Order Quests
- `DevelopProvincesQuest` - Maintain provinces in Develop order for months
- `MobilizeProvincesQuest` - Maintain provinces in Mobilize order for months
- `RestProvinceQuest` - Use the Rest command in a specific province
### Reconnaissance Quests
- `ReconProvincesQuest` - Reconnoiter a number of provinces
- `ReconSpecificProvincesQuest` - Reconnoiter specific provinces
### Economic Quests
- `TotalDevelopmentQuest` - Achieve total development level in a province
- `WealthQuest` - Accumulate gold and food
- `SpendOnFeastsQuest` - Spend gold on feasts
- `SendSuppliesQuest` - Send food to a specific province
- `RepairDevastationQuest` - Repair devastation
### Special Event Quests
- `SuppressRiotByForceQuest` - Suppress a riot by force
- `FightBeastsAloneQuest` - Fight beasts alone
- `StartBlizzardQuest` - Start a blizzard in a province
- `StartEpidemicQuest` - Start an epidemic in a province
- `ApprehendOutlawQuest` - Apprehend an outlaw hero
### Miscellaneous
- `BattalionDiversityQuest` - Have diverse battalion types
- `SwearBrotherhoodWithHeroQuest` - Swear brotherhood with a specific hero
- `BetrayAllyQuest` - Betray an allied faction
## Implementation Details
The quest completion logic is located in:
- `FulfillQuestsCommandSelector.scala` - Main entry point, iterates through choosers
- `quest_command_selectors/` - Individual quest handlers
Each chooser extends either:
- `QuestCommandChooser` - For quests requiring randomness
- `DeterministicQuestCommandChooser` - For quests with deterministic command selection
The AI prioritizes quests in the order they appear in `FulfillQuestsCommandSelector.choosers`:
1. Alliance
2. TruceWithFaction
3. Improve (Agriculture/Economy/Infrastructure)
4. AlmsToProvince
5. GiveToHeroesInProvince
6. AlmsAcrossRealm
7. GiveToHeroesAcrossRealm
8. TruceCount
9. DismissSpecificVassal
@@ -0,0 +1,230 @@
# Plan: Eliminate Battalion Backstory LLM Updates
## Goal
Dramatically reduce LLM request volume by eliminating battalion backstory updates. Battalions will retain:
- An **initial backstory** (generated once when created)
- A **history of events** (structured data, not LLM-generated prose)
The history will be fed into other LLM updates (hero backstories, chronicle) but will no longer be regenerated into prose for each battalion.
## Current System Overview
### Data Flow
```
Battalion Created → Initial Backstory LLM Request → Text stored
Battalion participates in events → Events accumulated → Update LLM Request → New text version
BattalionView.backstoryTextId → Client displays on hover
```
### Event Types (8 total)
Events are structured data already captured in `EventForBattalionBackstory`:
- OrganizedTroops, SuppressedBeasts, ApprehendedOutlaws, FoughtInBattle
- SuppressedRiot, Trained, Armed, SurvivedStarvation
Each event has date, province, hero, and event-specific details.
### Key Files
| Component | File |
|-----------|------|
| Unity Display | `Assets/Eagle/HeroesAndBattalionsPanelController.cs` |
| View Proto | `views/battalion_view.proto` |
| View Filter | `BattalionViewFilter.scala` |
| Update Action | `BattalionBackstoryUpdateAction.scala` |
| Update Generator | `BattalionBackstoryUpdateActionGenerator.scala` |
| Update Prompt | `BattalionBackstoryUpdatePromptGenerator.scala` |
| Event-to-Text | `BattalionBackstoryUpdatePromptGenerator.textForEvent()` |
| BattalionDescriptions | `BattalionDescriptions.scala` (used in other LLM prompts) |
---
## Stage 1: Stop Displaying Battalion Backstories in Client
**Goal:** Remove the UI that shows battalion backstory text on hover.
### Files to Modify
**`Assets/Eagle/HeroesAndBattalionsPanelController.cs`**
- In `BattalionLongHoverRowChanged()` (lines 143-169):
- Remove or comment out the backstory text population
- Keep the header/name display, remove `battalionPopupPanelBackstory.TextId = ...`
**Unity Scene/Prefab**
- Hide or remove the `battalionPopupPanelBackstory` UI element
### Verification
- [ ] Battalion hover popup no longer shows backstory text
- [ ] No errors when hovering over battalions
- [ ] Other battalion info (name, type, size) still displays
---
## Stage 2: Stop Populating Backstory in BattalionView
**Goal:** Stop sending backstory text ID to the client.
### Files to Modify
**`BattalionViewFilter.scala`**
- In `filteredBattalionViewBelongingToPlayer()`:
- Set `backstoryTextId = ""` instead of `battalion.backstoryTextId`
- In `limitedBattalionView()`:
- Same change
### Verification
- [ ] BattalionView messages have empty backstoryTextId
- [ ] Client handles empty backstoryTextId gracefully (Stage 1 should have removed the display)
---
## Stage 3: Remove backstory_text_id from BattalionView Proto
**Goal:** Clean up the proto schema.
### Files to Modify
**`views/battalion_view.proto`**
- Remove field: `string backstory_text_id = 7;`
- Mark field 7 as reserved to prevent reuse
**`Assets/Eagle/HeroesAndBattalionsPanelController.cs`**
- Remove any remaining references to `BackstoryTextId`
**`BattalionViewFilter.scala`**
- Remove `backstoryTextId` from view construction
### Verification
- [ ] Proto compiles
- [ ] C# client compiles without BackstoryTextId references
- [ ] Full test suite passes
---
## Stage 4: Replace Backstory Usage in BattalionDescriptions
**Goal:** When other LLM prompts need battalion context, use initial backstory + structured history instead of the latest LLM-generated prose.
### Current Usage in `BattalionDescriptions.scala`
```scala
def backstoryText(): TextGenerationResult =
battalion.backstoryVersions.lastOption
.map(v => clientTextStore.getText(v.textId))
.getOrElse(TextGenerationSuccess(""))
def fullDescription(): String =
s"${battalion.name} is $description. $backstoryText"
```
### New Approach
Create `historyDescription()` that:
1. Gets initial backstory (first version's text, if available)
2. Appends structured event history using the same `textForEvent()` logic from `BattalionBackstoryUpdatePromptGenerator`
```scala
def historyDescription(): String = {
val initialBackstory = battalion.backstoryVersions.headOption
.map(v => clientTextStore.getText(v.textId))
.collect { case TextGenerationSuccess(text) => text }
.getOrElse("")
val eventHistory = battalion.backstoryEvents
.map(textForEvent) // Reuse existing event-to-text conversion
.mkString(" ")
if eventHistory.isEmpty then initialBackstory
else s"$initialBackstory $eventHistory"
}
```
### Files to Modify
**`BattalionDescriptions.scala`**
- Add `historyDescription()` method
- Update `fullDescription()` to use `historyDescription()` instead of `backstoryText()`
- Keep `textForEvent()` logic (move from `BattalionBackstoryUpdatePromptGenerator` if needed)
**Move/refactor `textForEvent()`**
- Currently in `BattalionBackstoryUpdatePromptGenerator.scala` (lines 78-262)
- Move to `BattalionDescriptions.scala` or a shared utility
- This converts events to human-readable text without LLM
### Verification
- [ ] Other LLM prompts that use `BattalionDescriptions` still get meaningful context
- [ ] Chronicle updates include battalion history
- [ ] Hero backstory updates include relevant battalion history
---
## Stage 5: Stop Generating Battalion Backstory Updates
**Goal:** Remove the LLM request generation entirely.
### Files to Modify
**`BattalionBackstoryUpdateActionGenerator.scala`**
- Return empty Vector instead of generating actions
- Or delete the file entirely
**`BattalionBackstoryUpdateAction.scala`**
- Delete or mark as deprecated
**`BattalionBackstoryUpdatePromptGenerator.scala`**
- Delete or keep only `textForEvent()` if moved
**`LlmResolver.scala`**
- Remove case for `BattalionBackstoryUpdateRequest`
- Optionally throw error if somehow called
**`EndPlayerCommandsPhaseAction.scala`** (and other callers)
- Find where `BattalionBackstoryUpdateActionGenerator` is called
- Remove those calls
### Files to Search for Callers
```bash
grep -r "BattalionBackstoryUpdateAction" src/
```
### Verification
- [ ] No `BattalionBackstoryUpdateRequest` LLM requests generated
- [ ] Battalions still accumulate events (for history description)
- [ ] Full test suite passes
- [ ] Game runs without errors
---
## Future Considerations
### Keep or Remove Initial Backstory Generation?
The initial backstory (`BattalionInitialBackstoryRequest`) is generated once per battalion. Options:
1. **Keep it** - Low volume, provides flavor text for history
2. **Remove it** - Use a template-based approach instead
Recommendation: Keep for now, evaluate later based on volume.
### Event History Cleanup
Events currently accumulate forever on battalions. Consider:
- Capping event history length
- Summarizing old events
- Only keeping "significant" events
### Affected Tests
Search for tests that verify backstory update behavior:
```bash
bazel query 'tests(//src/test/scala/...) intersect rdeps(//src/test/scala/..., //src/main/scala/net/eagle0/eagle/library/actions/impl/action:battalion_backstory_update_action)'
```
---
## Summary of LLM Request Reduction
| Request Type | Current Volume | After Change |
|--------------|---------------|--------------|
| BattalionInitialBackstoryRequest | 1 per battalion | 1 per battalion (unchanged) |
| BattalionBackstoryUpdateRequest | ~N per battalion per game | **0** |
For a typical game with ~50 battalions and ~20 rounds, this could eliminate **hundreds** of LLM requests.
+93
View File
@@ -0,0 +1,93 @@
# Province Event 3D Effects
Ideas for replacing 2D shader-based province event effects with 3D particle systems.
## Current State
| Event | Effect Type | Notes |
|-------|-------------|-------|
| Festival | 3D particles | Complete |
| Epidemic | 3D particles | Complete (rising skulls + green haze) |
| Blizzard | 2D shader | Not visible on unowned (white) provinces |
| Drought | 2D shader | |
| Flood | 2D shader | |
| Beasts | None | Tricky - can be any animal or human |
## Proposed 3D Effects
### Blizzard
- Falling snowflakes with slight blue tint (ensures visibility on white backgrounds)
- Diagonal wind-blown particles to convey harsh weather
- Swirling vortex effect near ground level
- Frosty sparkle/glitter particles for magical winter feel
### Drought
- Rising dust/sand particles (tan/brown coloring)
- Small dust devils (spinning particle columns)
- Shimmering golden particles rising to suggest heat distortion
- Dried leaves/debris blowing across the province
### Flood
- Rain falling (blue-tinted streaks or droplets)
- Water splashes/ripples rising from ground
- Mist/spray particles hovering low
- Floating debris particles (leaves, sticks)
### Beasts
This is challenging since "beasts" can represent any dangerous creature. Universal approaches:
- **Circling vultures/crows overhead** - Predators attract scavengers; works for any beast type and is visually distinctive
- Dust clouds suggesting movement at province edges
- Glowing eyes appearing/disappearing in shadows
- Stylized claw/scratch mark effects
- Paw prints materializing on the ground
- Red "danger" aura pulsing from ground level
The vultures/crows approach is recommended as the most universal solution.
## Implementation Status
Controllers have been created for all 4 event types:
- `ProvinceBlizzardController.cs` - ready, needs prefab
- `ProvinceDroughtController.cs` - ready, needs prefab
- `ProvinceFloodController.cs` - ready, needs prefab
- `ProvinceBeastsController.cs` - ready, needs prefab
### Prefabs Needed
Create these prefabs in `Assets/Eagle/Effects/`:
1. **BlizzardEffect.prefab**
- Particle System with falling snowflakes
- Blue-tinted particles for visibility on white
- Diagonal velocity for wind effect
- RectTransform for UI positioning
2. **DroughtEffect.prefab**
- Particle System with rising dust particles
- Tan/brown coloring
- Upward velocity
- Optional spinning sub-emitters for dust devils
3. **FloodEffect.prefab**
- Particle System with falling rain streaks
- Blue tint
- Fast downward velocity
- Optional splash sub-emitter
4. **BeastsEffect.prefab**
- Particle System with bird silhouettes
- Circular orbit motion around center
- Black/dark particles
- Could use a crow/vulture sprite texture
### Scene Setup
Wire up in `Gameplay.unity`:
1. Add controller components to the Map GameObject
2. Assign `mapContainer`, `centroidsJson` (shared with other controllers)
3. Assign the effect prefab for each controller
+5
View File
@@ -0,0 +1,5 @@
# Export BUILD files for use with http_archive build_file attribute
exports_files([
"BUILD.gtl",
"BUILD.llvm_mingw",
])
+370 -75
View File
@@ -1,21 +1,228 @@
{
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
"__INPUT_ARTIFACTS_HASH": 434250008,
"__RESOLVED_ARTIFACTS_HASH": -824975294,
"__INPUT_ARTIFACTS_HASH": {
"com.amazonaws:aws-lambda-java-core": -2008008480,
"com.amazonaws:aws-lambda-java-events": 904769795,
"com.google.android:annotations": 1910180409,
"com.google.api.grpc:proto-google-common-protos": -2106826238,
"com.google.auth:google-auth-library-credentials": 1149797254,
"com.google.auth:google-auth-library-oauth2-http": -2102758232,
"com.google.auto.value:auto-value": 1146221104,
"com.google.auto.value:auto-value-annotations": -1101276935,
"com.google.code.findbugs:jsr305": 495355163,
"com.google.code.gson:gson": 1675696798,
"com.google.errorprone:error_prone_annotations": 692295270,
"com.google.guava:failureaccess": 1582410452,
"com.google.guava:guava": 174556251,
"com.google.j2objc:j2objc-annotations": 2003271689,
"com.google.protobuf:protobuf-java": -1795397632,
"com.google.protobuf:protobuf-java-util": -1033086717,
"com.google.re2j:re2j": 1525409503,
"com.google.s2a.proto.v2:s2a-proto": 898932763,
"com.google.truth:truth": 1696781452,
"com.nimbusds:nimbus-jose-jwt": 200797458,
"com.squareup.okhttp3:okhttp": 916942239,
"com.squareup.okhttp3:okhttp-sse": 1714840279,
"com.squareup.okhttp:okhttp": -1467174407,
"com.squareup.okio:okio": 795722926,
"com.thesamet.scalapb:compilerplugin_3": -756207945,
"com.thesamet.scalapb:lenses_3": 1060875741,
"com.thesamet.scalapb:protoc-bridge_3": -1260006911,
"com.thesamet.scalapb:scalapb-json4s_3": -772830803,
"com.thesamet.scalapb:scalapb-runtime-grpc_3": 908736225,
"com.thesamet.scalapb:scalapb-runtime_3": 1652882204,
"io.netty:netty-buffer": -36891658,
"io.netty:netty-codec": -1968637428,
"io.netty:netty-codec-http": 2069139895,
"io.netty:netty-codec-http2": 980426895,
"io.netty:netty-codec-socks": -1802651606,
"io.netty:netty-common": -644663253,
"io.netty:netty-handler": 1555108312,
"io.netty:netty-handler-proxy": -964658153,
"io.netty:netty-resolver": -1317606544,
"io.netty:netty-tcnative-boringssl-static": 2033070843,
"io.netty:netty-tcnative-classes": 2023773715,
"io.netty:netty-transport": 1563151065,
"io.netty:netty-transport-native-epoll": -1215800119,
"io.netty:netty-transport-native-unix-common": -818773192,
"io.opencensus:opencensus-api": 2042364617,
"io.opencensus:opencensus-contrib-grpc-metrics": 317094357,
"io.perfmark:perfmark-api": 1019157794,
"io.sentry:sentry": -947045362,
"javax.xml.bind:jaxb-api": -1735500680,
"junit:junit": -744267592,
"org.checkerframework:checker-qual": -819031361,
"org.codehaus.mojo:animal-sniffer-annotations": -1634689353,
"org.json4s:json4s-ast_3": 687176866,
"org.json4s:json4s-core_3": 977579605,
"org.json4s:json4s-native_3": -123383795,
"org.reactivestreams:reactive-streams": 509083534,
"org.scalamock:scalamock_3": -610483078,
"org.slf4j:slf4j-api": 1609745898,
"org.slf4j:slf4j-simple": 1319506696,
"org.xerial:sqlite-jdbc": -1707012205,
"repositories": -1949687017,
"software.amazon.awssdk:aws-core": 1764800397,
"software.amazon.awssdk:http-client-spi": 1697477859,
"software.amazon.awssdk:regions": -663595789,
"software.amazon.awssdk:s3": -544649668,
"software.amazon.awssdk:s3-transfer-manager": -1414083014,
"software.amazon.awssdk:sdk-core": -1921023350,
"software.amazon.awssdk:utils": 1323800129
},
"__RESOLVED_ARTIFACTS_HASH": {
"com.amazonaws:aws-lambda-java-core": 930138565,
"com.amazonaws:aws-lambda-java-events": 582075020,
"com.fasterxml.jackson.core:jackson-annotations": 1276887193,
"com.fasterxml.jackson.core:jackson-core": 439118590,
"com.fasterxml.jackson.core:jackson-databind": 1897319963,
"com.github.stephenc.jcip:jcip-annotations": 2084352561,
"com.google.android:annotations": 2096496032,
"com.google.api.grpc:proto-google-common-protos": 2069379049,
"com.google.api:api-common": -597713164,
"com.google.auth:google-auth-library-credentials": -366937256,
"com.google.auth:google-auth-library-oauth2-http": -472658017,
"com.google.auto.value:auto-value": 1110951021,
"com.google.auto.value:auto-value-annotations": 641018093,
"com.google.code.findbugs:jsr305": 870839855,
"com.google.code.gson:gson": 614185888,
"com.google.errorprone:error_prone_annotations": -1097264484,
"com.google.guava:failureaccess": -718864417,
"com.google.guava:guava": 631608943,
"com.google.guava:listenablefuture": 1079558157,
"com.google.http-client:google-http-client": 418651909,
"com.google.http-client:google-http-client-gson": -48153131,
"com.google.j2objc:j2objc-annotations": -404209759,
"com.google.protobuf:protobuf-java": 1668417350,
"com.google.protobuf:protobuf-java-util": 1986864820,
"com.google.re2j:re2j": -1688126233,
"com.google.s2a.proto.v2:s2a-proto": 1518288545,
"com.google.truth:truth": -1338076935,
"com.nimbusds:nimbus-jose-jwt": -1437437976,
"com.squareup.okhttp3:okhttp": 1262276211,
"com.squareup.okhttp3:okhttp-sse": 505395183,
"com.squareup.okhttp:okhttp": -1958498367,
"com.squareup.okio:okio": -993505667,
"com.squareup.okio:okio-jvm": 2073967287,
"com.thesamet.scalapb:compilerplugin_3": -1711749067,
"com.thesamet.scalapb:lenses_3": 81185934,
"com.thesamet.scalapb:protoc-bridge_2.13": -1602581734,
"com.thesamet.scalapb:protoc-bridge_3": -350123056,
"com.thesamet.scalapb:protoc-gen_2.13": -1004483995,
"com.thesamet.scalapb:scalapb-json4s_3": -1395179337,
"com.thesamet.scalapb:scalapb-runtime-grpc_3": 1440887312,
"com.thesamet.scalapb:scalapb-runtime_3": -298320448,
"commons-codec:commons-codec": 1208138832,
"commons-logging:commons-logging": 1248790901,
"dev.dirs:directories": 513669062,
"io.grpc:grpc-api": 1519481799,
"io.grpc:grpc-context": 1273832094,
"io.grpc:grpc-protobuf": -1491986464,
"io.grpc:grpc-protobuf-lite": 1996390382,
"io.grpc:grpc-stub": 206724158,
"io.netty:netty-buffer": 1883825690,
"io.netty:netty-codec": 1759679007,
"io.netty:netty-codec-http": -965628835,
"io.netty:netty-codec-http2": -631439859,
"io.netty:netty-codec-socks": 1385966058,
"io.netty:netty-common": -1574327641,
"io.netty:netty-handler": 1812678974,
"io.netty:netty-handler-proxy": 452260541,
"io.netty:netty-resolver": -656912885,
"io.netty:netty-tcnative-boringssl-static": -1618728145,
"io.netty:netty-tcnative-boringssl-static:jar:linux-aarch_64": -46670590,
"io.netty:netty-tcnative-boringssl-static:jar:linux-x86_64": -323938727,
"io.netty:netty-tcnative-boringssl-static:jar:osx-aarch_64": 1027623299,
"io.netty:netty-tcnative-boringssl-static:jar:osx-x86_64": -322798677,
"io.netty:netty-tcnative-boringssl-static:jar:windows-x86_64": 1803328375,
"io.netty:netty-tcnative-classes": -498572591,
"io.netty:netty-transport": 764254626,
"io.netty:netty-transport-classes-epoll": 1006952729,
"io.netty:netty-transport-native-epoll:jar:linux-x86_64": -737288378,
"io.netty:netty-transport-native-unix-common": -1442019057,
"io.opencensus:opencensus-api": 516564413,
"io.opencensus:opencensus-contrib-grpc-metrics": -412818674,
"io.opencensus:opencensus-contrib-http-util": 1093902672,
"io.perfmark:perfmark-api": -1795841558,
"io.sentry:sentry": 1818358364,
"javax.activation:javax.activation-api": 1384047725,
"javax.annotation:javax.annotation-api": -1009230154,
"javax.xml.bind:jaxb-api": 238614541,
"joda-time:joda-time": -926621536,
"junit:junit": -1256429642,
"org.apache.httpcomponents:httpclient": 546847276,
"org.apache.httpcomponents:httpcore": 67453319,
"org.checkerframework:checker-qual": 1860567376,
"org.codehaus.mojo:animal-sniffer-annotations": -1201443841,
"org.hamcrest:hamcrest-core": 649657847,
"org.jetbrains.kotlin:kotlin-stdlib": -879725260,
"org.jetbrains.kotlin:kotlin-stdlib-common": 393704220,
"org.jetbrains.kotlin:kotlin-stdlib-jdk7": 1242909803,
"org.jetbrains.kotlin:kotlin-stdlib-jdk8": -597817274,
"org.jetbrains:annotations": 554168982,
"org.json4s:json4s-ast_3": -1000402007,
"org.json4s:json4s-core_3": -1662557228,
"org.json4s:json4s-jackson-core_3": -1868355082,
"org.json4s:json4s-native-core_3": 227547325,
"org.json4s:json4s-native_3": 1646180259,
"org.jspecify:jspecify": 117231129,
"org.ow2.asm:asm": 611381606,
"org.reactivestreams:reactive-streams": 1281941191,
"org.scala-lang.modules:scala-collection-compat_3": 1599811889,
"org.scala-lang:scala-library": -1079389784,
"org.scala-lang:scala3-library_3": -212752345,
"org.scalamock:scalamock_3": -1778657085,
"org.slf4j:slf4j-api": -771685699,
"org.slf4j:slf4j-simple": -776509812,
"org.xerial:sqlite-jdbc": 1311600081,
"software.amazon.awssdk:annotations": -324257201,
"software.amazon.awssdk:apache-client": 2066024214,
"software.amazon.awssdk:arns": -1240703529,
"software.amazon.awssdk:auth": 1612047768,
"software.amazon.awssdk:aws-core": -62367447,
"software.amazon.awssdk:aws-query-protocol": 570551548,
"software.amazon.awssdk:aws-xml-protocol": -1850136736,
"software.amazon.awssdk:checksums": -238416593,
"software.amazon.awssdk:checksums-spi": 807336878,
"software.amazon.awssdk:crt-core": 280528066,
"software.amazon.awssdk:endpoints-spi": -241689351,
"software.amazon.awssdk:http-auth": 236194098,
"software.amazon.awssdk:http-auth-aws": -385949349,
"software.amazon.awssdk:http-auth-aws-eventstream": -408169305,
"software.amazon.awssdk:http-auth-spi": 211732368,
"software.amazon.awssdk:http-client-spi": -1646055035,
"software.amazon.awssdk:identity-spi": 90960913,
"software.amazon.awssdk:json-utils": 740192539,
"software.amazon.awssdk:metrics-spi": 692846272,
"software.amazon.awssdk:netty-nio-client": 94159754,
"software.amazon.awssdk:profiles": 1441805445,
"software.amazon.awssdk:protocol-core": 204998161,
"software.amazon.awssdk:regions": 407633714,
"software.amazon.awssdk:retries": 1892797724,
"software.amazon.awssdk:retries-spi": -2126209698,
"software.amazon.awssdk:s3": -829433125,
"software.amazon.awssdk:s3-transfer-manager": 761695256,
"software.amazon.awssdk:sdk-core": 78965981,
"software.amazon.awssdk:third-party-jackson-core": 24776375,
"software.amazon.awssdk:utils": -1896886996,
"software.amazon.awssdk:utils-lite": -446744113,
"software.amazon.eventstream:eventstream": 666815114
},
"conflict_resolution": {
"com.google.guava:failureaccess:1.0.1": "com.google.guava:failureaccess:1.0.2",
"com.google.j2objc:j2objc-annotations:2.8": "com.google.j2objc:j2objc-annotations:3.0.0",
"com.google.protobuf:protobuf-java:4.27.2": "com.google.protobuf:protobuf-java:4.28.2",
"com.squareup.okio:okio:2.10.0": "com.squareup.okio:okio:3.6.0",
"io.netty:netty-buffer:4.1.110.Final": "io.netty:netty-buffer:4.1.130.Final",
"io.netty:netty-codec-http2:4.1.110.Final": "io.netty:netty-codec-http2:4.1.130.Final",
"io.netty:netty-codec-http:4.1.110.Final": "io.netty:netty-codec-http:4.1.130.Final",
"io.netty:netty-codec:4.1.110.Final": "io.netty:netty-codec:4.1.130.Final",
"io.netty:netty-common:4.1.110.Final": "io.netty:netty-common:4.1.130.Final",
"io.netty:netty-handler:4.1.110.Final": "io.netty:netty-handler:4.1.130.Final",
"io.netty:netty-resolver:4.1.110.Final": "io.netty:netty-resolver:4.1.130.Final",
"io.netty:netty-transport-native-unix-common:4.1.110.Final": "io.netty:netty-transport-native-unix-common:4.1.130.Final",
"io.netty:netty-transport:4.1.110.Final": "io.netty:netty-transport:4.1.130.Final",
"io.opencensus:opencensus-api:0.31.0": "io.opencensus:opencensus-api:0.31.1",
"org.checkerframework:checker-qual:3.12.0": "org.checkerframework:checker-qual:3.43.0"
"io.netty:netty-buffer:4.1.127.Final": "io.netty:netty-buffer:4.1.130.Final",
"io.netty:netty-codec-http2:4.1.127.Final": "io.netty:netty-codec-http2:4.1.130.Final",
"io.netty:netty-codec-http:4.1.127.Final": "io.netty:netty-codec-http:4.1.130.Final",
"io.netty:netty-codec:4.1.127.Final": "io.netty:netty-codec:4.1.130.Final",
"io.netty:netty-common:4.1.127.Final": "io.netty:netty-common:4.1.130.Final",
"io.netty:netty-handler:4.1.127.Final": "io.netty:netty-handler:4.1.130.Final",
"io.netty:netty-resolver:4.1.127.Final": "io.netty:netty-resolver:4.1.130.Final",
"io.netty:netty-transport-native-unix-common:4.1.127.Final": "io.netty:netty-transport-native-unix-common:4.1.130.Final",
"io.netty:netty-transport:4.1.127.Final": "io.netty:netty-transport:4.1.130.Final",
"io.opencensus:opencensus-api:0.31.0": "io.opencensus:opencensus-api:0.31.1"
},
"artifacts": {
"com.amazonaws:aws-lambda-java-core": {
@@ -62,21 +269,27 @@
},
"com.google.api.grpc:proto-google-common-protos": {
"shasums": {
"jar": "0b27938f3d28ccd6884945d7e4f75f4e26a677bbf3cd39bbcb694f130f782aa9"
"jar": "352ffc769f4d17e2d6227b6893ec368f4f07fbb069dd7aaa644b16949369f8b7"
},
"version": "2.51.0"
"version": "2.63.1"
},
"com.google.api:api-common": {
"shasums": {
"jar": "f7073fb389c2aa329981ee65241db7947e8744c988e6c4d975f18bf2748b935a"
},
"version": "2.53.0"
},
"com.google.auth:google-auth-library-credentials": {
"shasums": {
"jar": "5dbf1207d14e093f67995f457cb69c3cf49bed1364150b23465e09acada65d96"
"jar": "dd7e39b8f5c366b09f8c2d400b7b63c925499df813b0f0d78044abd72098e159"
},
"version": "1.24.1"
"version": "1.40.0"
},
"com.google.auth:google-auth-library-oauth2-http": {
"shasums": {
"jar": "88a75cd4448ea2f3b46e48a89497a6cf0985a5fa4e21274af4940e07f59f6eaf"
"jar": "67fe2c9df9780d8725c1dff61d2ffbbcb93fdcf15e91c44a5e610a4a69afd151"
},
"version": "1.24.1"
"version": "1.40.0"
},
"com.google.auto.value:auto-value": {
"shasums": {
@@ -128,15 +341,15 @@
},
"com.google.http-client:google-http-client": {
"shasums": {
"jar": "390618d7b51704240b8fd28e1230fa35d220f93f4b4ba80f63e38db00dacb09e"
"jar": "97a0666340956dbc96893bc8cf843a5b57367543f218feddad3ff433fbfdaa68"
},
"version": "1.44.2"
"version": "2.0.2"
},
"com.google.http-client:google-http-client-gson": {
"shasums": {
"jar": "1119b66685195310375b717de2215d6c5d14fa8ed9f57e07b4fecd461e7b9db7"
"jar": "37c8fd5c7869bc4abf3b3219c7e79cb566afa745559772e969c21595199600cd"
},
"version": "1.44.2"
"version": "2.0.2"
},
"com.google.j2objc:j2objc-annotations": {
"shasums": {
@@ -150,17 +363,29 @@
},
"version": "4.28.2"
},
"com.google.protobuf:protobuf-java-util": {
"shasums": {
"jar": "a2665294d3e4675482bde593df8283f8c965f0207785e8e9b223f790644f5b08"
},
"version": "4.27.2"
},
"com.google.re2j:re2j": {
"shasums": {
"jar": "7b52c72156dd7f98b3237a5b35c1d34fba381b21048c89208913ad80a45dfbd7"
},
"version": "1.8"
},
"com.google.s2a.proto.v2:s2a-proto": {
"shasums": {
"jar": "3205a05a82003067fbbd28ec0381d4c75258c25eb772d37be62e8b12d0402936"
},
"version": "0.1.3"
},
"com.google.truth:truth": {
"shasums": {
"jar": "14c297bc64ca8bc15b6baf67f160627e4562ec91624797e312e907b431113508"
"jar": "a6409e90fdd6b31f239b0c02065c43b53e1b09c72f2e08c3a86d04fe5910cf4b"
},
"version": "1.4.2"
"version": "1.4.5"
},
"com.nimbusds:nimbus-jose-jwt": {
"shasums": {
@@ -266,33 +491,33 @@
},
"io.grpc:grpc-api": {
"shasums": {
"jar": "b5120a11da5ce5ddfab019bbb69f5868529c9b5def1ba5b283251cc95fb3ba91"
"jar": "45faf2ac1bf2791e8fdabce53684a86b62c99b84cba26fb13a5ba3f4abf80d6c"
},
"version": "1.68.0"
"version": "1.70.0"
},
"io.grpc:grpc-context": {
"shasums": {
"jar": "4ab6efb9cbadc88f8dc723ada3a61785da367697373d4432aef5222312aa70f6"
"jar": "eb2824831c0ac03e741efda86b141aa863a481ebc4aaf5a5c1f13a481dbb40ff"
},
"version": "1.60.1"
"version": "1.70.0"
},
"io.grpc:grpc-protobuf": {
"shasums": {
"jar": "79704cf169ee27151fce4375a4d91fe828d276d921eef5a7f497d020b0a5d345"
"jar": "9b98039ed826604c46d6ac8f8a182d413d348ec6abe26467736b05aa92e7e1d3"
},
"version": "1.68.0"
"version": "1.70.0"
},
"io.grpc:grpc-protobuf-lite": {
"shasums": {
"jar": "60e92e148b4f86c06885afa79a86beb74bffcdcba47f8b65dc7010ba6701fa80"
"jar": "e7cc2ca8981672851cbebf83a24bfb93c1b2b058e75c1a817a757b914f33403d"
},
"version": "1.68.0"
"version": "1.70.0"
},
"io.grpc:grpc-stub": {
"shasums": {
"jar": "7c4090509cd6ea0432305f9397da21127b691905bdcf163a306bedb1c6f4ead7"
"jar": "5adaa1ec1f744b67ae14a8dbc39c9589c010fad0fd557b0a02966202e4d23a18"
},
"version": "1.68.0"
"version": "1.70.0"
},
"io.netty:netty-buffer": {
"shasums": {
@@ -320,9 +545,9 @@
},
"io.netty:netty-codec-socks": {
"shasums": {
"jar": "976052a3c9bb280bc6d99f3a29e6404677cf958c3de05b205093d38c006b880c"
"jar": "d3d251f9239951a845f22e39191f95471fb2eb7951b9878ea4555ccac99529fb"
},
"version": "4.1.110.Final"
"version": "4.1.127.Final"
},
"io.netty:netty-common": {
"shasums": {
@@ -338,9 +563,9 @@
},
"io.netty:netty-handler-proxy": {
"shasums": {
"jar": "ad54ab4fe9c47ef3e723d71251126db53e8db543871adb9eafc94446539eff52"
"jar": "2c0c8046e5d737e08f40a7c2907526648860d0434e125bd51de3c2cf390453fb"
},
"version": "4.1.110.Final"
"version": "4.1.127.Final"
},
"io.netty:netty-resolver": {
"shasums": {
@@ -350,20 +575,20 @@
},
"io.netty:netty-tcnative-boringssl-static": {
"shasums": {
"jar": "3f7b4c3a51737965cd5b53777782c125784420458d96513cfac7412e4d1fa0c3",
"linux-aarch_64": "523c43f67ad9040d70f9494fc28eebf711d8c54e2aa30e3fd1a199c38740f53b",
"linux-x86_64": "3d773aac73fe40f5d04de37ce14a1f7abd27caf0b3bd8275884f5d2968b3e254",
"osx-aarch_64": "0454c53e65da6e253b2104d1ae26ecc79df4faf999e8924b659846b5bf41e996",
"osx-x86_64": "9c6a23335f296689fb3538bc49e4e280ff163675212c6fe01c9cf2a9273ee19a",
"windows-x86_64": "b3e3e0559df29a5624bcf529cb8e2bd9375c6d68164dda338e841677586a14c4"
"jar": "ec3b14ceff74c5d7e24a378e64074744cc5e7035c49cf6ca0a4e23dff9713d1f",
"linux-aarch_64": "11dfee82cfcb5c4f596271fe1d56a70fe77b4034e54162d0bd211623b540857f",
"linux-x86_64": "39ac6b1eb4ffc18d5fe9412cc6253a8954bafc8e3ca10109bc370490f73a3673",
"osx-aarch_64": "eef3fc7cdc5e2dc8c5cb50bae11443052bf1ee2f6e8b64378565746d1529f05e",
"osx-x86_64": "e3beaa3ebdb136569528c59aa826d771efadc0ac9db484c6c0e457fa5efd0f07",
"windows-x86_64": "5458b4b502763d49cd2e16c434312687178afac9c164cabf75c4a8bcecf7ac50"
},
"version": "2.0.70.Final"
"version": "2.0.74.Final"
},
"io.netty:netty-tcnative-classes": {
"shasums": {
"jar": "a79c1579313d4ad48a3ecc1d01a25da06d22d6449c3bcc369c2318749bcf55bc"
"jar": "194874cf723794dd409fd1e728cd91ffbcff0584d73b4d8a1ad0d69d04acf9b3"
},
"version": "2.0.70.Final"
"version": "2.0.74.Final"
},
"io.netty:netty-transport": {
"shasums": {
@@ -379,9 +604,9 @@
},
"io.netty:netty-transport-native-epoll": {
"shasums": {
"linux-x86_64": "dcd60c6b3076af307ab877201a136e1f1066c9be809aaed827391a23909f9135"
"linux-x86_64": "3d03f27eea1cd23357a56a96e1eeedfeb3d74fa0ba4d5c36a862bd035056275b"
},
"version": "4.1.110.Final"
"version": "4.1.127.Final"
},
"io.netty:netty-transport-native-unix-common": {
"shasums": {
@@ -425,6 +650,12 @@
},
"version": "1.2.0"
},
"javax.annotation:javax.annotation-api": {
"shasums": {
"jar": "e04ba5195bcd555dc95650f7cc614d151e4bcd52d29a10b8aa2197f3ab89ab9b"
},
"version": "1.3.2"
},
"javax.xml.bind:jaxb-api": {
"shasums": {
"jar": "88b955a0df57880a26a74708bc34f74dcaf8ebf4e78843a28b50eae945732b06"
@@ -455,23 +686,17 @@
},
"version": "4.4.16"
},
"org.apache.tomcat:annotations-api": {
"shasums": {
"jar": "253829d3c12b7381d1044fc22c6436cff025fe0d459e4a329413e560a7d0dd13"
},
"version": "6.0.53"
},
"org.checkerframework:checker-qual": {
"shasums": {
"jar": "3fbc2e98f05854c3df16df9abaa955b91b15b3ecac33623208ed6424640ef0f6"
"jar": "508c83c62c344f6f7ee28f47b88a8797d6116d043bfd1ca0576c828dd1df2880"
},
"version": "3.43.0"
"version": "3.49.5"
},
"org.codehaus.mojo:animal-sniffer-annotations": {
"shasums": {
"jar": "c720e6e5bcbe6b2f48ded75a47bccdb763eede79d14330102e0d352e3d89ed92"
"jar": "342f4d815eae69bb980620d0a622862709be37d38f47577675b42c739a962da9"
},
"version": "1.24"
"version": "1.26"
},
"org.hamcrest:hamcrest-core": {
"shasums": {
@@ -539,11 +764,17 @@
},
"version": "4.1.0-M8"
},
"org.jspecify:jspecify": {
"shasums": {
"jar": "1fad6e6be7557781e4d33729d49ae1cdc8fdda6fe477bb0cc68ce351eafdfbab"
},
"version": "1.0.0"
},
"org.ow2.asm:asm": {
"shasums": {
"jar": "3c6fac2424db3d4a853b669f4e3d1d9c3c552235e19a319673f887083c2303a1"
"jar": "876eab6a83daecad5ca67eb9fcabb063c97b5aeb8cf1fca7a989ecde17522051"
},
"version": "9.6"
"version": "9.8"
},
"org.reactivestreams:reactive-streams": {
"shasums": {
@@ -587,6 +818,12 @@
},
"version": "2.0.16"
},
"org.xerial:sqlite-jdbc": {
"shasums": {
"jar": "6dc7464e3803648d3ff18a7359bab6adf079fcd8495b18991f6f5edcb8ac6e3b"
},
"version": "3.46.1.0"
},
"software.amazon.awssdk:annotations": {
"shasums": {
"jar": "ed03bb4ff78900307dc96bacdec70ddf80c17df3eb6761219573025649f08ff3"
@@ -791,10 +1028,19 @@
"com.google.api.grpc:proto-google-common-protos": [
"com.google.protobuf:protobuf-java"
],
"com.google.api:api-common": [
"com.google.auto.value:auto-value-annotations",
"com.google.code.findbugs:jsr305",
"com.google.errorprone:error_prone_annotations",
"com.google.j2objc:j2objc-annotations",
"javax.annotation:javax.annotation-api"
],
"com.google.auth:google-auth-library-oauth2-http": [
"com.google.api:api-common",
"com.google.auth:google-auth-library-credentials",
"com.google.auto.value:auto-value-annotations",
"com.google.code.findbugs:jsr305",
"com.google.code.gson:gson",
"com.google.errorprone:error_prone_annotations",
"com.google.guava:guava",
"com.google.http-client:google-http-client",
@@ -826,12 +1072,24 @@
"com.google.code.gson:gson",
"com.google.http-client:google-http-client"
],
"com.google.protobuf:protobuf-java-util": [
"com.google.code.findbugs:jsr305",
"com.google.code.gson:gson",
"com.google.errorprone:error_prone_annotations",
"com.google.guava:guava",
"com.google.j2objc:j2objc-annotations",
"com.google.protobuf:protobuf-java"
],
"com.google.s2a.proto.v2:s2a-proto": [
"io.grpc:grpc-protobuf",
"io.grpc:grpc-stub"
],
"com.google.truth:truth": [
"com.google.auto.value:auto-value-annotations",
"com.google.errorprone:error_prone_annotations",
"com.google.guava:guava",
"junit:junit",
"org.checkerframework:checker-qual",
"org.jspecify:jspecify",
"org.ow2.asm:asm"
],
"com.nimbusds:nimbus-jose-jwt": [
@@ -919,7 +1177,8 @@
"io.grpc:grpc-stub": [
"com.google.errorprone:error_prone_annotations",
"com.google.guava:guava",
"io.grpc:grpc-api"
"io.grpc:grpc-api",
"org.codehaus.mojo:animal-sniffer-annotations"
],
"io.netty:netty-buffer": [
"io.netty:netty-common"
@@ -1101,6 +1360,9 @@
"org.slf4j:slf4j-simple": [
"org.slf4j:slf4j-api"
],
"org.xerial:sqlite-jdbc": [
"org.slf4j:slf4j-api"
],
"software.amazon.awssdk:apache-client": [
"commons-codec:commons-codec",
"org.apache.httpcomponents:httpclient",
@@ -1409,11 +1671,17 @@
"com.google.shopping.type",
"com.google.type"
],
"com.google.api:api-common": [
"com.google.api.core",
"com.google.api.pathtemplate",
"com.google.api.resourcenames"
],
"com.google.auth:google-auth-library-credentials": [
"com.google.auth"
],
"com.google.auth:google-auth-library-oauth2-http": [
"com.google.auth.http",
"com.google.auth.mtls",
"com.google.auth.oauth2"
],
"com.google.auto.value:auto-value": [
@@ -1531,9 +1799,15 @@
"com.google.protobuf",
"com.google.protobuf.compiler"
],
"com.google.protobuf:protobuf-java-util": [
"com.google.protobuf.util"
],
"com.google.re2j:re2j": [
"com.google.re2j"
],
"com.google.s2a.proto.v2:s2a-proto": [
"com.google.s2a.proto.v2"
],
"com.google.truth:truth": [
"com.google.common.truth"
],
@@ -1841,6 +2115,11 @@
"javax.activation:javax.activation-api": [
"javax.activation"
],
"javax.annotation:javax.annotation-api": [
"javax.annotation",
"javax.annotation.security",
"javax.annotation.sql"
],
"javax.xml.bind:jaxb-api": [
"javax.xml.bind",
"javax.xml.bind.annotation",
@@ -1937,13 +2216,6 @@
"org.apache.http.ssl",
"org.apache.http.util"
],
"org.apache.tomcat:annotations-api": [
"javax.annotation",
"javax.annotation.security",
"javax.ejb",
"javax.persistence",
"javax.xml.ws"
],
"org.checkerframework:checker-qual": [
"org.checkerframework.checker.builder.qual",
"org.checkerframework.checker.calledmethods.qual",
@@ -1958,12 +2230,14 @@
"org.checkerframework.checker.interning.qual",
"org.checkerframework.checker.lock.qual",
"org.checkerframework.checker.mustcall.qual",
"org.checkerframework.checker.nonempty.qual",
"org.checkerframework.checker.nullness.qual",
"org.checkerframework.checker.optional.qual",
"org.checkerframework.checker.propkey.qual",
"org.checkerframework.checker.regex.qual",
"org.checkerframework.checker.signature.qual",
"org.checkerframework.checker.signedness.qual",
"org.checkerframework.checker.sqlquotes.qual",
"org.checkerframework.checker.tainting.qual",
"org.checkerframework.checker.units.qual",
"org.checkerframework.common.aliasing.qual",
@@ -2051,6 +2325,9 @@
"org.json4s:json4s-native_3": [
"org.json4s.native"
],
"org.jspecify:jspecify": [
"org.jspecify.annotations"
],
"org.ow2.asm:asm": [
"org.objectweb.asm",
"org.objectweb.asm.signature"
@@ -2089,7 +2366,6 @@
"scala.reflect",
"scala.reflect.macros.internal",
"scala.runtime",
"scala.runtime.java8",
"scala.sys",
"scala.sys.process",
"scala.util",
@@ -2102,7 +2378,6 @@
"scala.annotation",
"scala.annotation.internal",
"scala.annotation.unchecked",
"scala.compiletime",
"scala.compiletime.ops",
"scala.compiletime.testing",
"scala.deriving",
@@ -2140,6 +2415,16 @@
"org.slf4j:slf4j-simple": [
"org.slf4j.simple"
],
"org.xerial:sqlite-jdbc": [
"org.sqlite",
"org.sqlite.core",
"org.sqlite.date",
"org.sqlite.javax",
"org.sqlite.jdbc3",
"org.sqlite.jdbc4",
"org.sqlite.nativeimage",
"org.sqlite.util"
],
"software.amazon.awssdk:annotations": [
"software.amazon.awssdk.annotations"
],
@@ -2455,6 +2740,7 @@
"com.github.stephenc.jcip:jcip-annotations",
"com.google.android:annotations",
"com.google.api.grpc:proto-google-common-protos",
"com.google.api:api-common",
"com.google.auth:google-auth-library-credentials",
"com.google.auth:google-auth-library-oauth2-http",
"com.google.auto.value:auto-value",
@@ -2469,7 +2755,9 @@
"com.google.http-client:google-http-client-gson",
"com.google.j2objc:j2objc-annotations",
"com.google.protobuf:protobuf-java",
"com.google.protobuf:protobuf-java-util",
"com.google.re2j:re2j",
"com.google.s2a.proto.v2:s2a-proto",
"com.google.truth:truth",
"com.nimbusds:nimbus-jose-jwt",
"com.squareup.okhttp3:okhttp",
@@ -2519,12 +2807,12 @@
"io.perfmark:perfmark-api",
"io.sentry:sentry",
"javax.activation:javax.activation-api",
"javax.annotation:javax.annotation-api",
"javax.xml.bind:jaxb-api",
"joda-time:joda-time",
"junit:junit",
"org.apache.httpcomponents:httpclient",
"org.apache.httpcomponents:httpcore",
"org.apache.tomcat:annotations-api",
"org.checkerframework:checker-qual",
"org.codehaus.mojo:animal-sniffer-annotations",
"org.hamcrest:hamcrest-core",
@@ -2538,6 +2826,7 @@
"org.json4s:json4s-jackson-core_3",
"org.json4s:json4s-native-core_3",
"org.json4s:json4s-native_3",
"org.jspecify:jspecify",
"org.ow2.asm:asm",
"org.reactivestreams:reactive-streams",
"org.scala-lang.modules:scala-collection-compat_3",
@@ -2546,6 +2835,7 @@
"org.scalamock:scalamock_3",
"org.slf4j:slf4j-api",
"org.slf4j:slf4j-simple",
"org.xerial:sqlite-jdbc",
"software.amazon.awssdk:annotations",
"software.amazon.awssdk:apache-client",
"software.amazon.awssdk:arns",
@@ -2622,6 +2912,11 @@
"org.slf4j.simple.SimpleServiceProvider"
]
},
"org.xerial:sqlite-jdbc": {
"java.sql.Driver": [
"org.sqlite.JDBC"
]
},
"software.amazon.awssdk:apache-client": {
"software.amazon.awssdk.http.SdkHttpService": [
"software.amazon.awssdk.http.apache.ApacheSdkHttpService"
@@ -2638,5 +2933,5 @@
]
}
},
"version": "2"
"version": "3"
}
+64 -4
View File
@@ -2,7 +2,67 @@
set -euxo pipefail
/bin/echo "build protos"
mkdir -p src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Plugins/Eagle0Protos/
dotnet build src/main/csharp/net/eagle0/clients/unity/eagle0/protos/protos.csproj \
-o src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Plugins/Eagle0Protos/
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
UNITY_ROOT="$REPO_ROOT/src/main/csharp/net/eagle0/clients/unity/eagle0"
OUTPUT_DIR="$UNITY_ROOT/Assets/GeneratedProtos"
# All C# protobuf generation targets
TARGETS=(
"//src/main/protobuf/net/eagle0/common:common_csharp_proto_srcs"
"//src/main/protobuf/net/eagle0/shardok/storage:storage_csharp_proto_srcs"
"//src/main/protobuf/net/eagle0/shardok/common:common_csharp_proto_srcs"
"//src/main/protobuf/net/eagle0/shardok/api:api_csharp_proto_srcs"
"//src/main/protobuf/net/eagle0/eagle/common:common_csharp_proto_srcs"
"//src/main/protobuf/net/eagle0/eagle/views:views_csharp_proto_srcs"
"//src/main/protobuf/net/eagle0/eagle/api:api_csharp_proto_srcs"
"//src/main/protobuf/net/eagle0/eagle/api:api_csharp_grpc_srcs"
"//src/main/protobuf/net/eagle0/eagle/api/command/util:util_csharp_proto_srcs"
)
# Subdirectory for each target (avoids filename collisions across packages)
SUBDIRS=(
"net/eagle0/common"
"net/eagle0/shardok/storage"
"net/eagle0/shardok/common"
"net/eagle0/shardok/api"
"net/eagle0/eagle/common"
"net/eagle0/eagle/views"
"net/eagle0/eagle/api"
"net/eagle0/eagle/api"
"net/eagle0/eagle/api/command/util"
)
/bin/echo "Building C# protobuf sources..."
bazel build "${TARGETS[@]}"
/bin/echo "Syncing generated .cs files to $OUTPUT_DIR..."
# Stage new files in a temp directory, then rsync to preserve timestamps
# on unchanged files. This avoids triggering Unity reimport when protos
# haven't changed, saving ~7 minutes of script recompilation.
STAGING_DIR=$(mktemp -d)
trap "rm -rf '$STAGING_DIR'" EXIT
for i in "${!TARGETS[@]}"; do
target="${TARGETS[$i]}"
subdir="${SUBDIRS[$i]}"
# Convert target label to bazel-bin path
# //src/main/protobuf/net/eagle0/common:common_csharp_proto_srcs
# -> bazel-bin/src/main/protobuf/net/eagle0/common/common_csharp_proto_srcs
target_path="${target#//}"
pkg="${target_path%%:*}"
name="${target_path##*:}"
bin_dir="$REPO_ROOT/bazel-bin/$pkg/$name"
dest_dir="$STAGING_DIR/$subdir"
mkdir -p "$dest_dir"
find "$bin_dir" -name "*.cs" -exec cp {} "$dest_dir/" \;
done
# Sync only changed files and delete removed ones; --checksum compares
# content not timestamps so unchanged files keep their original mtime.
mkdir -p "$OUTPUT_DIR"
rsync -rc --delete "$STAGING_DIR/" "$OUTPUT_DIR/"
/bin/echo "Done. Generated C# proto sources in $OUTPUT_DIR"
+8 -3
View File
@@ -2,6 +2,9 @@
#
# Build the SparklePlugin native library for Unity using Bazel
#
# The SparklePlugin is built in a separate Bazel workspace (sparkle_workspace/)
# to avoid rules_swift version conflicts between grpc and rules_apple.
#
# Usage: build_sparkle_plugin.sh [output_dir]
set -euo pipefail
@@ -11,12 +14,14 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
OUTPUT_DIR="${1:-$PROJECT_ROOT/src/main/csharp/net/eagle0/clients/unity/eagle0/Assets/Plugins/macOS}"
echo "=== Building SparklePlugin with Bazel ==="
echo "=== Building SparklePlugin with Bazel (from sparkle_workspace) ==="
bazel build --config=mactools //src/main/objc/net/eagle0/sparkle:SparklePlugin
# Build in the separate sparkle_workspace to avoid dependency conflicts
cd "$PROJECT_ROOT/sparkle_workspace"
bazel build //:SparklePlugin
# Get the zip path from bazel
ZIP_PATH=$(bazel cquery --config=mactools --output=files //src/main/objc/net/eagle0/sparkle:SparklePlugin 2>/dev/null)
ZIP_PATH=$(bazel cquery --output=files //:SparklePlugin 2>/dev/null)
echo "=== Extracting SparklePlugin.bundle ==="
mkdir -p "$OUTPUT_DIR"
+26 -5
View File
@@ -22,11 +22,31 @@ NC='\033[0m' # No Color
MODE="${1:-check}"
EXIT_CODE=0
# Cache for expensive bazel query results
LIBRARY_DEPS_CACHE=""
MAIN_DEPS_CACHE=""
# Get deps of library/ (cached)
get_library_deps() {
if [ -z "$LIBRARY_DEPS_CACHE" ]; then
LIBRARY_DEPS_CACHE=$(bazel query 'deps(//src/main/scala/net/eagle0/eagle/library/...)' 2>/dev/null || true)
fi
echo "$LIBRARY_DEPS_CACHE"
}
# Get deps of src/main (cached)
get_main_deps() {
if [ -z "$MAIN_DEPS_CACHE" ]; then
MAIN_DEPS_CACHE=$(bazel query 'deps(//src/main/...)' 2>/dev/null || true)
fi
echo "$MAIN_DEPS_CACHE"
}
# Rule 1: src/main should not depend on src/test
check_main_depends_on_test() {
echo -e "${YELLOW}Checking: src/main should not depend on src/test...${NC}"
violations=$(bazel query 'deps(//src/main/...) intersect //src/test/...' 2>/dev/null || true)
violations=$(get_main_deps | grep "^//src/test/" || true)
if [ -n "$violations" ]; then
echo -e "${RED}VIOLATION: src/main depends on src/test:${NC}"
@@ -43,7 +63,7 @@ check_main_depends_on_test() {
check_library_depends_on_scala_proto() {
echo -e "${YELLOW}Checking: library/ should not depend on Scala proto types...${NC}"
violations=$(bazel query 'deps(//src/main/scala/net/eagle0/eagle/library/...) intersect //src/main/protobuf/...' 2>/dev/null | grep "_scala_proto" || true)
violations=$(get_library_deps | grep "^//src/main/protobuf/.*_scala_proto$" || true)
if [ -z "$violations" ]; then
count=0
else
@@ -65,7 +85,7 @@ check_library_depends_on_scala_proto() {
check_library_depends_on_proto_converters() {
echo -e "${YELLOW}Checking: library/ should not depend on proto_converters...${NC}"
violations=$(bazel query 'deps(//src/main/scala/net/eagle0/eagle/library/...) intersect //src/main/scala/net/eagle0/eagle/model/proto_converters/...' 2>/dev/null | grep "^//" || true)
violations=$(get_library_deps | grep "^//src/main/scala/net/eagle0/eagle/model/proto_converters/" || true)
if [ -n "$violations" ]; then
count=$(echo "$violations" | wc -l | tr -d ' ')
@@ -85,7 +105,8 @@ check_library_depends_on_proto_converters() {
count_proto_deps() {
echo -e "${YELLOW}=== Proto dependency counts ===${NC}"
scala_proto_results=$(bazel query 'deps(//src/main/scala/net/eagle0/eagle/library/...) intersect //src/main/protobuf/...' 2>/dev/null | grep "_scala_proto" || true)
library_deps=$(get_library_deps)
scala_proto_results=$(echo "$library_deps" | grep "^//src/main/protobuf/.*_scala_proto$" || true)
if [ -z "$scala_proto_results" ]; then
scala_proto_count=0
else
@@ -94,7 +115,7 @@ count_proto_deps() {
echo "library/ Scala proto deps: $scala_proto_count"
# C++/Go proto deps are expected (map generation tools)
all_proto_count=$(bazel query 'deps(//src/main/scala/net/eagle0/eagle/library/...) intersect //src/main/protobuf/...' 2>/dev/null | wc -l | tr -d ' ')
all_proto_count=$(echo "$library_deps" | grep -c "^//src/main/protobuf/" || echo "0")
echo "library/ all proto deps (includes C++/Go build tools): $all_proto_count"
}
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
curl -L "https://docs.google.com/spreadsheets/d/1DHEsiv4cY4gE6AX3sVH82K__mpBD1aznIYCQwQxA_F0/export?gid=0&format=tsv" | tr -d '\r' > /tmp/names.tsv
bazel run //src/main/scala/net/eagle0/util:name_list_checker -- /tmp/names.tsv > src/main/resources/net/eagle0/names.tsv
bazel run //src/main/scala/net/eagle0/util:name_list_checker -- /tmp/names.tsv > /dev/null
bazel run //src/main/scala/net/eagle0/util:name_list_json_maker -- /tmp/names.tsv > src/main/resources/net/eagle0/names.json
curl -L "https://docs.google.com/spreadsheets/d/1NhvG73HKyVE36yGpkV2oJiSIXoNqQOYTr5ArLnucYL0/export?gid=0&format=tsv" | tr -d '\r' > src/main/resources/net/eagle0/shardok/battalionTypes.tsv
curl -L "https://docs.google.com/spreadsheets/d/1pNWiyxIks2wJ1v7jRLFD24zrKHG2AfhC-nkWmQKQGN4/export?gid=0&format=tsv" | tr -d '\r' > src/main/resources/net/eagle0/eagle/heroes.tsv
+73
View File
@@ -0,0 +1,73 @@
#!/bin/bash
#
# Restart the active Eagle instance.
# Reads the active instance from /opt/eagle0/.active-instance (set by deploy-blue-green.sh).
#
# This is useful when you need Eagle to reload game state from persistence
# (e.g., after a rewind) without doing a full blue-green deployment.
#
# Usage:
# eagle-restart # Restart active instance, wait for healthy
# eagle-restart --no-wait # Restart without waiting for health check
#
# To create an alias, add to ~/.bashrc:
# alias eagle-restart='/opt/eagle0/scripts/eagle-restart.sh'
#
set -euo pipefail
APP_DIR="${APP_DIR:-/opt/eagle0}"
ACTIVE_FILE="${APP_DIR}/.active-instance"
HEALTH_TIMEOUT=120 # seconds
# Read active instance from file, with fallback
if [ -f "$ACTIVE_FILE" ]; then
ACTIVE=$(cat "$ACTIVE_FILE")
else
# Fallback: check which container is actually running
if docker inspect --format='{{.State.Running}}' eagle-blue 2>/dev/null | grep -q true; then
ACTIVE="eagle-blue"
elif docker inspect --format='{{.State.Running}}' eagle-green 2>/dev/null | grep -q true; then
ACTIVE="eagle-green"
else
ACTIVE=""
fi
fi
if [ -z "$ACTIVE" ]; then
echo "Error: No active Eagle instance found" >&2
exit 1
fi
NO_WAIT=false
if [ "${1:-}" = "--no-wait" ]; then
NO_WAIT=true
fi
echo "Restarting ${ACTIVE}..."
docker restart "$ACTIVE"
if [ "$NO_WAIT" = true ]; then
echo "Restart initiated. Not waiting for health check."
exit 0
fi
echo "Waiting for ${ACTIVE} to become healthy (timeout: ${HEALTH_TIMEOUT}s)..."
elapsed=0
while [ $elapsed -lt $HEALTH_TIMEOUT ]; do
health=$(docker inspect --format='{{.State.Health.Status}}' "$ACTIVE" 2>/dev/null || echo "unknown")
if [ "$health" = "healthy" ]; then
echo "${ACTIVE} is healthy after ${elapsed}s."
exit 0
fi
sleep 2
elapsed=$((elapsed + 2))
# Print progress every 10 seconds
if [ $((elapsed % 10)) -eq 0 ]; then
echo " ...${elapsed}s (status: ${health})"
fi
done
echo "Warning: ${ACTIVE} did not become healthy within ${HEALTH_TIMEOUT}s (status: ${health})" >&2
echo "Check logs with: eagle-logs" >&2
exit 1
+1
View File
@@ -0,0 +1 @@
7.7.1
+2
View File
@@ -0,0 +1,2 @@
# Bazel symlinks
bazel-*
+28
View File
@@ -0,0 +1,28 @@
module(name = "sparkle_workspace")
# Minimal dependencies for building SparklePlugin
# This workspace is isolated from the main workspace to avoid
# rules_swift version conflicts between grpc and rules_apple
bazel_dep(name = "apple_support", version = "1.21.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "rules_apple", version = "4.3.3", repo_name = "build_bazel_rules_apple")
# Register Apple CC toolchain for Objective-C compilation
apple_cc_configure = use_extension(
"@build_bazel_apple_support//crosstool:setup.bzl",
"apple_cc_configure_extension",
)
use_repo(apple_cc_configure, "local_config_apple_cc")
# Sparkle framework for macOS auto-updates
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
SPARKLE_VERSION = "2.6.4"
http_archive(
name = "sparkle",
build_file = "//:external/BUILD.sparkle",
sha256 = "50612a06038abc931f16011d7903b8326a362c1074dabccb718404ce8e585f0b",
strip_prefix = "",
url = "https://github.com/sparkle-project/Sparkle/releases/download/%s/Sparkle-%s.tar.xz" % (SPARKLE_VERSION, SPARKLE_VERSION),
)
+451
View File
@@ -0,0 +1,451 @@
{
"lockFileVersion": 13,
"registryFileHashes": {
"https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497",
"https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2",
"https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589",
"https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0",
"https://bcr.bazel.build/modules/abseil-cpp/20230802.0.bcr.1/MODULE.bazel": "1c8cec495288dccd14fdae6e3f95f772c1c91857047a098fad772034264cc8cb",
"https://bcr.bazel.build/modules/abseil-cpp/20230802.0/MODULE.bazel": "d253ae36a8bd9ee3c5955384096ccb6baf16a1b1e93e858370da0a3b94f77c16",
"https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915",
"https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed",
"https://bcr.bazel.build/modules/abseil-cpp/20240116.1/source.json": "9be551b8d4e3ef76875c0d744b5d6a504a27e3ae67bc6b28f46415fd2d2957da",
"https://bcr.bazel.build/modules/apple_support/1.11.1/MODULE.bazel": "1843d7cd8a58369a444fc6000e7304425fba600ff641592161d9f15b179fb896",
"https://bcr.bazel.build/modules/apple_support/1.15.1/MODULE.bazel": "a0556fefca0b1bb2de8567b8827518f94db6a6e7e7d632b4c48dc5f865bc7c85",
"https://bcr.bazel.build/modules/apple_support/1.21.1/MODULE.bazel": "5809fa3efab15d1f3c3c635af6974044bac8a4919c62238cce06acee8a8c11f1",
"https://bcr.bazel.build/modules/apple_support/1.23.1/MODULE.bazel": "53763fed456a968cf919b3240427cf3a9d5481ec5466abc9d5dc51bc70087442",
"https://bcr.bazel.build/modules/apple_support/1.23.1/source.json": "d888b44312eb0ad2c21a91d026753f330caa48a25c9b2102fae75eb2b0dcfdd2",
"https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd",
"https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8",
"https://bcr.bazel.build/modules/bazel_features/1.15.0/MODULE.bazel": "d38ff6e517149dc509406aca0db3ad1efdd890a85e049585b7234d04238e2a4d",
"https://bcr.bazel.build/modules/bazel_features/1.17.0/MODULE.bazel": "039de32d21b816b47bd42c778e0454217e9c9caac4a3cf8e15c7231ee3ddee4d",
"https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a",
"https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58",
"https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b",
"https://bcr.bazel.build/modules/bazel_features/1.27.0/MODULE.bazel": "621eeee06c4458a9121d1f104efb80f39d34deff4984e778359c60eaf1a8cb65",
"https://bcr.bazel.build/modules/bazel_features/1.28.0/MODULE.bazel": "4b4200e6cbf8fa335b2c3f43e1d6ef3e240319c33d43d60cc0fbd4b87ece299d",
"https://bcr.bazel.build/modules/bazel_features/1.3.0/MODULE.bazel": "cdcafe83ec318cda34e02948e81d790aab8df7a929cec6f6969f13a489ccecd9",
"https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87",
"https://bcr.bazel.build/modules/bazel_features/1.30.0/source.json": "b07e17f067fe4f69f90b03b36ef1e08fe0d1f3cac254c1241a1818773e3423bc",
"https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7",
"https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8",
"https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e",
"https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686",
"https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a",
"https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5",
"https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d",
"https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651",
"https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138",
"https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917",
"https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d",
"https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b",
"https://bcr.bazel.build/modules/bazel_skylib/1.7.1/source.json": "f121b43eeefc7c29efbd51b83d08631e2347297c95aac9764a701f2a6a2bb953",
"https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84",
"https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8",
"https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb",
"https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4",
"https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6",
"https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/source.json": "41e9e129f80d8c8bf103a7acc337b76e54fad1214ac0a7084bf24f4cd924b8b4",
"https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f",
"https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075",
"https://bcr.bazel.build/modules/jsoncpp/1.9.5/source.json": "4108ee5085dd2885a341c7fab149429db457b3169b86eb081fa245eadf69169d",
"https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902",
"https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74",
"https://bcr.bazel.build/modules/nlohmann_json/3.6.1/source.json": "f448c6e8963fdfa7eb831457df83ad63d3d6355018f6574fb017e8169deb43a9",
"https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5",
"https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f",
"https://bcr.bazel.build/modules/platforms/0.0.11/source.json": "f7e188b79ebedebfe75e9e1d098b8845226c7992b307e28e1496f23112e8fc29",
"https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee",
"https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37",
"https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615",
"https://bcr.bazel.build/modules/platforms/0.0.7/MODULE.bazel": "72fd4a0ede9ee5c021f6a8dd92b503e089f46c227ba2813ff183b71616034814",
"https://bcr.bazel.build/modules/platforms/0.0.8/MODULE.bazel": "9f142c03e348f6d263719f5074b21ef3adf0b139ee4c5133e2aa35664da9eb2d",
"https://bcr.bazel.build/modules/platforms/0.0.9/MODULE.bazel": "4a87a60c927b56ddd67db50c89acaa62f4ce2a1d2149ccb63ffd871d5ce29ebc",
"https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7",
"https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c",
"https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df",
"https://bcr.bazel.build/modules/protobuf/29.0-rc3/MODULE.bazel": "33c2dfa286578573afc55a7acaea3cada4122b9631007c594bf0729f41c8de92",
"https://bcr.bazel.build/modules/protobuf/29.0-rc3/source.json": "c16a6488fb279ef578da7098e605082d72ed85fc8d843eaae81e7d27d0f4625d",
"https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0",
"https://bcr.bazel.build/modules/protobuf/3.19.6/MODULE.bazel": "9233edc5e1f2ee276a60de3eaa47ac4132302ef9643238f23128fea53ea12858",
"https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/MODULE.bazel": "88af1c246226d87e65be78ed49ecd1e6f5e98648558c14ce99176da041dc378e",
"https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/source.json": "be4789e951dd5301282729fe3d4938995dc4c1a81c2ff150afc9f1b0504c6022",
"https://bcr.bazel.build/modules/re2/2023-09-01/MODULE.bazel": "cb3d511531b16cfc78a225a9e2136007a48cf8a677e4264baeab57fe78a80206",
"https://bcr.bazel.build/modules/re2/2023-09-01/source.json": "e044ce89c2883cd957a2969a43e79f7752f9656f6b20050b62f90ede21ec6eb4",
"https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8",
"https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e",
"https://bcr.bazel.build/modules/rules_apple/4.3.3/MODULE.bazel": "c5c2c4adeeac5f3f2f9b7f16abfa8be7ffefa596171d0d92bed4cae9ade0a498",
"https://bcr.bazel.build/modules/rules_apple/4.3.3/source.json": "3cb1d69c8243ffcc42ecbf84ae8b9cccd7b1e2f091b0aee5a3e9c9a45267f312",
"https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647",
"https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002",
"https://bcr.bazel.build/modules/rules_cc/0.0.11/MODULE.bazel": "9f249c5624a4788067b96b8b896be10c7e8b4375dc46f6d8e1e51100113e0992",
"https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191",
"https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc",
"https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87",
"https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c",
"https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f",
"https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e",
"https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5",
"https://bcr.bazel.build/modules/rules_cc/0.1.2/MODULE.bazel": "557ddc3a96858ec0d465a87c0a931054d7dcfd6583af2c7ed3baf494407fd8d0",
"https://bcr.bazel.build/modules/rules_cc/0.1.2/source.json": "53fcb09b5816c83ca60d9d7493faf3bfaf410dfc2f15deb52d6ddd146b8d43f0",
"https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6",
"https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8",
"https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/source.json": "c8b1e2c717646f1702290959a3302a178fb639d987ab61d548105019f11e527e",
"https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74",
"https://bcr.bazel.build/modules/rules_java/5.3.5/MODULE.bazel": "a4ec4f2db570171e3e5eb753276ee4b389bae16b96207e9d3230895c99644b86",
"https://bcr.bazel.build/modules/rules_java/6.5.2/MODULE.bazel": "1d440d262d0e08453fa0c4d8f699ba81609ed0e9a9a0f02cd10b3e7942e61e31",
"https://bcr.bazel.build/modules/rules_java/7.10.0/MODULE.bazel": "530c3beb3067e870561739f1144329a21c851ff771cd752a49e06e3dc9c2e71a",
"https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6",
"https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab",
"https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe",
"https://bcr.bazel.build/modules/rules_java/7.6.5/MODULE.bazel": "481164be5e02e4cab6e77a36927683263be56b7e36fef918b458d7a8a1ebadb1",
"https://bcr.bazel.build/modules/rules_java/8.3.2/MODULE.bazel": "7336d5511ad5af0b8615fdc7477535a2e4e723a357b6713af439fe8cf0195017",
"https://bcr.bazel.build/modules/rules_java/8.5.1/MODULE.bazel": "d8a9e38cc5228881f7055a6079f6f7821a073df3744d441978e7a43e20226939",
"https://bcr.bazel.build/modules/rules_java/8.5.1/source.json": "db1a77d81b059e0f84985db67a22f3f579a529a86b7997605be3d214a0abe38e",
"https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7",
"https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909",
"https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036",
"https://bcr.bazel.build/modules/rules_jvm_external/6.3/MODULE.bazel": "c998e060b85f71e00de5ec552019347c8bca255062c990ac02d051bb80a38df0",
"https://bcr.bazel.build/modules/rules_jvm_external/6.3/source.json": "6f5f5a5a4419ae4e37c35a5bb0a6ae657ed40b7abc5a5189111b47fcebe43197",
"https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3",
"https://bcr.bazel.build/modules/rules_kotlin/1.9.6/source.json": "2faa4794364282db7c06600b7e5e34867a564ae91bda7cae7c29c64e9466b7d5",
"https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0",
"https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d",
"https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c",
"https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb",
"https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc",
"https://bcr.bazel.build/modules/rules_pkg/1.0.1/MODULE.bazel": "5b1df97dbc29623bccdf2b0dcd0f5cb08e2f2c9050aab1092fd39a41e82686ff",
"https://bcr.bazel.build/modules/rules_pkg/1.0.1/source.json": "bd82e5d7b9ce2d31e380dd9f50c111d678c3bdaca190cb76b0e1c71b05e1ba8a",
"https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06",
"https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7",
"https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73",
"https://bcr.bazel.build/modules/rules_proto/6.0.2/source.json": "17a2e195f56cb28d6bbf763e49973d13890487c6945311ed141e196fb660426d",
"https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f",
"https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel": "26114f0c0b5e93018c0c066d6673f1a2c3737c7e90af95eff30cfee38d0bbac7",
"https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300",
"https://bcr.bazel.build/modules/rules_python/0.25.0/MODULE.bazel": "72f1506841c920a1afec76975b35312410eea3aa7b63267436bfb1dd91d2d382",
"https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed",
"https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58",
"https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c",
"https://bcr.bazel.build/modules/rules_python/1.3.0/MODULE.bazel": "8361d57eafb67c09b75bf4bbe6be360e1b8f4f18118ab48037f2bd50aa2ccb13",
"https://bcr.bazel.build/modules/rules_python/1.3.0/source.json": "25932f917cd279c7baefa6cb1d3fa8750a7a29de522024449b19af6eab51f4a0",
"https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c",
"https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b",
"https://bcr.bazel.build/modules/rules_shell/0.3.0/source.json": "c55ed591aa5009401ddf80ded9762ac32c358d2517ee7820be981e2de9756cf3",
"https://bcr.bazel.build/modules/rules_swift/1.16.0/MODULE.bazel": "4a09f199545a60d09895e8281362b1ff3bb08bbde69c6fc87aff5b92fcc916ca",
"https://bcr.bazel.build/modules/rules_swift/2.4.0/MODULE.bazel": "1639617eb1ede28d774d967a738b4a68b0accb40650beadb57c21846beab5efd",
"https://bcr.bazel.build/modules/rules_swift/2.4.0/source.json": "a6577f57f9febbdc015a01f2a8f3487422032f134d6c61d18ed8e8ca3b9acc7c",
"https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8",
"https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c",
"https://bcr.bazel.build/modules/stardoc/0.7.0/MODULE.bazel": "05e3d6d30c099b6770e97da986c53bd31844d7f13d41412480ea265ac9e8079c",
"https://bcr.bazel.build/modules/stardoc/0.7.2/MODULE.bazel": "fc152419aa2ea0f51c29583fab1e8c99ddefd5b3778421845606ee628629e0e5",
"https://bcr.bazel.build/modules/stardoc/0.7.2/source.json": "58b029e5e901d6802967754adf0a9056747e8176f017cfe3607c0851f4d42216",
"https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/MODULE.bazel": "5e463fbfba7b1701d957555ed45097d7f984211330106ccd1352c6e0af0dcf91",
"https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/source.json": "32bd87e5f4d7acc57c5b2ff7c325ae3061d5e242c0c4c214ae87e0f1c13e54cb",
"https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43",
"https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0",
"https://bcr.bazel.build/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27",
"https://bcr.bazel.build/modules/zlib/1.3.1.bcr.3/MODULE.bazel": "af322bc08976524477c79d1e45e241b6efbeb918c497e8840b8ab116802dda79",
"https://bcr.bazel.build/modules/zlib/1.3.1.bcr.3/source.json": "2be409ac3c7601245958cd4fcdff4288be79ed23bd690b4b951f500d54ee6e7d",
"https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198"
},
"selectedYankedVersions": {},
"moduleExtensions": {
"@@rules_java~//java:rules_java_deps.bzl%compatibility_proxy": {
"general": {
"bzlTransitiveDigest": "C4xqrMy1wN4iuTN6Z2eCm94S5XingHhD6uwrIXvCxVI=",
"usagesDigest": "pwHZ+26iLgQdwvdZeA5wnAjKnNI3y6XO2VbhOTeo5h8=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
"generatedRepoSpecs": {
"compatibility_proxy": {
"bzlFile": "@@rules_java~//java:rules_java_deps.bzl",
"ruleClassName": "_compatibility_proxy_repo_rule",
"attributes": {}
}
},
"recordedRepoMappingEntries": [
[
"rules_java~",
"bazel_tools",
"bazel_tools"
]
]
}
},
"@@rules_kotlin~//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": {
"general": {
"bzlTransitiveDigest": "eecmTsmdIQveoA97hPtH3/Ej/kugbdCI24bhXIXaly8=",
"usagesDigest": "aJF6fLy82rR95Ff5CZPAqxNoFgOMLMN5ImfBS0nhnkg=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
"generatedRepoSpecs": {
"com_github_jetbrains_kotlin_git": {
"bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:compiler.bzl",
"ruleClassName": "kotlin_compiler_git_repository",
"attributes": {
"urls": [
"https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip"
],
"sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88"
}
},
"com_github_jetbrains_kotlin": {
"bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:compiler.bzl",
"ruleClassName": "kotlin_capabilities_repository",
"attributes": {
"git_repository_name": "com_github_jetbrains_kotlin_git",
"compiler_version": "1.9.23"
}
},
"com_github_google_ksp": {
"bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:ksp.bzl",
"ruleClassName": "ksp_compiler_plugin_repository",
"attributes": {
"urls": [
"https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip"
],
"sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d",
"strip_version": "1.9.23-1.0.20"
}
},
"com_github_pinterest_ktlint": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
"attributes": {
"sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985",
"urls": [
"https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint"
],
"executable": true
}
},
"rules_android": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
"strip_prefix": "rules_android-0.1.1",
"urls": [
"https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"
]
}
}
},
"recordedRepoMappingEntries": [
[
"rules_kotlin~",
"bazel_tools",
"bazel_tools"
]
]
}
},
"@@rules_python~//python/uv:uv.bzl%uv": {
"general": {
"bzlTransitiveDigest": "Xpqjnjzy6zZ90Es9Wa888ZLHhn7IsNGbph/e6qoxzw8=",
"usagesDigest": "qI5PVlIum/YAnGJg5oXGHzDkMFWt2aNSUZY4G8PBbic=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
"generatedRepoSpecs": {
"uv": {
"bzlFile": "@@rules_python~//python/uv/private:uv_toolchains_repo.bzl",
"ruleClassName": "uv_toolchains_repo",
"attributes": {
"toolchain_type": "'@@rules_python~//python/uv:uv_toolchain_type'",
"toolchain_names": [
"none"
],
"toolchain_implementations": {
"none": "'@@rules_python~//python:none'"
},
"toolchain_compatible_with": {
"none": [
"@platforms//:incompatible"
]
},
"toolchain_target_settings": {}
}
}
},
"recordedRepoMappingEntries": [
[
"rules_python~",
"platforms",
"platforms"
]
]
}
},
"@@rules_swift~//swift:extensions.bzl%non_module_deps": {
"general": {
"bzlTransitiveDigest": "l+Zu+SMObRQy3DG2LEw0eGVPkYRnyVj+M1QyR5AAFmM=",
"usagesDigest": "l2vIL7SL4tJqHIVLWd78Y/ym+r0II64lmvoX8o+0Bb0=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
"generatedRepoSpecs": {
"com_github_apple_swift_protobuf": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-protobuf/archive/1.20.2.tar.gz"
],
"sha256": "3fb50bd4d293337f202d917b6ada22f9548a0a0aed9d9a4d791e6fbd8a246ebb",
"strip_prefix": "swift-protobuf-1.20.2/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_protobuf/BUILD.overlay"
}
},
"com_github_grpc_grpc_swift": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/grpc/grpc-swift/archive/1.16.0.tar.gz"
],
"sha256": "58b60431d0064969f9679411264b82e40a217ae6bd34e17096d92cc4e47556a5",
"strip_prefix": "grpc-swift-1.16.0/",
"build_file": "@@rules_swift~//third_party:com_github_grpc_grpc_swift/BUILD.overlay"
}
},
"com_github_apple_swift_docc_symbolkit": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-docc-symbolkit/archive/refs/tags/swift-5.10-RELEASE.tar.gz"
],
"sha256": "de1d4b6940468ddb53b89df7aa1a81323b9712775b0e33e8254fa0f6f7469a97",
"strip_prefix": "swift-docc-symbolkit-swift-5.10-RELEASE",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_docc_symbolkit/BUILD.overlay"
}
},
"com_github_apple_swift_nio": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-nio/archive/2.42.0.tar.gz"
],
"sha256": "e3304bc3fb53aea74a3e54bd005ede11f6dc357117d9b1db642d03aea87194a0",
"strip_prefix": "swift-nio-2.42.0/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_nio/BUILD.overlay"
}
},
"com_github_apple_swift_nio_http2": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-nio-http2/archive/1.26.0.tar.gz"
],
"sha256": "f0edfc9d6a7be1d587e5b403f2d04264bdfae59aac1d74f7d974a9022c6d2b25",
"strip_prefix": "swift-nio-http2-1.26.0/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_nio_http2/BUILD.overlay"
}
},
"com_github_apple_swift_nio_transport_services": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-nio-transport-services/archive/1.15.0.tar.gz"
],
"sha256": "f3498dafa633751a52b9b7f741f7ac30c42bcbeb3b9edca6d447e0da8e693262",
"strip_prefix": "swift-nio-transport-services-1.15.0/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_nio_transport_services/BUILD.overlay"
}
},
"com_github_apple_swift_nio_extras": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-nio-extras/archive/1.4.0.tar.gz"
],
"sha256": "4684b52951d9d9937bb3e8ccd6b5daedd777021ef2519ea2f18c4c922843b52b",
"strip_prefix": "swift-nio-extras-1.4.0/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_nio_extras/BUILD.overlay"
}
},
"com_github_apple_swift_log": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-log/archive/1.4.4.tar.gz"
],
"sha256": "48fe66426c784c0c20031f15dc17faf9f4c9037c192bfac2f643f65cb2321ba0",
"strip_prefix": "swift-log-1.4.4/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_log/BUILD.overlay"
}
},
"com_github_apple_swift_nio_ssl": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-nio-ssl/archive/2.23.0.tar.gz"
],
"sha256": "4787c63f61dd04d99e498adc3d1a628193387e41efddf8de19b8db04544d016d",
"strip_prefix": "swift-nio-ssl-2.23.0/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_nio_ssl/BUILD.overlay"
}
},
"com_github_apple_swift_collections": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-collections/archive/1.0.4.tar.gz"
],
"sha256": "d9e4c8a91c60fb9c92a04caccbb10ded42f4cb47b26a212bc6b39cc390a4b096",
"strip_prefix": "swift-collections-1.0.4/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_collections/BUILD.overlay"
}
},
"com_github_apple_swift_atomics": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"urls": [
"https://github.com/apple/swift-atomics/archive/1.1.0.tar.gz"
],
"sha256": "1bee7f469f7e8dc49f11cfa4da07182fbc79eab000ec2c17bfdce468c5d276fb",
"strip_prefix": "swift-atomics-1.1.0/",
"build_file": "@@rules_swift~//third_party:com_github_apple_swift_atomics/BUILD.overlay"
}
},
"build_bazel_rules_swift_index_import": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"build_file": "@@rules_swift~//third_party:build_bazel_rules_swift_index_import/BUILD.overlay",
"canonical_id": "index-import-5.8",
"urls": [
"https://github.com/MobileNativeFoundation/index-import/releases/download/5.8.0.1/index-import.tar.gz"
],
"sha256": "28c1ffa39d99e74ed70623899b207b41f79214c498c603915aef55972a851a15"
}
},
"build_bazel_rules_swift_local_config": {
"bzlFile": "@@rules_swift~//swift/internal:swift_autoconfiguration.bzl",
"ruleClassName": "swift_autoconfiguration",
"attributes": {}
}
},
"recordedRepoMappingEntries": [
[
"rules_swift~",
"bazel_tools",
"bazel_tools"
]
]
}
}
}
}
+3
View File
@@ -0,0 +1,3 @@
# This file marks sparkle_workspace as a separate Bazel workspace.
# It prevents Bazel from looking up to the parent directory's workspace.
# The actual dependencies are defined in MODULE.bazel (bzlmod).
@@ -95,9 +95,16 @@ auto ConvertUnit(
shardokUnit.mutate_stun_rounds_remaining(0);
for (const PlayerId pid : allPlayerIds) {
int8_t initialKnowledge = 0;
for (const auto visibleToPid : unit.visible_to_player_ids()) {
if (visibleToPid == pid) {
initialKnowledge = 100;
break;
}
}
shardokUnit.mutable_opponent_knowledge()->Mutate(
static_cast<flatbuffers::uoffset_t>(pid),
0);
initialKnowledge);
}
shardokUnit.mutate_has_moved_in_zoc(false);
@@ -20,6 +20,9 @@
#include <sstream>
#endif
#include <set>
#include <unordered_map>
#include "AIAttackerStrategySelector.hpp"
#include "AIConfig.hpp"
#include "AIDefenderStrategySelector.hpp"
@@ -171,8 +174,117 @@ auto ShardokAIClient::StandardChooseCommandIndex(
// }
// }
assert(commandCount == realAvailableCommands->size());
// Verify that the AI's guessed state produces the same available commands as reality
if (commandCount != realAvailableCommands->size()) {
fprintf(stderr,
"AI command count mismatch: guessed=%zu real=%zu player=%d round=%d\n",
commandCount,
realAvailableCommands->size(),
playerId,
guessedState->current_round());
const auto maxDump = std::max(commandCount, realAvailableCommands->size());
for (size_t i = 0; i < maxDump; i++) {
const auto *realName = i < realAvailableCommands->size()
? net::eagle0::shardok::common::CommandType_Name(
(*realAvailableCommands)[i]->GetCommandType())
.c_str()
: "(none)";
const auto *guessedName = i < commandCount
? net::eagle0::shardok::common::CommandType_Name(
(*guessedCommands)[i]->GetCommandType())
.c_str()
: "(none)";
const int realActor = i < realAvailableCommands->size()
? (*realAvailableCommands)[i]->GetActorUnitId()
: -1;
const int guessedActor =
i < commandCount ? (*guessedCommands)[i]->GetActorUnitId() : -1;
const int realRow = i < realAvailableCommands->size()
? (*realAvailableCommands)[i]->GetTargetRow()
: -1;
const int realCol = i < realAvailableCommands->size()
? (*realAvailableCommands)[i]->GetTargetColumn()
: -1;
const int guessedRow = i < commandCount ? (*guessedCommands)[i]->GetTargetRow() : -1;
const int guessedCol = i < commandCount ? (*guessedCommands)[i]->GetTargetColumn() : -1;
fprintf(stderr,
" [%zu] real: %s unit=%d (%d,%d) guessed: %s unit=%d (%d,%d)\n",
i,
realName,
realActor,
realRow,
realCol,
guessedName,
guessedActor,
guessedRow,
guessedCol);
}
// Find positions in real commands that are missing from guessed commands
// Group by unit to find the missing position per unit
std::unordered_map<int, std::set<std::pair<int, int>>> realPositions;
std::unordered_map<int, std::set<std::pair<int, int>>> guessedPositions;
for (size_t i = 0; i < realAvailableCommands->size(); i++) {
const auto &cmd = (*realAvailableCommands)[i];
realPositions[cmd->GetActorUnitId()].emplace(
cmd->GetTargetRow(),
cmd->GetTargetColumn());
}
for (size_t i = 0; i < commandCount; i++) {
const auto &cmd = (*guessedCommands)[i];
guessedPositions[cmd->GetActorUnitId()].emplace(
cmd->GetTargetRow(),
cmd->GetTargetColumn());
}
for (const auto &[unitId, positions] : realPositions) {
for (const auto &[row, col] : positions) {
if (!guessedPositions[unitId].contains({row, col})) {
fprintf(stderr,
" Missing from guessed: unit=%d pos=(%d,%d)",
unitId,
row,
col);
const Coords missingCoords(row, col);
const auto *occupant = guessedState.GetOccupant(missingCoords);
if (occupant) {
fprintf(stderr,
" -> guessed occupant: unit_id=%d player=%d status=%d "
"loc=(%d,%d) hidden=%d battalion_size=%d\n",
occupant->unit_id(),
occupant->player_id(),
static_cast<int>(occupant->status()),
occupant->location().row(),
occupant->location().column(),
occupant->hidden(),
occupant->battalion().size());
} else {
fprintf(stderr, " -> no occupant in guessed state\n");
}
}
}
}
// Dump all guessed state units for full picture
fprintf(stderr, " Guessed state units (%u total):\n", guessedState->units()->size());
for (size_t i = 0; i < guessedState->units()->size(); i++) {
const auto *u = guessedState->units()->Get(static_cast<unsigned int>(i));
fprintf(stderr,
" unit_id=%d player=%d status=%d loc=(%d,%d) hidden=%d "
"starting_pos_idx=%d\n",
u->unit_id(),
u->player_id(),
static_cast<int>(u->status()),
u->location().row(),
u->location().column(),
u->hidden(),
u->starting_position_index());
}
throw ShardokInternalErrorException(
"AI command count mismatch: guessed=" + std::to_string(commandCount) +
" real=" + std::to_string(realAvailableCommands->size()));
}
for (size_t i = 0; i < commandCount; i++) {
CheckCommand((*realAvailableCommands)[i], (*guessedCommands)[i]);
}
@@ -93,7 +93,8 @@ auto AbstractAIScoreCalculator::CalculateUnitsScoreComponents(
case net::eagle0::shardok::storage::fb::UnitStatus_OUTLAWED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RETREATED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVED_SLOT: break;
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVED_SLOT:
case net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT: break;
case net::eagle0::shardok::storage::fb::UnitStatus_UNKNOWN_UNIT:
throw ShardokInternalErrorException("Unknown unit status");
@@ -56,13 +56,18 @@ public:
commandFactories(CommandFactoriesList(settings).GetFactories()),
playerSetupCommandFactory(settings) {}
[[nodiscard]] auto GetPlayerSetupCommands(const GameStateW &gameState, PlayerId playerId) const
[[nodiscard]] auto GetPlayerSetupCommands(
const GameStateW &gameState,
PlayerId playerId,
const std::optional<std::vector<Coords>> &reinforcementPositions) const
-> CommandListSPtr override;
[[nodiscard]] auto GetAvailableCommands(
const GameStateW &gameState,
PlayerId player,
bool includeFollowUps) const -> CommandListSPtr override;
bool includeFollowUps,
const std::optional<std::vector<Coords>> &reinforcementPositions) const
-> CommandListSPtr override;
};
auto AvailableCommandsFactory::MakeAvailableCommandsFactory(const SettingsGetter &settings)
@@ -72,9 +77,14 @@ auto AvailableCommandsFactory::MakeAvailableCommandsFactory(const SettingsGetter
auto AvailableCommandsFactoryImpl::GetPlayerSetupCommands(
const GameStateW &gameState,
const PlayerId playerId) const -> CommandListSPtr {
const PlayerId playerId,
const std::optional<std::vector<Coords>> &reinforcementPositions) const -> CommandListSPtr {
CommandList previewCommands{};
playerSetupCommandFactory.AddAvailablePlayerSetupCommands(previewCommands, playerId, gameState);
playerSetupCommandFactory.AddAvailablePlayerSetupCommands(
previewCommands,
playerId,
gameState,
reinforcementPositions);
return make_shared<CommandList>(previewCommands);
}
@@ -168,12 +178,14 @@ void AvailableCommandsFactoryImpl::AddAvailableCommandsForOneUnit(
auto AvailableCommandsFactoryImpl::GetAvailableCommands(
const GameStateW &gameState,
PlayerId playerId,
bool includeFollowUps) const -> CommandListSPtr {
bool includeFollowUps,
const std::optional<std::vector<Coords>> &reinforcementPositions) const -> CommandListSPtr {
CommandList commands{};
vector<AdjacentTile> adjacentTiles;
playerSetupCommandFactory.AddAvailablePlayerSetupCommands(commands, playerId, gameState);
playerSetupCommandFactory
.AddAvailablePlayerSetupCommands(commands, playerId, gameState, reinforcementPositions);
if (!commands.empty()) return make_shared<CommandList>(commands);
for (const Unit *unit : *gameState->units()) {
@@ -9,8 +9,12 @@
#ifndef AvailableCommandsFactory_hpp
#define AvailableCommandsFactory_hpp
#include <optional>
#include <vector>
#include "src/main/cpp/net/eagle0/shardok/library/GameStateW.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokCommand.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/Coordinates.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/unit/Unit.hpp"
@@ -29,12 +33,16 @@ public:
[[nodiscard]] virtual auto GetPlayerSetupCommands(
const GameStateW &gameState,
PlayerId playerId) const -> CommandListSPtr = 0;
PlayerId playerId,
const std::optional<std::vector<Coords>> &reinforcementPositions = std::nullopt) const
-> CommandListSPtr = 0;
[[nodiscard]] virtual auto GetAvailableCommands(
const GameStateW &gameState,
PlayerId player,
bool includeFollowUps) const -> CommandListSPtr = 0;
bool includeFollowUps,
const std::optional<std::vector<Coords>> &reinforcementPositions = std::nullopt) const
-> CommandListSPtr = 0;
};
} // namespace shardok
@@ -27,6 +27,7 @@ cc_library(
"//src/main/cpp/net/eagle0/shardok/library/actions:update_game_status_action",
"//src/main/cpp/net/eagle0/shardok/library/actions:update_opponent_knowledge_action",
"//src/main/cpp/net/eagle0/shardok/library/fb_helpers:game_state_helpers",
"//src/main/cpp/net/eagle0/shardok/library/tutorial:tutorial_battle_controller",
"//src/main/cpp/net/eagle0/shardok/library/util:game_state_validator",
"//src/main/cpp/net/eagle0/shardok/library/view_filters:action_result_filter",
"//src/main/cpp/net/eagle0/shardok/library/view_filters:game_state_filter",
@@ -57,6 +58,7 @@ cc_library(
"//src/main/cpp/net/eagle0/shardok/library/actions:new_round_action",
"//src/main/cpp/net/eagle0/shardok/library/command_factories:command_factories_list",
"//src/main/cpp/net/eagle0/shardok/library/commands:end_turn_command",
"//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
"//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
"//src/main/cpp/net/eagle0/shardok/library/unit",
"//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
@@ -286,21 +286,49 @@ void ShardokEngine::HandlePlayerTurnEnd(const std::shared_ptr<RandomGenerator> &
true /* atEndOfRound */)
.Execute(gameState, randomGenerator));
ApplyAndAddActionResults(
UpdateOpponentKnowledgeAction(settingsGetter).Execute(gameState, randomGenerator));
// Check for tutorial events at end of round
if (!GameIsOver() && tutorialController_.IsEnabled()) {
auto tutorialEventResults = tutorialController_.CheckAndExecuteEvents(
gameState,
settingsGetter,
randomGenerator);
ApplyAndAddActionResults(
NewRoundAction(gameState, settingsGetter).Execute(gameState, randomGenerator));
if (!tutorialEventResults.actionResults.empty()) {
ApplyAndAddActionResults(tutorialEventResults.actionResults);
ApplyAndAddActionResults(
StartPlayerTurnAction(gameState, UNCONTROLLED_PLAYER_ID, settingsGetter)
.Execute(gameState, randomGenerator));
// Update game status after tutorial events (e.g., attackers fled, defender wins)
ApplyAndAddActionResults(UpdateGameStatusAction(
GetCurrentGameState(),
criticalTileCoords,
settingsGetter,
true /* atEndOfRound */)
.Execute(gameState, randomGenerator));
ApplyAndAddActionResults(PerformUndeadCommandsAction(gameState, settingsGetter)
.Execute(gameState, randomGenerator));
// If tutorial events ended the game, don't start new round
if (GameIsOver()) { return; }
ApplyAndAddActionResults(StartPlayerTurnAction(gameState, 0, settingsGetter)
.Execute(gameState, randomGenerator));
// If reinforcement placement is needed, pause the turn flow
if (tutorialEventResults.reinforcementPlacement.has_value()) {
pendingReinforcementPlacement_ = tutorialEventResults.reinforcementPlacement;
// Set state to REINFORCEMENT_PLACEMENT
ActionResultProto placementStateAction{};
placementStateAction.set_type(
net::eagle0::shardok::common::TUTORIAL_REINFORCEMENTS_ARRIVED);
placementStateAction.mutable_game_status()->set_state(
GameStatusProto::State::GameStatus_State_REINFORCEMENT_PLACEMENT);
*placementStateAction.mutable_game_status()->mutable_description() =
"Place your reinforcements!";
// Set current player to the reinforcement recipient
placementStateAction.mutable_next_player()->set_value(
pendingReinforcementPlacement_->playerId);
ApplyAndAddActionResult(placementStateAction);
return;
}
}
}
ResumeAfterReinforcementPlacement(randomGenerator);
} else {
const auto updateAction = UpdateGameStatusAction(
@@ -316,6 +344,27 @@ void ShardokEngine::HandlePlayerTurnEnd(const std::shared_ptr<RandomGenerator> &
}
}
void ShardokEngine::ResumeAfterReinforcementPlacement(
const std::shared_ptr<RandomGenerator> &randomGenerator) {
pendingReinforcementPlacement_ = std::nullopt;
ApplyAndAddActionResults(
UpdateOpponentKnowledgeAction(settingsGetter).Execute(gameState, randomGenerator));
ApplyAndAddActionResults(
NewRoundAction(gameState, settingsGetter).Execute(gameState, randomGenerator));
ApplyAndAddActionResults(
StartPlayerTurnAction(gameState, UNCONTROLLED_PLAYER_ID, settingsGetter)
.Execute(gameState, randomGenerator));
ApplyAndAddActionResults(PerformUndeadCommandsAction(gameState, settingsGetter)
.Execute(gameState, randomGenerator));
ApplyAndAddActionResults(StartPlayerTurnAction(gameState, 0, settingsGetter)
.Execute(gameState, randomGenerator));
}
void ShardokEngine::PostPlacementCommands(
const PlayerId player,
const vector<UnitPlacementInfo> &placementInfos,
@@ -324,8 +373,15 @@ void ShardokEngine::PostPlacementCommands(
throw ShardokClientErrorException("Posting for a player who's not the current player ID!");
}
const auto placementCommands =
availableCommandsFactory->GetPlayerSetupCommands(gameState, player);
const auto reinforcementPositions =
pendingReinforcementPlacement_.has_value()
? std::optional<std::vector<Coords>>(
pendingReinforcementPlacement_->startingPositions)
: std::nullopt;
const auto placementCommands = availableCommandsFactory->GetPlayerSetupCommands(
gameState,
player,
reinforcementPositions);
// first make sure they're all valid and there are no duplicates
for (size_t i = 0; i < placementInfos.size(); i++) {
@@ -365,6 +421,19 @@ void ShardokEngine::PostPlacementCommands(
}
}
// If we were in reinforcement placement, check if all units are now placed
if (pendingReinforcementPlacement_.has_value()) {
const auto reserveUnits =
ReserveUnitsForPlayer(gameState->units(), pendingReinforcementPlacement_->playerId);
if (reserveUnits.empty()) {
// All reinforcements placed — resume the turn flow
ResumeAfterReinforcementPlacement(randomGenerator);
return;
}
// Still have units to place — stay in REINFORCEMENT_PLACEMENT state
return;
}
const auto updateAction = UpdateGameStatusAction(
GetCurrentGameState(),
criticalTileCoords,
@@ -563,10 +632,16 @@ auto ShardokEngine::GetAvailableCommandProtos(const PlayerId playerId, const boo
auto ShardokEngine::UncachedGetAvailableCommands(
const PlayerId playerId,
const bool includeFollowUps) const -> CommandListSPtr {
const auto reinforcementPositions =
pendingReinforcementPlacement_.has_value()
? std::optional<std::vector<Coords>>(
pendingReinforcementPlacement_->startingPositions)
: std::nullopt;
return availableCommandsFactory->GetAvailableCommands(
gameState,
playerId,
/* includeFollowUps=*/includeFollowUps);
/* includeFollowUps=*/includeFollowUps,
reinforcementPositions);
}
void AddUnits(vector<net::eagle0::shardok::storage::ResolvedUnit> &to, const Units &from) {
@@ -598,6 +673,7 @@ void AddUnits(vector<net::eagle0::shardok::storage::ResolvedUnit> &to, const Uni
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_NEVER_ENTERED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVED_SLOT:
case net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT:
ru.set_status(
net::eagle0::shardok::storage::ResolvedUnit_UnitStatus_NEVER_ENTERED_UNIT);
break;
@@ -20,6 +20,7 @@
#include "src/main/cpp/net/eagle0/shardok/library/fb_helpers/GameStateHelpers.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/CoordsSet.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/tutorial/TutorialBattleController.hpp"
#include "src/main/protobuf/net/eagle0/shardok/api/action_result_view.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/api/game_state_view.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/api/unit_view.pb.h"
@@ -36,6 +37,7 @@ using net::eagle0::shardok::api::UnitView;
using PlayerInfoProto = net::eagle0::shardok::common::PlayerInfo;
using net::eagle0::shardok::storage::ShardokActionWithResultingState;
using HexMapProto = net::eagle0::shardok::common::HexMap;
using TutorialBattleConfigProto = net::eagle0::common::TutorialBattleConfig;
class ShardokEngine {
private:
@@ -52,6 +54,9 @@ private:
const CoordsSet criticalTileCoords;
TutorialBattleController tutorialController_;
std::optional<ReinforcementPlacementInfo> pendingReinforcementPlacement_;
mutable CommandListSPtr cachedAvailableCommands{};
void ApplyAndAddActionResult(const ActionResult &result);
@@ -72,6 +77,7 @@ private:
}
void HandlePlayerTurnEnd(const std::shared_ptr<RandomGenerator> &randomGenerator);
void ResumeAfterReinforcementPlacement(const std::shared_ptr<RandomGenerator> &randomGenerator);
[[nodiscard]] auto UncachedGetAvailableCommands(PlayerId playerId, bool includeFollowUps) const
-> CommandListSPtr;
@@ -197,6 +203,17 @@ public:
[[nodiscard]] auto GetGameSettings() const -> GameSettingsSPtr { return gameSettings; }
/// Configure the tutorial battle controller (call after construction if needed)
void SetTutorialBattleConfig(const TutorialBattleConfigProto &config) {
tutorialController_ = TutorialBattleController(config);
}
/// Returns the pending reinforcement placement info, if any.
[[nodiscard]] auto GetPendingReinforcementPlacement() const
-> const std::optional<ReinforcementPlacementInfo> & {
return pendingReinforcementPlacement_;
}
static inline auto GameIsOver(const fb::GameStatus *status) -> bool {
return (status->state() == net::eagle0::shardok::storage::fb::GameStatus_::State_VICTORY);
}
@@ -90,6 +90,7 @@ cc_library(
"//src/main/cpp/net/eagle0/shardok/library/actions:end_player_setup_command",
"//src/main/cpp/net/eagle0/shardok/library/actions:place_hidden_unit_command",
"//src/main/cpp/net/eagle0/shardok/library/actions:place_unit_command",
"//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
"//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
"//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
"//src/main/cpp/net/eagle0/shardok/library/util:player_utils",
@@ -66,11 +66,30 @@ auto PlayerSetupCommandFactory::AddAvailablePlaceAndHideUnitCommandsForOneUnit(
auto PlayerSetupCommandFactory::AddAvailablePlayerSetupCommands(
CommandList &existingCommands,
PlayerId playerId,
const GameStateW &gameState) const -> void {
const GameStateW &gameState,
const std::optional<std::vector<Coords>> &reinforcementPositions) const -> void {
if (playerId < 0) return;
if (gameState->status()->state() !=
net::eagle0::shardok::storage::fb::GameStatus_::State_SET_UP)
const auto state = gameState->status()->state();
// Handle reinforcement placement phase
if (state == net::eagle0::shardok::storage::fb::GameStatus_::State_REINFORCEMENT_PLACEMENT) {
if (!reinforcementPositions.has_value()) return;
const auto unplacedUnits = ReserveUnitsForPlayer(gameState->units(), playerId);
if (unplacedUnits.empty()) return;
for (const auto &[unitId, unit] : unplacedUnits) {
for (const Coords &position : *reinforcementPositions) {
if (!gameState.GetOccupant(position)) {
existingCommands.push_back(std::make_shared<PlaceUnitCommand>(unit, position));
}
}
}
return;
}
if (state != net::eagle0::shardok::storage::fb::GameStatus_::State_SET_UP) return;
const bool isDefender = PlayerIsDefender(gameState, playerId);
@@ -5,8 +5,12 @@
#ifndef EAGLE0_PLAYERSETUPCOMMANDFACTORY_HPP
#define EAGLE0_PLAYERSETUPCOMMANDFACTORY_HPP
#include <optional>
#include <vector>
#include "src/main/cpp/net/eagle0/shardok/library/GameStateW.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokCommand.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/Coordinates.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
namespace shardok {
@@ -29,7 +33,9 @@ public:
auto AddAvailablePlayerSetupCommands(
CommandList& existingCommands,
PlayerId playerId,
const GameStateW& gameState) const -> void;
const GameStateW& gameState,
const std::optional<std::vector<Coords>>& reinforcementPositions = std::nullopt) const
-> void;
};
} // namespace shardok
@@ -1,4 +1,3 @@
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_command_line_application")
load("//tools:copts.bzl", "COPTS")
cc_library(
@@ -82,11 +81,3 @@ cc_binary(
":fixed_action_point_distances_timer",
],
)
macos_command_line_application(
name = "fixed_action_point_distances_timer_macos_app",
minimum_os_version = "10.15",
deps = [
":fixed_action_point_distances_timer",
],
)
@@ -331,7 +331,7 @@ void MutatingApplyResult(
.size()
: changedUnit->battalion().size();
auto status = net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT;
auto status = changedUnit->status();
if (IsDestroyed(*changedUnit)) {
status =
changedUnit->has_attached_hero()
@@ -34,6 +34,7 @@ auto IsResolved(const net::eagle0::shardok::storage::fb::UnitStatus status) -> b
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_NEVER_ENTERED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVED_SLOT:
case net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT:
case net::eagle0::shardok::storage::fb::UnitStatus_UNKNOWN_UNIT: return false;
}
@@ -18,6 +18,7 @@ using net::eagle0::shardok::common::GameStatus;
auto actorAfter = *currentState->units()->Get(actorId);
actorAfter.mutable_location() = target;
actorAfter.mutate_hidden(true);
actorAfter.mutate_status(net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT);
MutatingBumpAllKnowledgeToMinimum(&actorAfter, minimumKnowledge);
ActionResult placeResult{};
@@ -16,6 +16,7 @@ auto PlaceUnitCommand::InternalExecute(
const std::shared_ptr<RandomGenerator>& /*generator*/) const -> vector<ActionResult> {
auto actorAfter = *actor;
actorAfter.mutable_location() = target;
actorAfter.mutate_status(net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT);
ActionResult placeResult{};
placeResult.set_type(ActionType::PLACE_UNIT);
@@ -89,7 +89,9 @@ auto UpdateGameStatusAction::InternalExecute(
// If the game has already ended, just return that state
if (GameIsOver(gameState->status())) { return results; }
if (gameState->status()->state() ==
net::eagle0::shardok::storage::fb::GameStatus_::State_SET_UP) {
net::eagle0::shardok::storage::fb::GameStatus_::State_SET_UP ||
gameState->status()->state() ==
net::eagle0::shardok::storage::fb::GameStatus_::State_REINFORCEMENT_PLACEMENT) {
return results;
}
@@ -25,6 +25,7 @@ auto ReinforceCommand::InternalExecute(
const Unit* joiningUnit = currentState->units()->Get(joiningUnitId);
auto joinerAfter = *joiningUnit;
joinerAfter.mutable_location() = location;
joinerAfter.mutate_status(net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT);
ActionResult placeResult{};
placeResult.set_type(ActionType::REINFORCED);
@@ -176,7 +176,10 @@ auto SetupInitialGameState(
modifiedUnit.mutable_battalion().mutate_base_morale(baseMorale);
modifiedUnit.mutable_battalion().mutate_morale(baseMorale);
modifiedUnit.mutate_status(net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT);
if (modifiedUnit.status() !=
net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT) {
modifiedUnit.mutate_status(net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT);
}
unitsVec.push_back(modifiedUnit);
}
@@ -0,0 +1,19 @@
load("//tools:copts.bzl", "COPTS")
cc_library(
name = "tutorial_battle_controller",
srcs = ["TutorialBattleController.cpp"],
hdrs = ["TutorialBattleController.hpp"],
copts = COPTS,
visibility = ["//visibility:public"],
deps = [
"//src/main/cpp/net/eagle0/common:random_generator",
"//src/main/cpp/net/eagle0/shardok/library:game_state_w",
"//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
"//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
"//src/main/cpp/net/eagle0/shardok/library/util:action_result_flatbuffer_helpers",
"//src/main/protobuf/net/eagle0/common:tutorial_battle_config_cc_proto",
"//src/main/protobuf/net/eagle0/shardok/common:action_type_cc_proto",
"//src/main/protobuf/net/eagle0/shardok/storage:action_result_cc_proto",
],
)
@@ -0,0 +1,293 @@
//
// TutorialBattleController.cpp
// eagle0
//
// Created for tutorial battle system.
// Copyright 2025 none. All rights reserved.
//
#include "TutorialBattleController.hpp"
#include <ranges>
#include <vector>
#include "src/main/cpp/net/eagle0/shardok/library/util/ActionResultFlatbufferHelpers.hpp"
namespace shardok {
using UnitStatusFB = net::eagle0::shardok::storage::fb::UnitStatus;
using ActionType = net::eagle0::shardok::common::ActionType;
using FleeActionProto = net::eagle0::common::FleeAction;
using ReinforcementsActionProto = net::eagle0::common::ReinforcementsAction;
using UnitKilledTriggerProto = net::eagle0::common::UnitKilledTrigger;
TutorialBattleController::TutorialBattleController()
: enabled_(false),
config_(),
firedEventIds_() {}
TutorialBattleController::TutorialBattleController(const TutorialBattleConfigProto& protoConfig)
: enabled_(protoConfig.enabled()),
config_(protoConfig),
firedEventIds_() {}
auto TutorialBattleController::CheckAndExecuteEvents(
const GameStateW& state,
const SettingsGetter& settings,
const std::shared_ptr<RandomGenerator>& randomGenerator) -> TutorialEventResults {
if (!enabled_) { return {}; }
TutorialEventResults combined;
// Check events in config order
for (const auto& event : config_.events()) {
// Skip already-fired events
if (firedEventIds_.contains(event.event_id())) { continue; }
// Check if trigger condition is met
if (EvaluateTrigger(event.trigger(), state)) {
// Mark as fired before executing (to prevent re-triggering)
firedEventIds_.insert(event.event_id());
// Execute the action
auto eventResults = ExecuteAction(event.action(), state, settings, randomGenerator);
combined.actionResults.insert(
combined.actionResults.end(),
eventResults.actionResults.begin(),
eventResults.actionResults.end());
// Only one reinforcement placement can be pending at a time
if (eventResults.reinforcementPlacement.has_value()) {
combined.reinforcementPlacement = eventResults.reinforcementPlacement;
}
}
}
return combined;
}
auto TutorialBattleController::EvaluateTrigger(
const TutorialTriggerProto& trigger,
const GameStateW& state) const -> bool {
switch (trigger.trigger_type_case()) {
case TutorialTriggerProto::kAfterRound: {
const int currentRound = state->current_round();
return currentRound >= trigger.after_round().round_number();
}
case TutorialTriggerProto::kUnitsLost: {
const auto& unitsLost = trigger.units_lost();
const int lostCount = CountLostUnits(state, unitsLost.player_id());
return lostCount >= unitsLost.threshold();
}
case TutorialTriggerProto::kDamageTaken: {
const auto& damageTaken = trigger.damage_taken();
const int totalDamage = GetTotalDamageTaken(state, damageTaken.player_id());
return totalDamage >= damageTaken.threshold();
}
case TutorialTriggerProto::kUnitKilled: {
return IsUnitKilled(state, trigger.unit_killed());
}
case TutorialTriggerProto::TRIGGER_TYPE_NOT_SET:
default: return false;
}
}
auto TutorialBattleController::ExecuteAction(
const TutorialActionProto& action,
const GameStateW& state,
[[maybe_unused]] const SettingsGetter& settings,
[[maybe_unused]] const std::shared_ptr<RandomGenerator>& randomGenerator) const
-> TutorialEventResults {
switch (action.action_type_case()) {
case TutorialActionProto::kFlee:
return {.actionResults = ExecuteFleeAction(action.flee(), state),
.reinforcementPlacement = std::nullopt};
case TutorialActionProto::kReinforcements:
return ExecuteReinforcementsAction(action.reinforcements(), state);
case TutorialActionProto::ACTION_TYPE_NOT_SET:
default: return {};
}
}
auto TutorialBattleController::CountLostUnits(const GameStateW& state, const PlayerId playerId)
const -> int {
int count = 0;
for (const auto* unit : *state->units()) {
if (unit->player_id() != playerId) { continue; }
// Count units that are no longer in battle (destroyed, captured, fled, retreated)
const auto status = unit->status();
if (status != UnitStatusFB::UnitStatus_NORMAL_UNIT &&
status != UnitStatusFB::UnitStatus_RESERVE_UNIT &&
status != UnitStatusFB::UnitStatus_NEVER_ENTERED_UNIT &&
status != UnitStatusFB::UnitStatus_RESERVED_SLOT &&
status != UnitStatusFB::UnitStatus_PENDING_REINFORCEMENT) {
count++;
}
}
return count;
}
auto TutorialBattleController::GetTotalDamageTaken(const GameStateW& state, const PlayerId playerId)
const -> int {
int totalDamage = 0;
for (const auto* unit : *state->units()) {
if (unit->player_id() != playerId) { continue; }
// Calculate damage as difference between initial and current size
// Initial sizes are stored in config since flatbuffers don't track starting sizes
int initialSize = 0;
for (const auto& initial : config_.initial_sizes()) {
if (initial.unit_id() == unit->unit_id()) {
initialSize = initial.size();
break;
}
}
if (initialSize == 0) { continue; }
const int currentSize = unit->battalion().size();
if (initialSize > currentSize) { totalDamage += (initialSize - currentSize); }
}
return totalDamage;
}
auto TutorialBattleController::IsUnitKilled(
const GameStateW& state,
const UnitKilledTriggerProto& trigger) const -> bool {
for (const auto* unit : *state->units()) {
// Check if this unit matches the identifier
bool matches = false;
switch (trigger.unit_identifier_case()) {
case UnitKilledTriggerProto::kUnitId:
matches = (unit->unit_id() == trigger.unit_id());
break;
case UnitKilledTriggerProto::kEagleHeroId:
if (unit->has_attached_hero()) {
matches = (unit->attached_hero().eagle_hero_id() == trigger.eagle_hero_id());
}
break;
case UnitKilledTriggerProto::UNIT_IDENTIFIER_NOT_SET:
default: continue;
}
if (!matches) { continue; }
// Check if the unit is "killed" (destroyed/captured status)
const auto status = unit->status();
if (status == UnitStatusFB::UnitStatus_DESTROYED_SUMMONED_UNIT ||
status == UnitStatusFB::UnitStatus_CAPTURED_UNIT) {
return true;
}
}
return false;
}
auto TutorialBattleController::ExecuteFleeAction(
const FleeActionProto& fleeAction,
const GameStateW& state) const -> std::vector<ActionResult> {
std::vector<ActionResult> results;
const PlayerId fleeingPlayerId = fleeAction.player_id();
// First, create a "tutorial enemy fled" notification
ActionResult fleeNotification{};
fleeNotification.set_type(ActionType::TUTORIAL_ENEMY_FLED);
results.push_back(fleeNotification);
// Determine which units should flee
std::set<int32_t> specificUnitIds(fleeAction.unit_ids().begin(), fleeAction.unit_ids().end());
std::set<int32_t> specificHeroIds(
fleeAction.eagle_hero_ids().begin(),
fleeAction.eagle_hero_ids().end());
const bool fleeAllUnits = specificUnitIds.empty() && specificHeroIds.empty();
// Find all matching units that are still active and make them flee
for (const auto* unit : *state->units()) {
if (unit->player_id() != fleeingPlayerId) { continue; }
if (unit->status() != UnitStatusFB::UnitStatus_NORMAL_UNIT) { continue; }
// Check if this unit should flee
if (!fleeAllUnits) {
const bool matchesUnitId = specificUnitIds.contains(unit->unit_id());
const bool matchesHeroId =
unit->has_attached_hero() &&
specificHeroIds.contains(unit->attached_hero().eagle_hero_id());
if (!matchesUnitId && !matchesHeroId) { continue; }
}
// Create flee result for this unit (100% success - guaranteed flee)
ActionResult fleeResult{};
fleeResult.set_type(ActionType::FLED);
fleeResult.mutable_player()->set_value(fleeingPlayerId);
fleeResult.mutable_actor()->set_value(unit->unit_id());
auto* resolvedUnit = fleeResult.add_resolved_units();
AddUnitToResolved(*resolvedUnit, *unit);
resolvedUnit->set_status(net::eagle0::shardok::storage::ResolvedUnit_UnitStatus_FLED_UNIT);
results.push_back(fleeResult);
}
return results;
}
auto TutorialBattleController::ExecuteReinforcementsAction(
const ReinforcementsActionProto& reinforcementsAction,
const GameStateW& state) const -> TutorialEventResults {
TutorialEventResults eventResults;
if (reinforcementsAction.units().empty()) { return eventResults; }
const PlayerId playerId = reinforcementsAction.player_id();
// Look up starting positions from the hex map's attacker starting positions
using Coords = net::eagle0::shardok::storage::fb::Coords;
std::vector<Coords> availablePositions;
const int startingPosGroupIndex = reinforcementsAction.attacker_starting_position_index();
const auto* attackerPositions = state->hex_map()->attacker_starting_positions();
if (startingPosGroupIndex >= 0 &&
startingPosGroupIndex < static_cast<int>(attackerPositions->size())) {
for (const auto* pos : *attackerPositions->Get(startingPosGroupIndex)->positions()) {
if (!state.GetOccupant(*pos)) { availablePositions.push_back(*pos); }
}
}
// Build set of eagle hero IDs for this specific reinforcement event
std::set<int32_t> expectedHeroIds;
for (const auto& commonUnit : reinforcementsAction.units()) {
if (commonUnit.has_hero()) { expectedHeroIds.insert(commonUnit.hero().eagle_hero_id()); }
}
// Place only the PENDING_REINFORCEMENT units that belong to this event
ActionResult reinforcementsResult{};
reinforcementsResult.set_type(ActionType::TUTORIAL_REINFORCEMENTS_ARRIVED);
reinforcementsResult.mutable_player()->set_value(playerId);
size_t posIndex = 0;
for (const auto* unit : *state->units()) {
if (unit->status() != UnitStatusFB::UnitStatus_PENDING_REINFORCEMENT) { continue; }
if (!unit->has_attached_hero() ||
!expectedHeroIds.contains(unit->attached_hero().eagle_hero_id())) {
continue;
}
if (posIndex >= availablePositions.size()) { break; }
net::eagle0::shardok::storage::fb::Unit changedUnit = *unit;
changedUnit.mutate_status(UnitStatusFB::UnitStatus_NORMAL_UNIT);
changedUnit.mutable_location() = availablePositions[posIndex++];
AddChangedUnit(reinforcementsResult, changedUnit);
}
eventResults.actionResults.push_back(reinforcementsResult);
return eventResults;
}
} // namespace shardok
@@ -0,0 +1,116 @@
//
// TutorialBattleController.hpp
// eagle0
//
// Created for tutorial battle system.
// Copyright 2025 none. All rights reserved.
//
#ifndef TutorialBattleController_hpp
#define TutorialBattleController_hpp
#include <optional>
#include <set>
#include <string>
#include <vector>
#include "src/main/cpp/net/eagle0/common/RandomGenerator.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/GameStateW.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/Coordinates.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
#include "src/main/protobuf/net/eagle0/common/tutorial_battle_config.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/storage/action_result.pb.h"
namespace shardok {
using ActionResult = net::eagle0::shardok::storage::ActionResult;
using TutorialBattleConfigProto = net::eagle0::common::TutorialBattleConfig;
using TutorialEventProto = net::eagle0::common::TutorialEvent;
using TutorialTriggerProto = net::eagle0::common::TutorialTrigger;
using TutorialActionProto = net::eagle0::common::TutorialAction;
/// Info about a pending reinforcement placement phase.
struct ReinforcementPlacementInfo {
PlayerId playerId;
std::vector<Coords> startingPositions;
};
/// Results from tutorial event processing, including action results and any pending
/// reinforcement placement.
struct TutorialEventResults {
std::vector<ActionResult> actionResults;
std::optional<ReinforcementPlacementInfo> reinforcementPlacement;
};
/// Controller for scripted tutorial battles with event-driven triggers and actions.
/// Events are checked at the end of each round and fire in config order.
/// Each event fires at most once (tracked by event_id).
class TutorialBattleController {
public:
/// Creates a disabled controller.
TutorialBattleController();
/// Creates a controller from proto configuration.
explicit TutorialBattleController(const TutorialBattleConfigProto& protoConfig);
/// Returns true if the controller is enabled for this battle.
[[nodiscard]] auto IsEnabled() const -> bool { return enabled_; }
/// Check all events at end of round, return actions for triggered events.
/// Events fire in config order - first triggered event executes, then next.
/// Each event fires at most once.
[[nodiscard]] auto CheckAndExecuteEvents(
const GameStateW& state,
const SettingsGetter& settings,
const std::shared_ptr<RandomGenerator>& randomGenerator) -> TutorialEventResults;
/// Gets the set of fired event IDs (for testing/debugging).
[[nodiscard]] auto GetFiredEventIds() const -> const std::set<std::string>& {
return firedEventIds_;
}
private:
bool enabled_ = false;
TutorialBattleConfigProto config_;
std::set<std::string> firedEventIds_; // Track which events have fired
/// Evaluates whether a trigger condition is met.
[[nodiscard]] auto EvaluateTrigger(const TutorialTriggerProto& trigger, const GameStateW& state)
const -> bool;
/// Executes an action and returns the resulting action results.
[[nodiscard]] auto ExecuteAction(
const TutorialActionProto& action,
const GameStateW& state,
const SettingsGetter& settings,
const std::shared_ptr<RandomGenerator>& randomGenerator) const -> TutorialEventResults;
// Helper methods for trigger evaluation
/// Counts units lost (destroyed, captured, fled, retreated) for a player.
[[nodiscard]] auto CountLostUnits(const GameStateW& state, PlayerId playerId) const -> int;
/// Gets total damage taken (cumulative size reduction) for a player.
[[nodiscard]] auto GetTotalDamageTaken(const GameStateW& state, PlayerId playerId) const -> int;
/// Checks if a specific unit has been killed.
[[nodiscard]] auto IsUnitKilled(
const GameStateW& state,
const net::eagle0::common::UnitKilledTrigger& trigger) const -> bool;
// Helper methods for action execution
/// Executes a flee action for specified units.
[[nodiscard]] auto ExecuteFleeAction(
const net::eagle0::common::FleeAction& fleeAction,
const GameStateW& state) const -> std::vector<ActionResult>;
/// Executes a reinforcements action, placing units directly at available starting positions.
[[nodiscard]] auto ExecuteReinforcementsAction(
const net::eagle0::common::ReinforcementsAction& reinforcementsAction,
const GameStateW& state) const -> TutorialEventResults;
};
} // namespace shardok
#endif /* TutorialBattleController_hpp */
@@ -331,7 +331,8 @@ auto PlacedUnitsForPlayer(const Units *units, const PlayerId pid)
std::map<UnitId, const Unit *> placedUnits{};
for (const Unit *unit : *units) {
if (unit->player_id() == pid &&
unit->status() != net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT)
unit->status() != net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT &&
unit->status() != net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT)
placedUnits[unit->unit_id()] = unit;
}
@@ -73,6 +73,9 @@ void DumpGameStateToFile(const GameStateW& gameState, const std::string& gameId)
case net::eagle0::shardok::storage::fb::UnitStatus_RETREATED_UNIT:
out << "RETREATED_UNIT\n";
break;
case net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT:
out << "PENDING_REINFORCEMENT\n";
break;
default: out << "OTHER (" << (int)unit->status() << ")\n";
}
out << " Remaining Action Points: " << (int)unit->remaining_action_points() << "\n";
@@ -49,7 +49,8 @@ auto GameStateFilteredForPlayer(
case net::eagle0::shardok::storage::fb::UnitStatus_FLED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RETREATED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_OUTLAWED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVED_SLOT: break;
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVED_SLOT:
case net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT: break;
case net::eagle0::shardok::storage::fb::UnitStatus_UNKNOWN_UNIT:
throw ShardokInternalErrorException("Unknown unit status");
@@ -100,6 +101,7 @@ auto GameStateFilteredForPlayer(
case net::eagle0::shardok::storage::fb::UnitStatus_RETREATED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_OUTLAWED_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVED_SLOT:
case net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT:
case net::eagle0::shardok::storage::fb::UnitStatus_UNKNOWN_UNIT: break;
}
}
@@ -12,6 +12,7 @@ cc_library(
deps = [
":server_configuration",
"//src/main/cpp/net/eagle0/common:tsv_parser",
"//src/main/cpp/net/eagle0/common:unit_conversions",
"//src/main/cpp/net/eagle0/shardok/ai:shardok_ai_client",
"//src/main/cpp/net/eagle0/shardok/controller",
"//src/main/cpp/net/eagle0/shardok/library:engine",
@@ -19,6 +20,7 @@ cc_library(
"//src/main/cpp/net/eagle0/shardok/library/settings_loader",
"//src/main/cpp/net/eagle0/shardok/util:battalion_type_registrar",
"//src/main/cpp/net/eagle0/shardok/util:map_loader",
"//src/main/protobuf/net/eagle0/common:tutorial_battle_config_cc_proto",
"//src/main/protobuf/net/eagle0/common:victory_condition_cc_proto",
],
)
@@ -193,6 +193,7 @@ void EagleInterfaceImpl::StartGame(const NewGameRequest &request) {
mapName,
customMapBytes,
month,
request.tutorial_battle_config(),
request.SerializeAsString());
}
@@ -221,20 +222,14 @@ auto EagleInterfaceImpl::PostCommand(
request->game_setup_info().known_result_count(),
response);
} catch (ShardokClientErrorException &e) {
std::cerr << "Bad request from client!" << std::endl;
std::cerr << "Exception: " << e.what();
throw e;
std::cerr << "Bad request from client: " << e.what() << std::endl;
return Status(StatusCode::INVALID_ARGUMENT, e.what());
} catch (ShardokInternalErrorException &e) {
std::cerr << "ShardokInternalErrorException thrown!" << std::endl;
std::cerr << "Exception: " << e.what();
throw e;
std::cerr << "Internal error: " << e.what() << std::endl;
return Status(StatusCode::INTERNAL, e.what());
} catch (std::exception &e) {
std::cerr << "Unknown exception in client->PostCommand" << std::endl;
std::cerr << "Exception: " << e.what();
throw e;
std::cerr << "Unknown exception: " << e.what() << std::endl;
return Status(StatusCode::INTERNAL, e.what());
}
return Status::OK;
@@ -273,20 +268,14 @@ auto EagleInterfaceImpl::PostPlacementCommands(
request->game_setup_info().known_result_count(),
response);
} catch (ShardokClientErrorException &e) {
std::cerr << "Bad request from client!" << std::endl;
std::cerr << "Exception: " << e.what();
throw e;
std::cerr << "Bad request from client: " << e.what() << std::endl;
return Status(StatusCode::INVALID_ARGUMENT, e.what());
} catch (ShardokInternalErrorException &e) {
std::cerr << "ShardokInternalErrorException thrown!" << std::endl;
std::cerr << "Exception: " << e.what();
throw e;
std::cerr << "Internal error: " << e.what() << std::endl;
return Status(StatusCode::INTERNAL, e.what());
} catch (std::exception &e) {
std::cerr << "Unknown exception in client->PostCommand" << std::endl;
std::cerr << "Exception: " << e.what();
throw e;
std::cerr << "Unknown exception: " << e.what() << std::endl;
return Status(StatusCode::INTERNAL, e.what());
}
return Status::OK;
@@ -13,6 +13,7 @@
#include <utility>
#include "ServerConfiguration.hpp"
#include "src/main/cpp/net/eagle0/common/UnitConversions.hpp"
#include "src/main/cpp/net/eagle0/shardok/ai/ShardokAIClient.hpp"
#include "src/main/cpp/net/eagle0/shardok/controller/ShardokGameController.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings_loader/SettingsLoader.hpp"
@@ -30,6 +31,7 @@ auto SetUpController(
int month,
const vector<Unit> &units,
const vector<PlayerInfoProto> &playerSetupInfos,
const TutorialBattleConfigProto &tutorialConfig,
const string &serializedRequest) -> shared_ptr<ShardokGameController>;
ShardokGamesManager::ShardokGamesManager(const std::vector<std::string> &extraSettings) {
@@ -77,6 +79,7 @@ auto ShardokGamesManager::UnlockedCreateSpecifiedGame(
const string &mapName,
const string &customMapBytes,
const int month,
const TutorialBattleConfigProto &tutorialConfig,
const string &serializedRequest) -> GameId {
// Check for existing game with this ID and early-exit
std::shared_lock<std::shared_mutex> lk(runningControllersLock);
@@ -111,6 +114,7 @@ auto ShardokGamesManager::UnlockedCreateSpecifiedGame(
month,
units,
playerInfos,
tutorialConfig,
serializedRequest);
return LockedCreateGame(controller, playerSetupInfos, serializedRequest);
@@ -137,6 +141,7 @@ auto SetUpController(
const int month,
const vector<Unit> &units,
const vector<PlayerInfoProto> &playerInfos,
const TutorialBattleConfigProto &tutorialConfig,
const string &serializedRequest) -> shared_ptr<ShardokGameController> {
auto unplacedUnits = std::vector<Unit>();
@@ -144,17 +149,72 @@ auto SetUpController(
for (auto up : units) {
up.mutate_unit_id(nextUnitId++);
up.mutate_status(net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT);
// Apply initial visibility settings from tutorial config
if (tutorialConfig.enabled() && up.has_attached_hero()) {
const int heroId = up.attached_hero().eagle_hero_id();
for (const auto &visibility : tutorialConfig.initial_visibilities()) {
if (visibility.eagle_hero_id() == heroId) {
for (const int playerId : visibility.visible_to_player_ids()) {
if (playerId >= 0 && playerId < 10) {
up.mutable_opponent_knowledge()->Mutate(
static_cast<flatbuffers::uoffset_t>(playerId),
100);
}
}
break;
}
}
}
unplacedUnits.push_back(up);
}
// Add reinforcement units from tutorial config as PENDING_REINFORCEMENT.
// These units exist in the game state from the start but are invisible and inactive
// until the TutorialBattleController activates them at the triggered round.
if (tutorialConfig.enabled()) {
vector<PlayerId> allPlayerIds;
for (size_t i = 0; i < playerInfos.size(); i++) {
allPlayerIds.push_back(static_cast<PlayerId>(i));
}
for (const auto &event : tutorialConfig.events()) {
if (!event.has_action() ||
event.action().action_type_case() !=
net::eagle0::common::TutorialAction::kReinforcements) {
continue;
}
const auto &reinforcements = event.action().reinforcements();
const PlayerId playerId = reinforcements.player_id();
for (const auto &commonUnit : reinforcements.units()) {
Unit unit = ConvertUnit(commonUnit, playerId, allPlayerIds);
unit.mutate_unit_id(nextUnitId++);
unit.mutate_status(
net::eagle0::shardok::storage::fb::UnitStatus_PENDING_REINFORCEMENT);
unplacedUnits.push_back(unit);
}
}
}
// For tutorial battles, override settings so duels are always accepted
auto effectiveSettings = gameSettings;
if (tutorialConfig.enabled()) {
effectiveSettings = std::make_shared<GameSettings>(*gameSettings);
effectiveSettings->GetSetter().SetInt(kSettingsKeys.duelBaseAcceptOdds, 200);
}
unique_ptr<ShardokEngine> engine = std::make_unique<ShardokEngine>(
gameSettings,
effectiveSettings,
std::move(unplacedUnits),
customMapBytes.empty() ? LoadMap(mapName) : LoadMapFromBytes(customMapBytes),
month,
gameId,
playerInfos);
engine->SetTutorialBattleConfig(tutorialConfig);
return std::make_shared<ShardokGameController>(std::move(engine), mapName, serializedRequest);
}
@@ -17,6 +17,7 @@
#include "src/main/cpp/net/eagle0/shardok/ai/ShardokAIClient.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
#include "src/main/protobuf/net/eagle0/common/tutorial_battle_config.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/common/game_status.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/common/player_info.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/common/victory_condition.pb.h"
@@ -25,6 +26,7 @@ class GameStatePersister;
using net::eagle0::shardok::common::GameStatus;
using PlayerInfoProto = net::eagle0::shardok::common::PlayerInfo;
using TutorialBattleConfigProto = net::eagle0::common::TutorialBattleConfig;
using std::string;
using std::vector;
using VictoryConditionProto = net::eagle0::shardok::common::VictoryCondition;
@@ -101,6 +103,7 @@ public:
const string &mapName,
const string &customMapBytes,
int month,
const TutorialBattleConfigProto &tutorialConfig,
const string &serializedRequest) -> GameId;
auto UnlockedCreateFromGameStateBytes(
@@ -29,6 +29,7 @@ ExportedObj/
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
Assets/GeneratedProtos.meta
# Unity3D Generated File On Crash Reports
sysinfo.txt
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 33c3d3ae0724f43b6990a941f06026cd
guid: de8e687ff04a047518f6b0162b16bb03
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 176002833088c5a489c5bc2d8ff22f6f
folderAsset: yes
timeCreated: 1533653158
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,424 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Brown_bear_anim_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107938300659633750}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101010601885081890
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102617884575594112}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.95810056
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101128233459581216
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102826653119217864}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.95810056
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101192834251896320
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102352878819366440}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8972603
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101336077533935418
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102059543130376850}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.95810056
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101580147613411956
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102589625623114880}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.95810056
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101582980704291112
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102352878819366440}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.53125
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101751916853535822
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102352878819366440}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.765625
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101810848502573468
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102352878819366440}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.93697476
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101940496364903892
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102225132256528770}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.95810056
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102059543130376850
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: eat
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101810848502573468}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: c4a62745edb0bfc4cafb0579e39a542b, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102225132256528770
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: die
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: d59d373e8fbb4d54ca949a031b0d4d4c, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102352878819366440
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101940496364903892}
- {fileID: 1101128233459581216}
- {fileID: 1101336077533935418}
- {fileID: 1101580147613411956}
- {fileID: 1101010601885081890}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 6e8b43f1abfce6244b220c67fb6408a6, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102589625623114880
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101751916853535822}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: af873bf7e35e32542a7c8813a2b7a46f, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102617884575594112
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: run
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101582980704291112}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 265af7dca6c1b8d478631c25b16ad537, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102826653119217864
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101192834251896320}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: f0de5c62a6c14df4c946f81e4cee9a01, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107938300659633750
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102352878819366440}
m_Position: {x: 116, y: 221, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102589625623114880}
m_Position: {x: 408, y: 408, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102617884575594112}
m_Position: {x: 192, y: 480, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102059543130376850}
m_Position: {x: 516, y: 312, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102225132256528770}
m_Position: {x: -12, y: 408, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102826653119217864}
m_Position: {x: 516, y: 216, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102352878819366440}
@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: cde4c2e452083e041923ea9d397cff9a
timeCreated: 1503919985
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 99702
packageName: Animal pack deluxe
packageVersion: 1.0
assetPath: Assets/Animal pack deluxe/Animation_controllers/Brown_bear_anim_controller.controller
uploadId: 259818
@@ -0,0 +1,251 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Common_frog_anim_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107805713991371454}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101148982776212410
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102555102513037572}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.975
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101265685681787944
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102376791923346888}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6250002
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101485300204910002
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102376791923346888}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8125001
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101934815568064042
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102694681921613406}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.975
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102084676931835742
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: die
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: c6f55bbcb549dd84b8e462c2fcfa022b, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102376791923346888
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101148982776212410}
- {fileID: 1101934815568064042}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 07748632971d5f04c8aa65c264a34444, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102555102513037572
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: run
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101265685681787944}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 5fbba8b1f782969418db55bb3d987b5f, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102694681921613406
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101485300204910002}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: a4bd8fe5a14362344a6dbcf4d1b09fdf, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107805713991371454
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102376791923346888}
m_Position: {x: 112, y: 207, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102555102513037572}
m_Position: {x: 396, y: 372, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102694681921613406}
m_Position: {x: 624, y: 384, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102084676931835742}
m_Position: {x: 132, y: 396, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102376791923346888}
@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 8cacfada9579d874d80b369a51d5879f
timeCreated: 1503923871
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 99702
packageName: Animal pack deluxe
packageVersion: 1.0
assetPath: Assets/Animal pack deluxe/Animation_controllers/Common_frog_anim_controller.controller
uploadId: 259818
@@ -0,0 +1,274 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Crab_anim_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107644546743864704}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101028277113910180
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102870376606235656}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101189676059735964
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102999646505771118}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.50000024
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101208120639555556
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102432006876729932}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101554822702021496
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102000225757452060}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101913970655316922
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102999646505771118}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102000225757452060
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: run
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101189676059735964}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 238b002422ca05547838f212dfbb1025, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102432006876729932
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: die
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 38d39da12b6d60d469afe271d7800d6d, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102870376606235656
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101913970655316922}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 3d8a0c6e4d310544b80b9779dadb034b, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102999646505771118
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101028277113910180}
- {fileID: 1101554822702021496}
- {fileID: 1101208120639555556}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: d67fd937eca13b641b87a685ea469c7e, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107644546743864704
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102999646505771118}
m_Position: {x: 36, y: 216, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102000225757452060}
m_Position: {x: 288, y: 324, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102870376606235656}
m_Position: {x: 128, y: 378, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102432006876729932}
m_Position: {x: 530, y: 349, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102999646505771118}
@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 982c6782724964f4bb30067ebe7fe503
timeCreated: 1503930230
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 99702
packageName: Animal pack deluxe
packageVersion: 1.0
assetPath: Assets/Animal pack deluxe/Animation_controllers/Crab_anim_controller.controller
uploadId: 259818
@@ -0,0 +1,222 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Great_white_shark_anim_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107992941604930540}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101287056656772208
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102957065829915340}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.6250002
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101539268738098926
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102543631411335336}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9292453
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101763166527845252
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102957065829915340}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.85000014
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101922977322660746
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102632217721602674}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9292453
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102543631411335336
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101287056656772208}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: b0b01c150ebfb2a4eb3b8508945227e1, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102632217721602674
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: fastswim
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101763166527845252}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 582b64585cdb0964fb75b8a7557db106, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102957065829915340
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: swim
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101922977322660746}
- {fileID: 1101539268738098926}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: c8d6f4fe147f7e44ab699959c0214f43, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107992941604930540
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102957065829915340}
m_Position: {x: 72, y: 240, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102543631411335336}
m_Position: {x: 367, y: 295, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102632217721602674}
m_Position: {x: 180, y: 372, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102957065829915340}
@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: ec2d92d0318d2484f8254d2b98eb35fb
timeCreated: 1503921901
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 99702
packageName: Animal pack deluxe
packageVersion: 1.0
assetPath: Assets/Animal pack deluxe/Animation_controllers/Great_white_shark_anim_controller.controller
uploadId: 259818
@@ -0,0 +1,424 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Ibex_anim_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107821830521415336}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101014174651657282
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102086559292392734}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8333334
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101103193759854188
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102375663914560786}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9528302
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101120892466614486
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102168671174143042}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9528302
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101349768435232438
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102086559292392734}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.93697476
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101399500536278128
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102745152576691660}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9528302
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101521994886730848
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102468459944873142}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9528302
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101794131536145022
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102086559292392734}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.423077
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101815923011030298
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102210209872313826}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9528302
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101959661226112598
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102086559292392734}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.73214287
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102086559292392734
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101103193759854188}
- {fileID: 1101399500536278128}
- {fileID: 1101521994886730848}
- {fileID: 1101120892466614486}
- {fileID: 1101815923011030298}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: b52d4cd91413bbf4392eba65beb37fc6, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102168671174143042
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: eat
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101349768435232438}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 9bc608890adca1a4aac635662d2384b9, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102210209872313826
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: run
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101794131536145022}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 5780fb5a43f888d4a8e509015c6e8da6, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102375663914560786
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: die
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 56fb46de1ee225d45a584616ebafc83b, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102468459944873142
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101959661226112598}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 4f52bf618052cd345ba15aea63418e78, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102745152576691660
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: attack
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101014174651657282}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 25176750fbfb3144d82183db47870587, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107821830521415336
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102086559292392734}
m_Position: {x: 164, y: 191, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102168671174143042}
m_Position: {x: 312, y: 408, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102375663914560786}
m_Position: {x: 573, y: 350, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102745152576691660}
m_Position: {x: 547, y: 240, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102210209872313826}
m_Position: {x: 72, y: 372, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102468459944873142}
m_Position: {x: 348, y: 336, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102086559292392734}
@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 5c52e25f27816904184511d4e460ccd3
timeCreated: 1503920262
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 99702
packageName: Animal pack deluxe
packageVersion: 1.0
assetPath: Assets/Animal pack deluxe/Animation_controllers/Ibex_anim_controller.controller
uploadId: 259818
@@ -0,0 +1,251 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Iron_age_pig_anim_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 1107861048168977950}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1101386861559199726
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102456168342339772}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9250001
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101415296822033754
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102253734209236996}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.8125
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101423959809390552
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102253734209236996}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.925
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101963275335392076
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102973762483916702}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9250001
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102253734209236996
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: idle
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101963275335392076}
- {fileID: 1101386861559199726}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: a3b756ae31931794fadb3a8a02683358, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102456168342339772
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101415296822033754}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 2fce37f628ad00f4aa1975748eebe591, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102760770783484364
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: die
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 115926dbe778e21409a9d024a0dccb73, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &1102973762483916702
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: eat
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101423959809390552}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 47040e9be5089844ba574a243625b41f, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &1107861048168977950
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1102253734209236996}
m_Position: {x: 89, y: 216, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102973762483916702}
m_Position: {x: 276, y: 408, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102760770783484364}
m_Position: {x: 48, y: 396, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102456168342339772}
m_Position: {x: 576, y: 369, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1102253734209236996}
@@ -0,0 +1,16 @@
fileFormatVersion: 2
guid: 95baa18743252a3478af4ded37294aee
timeCreated: 1503928448
licenseType: Store
NativeFormatImporter:
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 99702
packageName: Animal pack deluxe
packageVersion: 1.0
assetPath: Assets/Animal pack deluxe/Animation_controllers/Iron_age_pig_anim_controller.controller
uploadId: 259818

Some files were not shown because too many files have changed in this diff Show More