From 505dc8f0570d6032673d5fce2b52d2d88b0fd95b Mon Sep 17 00:00:00 2001
From: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Date: Sat, 26 Dec 2020 18:54:04 +1100
Subject: [PATCH] Uranium Golems: Punch to Irradiate, not Exist to Irradiate
(#55602)
* Uranium golems no longer irradiate by mere presence. Instead, they irradiate by punching people. Also some statistic changes including durability from brute damage, punch damage, etc. Also uranium golems can wear engineering clothes
* Adds radiation emissions from being struck as a uranium golem
---
code/modules/clothing/shoes/miscellaneous.dm | 1 +
code/modules/clothing/suits/miscellaneous.dm | 1 +
.../clothing/under/jobs/engineering.dm | 1 +
.../carbon/human/species_types/golems.dm | 49 +++++++++++++++----
4 files changed, 42 insertions(+), 10 deletions(-)
diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm
index 3c8e4fc0f57..13ae1e4f2fe 100644
--- a/code/modules/clothing/shoes/miscellaneous.dm
+++ b/code/modules/clothing/shoes/miscellaneous.dm
@@ -186,6 +186,7 @@
equip_delay_other = 40
pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes
lace_time = 8 SECONDS
+ species_exception = list(/datum/species/golem/uranium)
/obj/item/clothing/shoes/workboots/mining
name = "mining boots"
diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm
index 89a0c4be332..a8ca6ba29d2 100644
--- a/code/modules/clothing/suits/miscellaneous.dm
+++ b/code/modules/clothing/suits/miscellaneous.dm
@@ -634,6 +634,7 @@
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 20, FIRE = 30, ACID = 45)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman, /obj/item/t_scanner, /obj/item/construction/rcd, /obj/item/pipe_dispenser, /obj/item/toy, /obj/item/storage/fancy/cigarettes, /obj/item/lighter)
hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering
+ species_exception = list(/datum/species/golem/uranium)
/obj/item/clothing/head/hooded/winterhood/engineering
icon_state = "winterhood_engineer"
diff --git a/code/modules/clothing/under/jobs/engineering.dm b/code/modules/clothing/under/jobs/engineering.dm
index 30c58902013..a6e212a1f97 100644
--- a/code/modules/clothing/under/jobs/engineering.dm
+++ b/code/modules/clothing/under/jobs/engineering.dm
@@ -47,6 +47,7 @@
inhand_icon_state = "engi_suit"
armor = list(MELEE = 0, BULLET = 0, LASER = 0,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 10, FIRE = 60, ACID = 20)
resistance_flags = NONE
+ species_exception = list(/datum/species/golem/uranium)
/obj/item/clothing/under/rank/engineering/engineer/hazard
name = "engineer's hazard jumpsuit"
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index 286290cf000..fbadb65b6d3 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -312,27 +312,56 @@
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
return 1
-//Radioactive
+//Radioactive puncher, hits for burn but only as hard as human, slightly more durable against brute but less against everything else
/datum/species/golem/uranium
name = "Uranium Golem"
id = "uranium golem"
fixed_mut_color = "7f0"
meat = /obj/item/stack/ore/uranium
- info_text = "As an Uranium Golem, you emit radiation pulses every once in a while. It won't harm fellow golems, but organic lifeforms will be affected."
-
+ info_text = "As an Uranium Golem, your very touch burns and irradiates organic lifeforms. You don't hit as hard as most golems, but you are far more durable against blunt force trauma."
+ attack_verb = "burn"
+ attack_sound = 'sound/weapons/sear.ogg'
+ attack_type = BURN
var/last_event = 0
var/active = null
+ armor = 40
+ brutemod = 0.5
+ punchdamagelow = 1
+ punchdamagehigh = 10
+ punchstunthreshold = 9
prefix = "Uranium"
special_names = list("Oxide", "Rod", "Meltdown", "235")
+ COOLDOWN_DECLARE(radiation_emission_cooldown)
-/datum/species/golem/uranium/spec_life(mob/living/carbon/human/H)
- if(!active)
- if(world.time > last_event+30)
- active = 1
- radiation_pulse(H, 50)
- last_event = world.time
- active = null
+/datum/species/golem/uranium/proc/radiation_emission(mob/living/carbon/human/H)
+ if(!COOLDOWN_FINISHED(src, radiation_emission_cooldown))
+ return
+ else
+ radiation_pulse(H, 50)
+ COOLDOWN_START(src, radiation_emission_cooldown, 2 SECONDS)
+
+/datum/species/golem/uranium/spec_unarmedattacked(mob/living/carbon/human/user, mob/living/carbon/human/target)
+ . = ..()
+ var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
+ var/radiation_block = target.run_armor_check(affecting, RAD)
+ ///standard damage roll for use in determining how much you irradiate per punch
+ var/attacker_irradiate_value = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh)
+ target.apply_effect(attacker_irradiate_value*5, EFFECT_IRRADIATE, radiation_block)
+
+/datum/species/golem/uranium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
..()
+ if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && M != H && M.a_intent != INTENT_HELP)
+ radiation_emission(H)
+
+/datum/species/golem/uranium/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
+ ..()
+ if(COOLDOWN_FINISHED(src, radiation_emission_cooldown) && user != H)
+ radiation_emission(H)
+
+/datum/species/golem/uranium/on_hit(obj/projectile/P, mob/living/carbon/human/H)
+ ..()
+ if(COOLDOWN_FINISHED(src, radiation_emission_cooldown))
+ radiation_emission(H)
//Immune to physical bullets and resistant to brute, but very vulnerable to burn damage. Dusts on death.
/datum/species/golem/sand