Fodder

Type: NPC Brain
Level: not in gallery
Pages: 9
Description: Found in the Enemy – Bandit Fodder Assembly. This enemy attacks with fists after emoting. This brain contains multibrains that are not included in the brain gallery and are therefore inaccessible. Contains the same page structure as the Fighter brain.

page 1 @Wander

  1. WHEN [once]
  2. …WHEN DO [textvar:name][equals][text:Bandit Fodder]
  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][hit by attack]
  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] DO [it][boolvar:alerted][equals true]
  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 [once] DO [ground acceleration][equals][10]
  26. WHEN [once] DO [ground turn speed][equals][numvar:Wander Turn Speed]
  27. WHEN DO [move][in direction][vectorvar:Wander Direction][at speed][numvar Wander Move Speed]

page 2 @Pursue

  1. WHEN [once]
  2. …WHEN DO [ranged hit reaction][equals][false]
  3. …WHEN DO [numvar:repel ally distance][equals][10][plus][random number][0.25][to][-0.25]
  4. …WHEN DO [numvar:combat range][equals][2]
  5. WHEN DO [call page][@Targeting]
  6. WHEN [numvar: Target distance][less than][combat range] DO [switch page][page:@Orbit]
  7. WHEN DO [ground acceleration][equals][5]
  8. WHEN DO [numvar:walk or run][equals][3]
  9. WHEN DO [play fx][fx:Dirt Land – small][at position][position][sclae][0.5]
  10. WHEN DO [move][toward][objvartarget][at speed][numvar:walk or run]
  11. WHEN [detect][allies]
  12. …WHEN [distance to][it][less than][numvar:repel ally distance]
  13. …/….WHEN DO [move][away from][it][with strafing]

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

page 4 @Close In

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

page 5 @Back Off

  1. WHEN [once] DO [numvar:emotion][equals][random number][0][to][3][as integer]
  2. WHEN DO [call page][page:@Targeting]
  3. WHEN [numvar:target distance][greater than or equal to][numvar:combat range] DO [switch page][@Orbit]
  4. WHEN [countdown timer][numvar:attack cooldown] DO  [switch page][page:@Attack]
  5. …WHEN [else]
  6. …/…WHEN [numvar:emotion][equal to][0]
  7. …/…WHEN [numvar:emotion][equal to][1] DO [emote][mad]
  8. ../…WHEN [numvar:emotion][equal to][2] DO [emote][Taunt]
  9. …/…WHEN DO [numvar:emotion][equals][random number][0][to][2][as integer]
  10. WHEN [hit by attack]
  11. …WHEN [target distance][less than or equal to][numvar:attack range] Do [switch page][page:@Attack]

page 6 @Attack

  1. WHEN [once]
  2. …WHEN DO [light damage][equals][light damage][plus][#damagemultiplier][multiplied by][light damage]
  3. …WHEN DO [equals][plus][#damagemultiplier][multiplied by]
  4. …WHEN DO [#attack speed][equals][#base speed][plus][#attack speed multiplier][multiplied by][#base speed]
  5. …WHEN DO [#accuracy][equals][0.5][plus][0.5][multiplied by][#accuracy multiplier]
  6. …WHEN [#attack speed][greater than][2] DO [#attack speed][equals][2]
  7. WHEN [duration timer][#accuracy] DO [turn][toward][target]
  8. WHEN [started to][attacking][windup]
  9. …WHEN DO [pace][equals][#attack speed][multiplied by][2]
  10. WHEN [started to][attacking][swing]
  11. …WHEN [pace][equals][#attack speed]
  12. WHEN DO [attack][light][target][without interrupt][end combo]
  13. …WHEN DO [#attack cooldown][equals][random number][1][to[2][as integer]
  14. WHEN [attacking]
  15. …WHEN [hit by attack] DO [pace][decrement by][0.1]
  16. …WHEN DO [light hit reaction][equals][false]
  17. ..WHEN DO [equals][false]
  18. ..WHEN DO [heavy hit reaction][equals][false]
  19. ..WHEN DO [damage hit reaction][equals][false]
  20. WHEN [attacking][light]
  21. …WHEN [duration timer][1][in frames] DO [objvar:telegraph signal][equals][create][missing prop:Attack Telegraph Signal][at position][above]
  22. WHEN [attacking]
  23. …WHEN [duration timer][1][in frames] DO [objvar:telegraph signal][equals][create][missing prop:Attack Telegraph Signal][at position][above]
  24. WHEN [no longer][attacking]
  25. …WHEN DO [#aggression amount][equals][random number][1][to][25][as integer]
  26. …WHEN DO [me][#aggression][equals][0]
  27. …WHEN DO [light hit reaction][equals][true]
  28. …WHEN DO [equals][true]
  29. …WHEN DO  [heavy hit reaction][equals][true]
  30. …WHEN DO  [damage hit reaction][equals][true]
  31. …WHEN  DO [pace][equals][#base speed]
  32. WHEN [countdown timer][1.5] DO [switch page][page: @Close In]

 

page 7 @Signaling

  1. WHEN DO [boolvar:highest aggression][equals][true]
  2. WHEN [me][numvar:aggression][less than][100] DO [boolvar:highest aggression][equals][false]
  3. WHEN [boolvar:highest aggression] DO [switch page][page:@Close In]

 

page 8 @Targeting

  1. WHEN [ignore line][is dead] DO [pop brain][this brain] // this line does nothing
  2. WHEN [objvar:target][is dead] DO [emote][Agree]
  3. …WHEN DO [boolvar:alerted][equals][false]
  4. …WHEN DO [switch page][page:@Wander]
  5. WHEN [countdown timer][loop][trigger on start]
  6. …WHEN [enemies][nearest object][or][player][neutrals][nearest object] DO
  7. …/…WHEN [it][attackable][and][it][visible] DO [objvar:target][equals][it]
  8. WHEN [countdown timer][0.3][loop][trigger on start] DO [numvar:target distance][equals][distance to][objvar:target]
  9. WHEN DO [turn][toward][objvar:target]
  10. WHEN DO [numvar:agression][increment by][numvar:agression amount]
  11. WHEN [hit by attack]
  12. …WHEN DO [numvar:agresssion][increment by][numvar:agression amount]
  13. …WHEN DO [numvar:Attack Cooldown][decrement by][1]
  14. …WHEN [numvar:target distance][less than or equal to][numvar:attack range] DO  [switch page][page:@Attack]
  15. WHEN [hit by attack] DO [objvar:target][equals][it]

page 9 @ Init

  1. WHEN [once]
  2. …WHEN DO [vectorvar:Spawn Position][equals][position]
  3. …WHEN DO [add brain][Temporary Health]
  4. …WHEN DO [add brain][Enemy Objectives][to slot][@Enemy Objectives Brain][to channel][Enemy Objectives Channel]
  5. …WHEN DO [add brain][Enemy Lights Brain][to slot][@Lights Brain][to channel][@Lights Channel]
  6. WHEN [once]
  7. …WHEN DO [health][equals][max health]
  8. …WHEN DO [numvar:base speed][equals][1]
  9. …WHEN DO [numvar:agression][equals][random number][1][to][100]
  10. …WHEN DO [equip][objvar:my weapon]
  11. …WHEN DO [numvar:target distance][equals][0]
  12. …WHEN DO [boolvar:alerted][equals][false]
  13. WHEN [once]
  14. …WHEN DO [numvar:Max Timer][equals][3][plus][random number][-1][to][1]
  15. …WHEN DO [numvar:Wander Turn Speed][equals][8]
  16. …WHEN DO [numvar:Wander Move Speed][equals][0.4]
  17. ..WHEN DO [numvar: Wander Distance][equals][2.5]
  18. WHEN [once]
  19. …WHEN DO [numvar:min health bonus][equals][negative][0.25]
  20. …WHEN DO [numvar:max health][equals][1]
  21. …WHEN DO [numvar:min accuracy bonus][equals][negative][0.25]
  22. …WHEN DO [numvar:max accuracy bonus][equals][0.5]
  23. …WHEN DO [numvar:min damage bonus][equals][negative][0.5]
  24. …WHEN DO [numvar:max damage bonus][equals][0.75]
  25. …WHEN DO [numvar:min attack speed bonus][equals][negative][0.25]
  26. …WHEN DO [max attack speed bonus][equals][0.5]
  27. WHEN [once]
  28. …WHEN DO [numvar: health multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max health bonus][min][numvar:min health bonus]
  29. …WHEN DO [numvar: accuracy multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max accuracy bonus][min][numvar:min accuracy bonus]
  30. [numvar: damage multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max damage bonus][min][numvar:min damage bonus]
  31. [numvar: attack speed multiplier][equals][clamp][global][numvar:Difficulty][max][numvar:max attack speed bonus][min][numvar:min attack speed bonus]
  32. WHEN [once]
  33. …WHEN DO [max health][equals][max health][plus][max health][multiplied by][numvar:health  ultiplier]
  34. …WHEN DO [health][equals][max health]

Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: