mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
Hauntium is chill with the undead, buffs hauntium stats (#61584)
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
|
||||
/datum/ai_controller/haunted
|
||||
movement_delay = 0.4 SECONDS
|
||||
blackboard = list(BB_TO_HAUNT_LIST = list(),
|
||||
BB_HAUNT_TARGET,
|
||||
BB_HAUNTED_THROW_ATTEMPT_COUNT)
|
||||
blackboard = list(
|
||||
BB_TO_HAUNT_LIST = list(),
|
||||
BB_LIKES_EQUIPPER = FALSE,
|
||||
BB_HAUNT_TARGET,
|
||||
BB_HAUNTED_THROW_ATTEMPT_COUNT,
|
||||
)
|
||||
planning_subtrees = list(/datum/ai_planning_subtree/haunted)
|
||||
idle_behavior = /datum/idle_behavior/idle_ghost_item
|
||||
|
||||
@@ -21,8 +24,16 @@
|
||||
/datum/ai_controller/haunted/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
SIGNAL_HANDLER
|
||||
UnregisterSignal(pawn, COMSIG_ITEM_EQUIPPED)
|
||||
var/list/hauntee_list = blackboard[BB_TO_HAUNT_LIST]
|
||||
hauntee_list[equipper] = hauntee_list[equipper] + HAUNTED_ITEM_AGGRO_ADDITION //You have now become one of the victims of the HAAAAUNTTIIIINNGGG OOOOOO~~~
|
||||
var/haunt_equipper = TRUE
|
||||
if(isliving(equipper))
|
||||
var/mob/living/possibly_cool = equipper
|
||||
if(possibly_cool.mob_biotypes & MOB_UNDEAD)
|
||||
haunt_equipper = FALSE
|
||||
if(!haunt_equipper)
|
||||
blackboard[BB_LIKES_EQUIPPER] = TRUE
|
||||
else
|
||||
var/list/hauntee_list = blackboard[BB_TO_HAUNT_LIST]
|
||||
hauntee_list[equipper] = hauntee_list[equipper] + HAUNTED_ITEM_AGGRO_ADDITION //You have now become one of the victims of the HAAAAUNTTIIIINNGGG OOOOOO~~~
|
||||
RegisterSignal(pawn, COMSIG_ITEM_DROPPED, .proc/on_dropped)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -30,4 +41,5 @@
|
||||
/datum/ai_controller/haunted/proc/on_dropped(datum/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
RegisterSignal(pawn, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
blackboard[BB_LIKES_EQUIPPER] = FALSE
|
||||
UnregisterSignal(pawn, COMSIG_ITEM_DROPPED)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
var/obj/item/item_pawn = controller.pawn
|
||||
|
||||
if(ismob(item_pawn.loc)) //We're being held, maybe escape?
|
||||
if(controller.blackboard[BB_LIKES_EQUIPPER])//don't unequip from people it's okay with
|
||||
return
|
||||
if(DT_PROB(HAUNTED_ITEM_ESCAPE_GRASP_CHANCE, delta_time))
|
||||
controller.queue_behavior(/datum/ai_behavior/item_escape_grasp)
|
||||
return SUBTREE_RETURN_FINISH_PLANNING
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
sheet_type = /obj/item/stack/sheet/hauntium
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.25
|
||||
strength_modifier = 1
|
||||
armor_modifiers = list(MELEE = 1, BULLET = 1, LASER = 1, ENERGY = 1, BOMB = 1, BIO = 1, RAD = 1, FIRE = 1, ACID = 1)
|
||||
|
||||
//pretty good but only the undead can actually make use of these modifiers
|
||||
strength_modifier = 1.2
|
||||
armor_modifiers = list(MELEE = 1.1, BULLET = 1.1, LASER = 1.15, ENERGY = 1.15, BOMB = 1, BIO = 1, RAD = 1, FIRE = 1, ACID = 0.7)
|
||||
|
||||
/datum/material/hauntium/on_applied_obj(obj/o, amount, material_flags)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user