Merge pull request #8685 from Spookerton/spkrtn/cng/tweak-effect-aura

cellcharge DoEffectAura sends a message per robot (and friends)
This commit is contained in:
Atermonera
2022-09-01 22:02:55 -08:00
committed by GitHub
32 changed files with 686 additions and 731 deletions
+99 -113
View File
@@ -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("<font color='red'>[bicon(toplevelholder)] [toplevelholder] [display_msg]</font>")
/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()
. = "<b>"
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"
. += "</b> have been detected <b>"
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."
. += "</b>"
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 <b>physical interaction</b> with artifact surface."
if(TRIGGER_FORCE, TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD)
if (TRIGGER_FORCE, TRIGGER_ENERGY, TRIGGER_HEAT, TRIGGER_COLD)
. += " Activation index involves <b>energetic interaction</b> with artifact surface."
if(TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
if (TRIGGER_PHORON, TRIGGER_OXY, TRIGGER_CO2, TRIGGER_NITRO)
. += " Activation index involves <b>precise local atmospheric conditions</b>."
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)
@@ -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("<span class='alien'>\The [holder] lurches away from [user]</span>")
/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("<span class='alien'>\The [O] lurches toward [target]</span>")
/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
@@ -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, "<b><font color='red' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>")
else
to_chat(H, "<font color='red'>[pick(messages)]</font>")
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, "<font color='red'>[pick(messages)]</font>")
else
to_chat(H, "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>")
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, "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>")
else
to_chat(H, "<font color='red'>[pick(messages)]</font>")
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
+28 -30
View File
@@ -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, "<span class='danger'>An otherworldly feeling seems to enter your mind, and it ignites your mind in fury!</span>")
L.adjustBrainLoss(3) // Playing with berserking alien psychic artifacts isn't good for the mind.
to_chat(L, "<span class='danger'>The inside of your head hurts...</span>")
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, "<span class='warning'>An otherworldly feeling seems to enter your mind again, and it fans your inner flame, extending your rage.</span>")
else // Exhausted or something.
to_chat(L, "<span class='warning'>An otherworldly feeling seems to enter your mind, and you briefly feel an intense anger, but \
it quickly passes.</span>")
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
@@ -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, "<b><font color='red' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>")
else
to_chat(H, "<font color='red'>[pick(messages)]</font>")
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, "<font color='red'>[pick(messages)]</font>")
else
to_chat(H, "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>")
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, "<font color='red' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>")
else
to_chat(H, "<font color='red'>[pick(messages)]</font>")
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
@@ -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, "<font color='blue'>SYSTEM ALERT: Large energy boost detected!</font>")
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, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
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, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
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, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
last_message = world.time
return 1
@@ -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, "<font color='blue'>SYSTEM ALERT: Energy drain detected!</font>")
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, "<font color='red'>SYSTEM ALERT: Energy drain detected!</font>")
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, "<font color='red'>SYSTEM ALERT: Energy drain detected!</font>")
last_message = world.time
return 1
+8 -7
View File
@@ -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, "<font color='blue'>A chill passes up your spine!</font>")
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)
@@ -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, "<span class='danger'>ERROR: Electrical fault detected!</span>")
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, "<span class='danger'>ERROR: Electrical fault detected!</span>")
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, "<span class='danger'>ERROR: Electrical fault detected!</span>")
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)
+3 -3
View File
@@ -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
@@ -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, "<span class='alien'>An otherworldly feeling seems to enter your mind, and you feel at peace.</span>")
L.adjustHalLoss(10)
to_chat(L, "<span class='danger'>The inside of your head hurts...</span>")
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, "<span class='warning'>An otherworldly feeling seems to enter your mind again, and it holds the visions in place.</span>")
else
to_chat(L, "<span class='warning'>An otherworldly feeling seems to enter your mind, and you briefly feel peace, but \
it quickly passes.</span>")
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
return
@@ -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]
+37 -50
View File
@@ -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, "<span class='alien'>You feel the presence of something long forgotten.</span>")
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()
@@ -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()))
@@ -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()))
@@ -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()))
@@ -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()))
@@ -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()))
@@ -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, "<b><font color='blue' size='[num2text(rand(1,5))]'>[pick(drastic_messages)]</b></font>")
else
to_chat(H, "<font color='blue'>[pick(messages)]</font>")
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, "<font color='blue'>[pick(messages)]</font>")
else
to_chat(H, "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>")
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, "<font color='blue' size='[num2text(rand(1,5))]'><b>[pick(drastic_messages)]</b></font>")
else
to_chat(H, "<font color='blue'>[pick(messages)]</font>")
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
@@ -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("<span class='alien'>\The [holder] distorts as local gravity intensifies, and shifts toward it.</span>")
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("<span class='alien'>\The [holder] distorts as local gravity intensifies, and shifts toward it.</span>")
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)
+17 -22
View File
@@ -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, "<font color='blue'>You feel a soothing energy invigorate you.</font>")
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, "<font color='blue'>You feel a soothing energy invigorate you.</font>")
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, "<font color='blue'>You feel a soothing energy radiating from something nearby.</font>")
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, "<font color='blue'>A wave of energy invigorates you.</font>")
C.adjustBruteLoss(-5 * weakness)
C.adjustFireLoss(-5 * weakness)
+8 -7
View File
@@ -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, "<font color='red'> You feel a wave of heat travel up your spine!</font>")
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)
+13 -11
View File
@@ -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, "<span class='danger'>A painful discharge of energy strikes you!</span>")
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, "<span class='danger'>You feel a painful force radiating from something nearby.</span>")
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, "<span class='danger'>A wave of painful energy strikes you!</span>")
C.adjustBruteLoss(3 * weakness)
C.adjustFireLoss(3 * weakness)
@@ -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("<span class='alien'>\The [obj_to_throw] levitates, before hurtling toward [target]!</span>")
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("<span class='alien'>\The [obj_to_throw] levitates, before hurtling toward [target]!</span>")
obj_to_throw.throw_at(target, world.view, min(40, damage * GetAnomalySusceptibility(target)))
@@ -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
@@ -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("<span class='alien'>\The [SM]'s eyes open in a flash of light!</span>")
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, "<b><font color = #330033><font size = 3>An artifact is trying to \
revive you. Return to your body if you want to be resurrected!</b> \
(Verbs -> Ghost -> Re-enter corpse)</font></font>")
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("<span class='alien'>\The [H]'s eyes open in a flash of light!</span>")
/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
@@ -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, "<font color='blue'>Your systems report damaged components mending by themselves!</font>")
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, "<font color='blue'>SYSTEM ALERT: Beneficial energy field detected!</font>")
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, "<font color='blue'>SYSTEM ALERT: Structural damage has been repaired by energy pulse!</font>")
last_message = world.time
M.adjustBruteLoss(-10)
M.adjustFireLoss(-10)
M.updatehealth()
return 1
@@ -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, "<font color='red'>Your systems report severe damage has been inflicted!</font>")
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, "<font color='red'>SYSTEM ALERT: Harmful energy field detected!</font>")
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, "<font color='red'>SYSTEM ALERT: Structural damage inflicted by energy pulse!</font>")
last_message = world.time
M.adjustBruteLoss(10)
M.adjustFireLoss(10)
M.updatehealth()
return 1
+17 -17
View File
@@ -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("<font color='blue'>You feel like taking a nap.</font>","<font color='blue'> You feel a yawn coming on.</font>","<font color='blue'> You feel a little tired.</font>"))
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, "<font color='red'>SYSTEM ALERT: CPU cycles slowing down.</font>")
return 1
else if (isrobot(user))
to_chat(user, "<font color='red'>SYSTEM ALERT: CPU cycles slowing down.</font>")
/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("<font color='blue'>You feel like taking a nap.</font>","<font color='blue'> You feel a yawn coming on.</font>","<font color='blue'> You feel a little tired.</font>"))
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, "<font color='red'>SYSTEM ALERT: CPU cycles slowing down.</font>")
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("<font color='blue'>You feel like taking a nap.</font>","<font color='blue'> You feel a yawn coming on.</font>","<font color='blue'> You feel a little tired.</font>"))
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, "<font color='red'>SYSTEM ALERT: CPU cycles slowing down.</font>")
return 1
+15 -11
View File
@@ -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, "<font color='red'>A powerful force overwhelms your consciousness.</font>")
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, "<font color='red'>Your body goes numb for a moment.</font>")
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, "<font color='red'>You feel numb.</font>")
/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, "<font color='red'>A wave of energy overwhelms your senses!</font>")
C.SetWeakened(4 * susceptibility)
C.stuttering = 4 * susceptibility
if(prob(10))
if (prob(10))
C.SetStunned(1 * susceptibility)
@@ -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, "<font color='red'>You are suddenly zapped away elsewhere!</font>")
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, "<font color='red'>You are displaced by a strange force!</font>")
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, "<font color='red'>You are displaced by a strange force!</font>")
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)
+57 -65
View File
@@ -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("<span class='alien'>\icon[holder] \The [holder] gleams a bloody red!</span>")
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("<span class='alien'>\icon[holder] \The [holder] gleams a bloody red!</span>")
charges -= 0.1
/datum/artifact_effect/rare/vampire/DoEffectPulse()
DoEffectAura()