tweaks to artifact spawning, tweaks and fixes to multiple anomalous artifact effects

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2013-02-13 12:23:20 +10:00
parent b9bd5ca3e2
commit bbfbfb0ca2
12 changed files with 269 additions and 243 deletions

View File

@@ -128,7 +128,6 @@
//dont create artifact machinery in animal or plant digsites, or if we already have one //dont create artifact machinery in animal or plant digsites, or if we already have one
if(!artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE)) if(!artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE))
artifact_find = new() artifact_find = new()
world << artifact_find.artifact_find_type
if(!src.geological_data) if(!src.geological_data)
src.geological_data = new/datum/geosample(src) src.geological_data = new/datum/geosample(src)

View File

@@ -22,7 +22,7 @@
100;/obj/machinery/giga_drill,\ 100;/obj/machinery/giga_drill,\
100;/obj/mecha/working/hoverpod,\ 100;/obj/mecha/working/hoverpod,\
100;/obj/machinery/replicator,\ 100;/obj/machinery/replicator,\
200;/obj/structure/crystal,\ 150;/obj/structure/crystal,\
500;/obj/machinery/artifact) 500;/obj/machinery/artifact)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -8,7 +8,7 @@
if(istype(user, /mob/living/silicon/robot)) if(istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
for (var/obj/item/weapon/cell/D in R.contents) for (var/obj/item/weapon/cell/D in R.contents)
D.charge += 250 D.charge += rand() * 100 + 50
R << "\blue SYSTEM ALERT: Large energy boost detected!" R << "\blue SYSTEM ALERT: Large energy boost detected!"
return 1 return 1
@@ -16,11 +16,12 @@
if(holder) if(holder)
for (var/obj/machinery/power/apc/C in range(200, holder)) for (var/obj/machinery/power/apc/C in range(200, holder))
for (var/obj/item/weapon/cell/B in C.contents) for (var/obj/item/weapon/cell/B in C.contents)
B.charge += 100 B.charge += 25
for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) S.charge += 250 for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge += 25
for (var/mob/living/silicon/robot/M in world) for (var/mob/living/silicon/robot/M in world)
for (var/obj/item/weapon/cell/D in M.contents) for (var/obj/item/weapon/cell/D in M.contents)
D.charge += 100 D.charge += 25
M << "\blue SYSTEM ALERT: Energy boost detected!" M << "\blue SYSTEM ALERT: Energy boost detected!"
return 1 return 1
@@ -28,10 +29,11 @@
if(holder) if(holder)
for (var/obj/machinery/power/apc/C in range(200, holder)) for (var/obj/machinery/power/apc/C in range(200, holder))
for (var/obj/item/weapon/cell/B in C.contents) for (var/obj/item/weapon/cell/B in C.contents)
B.charge += 100 B.charge += rand() * 100
for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) S.charge += 250 for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge += 250
for (var/mob/living/silicon/robot/M in world) for (var/mob/living/silicon/robot/M in world)
for (var/obj/item/weapon/cell/D in M.contents) for (var/obj/item/weapon/cell/D in M.contents)
D.charge += 100 D.charge += rand() * 100
M << "\blue SYSTEM ALERT: Energy boost detected!" M << "\blue SYSTEM ALERT: Energy boost detected!"
return 1 return 1

View File

@@ -8,7 +8,7 @@
if(istype(user, /mob/living/silicon/robot)) if(istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
for (var/obj/item/weapon/cell/D in R.contents) for (var/obj/item/weapon/cell/D in R.contents)
D.charge = max(D.charge-250, 0) D.charge = max(D.charge - rand() * 100, 0)
R << "\blue SYSTEM ALERT: Energy drain detected!" R << "\blue SYSTEM ALERT: Energy drain detected!"
return 1 return 1
@@ -18,12 +18,12 @@
if(holder) if(holder)
for (var/obj/machinery/power/apc/C in range(200, holder)) for (var/obj/machinery/power/apc/C in range(200, holder))
for (var/obj/item/weapon/cell/B in C.contents) for (var/obj/item/weapon/cell/B in C.contents)
B.charge = max(B.charge-250,0) B.charge = max(B.charge - 50,0)
for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge = max(S.charge-250,0) S.charge = max(S.charge - 100,0)
for (var/mob/living/silicon/robot/M in world) for (var/mob/living/silicon/robot/M in world)
for (var/obj/item/weapon/cell/D in M.contents) for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge-250,0) D.charge = max(D.charge - 50,0)
M << "\red SYSTEM ALERT: Energy drain detected!" M << "\red SYSTEM ALERT: Energy drain detected!"
return 1 return 1
@@ -31,11 +31,11 @@
if(holder) if(holder)
for (var/obj/machinery/power/apc/C in range(200, holder)) for (var/obj/machinery/power/apc/C in range(200, holder))
for (var/obj/item/weapon/cell/B in C.contents) for (var/obj/item/weapon/cell/B in C.contents)
B.charge = max(B.charge-250,0) B.charge = max(B.charge - rand() * 150,0)
for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) for (var/obj/machinery/power/smes/S in range (src.effectrange,src))
S.charge = max(S.charge-250,0) S.charge = max(S.charge - 250,0)
for (var/mob/living/silicon/robot/M in world) for (var/mob/living/silicon/robot/M in world)
for (var/obj/item/weapon/cell/D in M.contents) for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge-250,0) D.charge = max(D.charge - rand() * 150,0)
M << "\red SYSTEM ALERT: Energy drain detected!" M << "\red SYSTEM ALERT: Energy drain detected!"
return 1 return 1

View File

@@ -11,8 +11,9 @@
else else
severity = rand(5,95) severity = rand(5,95)
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/holder) /datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
if(ishuman(holder) && !istype(holder:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && !istype(holder:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(toucher)
if(ishuman(toucher) && prob(weakness * 100))
holder << pick("\green You feel a little different.",\ holder << pick("\green You feel a little different.",\
"\green You feel very strange.",\ "\green You feel very strange.",\
"\green Your stomach churns.",\ "\green Your stomach churns.",\
@@ -21,16 +22,16 @@
"\green You feel a tingling sensation in your chest.",\ "\green You feel a tingling sensation in your chest.",\
"\green Your entire body vibrates.") "\green Your entire body vibrates.")
if(prob(75)) if(prob(75))
scramble(1, holder, severity) scramble(1, holder, weakness * severity)
else else
scramble(0, holder, severity) scramble(0, holder, weakness * severity)
return 1 return 1
/datum/artifact_effect/dnaswitch/DoEffectAura() /datum/artifact_effect/dnaswitch/DoEffectAura()
if(holder)
for(var/mob/living/carbon/human/H in range(src.effectrange,holder)) for(var/mob/living/carbon/human/H in range(src.effectrange,holder))
if(istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(H)
continue if(prob(weakness * 100))
if(prob(30)) if(prob(30))
H << pick("\green You feel a little different.",\ H << pick("\green You feel a little different.",\
"\green You feel very strange.",\ "\green You feel very strange.",\
@@ -40,16 +41,15 @@
"\green You feel a tingling sensation in your chest.",\ "\green You feel a tingling sensation in your chest.",\
"\green Your entire body vibrates.") "\green Your entire body vibrates.")
if(prob(25)) if(prob(25))
scramble(1, H, severity) scramble(1, H, weakness * severity)
else else
scramble(0, H, severity) scramble(0, H, weakness * severity)
return 1
/datum/artifact_effect/dnaswitch/DoEffectPulse() /datum/artifact_effect/dnaswitch/DoEffectPulse()
if(holder)
for(var/mob/living/carbon/human/H in range(200, holder)) for(var/mob/living/carbon/human/H in range(200, holder))
if(istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(H)
continue if(prob(weakness * 100))
if(prob(75)) if(prob(75))
H << pick("\green You feel a little different.",\ H << pick("\green You feel a little different.",\
"\green You feel very strange.",\ "\green You feel very strange.",\
@@ -60,7 +60,6 @@
"\green Your entire body vibrates.") "\green Your entire body vibrates.")
if(prob(25)) if(prob(25))
if(prob(50)) if(prob(50))
scramble(1, H, severity) scramble(1, H, weakness * severity)
else else
scramble(0, H, severity) scramble(0, H, weakness * severity)
return 1

View File

@@ -2,66 +2,61 @@
/datum/artifact_effect/heal /datum/artifact_effect/heal
effecttype = "heal" effecttype = "heal"
/datum/artifact_effect/heal/DoEffectTouch(var/mob/user) /datum/artifact_effect/heal/DoEffectTouch(var/mob/toucher)
//caeltodo //todo: check over this properly
if(user) if(toucher && iscarbon(toucher))
if (istype(user, /mob/living/carbon/human)) var/weakness = GetAnomalySusceptibility(toucher)
var/mob/living/carbon/human/H = holder if(prob(weakness * 100))
H << "\blue You feel a soothing energy invigorate you." var/mob/living/carbon/C = toucher
C << "\blue You feel a soothing energy invigorate you."
if(ishuman(toucher))
var/mob/living/carbon/human/H = holder
for(var/datum/organ/external/affecting in H.organs) for(var/datum/organ/external/affecting in H.organs)
if(affecting && istype(affecting)) if(affecting && istype(affecting))
affecting.heal_damage(25, 25) affecting.heal_damage(25 * weakness, 25 * weakness)
//H:heal_organ_damage(25, 25) //H:heal_organ_damage(25, 25)
// H.vessel.add_reagent("blood",5)
H.adjustOxyLoss(-25) H.nutrition += 50 * weakness
H.adjustToxLoss(-25) H.adjustBrainLoss(-25 * weakness)
H.adjustBruteLoss(-25) H.radiation -= min(H.radiation, 25 * weakness)
H.adjustFireLoss(-25)
H.adjustBrainLoss(-25)
H.radiation -= min(H.radiation, 25)
H.nutrition += 50
H.bodytemperature = initial(H.bodytemperature) H.bodytemperature = initial(H.bodytemperature)
//
H.vessel.add_reagent("blood",50)
spawn(1) spawn(1)
H.fixblood() H.fixblood()
H.regenerate_icons() //
return 1 C.adjustOxyLoss(-25 * weakness)
C.adjustToxLoss(-25 * weakness)
else if (istype(user, /mob/living/carbon/monkey/)) C.adjustBruteLoss(-25 * weakness)
var/mob/living/carbon/monkey/M = holder C.adjustFireLoss(-25 * weakness)
M << "\blue You feel a soothing energy invigorate you." //
M.adjustOxyLoss(-25) C.regenerate_icons()
M.adjustToxLoss(-25)
M.adjustBruteLoss(-25)
M.adjustFireLoss(-25)
M.adjustBrainLoss(-25)
return 1 return 1
/datum/artifact_effect/heal/DoEffectAura() /datum/artifact_effect/heal/DoEffectAura()
//caeltodo //todo: check over this properly
for (var/mob/living/carbon/M in range(src.effectrange,holder)) if(holder)
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) for (var/mob/living/carbon/C in range(src.effectrange,holder))
continue var/weakness = GetAnomalySusceptibility(C)
if(prob(10)) M << "\blue You feel a soothing energy radiating from something nearby." if(prob(weakness * 100))
M.adjustBruteLoss(-1) if(prob(10))
M.adjustFireLoss(-1) C << "\blue You feel a soothing energy radiating from something nearby."
M.adjustToxLoss(-1) C.adjustBruteLoss(-1 * weakness)
M.adjustOxyLoss(-1) C.adjustFireLoss(-1 * weakness)
M.adjustBrainLoss(-1) C.adjustToxLoss(-1 * weakness)
M.updatehealth() C.adjustOxyLoss(-1 * weakness)
return 1 C.adjustBrainLoss(-1 * weakness)
C.updatehealth()
/datum/artifact_effect/heal/DoEffectPulse() /datum/artifact_effect/heal/DoEffectPulse()
for (var/mob/living/carbon/M in range(src.effectrange,holder)) //todo: check over this properly
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) if(holder)
continue for (var/mob/living/carbon/C in range(src.effectrange,holder))
M << "\blue A wave of energy invigorates you." var/weakness = GetAnomalySusceptibility(C)
M.adjustBruteLoss(-5) if(prob(weakness * 100))
M.adjustFireLoss(-5) C << "\blue A wave of energy invigorates you."
M.adjustToxLoss(-5) C.adjustBruteLoss(-5 * weakness)
M.adjustOxyLoss(-5) C.adjustFireLoss(-5 * weakness)
M.adjustBrainLoss(-5) C.adjustToxLoss(-5 * weakness)
M.updatehealth() C.adjustOxyLoss(-5 * weakness)
return 1 C.adjustBrainLoss(-5 * weakness)
C.updatehealth()

View File

@@ -2,45 +2,46 @@
/datum/artifact_effect/hurt /datum/artifact_effect/hurt
effecttype = "hurt" effecttype = "hurt"
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/holder) /datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)
//caeltodo //caeltodo
if(holder) if(holder)
if (istype(holder, /mob/living/carbon/)) var/weakness = GetAnomalySusceptibility(toucher)
var/mob/living/carbon/C = holder if(iscarbon(toucher) && prob(weakness * 100))
var/mob/living/carbon/C = toucher
C << "\red A painful discharge of energy strikes you!" C << "\red A painful discharge of energy strikes you!"
C.adjustOxyLoss(rand(5,25)) C.adjustOxyLoss(rand(5,25) * weakness)
C.adjustToxLoss(rand(5,25)) C.adjustToxLoss(rand(5,25) * weakness)
C.adjustBruteLoss(rand(5,25)) C.adjustBruteLoss(rand(5,25) * weakness)
C.adjustFireLoss(rand(5,25)) C.adjustFireLoss(rand(5,25) * weakness)
C.adjustBrainLoss(rand(5,25)) C.adjustBrainLoss(rand(5,25) * weakness)
C.radiation += 25 C.radiation += 25 * weakness
C.nutrition -= min(50, C.nutrition) C.nutrition -= min(50 * weakness, C.nutrition)
C.make_dizzy(6) C.make_dizzy(6 * weakness)
C.weakened += 6 C.weakened += 6 * weakness
return 1
/datum/artifact_effect/hurt/DoEffectAura() /datum/artifact_effect/hurt/DoEffectAura()
if(holder) if(holder)
for (var/mob/living/carbon/M in range(src.effectrange,holder)) for (var/mob/living/carbon/C in range(src.effectrange,holder))
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(C)
continue if(prob(weakness * 100))
if(prob(10)) M << "\red You feel a painful force radiating from something nearby." if(prob(10))
M.adjustBruteLoss(1) C << "\red You feel a painful force radiating from something nearby."
M.adjustFireLoss(1) C.adjustBruteLoss(1 * weakness)
M.adjustToxLoss(1) C.adjustFireLoss(1 * weakness)
M.adjustOxyLoss(1) C.adjustToxLoss(1 * weakness)
M.adjustBrainLoss(1) C.adjustOxyLoss(1 * weakness)
M.updatehealth() C.adjustBrainLoss(1 * weakness)
return 1 C.updatehealth()
/datum/artifact_effect/hurt/DoEffectPulse() /datum/artifact_effect/hurt/DoEffectPulse()
if(holder) if(holder)
for (var/mob/living/carbon/human/M in range(effectrange, holder)) for (var/mob/living/carbon/C in range(effectrange, holder))
M << "\red A wave of painful energy strikes you!" var/weakness = GetAnomalySusceptibility(C)
M.adjustBruteLoss(3) if(prob(weakness * 100))
M.adjustFireLoss(3) C << "\red A wave of painful energy strikes you!"
M.adjustToxLoss(3) C.adjustBruteLoss(3 * weakness)
M.adjustOxyLoss(3) C.adjustFireLoss(3 * weakness)
M.adjustBrainLoss(3) C.adjustToxLoss(3 * weakness)
M.updatehealth() C.adjustOxyLoss(3 * weakness)
return 1 C.adjustBrainLoss(3 * weakness)
C.updatehealth()

View File

@@ -3,34 +3,40 @@
/datum/artifact_effect/sleepy /datum/artifact_effect/sleepy
effecttype = "sleepy" effecttype = "sleepy"
/datum/artifact_effect/sleepy/DoEffectTouch(var/mob/user) /datum/artifact_effect/sleepy/DoEffectTouch(var/mob/toucher)
if(user) if(toucher)
if(istype(user,/mob/living/carbon)) var/weakness = GetAnomalySusceptibility(toucher)
var/mob/living/carbon/C = user if(ishuman(toucher) && prob(weakness * 100))
C << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.") var/mob/living/carbon/human/H = toucher
C.drowsyness = min(user.drowsyness + rand(5,25), 50) H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
C.eye_blurry = min(user.eye_blurry + rand(1,3), 50) 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 return 1
else if(istype(user,/mob/living/silicon/robot)) else if(isrobot(toucher))
user << "\red SYSTEM ALERT: CPU cycles slowing down." toucher << "\red SYSTEM ALERT: CPU cycles slowing down."
return 1 return 1
/datum/artifact_effect/sleepy/DoEffectAura() /datum/artifact_effect/sleepy/DoEffectAura()
if(holder) if(holder)
for (var/mob/living/carbon/M in range(src.effectrange,holder)) for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
if(prob(10)) if(prob(10))
M << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.") H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
M.drowsyness = min(M.drowsyness + 1, 25) H.drowsyness = min(H.drowsyness + 1 * weakness, 25 * weakness)
M.eye_blurry = min(M.eye_blurry + 1, 25) H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness)
for (var/mob/living/silicon/robot/M in range(src.effectrange,holder)) for (var/mob/living/silicon/robot/R in range(src.effectrange,holder))
M << "\red SYSTEM ALERT: CPU cycles slowing down." R << "\red SYSTEM ALERT: CPU cycles slowing down."
return 1 return 1
/datum/artifact_effect/sleepy/DoEffectPulse() /datum/artifact_effect/sleepy/DoEffectPulse()
if(holder) if(holder)
for(var/mob/living/H in range(src.effectrange, holder)) for(var/mob/living/carbon/human/H in range(src.effectrange, holder))
H.drowsyness = min(H.drowsyness + rand(5,15), 50) var/weakness = GetAnomalySusceptibility(H)
H.eye_blurry = min(H.eye_blurry + rand(5,15), 50) if(prob(weakness * 100))
for (var/mob/living/silicon/robot/M in range(src.effectrange,holder)) H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
M << "\red SYSTEM ALERT: CPU cycles slowing down." 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))
R << "\red SYSTEM ALERT: CPU cycles slowing down."
return 1 return 1

View File

@@ -2,37 +2,36 @@
/datum/artifact_effect/stun /datum/artifact_effect/stun
effecttype = "stun" effecttype = "stun"
/datum/artifact_effect/stun/DoEffectTouch(var/mob/user) /datum/artifact_effect/stun/DoEffectTouch(var/mob/toucher)
if(user) if(toucher && iscarbon(toucher))
if (istype(user, /mob/living/carbon/)) var/mob/living/carbon/C = toucher
user << "\red A powerful force overwhelms your consciousness." var/weakness = GetAnomalySusceptibility(C)
user.weakened += 45 if(prob(weakness * 100))
user.stuttering += 45 C << "\red A powerful force overwhelms your consciousness."
user.stunned += rand(1,10) C.weakened += 45 * weakness
return 1 C.stuttering += 45 * weakness
C.stunned += rand(1,10) * weakness
/datum/artifact_effect/stun/DoEffectAura() /datum/artifact_effect/stun/DoEffectAura()
if(holder) if(holder)
for (var/mob/living/carbon/M in range(src.effectrange,holder)) for (var/mob/living/carbon/C in range(src.effectrange,holder))
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(C)
continue if(prob(10 * weakness))
if(prob(10)) M << "\red You feel numb." C << "\red Your body goes numb for a moment."
if(prob(20)) C.weakened += 2
M << "\red Your body goes numb for a moment." C.stuttering += 2
M.weakened += 2
M.stuttering += 2
if(prob(10)) if(prob(10))
M.stunned += 1 C.stunned += 1
return 1 else if(prob(10))
C << "\red You feel numb."
/datum/artifact_effect/stun/DoEffectPulse() /datum/artifact_effect/stun/DoEffectPulse()
if(holder) if(holder)
for (var/mob/living/carbon/M in range(src.effectrange,holder)) for (var/mob/living/carbon/C in range(src.effectrange,holder))
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(C)
continue if(prob(100 * weakness))
M << "\red A wave of energy overwhelms your senses!" C << "\red A wave of energy overwhelms your senses!"
M.weakened += 4 C.weakened += 4 * weakness
M.stuttering += 4 C.stuttering += 4 * weakness
if(prob(10)) if(prob(10))
M.stunned += 1 C.stunned += 1 * weakness
return 1

View File

@@ -3,6 +3,8 @@
effecttype = "teleport" effecttype = "teleport"
/datum/artifact_effect/teleport/DoEffectTouch(var/mob/user) /datum/artifact_effect/teleport/DoEffectTouch(var/mob/user)
var/weakness = GetAnomalySusceptibility(user)
if(prob(100 * weakness))
var/list/randomturfs = new/list() var/list/randomturfs = new/list()
for(var/turf/simulated/floor/T in orange(user, 50)) for(var/turf/simulated/floor/T in orange(user, 50))
randomturfs.Add(T) randomturfs.Add(T)
@@ -19,13 +21,11 @@
sparks.set_up(3, 0, get_turf(user)) sparks.set_up(3, 0, get_turf(user))
sparks.start() sparks.start()
return 1
/datum/artifact_effect/teleport/DoEffectAura() /datum/artifact_effect/teleport/DoEffectAura()
if(holder) if(holder)
for (var/mob/living/M in range(src.effectrange,holder)) for (var/mob/living/M in range(src.effectrange,holder))
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(M)
continue if(prob(100 * weakness))
var/list/randomturfs = new/list() var/list/randomturfs = new/list()
for(var/turf/simulated/floor/T in orange(M, 30)) for(var/turf/simulated/floor/T in orange(M, 30))
randomturfs.Add(T) randomturfs.Add(T)
@@ -41,13 +41,12 @@
sparks = new /datum/effect/effect/system/spark_spread() sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, get_turf(M)) sparks.set_up(3, 0, get_turf(M))
sparks.start() sparks.start()
return 1
/datum/artifact_effect/teleport/DoEffectPulse() /datum/artifact_effect/teleport/DoEffectPulse()
if(holder) if(holder)
for (var/mob/living/M in range(src.effectrange, holder)) for (var/mob/living/M in range(src.effectrange, holder))
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) var/weakness = GetAnomalySusceptibility(M)
continue if(prob(100 * weakness))
var/list/randomturfs = new/list() var/list/randomturfs = new/list()
for(var/turf/simulated/floor/T in orange(M, 15)) for(var/turf/simulated/floor/T in orange(M, 15))
randomturfs.Add(T) randomturfs.Add(T)
@@ -63,4 +62,3 @@
sparks = new /datum/effect/effect/system/spark_spread() sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, get_turf(M)) sparks.set_up(3, 0, get_turf(M))
sparks.start() sparks.start()
return 1

View File

@@ -222,7 +222,7 @@ var/list/valid_secondary_effect_types = list(\
if (get_dist(user, src) > 1) if (get_dist(user, src) > 1)
user << "\red You can't reach [src] from here." user << "\red You can't reach [src] from here."
return return
if(ishuman(user) && istype(user:gloves,/obj/item/clothing/gloves)) if(ishuman(user) && user:gloves)
return ..() return ..()
src.add_fingerprint(user) src.add_fingerprint(user)
@@ -231,7 +231,7 @@ var/list/valid_secondary_effect_types = list(\
user << "<b>You touch [src].<b>" user << "<b>You touch [src].<b>"
my_effect.ToggleActivate() my_effect.ToggleActivate()
else else
user << "<b>You touch [src],</b> [pick("and nothing of note happens","but nothing happens","and nothing interesting happens","you notice nothing different","nothing seems to have happened")]." user << "<b>You touch [src],</b> [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")]."
if(prob(25) && secondary_effect && secondary_effect.trigger == my_effect.trigger) if(prob(25) && secondary_effect && secondary_effect.trigger == my_effect.trigger)
secondary_effect.ToggleActivate(0) secondary_effect.ToggleActivate(0)

View File

@@ -66,3 +66,30 @@
else if(effect == EFFECT_PULSE && chargelevel >= chargelevelmax) else if(effect == EFFECT_PULSE && chargelevel >= chargelevelmax)
chargelevel = 0 chargelevel = 0
DoEffectPulse() DoEffectPulse()
//returns 0..1, with 1 being no protection and 0 being fully protected
proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
if(!H || !istype(H))
return 1
var/protected = 0
//anomaly suits give best protection, but excavation suits are almost as good
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/latex))
protected += 0.1
if(istype(H.glasses,/obj/item/clothing/glasses/science))
protected += 0.1
return 1 - protected