This page is preserved for project history and is not the current reference. Use Enemies, Waves and Bosses for current information.
Enemies, Waves & Bosses
A server-driven enemy FSM feeds arena wave loops and phased world bosses. Enemy stats are template-driven from the database.
Enemy library
| Type | Behaviour | Counter |
|---|---|---|
| Grunt | Low HP, melee rush โ pack threat | Cleave / AoE |
| Shielded | Front absorb blocks projectiles | Flank or AoE |
| Caster Elite | Channelled ranged attack | Silence / Stagger |
| Berserker | High damage, 3s charge window | Dodge timing |
| Tether Anchor | Roots nearest player until destroyed | Burst it |
| Healer Drone | Regenerates nearby enemies | Focus priority |
| World Boss | Shared HP, phase abilities, immunity windows | DoT loads during immunity |
Creature models in the build
Distinct creature art with its own animation drivers (behaviour archetypes above map onto these):
| Creature | Notes |
|---|---|
| Field Ghoul | FieldGoulAnimationDriver; ambient melee. Some ambient ghouls are deliberately damageable-but-not-networked (each client kills its own copy). |
| Gunda | A named melee creature in Darkwood (Fields of Gundab area). Now authored as an Enemy Forge enemy (forged_Gunda_Enemy.prefab) with Attack, Chase, Death, and Idle animation clips via EnemyForgeClips/. |
| Cyclops (incl. Torch Bearer) | CyclopsAnimationDriver; large melee. |
| O'gar Brute (Ogre) | OgreAnimationDriver; networked via BCE โถ Setup โถ 4o (Identity + NT + NetworkAnimator). |
| Wisp | WispMob + WispCombat; small ranged/support mob. |
| Wanderer | EnemyWanderAI + EnemyWanderAnimationDriver; open-world roaming mobs. |
Enemy hover UI (EnemyHoverController, EnemyHoverTooltipUI, EnemyHealthBar) shows name/HP on mouse-over. When an enemy's hierarchy contains multiple nested Health components, EnemyHoverController selects the component whose ConfiguredEnemyDisplayName is set, falling back to the topmost matching Health if none have a configured name. Enemy movement/leashing keeps NavMeshAgent mobs near spawn.
Visual slope alignment: EnemySlopeVisualAligner is attached automatically to every enemy-like entity on the client at OnStartClient (via Health.cs). It tilts only the enemy's visual hierarchy to match the terrain normal beneath them โ the NavMesh root stays upright so navigation, colliders, and Mirror replication remain stable. The tilt is clamped to a configurable maximum angle (default 35ยฐ) and smoothed each LateUpdate.
Forge-authored enemies
Beyond the hand-built creatures above, enemies are increasingly authored as data through Enemy Forge (Editor/EnemyForge/) โ a definition drives model, animation clips, stats, and behaviour, and the suite builds a networked prefab. Forge output populating the zones includes Templar, Wizard, Chaos Weaver (Chain Lightning), Devastator, Pummeler, AW Instigator, and Gunda. These are enemies, not player classes.
The Forge-built Templar enemy is a zone mob and unrelated to the player class at index 1, which was also renamed to Templar on 2026-07-31. They share a name but are distinct: one is an EnemyForge-authored zone creature; the other is a player-controlled hero.
Forge-built enemies carry an EnemySfxProfile component that stores per-enemy audio clips (aggro, attack 1โ4, attack impact, get-hit, death) with volume, pitch variation, and spatial audio distance settings. When a clip is assigned, it overrides the shared CombatAudio fallback for that event on that enemy. Clips are authored in the Enemy Forge SFX section and written to the prefab at build time.
EnemyController.OnStartServer calls QuestEnemyTarget.EnsureAttached, so any enemy can satisfy a KillEnemy quest objective on death without extra wiring. Matching is by normalized enemy identity. See Quests & Quest Forge.
Heavy abilities
Forge-authored enemies with a cast attack configured use EnemyHeavyAttack โ a cooldown-driven system that fires a named spell on a server-authoritative schedule, interrupting the normal attack loop. The available heavy ability types are:
| Type | Effect |
|---|---|
| Void Burst | AoE at target position; applies slow + DoT |
| Chain Lightning | Chains to up to 3 players; applies Weakened |
| Ground Spikes | Cone toward target; applies slow |
| Hex Blast | Single-target, heavy damage; applies Weakened + DoT |
| Elemental Lightning | Composite lightning cast with hand and impact phases; applies Weakened (4 s) to the primary target |
Elemental Lightning requires an ElementalLightningVFXProfile ScriptableObject (hand effect, spell projector, hit effect). Enemy Forge creates this asset automatically at Assets/Game/Resources/EnemyAbilities/ElementalLightning.asset if one is not assigned. Enemies built before this type was introduced have no profile, so those prefabs use the previous random pool โ which excludes Elemental Lightning โ until a profile is explicitly assigned.
Patrol system
Enemies and non-networked NPCs can follow scene-authored patrol routes via two components added in the 2026-07-27 Patrol Forge commit:
EnemyPatrolRoute(MonoBehaviour) โ a scene object holding a list ofTransformwaypoints, a patrolmode(Loop,PingPong, orOneWay),waypointWaitSeconds, andarrivalDistance. Multiple agents can share one route;patrolObjectslists the mobs assigned to it. On server start,EnemyPatrolRoute.Updateensures each listed mob has anEnemyPatrolAgentcomponent.EnemyPatrolAgent(MonoBehaviour) โ the per-enemy patrol state. It ticks only whileEnemyController.state == Idle(and the enemy has no current target and is not returning home), so combat and leash-return navigation always take priority. When aggro starts,SuspendForCombat()resets destination tracking. When combat ends,EnemyController.ResumePatrolOrReturnHome()resumes patrol if a usable route is present, or falls back toReturnToSpawnPoint(). Non-networked scene NPCs (quest givers, decorative mobs with noNetworkIdentity) run patrol on each client locally.
Group formation patrol: when groupFormationPatrol is enabled on the route and preserveFormation is set on an agent, that agent offsets its destination by formationOffset (sideways and forward, in route-relative space) to maintain its authored slot within the group. Formation advance is continuous โ the first member to reach its slot advances the shared leg immediately; other members retarget and catch up in motion. Each agent's NavMesh speed is scaled between 0.78ร and 1.35ร its base patrol speed based on how far it is from the group's average slot distance, keeping the formation tight without stopping. On combat exit, GetSharedResumeWaypoint() picks the waypoint nearest the group's average position so all members converge on the same target before resuming the route.
Leash origin: when an enemy with a patrol route is pulled into combat, its combat leash (_combatLeashOrigin) is anchored at the position where aggro occurred โ not at the spawn point. This allows patrolling enemies to be engaged away from their spawn without immediately de-leashing.
Authoring: use BCE โถ Patrol Forge (PatrolForgeWindow) to create a route, click waypoints into the scene view, and assign enemies. See Editor Tooling.
Server components
EnemyControllerโ per-enemy FSM (Idle/Chase/Attack/Dead),[Server]-gated loop,NavMeshAgentmovement,enemyTemplateIdlinks to the DB template. On death, posts hit+kill to/api/combat/kill.WaveSpawnerโ the live, networked arena loop (waves, difficulty ramp, elite cadence, session tracking). NotWaveManager, which is orphaned legacy โ always editWaveSpawner.WorldBossControllerโ phased boss with SyncVars driving the HUD boss bar.StatusEffectManagerโ the debuff/buff layer that abilities read and write.
Balance is centralized in Resources/CombatBalanceConfig โ the asset must exist or fallback values apply. Mob leashing (leashRadius default 20u) keeps NavMesh agents near their spawn, which also matters for multi-zone NavMesh overlap โ see Zones, Scenes & Multi-Zone.
Base-enemy prefabs needed NetworkTransform (fixed via BCE โถ Setup โถ 4n). Some ambient NPCs (Field Ghouls) are deliberately damageable-but-not-networked โ each client kills its own copy, a Mirror-discipline violation tracked in Known Issues & Tech Debt. The O'gar Brute ogre was networked (BCE โถ Setup โถ 4o).
Related: Combat Core & Loop ยท Ability Atlas & Synergies ยท Loot, Inventory & Crafting