mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
[MIRROR] Some misc xenoarch fixes (#9960)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
449939ef25
commit
51aa7b87d0
@@ -112,4 +112,4 @@
|
|||||||
#define EFFECT_VAMPIRE 20
|
#define EFFECT_VAMPIRE 20
|
||||||
#define EFFECT_HEALTH 21
|
#define EFFECT_HEALTH 21
|
||||||
#define EFFECT_GENERATOR 22
|
#define EFFECT_GENERATOR 22
|
||||||
//#define EFFECT_DNASWITCH 23 //Not in as of yet.
|
#define EFFECT_DNASWITCH 23 //Not in as of yet.
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
var/last_activation = 0
|
var/last_activation = 0
|
||||||
|
|
||||||
/datum/artifact_effect/Destroy()
|
/datum/artifact_effect/Destroy()
|
||||||
if(master)
|
master = null //Master still exists even if our effect gets destroyed. No need to qdel_null.
|
||||||
master = null
|
qdel_null(active_effect)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/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.
|
/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.
|
||||||
@@ -160,6 +160,8 @@
|
|||||||
. += "displace subjects using bluespace phenomena"
|
. += "displace subjects using bluespace phenomena"
|
||||||
if(EFFECT_VAMPIRE)
|
if(EFFECT_VAMPIRE)
|
||||||
. += "drain the blood of subjects, creating creatures or anomalous artifacts in the process"
|
. += "drain the blood of subjects, creating creatures or anomalous artifacts in the process"
|
||||||
|
if(EFFECT_DNASWITCH)
|
||||||
|
. += "mutate the cells of the organism that touches it, resulting in rampant mutations"
|
||||||
else
|
else
|
||||||
. += "have no previously-known anomalous properties"
|
. += "have no previously-known anomalous properties"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/artifact_effect/dnaswitch
|
/datum/artifact_effect/dnaswitch
|
||||||
name = "dnaswitch"
|
name = "DNA Mutator"
|
||||||
effect_type = EFFECT_ORGANIC
|
effect_type = EFFECT_DNASWITCH
|
||||||
var/severity
|
var/severity
|
||||||
|
|
||||||
effect_state = "smoke"
|
effect_state = "smoke"
|
||||||
@@ -8,21 +8,26 @@
|
|||||||
|
|
||||||
/datum/artifact_effect/dnaswitch/New()
|
/datum/artifact_effect/dnaswitch/New()
|
||||||
..()
|
..()
|
||||||
|
effect = pick(EFFECT_TOUCH, EFFECT_AURA, EFFECT_PULSE)
|
||||||
if(effect == EFFECT_AURA)
|
if(effect == EFFECT_AURA)
|
||||||
severity = rand(5,30)
|
severity = rand(10,50)
|
||||||
|
else if(effect == EFFECT_PULSE)
|
||||||
|
severity = rand(5,25)
|
||||||
else
|
else
|
||||||
severity = rand(25,95)
|
severity = rand(20,90)
|
||||||
|
|
||||||
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
|
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
|
||||||
var/weakness = GetAnomalySusceptibility(toucher)
|
var/weakness = GetAnomalySusceptibility(toucher)
|
||||||
if(ishuman(toucher) && prob(weakness * 100))
|
if(ishuman(toucher) && prob(weakness * 100))
|
||||||
to_chat(toucher,pick(span_green("You feel a little different."),
|
to_chat(toucher, span_notice(span_green("[pick(
|
||||||
span_green("You feel very strange."),
|
"You feel a little different.",
|
||||||
span_green("Your stomach churns."),
|
"You feel very strange.",
|
||||||
span_green("Your skin feels loose."),
|
"Your stomach churns.",
|
||||||
span_green("You feel a stabbing pain in your head."),
|
"Your skin feels loose.",
|
||||||
span_green("You feel a tingling sensation in your chest."),
|
"You feel a stabbing pain in your head.",
|
||||||
span_green("Your entire body vibrates.")))
|
"You feel a tingling sensation in your chest.",
|
||||||
|
"Your entire body vibrates.")]")))
|
||||||
|
|
||||||
if(prob(75))
|
if(prob(75))
|
||||||
scramble(1, toucher, weakness * severity)
|
scramble(1, toucher, weakness * severity)
|
||||||
else
|
else
|
||||||
@@ -31,41 +36,53 @@
|
|||||||
|
|
||||||
/datum/artifact_effect/dnaswitch/DoEffectAura()
|
/datum/artifact_effect/dnaswitch/DoEffectAura()
|
||||||
var/atom/holder = get_master_holder()
|
var/atom/holder = get_master_holder()
|
||||||
|
if(istype(holder, /obj/item/anobattery))
|
||||||
|
holder = holder.loc
|
||||||
|
if(isliving(holder.loc))
|
||||||
|
holder = holder.loc
|
||||||
if(holder)
|
if(holder)
|
||||||
var/turf/T = get_turf(holder)
|
var/turf/T = get_turf(holder)
|
||||||
for(var/mob/living/carbon/human/H in range(src.effectrange,T))
|
if(isturf(T))
|
||||||
var/weakness = GetAnomalySusceptibility(H)
|
for(var/mob/living/carbon/human/H in range(src.effectrange,T))
|
||||||
if(prob(weakness * 100))
|
var/weakness = GetAnomalySusceptibility(H)
|
||||||
if(prob(30))
|
if(prob(weakness * 100))
|
||||||
to_chat(H, pick(span_green("You feel a little different."),
|
if(prob(30))
|
||||||
span_green("You feel very strange."),
|
to_chat(H, span_notice(span_green("[pick(
|
||||||
span_green("Your stomach churns."),
|
"You feel a little different.",
|
||||||
span_green("Your skin feels loose."),
|
"You feel very strange.",
|
||||||
span_green("You feel a stabbing pain in your head."),
|
"Your stomach churns.",
|
||||||
span_green("You feel a tingling sensation in your chest."),
|
"Your skin feels loose.",
|
||||||
span_green("Your entire body vibrates.")))
|
"You feel a stabbing pain in your head.",
|
||||||
if(prob(50))
|
"You feel a tingling sensation in your chest.",
|
||||||
scramble(1, H, weakness * severity)
|
"Your entire body vibrates.")]")))
|
||||||
else
|
if(prob(50))
|
||||||
scramble(0, H, weakness * severity)
|
|
||||||
|
|
||||||
/datum/artifact_effect/dnaswitch/DoEffectPulse()
|
|
||||||
var/atom/holder = get_master_holder()
|
|
||||||
if(holder)
|
|
||||||
var/turf/T = get_turf(holder)
|
|
||||||
for(var/mob/living/carbon/human/H in range(200, T))
|
|
||||||
var/weakness = GetAnomalySusceptibility(H)
|
|
||||||
if(prob(weakness * 100))
|
|
||||||
if(prob(75))
|
|
||||||
to_chat(H, pick(span_green(" You feel a little different."),
|
|
||||||
span_green(" You feel very strange."),
|
|
||||||
span_green(" Your stomach churns."),
|
|
||||||
span_green(" Your skin feels loose."),
|
|
||||||
span_green(" You feel a stabbing pain in your head."),
|
|
||||||
span_green(" You feel a tingling sensation in your chest."),
|
|
||||||
span_green(" Your entire body vibrates.")))
|
|
||||||
if(prob(25))
|
|
||||||
if(prob(75))
|
|
||||||
scramble(1, H, weakness * severity)
|
scramble(1, H, weakness * severity)
|
||||||
else
|
else
|
||||||
scramble(0, H, weakness * severity)
|
scramble(0, H, weakness * severity)
|
||||||
|
|
||||||
|
/datum/artifact_effect/dnaswitch/DoEffectPulse()
|
||||||
|
var/atom/holder = get_master_holder()
|
||||||
|
if(istype(holder, /obj/item/anobattery))
|
||||||
|
holder = holder.loc
|
||||||
|
if(isliving(holder.loc))
|
||||||
|
holder = holder.loc
|
||||||
|
if(holder)
|
||||||
|
var/turf/T = get_turf(holder)
|
||||||
|
if(isturf(T))
|
||||||
|
for(var/mob/living/carbon/human/H in range(200, T))
|
||||||
|
var/weakness = GetAnomalySusceptibility(H)
|
||||||
|
if(prob(weakness * 100))
|
||||||
|
if(prob(75))
|
||||||
|
to_chat(H, span_notice(span_green("[pick(
|
||||||
|
"You feel a little different.",
|
||||||
|
"You feel very strange.",
|
||||||
|
"Your stomach churns.",
|
||||||
|
"Your skin feels loose.",
|
||||||
|
"You feel a stabbing pain in your head.",
|
||||||
|
"You feel a tingling sensation in your chest.",
|
||||||
|
"Your entire body vibrates.")]")))
|
||||||
|
if(prob(25))
|
||||||
|
if(prob(75))
|
||||||
|
scramble(1, H, weakness * severity)
|
||||||
|
else
|
||||||
|
scramble(0, H, weakness * severity)
|
||||||
|
|||||||
@@ -9,7 +9,10 @@
|
|||||||
var/datum/artifact_effect/battery_effect
|
var/datum/artifact_effect/battery_effect
|
||||||
var/capacity = 500
|
var/capacity = 500
|
||||||
var/stored_charge = 0
|
var/stored_charge = 0
|
||||||
var/effect_id = ""
|
|
||||||
|
/obj/item/anobattery/Destroy()
|
||||||
|
battery_effect = null
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/item/anobattery/advanced
|
/obj/item/anobattery/advanced
|
||||||
name = "advanced anomaly battery"
|
name = "advanced anomaly battery"
|
||||||
@@ -47,6 +50,12 @@
|
|||||||
..()
|
..()
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
|
|
||||||
|
/obj/item/anodevice/Destroy()
|
||||||
|
inserted_battery = null
|
||||||
|
archived_loc = null
|
||||||
|
last_user_touched = null
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/item/anodevice/equipped(var/mob/user, var/slot)
|
/obj/item/anodevice/equipped(var/mob/user, var/slot)
|
||||||
last_user_touched = user
|
last_user_touched = user
|
||||||
..()
|
..()
|
||||||
|
|||||||
Reference in New Issue
Block a user