Carmen Miranda's Ghost (#5697)

This commit is contained in:
LordFowl
2018-12-09 14:33:59 -05:00
committed by Werner
parent 498bb3d9d4
commit 0b1b663c28
5 changed files with 293 additions and 25 deletions
+185 -1
View File
@@ -34,9 +34,10 @@
return
/mob/living/simple_animal/shade/death()
. = ..()
visible_message("<span class='warning'>[src] lets out a contented sigh as their form unwinds.</span>")
new /obj/item/weapon/ectoplasm(loc)
. = ..()
qdel(src)
/mob/living/simple_animal/shade/attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
if(istype(O, /obj/item/device/soulstone))
@@ -52,3 +53,186 @@
/mob/living/simple_animal/shade/CanAvoidGravity()
return TRUE
/mob/living/simple_animal/shade/bluespace
name = "space echo"
real_name = "space echo"
desc = "A figment of the imagination, a bluespace anomaly, or proof of God? You decide."
icon = 'icons/obj/projectiles.dmi'
icon_state = "bluespace"
icon_living = "bluespace"
icon_dead = "bluespace"
maxHealth = 100
health = 100
universal_speak = 1
universal_understand = 1
speak_emote = list("echoes")
emote_hear = list("echoes","echoes")
response_help = "brushes against"
response_disarm = "brushes against"
response_harm = "brushes against"
attacktext = "brushes against"
melee_damage_lower = 0
melee_damage_upper = 0
status_flags = CANPUSH
heat_damage_per_tick = 0
cold_damage_per_tick = 0
unsuitable_atoms_damage = 0
incorporeal_move = 3
mob_size = 0
density = 0
speed = 1
var/last_message_heard
var/message_countdown = 300
var/heard_dying_message = 0
/mob/living/simple_animal/shade/bluespace/apply_damage()
return 0
/mob/living/simple_animal/shade/bluespace/adjustBruteLoss()
return 0
/mob/living/simple_animal/shade/bluespace/adjustFireLoss()
return 0
/mob/living/simple_animal/shade/bluespace/adjustToxLoss()
return 0
/mob/living/simple_animal/shade/bluespace/adjustOxyLoss()
return 0
/mob/living/simple_animal/shade/bluespace/adjustHalLoss()
return 0
/mob/living/simple_animal/shade/bluespace/attempt_grab()
return 0
/mob/living/simple_animal/shade/bluespace/ex_act()
return 0
/mob/living/simple_animal/shade/bluespace/crush_act()
return 0
/mob/living/simple_animal/shade/bluespace/Initialize()
. = ..()
set_light(2, 1, l_color = LIGHT_COLOR_CYAN)
/mob/living/simple_animal/shade/bluespace/Stat()
..()
if(statpanel("Status"))
stat(null, "Strength of Echoes: [message_countdown]")
/mob/living/simple_animal/shade/bluespace/updatehealth()
message_countdown = max(0, message_countdown - 1)
if(message_countdown <= 0)
adjustCloneLoss(1)
if(!heard_dying_message)
heard_dying_message = 1
to_chat(src, "<span class='danger'>You feel yourself begin to fade away!</span>")
..()
/mob/living/simple_animal/shade/bluespace/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
..()
if(speaker && speaker != src)
last_message_heard = message
message_countdown = min(300, message_countdown + 50)
health = min(maxHealth, health + 5)
if(heard_dying_message)
heard_dying_message = 0
to_chat(src, "<span class='notice'>The soothing echoes of life reinvigorate you.</span>")
/mob/living/simple_animal/shade/bluespace/say(var/message)
var/list/words_in_memory = dd_text2List(last_message_heard, " ")
var/list/words_in_message = dd_text2List(message, " ")
for(var/word1 in words_in_message)
var/valid = 0
for(var/word2 in words_in_memory)
if(lowertext(word1) != lowertext(word2))
continue
else
valid = 1
break
if(!valid)
message = replacetext(message, word1, pick(words_in_memory))
message = slur(message,rand(10, 20))
..()
/mob/living/simple_animal/shade/bluespace/verb/show_last_message()
set name = "Current Echo"
set category = "Bluespace Echo"
set desc = "Privately display the last message you heard."
to_chat(src, "<span class='notice'><b>[last_message_heard]</b></span>")
/mob/living/simple_animal/shade/bluespace/verb/flicker()
set name = "Flicker Lights"
set category = "Bluespace Echo"
set desc = "Oh, Nosferatu!"
visible_message("<span class ='notice'>\The [src] pulses.</span>")
for(var/obj/machinery/light/L in view(5, src))
L.flicker()
/mob/living/simple_animal/shade/bluespace/verb/move_item()
set category = "Bluespace Echo"
set name = "Warp Item"
set desc = "Teleport a small item to where you are."
if(message_countdown < 20)
to_chat(src, "<span class='warning'>You are too faded to warp an item through bluespace.</span>")
return
var/list/obj/item/choices = list()
for(var/obj/item/I in view(7, src))
if(I.w_class <= 2)
choices += I
if(!choices.len)
to_chat(src, "<span class='warning'>There are no suitable items nearby.</span>")
return
var/obj/item/choice = input(src, "What item would you like to warp?") as null|anything in choices
if(!choice || !(choice in view(7, src)) || choice.w_class > 2)
return
do_teleport(choice, get_turf(src))
visible_message("<span class ='notice'>\The [src] pulses.</span>")
message_countdown = max(0, message_countdown - 20)
/mob/living/simple_animal/shade/bluespace/verb/mass_warp()
set category = "Bluespace Echo"
set name = "Warp Vortex"
set desc = "Teleport items wildly."
if(message_countdown < 200)
to_chat(src, "<span class='warning'>You are too faded to warp an item through bluespace.</span>")
return
var/list/liable_turfs = list()
for(var/turf/T in view(4, src))
liable_turfs += T
if(liable_turfs.len)
visible_message("<span class ='danger'>\The [src] pulses violently!</span>")
for(var/atom/movable/M in view(7, src))
if(!M.anchored)
do_teleport(M, pick(liable_turfs))
message_countdown = max(0, message_countdown - 20)
/mob/living/simple_animal/shade/bluespace/verb/force_message()
set category = "Bluespace Echo"
set name = "Force Message"
set desc = "Force a coherent message of your own choosing."
if(message_countdown < 300)
to_chat(src, "<span class='warning'>You are too faded to force a message out.</span>")
return
var/message = input("Write out a message", "Forceful Message")
if(message)
visible_message("<span class ='danger'>\The [src] screeches, [message]!</span>")
message_countdown = max(0, message_countdown - 300)
+6
View File
@@ -398,6 +398,12 @@
anim(mobloc,mob,'icons/mob/mob.dmi',,"shadow",,mob.dir)
mob.forceMove(get_step(mob, direct))
mob.dir = direct
if(3)
move_delay = 1 + world.time
mob.forceMove(get_step(mob, direct))
mob.dir = direct
// Crossed is always a bit iffy
for(var/obj/S in mob.loc)
if(istype(S,/obj/effect/step_trigger) || istype(S,/obj/effect/beam))
+24 -7
View File
@@ -20,6 +20,7 @@
var/rotation = 0
var/angle = 45
var/power = 5
var/potency = 0
// Based on the power used
var/teleport_cooldown = 0 // every index requires a bluespace crystal
@@ -101,7 +102,7 @@
t += "<div class='statusDisplay'>"
for(var/i = 1; i <= power_options.len; i++)
if(crystals.len + telepad.efficiency < i)
if(crystals.len + telepad.efficiency - potency < i)
t += "<span class='linkOff'>[power_options[i]]</span>"
continue
if(power == power_options[i])
@@ -113,6 +114,9 @@
t += "<A href='?src=\ref[src];setz=1'>Set Sector</A>"
t += "<div class='statusDisplay'>[z_co ? z_co : "NULL"]</div>"
t += " <A href='?src=\ref[src];scalar=1'>Recalibrate Warp-Funnel</A>"
t += "<div class='statusDisplay'>[potency]</div>"
t += "<BR><A href='?src=\ref[src];send=1'>Send</A>"
t += " <A href='?src=\ref[src];receive=1'>Receive</A>"
t += "<BR><A href='?src=\ref[src];recal=1'>Recalibrate Crystals</A> <A href='?src=\ref[src];eject=1'>Eject Crystals</A>"
@@ -171,7 +175,7 @@
var/area/A = get_area(target)
flick("pad-beam", telepad)
if(spawn_time > 15) // 1.5 seconds
if(spawn_time > (15 * (potency + 1))) // 1.5 seconds
playsound(telepad.loc, 'sound/weapons/flash.ogg', 25, 1)
// Wait depending on the time the projectile took to get there
teleporting = 1
@@ -184,11 +188,11 @@
if(telepad.stat & NOPOWER)
return
teleporting = 0
teleport_cooldown = world.time + (power * 2)
teleport_cooldown = world.time + (power * 2 * (potency + 1))
teles_left -= 1
// use a lot of power
use_power(power * 10)
use_power(power * 10 * (potency + 1))
spark(telepad, 5, alldirs)
@@ -211,7 +215,7 @@
flick("pad-beam", telepad)
playsound(telepad.loc, 'sound/weapons/emitter2.ogg', 25, 1, extrarange = 3, falloff = 5)
for(var/atom/movable/ROI in source)
for(var/atom/movable/ROI in range(potency,source))
// if is anchored, don't let through
if(ROI.anchored)
if(isliving(ROI))
@@ -245,7 +249,10 @@
log_msg = dd_limittext(log_msg, length(log_msg) - 2)
log_msg += ")"
log_msg += ", "
do_teleport(ROI, dest)
var/x_offset = ROI.x - source.x
var/y_offset = ROI.y - source.y
do_teleport(ROI, locate(dest.x + x_offset, dest.y + y_offset, dest.z))
if (dd_hassuffix(log_msg, ", "))
log_msg = dd_limittext(log_msg, length(log_msg) - 2)
@@ -311,7 +318,7 @@
var/index = href_list["setpower"]
index = text2num(index)
if(index != null && power_options[index])
if(crystals.len + telepad.efficiency >= index)
if(crystals.len + telepad.efficiency - potency >= index)
power = power_options[index]
if(href_list["setz"])
@@ -340,6 +347,16 @@
sending = 0
teleport(usr)
if(href_list["scalar"])
if(potency < max(0, crystals.len - 2))
potency++
else
potency = 0
if(crystals.len + telepad.efficiency - potency <= 0)
power = power_options[1]
else if(power_options[crystals.len + telepad.efficiency - potency] < power)
power = power_options[crystals.len + telepad.efficiency - potency]
if(href_list["recal"])
recalibrate()
sparks()