Artifacts & IPCs

Modifies all artifact effects to account for the abilities and
capabilities of the IPCs. Minor reference to issue #492 .

Changes done:
* unknown_effect_cellcharge now feeds IPCs
* unknown_effect_celldrain now makes IPCs lose nutrition
* unknown_effect_dnaswitch no longer affects IPCs at all
* unknown_effect_heal no longer affects IPCs at all
* unknown_effect_hurt no longer affects IPCs at all
* unknown_effect_roboheal now affects IPCs by healing them
* unknown_effect_robohurt now affects IPCs by hurting them
* unknown_effect_sleepy has a few message changes, otherwise works as
everything else -- still puts them under
This commit is contained in:
skull132
2015-05-30 19:31:55 +03:00
parent 08e26e615a
commit 6517110fd7
8 changed files with 102 additions and 9 deletions
@@ -11,7 +11,12 @@
for (var/obj/item/weapon/cell/D in R.contents)
D.charge += rand() * 100 + 50
R << "\blue SYSTEM ALERT: Large energy boost detected!"
return 1
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC)
H.nutrition += rand() * 100 + 50
H << "\blue Your batteries gain a quick boost of energy!"
return 1
/datum/artifact_effect/cellcharge/DoEffectAura()
if(holder)
@@ -24,6 +29,10 @@
for (var/obj/item/weapon/cell/D in M.contents)
D.charge += 25
M << "\blue SYSTEM ALERT: Energy boost detected!"
for (var/mob/living/carbon/human/H in range(effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
H.nutrition += 25
H << "\blue Your batteries gain a quick boost of energy!"
return 1
/datum/artifact_effect/cellcharge/DoEffectPulse()
@@ -37,4 +46,8 @@
for (var/obj/item/weapon/cell/D in M.contents)
D.charge += rand() * 100
M << "\blue SYSTEM ALERT: Energy boost detected!"
for (var/mob/living/carbon/human/H in range(effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
H.nutrition += rand() * 100
H << "\blue Your batteries gain a quick boost of energy!"
return 1
@@ -11,8 +11,11 @@
for (var/obj/item/weapon/cell/D in R.contents)
D.charge = max(D.charge - rand() * 100, 0)
R << "\blue SYSTEM ALERT: Energy drain detected!"
return 1
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC)
H.nutrition += rand() * 100 + 50
H << "\red You feel your batteries draining."
return 1
/datum/artifact_effect/celldrain/DoEffectAura()
@@ -26,6 +29,10 @@
for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge - 50,0)
M << "\red SYSTEM ALERT: Energy drain detected!"
for (var/mob/living/carbon/human/H in range(effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
H.nutrition -= 25
H << "\red You feel your batteries draining."
return 1
/datum/artifact_effect/celldrain/DoEffectPulse()
@@ -39,4 +46,8 @@
for (var/obj/item/weapon/cell/D in M.contents)
D.charge = max(D.charge - rand() * 150,0)
M << "\red SYSTEM ALERT: Energy drain detected!"
for (var/mob/living/carbon/human/H in range(effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
H.nutrition -= rand() * 100
H << "\red You feel your batteries draining."
return 1
@@ -15,7 +15,10 @@
/datum/artifact_effect/dnaswitch/DoEffectTouch(var/mob/toucher)
var/weakness = GetAnomalySusceptibility(toucher)
if(ishuman(toucher) && prob(weakness * 100))
toucher << pick("\green You feel a little different.",\
var/mob/living/carbon/human/H = toucher
if(H.species.flags & IS_SYNTHETIC)
return 1
H << pick("\green You feel a little different.",\
"\green You feel very strange.",\
"\green Your stomach churns.",\
"\green Your skin feels loose.",\
@@ -23,15 +26,17 @@
"\green You feel a tingling sensation in your chest.",\
"\green Your entire body vibrates.")
if(prob(75))
scramble(1, toucher, weakness * severity)
scramble(1, H, weakness * severity)
else
scramble(0, toucher, weakness * severity)
scramble(0, H, weakness * severity)
return 1
/datum/artifact_effect/dnaswitch/DoEffectAura()
if(holder)
for(var/mob/living/carbon/human/H in range(src.effectrange,holder))
var/weakness = GetAnomalySusceptibility(H)
if(H.species.flags & IS_SYNTHETIC)
return 1
if(prob(weakness * 100))
if(prob(30))
H << pick("\green You feel a little different.",\
@@ -50,6 +55,8 @@
if(holder)
for(var/mob/living/carbon/human/H in range(200, holder))
var/weakness = GetAnomalySusceptibility(H)
if(H.species.flags & IS_SYNTHETIC)
return 1
if(prob(weakness * 100))
if(prob(75))
H << pick("\green You feel a little different.",\
@@ -13,6 +13,8 @@
if(ishuman(toucher))
var/mob/living/carbon/human/H = toucher
if(H.species.flags & IS_SYNTHETIC)
return 1
for(var/datum/organ/external/affecting in H.organs)
if(affecting && istype(affecting))
affecting.heal_damage(25 * weakness, 25 * weakness)
@@ -8,6 +8,10 @@
var/weakness = GetAnomalySusceptibility(toucher)
if(iscarbon(toucher) && prob(weakness * 100))
var/mob/living/carbon/C = toucher
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(H.species.flags & IS_SYNTHETIC)
return 1
C << "\red A painful discharge of energy strikes you!"
C.adjustOxyLoss(rand(5,25) * weakness)
C.adjustToxLoss(rand(5,25) * weakness)
@@ -24,6 +28,10 @@
for (var/mob/living/carbon/C in range(src.effectrange,holder))
var/weakness = GetAnomalySusceptibility(C)
if(prob(weakness * 100))
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(H.species.flags & IS_SYNTHETIC)
return 1
if(prob(10))
C << "\red You feel a painful force radiating from something nearby."
C.adjustBruteLoss(1 * weakness)
@@ -38,6 +46,10 @@
for (var/mob/living/carbon/C in range(effectrange, holder))
var/weakness = GetAnomalySusceptibility(C)
if(prob(weakness * 100))
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(H.species.flags & IS_SYNTHETIC)
return 1
C << "\red A wave of painful energy strikes you!"
C.adjustBruteLoss(3 * weakness)
C.adjustFireLoss(3 * weakness)
@@ -14,6 +14,13 @@
R.adjustBruteLoss(rand(-10,-30))
R.adjustFireLoss(rand(-10,-30))
return 1
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC)
H << "\blue The damage to your body appears to be mending itself."
H.adjustBruteLoss(rand(-10,-30))
H.adjustFireLoss(rand(-10,-30))
return 1
/datum/artifact_effect/roboheal/DoEffectAura()
if(holder)
@@ -23,6 +30,12 @@
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
M.updatehealth()
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
H << "\blue The damage to your body appears to be mending itself."
H.adjustBruteLoss(-1)
H.adjustFireLoss(-1)
H.updatehealth()
return 1
/datum/artifact_effect/roboheal/DoEffectPulse()
@@ -32,4 +45,10 @@
M.adjustBruteLoss(-10)
M.adjustFireLoss(-10)
M.updatehealth()
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
H << "\blue The damage to your body appears to be mending itself."
H.adjustBruteLoss(-10)
H.adjustFireLoss(-10)
H.updatehealth()
return 1
@@ -14,6 +14,13 @@
R.adjustBruteLoss(rand(10,50))
R.adjustFireLoss(rand(10,50))
return 1
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.flags & IS_SYNTHETIC)
H << "\red The metal chassis of your body starts to crumple and heat up!"
H.adjustBruteLoss(rand(10,50))
H.adjustFireLoss(rand(10, 50))
return 1
/datum/artifact_effect/robohurt/DoEffectAura()
if(holder)
@@ -22,6 +29,12 @@
M.adjustBruteLoss(1)
M.adjustFireLoss(1)
M.updatehealth()
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
if(prob(10)) H << "\red Your screen flickers and your servos buzz."
H.adjustBruteLoss(1)
H.adjustFireLoss(1)
H.updatehealth()
return 1
/datum/artifact_effect/robohurt/DoEffectPulse()
@@ -31,4 +44,10 @@
M.adjustBruteLoss(10)
M.adjustFireLoss(10)
M.updatehealth()
for (var/mob/living/carbon/human/H in range(src.effectrange,holder))
if(H.species.flags & IS_SYNTHETIC)
H << "\red Your screen flickers and your servos buzz."
H.adjustBruteLoss(10)
H.adjustFireLoss(10)
H.updatehealth()
return 1
@@ -12,7 +12,10 @@
var/weakness = GetAnomalySusceptibility(toucher)
if(ishuman(toucher) && prob(weakness * 100))
var/mob/living/carbon/human/H = toucher
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
if(H.species.flags & IS_SYNTHETIC)
H << pick("\blue Your core processor begins to slow down.","\blue Your sensory input begins to slow down.")
else
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
H.drowsyness = min(H.drowsyness + rand(5,25) * weakness, 50 * weakness)
H.eye_blurry = min(H.eye_blurry + rand(1,3) * weakness, 50 * weakness)
return 1
@@ -26,7 +29,10 @@
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
if(prob(10))
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
if(H.species.flags & IS_SYNTHETIC)
H << pick("\blue Your core processor begins to slow down.","\blue Your sensory input begins to slow down.")
else
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
H.drowsyness = min(H.drowsyness + 1 * weakness, 25 * weakness)
H.eye_blurry = min(H.eye_blurry + 1 * weakness, 25 * weakness)
for (var/mob/living/silicon/robot/R in range(src.effectrange,holder))
@@ -36,9 +42,13 @@
/datum/artifact_effect/sleepy/DoEffectPulse()
if(holder)
for(var/mob/living/carbon/human/H in range(src.effectrange, holder))
var/weakness = GetAnomalySusceptibility(H)
if(prob(weakness * 100))
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
if(H.species.flags & IS_SYNTHETIC)
H << pick("\blue Your core processor begins to slow down.","\blue Your sensory input begins to slow down.")
else
H << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.")
H.drowsyness = min(H.drowsyness + rand(5,15) * weakness, 50 * weakness)
H.eye_blurry = min(H.eye_blurry + rand(5,15) * weakness, 50 * weakness)
for (var/mob/living/silicon/robot/R in range(src.effectrange,holder))