Skip to content

Commit

Permalink
Fixes crazy artifact radiation
Browse files Browse the repository at this point in the history
- Artifacts no longer flat-radiate whole Z level when unluckily generated. Instead, they emit regular radiation similarly to supermatter or similar radiation sources.
  • Loading branch information
atlantiscze committed Oct 7, 2017
1 parent a3c1ad0 commit 0868cbe
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions code/modules/xenoarcheaology/effects/radiate.dm
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
/datum/artifact_effect/radiate
name = "radiation"
var/radiation_amount
var/radiation_strength
var/radiation_range

/datum/artifact_effect/radiate/New()
..()
radiation_amount = rand(1, 10)
radiation_strength = rand(10, 50)
effect_type = pick(EFFECT_PARTICLE, EFFECT_ORGANIC)

/datum/artifact_effect/radiate/DoEffectTouch(var/mob/living/user)
if(user)
user.apply_effect(radiation_amount * 5,IRRADIATE, blocked = user.getarmor(null, "rad"))
user.apply_effect(radiation_strength * 2,IRRADIATE, blocked = user.getarmor(null, "rad"))
user.updatehealth()
return 1

/datum/artifact_effect/radiate/DoEffectAura()
if(holder)
radiation_repository.flat_radiate(holder, radiation_amount, src.effectrange)
radiation_repository.radiate(holder, radiation_strength)
return 1

/datum/artifact_effect/radiate/DoEffectPulse()
if(holder)
radiation_repository.radiate(holder, ((radiation_amount * 25) * (sqrt(src.effectrange)))) //Need to get feedback on this
radiation_repository.radiate(holder, radiation_strength * rand(5, 10)) //Need to get feedback on this
return 1

0 comments on commit 0868cbe

Please sign in to comment.