Prism Rogue: archery, upgrades and layered Boss AI
Stop to shoot, survive six waves and choose upgrades. Minions use one BDS; elites and the Boss use nested strategy, offense, skill and defense decisions.
Open the scene and play
PoBDS/Demo/Prism Rogue/Create Assets and Scene
PoBDS/Demo/Prism Rogue/Open SceneThe scene remains Assets/PoBDS/Demo/Shooting/ShootingDemo.unity. Enter Play and focus Game. WASD moves; stop moving to shoot the nearest visible enemy automatically. Space dodges in the movement direction. Choose one of three upgrades after each wave. Elites appear in waves 3 and 5; the Boss arrives in wave 6.
Choose a build
| Boon | Effect |
|---|---|
| Heavy Arrows / Quick Draw | Damage +8 / fire interval -18%, minimum 160ms |
| Multishot / Piercing / Ricochet | Up to 5 arrows, 4 pierces and 3 bounces |
| Vitality / Windrunner / Deadeye / Iron Will | Improve health, speed, critical chance or armor; every choice also restores 25 health |
Split the Boss into cooperating decision layers
| Decision layer | Key candidates |
|---|---|
| Minion | Guards approach and attack. Rangers also create distance at close range. |
| BossStrategy | Urgent evade 100 → defense; low health 65 → defense; clear shot 40 → offense; otherwise advance 10. |
| BossAttack | Close counter 90 → nova; otherwise enter BossSkills. |
| BossSkills | Charge 80, predictive shot against a moving player 70, fan volley 45, orbit 10; gated by cooldown and busy state. |
| BossDefense | Evade incoming arrows when ready 100; predictive shot 55; fan volley 40; otherwise cover movement 10. |
Compose existing Actions
| Behavior | Flow configuration |
|---|---|
| Advance / orbit / cover | Invoke Method: SetTactic(mode) → Invoke Method: NavigateTactical(), EveryFrame=true |
| Basic attack | CharacterAttackAction, Repeat=true |
| Telegraphed skill | Invoke Method: AimSkill(skill) + CharacterWaitAction → ExecuteSkill(SkillId) + CharacterWaitAction |
| Evade | ExecuteSkill(4) + CharacterWaitAction(450ms) |
No demo-specific Action subclass is added. ArcheroActor exposes game properties and methods; the existing Execute Skill operation dispatches to Agent.OnSkillExecute. IDs: 1 fan volley, 2 nova, 3 charge, 4 evade, 5 predictive shot. Busy gates protect windup, while urgent parent decisions can preempt the entire branch.
Inspect behavior in the editor
Select a running instance
Choose a minion, elite or Boss in Studio’s running-AI selector; open MinionBrain / BossBrain.
Follow the call path
Double-click BDS and behavior-flow nodes; Back / Forward retraces the path. Configurations are under Demos/Shooting/Archero; scene and art are under Demo/Shooting.
Pause and inspect
Set a breakpoint with the debug menu or F9; F10 steps a node, F11 a frame. Capture 100–300 history frames to inspect an evade or skill decision.