Adds a short telegraph to the watcher's blasts (#30389)

* Adds a telegraph to the watcher's blasts

* hmm
This commit is contained in:
Ashe Higgs
2017-09-08 11:18:14 -04:00
committed by CitadelStationBot
parent ce787e7726
commit 2f438e5f4a
2 changed files with 17 additions and 2 deletions
@@ -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("<span class='danger'>[src] [replacetext(ranged_telegraph, "*TARGET*", "[target]")]</span>")
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
@@ -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