Merge pull request #8531 from Kyep/shadowling_duties

Adds option to limit sling unhatched duration
This commit is contained in:
tigercat2000
2018-01-24 15:40:41 -08:00
committed by GitHub
4 changed files with 21 additions and 1 deletions
+4
View File
@@ -68,6 +68,7 @@
var/assistantratio = 2 //how many assistants to security members
var/traitor_objectives_amount = 2
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.
@@ -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
+13 -1
View File
@@ -201,11 +201,23 @@ Made by Xhuis
/datum/game_mode/shadowling/check_finished()
var/shadows_alive = 0 //and then shadowling was kill
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
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(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)
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, "<span class='userdanger'>[pick(shadow_nag_messages)]</span>")
H << 'sound/weapons/sear.ogg'
if(shadows_alive)
return ..()
else
@@ -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)))