Rogue

Type: NPC Brain
Level: not in gallery
Pages: 9
Description: Found in the Enemy – Bandit Rogue Assembly. This enemy throws daggers after emoting. This brain contains multibrains that are not included in the brain gallery and are therefore inaccessible. I will not be writing out this kode. Contains the same page structure as the Fighter brain.

page 1 @Wander

  1. WHEN [once]
  2. …WHEN DO [textvar:name][equals][text:Bandit Rogue]
  3. …WHEN DO [team][equals][team 2]
  4. …WHEN DO [call page] [page:@Init]
  5. WHEN [boolvar:alerted] DO [switch page][page:@Pursue]
    Detect enemy
  6. WHEN [detect][enemies][nearest object]
  7. …WHEN [it][attackable][and][it][visible] DO [boolvar:alerted][equals][true]
  8. …/…WHEN DO [objvar:target][equals][it]
  9. WHEN [else][see][enemies][nearest object][or][see][player][neutrals][nearest object] DO [boolvar:alerted][equals][true]
  10. …WHEN DO [objvar:target][equals][it]
  11. …WHEN DO [else][health][changed]
  12. …/….WHEN DO [objvar:target][equals][it]
  13. …/…WHEN DO [boolvar:alerted][equals][true]
    Alerted to an enemy
  14. WHEN DO [boolvar:alerted]
  15. …WHEN [for each of][detect][allies]
  16. …/…WHEN DO [it][objvar:target][equals][objvar:target]
  17. …/…WHEN DO [it][boolvar:alerted][equals][true]
  18. …WHEN DO [switch page][page:@Pursue]
    Wander when not engaged
  19. WHEN [countdown timer][numvar:wander time][loop][trigger on start]
  20. …WHEN [distance to][vectorvar:Spawn position][greater than][Max Wander distance] DO [vectorvar:Wander Direction][equals][vectorvar:Spawn position][minus][position]
  21. …/…WHEN [else][distance to][allies][nearest object][less than][numvar:Spread DIstance]
  22. …/…./….WHEN DO [objvar:Near object][equals][allies][nearest object]
  23. …/…./…/…WHEN DO [vectorvar:Wander Direction][equals][position][minus][objvar:Near object][position]
  24. …/…/….WHEN [else] DO [vectorvar:Wander direction][equals][random vector]
  25. WHEN DO [move][in direction][vectorvar:Wander Direction][at speed][numvar Wander Move Speed]

page 2 @Pursue

  1. WHEN [once]
  2. …WHEN DO [numvar:repel ally distance][equals][2.5][plus][random number][0.25][to][-0.25]
  3. …WHEN DO [numvar:combat range][equals][8]
  4. WHEN DO [call page][@Targeting]
  5. WHEN [numvar: Target distance][less than][combat range] DO [switch page][page:@Orbit]
  6. WHEN [countdown timer][1][and][(][numvar:target distance][greater than][numvar: combat range][)]
  7. …WHEN DO [ground acceleration][equals][5]
  8. …WHEN DO [numvar:walk or run][equals][1.75]
  9. …WHEN [else]
  10. …/…WHEN DO [ground acceleration][equals][3.5]
  11. …/…WHEN DO [numvar:walk or run][equals][0.75]
  12. WHEN DO [move][toward][objvartarget][at speed][numvar:walk or run]
  13. WHEN [detect][allies]
  14. …WHEN [distance to][it][less than][numvar:repel ally distance]
  15. …/….WHEN DO [move][away from][it][with strafing][at speed][0.75]

page 3 @Orbit

  1. WHEN [page entered] DO [boolvar:moving left][equals][random number][less than][0.5]
  2. WHEN [once] DO
  3. …WHEN DO [numvar:enemy repel range][equals][1.5]
  4. …WHEN DO [numvar:target out of range][equals][7]
  5. WHEN DO [call page][page:@Targeting]
  6. WHEN [numvar:target distance][greater than or equal to][numvar:target out of range]
  7. …WHEN DO [switch page][page@Pursue]
  8. WHEN [numvar:target distance][less than][numvar:combat range]
  9. …WHEN DO [switch page][page@Signaling]
  10. WHEN [numvar:target distance][less than or equal to][numvar:enemy repel range] DO [switch page][@Back off]
  11. WHEN [numvar:target distance][greater than ][numvar:combat range] DO [move][toward][objvar:target]
  12. WHEN [countdown timer][random number][3][to][5][loop] DO [toggle][boolvar:moving left]
  13. WHEN [boolvar:moving left] DO [vectorvar:Strafing Direction][equals][left]
  14. …WHEN [else] DO [vectorvar:Strafing Direction][equals][right]
  15. .
  16. …WHEN DO [vectorvar:toward player][equals][(][objvar:target][center][minus][center][)][normal]
  17. …WHEN DO [numvar:Move Speed][equals][(][numvar:Target out of range][minus][(][distance to][target][)][)][divided by][numvar:Target out of range][minus][numvar:combat range]
  18. …WHEN DO [vectorvar:Final Move][equals][vectorvar:Strafing Direction][plus][(][vectorvar:toward player][minus][vectorvar:Strafing Direction][)][multiplied][numvar:Move Speed]
  19. …WHEN DO [move][in direction][vectorvar:Final Move][at speed][0.5][with strafing]
  20. .
  21. WHEN [countdown timer][0.15][loop][trigger on start]
  22. …WHEN [detect][allies]
  23. …/…WHEN [distance to][it][less than][numvar: repel ally distance]
  24. …/…/…WHEN DO [move][away from][it][with strafing][at speed][ 0.75]

page 4 @Close In

  1. WHEN [once] DO [numvar:attack range][equals][7]
  2. WHEN DO [call page][page:@Targeting]
  3. WHEN [numvar:target distance][less than or equal to][numvar:attack range]
  4. ….WHEN [countdown timer][1.5] DO [switch page][page:@Attack]
  5. …WHEN [else] Do [move][toward][target]
  6. WHEN [countdown timer][3] DO [switch page][page:@Orbit]

page 5 @Back Off

  1. WHEN DO [call page][page:@Targeting]
  2. WHEN DO [move][away from][objvar:target][at speed][0.5][with strafing]
  3. WHEN [numvar:target distance][greater than or equal to][numvar:combat range] DO [switch page][page:@Orbit]
  4. WHEN [countdown timer][1.5]
  5. …WHEN DO [dodge][distance][5][with strafing][invulnerable]

page 6 @Attack

  1. WHEN [once]
  2. …WHEN DO [#accuracy][equals][1][minus][#accuracy multiplier][multiplied by][1]
  3. …WHEN [#accuracy][less than][0] DO [#accuracy][equals][0]
  4. …WHEN DO [#damage][equals][(][1][plus][#damage multiplier][)][multiplied by]
  5. …WHEN DO [#attack speed][equals][5][multiplied by][#attack speed multiplier]
  6. WHEN [countdown timer][3]
  7. …WHEN DO [#aggression][equals][0]
  8. …WHEN DO [boolvar:attacked recently][equals][true]
  9. ….WHEN DO [switch page][page:@Orbit]
  10. WHEN DO [vectorvar:shoot near target][equals][objvar:target][center]
  11. WHEN DO [turn][toward][objvar:target]
  12. WHEN [shooting]
  13. …WHEN [duration timer][1][in frames] DO [objvar:telegraph signal][equals][create][missing prop: Attack Telegraph Signal][at position][above]
  14. WHEN [page entered] DO [emote][mad]
  15. WHEN DO [highlight][yellow][strength][0.5]
  16. WHEN [countdown timer][1.5][hold time][1.5]
  17. …WHEN DO [shoot][IWP:knife][at][vectorvar:shoot near target][plus][random vecto][circle][radius][#accuracy][at speed][25][launch frequency][#attack speed][with damage][0][without hit reaction]

page 7 @Signaling

  1. WHEN DO [boolvar:highest aggression][equals][true]
  2. WHEN [for each of][objvar:target][enemies][objects closer than][10][from][objvar:target]
  3. …WHEN [it][#aggression][greater than][me][#aggression]
  4. …/…WHEN DO [boolvar:highest aggression][equals][false]
  5. WHEN [boolvar:highest aggression]
  6. …WHEN DO [switch page][page:@close in]

page 8 @Targeting

  1. WHEN [objvar:target][is dead] DO [emote][Agree]
  2. WHEN [countdown timer][loop][trigger on start]
  3. …WHEN [enemies][nearest object][or][player][neutrals][nearest object]
  4. …/…WHEN [it][attackable][and][it][visible] DO [objvar:target][equals][it]
  5. WHEN [countdown timer][0.3][loop][trigger on start] DO [#target distance][equals][distance to][objvar:target]
  6. WHEN DO [turn][toward][objvar:target]
  7. WHEN DO [#aggression][increment by][#aggression amount]
  8. WHEN [health][changed] DO [#aggression][increment by][#aggression amount]

page 9 @ Init

  1. WHEN [once]
  2. …WHEN DO [add brain][Temporary Health]
  3. …WHEN DO [add brain][Enemy Objectives][to slot][@Enemy Objectives Brain][to channel][Enemy Objectives Channel]
  4. …WHEN DO [add brain][Enemy Lights Brain][to slot][@Lights Brain][to channel][@Lights Channel]
  5. …WHEN DO [vectorvar:Spawn Position][equals][position]
  6. WHEN [once]
  7. …WHEN DO [health][equals][max health]
  8. …WHEN DO [objvar:my weapon][equals][create][Knife]
  9. …WHEN DO [equip][objvar:my weapon]
  10. …WHEN DO [#aggression amount][equals][50]
  11. …WHEN DO [#aggression][equals][random number][50][to][140][as integer]
  12. …WHEN DO [boolvar:can attack][equals][true]
  13. …WHEN DO [#attack cooldown][equals][1.25][plus][random number][0][to][3]
  14. …WHEN DO [#base speed][equals][1]
  15. …WHEN DO [#target distance][equals][0]
  16. …WHEN DO [boolvar:alerted][equals][false]
  17. WHEN [once]
  18. ..WHEN DO [numvar: Wander Distance][equals][2.5]
  19. …WHEN DO [numvar:Wander Move Speed][equals][0.4]
  20. …WHEN DO [numvar:Wander Turn Speed][equals][8]
  21. …WHEN DO [#Wander Timer][equals][3][plus][random number][-1][to][1]
  22. WHEN [once] DO [ground acceleration speed][equals][10]
  23. WHEN [once] DO [ground turn speed][equals][#Wander Turn Speed]
  24. WHEN [once]
  25. …WHEN DO [numvar:min health bonus][equals][negative][0.25]
  26. …WHEN DO [numvar:max health][equals][1]
  27. …WHEN DO [numvar:min accuracy bonus][equals][negative][0.25]
  28. …WHEN DO [numvar:max accuracy bonus][equals][0.5]
  29. …WHEN DO [numvar:min damage bonus][equals][negative][0.5]
  30. …WHEN DO [numvar:max damage bonus][equals][0.75]
  31. …WHEN DO [numvar:min attack speed bonus][equals][negative][0.25]
  32. …WHEN DO [max attack speed bonus][equals][0.5]
  33. WHEN [once]
  34. …WHEN DO [numvar: health multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max health bonus][min][numvar:min health bonus]
  35. …WHEN DO [numvar: accuracy multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max accuracy bonus][min][numvar:min accuracy bonus]
  36. [numvar: damage multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max damage bonus][min][numvar:min damage bonus]
  37. [numvar: attack speed multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max attack speed bonus][min][numvar:min attack speed bonus]
  38. WHEN [once]
  39. …WHEN DO [max health][equals][max health][plus][max health][multiplied by][numvar:health  ultiplier]
  40. …WHEN DO [health][equals][max health]
  41. …WHEN DO [equals][plus][multiplied by][#damage multiplier]

Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: