From 3ea937e4ebc982cc700217a234912bd3633f3f09 Mon Sep 17 00:00:00 2001 From: Kyep Date: Tue, 9 Jan 2018 02:10:27 -0800 Subject: [PATCH 1/6] Adds option to limit sling unhatched duration --- code/controllers/configuration.dm | 4 ++++ code/game/gamemodes/shadowling/shadowling.dm | 7 +++++++ config/example/config.txt | 3 +++ 3 files changed, 14 insertions(+) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 7125eeec282..b93333c7372 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -68,6 +68,7 @@ var/assistantratio = 2 //how many assistants to security members var/traitor_objectives_amount = 2 + var/shadowling_max_age = 1800 var/max_maint_drones = 5 //This many drones can spawn, var/allow_drone_spawn = 1 //assuming the admin allow them to. @@ -260,6 +261,9 @@ if("jobs_have_minimal_access") config.jobs_have_minimal_access = 1 + if("shadowling_max_age") + config.shadowling_max_age = text2num(value) + if("log_ooc") config.log_ooc = 1 diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index f5fc513744a..2e0b8a19343 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -205,6 +205,13 @@ Made by Xhuis continue if(shadow.current.stat == DEAD) continue + if(world.time - round_start_time > (config.shadowling_max_age * 10)) + if(ishuman(shadow.current)) + var/mob/living/carbon/human/H = shadow.current + if(!istype(H.species, /datum/species/shadow)) + H.take_overall_damage(1, 0) + to_chat(H, "You cannot contain your shadowling essense any longer! You must hatch, or die!") + H << 'sound/weapons/sear.ogg' shadows_alive++ if(shadows_alive) return ..() diff --git a/config/example/config.txt b/config/example/config.txt index d575635baeb..d2f227d6e6d 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -95,6 +95,9 @@ PROBABILITY EXTENDED 2 PROBABILITY NUCLEAR 3 PROBABILITY ABDUCTION 0 +# MAXIMUM SECONDS SHADOWLINGS CAN REMAIN UNHATCHED BEFORE THEY TAKE DAMAGE +SHADOWLING_MAX_AGE 1800 + ## Hash out to disable random events during the round. ALLOW_RANDOM_EVENTS From 2b0839472dd9aef25671471c24c82b1e1daaae83 Mon Sep 17 00:00:00 2001 From: Kyep Date: Tue, 9 Jan 2018 02:38:11 -0800 Subject: [PATCH 2/6] Spartan request --- code/game/gamemodes/shadowling/shadowling.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 2e0b8a19343..aceed044ba5 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -200,6 +200,7 @@ Made by Xhuis /datum/game_mode/shadowling/check_finished() var/shadows_alive = 0 //and then shadowling was kill + var/shadow_nag_messages = list("You can barely hold yourself in this lesser form!", "The urge to become something greater is overwhelming!", "You feel a burning passion to hatch free of this shell and assume godhood!") for(var/datum/mind/shadow in shadows) //but what if shadowling was not kill? if(!istype(shadow.current,/mob/living/carbon/human) && !istype(shadow.current,/mob/living/simple_animal/ascendant_shadowling)) continue @@ -210,7 +211,7 @@ Made by Xhuis var/mob/living/carbon/human/H = shadow.current if(!istype(H.species, /datum/species/shadow)) H.take_overall_damage(1, 0) - to_chat(H, "You cannot contain your shadowling essense any longer! You must hatch, or die!") + to_chat(H, "[pick(shadow_nag_messages)]") H << 'sound/weapons/sear.ogg' shadows_alive++ if(shadows_alive) From 86743e91de7b778e17e336508d89cba7b3addd18 Mon Sep 17 00:00:00 2001 From: Kyep Date: Wed, 10 Jan 2018 00:33:14 -0800 Subject: [PATCH 3/6] Refactor --- code/game/gamemodes/shadowling/shadowling.dm | 18 +++++++++++------- .../shadowling/special_shadowling_abilities.dm | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index aceed044ba5..0321023e0f9 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -200,20 +200,24 @@ Made by Xhuis /datum/game_mode/shadowling/check_finished() var/shadows_alive = 0 //and then shadowling was kill - var/shadow_nag_messages = list("You can barely hold yourself in this lesser form!", "The urge to become something greater is overwhelming!", "You feel a burning passion to hatch free of this shell and assume godhood!") for(var/datum/mind/shadow in shadows) //but what if shadowling was not kill? - if(!istype(shadow.current,/mob/living/carbon/human) && !istype(shadow.current,/mob/living/simple_animal/ascendant_shadowling)) + if(!ishuman(shadow.current) && !istype(shadow.current,/mob/living/simple_animal/ascendant_shadowling)) continue if(shadow.current.stat == DEAD) continue - if(world.time - round_start_time > (config.shadowling_max_age * 10)) + shadows_alive++ + if(shadow.special_role == SPECIAL_ROLE_SHADOWLING && config.shadowling_max_age) if(ishuman(shadow.current)) var/mob/living/carbon/human/H = shadow.current if(!istype(H.species, /datum/species/shadow)) - H.take_overall_damage(1, 0) - to_chat(H, "[pick(shadow_nag_messages)]") - H << 'sound/weapons/sear.ogg' - shadows_alive++ + for(var/obj/effect/proc_holder/spell/targeted/shadowling_hatch/hatch_ability in shadow.spell_list) + hatch_ability.cycles_unused++ + if(!H.stunned && prob(20) && hatch_ability.cycles_unused > config.shadowling_max_age) + var/shadow_nag_messages = list("You can barely hold yourself in this lesser form!", "The urge to become something greater is overwhelming!", "You feel a burning passion to hatch free of this shell and assume godhood!") + H.take_overall_damage(0, 3) + to_chat(H, "[pick(shadow_nag_messages)]") + H << 'sound/weapons/sear.ogg' + if(shadows_alive) return ..() else diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 353fd328f4c..bc58db4b064 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -9,6 +9,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N range = -1 include_user = 1 action_icon_state = "hatch" + var/cycles_unused = 0 /obj/effect/proc_holder/spell/targeted/shadowling_hatch/cast(list/targets, mob/user = usr) if(user.stat || !ishuman(user) || !user || !is_shadow(user || isinspace(user))) From 702ef10c72bc38cc39da909db8889123fcc2925f Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 11 Jan 2018 16:29:25 -0800 Subject: [PATCH 4/6] default value = 0 --- code/controllers/configuration.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index b93333c7372..1e95c7b8977 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -68,7 +68,7 @@ var/assistantratio = 2 //how many assistants to security members var/traitor_objectives_amount = 2 - var/shadowling_max_age = 1800 + var/shadowling_max_age = 0 var/max_maint_drones = 5 //This many drones can spawn, var/allow_drone_spawn = 1 //assuming the admin allow them to. From 20431f119da0d15ba9f6a80ef7c344b6e2a0bb85 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 13 Jan 2018 18:02:01 -0800 Subject: [PATCH 5/6] Tiger request --- config/example/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/example/config.txt b/config/example/config.txt index d2f227d6e6d..2dcd5da6573 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -96,7 +96,7 @@ PROBABILITY NUCLEAR 3 PROBABILITY ABDUCTION 0 # MAXIMUM SECONDS SHADOWLINGS CAN REMAIN UNHATCHED BEFORE THEY TAKE DAMAGE -SHADOWLING_MAX_AGE 1800 +SHADOWLING_MAX_AGE 0 ## Hash out to disable random events during the round. ALLOW_RANDOM_EVENTS From 03ac41ad15ffc3c28207a60ae1f81402787a44f8 Mon Sep 17 00:00:00 2001 From: Kyep Date: Tue, 16 Jan 2018 05:09:08 -0800 Subject: [PATCH 6/6] Tiger request --- code/game/gamemodes/shadowling/shadowling.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 0321023e0f9..439d3cb237d 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -209,7 +209,7 @@ Made by Xhuis if(shadow.special_role == SPECIAL_ROLE_SHADOWLING && config.shadowling_max_age) if(ishuman(shadow.current)) var/mob/living/carbon/human/H = shadow.current - if(!istype(H.species, /datum/species/shadow)) + if(H.get_species() != "Shadow") for(var/obj/effect/proc_holder/spell/targeted/shadowling_hatch/hatch_ability in shadow.spell_list) hatch_ability.cycles_unused++ if(!H.stunned && prob(20) && hatch_ability.cycles_unused > config.shadowling_max_age)