Song of LaritheaTurn-based tactical RPG

Home / News / Smarter enemy AI: flexible action order, no more passive campers

Smarter enemy AI: flexible action order, no more passive campers

2026-04-30

A turn used to commit to strict per-actor move-then-cast pairs — Hero 1 moves and casts, then Hero 2 moves and casts, fixed order. That constraint is gone. Inside one CAST_SPELLS event, hero actions can now be ordered freely (Tara moves → Maya moves → Tara casts → Maya casts is now valid), and on the enemy side three seeded strategies decide the ordering: paired (the old default), moves-first (everyone moves, then everyone casts), and reversed-paired. Base weights are 60/30/10. Planning is still committed in advance — only the ordering of actions inside the event is flexible.

Coordinated melee feels different now. Chapter 1 close-type enemies — Fire/Water/Iron/Wind Ghoul, Earth/Iron/Water/Wind/Fire Golem, Wind Brute — carry a coordinatesAttacks template flag that shifts the weights to 20/70/10. Moves-first becomes dominant, so packs walk in together before throwing punches. The phase-2 cast decision in moves-first re-checks who's already been targeted this turn, so two coordinated enemies don't dogpile a single hero by accident.

Passive enemies that spawn out of striking distance no longer camp at the back line. If a close-range Passive can't reach any hero, the AI flips it to Aggressive and it advances. Plus a small visual cleanup: stat bars hide on dead enemies so the field reads cleaner during multi-fight battles.

End-state is provably unchanged — no friendly fire, area-from-caster targeting, heal-by-id are all preserved. This is a contract + UX shift, not a balance retune.

← Back to news