Hauntium is chill with the undead, buffs hauntium stats (#61584)

This commit is contained in:
tralezab
2021-09-25 03:53:40 -07:00
committed by GitHub
parent 458e49d353
commit c3ffd2d975
4 changed files with 24 additions and 8 deletions
+17 -5
View File
@@ -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
+3 -3
View File
@@ -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)
. = ..()