From 0561e2a3c8a89e517b6045667f76f678772364af Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Tue, 16 Aug 2022 23:30:34 +1000 Subject: [PATCH] Tweaking drake AI. --- code/modules/ai/ai_holder_communication.dm | 4 ++-- code/modules/mob/living/simple_mob/defense.dm | 4 ++-- .../simple_mob/subtypes/animal/sif/grafadreka.dm | 16 ++++++++++++---- .../subtypes/animal/sif/grafadreka_ai.dm | 14 +++++++++----- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/code/modules/ai/ai_holder_communication.dm b/code/modules/ai/ai_holder_communication.dm index beddb68924..20366268d9 100644 --- a/code/modules/ai/ai_holder_communication.dm +++ b/code/modules/ai/ai_holder_communication.dm @@ -110,9 +110,9 @@ if(COMM_SAY) holder.ISay(safepick(holder.say_list.speak)) if(COMM_AUDIBLE_EMOTE) - holder.audible_emote(safepick(holder.say_list.emote_hear)) + holder.audible_emote("[safepick(holder.say_list.emote_hear)].") if(COMM_VISUAL_EMOTE) - holder.visible_emote(safepick(holder.say_list.emote_see)) + holder.visible_emote("[safepick(holder.say_list.emote_see)].") #undef COMM_SAY #undef COMM_AUDIBLE_EMOTE diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm index 41481ef65b..d916136399 100644 --- a/code/modules/mob/living/simple_mob/defense.dm +++ b/code/modules/mob/living/simple_mob/defense.dm @@ -80,8 +80,8 @@ if(length(MED.apply_sounds)) playsound(user, pick(MED.apply_sounds), 25) - if(do_mob(user, src, 1 SECOND) && MED.get_amount() >= 1 && health < getMaxHealth()) - heal_organ_damage(MED.heal_brute * 5, MED.heal_burn * 5) + if(do_mob(user, src, 2 SECONDS) && MED.get_amount() >= 1 && health < getMaxHealth()) + heal_organ_damage(MED.heal_brute * 25, MED.heal_burn * 25) visible_message(SPAN_NOTICE("\The [user] applies \the [MED] to \the [src].")) MED.use(1) return diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm index 8721d44035..1b92e9fdcf 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka.dm @@ -3,8 +3,8 @@ desc = "Your wounds have been salved with Sivian sap." mob_overlay_state = "cyan_sparkles" stacks = MODIFIER_STACK_FORBID - on_created_text = "The glowing sap seethes and bubbles in your wounds, tingling and stinging as infection is burned away." - on_expired_text = "The last of the sap in your wounds is absorbed by your body." + on_created_text = "The glowing sap seethes and bubbles in your wounds, tingling and stinging." + on_expired_text = "The last of the sap in your wounds fizzles away." /datum/modifier/sifsap_salve/tick() @@ -351,6 +351,11 @@ var/global/list/last_drake_howl = list() /mob/living/simple_mob/animal/sif/grafadreka/get_eye_color() return eye_colour +/mob/living/simple_mob/animal/sif/grafadreka/do_tame(var/obj/O, var/mob/user) + . = ..() + if(attacked_by_human && ishuman(user) && ((user in tamers) || (user in friends))) + attacked_by_human = FALSE + /mob/living/simple_mob/animal/sif/grafadreka/handle_special() ..() if(client || world.time >= next_alpha_check) @@ -421,9 +426,12 @@ var/global/list/last_drake_howl = list() var/mob/living/carbon/human/H = friend for(var/obj/item/organ/external/E in H.organs) if(E.status & ORGAN_BLEEDING) + E.organ_clamp() H.bloodstr.add_reagent("sifsap", rand(1,2)) - for(var/datum/wound/W in E.wounds) - W.salve() + for(var/datum/wound/W in E.wounds) + W.salve() + W.disinfect() + // Everyone else is just poisoned. else if(!istype(friend, /mob/living/simple_mob/animal/sif)) friend.adjustToxLoss(rand(10,20)) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka_ai.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka_ai.dm index 31e372d6cf..bf109b6cf4 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka_ai.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka_ai.dm @@ -1,5 +1,4 @@ -/mob/living/simple_mob/animal/sif/grafadreka/ICheckRangedAttack(atom/A) - +/mob/living/simple_mob/animal/sif/grafadreka // Some mobtypes are immune to stun, so trying to incapacitate them // is pointless. Track them here so we don't endlessly run away from // Beepsky until he beats us to death. @@ -8,7 +7,8 @@ /mob/living/simple_mob/humanoid/merc ) - . = ..() && isliving(A) +/mob/living/simple_mob/animal/sif/grafadreka/ICheckRangedAttack(atom/A) + . = ..() && isliving(A) && has_sap(2) && (world.time >= next_spit) if(.) var/mob/living/M = A @@ -17,7 +17,7 @@ for(var/mobtype in stun_immune_types) if(istype(A, mobtype)) - return FALSE // bots are immune to stuns + return FALSE /mob/living/simple_mob/animal/sif/grafadreka/IIsAlly(mob/living/L) . = ..() @@ -57,7 +57,11 @@ if(!istype(drake) || prey.lying || prey.incapacitated()) return FALSE // We can spit at them - disengage so you can pew pew. - if(get_dist(target, holder) <= 1 && drake.has_sap(2)) + if(get_dist(target, holder) <= 1 && drake.has_sap(2) && (world.time >= drake.next_spit)) + // No point spitting at immune mobs. + for(var/mobtype in drake.stun_immune_types) + if(istype(target, mobtype)) + return FALSE return TRUE /datum/ai_holder/simple_mob/intentional/grafadreka/pre_ranged_attack(atom/A)