diff --git a/code/modules/xenoarcheaology/effect.dm b/code/modules/xenoarcheaology/effect.dm
index e6bae0eaca..0a7ea84da6 100644
--- a/code/modules/xenoarcheaology/effect.dm
+++ b/code/modules/xenoarcheaology/effect.dm
@@ -9,180 +9,166 @@
var/chargelevelmax = 10
var/artifact_id = ""
var/effect_type = 0
-
var/req_type = /atom/movable
-
var/image/active_effect
var/effect_icon = 'icons/effects/effects.dmi'
var/effect_state = "sparkles"
var/effect_color = "#ffffff"
-
-// The last time the effect was toggled.
var/last_activation = 0
+
/datum/artifact_effect/Destroy()
- if(master)
+ if (master)
master = null
+ return ..()
+
+/datum/artifact_effect/New(datum/component/artifact_master/newmaster)
..()
+ master = newmaster
+ effect = rand(0, MAX_EFFECT)
+ trigger = rand(0, MAX_TRIGGER)
+ if (effect_icon && effect_state)
+ if (effect_state == "sparkles")
+ effect_state = "sparkles_[rand(1,4)]"
+ active_effect = image(effect_icon, effect_state)
+ active_effect.color = effect_color
+ artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
+ switch (pick(100;1, 50;2, 25;3))
+ if (1) //short range, short charge time
+ chargelevelmax = rand(3, 20)
+ effectrange = rand(1, 3)
+ if (2) //medium range, medium charge time
+ chargelevelmax = rand(15, 40)
+ effectrange = rand(5, 15)
+ if (3) //large range, long charge time
+ chargelevelmax = rand(20, 120)
+ effectrange = rand(20, 200)
-/datum/artifact_effect/proc/get_master_holder() // Return the effectmaster's holder, if it is set to an effectmaster. Otherwise, master is the target object.
- if(istype(master))
+
+/datum/artifact_effect/process()
+ if (chargelevel < chargelevelmax)
+ chargelevel++
+ if (activated)
+ if (effect == EFFECT_AURA)
+ DoEffectAura()
+ else if (effect == EFFECT_PULSE && chargelevel >= chargelevelmax)
+ chargelevel = 0
+ DoEffectPulse()
+
+
+/// Return the effectmaster's holder, if it is set to an effectmaster. Otherwise, master is the target object.
+/datum/artifact_effect/proc/get_master_holder()
+ if (istype(master))
return master.holder
else
return master
-/datum/artifact_effect/New(var/datum/component/artifact_master/newmaster)
- ..()
- master = newmaster
- effect = rand(0, MAX_EFFECT)
- trigger = rand(0, MAX_TRIGGER)
-
- if(effect_icon && effect_state)
- if(effect_state == "sparkles")
- effect_state = "sparkles_[rand(1,4)]"
- active_effect = image(effect_icon, effect_state)
- active_effect.color = effect_color
-
- //this will be replaced by the excavation code later, but it's here just in case
- artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]"
-
- //random charge time and distance
- switch(pick(100;1, 50;2, 25;3))
- if(1)
- //short range, short charge time
- chargelevelmax = rand(3, 20)
- effectrange = rand(1, 3)
- if(2)
- //medium range, medium charge time
- chargelevelmax = rand(15, 40)
- effectrange = rand(5, 15)
- if(3)
- //large range, long charge time
- chargelevelmax = rand(20, 120)
- effectrange = rand(20, 200)
-
-/datum/artifact_effect/proc/ToggleActivate(var/reveal_toggle = 1)
- //so that other stuff happens first
+/datum/artifact_effect/proc/ToggleActivate(reveal_toggle = TRUE)
set waitfor = FALSE
-
var/atom/target = get_master_holder()
-
- if(world.time - last_activation > 1 SECOND)
+ if (world.time - last_activation > 1 SECOND)
last_activation = world.time
- if(activated)
+ if (activated)
activated = 0
else
activated = 1
- if(reveal_toggle && target)
- if(!isliving(target))
+ if (reveal_toggle && target)
+ if (!isliving(target))
target.update_icon()
var/display_msg
- if(activated)
+ if (activated)
display_msg = pick("momentarily glows brightly!","distorts slightly for a moment!","flickers slightly!","vibrates!","shimmers slightly for a moment!")
else
display_msg = pick("grows dull!","fades in intensity!","suddenly becomes very still!","suddenly becomes very quiet!")
-
- if(active_effect)
- if(activated)
+ if (active_effect)
+ if (activated)
target.underlays.Add(active_effect)
else
target.underlays.Remove(active_effect)
-
var/atom/toplevelholder = target
- while(!istype(toplevelholder.loc, /turf))
+ while (!istype(toplevelholder.loc, /turf))
toplevelholder = toplevelholder.loc
toplevelholder.visible_message("[bicon(toplevelholder)] [toplevelholder] [display_msg]")
-/datum/artifact_effect/proc/DoEffectTouch(var/mob/user)
-/datum/artifact_effect/proc/DoEffectAura(var/atom/holder)
-/datum/artifact_effect/proc/DoEffectPulse(var/atom/holder)
+
+/datum/artifact_effect/proc/DoEffectTouch(mob/living/user)
+ return
+
+
+/datum/artifact_effect/proc/DoEffectAura()
+ return
+
+
+/datum/artifact_effect/proc/DoEffectPulse()
+ return
+
+
/datum/artifact_effect/proc/UpdateMove()
+ return
-/datum/artifact_effect/process()
- if(chargelevel < chargelevelmax)
- chargelevel++
-
- if(activated)
- if(effect == EFFECT_AURA)
- DoEffectAura()
- else if(effect == EFFECT_PULSE && chargelevel >= chargelevelmax)
- chargelevel = 0
- DoEffectPulse()
/datum/artifact_effect/proc/getDescription()
. = ""
- switch(effect_type)
- if(EFFECT_ENERGY)
+ switch (effect_type)
+ if (EFFECT_ENERGY)
. += "Concentrated energy emissions"
- if(EFFECT_PSIONIC)
+ if (EFFECT_PSIONIC)
. += "Intermittent psionic wavefront"
- if(EFFECT_ELECTRO)
+ if (EFFECT_ELECTRO)
. += "Electromagnetic energy"
- if(EFFECT_PARTICLE)
+ if (EFFECT_PARTICLE)
. += "High frequency particles"
- if(EFFECT_ORGANIC)
+ if (EFFECT_ORGANIC)
. += "Organically reactive exotic particles"
- if(EFFECT_BLUESPACE)
+ if (EFFECT_BLUESPACE)
. += "Interdimensional/bluespace? phasing"
- if(EFFECT_SYNTH)
+ if (EFFECT_SYNTH)
. += "Atomic synthesis"
else
. += "Low level energy emissions"
-
. += " have been detected "
-
- switch(effect)
- if(EFFECT_TOUCH)
+ switch (effect)
+ if (EFFECT_TOUCH)
. += "interspersed throughout substructure and shell."
- if(EFFECT_AURA)
+ if (EFFECT_AURA)
. += "emitting in an ambient energy field."
- if(EFFECT_PULSE)
+ if (EFFECT_PULSE)
. += "emitting in periodic bursts."
else
. += "emitting in an unknown way."
-
. += ""
-
- switch(trigger)
- if(TRIGGER_TOUCH, TRIGGER_WATER, TRIGGER_ACID, TRIGGER_VOLATILE, TRIGGER_TOXIN)
+ switch (trigger)
+ if (TRIGGER_TOUCH, TRIGGER_WATER, TRIGGER_ACID, TRIGGER_VOLATILE, TRIGGER_TOXIN)
. += " Activation index involves physical interaction with artifact surface."
- if(TRIGGER_FORCE, TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD)
+ if (TRIGGER_FORCE, TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD)
. += " Activation index involves energetic interaction with artifact surface."
- if(TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
+ if (TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
. += " Activation index involves precise local atmospheric conditions."
else
. += " Unable to determine any data about activation trigger."
-//returns 0..1, with 1 being no protection and 0 being fully protected
-/proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
- if(!istype(H))
+
+/// returns 0..1, with 1 being no protection and 0 being fully protected
+/proc/GetAnomalySusceptibility(mob/living/carbon/human/H)
+ if (!istype(H))
return 1
-
- var/protected = 0
-
- //anomaly suits give best protection, but excavation suits are almost as good
- if(istype(H.back,/obj/item/rig/hazmat))
+ var/susceptibility = 1
+ if (istype(H.back,/obj/item/rig/hazmat))
var/obj/item/rig/hazmat/rig = H.back
- if(rig.suit_is_deployed() && !rig.offline)
- protected += 1
-
- if(istype(H.wear_suit,/obj/item/clothing/suit/bio_suit/anomaly))
- protected += 0.6
- else if(istype(H.wear_suit,/obj/item/clothing/suit/space/anomaly))
- protected += 0.5
-
- if(istype(H.head,/obj/item/clothing/head/bio_hood/anomaly))
- protected += 0.3
- else if(istype(H.head,/obj/item/clothing/head/helmet/space/anomaly))
- protected += 0.2
-
- //latex gloves and science goggles also give a bit of bonus protection
- if(istype(H.gloves,/obj/item/clothing/gloves/sterile))
- protected += 0.1
-
- if(istype(H.glasses,/obj/item/clothing/glasses/science))
- protected += 0.1
-
- return 1 - protected
+ if (!rig.offline && rig.suit_is_deployed())
+ return 0
+ if (istype(H.wear_suit, /obj/item/clothing/suit/bio_suit/anomaly))
+ susceptibility -= 0.6
+ else if (istype(H.wear_suit, /obj/item/clothing/suit/space/anomaly))
+ susceptibility -= 0.5
+ if (istype(H.head, /obj/item/clothing/head/bio_hood/anomaly))
+ susceptibility -= 0.3
+ else if (istype(H.head, /obj/item/clothing/head/helmet/space/anomaly))
+ susceptibility -= 0.2
+ if (istype(H.gloves, /obj/item/clothing/gloves/sterile))
+ susceptibility -= 0.1
+ if (istype(H.glasses, /obj/item/clothing/glasses/science))
+ susceptibility -= 0.1
+ return clamp(susceptibility, 0, 1)
diff --git a/code/modules/xenoarcheaology/effects/animate_anomaly.dm b/code/modules/xenoarcheaology/effects/animate_anomaly.dm
index 91b1f15a0b..bded7252b6 100644
--- a/code/modules/xenoarcheaology/effects/animate_anomaly.dm
+++ b/code/modules/xenoarcheaology/effects/animate_anomaly.dm
@@ -1,59 +1,57 @@
-
/datum/artifact_effect/common/animate_anomaly
name = "animate anomaly"
effect_type = EFFECT_PSIONIC
- var/mob/living/target = null
-
effect_state = "pulsing"
effect_color = "#00c3ff"
+ var/mob/living/target
-/datum/artifact_effect/common/animate_anomaly/ToggleActivate(var/reveal_toggle = 1)
- ..()
- find_target()
/datum/artifact_effect/common/animate_anomaly/New()
..()
effectrange = max(3, effectrange)
-/datum/artifact_effect/common/animate_anomaly/proc/find_target()
- var/atom/masterholder = get_master_holder()
- if(!target || target.z != masterholder.z || get_dist(target, masterholder) > effectrange)
- var/mob/living/ClosestMob = null
- for(var/mob/living/L in range(effectrange, get_turf(masterholder)))
- if(!L.mind)
- continue
- if(!ClosestMob)
- ClosestMob = L
- continue
- if(!L.stat)
- if(get_dist(masterholder, L) < get_dist(masterholder, ClosestMob))
- ClosestMob = L
+/datum/artifact_effect/common/animate_anomaly/ToggleActivate(reveal_toggle = TRUE)
+ ..()
+ find_target()
- target = ClosestMob
-/datum/artifact_effect/common/animate_anomaly/DoEffectTouch(var/mob/living/user)
+/datum/artifact_effect/common/animate_anomaly/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
var/obj/O = holder
var/turf/T = get_step_away(O, user)
-
- if(target && istype(T) && istype(O.loc, /turf))
+ if (target && istype(T) && istype(O.loc, /turf))
O.Move(T)
O.visible_message("\The [holder] lurches away from [user]")
+
/datum/artifact_effect/common/animate_anomaly/DoEffectAura()
var/obj/O = get_master_holder()
find_target()
-
- if(!target || !istype(O))
+ if (!target || !istype(O))
return
-
O.dir = get_dir(O, target)
-
- if(istype(O.loc, /turf))
- if(get_dist(O.loc, target.loc) > 1)
+ if (istype(O.loc, /turf))
+ if (get_dist(O.loc, target.loc) > 1)
O.Move(get_step_to(O, target))
O.visible_message("\The [O] lurches toward [target]")
+
/datum/artifact_effect/common/animate_anomaly/DoEffectPulse()
DoEffectAura()
+
+
+/datum/artifact_effect/common/animate_anomaly/proc/find_target()
+ var/atom/masterholder = get_master_holder()
+ if (!target || target.z != masterholder.z || get_dist(target, masterholder) > effectrange)
+ var/mob/living/ClosestMob = null
+ for (var/mob/living/L in range(effectrange, get_turf(masterholder)))
+ if (!L.mind)
+ continue
+ if (!ClosestMob)
+ ClosestMob = L
+ continue
+ if (!L.stat)
+ if (get_dist(masterholder, L) < get_dist(masterholder, ClosestMob))
+ ClosestMob = L
+ target = ClosestMob
diff --git a/code/modules/xenoarcheaology/effects/badfeeling.dm b/code/modules/xenoarcheaology/effects/badfeeling.dm
index 5add22ea02..85a6e24db7 100644
--- a/code/modules/xenoarcheaology/effects/badfeeling.dm
+++ b/code/modules/xenoarcheaology/effects/badfeeling.dm
@@ -1,7 +1,10 @@
/datum/artifact_effect/common/badfeeling
name = "badfeeling"
effect_type = EFFECT_PSIONIC
- var/list/messages = list("You feel worried.",
+ effect_state = "summoning"
+ effect_color = "#643232"
+ var/list/messages = list(
+ "You feel worried.",
"Something doesn't feel right.",
"You get a strange feeling in your gut.",
"Your instincts are trying to warn you about something.",
@@ -16,59 +19,56 @@
"The light seems to flicker.",
"The shadows seem to lengthen.",
"The walls are getting closer.",
- "Something is wrong")
-
- var/list/drastic_messages = list("You've got to get out of here!",
+ "Something is wrong."
+ )
+ var/list/drastic_messages = list(
+ "You've got to get out of here!",
"Someone's trying to kill you!",
"There's something out there!",
"What's happening to you?",
"OH GOD!",
- "HELP ME!")
+ "HELP ME!"
+ )
- effect_state = "summoning"
- effect_color = "#643232"
-/datum/artifact_effect/common/badfeeling/DoEffectTouch(var/mob/user)
- if(user)
+/datum/artifact_effect/common/badfeeling/DoEffectTouch(mob/living/user)
+ if (user)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
- if(prob(50))
- if(prob(75))
+ if (prob(50))
+ if (prob(75))
to_chat(H, "[pick(drastic_messages)]")
else
to_chat(H, "[pick(messages)]")
-
- if(prob(50))
+ if (prob(50))
H.dizziness += rand(3,5)
+
/datum/artifact_effect/common/badfeeling/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
- if(prob(5))
- if(prob(75))
+ if (prob(5))
+ if (prob(75))
to_chat(H, "[pick(messages)]")
else
to_chat(H, "[pick(drastic_messages)]")
-
- if(prob(10))
+ if (prob(10))
H.dizziness += rand(3,5)
- return 1
+
/datum/artifact_effect/common/badfeeling/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
- if(prob(50))
- if(prob(95))
+ if (prob(50))
+ if (prob(95))
to_chat(H, "[pick(drastic_messages)]")
else
to_chat(H, "[pick(messages)]")
-
- if(prob(50))
+ if (prob(50))
H.dizziness += rand(3,5)
- else if(prob(25))
+ else if (prob(25))
H.dizziness += rand(5,15)
- return 1
diff --git a/code/modules/xenoarcheaology/effects/berserk.dm b/code/modules/xenoarcheaology/effects/berserk.dm
index 22017a5490..e20212c19c 100644
--- a/code/modules/xenoarcheaology/effects/berserk.dm
+++ b/code/modules/xenoarcheaology/effects/berserk.dm
@@ -1,48 +1,46 @@
/datum/artifact_effect/uncommon/berserk
name = "berserk"
effect_type = EFFECT_PSIONIC
-
effect_state = "summoning"
effect_color = "#5f0000"
-/datum/artifact_effect/uncommon/berserk/proc/apply_berserk(var/mob/living/L)
- if(!istype(L))
+
+/datum/artifact_effect/uncommon/berserk/DoEffectTouch(mob/living/user)
+ if (user && isliving(user))
+ apply_berserk(user)
+
+
+/datum/artifact_effect/uncommon/berserk/DoEffectAura()
+ var/atom/holder = get_master_holder()
+ if (holder)
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in range(src.effectrange,T))
+ if (prob(10))
+ apply_berserk(L)
+
+
+/datum/artifact_effect/uncommon/berserk/DoEffectPulse()
+ var/atom/holder = get_master_holder()
+ if (holder)
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in range(src.effectrange,T))
+ apply_berserk(L)
+
+
+/datum/artifact_effect/uncommon/berserk/proc/apply_berserk(mob/living/L)
+ if (!istype(L))
return FALSE
-
- if(!L.is_sentient())
+ if (!L.is_sentient())
return FALSE // Drons are presumably deaf to any psionic things.
-
- if(L.add_modifier(/datum/modifier/berserk, 30 SECONDS))
+ if (L.add_modifier(/datum/modifier/berserk, 30 SECONDS))
to_chat(L, "An otherworldly feeling seems to enter your mind, and it ignites your mind in fury!")
L.adjustBrainLoss(3) // Playing with berserking alien psychic artifacts isn't good for the mind.
to_chat(L, "The inside of your head hurts...")
return TRUE
else
- if(L.has_modifier_of_type(/datum/modifier/berserk)) // Already angry.
+ if (L.has_modifier_of_type(/datum/modifier/berserk)) // Already angry.
to_chat(L, "An otherworldly feeling seems to enter your mind again, and it fans your inner flame, extending your rage.")
else // Exhausted or something.
to_chat(L, "An otherworldly feeling seems to enter your mind, and you briefly feel an intense anger, but \
it quickly passes.")
return FALSE
-
-/datum/artifact_effect/uncommon/berserk/DoEffectTouch(var/mob/toucher)
- if(toucher && isliving(toucher))
- apply_berserk(toucher)
- return TRUE
-
-/datum/artifact_effect/uncommon/berserk/DoEffectAura()
- var/atom/holder = get_master_holder()
- if(holder)
- var/turf/T = get_turf(holder)
- for(var/mob/living/L in range(src.effectrange,T))
- if(prob(10))
- apply_berserk(L)
- return TRUE
-
-/datum/artifact_effect/uncommon/berserk/DoEffectPulse()
- var/atom/holder = get_master_holder()
- if(holder)
- var/turf/T = get_turf(holder)
- for(var/mob/living/L in range(src.effectrange,T))
- apply_berserk(L)
- return TRUE
\ No newline at end of file
diff --git a/code/modules/xenoarcheaology/effects/cannibal.dm b/code/modules/xenoarcheaology/effects/cannibal.dm
index 78d8160c50..2fac80ab94 100644
--- a/code/modules/xenoarcheaology/effects/cannibal.dm
+++ b/code/modules/xenoarcheaology/effects/cannibal.dm
@@ -1,7 +1,10 @@
/datum/artifact_effect/uncommon/cannibalfeeling
name = "cannibalfeeling"
effect_type = EFFECT_PSIONIC
- var/list/messages = list("You feel peckish.",
+ effect_state = "summoning"
+ effect_color = "#c50303"
+ var/list/messages = list(
+ "You feel peckish.",
"Something doesn't feel right.",
"You get a strange feeling in your gut.",
"You feel particularly hungry.",
@@ -16,65 +19,62 @@
"Are they clean?",
"You feel weak.",
"The ground is getting closer.",
- "Something is missing.")
-
- var/list/drastic_messages = list("They look delicious.",
+ "Something is missing."
+ )
+ var/list/drastic_messages = list(
+ "They look delicious.",
"They'll take what's yours!",
"They're full of meat.",
"What's happening to you?",
"Butcher them!",
- "Feast!")
+ "Feast!"
+ )
- effect_state = "summoning"
- effect_color = "#c50303"
-/datum/artifact_effect/uncommon/cannibalfeeling/DoEffectTouch(var/mob/user)
- if(user)
+/datum/artifact_effect/uncommon/cannibalfeeling/DoEffectTouch(mob/living/user)
+ if (user)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
- if(H.is_sentient())
- if(prob(50))
- if(prob(75))
+ if (H.is_sentient())
+ if (prob(50))
+ if (prob(75))
to_chat(H, "[pick(drastic_messages)]")
else
to_chat(H, "[pick(messages)]")
-
- if(prob(50))
+ if (prob(50))
H.dizziness += rand(3,5)
H.nutrition = H.nutrition / 1.5
+
/datum/artifact_effect/uncommon/cannibalfeeling/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
- if(H.is_sentient())
- if(prob(5))
- if(prob(75))
+ if (H.is_sentient())
+ if (prob(5))
+ if (prob(75))
to_chat(H, "[pick(messages)]")
else
to_chat(H, "[pick(drastic_messages)]")
-
- if(prob(10))
+ if (prob(10))
H.dizziness += rand(3,5)
H.nutrition = H.nutrition / 2
- return 1
+
/datum/artifact_effect/uncommon/cannibalfeeling/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
- if(H.is_sentient())
- if(prob(50))
- if(prob(95))
+ if (H.is_sentient())
+ if (prob(50))
+ if (prob(95))
to_chat(H, "[pick(drastic_messages)]")
else
to_chat(H, "[pick(messages)]")
-
- if(prob(50))
+ if (prob(50))
H.dizziness += rand(3,5)
- else if(prob(25))
+ else if (prob(25))
H.dizziness += rand(5,15)
H.nutrition = H.nutrition / 4
- return 1
diff --git a/code/modules/xenoarcheaology/effects/cellcharge.dm b/code/modules/xenoarcheaology/effects/cellcharge.dm
index 0a680e253b..a57485c06b 100644
--- a/code/modules/xenoarcheaology/effects/cellcharge.dm
+++ b/code/modules/xenoarcheaology/effects/cellcharge.dm
@@ -1,42 +1,50 @@
-//todo
/datum/artifact_effect/uncommon/cellcharge
name = "cell charge"
effect_type = EFFECT_ELECTRO
+ effect_color = "#ffee06"
var/last_message
- effect_color = "#ffee06"
-/datum/artifact_effect/uncommon/cellcharge/DoEffectTouch(var/mob/user)
- if(user)
- if(istype(user, /mob/living/silicon/robot))
+/datum/artifact_effect/uncommon/cellcharge/DoEffectTouch(mob/living/user)
+ if (user)
+ if (istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user
for (var/obj/item/cell/D in R.contents)
D.charge += rand() * 100 + 50
to_chat(R, "SYSTEM ALERT: Large energy boost detected!")
- return 1
+
/datum/artifact_effect/uncommon/cellcharge/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
- for (var/obj/machinery/power/apc/C in GLOB.apcs)
- if(get_dist(holder, C) <= 200)
- for (var/obj/item/cell/B in C.contents)
- B.charge += 25
- for (var/obj/machinery/power/smes/S in GLOB.smeses)
- if(get_dist(holder, S) <= src.effectrange)
- S.charge += 25
- for (var/mob/living/silicon/robot/M in global.silicon_mob_list)
- if(get_dist(holder, M) < 50)
- for (var/obj/item/cell/D in M.contents)
- D.charge += 25
- if(world.time - last_message > 200)
- to_chat(M, "SYSTEM ALERT: Energy boost detected!")
- last_message = world.time
- return 1
+ if (!holder)
+ return
+ var/turf/turf = get_turf(holder)
+ if (!turf)
+ return
+ for (var/obj/machinery/power/apc/apc as anything in GLOB.apcs)
+ if (get_dist(turf, apc) <= 200)
+ for (var/obj/item/cell/cell in apc.contents)
+ cell.charge += 25
+ for (var/obj/machinery/power/smes/smes as anything in GLOB.smeses)
+ if (get_dist(turf, smes) <= effectrange)
+ smes.charge += 25
+ var/charged_robots
+ for (var/mob/living/silicon/robot/robot as anything in global.silicon_mob_list)
+ if (get_dist(turf, robot) < 50)
+ var/charged_cells
+ for (var/obj/item/cell/cell in robot.contents)
+ cell.charge += 25
+ charged_cells = TRUE
+ if (charged_cells)
+ to_chat(robot, "SYSTEM ALERT: Energy boost detected!")
+ charged_robots = TRUE
+ if (charged_robots)
+ last_message = world.time
+
/datum/artifact_effect/uncommon/cellcharge/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/obj/machinery/power/apc/C in range(200, T))
for (var/obj/item/cell/B in C.contents)
@@ -46,7 +54,6 @@
for (var/mob/living/silicon/robot/M in range(100, T))
for (var/obj/item/cell/D in M.contents)
D.charge += rand() * 100
- if(world.time - last_message > 200)
+ if (world.time - last_message > 200)
to_chat(M, "SYSTEM ALERT: Energy boost detected!")
last_message = world.time
- return 1
diff --git a/code/modules/xenoarcheaology/effects/celldrain.dm b/code/modules/xenoarcheaology/effects/celldrain.dm
index bb9b416345..0af99f1c84 100644
--- a/code/modules/xenoarcheaology/effects/celldrain.dm
+++ b/code/modules/xenoarcheaology/effects/celldrain.dm
@@ -1,26 +1,23 @@
-//todo
/datum/artifact_effect/uncommon/celldrain
name = "cell drain"
effect_type = EFFECT_ELECTRO
- var/last_message
-
effect_state = "pulsing"
effect_color = "#fbff02"
+ var/last_message
-/datum/artifact_effect/uncommon/celldrain/DoEffectTouch(var/mob/user)
- if(user)
- if(istype(user, /mob/living/silicon/robot))
+
+/datum/artifact_effect/uncommon/celldrain/DoEffectTouch(mob/living/user)
+ if (user)
+ if (istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user
for (var/obj/item/cell/D in R.contents)
D.charge = max(D.charge - rand() * 100, 0)
to_chat(R, "SYSTEM ALERT: Energy drain detected!")
- return 1
- return 1
/datum/artifact_effect/uncommon/celldrain/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/obj/machinery/power/apc/C in range(200, T))
for (var/obj/item/cell/B in C.contents)
@@ -30,14 +27,14 @@
for (var/mob/living/silicon/robot/M in range(50, T))
for (var/obj/item/cell/D in M.contents)
D.charge = max(D.charge - 50,0)
- if(world.time - last_message > 200)
+ if (world.time - last_message > 200)
to_chat(M, "SYSTEM ALERT: Energy drain detected!")
last_message = world.time
- return 1
+
/datum/artifact_effect/uncommon/celldrain/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/obj/machinery/power/apc/C in range(200, T))
for (var/obj/item/cell/B in C.contents)
@@ -47,7 +44,6 @@
for (var/mob/living/silicon/robot/M in range(100, T))
for (var/obj/item/cell/D in M.contents)
D.charge = max(D.charge - rand() * 150,0)
- if(world.time - last_message > 200)
+ if (world.time - last_message > 200)
to_chat(M, "SYSTEM ALERT: Energy drain detected!")
last_message = world.time
- return 1
diff --git a/code/modules/xenoarcheaology/effects/cold.dm b/code/modules/xenoarcheaology/effects/cold.dm
index 0eca9d7a37..9ab67169a8 100644
--- a/code/modules/xenoarcheaology/effects/cold.dm
+++ b/code/modules/xenoarcheaology/effects/cold.dm
@@ -1,9 +1,8 @@
-//inverse of /datum/artifact_effect/heat, the two effects split up for neatness' sake
/datum/artifact_effect/common/cold
name = "cold"
+ effect_color = "#b3f6ff"
var/target_temp
- effect_color = "#b3f6ff"
/datum/artifact_effect/common/cold/New()
..()
@@ -11,17 +10,19 @@
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_ORGANIC, EFFECT_BLUESPACE, EFFECT_SYNTH)
-/datum/artifact_effect/common/cold/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/common/cold/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
to_chat(user, "A chill passes up your spine!")
var/datum/gas_mixture/env = holder.loc.return_air()
- if(env)
+ if (env)
env.temperature = max(env.temperature - rand(5,50), 0)
+
/datum/artifact_effect/common/cold/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/datum/gas_mixture/env = holder.loc.return_air()
- if(env && env.temperature > target_temp)
+ if (env && env.temperature > target_temp)
env.temperature -= pick(0, 0, 1)
diff --git a/code/modules/xenoarcheaology/effects/electric_field.dm b/code/modules/xenoarcheaology/effects/electric_field.dm
index a9d5b8743c..d883e76615 100644
--- a/code/modules/xenoarcheaology/effects/electric_field.dm
+++ b/code/modules/xenoarcheaology/effects/electric_field.dm
@@ -1,72 +1,64 @@
-
/datum/artifact_effect/uncommon/electric_field
name = "electric field"
effect_type = EFFECT_ENERGY
-
effect_color = "#ffff00"
-/datum/artifact_effect/uncommon/electric_field/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/uncommon/electric_field/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
var/list/nearby_mobs = list()
- for(var/mob/living/L in oview(effectrange, get_turf(holder)))
- if(L == user) // You're "grounded" when you contact the artifact.
+ for (var/mob/living/L in oview(effectrange, get_turf(holder)))
+ if (L == user) // You're "grounded" when you contact the artifact.
continue
- if(!L.stat)
+ if (!L.stat)
nearby_mobs |= L
-
- for(var/obj/machinery/light/light in range(effectrange, get_turf(holder)))
+ for (var/obj/machinery/light/light in range(effectrange, get_turf(holder)))
light.flicker()
-
- for(var/mob/living/L in nearby_mobs)
- if(L.isSynthetic())
+ for (var/mob/living/L in nearby_mobs)
+ if (L.isSynthetic())
to_chat(L, "ERROR: Electrical fault detected!")
L.stuttering += 3
-
- if(ishuman(L))
+ if (ishuman(L))
var/mob/living/carbon/human/H = L
var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO))
H.electrocute_act(rand(25, 40), holder, H.get_siemens_coefficient_organ(affected), affected)
else
L.electrocute_act(rand(25, 40), holder, 0.75, BP_TORSO)
+
/datum/artifact_effect/uncommon/electric_field/DoEffectAura()
var/atom/holder = get_master_holder()
var/list/nearby_mobs = list()
- for(var/mob/living/L in oview(effectrange, get_turf(holder)))
- if(!L.stat)
+ for (var/mob/living/L in oview(effectrange, get_turf(holder)))
+ if (!L.stat)
nearby_mobs |= L
-
- for(var/obj/machinery/light/light in range(effectrange, get_turf(holder)))
+ for (var/obj/machinery/light/light in range(effectrange, get_turf(holder)))
light.flicker()
-
- for(var/mob/living/L in nearby_mobs)
- if(L.isSynthetic())
+ for (var/mob/living/L in nearby_mobs)
+ if (L.isSynthetic())
to_chat(L, "ERROR: Electrical fault detected!")
L.stuttering += 3
-
- if(ishuman(L))
+ if (ishuman(L))
var/mob/living/carbon/human/H = L
var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO))
H.electrocute_act(rand(1, 10), holder, H.get_siemens_coefficient_organ(affected), affected)
else
L.electrocute_act(rand(1, 10), holder, 0.75, BP_TORSO)
+
/datum/artifact_effect/uncommon/electric_field/DoEffectPulse()
var/atom/holder = get_master_holder()
var/list/nearby_mobs = list()
- for(var/mob/living/L in oview(effectrange, get_turf(holder)))
- if(!L.stat)
+ for (var/mob/living/L in oview(effectrange, get_turf(holder)))
+ if (!L.stat)
nearby_mobs |= L
-
- for(var/obj/machinery/light/light in range(effectrange, get_turf(holder)))
+ for (var/obj/machinery/light/light in range(effectrange, get_turf(holder)))
light.flicker()
-
- for(var/mob/living/L in nearby_mobs)
- if(L.isSynthetic())
+ for (var/mob/living/L in nearby_mobs)
+ if (L.isSynthetic())
to_chat(L, "ERROR: Electrical fault detected!")
L.stuttering += 3
-
- if(ishuman(L))
+ if (ishuman(L))
var/mob/living/carbon/human/H = L
var/obj/item/organ/external/affected = H.get_organ(check_zone(BP_TORSO))
H.electrocute_act(rand(10, 30), holder, H.get_siemens_coefficient_organ(affected), affected)
diff --git a/code/modules/xenoarcheaology/effects/emp.dm b/code/modules/xenoarcheaology/effects/emp.dm
index 8500f948e6..569ba6e9eb 100644
--- a/code/modules/xenoarcheaology/effects/emp.dm
+++ b/code/modules/xenoarcheaology/effects/emp.dm
@@ -1,16 +1,16 @@
/datum/artifact_effect/rare/emp
name = "emp"
effect_type = EFFECT_ELECTRO
-
effect_state = "empdisable"
+
/datum/artifact_effect/rare/emp/New()
..()
effect = EFFECT_PULSE
+
/datum/artifact_effect/rare/emp/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
empulse(T, effectrange/4, effectrange/3, effectrange/2, effectrange)
- return 1
diff --git a/code/modules/xenoarcheaology/effects/feysight.dm b/code/modules/xenoarcheaology/effects/feysight.dm
index 1d10ea338d..a1f9e83639 100644
--- a/code/modules/xenoarcheaology/effects/feysight.dm
+++ b/code/modules/xenoarcheaology/effects/feysight.dm
@@ -1,48 +1,46 @@
/datum/artifact_effect/rare/feysight
name = "feysight"
effect_type = EFFECT_PSIONIC
-
effect_state = "pulsing"
effect_color = "#00c763"
-/datum/artifact_effect/rare/feysight/proc/apply_modifier(var/mob/living/L)
- if(!istype(L))
- return FALSE
- if(!L.is_sentient())
- return FALSE // Drons are presumably deaf to any psionic things.
+/datum/artifact_effect/rare/feysight/DoEffectTouch(mob/living/user)
+ if (user && isliving(user))
+ apply_modifier(user)
- if(L.add_modifier(/datum/modifier/feysight, 30 SECONDS))
+
+/datum/artifact_effect/rare/feysight/DoEffectAura()
+ var/atom/holder = get_master_holder()
+ if (holder)
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in range(src.effectrange,T))
+ if (prob(10))
+ apply_modifier(L)
+
+
+/datum/artifact_effect/rare/feysight/DoEffectPulse()
+ var/atom/holder = get_master_holder()
+ if (holder)
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in range(src.effectrange,T))
+ apply_modifier(L)
+
+
+/datum/artifact_effect/rare/feysight/proc/apply_modifier(mob/living/L)
+ if (!istype(L))
+ return
+ if (!L.is_sentient())
+ return
+ if (L.add_modifier(/datum/modifier/feysight, 30 SECONDS))
to_chat(L, "An otherworldly feeling seems to enter your mind, and you feel at peace.")
L.adjustHalLoss(10)
to_chat(L, "The inside of your head hurts...")
- return TRUE
+ return
else
- if(L.has_modifier_of_type(/datum/modifier/feysight))
+ if (L.has_modifier_of_type(/datum/modifier/feysight))
to_chat(L, "An otherworldly feeling seems to enter your mind again, and it holds the visions in place.")
else
to_chat(L, "An otherworldly feeling seems to enter your mind, and you briefly feel peace, but \
it quickly passes.")
- return FALSE
-
-/datum/artifact_effect/rare/feysight/DoEffectTouch(var/mob/toucher)
- if(toucher && isliving(toucher))
- apply_modifier(toucher)
- return TRUE
-
-/datum/artifact_effect/rare/feysight/DoEffectAura()
- var/atom/holder = get_master_holder()
- if(holder)
- var/turf/T = get_turf(holder)
- for(var/mob/living/L in range(src.effectrange,T))
- if(prob(10))
- apply_modifier(L)
- return TRUE
-
-/datum/artifact_effect/rare/feysight/DoEffectPulse()
- var/atom/holder = get_master_holder()
- if(holder)
- var/turf/T = get_turf(holder)
- for(var/mob/living/L in range(src.effectrange,T))
- apply_modifier(L)
- return TRUE
\ No newline at end of file
+ return
diff --git a/code/modules/xenoarcheaology/effects/forcefield.dm b/code/modules/xenoarcheaology/effects/forcefield.dm
index 2fd9619e21..1edf02bde0 100644
--- a/code/modules/xenoarcheaology/effects/forcefield.dm
+++ b/code/modules/xenoarcheaology/effects/forcefield.dm
@@ -1,25 +1,26 @@
/datum/artifact_effect/uncommon/forcefield
name = "force field"
- var/list/created_field = list()
effect_type = EFFECT_PARTICLE
-
effect_state = "shield-old"
effect_color = "#00b7ff"
+ var/list/created_field = list()
+
/datum/artifact_effect/uncommon/forcefield/New()
..()
trigger = TRIGGER_TOUCH
+
/datum/artifact_effect/uncommon/forcefield/ToggleActivate()
var/atom/holder = get_master_holder()
..()
- if(created_field.len)
- for(var/obj/effect/energy_field/F in created_field)
+ if (created_field.len)
+ for (var/obj/effect/energy_field/F in created_field)
created_field.Remove(F)
qdel(F)
- else if(holder)
+ else if (holder)
var/turf/T = get_turf(holder)
- while(created_field.len < 16)
+ while (created_field.len < 16)
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T.z))
created_field.Add(E)
E.strength = 1
@@ -30,26 +31,26 @@
UpdateMove()
return 1
+
/datum/artifact_effect/uncommon/forcefield/process()
..()
- for(var/obj/effect/energy_field/E in created_field)
- if(E.strength < 1)
+ for (var/obj/effect/energy_field/E in created_field)
+ if (E.strength < 1)
E.adjust_strength(0.15, 0)
- else if(E.strength < 5)
+ else if (E.strength < 5)
E.adjust_strength(0.25, 0)
+
/datum/artifact_effect/uncommon/forcefield/UpdateMove()
var/atom/holder = get_master_holder()
- if(created_field.len && holder)
+ if (created_field.len && holder)
var/turf/T = get_turf(holder)
- while(created_field.len < 16)
- //for now, just instantly respawn the fields when they get destroyed
+ while (created_field.len < 16)
var/obj/effect/energy_field/E = new (locate(T.x,T.y,T))
created_field.Add(E)
E.anchored = 1
E.density = 1
E.invisibility = 0
-
var/obj/effect/energy_field/E = created_field[1]
E.loc = locate(T.x + 2,T.y + 2,T.z)
E = created_field[2]
diff --git a/code/modules/xenoarcheaology/effects/gaia.dm b/code/modules/xenoarcheaology/effects/gaia.dm
index ac95a798ab..70fa4ff063 100644
--- a/code/modules/xenoarcheaology/effects/gaia.dm
+++ b/code/modules/xenoarcheaology/effects/gaia.dm
@@ -1,86 +1,73 @@
/datum/artifact_effect/uncommon/gaia
name = "gaia"
effect_type = EFFECT_ORGANIC
-
+ effect_color = "#8cd448"
var/list/my_glitterflies = list()
- effect_color = "#8cd448"
-/datum/artifact_effect/uncommon/gaia/proc/age_plantlife(var/obj/machinery/portable_atmospherics/hydroponics/Tray = null)
- if(istype(Tray) && Tray.seed)
- Tray.health += rand(1,3) * HYDRO_SPEED_MULTIPLIER
- Tray.age += 1
-
- if(Tray.health > 0 && Tray.dead)
- Tray.dead = FALSE
-
- Tray.check_health()
-
- if(!Tray.dead)
- if((Tray.age > Tray.seed.get_trait(TRAIT_MATURATION)) && \
- ((Tray.age - Tray.lastproduce) > Tray.seed.get_trait(TRAIT_PRODUCTION)) && \
- (!Tray.harvest && !Tray.dead))
- Tray.harvest = 1
- Tray.lastproduce = Tray.age
-
- else if(istype(Tray, /obj/effect/plant))
- var/obj/effect/plant/P = Tray
- Tray = P.plant
- if(Tray)
- age_plantlife(Tray)
- P.update_icon()
-
-/datum/artifact_effect/uncommon/gaia/DoEffectTouch(var/mob/user)
+/datum/artifact_effect/uncommon/gaia/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
to_chat(user, "You feel the presence of something long forgotten.")
- for(var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(world.view,get_turf(holder)))
+ for (var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(world.view,get_turf(holder)))
age_plantlife(Tray)
- if(prob(30))
+ if (prob(30))
var/mob/living/simple_mob/animal/sif/glitterfly/G = new(get_turf(Tray))
-
my_glitterflies |= G
-
G.ai_holder.returns_home = TRUE
-
- for(var/obj/effect/plant/P in view(world.view,get_turf(holder)))
+ for (var/obj/effect/plant/P in view(world.view,get_turf(holder)))
age_plantlife(P)
+
/datum/artifact_effect/uncommon/gaia/DoEffectAura()
var/atom/holder = get_master_holder()
- for(var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(effectrange,holder))
+ for (var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(effectrange,holder))
age_plantlife(Tray)
- if(prob(2))
+ if (prob(2))
var/mob/living/simple_mob/animal/sif/glitterfly/G = new(get_turf(Tray))
-
my_glitterflies |= G
-
G.ai_holder.returns_home = TRUE
-
- for(var/obj/effect/plant/P in view(effectrange,get_turf(holder)))
+ for (var/obj/effect/plant/P in view(effectrange,get_turf(holder)))
age_plantlife(P)
+
/datum/artifact_effect/uncommon/gaia/DoEffectPulse()
var/atom/holder = get_master_holder()
- for(var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(effectrange,holder))
+ for (var/obj/machinery/portable_atmospherics/hydroponics/Tray in view(effectrange,holder))
age_plantlife(Tray)
- if(prob(10))
+ if (prob(10))
var/mob/living/simple_mob/animal/sif/glitterfly/G = new(get_turf(Tray))
-
my_glitterflies |= G
-
G.ai_holder.returns_home = TRUE
-
- for(var/obj/effect/plant/P in view(effectrange,get_turf(holder)))
+ for (var/obj/effect/plant/P in view(effectrange,get_turf(holder)))
age_plantlife(P)
+
/datum/artifact_effect/uncommon/gaia/process()
var/atom/holder = get_master_holder()
..()
-
listclearnulls(my_glitterflies)
-
- for(var/mob/living/L in my_glitterflies)
- if(L.stat == DEAD)
+ for (var/mob/living/L in my_glitterflies)
+ if (L.stat == DEAD)
my_glitterflies -= L
-
L.ai_holder.home_turf = get_turf(holder)
+
+
+/datum/artifact_effect/uncommon/gaia/proc/age_plantlife(obj/machinery/portable_atmospherics/hydroponics/Tray)
+ if (istype(Tray) && Tray.seed)
+ Tray.health += rand(1,3) * HYDRO_SPEED_MULTIPLIER
+ Tray.age += 1
+ if (Tray.health > 0 && Tray.dead)
+ Tray.dead = FALSE
+ Tray.check_health()
+ if (!Tray.dead)
+ if ((Tray.age > Tray.seed.get_trait(TRAIT_MATURATION)) && \
+ ((Tray.age - Tray.lastproduce) > Tray.seed.get_trait(TRAIT_PRODUCTION)) && \
+ (!Tray.harvest && !Tray.dead))
+ Tray.harvest = 1
+ Tray.lastproduce = Tray.age
+ else if (istype(Tray, /obj/effect/plant))
+ var/obj/effect/plant/P = Tray
+ Tray = P.plant
+ if (Tray)
+ age_plantlife(Tray)
+ P.update_icon()
diff --git a/code/modules/xenoarcheaology/effects/gasco2.dm b/code/modules/xenoarcheaology/effects/gasco2.dm
index 26ba40cc8a..f0ca1f2875 100644
--- a/code/modules/xenoarcheaology/effects/gasco2.dm
+++ b/code/modules/xenoarcheaology/effects/gasco2.dm
@@ -1,23 +1,25 @@
/datum/artifact_effect/common/gasco2
name = "CO2 creation"
-
effect_color = "#a5a5a5"
+
/datum/artifact_effect/common/gasco2/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
-/datum/artifact_effect/common/gasco2/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/common/gasco2/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("carbon_dioxide", rand(2, 15))
+
/datum/artifact_effect/common/gasco2/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("carbon_dioxide", pick(0, 0, 0.1, rand()))
diff --git a/code/modules/xenoarcheaology/effects/gasnitro.dm b/code/modules/xenoarcheaology/effects/gasnitro.dm
index 4ab1b47447..d01da5b50c 100644
--- a/code/modules/xenoarcheaology/effects/gasnitro.dm
+++ b/code/modules/xenoarcheaology/effects/gasnitro.dm
@@ -1,23 +1,25 @@
/datum/artifact_effect/common/gasnitro
name = "N2 creation"
-
effect_color = "#c2d3d8"
+
/datum/artifact_effect/common/gasnitro/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
-/datum/artifact_effect/common/gasnitro/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/common/gasnitro/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("nitrogen", rand(2, 15))
+
/datum/artifact_effect/common/gasnitro/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("nitrogen", pick(0, 0, 0.1, rand()))
diff --git a/code/modules/xenoarcheaology/effects/gasoxy.dm b/code/modules/xenoarcheaology/effects/gasoxy.dm
index f6db01267c..ed3b9b748f 100644
--- a/code/modules/xenoarcheaology/effects/gasoxy.dm
+++ b/code/modules/xenoarcheaology/effects/gasoxy.dm
@@ -1,21 +1,24 @@
/datum/artifact_effect/common/gasoxy
name = "O2 creation"
+
/datum/artifact_effect/common/gasoxy/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
-/datum/artifact_effect/common/gasoxy/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/common/gasoxy/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("oxygen", rand(2, 15))
+
/datum/artifact_effect/common/gasoxy/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("oxygen", pick(0, 0, 0.1, rand()))
diff --git a/code/modules/xenoarcheaology/effects/gasphoron.dm b/code/modules/xenoarcheaology/effects/gasphoron.dm
index 03543c2f44..002c35bcd0 100644
--- a/code/modules/xenoarcheaology/effects/gasphoron.dm
+++ b/code/modules/xenoarcheaology/effects/gasphoron.dm
@@ -1,23 +1,25 @@
/datum/artifact_effect/uncommon/gasphoron
name = "phoron creation"
-
effect_color = "#c408ba"
+
/datum/artifact_effect/uncommon/gasphoron/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
-/datum/artifact_effect/uncommon/gasphoron/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/uncommon/gasphoron/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("phoron", rand(2, 15))
+
/datum/artifact_effect/uncommon/gasphoron/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("phoron", pick(0, 0, 0.1, rand()))
diff --git a/code/modules/xenoarcheaology/effects/gassleeping.dm b/code/modules/xenoarcheaology/effects/gassleeping.dm
index 65086e9477..b7fffad1bf 100644
--- a/code/modules/xenoarcheaology/effects/gassleeping.dm
+++ b/code/modules/xenoarcheaology/effects/gassleeping.dm
@@ -1,21 +1,24 @@
/datum/artifact_effect/rare/gassleeping
name = "N2O creation"
+
/datum/artifact_effect/gassleeping/New()
..()
effect = pick(EFFECT_TOUCH, EFFECT_AURA)
effect_type = pick(EFFECT_BLUESPACE, EFFECT_SYNTH)
-/datum/artifact_effect/rare/gassleeping/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/rare/gassleeping/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("nitrous_oxide", rand(2, 15))
+
/datum/artifact_effect/rare/gassleeping/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/holder_loc = holder.loc
- if(istype(holder_loc))
+ if (istype(holder_loc))
holder_loc.assume_gas("nitrous_oxide", pick(0, 0, 0.1, rand()))
diff --git a/code/modules/xenoarcheaology/effects/goodfeeling.dm b/code/modules/xenoarcheaology/effects/goodfeeling.dm
index 37c9d655ae..83d323e763 100644
--- a/code/modules/xenoarcheaology/effects/goodfeeling.dm
+++ b/code/modules/xenoarcheaology/effects/goodfeeling.dm
@@ -1,7 +1,10 @@
/datum/artifact_effect/common/goodfeeling
name = "good feeling"
effect_type = EFFECT_PSIONIC
- var/list/messages = list("You feel good.",
+ effect_state = "summoning"
+ effect_color = "#009118"
+ var/list/messages = list(
+ "You feel good.",
"Everything seems to be going alright",
"You've got a good feeling about this",
"Your instincts tell you everything is going to be getting better.",
@@ -14,59 +17,56 @@
"Your scalp prickles.",
"All the colours seem a bit more vibrant.",
"Everything seems a little lighter.",
- "The troubles of the world seem to fade away.")
-
- var/list/drastic_messages = list("You want to hug everyone you meet!",
+ "The troubles of the world seem to fade away."
+ )
+ var/list/drastic_messages = list(
+ "You want to hug everyone you meet!",
"Everything is going so well!",
"You feel euphoric.",
"You feel giddy.",
"You're so happy suddenly, you almost want to dance and sing.",
- "You feel like the world is out to help you.")
+ "You feel like the world is out to help you."
+ )
- effect_state = "summoning"
- effect_color = "#009118"
-/datum/artifact_effect/common/goodfeeling/DoEffectTouch(var/mob/user)
- if(user)
+/datum/artifact_effect/common/goodfeeling/DoEffectTouch(mob/living/user)
+ if (user)
if (istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
- if(prob(50))
- if(prob(75))
+ if (prob(50))
+ if (prob(75))
to_chat(H, "[pick(drastic_messages)]")
else
to_chat(H, "[pick(messages)]")
-
- if(prob(50))
+ if (prob(50))
H.dizziness += rand(3,5)
+
/datum/artifact_effect/common/goodfeeling/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
- if(prob(5))
- if(prob(75))
+ if (prob(5))
+ if (prob(75))
to_chat(H, "[pick(messages)]")
else
to_chat(H, "[pick(drastic_messages)]")
-
- if(prob(5))
+ if (prob(5))
H.dizziness += rand(3,5)
- return 1
+
/datum/artifact_effect/common/goodfeeling/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
- if(prob(50))
- if(prob(95))
+ if (prob(50))
+ if (prob(95))
to_chat(H, "[pick(drastic_messages)]")
else
to_chat(H, "[pick(messages)]")
-
- if(prob(50))
+ if (prob(50))
H.dizziness += rand(3,5)
- else if(prob(25))
+ else if (prob(25))
H.dizziness += rand(5,15)
- return 1
diff --git a/code/modules/xenoarcheaology/effects/gravitational_waves.dm b/code/modules/xenoarcheaology/effects/gravitational_waves.dm
index c22eb87167..8f8b301a25 100644
--- a/code/modules/xenoarcheaology/effects/gravitational_waves.dm
+++ b/code/modules/xenoarcheaology/effects/gravitational_waves.dm
@@ -1,42 +1,44 @@
/datum/artifact_effect/extreme/gravity_wave
name = "gravity wave"
effect_type = EFFECT_ENERGY
-
+ effect_state = "gravisphere"
+ effect_color = "#d8c3ff"
var/last_wave_pull = 0
var/pull_power
- effect_state = "gravisphere"
- effect_color = "#d8c3ff"
/datum/artifact_effect/extreme/gravity_wave/New()
..()
effect_type = pick(EFFECT_ENERGY, EFFECT_BLUESPACE, EFFECT_PSIONIC)
- switch(pick(100;1, 50;2, 25;3))
- if(1) //short range
+ switch (pick(100;1, 50;2, 25;3))
+ if (1) //short range
effectrange = rand(2, 4)
- if(2) //medium range
+ if (2) //medium range
effectrange = rand(5, 9)
- if(3) //large range
+ if (3) //large range
effectrange = rand(9, 14)
pull_power = rand(STAGE_ONE, STAGE_FOUR)
-/datum/artifact_effect/extreme/gravity_wave/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/extreme/gravity_wave/DoEffectTouch(mob/living/user)
gravwave(user, effectrange, pull_power)
+
/datum/artifact_effect/extreme/gravity_wave/DoEffectAura()
var/atom/holder = get_master_holder()
var/seconds_since_last_pull = max(0, round((last_wave_pull - world.time) / 10))
-
- if(prob(10 + seconds_since_last_pull))
+ if (prob(10 + seconds_since_last_pull))
holder.visible_message("\The [holder] distorts as local gravity intensifies, and shifts toward it.")
last_wave_pull = world.time
gravwave(get_turf(holder), effectrange, pull_power)
+
/datum/artifact_effect/extreme/gravity_wave/DoEffectPulse()
var/atom/holder = get_master_holder()
holder.visible_message("\The [holder] distorts as local gravity intensifies, and shifts toward it.")
gravwave(get_turf(holder), effectrange, pull_power)
-/datum/artifact_effect/extreme/gravity_wave/proc/gravwave(var/atom/target, var/pull_range = 7, var/pull_power = STAGE_TWO)
- for(var/atom/A in oview(pull_range, target))
+
+/datum/artifact_effect/extreme/gravity_wave/proc/gravwave(atom/target, pull_range = 7, pull_power = STAGE_TWO)
+ for (var/atom/A as anything in oview(pull_range, target))
A.singularity_pull(target, pull_power)
diff --git a/code/modules/xenoarcheaology/effects/heal.dm b/code/modules/xenoarcheaology/effects/heal.dm
index 4fe20ae817..bf5378c5c2 100644
--- a/code/modules/xenoarcheaology/effects/heal.dm
+++ b/code/modules/xenoarcheaology/effects/heal.dm
@@ -3,20 +3,18 @@
effect_type = EFFECT_ORGANIC
effect_color = "#4649ff"
-/datum/artifact_effect/uncommon/heal/DoEffectTouch(var/mob/toucher)
- //todo: check over this properly
- if(toucher && iscarbon(toucher))
- var/weakness = GetAnomalySusceptibility(toucher)
- if(prob(weakness * 100))
- var/mob/living/carbon/C = toucher
- to_chat(C, "You feel a soothing energy invigorate you.")
- if(ishuman(toucher))
- var/mob/living/carbon/human/H = toucher
- for(var/obj/item/organ/external/affecting in H.organs)
- if(affecting && istype(affecting))
+/datum/artifact_effect/uncommon/heal/DoEffectTouch(mob/living/user)
+ if (user && iscarbon(user))
+ var/weakness = GetAnomalySusceptibility(user)
+ if (prob(weakness * 100))
+ var/mob/living/carbon/C = user
+ to_chat(C, "You feel a soothing energy invigorate you.")
+ if (ishuman(user))
+ var/mob/living/carbon/human/H = user
+ for (var/obj/item/organ/external/affecting in H.organs)
+ if (affecting && istype(affecting))
affecting.heal_damage(25 * weakness, 25 * weakness)
- //H:heal_organ_damage(25, 25)
H.vessel.add_reagent("blood",5)
H.adjust_nutrition(50 * weakness)
H.adjustBrainLoss(-25 * weakness)
@@ -24,24 +22,21 @@
H.bodytemperature = initial(H.bodytemperature)
spawn(1)
H.fixblood()
- //
C.adjustOxyLoss(-25 * weakness)
C.adjustToxLoss(-25 * weakness)
C.adjustBruteLoss(-25 * weakness)
C.adjustFireLoss(-25 * weakness)
- //
C.regenerate_icons()
- return 1
+
/datum/artifact_effect/uncommon/heal/DoEffectAura()
var/atom/holder = get_master_holder()
- //todo: check over this properly
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(C)
- if(prob(weakness * 100))
- if(prob(10))
+ if (prob(weakness * 100))
+ if (prob(10))
to_chat(C, "You feel a soothing energy radiating from something nearby.")
C.adjustBruteLoss(-1 * weakness)
C.adjustFireLoss(-1 * weakness)
@@ -50,14 +45,14 @@
C.adjustBrainLoss(-1 * weakness)
C.updatehealth()
+
/datum/artifact_effect/uncommon/heal/DoEffectPulse()
var/atom/holder = get_master_holder()
- //todo: check over this properly
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(C)
- if(prob(weakness * 100))
+ if (prob(weakness * 100))
to_chat(C, "A wave of energy invigorates you.")
C.adjustBruteLoss(-5 * weakness)
C.adjustFireLoss(-5 * weakness)
diff --git a/code/modules/xenoarcheaology/effects/heat.dm b/code/modules/xenoarcheaology/effects/heat.dm
index 4d849e9d50..30d1d06faa 100644
--- a/code/modules/xenoarcheaology/effects/heat.dm
+++ b/code/modules/xenoarcheaology/effects/heat.dm
@@ -1,8 +1,7 @@
-//inverse of /datum/artifact_effect/cold, the two effects split up for neatness' sake
/datum/artifact_effect/common/heat
name = "heat"
- var/target_temp
effect_color = "#ff6600"
+ var/target_temp
/datum/artifact_effect/common/heat/New()
..()
@@ -10,17 +9,19 @@
effect_type = pick(EFFECT_ORGANIC, EFFECT_BLUESPACE, EFFECT_SYNTH)
target_temp = rand(300, 600)
-/datum/artifact_effect/common/heat/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/common/heat/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
to_chat(user, " You feel a wave of heat travel up your spine!")
var/datum/gas_mixture/env = holder.loc.return_air()
- if(env)
+ if (env)
env.temperature += rand(5,50)
+
/datum/artifact_effect/common/heat/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/datum/gas_mixture/env = holder.loc.return_air()
- if(env && env.temperature < target_temp)
+ if (env && env.temperature < target_temp)
env.temperature += pick(0, 0, 1)
diff --git a/code/modules/xenoarcheaology/effects/hurt.dm b/code/modules/xenoarcheaology/effects/hurt.dm
index 168c0135ec..47cb67d257 100644
--- a/code/modules/xenoarcheaology/effects/hurt.dm
+++ b/code/modules/xenoarcheaology/effects/hurt.dm
@@ -1,14 +1,14 @@
/datum/artifact_effect/uncommon/hurt
name = "hurt"
effect_type = EFFECT_ORGANIC
-
effect_color = "#6d1212"
-/datum/artifact_effect/uncommon/hurt/DoEffectTouch(var/mob/toucher)
- if(toucher)
- var/weakness = GetAnomalySusceptibility(toucher)
- if(iscarbon(toucher) && prob(weakness * 100))
- var/mob/living/carbon/C = toucher
+
+/datum/artifact_effect/uncommon/hurt/DoEffectTouch(mob/living/user)
+ if (user)
+ var/weakness = GetAnomalySusceptibility(user)
+ if (iscarbon(user) && prob(weakness * 100))
+ var/mob/living/carbon/C = user
to_chat(C, "A painful discharge of energy strikes you!")
C.adjustOxyLoss(rand(5,25) * weakness)
C.adjustToxLoss(rand(5,25) * weakness)
@@ -21,14 +21,15 @@
C.make_dizzy(6 * weakness)
C.weakened += 6 * weakness
+
/datum/artifact_effect/uncommon/hurt/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(C)
- if(prob(weakness * 100))
- if(prob(10))
+ if (prob(weakness * 100))
+ if (prob(10))
to_chat(C, "You feel a painful force radiating from something nearby.")
C.adjustBruteLoss(1 * weakness)
C.adjustFireLoss(1 * weakness)
@@ -37,13 +38,14 @@
C.adjustBrainLoss(0.1 * weakness)
C.updatehealth()
+
/datum/artifact_effect/uncommon/hurt/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(effectrange, T))
var/weakness = GetAnomalySusceptibility(C)
- if(prob(weakness * 100))
+ if (prob(weakness * 100))
to_chat(C, "A wave of painful energy strikes you!")
C.adjustBruteLoss(3 * weakness)
C.adjustFireLoss(3 * weakness)
diff --git a/code/modules/xenoarcheaology/effects/poltergeist.dm b/code/modules/xenoarcheaology/effects/poltergeist.dm
index 4f965b21c1..467f50f922 100644
--- a/code/modules/xenoarcheaology/effects/poltergeist.dm
+++ b/code/modules/xenoarcheaology/effects/poltergeist.dm
@@ -1,52 +1,46 @@
-
/datum/artifact_effect/rare/poltergeist
name = "poltergeist"
effect_type = EFFECT_ENERGY
-
effect_state = "shield2"
effect_color = "#a824c9"
-/datum/artifact_effect/rare/poltergeist/proc/throw_at_mob(var/mob/living/target, var/damage = 20)
- var/list/valid_targets = list()
- for(var/obj/O in oview(world.view, target))
- if(!O.anchored && isturf(O.loc))
- valid_targets |= O
-
- if(valid_targets.len)
- var/obj/obj_to_throw = pick(valid_targets)
- obj_to_throw.visible_message("\The [obj_to_throw] levitates, before hurtling toward [target]!")
- obj_to_throw.throw_at(target, world.view, min(40, damage * GetAnomalySusceptibility(target)))
-
-/datum/artifact_effect/rare/poltergeist/DoEffectTouch(var/mob/user)
+/datum/artifact_effect/rare/poltergeist/DoEffectTouch(mob/living/user)
throw_at_mob(user, rand(10, 30))
+
/datum/artifact_effect/rare/poltergeist/DoEffectAura()
var/atom/holder = get_master_holder()
var/mob/living/target = null
- for(var/mob/living/L in oview(get_turf(holder), effectrange))
- if(L.stat || !L.mind)
+ for (var/mob/living/L in oview(get_turf(holder), effectrange))
+ if (L.stat || !L.mind)
continue
-
- if(target && get_dist(get_turf(holder), L) > get_dist(get_turf(holder), target))
+ if (target && get_dist(get_turf(holder), L) > get_dist(get_turf(holder), target))
continue
-
target = L
-
- if(target)
+ if (target)
throw_at_mob(target, rand(15, 30))
+
/datum/artifact_effect/rare/poltergeist/DoEffectPulse()
var/atom/holder = get_master_holder()
var/mob/living/target = null
- for(var/mob/living/L in oview(get_turf(holder), effectrange))
- if(L.stat || !L.mind)
+ for (var/mob/living/L in oview(get_turf(holder), effectrange))
+ if (L.stat || !L.mind)
continue
-
- if(target && get_dist(get_turf(holder), L) > get_dist(get_turf(holder), target))
+ if (target && get_dist(get_turf(holder), L) > get_dist(get_turf(holder), target))
continue
-
target = L
-
- if(target)
+ if (target)
throw_at_mob(target, chargelevelmax)
+
+
+/datum/artifact_effect/rare/poltergeist/proc/throw_at_mob(mob/living/target, damage = 20)
+ var/list/valid_targets = list()
+ for (var/obj/O in oview(world.view, target))
+ if (!O.anchored && isturf(O.loc))
+ valid_targets |= O
+ if (valid_targets.len)
+ var/obj/obj_to_throw = pick(valid_targets)
+ obj_to_throw.visible_message("\The [obj_to_throw] levitates, before hurtling toward [target]!")
+ obj_to_throw.throw_at(target, world.view, min(40, damage * GetAnomalySusceptibility(target)))
diff --git a/code/modules/xenoarcheaology/effects/radiate.dm b/code/modules/xenoarcheaology/effects/radiate.dm
index 37be883849..464146e76e 100644
--- a/code/modules/xenoarcheaology/effects/radiate.dm
+++ b/code/modules/xenoarcheaology/effects/radiate.dm
@@ -1,28 +1,28 @@
/datum/artifact_effect/rare/radiate
name = "radiation"
+ effect_color = "#007006"
var/radiation_amount
- effect_color = "#007006"
/datum/artifact_effect/rare/radiate/New()
..()
radiation_amount = rand(1, 10)
effect_type = pick(EFFECT_PARTICLE, EFFECT_ORGANIC)
-/datum/artifact_effect/rare/radiate/DoEffectTouch(var/mob/living/user)
- if(user)
+
+/datum/artifact_effect/rare/radiate/DoEffectTouch(mob/living/user)
+ if (user)
user.apply_effect(radiation_amount * 5,IRRADIATE,0)
user.updatehealth()
- return 1
+
/datum/artifact_effect/rare/radiate/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
SSradiation.flat_radiate(holder, radiation_amount, src.effectrange)
- return 1
+
/datum/artifact_effect/rare/radiate/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
SSradiation.radiate(holder, ((radiation_amount * 25) * (sqrt(src.effectrange)))) //Need to get feedback on this
- return 1
diff --git a/code/modules/xenoarcheaology/effects/resurrect.dm b/code/modules/xenoarcheaology/effects/resurrect.dm
index 1b5ff1b1bf..5e49aab9f2 100644
--- a/code/modules/xenoarcheaology/effects/resurrect.dm
+++ b/code/modules/xenoarcheaology/effects/resurrect.dm
@@ -1,30 +1,60 @@
/datum/artifact_effect/extreme/resurrect
name = "resurrect"
effect_type = EFFECT_ORGANIC
-
- var/stored_life = 0
-
effect_state = "pulsing"
effect_color = "#ff0000"
+ var/stored_life = 0
-/datum/artifact_effect/extreme/resurrect/proc/steal_life(var/mob/living/target = null)
+
+/datum/artifact_effect/extreme/resurrect/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
- if(!istype(target))
- return 0
+ for (var/mob/living/L in oview(effectrange, get_turf(holder)))
+ stored_life += 4 * steal_life(L)
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in T)
+ if (L.stat == DEAD)
+ give_life(L)
+ break
- if(target.stat != DEAD && stored_life < 200)
+
+/datum/artifact_effect/extreme/resurrect/DoEffectAura()
+ var/atom/holder = get_master_holder()
+ for (var/mob/living/L in oview(effectrange, get_turf(holder)))
+ stored_life += steal_life(L)
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in T)
+ if (L.stat == DEAD)
+ give_life(L)
+ break
+
+
+/datum/artifact_effect/extreme/resurrect/DoEffectPulse()
+ var/atom/holder = get_master_holder()
+ for (var/mob/living/L in oview(effectrange, get_turf(holder)))
+ stored_life += 2 * steal_life(L)
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in T)
+ if (L.stat == DEAD)
+ give_life(L)
+ break
+
+
+/datum/artifact_effect/extreme/resurrect/proc/steal_life(mob/living/target)
+ var/atom/holder = get_master_holder()
+ if (!istype(target))
+ return 0
+ if (target.stat != DEAD && stored_life < 200)
holder.Beam(target, icon_state = "drain_life", time = 1 SECOND)
target.apply_damage(5, SEARING, BP_TORSO)
return 5
-
return 0
-/datum/artifact_effect/extreme/resurrect/proc/give_life(var/mob/living/target = null)
- var/atom/holder = get_master_holder()
- if(!istype(target))
- return
- if(target.stat == DEAD && stored_life)
+/datum/artifact_effect/extreme/resurrect/proc/give_life(mob/living/target)
+ var/atom/holder = get_master_holder()
+ if (!istype(target))
+ return
+ if (target.stat == DEAD && stored_life)
holder.Beam(target, icon_state = "lichbeam", time = 1 SECOND)
target.adjustBruteLoss(-5)
target.adjustFireLoss(-5)
@@ -33,15 +63,15 @@
target.adjustHalLoss(-5)
target.adjustToxLoss(-5)
stored_life = max(0, stored_life - 5)
-
- if(target.health > (target.maxHealth / 4))
+ if (target.health > (target.maxHealth / 4))
attempt_revive(target)
stored_life = 0
-/datum/artifact_effect/extreme/resurrect/proc/attempt_revive(var/mob/living/L = null)
+
+/datum/artifact_effect/extreme/resurrect/proc/attempt_revive(mob/living/L)
var/atom/holder = get_master_holder()
spawn()
- if(istype(L, /mob/living/simple_mob))
+ if (istype(L, /mob/living/simple_mob))
var/mob/living/simple_mob/SM = L
SM.adjustBruteLoss(-40)
SM.adjustFireLoss(-40)
@@ -52,58 +82,21 @@
SM.update_icon()
SM.revive()
holder.visible_message("\The [SM]'s eyes open in a flash of light!")
- else if(ishuman(L))
+ else if (ishuman(L))
var/mob/living/carbon/human/H = L
-
- if(!H.client && H.mind)
- for(var/mob/observer/dead/ghost in player_list)
- if(ghost.mind == H.mind)
+ if (!H.client && H.mind)
+ for (var/mob/observer/dead/ghost in player_list)
+ if (ghost.mind == H.mind)
to_chat(ghost, "An artifact is trying to \
revive you. Return to your body if you want to be resurrected! \
(Verbs -> Ghost -> Re-enter corpse)")
break
-
H.adjustBruteLoss(-40)
H.adjustFireLoss(-40)
-
sleep(10 SECONDS)
- if(H.client)
+ if (H.client)
L.stat = CONSCIOUS
dead_mob_list -= H
living_mob_list += H
H.timeofdeath = null
-
holder.visible_message("\The [H]'s eyes open in a flash of light!")
-
-/datum/artifact_effect/extreme/resurrect/DoEffectTouch(var/mob/user)
- var/atom/holder = get_master_holder()
- for(var/mob/living/L in oview(effectrange, get_turf(holder)))
- stored_life += 4 * steal_life(L)
-
- var/turf/T = get_turf(holder)
- for(var/mob/living/L in T)
- if(L.stat == DEAD)
- give_life(L)
- break
-
-/datum/artifact_effect/extreme/resurrect/DoEffectAura()
- var/atom/holder = get_master_holder()
- for(var/mob/living/L in oview(effectrange, get_turf(holder)))
- stored_life += steal_life(L)
-
- var/turf/T = get_turf(holder)
- for(var/mob/living/L in T)
- if(L.stat == DEAD)
- give_life(L)
- break
-
-/datum/artifact_effect/extreme/resurrect/DoEffectPulse()
- var/atom/holder = get_master_holder()
- for(var/mob/living/L in oview(effectrange, get_turf(holder)))
- stored_life += 2 * steal_life(L)
-
- var/turf/T = get_turf(holder)
- for(var/mob/living/L in T)
- if(L.stat == DEAD)
- give_life(L)
- break
diff --git a/code/modules/xenoarcheaology/effects/roboheal.dm b/code/modules/xenoarcheaology/effects/roboheal.dm
index 4956e03fac..aebba8455e 100644
--- a/code/modules/xenoarcheaology/effects/roboheal.dm
+++ b/code/modules/xenoarcheaology/effects/roboheal.dm
@@ -1,44 +1,44 @@
/datum/artifact_effect/uncommon/roboheal
name = "robotic healing"
+ effect_color = "#3879ad"
var/last_message
- effect_color = "#3879ad"
/datum/artifact_effect/uncommon/roboheal/New()
..()
effect_type = pick(EFFECT_ELECTRO, EFFECT_PARTICLE)
-/datum/artifact_effect/uncommon/roboheal/DoEffectTouch(var/mob/user)
- if(user)
+
+/datum/artifact_effect/uncommon/roboheal/DoEffectTouch(mob/living/user)
+ if (user)
if (istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user
to_chat(R, "Your systems report damaged components mending by themselves!")
R.adjustBruteLoss(rand(-10,-30))
R.adjustFireLoss(rand(-10,-30))
- return 1
+
/datum/artifact_effect/uncommon/roboheal/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/silicon/robot/M in range(src.effectrange,T))
- if(world.time - last_message > 200)
+ if (world.time - last_message > 200)
to_chat(M, "SYSTEM ALERT: Beneficial energy field detected!")
last_message = world.time
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
M.updatehealth()
- return 1
+
/datum/artifact_effect/uncommon/roboheal/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/silicon/robot/M in range(src.effectrange,T))
- if(world.time - last_message > 200)
+ if (world.time - last_message > 200)
to_chat(M, "SYSTEM ALERT: Structural damage has been repaired by energy pulse!")
last_message = world.time
M.adjustBruteLoss(-10)
M.adjustFireLoss(-10)
M.updatehealth()
- return 1
diff --git a/code/modules/xenoarcheaology/effects/robohurt.dm b/code/modules/xenoarcheaology/effects/robohurt.dm
index e5e9b30cb3..5f9f422563 100644
--- a/code/modules/xenoarcheaology/effects/robohurt.dm
+++ b/code/modules/xenoarcheaology/effects/robohurt.dm
@@ -1,44 +1,44 @@
/datum/artifact_effect/uncommon/robohurt
name = "robotic harm"
+ effect_color = "#5432cf"
var/last_message
- effect_color = "#5432cf"
/datum/artifact_effect/uncommon/robohurt/New()
..()
effect_type = pick(EFFECT_ELECTRO, EFFECT_PARTICLE)
-/datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user)
- if(user)
+
+/datum/artifact_effect/robohurt/DoEffectTouch(mob/living/user)
+ if (user)
if (istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user
to_chat(R, "Your systems report severe damage has been inflicted!")
R.adjustBruteLoss(rand(10,50))
R.adjustFireLoss(rand(10,50))
- return 1
+
/datum/artifact_effect/uncommon/robohurt/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/silicon/robot/M in range(src.effectrange,T))
- if(world.time - last_message > 200)
+ if (world.time - last_message > 200)
to_chat(M, "SYSTEM ALERT: Harmful energy field detected!")
last_message = world.time
M.adjustBruteLoss(1)
M.adjustFireLoss(1)
M.updatehealth()
- return 1
+
/datum/artifact_effect/uncommon/robohurt/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/silicon/robot/M in range(src.effectrange,T))
- if(world.time - last_message > 200)
+ if (world.time - last_message > 200)
to_chat(M, "SYSTEM ALERT: Structural damage inflicted by energy pulse!")
last_message = world.time
M.adjustBruteLoss(10)
M.adjustFireLoss(10)
M.updatehealth()
- return 1
diff --git a/code/modules/xenoarcheaology/effects/sleepy.dm b/code/modules/xenoarcheaology/effects/sleepy.dm
index e17ce4a343..0c9dac7295 100644
--- a/code/modules/xenoarcheaology/effects/sleepy.dm
+++ b/code/modules/xenoarcheaology/effects/sleepy.dm
@@ -3,48 +3,48 @@
name = "sleepy"
effect_color = "#a36fa1"
+
/datum/artifact_effect/sleepy/New()
..()
effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC)
-/datum/artifact_effect/uncommon/sleepy/DoEffectTouch(var/mob/toucher)
- if(toucher)
- var/weakness = GetAnomalySusceptibility(toucher)
- if(ishuman(toucher) && prob(weakness * 100))
- var/mob/living/carbon/human/H = toucher
+
+/datum/artifact_effect/uncommon/sleepy/DoEffectTouch(mob/living/user)
+ if (user)
+ var/weakness = GetAnomalySusceptibility(user)
+ if (ishuman(user) && prob(weakness * 100))
+ var/mob/living/carbon/human/H = user
to_chat(H, pick("You feel like taking a nap."," You feel a yawn coming on."," You feel a little tired."))
H.drowsyness = min(H.drowsyness + rand(5,25) * weakness, 50 * weakness)
H.eye_blurry = min(H.eye_blurry + rand(1,3) * weakness, 50 * weakness)
- return 1
- else if(isrobot(toucher))
- to_chat(toucher, "SYSTEM ALERT: CPU cycles slowing down.")
- return 1
+ else if (isrobot(user))
+ to_chat(user, "SYSTEM ALERT: CPU cycles slowing down.")
+
/datum/artifact_effect/uncommon/sleepy/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/human/H in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(H)
- if(prob(weakness * 100))
- if(prob(10))
+ if (prob(weakness * 100))
+ if (prob(10))
to_chat(H, pick("You feel like taking a nap."," You feel a yawn coming on."," You feel a little tired."))
H.drowsyness = min(H.drowsyness + 1 * weakness, 25 * weakness)
H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness)
for (var/mob/living/silicon/robot/R in range(src.effectrange,holder))
to_chat(R, "SYSTEM ALERT: CPU cycles slowing down.")
- return 1
+
/datum/artifact_effect/uncommon/sleepy/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
- for(var/mob/living/carbon/human/H in range(src.effectrange, T))
+ for (var/mob/living/carbon/human/H in range(src.effectrange, T))
var/weakness = GetAnomalySusceptibility(H)
- if(prob(weakness * 100))
+ if (prob(weakness * 100))
to_chat(H, pick("You feel like taking a nap."," You feel a yawn coming on."," You feel a little tired."))
H.drowsyness = min(H.drowsyness + rand(5,15) * weakness, 50 * weakness)
H.eye_blurry = min(H.eye_blurry + rand(5,15) * weakness, 50 * weakness)
for (var/mob/living/silicon/robot/R in range(src.effectrange,holder))
to_chat(R, "SYSTEM ALERT: CPU cycles slowing down.")
- return 1
diff --git a/code/modules/xenoarcheaology/effects/stun.dm b/code/modules/xenoarcheaology/effects/stun.dm
index 18e353ebfa..4327cd0224 100644
--- a/code/modules/xenoarcheaology/effects/stun.dm
+++ b/code/modules/xenoarcheaology/effects/stun.dm
@@ -2,44 +2,48 @@
name = "stun"
effect_color = "#00eeff"
+
/datum/artifact_effect/uncommon/stun/New()
..()
effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC)
-/datum/artifact_effect/uncommon/stun/DoEffectTouch(var/mob/toucher)
- if(toucher && iscarbon(toucher))
- var/mob/living/carbon/C = toucher
+
+/datum/artifact_effect/uncommon/stun/DoEffectTouch(mob/living/user)
+ if (user && iscarbon(user))
+ var/mob/living/carbon/C = user
var/susceptibility = GetAnomalySusceptibility(C)
- if(prob(susceptibility * 100))
+ if (prob(susceptibility * 100))
to_chat(C, "A powerful force overwhelms your consciousness.")
C.Weaken(rand(1,10) * susceptibility)
C.stuttering += 30 * susceptibility
C.Stun(rand(1,10) * susceptibility)
+
/datum/artifact_effect/uncommon/stun/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(src.effectrange,T))
var/susceptibility = GetAnomalySusceptibility(C)
- if(prob(10 * susceptibility))
+ if (prob(10 * susceptibility))
to_chat(C, "Your body goes numb for a moment.")
C.Weaken(2)
C.stuttering += 2
- if(prob(10))
+ if (prob(10))
C.Stun(1)
- else if(prob(10))
+ else if (prob(10))
to_chat(C, "You feel numb.")
+
/datum/artifact_effect/uncommon/stun/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/carbon/C in range(src.effectrange,T))
var/susceptibility = GetAnomalySusceptibility(C)
- if(prob(100 * susceptibility))
+ if (prob(100 * susceptibility))
to_chat(C, "A wave of energy overwhelms your senses!")
C.SetWeakened(4 * susceptibility)
C.stuttering = 4 * susceptibility
- if(prob(10))
+ if (prob(10))
C.SetStunned(1 * susceptibility)
diff --git a/code/modules/xenoarcheaology/effects/teleport.dm b/code/modules/xenoarcheaology/effects/teleport.dm
index efbe70c6a0..092bc2924b 100644
--- a/code/modules/xenoarcheaology/effects/teleport.dm
+++ b/code/modules/xenoarcheaology/effects/teleport.dm
@@ -4,59 +4,55 @@
effect_state = "pulsing"
effect_color = "#88ffdb"
-/datum/artifact_effect/rare/teleport/DoEffectTouch(var/mob/user)
+
+/datum/artifact_effect/rare/teleport/DoEffectTouch(mob/living/user)
var/atom/holder = get_master_holder()
var/weakness = GetAnomalySusceptibility(user)
- if(prob(100 * weakness))
+ if (prob(100 * weakness))
to_chat(user, "You are suddenly zapped away elsewhere!")
if (user.buckled)
user.buckled.unbuckle_mob()
-
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread()
sparks.set_up(3, 0, get_turf(user))
sparks.start()
-
user.Move(pick(trange(50, get_turf(holder))))
-
sparks = new /datum/effect_system/spark_spread()
sparks.set_up(3, 0, user.loc)
sparks.start()
+
/datum/artifact_effect/rare/teleport/DoEffectAura()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/M in range(src.effectrange,T))
var/weakness = GetAnomalySusceptibility(M)
- if(prob(100 * weakness))
+ if (prob(100 * weakness))
to_chat(M, "You are displaced by a strange force!")
- if(M.buckled)
+ if (M.buckled)
M.buckled.unbuckle_mob()
-
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread()
sparks.set_up(3, 0, get_turf(M))
sparks.start()
-
M.Move(pick(trange(50, T)))
sparks = new /datum/effect_system/spark_spread()
sparks.set_up(3, 0, M.loc)
sparks.start()
+
/datum/artifact_effect/rare/teleport/DoEffectPulse()
var/atom/holder = get_master_holder()
- if(holder)
+ if (holder)
var/turf/T = get_turf(holder)
for (var/mob/living/M in range(src.effectrange, T))
var/weakness = GetAnomalySusceptibility(M)
- if(prob(100 * weakness))
+ if (prob(100 * weakness))
to_chat(M, "You are displaced by a strange force!")
- if(M.buckled)
+ if (M.buckled)
M.buckled.unbuckle_mob()
-
var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread()
sparks.set_up(3, 0, get_turf(M))
sparks.start()
-
M.Move(pick(trange(50, T)))
sparks = new /datum/effect_system/spark_spread()
sparks.set_up(3, 0, M.loc)
diff --git a/code/modules/xenoarcheaology/effects/vampire.dm b/code/modules/xenoarcheaology/effects/vampire.dm
index b989bbfafa..8c4618fe05 100644
--- a/code/modules/xenoarcheaology/effects/vampire.dm
+++ b/code/modules/xenoarcheaology/effects/vampire.dm
@@ -1,7 +1,8 @@
-
/datum/artifact_effect/rare/vampire
name = "vampire"
effect_type = EFFECT_ORGANIC
+ effect_state = "gravisphere"
+ effect_color = "#ff0000"
var/last_bloodcall = 0
var/bloodcall_interval = 50
var/last_eat = 0
@@ -9,13 +10,64 @@
var/charges = 0
var/list/nearby_mobs = list()
- effect_state = "gravisphere"
- effect_color = "#ff0000"
-/datum/artifact_effect/rare/vampire/proc/bloodcall(var/mob/living/carbon/human/M)
+/datum/artifact_effect/rare/vampire/DoEffectTouch(mob/living/user)
+ bloodcall(user)
+ DoEffectAura()
+
+
+/datum/artifact_effect/rare/vampire/DoEffectAura()
+ var/atom/holder = get_master_holder()
+ if (nearby_mobs.len)
+ nearby_mobs.Cut()
+ var/turf/T = get_turf(holder)
+ for (var/mob/living/L in oview(effectrange, T))
+ if (!L.stat && L.mind)
+ nearby_mobs |= L
+ if (world.time - bloodcall_interval >= last_bloodcall && LAZYLEN(nearby_mobs))
+ var/mob/living/carbon/human/M = pick(nearby_mobs)
+ if (get_dist(M, T) <= effectrange && M.health > 20)
+ bloodcall(M)
+ holder.Beam(M, icon_state = "drainbeam", time = 1 SECOND)
+ if (world.time - last_eat >= eat_interval)
+ var/obj/effect/decal/cleanable/blood/B = locate() in range(2,holder)
+ if (B)
+ last_eat = world.time
+ B.loc = null
+ if (istype(B, /obj/effect/decal/cleanable/blood/drip))
+ charges += 0.25
+ else
+ charges += 1
+ playsound(holder, 'sound/effects/splat.ogg', 50, 1, -3)
+ qdel(B)
+ if (charges >= 10)
+ charges -= 10
+ var/manifestation = pick(/obj/item/soulstone, /mob/living/simple_mob/faithless/cult/strong, /mob/living/simple_mob/creature/cult/strong, /mob/living/simple_mob/animal/space/bats/cult/strong)
+ new manifestation(pick(RANGE_TURFS(1,T)))
+ if (charges >= 3)
+ if (prob(5))
+ charges -= 1
+ var/spawn_type = pick(/mob/living/simple_mob/animal/space/bats, /mob/living/simple_mob/creature, /mob/living/simple_mob/faithless)
+ new spawn_type(pick(RANGE_TURFS(1,T)))
+ playsound(holder, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
+ if (charges >= 1 && nearby_mobs.len && prob(15 * nearby_mobs.len))
+ var/mob/living/L = pick(nearby_mobs)
+ holder.Beam(L, icon_state = "drainbeam", time = 1 SECOND)
+ L.add_modifier(/datum/modifier/agonize, 5 SECONDS)
+ if (charges >= 0.1)
+ if (prob(5))
+ holder.visible_message("\icon[holder] \The [holder] gleams a bloody red!")
+ charges -= 0.1
+
+
+/datum/artifact_effect/rare/vampire/DoEffectPulse()
+ DoEffectAura()
+
+
+/datum/artifact_effect/rare/vampire/proc/bloodcall(mob/living/carbon/human/M)
var/atom/holder = get_master_holder()
last_bloodcall = world.time
- if(istype(M))
+ if (istype(M))
playsound(holder, pick('sound/hallucinations/wail.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/far_noise.ogg'), 50, 1, -3)
var/target = pick(M.organs_by_name)
@@ -28,63 +80,3 @@
B.blood_DNA = list()
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
M.vessel.remove_reagent("blood",rand(10,30))
-
-/datum/artifact_effect/rare/vampire/DoEffectTouch(var/mob/user)
- bloodcall(user)
- DoEffectAura()
-
-/datum/artifact_effect/rare/vampire/DoEffectAura()
- var/atom/holder = get_master_holder()
- if(nearby_mobs.len)
- nearby_mobs.Cut()
- var/turf/T = get_turf(holder)
-
- for(var/mob/living/L in oview(effectrange, T))
- if(!L.stat && L.mind)
- nearby_mobs |= L
-
- if(world.time - bloodcall_interval >= last_bloodcall && LAZYLEN(nearby_mobs))
- var/mob/living/carbon/human/M = pick(nearby_mobs)
- if(get_dist(M, T) <= effectrange && M.health > 20)
- bloodcall(M)
- holder.Beam(M, icon_state = "drainbeam", time = 1 SECOND)
-
- if(world.time - last_eat >= eat_interval)
- var/obj/effect/decal/cleanable/blood/B = locate() in range(2,holder)
- if(B)
- last_eat = world.time
- B.loc = null
- if(istype(B, /obj/effect/decal/cleanable/blood/drip))
- charges += 0.25
- else
- charges += 1
- playsound(holder, 'sound/effects/splat.ogg', 50, 1, -3)
-
- qdel(B)
-
- if(charges >= 10)
- charges -= 10
- var/manifestation = pick(/obj/item/soulstone, /mob/living/simple_mob/faithless/cult/strong, /mob/living/simple_mob/creature/cult/strong, /mob/living/simple_mob/animal/space/bats/cult/strong)
- new manifestation(pick(RANGE_TURFS(1,T)))
-
- if(charges >= 3)
- if(prob(5))
- charges -= 1
- var/spawn_type = pick(/mob/living/simple_mob/animal/space/bats, /mob/living/simple_mob/creature, /mob/living/simple_mob/faithless)
- new spawn_type(pick(RANGE_TURFS(1,T)))
- playsound(holder, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
-
- if(charges >= 1 && nearby_mobs.len && prob(15 * nearby_mobs.len))
- var/mob/living/L = pick(nearby_mobs)
-
- holder.Beam(L, icon_state = "drainbeam", time = 1 SECOND)
-
- L.add_modifier(/datum/modifier/agonize, 5 SECONDS)
-
- if(charges >= 0.1)
- if(prob(5))
- holder.visible_message("\icon[holder] \The [holder] gleams a bloody red!")
- charges -= 0.1
-
-/datum/artifact_effect/rare/vampire/DoEffectPulse()
- DoEffectAura()