From c3b916fb4dacb9dcd9080ebd94f4a1dadca43658 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 26 Jan 2020 00:00:42 -0700 Subject: [PATCH] clockcult limits --- .../clockcult/clock_effects/clock_sigils.dm | 10 ++++++++-- code/modules/antagonists/clockcult/clock_scripture.dm | 10 ++++++++-- .../clockcult/clock_scriptures/scripture_drivers.dm | 3 ++- .../clockcult/clock_scriptures/scripture_scripts.dm | 5 ++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index eb7f83735d..c9f8a53aab 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -278,9 +278,15 @@ sigil_name = "Vitality Matrix" var/revive_cost = 150 var/sigil_active = FALSE + var/min_drain_health = -INFINITY + var/can_dust = TRUE var/animation_number = 3 //each cycle increments this by 1, at 4 it produces an animation and resets var/static/list/damage_heal_order = list(CLONE, TOX, BURN, BRUTE, OXY) //we heal damage in this order +/obj/effect/clockwork/sigil/vitality/neutered + min_drain_health = 20 + can_dust = FALSE + /obj/effect/clockwork/sigil/vitality/examine(mob/user) . = ..() if(is_servant_of_ratvar(user) || isobserver(user)) @@ -305,7 +311,7 @@ animation_number++ if(!is_servant_of_ratvar(L)) var/vitality_drained = 0 - if(L.stat == DEAD && !consumed_vitality) + if(L.stat == DEAD && !consumed_vitality && can_dust) consumed_vitality = TRUE //Prevent the target from being consumed multiple times vitality_drained = L.maxHealth var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src)) @@ -317,7 +323,7 @@ if(!L.dropItemToGround(W)) qdel(W) L.dust() - else + else if(L.health > min_drain_health) if(!GLOB.ratvar_awakens && L.stat == CONSCIOUS) vitality_drained = L.adjustToxLoss(1, forced = TRUE) else diff --git a/code/modules/antagonists/clockcult/clock_scripture.dm b/code/modules/antagonists/clockcult/clock_scripture.dm index 753de786dc..d2ee044e28 100644 --- a/code/modules/antagonists/clockcult/clock_scripture.dm +++ b/code/modules/antagonists/clockcult/clock_scripture.dm @@ -30,6 +30,7 @@ Applications: 8 servants, 3 caches, and 100 CV var/primary_component var/important = FALSE //important scripture will be italicized in the slab's interface var/sort_priority = 1 //what position the scripture should have in a list of scripture. Should be based off of component costs/reqs, but you can't initial() lists. + var/require_full_power = FALSE //requires the user to be a full, non neutered servant of ratvar //messages for offstation scripture recital, courtesy ratvar's generals(and neovgre) var/static/list/neovgre_penalty = list("Go to the station.", "Useless.", "Don't waste time.", "Pathetic.", "Wasteful.") @@ -77,6 +78,8 @@ Applications: 8 servants, 3 caches, and 100 CV /datum/clockwork_scripture/proc/can_recite() //If the words can be spoken if(!invoker || !slab || invoker.get_active_held_item() != slab) return FALSE + if(!is_servant_of_ratvar(invoker, require_full_power)) + return FALSE if(!invoker.can_speak_vocal()) to_chat(invoker, "You are unable to speak the words of the scripture!") return FALSE @@ -236,18 +239,21 @@ Applications: 8 servants, 3 caches, and 100 CV return FALSE return TRUE +/datum/clockwork_scripture/create_object/proc/get_spawn_path(mob/user) + return object_path + /datum/clockwork_scripture/create_object/scripture_effects() if(creator_message && observer_message) invoker.visible_message(observer_message, creator_message) else if(creator_message) to_chat(invoker, creator_message) - var/obj/O = new object_path (get_turf(invoker)) + var/to_spawn = get_spawn_path(invoker) + var/obj/O = new to_spawn(get_turf(invoker)) O.ratvar_act() //update the new object so it gets buffed if ratvar is alive if(isitem(O) && put_object_in_hands) invoker.put_in_hands(O) return TRUE - //Used specifically to create construct shells. /datum/clockwork_scripture/create_object/construct put_object_in_hands = FALSE diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm index 4ab481cfe2..6751f94588 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm @@ -88,7 +88,7 @@ sort_priority = 4 quickbind = TRUE quickbind_desc = "Creates a Sigil of Submission, which will convert non-Servants that remain on it." - + requires_full_power = TRUE //Kindle: Charges the slab with blazing energy. It can be released to stun and silence a target. /datum/clockwork_scripture/ranged_ability/kindle @@ -211,6 +211,7 @@ quickbind = TRUE quickbind_desc = "Returns you to Reebe." var/client_color + requires_full_power = TRUE /datum/clockwork_scripture/abscond/check_special_requirements() if(is_reebe(invoker.z)) diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm index 4e1a5b42cb..fb32eda309 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm @@ -50,7 +50,6 @@ return FALSE return ..() - //Vitality Matrix: Creates a sigil which will drain health from nonservants and can use that health to heal or even revive servants. /datum/clockwork_scripture/create_object/vitality_matrix descname = "Trap, Damage to Healing" @@ -77,6 +76,10 @@ return FALSE return ..() +/datum/clockwork_Scripture/create_object/vitality_matrix/get_spawn_path(mob/user) + if(!is_servant_of_ratvar(user, TRUE)) + return /obj/effect/clockwork/sigil/vitality/neutered + return ..() //Judicial Visor: Creates a judicial visor, which can smite an area. /datum/clockwork_scripture/create_object/judicial_visor