mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-13 18:33:22 +00:00
* 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 /🆑 * Basic Mob Brimdemon * Modular --------- Co-authored-by: Jacquerel <hnevard@gmail.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
29 lines
888 B
Plaintext
29 lines
888 B
Plaintext
/datum/ai_controller/basic_controller
|
|
movement_delay = 0.4 SECONDS
|
|
|
|
/datum/ai_controller/basic_controller/TryPossessPawn(atom/new_pawn)
|
|
if(!isbasicmob(new_pawn))
|
|
return AI_CONTROLLER_INCOMPATIBLE
|
|
var/mob/living/basic/basic_mob = new_pawn
|
|
|
|
update_speed(basic_mob)
|
|
|
|
RegisterSignals(basic_mob, list(POST_BASIC_MOB_UPDATE_VARSPEED, COMSIG_MOB_MOVESPEED_UPDATED), PROC_REF(update_speed))
|
|
|
|
return ..() //Run parent at end
|
|
|
|
|
|
/datum/ai_controller/basic_controller/able_to_run()
|
|
. = ..()
|
|
if(!isliving(pawn))
|
|
return
|
|
var/mob/living/living_pawn = pawn
|
|
if(!(ai_traits & CAN_ACT_WHILE_DEAD) && IS_DEAD_OR_INCAP(living_pawn))
|
|
return FALSE
|
|
if(ai_traits & PAUSE_DURING_DO_AFTER && LAZYLEN(living_pawn.do_afters))
|
|
return FALSE
|
|
|
|
/datum/ai_controller/basic_controller/proc/update_speed(mob/living/basic/basic_mob)
|
|
SIGNAL_HANDLER
|
|
movement_delay = basic_mob.cached_multiplicative_slowdown
|