From d3f086e942dbd0cc8bcabba2f467918a8b324f2f Mon Sep 17 00:00:00 2001 From: Giacomand Date: Thu, 6 Feb 2014 20:28:15 +0000 Subject: [PATCH] Adds a new statue hostile mob! This hostile mob is very much like other monsters that move/kill you when you don't look at them. This mob is also designed to be player controlled and has spells to get around the 360 vision problem, such as flickering lights and causing people around it to go blind for a short duration. CANPUSH is now used by simple_animals Added 4 directional sprites for the statue. Conflicts: code/modules/mob/living/simple_animal/simple_animal.dm --- baystation12.dme | 1 + .../living/simple_animal/hostile/hostile.dm | 2 +- .../living/simple_animal/hostile/statue.dm | 168 ++++++++++++++++++ .../mob/living/simple_animal/simple_animal.dm | 6 +- icons/obj/statue.dmi | Bin 810 -> 1307 bytes 5 files changed, 174 insertions(+), 3 deletions(-) create mode 100644 code/modules/mob/living/simple_animal/hostile/statue.dm diff --git a/baystation12.dme b/baystation12.dme index 2624afaac9e..15f91784c95 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1119,6 +1119,7 @@ #include "code\modules\mob\living\simple_animal\hostile\mushroom.dm" #include "code\modules\mob\living\simple_animal\hostile\pirate.dm" #include "code\modules\mob\living\simple_animal\hostile\russian.dm" +#include "code\modules\mob\living\simple_animal\hostile\statue.dm" #include "code\modules\mob\living\simple_animal\hostile\syndicate.dm" #include "code\modules\mob\living\simple_animal\hostile\tree.dm" #include "code\modules\mob\living\simple_animal\hostile\retaliate\clown.dm" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index d5aeb2dab37..ac6e51def66 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -154,7 +154,7 @@ LostTarget() /mob/living/simple_animal/hostile/proc/Goto(var/target, var/delay, var/minimum_distance) - walk_to(src, target, minimum_distance, delay) + walk_to(src, target, minimum_distance, delay) /mob/living/simple_animal/hostile/adjustBruteLoss(var/damage) ..(damage) diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm new file mode 100644 index 00000000000..a89fbb21a7c --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -0,0 +1,168 @@ +// A mob which only moves when it isn't being watched by living beings. + +/mob/living/simple_animal/hostile/statue + name = "human statue" + desc = "It looks spooky. Its eye seems to follow you.." + icon = 'icons/obj/statue.dmi' + icon_state = "human_male" + icon_living = "human_male" + icon_dead = "human_male" + gender = NEUTER + a_intent = "harm" + + response_help = "touches" + response_disarm = "pushes" + + speed = -1 + maxHealth = 25000 + health = 25000 + + harm_intent_damage = 40 + melee_damage_lower = 38 + melee_damage_upper = 43 + attacktext = "claws" + attack_sound = 'sound/hallucinations/growl1.ogg' + + min_oxy = 0 + max_oxy = 0 + min_tox = 0 + max_tox = 0 + min_co2 = 0 + max_co2 = 0 + min_n2 = 0 + max_n2 = 0 + minbodytemp = 0 + + faction = "statue" + move_to_delay = 2 // Very fast + + animate_movement = NO_STEPS // Do not animate movement, you jump around as you're a scary statue. + + see_in_dark = 15 + vision_range = 14 + aggro_vision_range = 14 + idle_vision_range = 14 + + search_objects = 1 // So that it can see through walls + + sight = SEE_SELF|SEE_MOBS|SEE_OBJS|SEE_TURFS + anchored = 1 + status_flags = GODMODE // Cannot push also + + +// No movement while seen code. + +/mob/living/simple_animal/hostile/statue/New() + ..() + // Give spells + spell_list += new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(src) + spell_list += new /obj/effect/proc_holder/spell/aoe_turf/blindness(src) + spell_list += new /obj/effect/proc_holder/spell/targeted/night_vision(src) + + // Give nightvision + see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING + +/mob/living/simple_animal/hostile/statue/Move(NewLoc) + if(can_be_seen(NewLoc)) + if(client) + src << "You cannot move, there are eyes on you!" + return 0 + return ..() + +/mob/living/simple_animal/hostile/statue/AttackingTarget() + if(!can_be_seen()) + ..() + +/mob/living/simple_animal/hostile/statue/DestroySurroundings() + if(!can_be_seen()) + ..() + +/mob/living/simple_animal/hostile/statue/UnarmedAttack() + if(can_be_seen()) + if(client) + src << "You cannot attack, there are eyes on you!" + return + ..() + +/mob/living/simple_animal/hostile/statue/proc/can_be_seen(var/turf/destination) + + // Check for darkness + var/turf/T = get_turf(loc) + if(T) + if(!T.lighting_lumcount) // No one can see us in the darkness, right? + if(!destination || !destination.lighting_lumcount) + return 0 + + // We aren't in darkness, loop for viewers. + var/list/check_list = list(src) + if(destination) + check_list += destination + + // This loop will, at most, loop twice. + for(var/atom/check in check_list) + for(var/mob/living/M in viewers(world.view + 1, check)) + if(M.client && !istype(M, type)) + if(!M.blinded && !(sdisabilities & BLIND)) + return 1 + return 0 + +// Cannot talk + +/mob/living/simple_animal/hostile/statue/say() + return 0 + +// Statue powers + +// Flicker lights +/obj/effect/proc_holder/spell/aoe_turf/flicker_lights + name = "Flicker Lights" + desc = "You will trigger a large amount of lights around you to flicker." + + charge_max = 300 + clothes_req = 0 + range = 18 + +/obj/effect/proc_holder/spell/aoe_turf/flicker_lights/cast(list/targets) + for(var/turf/T in targets) + for(var/obj/machinery/light/L in T) + L.flicker() + return + +//Blind AOE +/obj/effect/proc_holder/spell/aoe_turf/blindness + name = "Blindness" + desc = "Your prey will be momentarily blind for you to advance on them." + + charge_max = 800 + clothes_req = 0 + range = 7 + +/obj/effect/proc_holder/spell/aoe_turf/blindness/cast(list/targets) + for(var/turf/T in targets) + for(var/mob/living/L in T) + if(L != loc) + L.eye_blind = max(L.eye_blind, 3) + return + +//Toggle Night Vision +/obj/effect/proc_holder/spell/targeted/night_vision + name = "Toggle Nightvision \[ON\]" + desc = "Toggle your nightvision mode." + + charge_max = 10 + clothes_req = 0 + + message = "You toggle your night vision!" + range = -1 + include_user = 1 + +/obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets) + + for(var/mob/living/target in targets) + if(target.see_invisible == SEE_INVISIBLE_LIVING) + target.see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING + name = "Toggle Nightvision \[ON\]" + else + target.see_invisible = SEE_INVISIBLE_LIVING + name = "Toggle Nightvision \[OFF\]" + return \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 771a9159e14..3a8fae11f1f 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -4,6 +4,8 @@ health = 20 maxHealth = 20 universal_understand = 1 + status_flags = CANPUSH + var/icon_living = "" var/icon_dead = "" var/icon_gib = null //We only try to show a gibbing animation if this exists. @@ -211,7 +213,7 @@ return if(isturf(src.loc)) - if(ismob(AM)) + if((status_flags & CANPUSH) && ismob(AM)) var/newamloc = src.loc src.loc = AM:loc AM:loc = newamloc @@ -528,4 +530,4 @@ var/obj/mecha/M = the_target if (M.occupant) return 0 - return 1 + return 1 diff --git a/icons/obj/statue.dmi b/icons/obj/statue.dmi index cfc1fbca9d35b025edb8a40f6f04bb5ec47001b6..46dec2a00330e76e47a139be8a4ebe10cc6dc2bb 100644 GIT binary patch delta 1235 zcmV;^1T6ci2Ac|hiBL{Q4GJ0x0000DNk~Le0001B0001B2m=5B0M$l^3IG5AU{Fj{ zMZmzoxxu*m?&i|azvAK8>gnN~z_NsZT=41P-Q3XU=H1}q+U)Gt&dj;z=Ge){w9n1F zyuPL4;nu*@$?E6c-Qn2Z;@PmvzxV9q_3Pu{;NbJ?R&e!m0s9I7h7muA9F1uf000BlNklm(%Tp5oce%yNeCfno95oW)&O8>zc~P$bJl=je`^n*-&=nJV1wNoqo3qE zuMR-@4|u5r@U9?$0RB<$4~{Pt@U)@!qzgy{-3AciHmdS7L6?sjfNf(W1VcUsc z8Es@}7-B>XR1@JM;AJ=>0n9aasDY{@I8UqmL$@(cpjCU_+@vw7-y5FXrA~!_zYke_ zkR(77o?oJj4h^JlMR0!*Ga!Nl@MvIO1Dv94X9SRu+E$hyArtt+X9<8}X`|5}xw}N@ zTF*m7I!$^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