diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index eae255e37ef..899d3f1a47a 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -233,6 +233,9 @@ /// Causes a random safe teleport every 2 seconds for a limited time #define STATUS_EFFECT_TELEPORT_ROULETTE /datum/status_effect/teleport_roulette +/// Use by hivelords to determine if they can attack yet. +#define STATUS_EFFECT_HIVELORD_TRACKING /datum/status_effect/hivelord_tracking + /// Status effects for different actions #define STATUS_EFFECT_REMOVE_CUFFS /datum/status_effect/action_status_effect/remove_handcuffs #define STATUS_EFFECT_REMOVE_MUZZLE /datum/status_effect/action_status_effect/remove_muzzle diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index e443fe4f2c2..ce37ee076c9 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -354,6 +354,13 @@ #undef LWAP_LOCK_CAP +/datum/status_effect/hivelord_tracking + id = "hivelord_tracking" + alert_type = null + duration = 10 SECONDS + status_type = STATUS_EFFECT_REFRESH + var/list/list_of_uids = list() + /datum/status_effect/delayed id = "delayed_status_effect" status_type = STATUS_EFFECT_MULTIPLE diff --git a/code/modules/mob/living/basic/mining/hivelord.dm b/code/modules/mob/living/basic/mining/hivelord.dm index 4a3724bde02..5ee94e9d814 100644 --- a/code/modules/mob/living/basic/mining/hivelord.dm +++ b/code/modules/mob/living/basic/mining/hivelord.dm @@ -54,12 +54,12 @@ mouse_opacity = MOUSE_OPACITY_OPAQUE friendly_verb_continuous = "buzzes near" friendly_verb_simple = "buzz near" - speed = 0 // Same speed as a person so you can flee + speed = -1 maxHealth = 1 health = 1 harm_intent_damage = 5 - melee_damage_lower = 6 - melee_damage_upper = 8 + melee_damage_lower = 10 + melee_damage_upper = 10 attack_verb_continuous = "slashes" attack_verb_simple = "slash" speak_emote = list("telepathically cries") @@ -72,12 +72,40 @@ basic_mob_flags = DEL_ON_DEATH ai_controller = /datum/ai_controller/basic_controller/hivelord_brood initial_traits = list(TRAIT_FLYING) + ///Are we an advanced legion skull used in hardmode legion? Ignore the attack rules. + var/advanced_legion = FALSE /mob/living/basic/mining/hivelordbrood/Initialize(mapload) . = ..() addtimer(CALLBACK(src, PROC_REF(death)), 100) AddComponent(/datum/component/swarming) +/mob/living/basic/mining/hivelordbrood/early_melee_attack(atom/target, list/modifiers, ignore_cooldown) + . = ..() + if(!.) + return FALSE + if(!isliving(target)) + return TRUE + var/mob/living/living_target = target + var/can_continue = FALSE + var/datum/status_effect/hivelord_tracking/tracker = living_target.has_status_effect(STATUS_EFFECT_HIVELORD_TRACKING) + if(tracker && advanced_legion) + tracker.refresh() + if(!(src.UID() in tracker.list_of_uids)) // Add in the UID so non advanced legion skulls in the fight are harder too. + tracker.list_of_uids += UID() + return TRUE + if(tracker) + tracker.refresh() + if((UID() in tracker.list_of_uids) || length(tracker.list_of_uids) >= 3 || advanced_legion) + can_continue = TRUE + if(!tracker) + tracker = living_target.apply_status_effect(STATUS_EFFECT_HIVELORD_TRACKING) + if(!can_continue && !advanced_legion) + tracker.list_of_uids += src.UID() + return FALSE + else + return TRUE + /mob/living/basic/mining/hivelordbrood/space /mob/living/basic/mining/hivelordbrood/space/Process_Spacemove(movement_dir, continuous_move) @@ -208,13 +236,15 @@ icon_dead = "legion_head" maxHealth = 5 health = 5 + melee_damage_lower = 12 + melee_damage_upper = 12 attack_verb_continuous = "bites" attack_verb_simple = "bites" speak_emote = list("echoes") throw_blocked_message = "is shrugged off by" var/can_infest_dead = FALSE -/mob/living/basic/mining/hivelordbrood/legion/melee_attack(mob/living/carbon/human/target, list/modifiers, ignore_cooldown) +/mob/living/basic/mining/hivelordbrood/legion/melee_attack(mob/target, list/modifiers, ignore_cooldown) . = ..() if(!ishuman(target)) return @@ -252,6 +282,7 @@ /mob/living/basic/mining/hivelordbrood/legion/advanced ai_controller = /datum/ai_controller/basic_controller/hivelord_brood/advanced_legion can_infest_dead = TRUE + advanced_legion = TRUE // Big legion (billy) /mob/living/basic/mining/big_legion