Basic Mob Brimdemon (#78424)

## About The Pull Request

Fixes #71330

The brimdemon was basically already perfect (well, it has a novel means
of attacking) so I didn't get too fancy with this one, it's _largely_
just a straightforward conversion.
Following this change it's a little slower to back off, but better at
lining up with people in order to blast them. Additionally, its beam is
now a mob ability so you can give it to other mobs if you so desire.

Because I can't help doing a _little_ tinkering, Brimdemons now explode
2.5 seconds after they die, after a brief warning animation.

## Why It's Good For The Game

Simple mobs must die

## Changelog

🆑
add: Brimdemon corpses release an explosion shortly after death, just to
keep you on your toes.
refactor: Brimdemons now use the basic mob framework which (should)
improve their pathfinding somewhat. Please bug report any unusual
behaviour.
admin: The brimdemon's beam ability can be given to any mob, for your
Binding of Isaac event
/🆑
This commit is contained in:
Jacquerel
2023-09-22 19:12:43 -06:00
committed by GitHub
parent 48c0039ff7
commit b2ecd81be4
45 changed files with 548 additions and 393 deletions
@@ -69,14 +69,10 @@
/datum/ai_planning_subtree/sculpt_statues
/datum/ai_planning_subtree/sculpt_statues/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
var/obj/target = controller.blackboard[BB_TARGET_ROCK]
if(QDELETED(target))
controller.queue_behavior(/datum/ai_behavior/find_and_set, BB_TARGET_ROCK, /obj/structure/flora/rock/icy)
return
controller.queue_behavior(/datum/ai_behavior/sculpt_statue, BB_TARGET_ROCK)
return SUBTREE_RETURN_FINISH_PLANNING
if(controller.blackboard_key_exists(BB_TARGET_ROCK))
controller.queue_behavior(/datum/ai_behavior/sculpt_statue, BB_TARGET_ROCK)
return SUBTREE_RETURN_FINISH_PLANNING
controller.queue_behavior(/datum/ai_behavior/find_and_set, BB_TARGET_ROCK, /obj/structure/flora/rock/icy)
/datum/ai_behavior/sculpt_statue
behavior_flags = AI_BEHAVIOR_REQUIRE_MOVEMENT | AI_BEHAVIOR_REQUIRE_REACH | AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION
@@ -135,16 +131,13 @@
/datum/ai_planning_subtree/burn_trees/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick)
var/datum/action/cooldown/using_action = controller.blackboard[BB_WHELP_STRAIGHTLINE_FIRE]
if (!using_action.IsAvailable())
if (!using_action?.IsAvailable())
return
var/obj/structure/target = controller.blackboard[BB_TARGET_TREE]
if(QDELETED(target))
controller.queue_behavior(/datum/ai_behavior/set_target_tree, BB_TARGET_TREE)
return
controller.queue_behavior(/datum/ai_behavior/targeted_mob_ability/and_clear_target/burn_trees, BB_WHELP_STRAIGHTLINE_FIRE, BB_TARGET_TREE)
return SUBTREE_RETURN_FINISH_PLANNING
if(controller.blackboard_key_exists(BB_TARGET_TREE))
controller.queue_behavior(/datum/ai_behavior/targeted_mob_ability/and_clear_target/burn_trees, BB_WHELP_STRAIGHTLINE_FIRE, BB_TARGET_TREE)
return SUBTREE_RETURN_FINISH_PLANNING
controller.queue_behavior(/datum/ai_behavior/set_target_tree, BB_TARGET_TREE)
/datum/ai_behavior/set_target_tree