From c8aa1f79f010748668647f4352d32a1ba49dfc6a Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Mon, 21 Mar 2016 19:47:00 -0400 Subject: [PATCH] Shadowling Species Handling Refactor --- code/game/gamemodes/shadowling/shadowling.dm | 28 +++++++++++++++++-- .../special_shadowling_abilities.dm | 2 -- code/modules/mob/living/carbon/human/life.dm | 26 ----------------- .../mob/living/carbon/human/species/shadow.dm | 17 +++++++---- .../living/carbon/human/species/species.dm | 3 -- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 6f1a4473381..c522bfd236d 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -1,3 +1,7 @@ +#define LIGHT_DAM_THRESHOLD 4 +#define LIGHT_HEAL_THRESHOLD 2 +#define LIGHT_DAMAGE_TAKEN 7 + /* SHADOWLING: A gamemode based on previously-run events @@ -294,15 +298,35 @@ Made by Xhuis icobase = 'icons/mob/human_races/r_shadowling.dmi' deform = 'icons/mob/human_races/r_shadowling.dmi' - light_effect_amp = 1 blood_color = "#555555" flesh_color = "#222222" - flags = NO_BLOOD | NO_BREATHE | NO_SCAN | NO_INTORGANS + flags = NO_BLOOD | NO_BREATHE | RADIMMUNE | NO_INTORGANS burn_mod = 1.5 //1.5x burn damage, 2x is excessive + hot_env_multiplier = 1.5 silent_steps = 1 +/datum/species/shadow/ling/handle_life(var/mob/living/carbon/human/H) + if(!H.weakeyes) H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs + var/light_amount = 0 + H.nutrition = 450 //i aint never get hongry + if(isturf(H.loc)) + var/turf/T = H.loc + light_amount = T.get_lumcount()*10 + if(light_amount > LIGHT_DAM_THRESHOLD && !H.incorporeal_move) //Can survive in very small light levels. Also doesn't take damage while incorporeal, for shadow walk purposes + H.take_overall_damage(0, LIGHT_DAMAGE_TAKEN) + if(H.stat != DEAD) + H << "The light burns you!" //Message spam to say "GET THE FUCK OUT" + H << 'sound/weapons/sear.ogg' + else if(light_amount < LIGHT_HEAL_THRESHOLD) + H.heal_overall_damage(5,5) + H.adjustToxLoss(-5) + H.adjustBrainLoss(-25) //Shad O. Ling gibbers, "CAN U BE MY THRALL?!!" + H.adjustCloneLoss(-1) + H.SetWeakened(0) + H.SetStunned(0) + /datum/game_mode/proc/update_shadow_icons_added(datum/mind/shadow_mind) var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW] shadow_hud.join_hud(shadow_mind.current) diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 49d0dfcbcc1..0b33c2f2451 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -82,8 +82,6 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.undershirt = "None" H.socks = "None" H.faction |= "faithless" - if(!H.weakeyes) - H.weakeyes = 1 H.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(usr), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/shadowling(usr), slot_shoes) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 2b80da048a4..a3a9a2721e4 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -731,32 +731,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc adjustOxyLoss(-(light_amount)) //TODO: heal wounds, heal broken limbs. - if(species.light_dam) - var/light_amount = 0 - if(isturf(loc)) - var/turf/T = loc - light_amount = T.get_lumcount()*10 - if(light_amount > species.light_dam && !incorporeal_move) //if there's enough light, start dying - if(species.light_effect_amp) - adjustFireLoss(4.7) //This gets multiplied by 1.5 due to Shadowling's innate fire weakness, so it ends up being about 7. - else - adjustFireLoss(1) - adjustBruteLoss(1) - src << "The light burns you!" - src << 'sound/weapons/sear.ogg' - else //heal in the dark - if(species.light_effect_amp) - adjustFireLoss(-5) - adjustBruteLoss(-5) - adjustBrainLoss(-25) //gibbering shadowlings are hilarious but also bad to have - adjustCloneLoss(-1) - SetWeakened(0) - SetStunned(0) - else - adjustFireLoss(-1) - adjustBruteLoss(-1) - - //The fucking FAT mutation is the greatest shit ever. It makes everyone so hot and bothered. if(species.flags & CAN_BE_FAT) if(FAT in mutations) diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index f0e724f0f10..55701b52d1c 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -7,7 +7,6 @@ default_language = "Galactic Common" unarmed_type = /datum/unarmed_attack/claws - light_dam = 2 darksight = 8 blood_color = "#CCCCCC" @@ -16,8 +15,8 @@ "brain" = /obj/item/organ/internal/brain ) - flags = NO_BLOOD | NO_BREATHE | NO_SCAN - bodyflags = FEET_NOSLIP + flags = NO_BLOOD | NO_BREATHE | RADIMMUNE + virus_immune = 1 dietflags = DIET_OMNI //the mutation process allowed you to now digest all foods regardless of initial race reagent_tag = PROCESS_ORG suicide_messages = list( @@ -26,5 +25,13 @@ "is twisting their own neck!", "is staring into the closest light source!") -/datum/species/shadow/handle_death(var/mob/living/carbon/human/H) - H.dust() \ No newline at end of file +/datum/species/shadow/handle_life(var/mob/living/carbon/human/H) + var/light_amount = 0 + if(isturf(H.loc)) + var/turf/T = H.loc + light_amount = T.get_lumcount()*10 + + if(light_amount > 2) //if there's enough light, start dying + H.take_overall_damage(1,1) + else if (light_amount < 2) //heal in the dark + H.heal_overall_damage(1,1) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index a003434c1a3..a60c26eabe4 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -55,9 +55,6 @@ var/brute_mod = null // Physical damage reduction/malus. var/burn_mod = null // Burn damage reduction/malus. - var/light_dam //Light level above which species takes damage, and below which it heals. - var/light_effect_amp //If 0, takes/heals 1 burn and brute per tick. Otherwise, both healing and damage effects are amplified. - var/total_health = 100 var/punchdamagelow = 0 //lowest possible punch damage var/punchdamagehigh = 9 //highest possible punch damage