From 2f438e5f4a21589a187a2232e78e83e303bb3f08 Mon Sep 17 00:00:00 2001 From: Ashe Higgs Date: Fri, 8 Sep 2017 11:18:14 -0400 Subject: [PATCH] Adds a short telegraph to the watcher's blasts (#30389) * Adds a telegraph to the watcher's blasts * hmm --- .../mob/living/simple_animal/hostile/hostile.dm | 12 +++++++++++- .../simple_animal/hostile/mining_mobs/basilisk.dm | 7 ++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 0f464de328..866f9c995a 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -28,6 +28,9 @@ var/ranged_message = "fires" //Fluff text for ranged mobs var/ranged_cooldown = 0 //What the current cooldown on ranged attacks is, generally world.time + ranged_cooldown_time var/ranged_cooldown_time = 30 //How long, in deciseconds, the cooldown of ranged attacks is + var/ranged_telegraph = "prepares to fire at *TARGET*!" //A message shown when the mob prepares to fire; use *TARGET* if you want to show the target's name + var/ranged_telegraph_sound //A sound played when the mob prepares to fire + var/ranged_telegraph_time = 0 //In deciseconds, how long between the telegraph and ranged shot var/ranged_ignores_vision = FALSE //if it'll fire ranged attacks even if it lacks vision on its target, only works with environment smash var/check_friendly_fire = 0 // Should the ranged mob check for friendlies when shooting var/retreat_distance = null //If our mob runs from players when they're too close, set in tile distance. By default, mobs do not retreat. @@ -232,7 +235,14 @@ var/target_distance = get_dist(targets_from,target) if(ranged) //We ranged? Shoot at em if(!target.Adjacent(targets_from) && ranged_cooldown <= world.time) //But make sure they're not in range for a melee attack and our range attack is off cooldown - OpenFire(target) + if(!ranged_telegraph_time || client) + OpenFire(target) + else + if(ranged_telegraph) + visible_message("[src] [replacetext(ranged_telegraph, "*TARGET*", "[target]")]") + if(ranged_telegraph_sound) + playsound(src, ranged_telegraph_sound, 75, FALSE) + addtimer(CALLBACK(src, .proc/OpenFire, target), ranged_telegraph_time) if(!Process_Spacemove()) //Drifting walk(src,0) return 1 diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm index f95820f87f..14b8056af6 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm @@ -14,6 +14,9 @@ ranged = 1 ranged_message = "stares" ranged_cooldown_time = 30 + ranged_telegraph = "gathers energy and stares at *TARGET*!" + ranged_telegraph_sound = 'sound/magic/magic_missile.ogg' + ranged_telegraph_time = 7 throw_message = "does nothing against the hard shell of" vision_range = 2 speed = 3 @@ -70,9 +73,11 @@ melee_damage_lower = 15 melee_damage_upper = 15 attacktext = "impales" + ranged_telegraph = "fixates on *TARGET* as its eye shines blue!" + ranged_telegraph_sound = 'sound/magic/tail_swing.ogg' + ranged_telegraph_time = 5 a_intent = INTENT_HARM speak_emote = list("telepathically cries") - attack_sound = 'sound/weapons/bladeslice.ogg' stat_attack = UNCONSCIOUS movement_type = FLYING robust_searching = 1