Fix various anomaly bugs and oversights.

This commit is contained in:
Mechoid
2023-03-04 14:28:48 -05:00
committed by VirgoBot
parent 1a9fef92c7
commit 44087be324
5 changed files with 162 additions and 0 deletions
@@ -4,6 +4,7 @@
effect_color = "#ffee06"
var/last_message
<<<<<<< HEAD
/datum/artifact_effect/cellcharge/DoEffectTouch(var/mob/living/user)
if(user)
@@ -15,12 +16,16 @@
/datum/artifact_effect/cellcharge/DoEffectAura()
=======
/datum/artifact_effect/uncommon/cellcharge/proc/charge_cells(var/amount = 25)
>>>>>>> 318bc4daa5b... Fix various anomaly bugs and oversights. (#8941)
var/atom/holder = get_master_holder()
if(!holder)
return
var/turf/turf = get_turf(holder)
if(!turf)
return
<<<<<<< HEAD
for (var/obj/machinery/power/apc/apc as anything in GLOB.apcs)
if(get_dist(turf, apc) <= 200)
for (var/obj/item/weapon/cell/cell in apc.contents)
@@ -39,9 +44,38 @@
to_chat(robot, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
charged_robots = TRUE
if(charged_robots)
=======
var/messaged_robots
for(var/atom/movable/AM in range(effectrange, turf))
if(isliving(AM))
var/mob/living/L = AM
var/obj/item/cell/C = L.get_cell()
if(C)
if(issilicon(L) && ((last_message + (1 MINUTE)) < world.time))
messaged_robots = TRUE
to_chat(L, SPAN_NOTICE("SYSTEM ALERT: Energy boost detected!"))
C.charge = min(C.maxcharge, C.charge + amount)
continue
var/obj/item/cell/C = AM.get_cell()
if(C)
C.charge = min(C.maxcharge, C.charge + amount)
if(messaged_robots)
>>>>>>> 318bc4daa5b... Fix various anomaly bugs and oversights. (#8941)
last_message = world.time
/datum/artifact_effect/uncommon/cellcharge/DoEffectTouch(mob/living/user)
if(!user)
return
charge_cells(100)
/datum/artifact_effect/uncommon/cellcharge/DoEffectAura()
charge_cells()
<<<<<<< HEAD
/datum/artifact_effect/cellcharge/DoEffectPulse()
var/atom/holder = get_master_holder()
if(holder)
@@ -57,3 +91,7 @@
if(world.time - last_message > 200)
to_chat(M, "<font color='blue'>SYSTEM ALERT: Energy boost detected!</font>")
last_message = world.time
=======
/datum/artifact_effect/uncommon/cellcharge/DoEffectPulse()
charge_cells(50)
>>>>>>> 318bc4daa5b... Fix various anomaly bugs and oversights. (#8941)
@@ -4,6 +4,7 @@
effect_type = EFFECT_ELECTRO
var/last_message
<<<<<<< HEAD
effect_state = "pulsing"
effect_color = "#fbff02"
@@ -75,3 +76,43 @@
to_chat(M, "<font color='red'>SYSTEM ALERT: Energy drain detected!</font>")
last_message = world.time
return 1
=======
/datum/artifact_effect/uncommon/celldrain/proc/drain_cells(var/amount = 25)
var/atom/holder = get_master_holder()
if (!holder)
return
var/turf/turf = get_turf(holder)
if (!turf)
return
var/messaged_robots
for(var/atom/movable/AM in range(effectrange, turf))
if(isliving(AM))
var/mob/living/L = AM
var/obj/item/cell/C = L.get_cell()
if(C)
if(issilicon(L) && ((last_message + (1 MINUTE)) < world.time))
messaged_robots = TRUE
to_chat(L, SPAN_WARNING("SYSTEM ALERT: Energy drain detected!"))
C.charge = min(C.maxcharge, C.charge - amount)
continue
var/obj/item/cell/C = AM.get_cell()
if(C)
C.charge = min(C.maxcharge, C.charge - amount)
if(messaged_robots)
last_message = world.time
/datum/artifact_effect/uncommon/celldrain/DoEffectTouch(mob/living/user)
if(!user)
return
drain_cells(100)
/datum/artifact_effect/uncommon/celldrain/DoEffectAura()
drain_cells()
/datum/artifact_effect/uncommon/celldrain/DoEffectPulse()
drain_cells(50)
>>>>>>> 318bc4daa5b... Fix various anomaly bugs and oversights. (#8941)
@@ -8,8 +8,14 @@
..()
effect_type = pick(EFFECT_ELECTRO, EFFECT_PARTICLE)
<<<<<<< HEAD
/datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user)
if(user)
=======
/datum/artifact_effect/uncommon/robohurt/DoEffectTouch(mob/living/user)
if (user)
>>>>>>> 318bc4daa5b... Fix various anomaly bugs and oversights. (#8941)
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>")
@@ -3,7 +3,12 @@
name = "sleepy"
effect_color = "#a36fa1"
<<<<<<< HEAD
/datum/artifact_effect/sleepy/New()
=======
/datum/artifact_effect/uncommon/sleepy/New()
>>>>>>> 318bc4daa5b... Fix various anomaly bugs and oversights. (#8941)
..()
effect_type = pick(EFFECT_PSIONIC, EFFECT_ORGANIC)
@@ -0,0 +1,72 @@
/datum/artifact_effect/common/sweating
name = "sweating"
var/list/reagents = list()
effect_type = EFFECT_ORGANIC
effect_state = "oozes"
/datum/artifact_effect/common/sweating/New(datum/component/artifact_master/newmaster)
reagents += list(list(pick(SSchemistry.chemical_reagents), 0.4, list()))
if(prob(33))
reagents += list(list("blood",
0.6,
list("blood_colour" = rgb(rand(1,255),rand(1,255),rand(1,255)))))
// Sample the color of the combined reagents
var/datum/reagents/R = new(120)
for(var/list/chem in reagents)
R.add_reagent(chem[1], chem[2], chem[3])
effect_color = R.get_color()
qdel(R)
..()
effect = EFFECT_TOUCH
/datum/artifact_effect/common/sweating/proc/disgorge(var/turf/T, var/min_chargelevel = 0.25)
if(chargelevel < chargelevelmax * min_chargelevel)
return
spawn()
var/obj/effect/vfx/water/splash = new(T)
splash.create_reagents(15)
splash.reagents.add_reagent("blood", 10, list("blood_colour" = effect_color))
splash.set_color()
splash.set_up(T, 2, 3)
var/obj/effect/decal/cleanable/chemcoating/blood = locate() in T
if(!istype(blood))
blood = new(T)
for(var/list/chem in reagents)
blood.reagents.add_reagent(chem[1], chem[2] * chargelevel, LAZYLEN(chem) > 2 ? chem[3] : null)
blood.update_icon()
chargelevel = round(0.8 * chargelevel)
// Leave a trail of "disgusting ooze"
/datum/artifact_effect/common/sweating/UpdateMove(var/turf/old_loc)
disgorge(old_loc)
/datum/artifact_effect/common/sweating/DoEffectTouch(mob/living/carbon/human/user)
if(ishuman(user))
user.bloody_hands()
if(chargelevel >= 40 && prob(20))
user.visible_message(
"<span class='alium'>\The [get_master_holder()] shudders at \the [user]'s touch, before spraying a disgusting ooze everywhere.</span>",
"<span class='alium'>\The [get_master_holder()] shudders at your touch, before spraying a disgusting ooze all over you!</span>",
"<span class='notice'>A spray of liquid is followed by a fleshy slop hitting the ground.</span>")
if(ishuman(user))
user.bloody_body()
disgorge(get_turf(user), 0)
/datum/artifact_effect/common/sweating/attackby(mob/living/user, obj/item/I)
if(I.is_open_container())
to_chat(user, "<span class='alien'>You hold \the [I] against \the [get_master_holder()], and a disgusting pus dribbles into \the [I].</span>")
for(var/list/chem in reagents)
I.reagents.add_reagent(chem[0], chem[1] * chargelevel, LAZYLEN(chem) > 2 ? chem[2] : null)
return TRUE
else
I.add_blood(src)
return FALSE