diff --git a/code/__DEFINES/combat_defines.dm b/code/__DEFINES/combat_defines.dm index 9135ae16339..b8498765152 100644 --- a/code/__DEFINES/combat_defines.dm +++ b/code/__DEFINES/combat_defines.dm @@ -129,16 +129,16 @@ #define WEAPON_MEDIUM 2 #define WEAPON_HEAVY 3 -//His Grace. -#define HIS_GRACE_SATIATED 0 //He hungers not. If bloodthirst is set to this, His Grace is asleep. -#define HIS_GRACE_PECKISH 20 //Slightly hungry. -#define HIS_GRACE_HUNGRY 60 //Getting closer. Increases damage up to a minimum of 20. -#define HIS_GRACE_FAMISHED 100 //Dangerous. Increases damage up to a minimum of 25 and cannot be dropped. -#define HIS_GRACE_STARVING 120 //Incredibly close to breaking loose. Increases damage up to a minimum of 30. -#define HIS_GRACE_CONSUME_OWNER 140 //His Grace consumes His owner at this point and becomes aggressive. -#define HIS_GRACE_FALL_ASLEEP 160 //If it reaches this point, He falls asleep and resets. +#define HIS_GRACE_SATIATED 0 // He hungers not. If bloodthirst is set to this, His Grace is asleep. +#define HIS_GRACE_PECKISH 20 // Slightly hungry. +#define HIS_GRACE_HUNGRY 60 // Getting closer. +#define HIS_GRACE_FAMISHED 100 // Dangerously close. +#define HIS_GRACE_STARVING 120 // Incredibly close to breaking loose. +#define HIS_GRACE_CONSUME_OWNER 140 // His Grace consumes His owner at this point and becomes aggressive. +#define HIS_GRACE_FALL_ASLEEP 160 // If it reaches this point, He falls asleep and resets. -#define HIS_GRACE_FORCE_BONUS 4 //How much force is gained per kill. +#define HIS_GRACE_FORCE_BONUS 5 // How much force is gained per kill. +#define ASCEND_BONUS 20 // How much force we get on ascend per kill #define EXPLODE_NONE 0 //Don't even ask me why we need this. #define EXPLODE_DEVASTATE 1 diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 2e8e78b100a..1aab56c9d8a 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -6,6 +6,8 @@ tick_interval = 4 alert_type = /obj/screen/alert/status_effect/his_grace var/bloodlust = 0 + /// Attached His Grace toolbox + var/obj/item/his_grace/toolbox /obj/screen/alert/status_effect/his_grace name = "His Grace" @@ -18,7 +20,8 @@ var/datum/status_effect/his_grace/HG = attached_effect desc += "
Current Bloodthirst: [HG.bloodlust]\
Becomes undroppable at [HIS_GRACE_FAMISHED]\ -
Will consume you at [HIS_GRACE_CONSUME_OWNER]" +
Will consume you at [HIS_GRACE_CONSUME_OWNER]\ +
You have offered [HG.toolbox ? HG.toolbox.victims : 0] out of [HG.toolbox.victims_needed] sacrifices needed before ascension." ..() /datum/status_effect/his_grace/on_apply() @@ -33,6 +36,7 @@ held_items += owner.l_hand held_items += owner.r_hand for(var/obj/item/his_grace/HG in held_items) + toolbox = HG if(HG.bloodthirst > bloodlust) bloodlust = HG.bloodthirst if(HG.awakened) @@ -52,6 +56,7 @@ add_attack_logs(owner, owner, "lost His Grace's stun immunity", ATKLOG_ALL) if(islist(owner.stun_absorption) && owner.stun_absorption["hisgrace"]) owner.remove_stun_absorption("hisgrace") + toolbox = null /datum/status_effect/shadow_mend id = "shadow_mend" diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm index 74731a1f18d..7766452893d 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -1,9 +1,9 @@ -//His Grace is a very special weapon granted only to traitor chaplains. -//When awakened, He thirsts for blood and begins ticking a "bloodthirst" counter. -//The wielder of His Grace is immune to stuns and gradually heals. -//If the wielder fails to feed His Grace in time, He will devour them and become incredibly aggressive. -//Leaving His Grace alone for some time will reset His thirst and put Him to sleep. -//Using His Grace effectively requires extreme speed and care. +// His Grace is a very special weapon granted only to traitor chaplains. +// When awakened, He thirsts for blood and begins ticking a "bloodthirst" counter. +// The wielder of His Grace is immune to stuns and gradually heals. +// If the wielder fails to feed His Grace in time, He will devour them and become incredibly aggressive. +// Leaving His Grace alone for some time will reset His thirst and put Him to sleep. +// Using His Grace effectively requires extreme speed and care. /obj/item/his_grace name = "artistic toolbox" @@ -19,13 +19,16 @@ hitsound = 'sound/weapons/smash.ogg' drop_sound = 'sound/items/handling/toolbox_drop.ogg' pickup_sound = 'sound/items/handling/toolbox_pickup.ogg' + + /// Is our little toolbox awake? var/awakened = FALSE + /// How hungry is His Grace? var/bloodthirst = HIS_GRACE_SATIATED var/prev_bloodthirst = HIS_GRACE_SATIATED var/force_bonus = 0 var/ascended = FALSE + var/victims = 0 var/victims_needed = 25 - var/ascend_bonus = 15 /obj/item/his_grace/Initialize(mapload) . = ..() @@ -69,22 +72,24 @@ /obj/item/his_grace/examine(mob/user) . = ..() - if(awakened) - switch(bloodthirst) - if(HIS_GRACE_SATIATED to HIS_GRACE_PECKISH) - . += "[src] isn't very hungry. Not yet." - if(HIS_GRACE_PECKISH to HIS_GRACE_HUNGRY) - . += "[src] would like a snack." - if(HIS_GRACE_HUNGRY to HIS_GRACE_FAMISHED) - . += "[src] is quite hungry now." - if(HIS_GRACE_FAMISHED to HIS_GRACE_STARVING) - . += "[src] is openly salivating at the sight of you. Be careful." - if(HIS_GRACE_STARVING to HIS_GRACE_CONSUME_OWNER) - . += "You walk a fine line. [src] is very close to devouring you." - if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP) - . += "[src] is shaking violently and staring directly at you." - else + + if(!awakened) . += "[src] is latched closed." + return + + switch(bloodthirst) + if(HIS_GRACE_SATIATED to HIS_GRACE_PECKISH) + . += "[src] isn't very hungry. Not yet." + if(HIS_GRACE_PECKISH to HIS_GRACE_HUNGRY) + . += "[src] would like a snack." + if(HIS_GRACE_HUNGRY to HIS_GRACE_FAMISHED) + . += "[src] is quite hungry now." + if(HIS_GRACE_FAMISHED to HIS_GRACE_STARVING) + . += "[src] is openly salivating at the sight of you. Be careful." + if(HIS_GRACE_STARVING to HIS_GRACE_CONSUME_OWNER) + . += "You walk a fine line. [src] is very close to devouring you." + if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP) + . += "[src] is shaking violently and staring directly at you." /obj/item/his_grace/relaymove(mob/living/user, direction) //Allows changelings, etc. to climb out of Him after they revive, provided He isn't active if(!awakened) @@ -95,29 +100,37 @@ if(!bloodthirst) drowse() return - if(bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended) - adjust_bloodthirst(0.5 + FLOOR(length(contents) * 0.25, 1)) + if(bloodthirst < HIS_GRACE_CONSUME_OWNER) + adjust_bloodthirst(0.5 + round(length(contents) * (1 / 6), 1)) else adjust_bloodthirst(0.5) //don't cool off rapidly once we're at the point where His Grace consumes all. - var/mob/living/master = get_atom_on_turf(src, /mob/living) - var/list/held_items = list() - if(istype(master)) - held_items += master.l_hand - held_items += master.r_hand - if(istype(master) && (src in held_items)) - switch(bloodthirst) - if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP) - master.visible_message("[src] turns on [master]!", "[src] turns on you!") - do_attack_animation(master, null, src) - master.emote("scream") - master.remove_status_effect(STATUS_EFFECT_HISGRACE) - flags &= ~NODROP - master.Weaken(6 SECONDS) - master.adjustBruteLoss(1000) - playsound(master, 'sound/effects/splat.ogg', 100, FALSE) - else - master.apply_status_effect(STATUS_EFFECT_HISGRACE) + + var/mob/living/carbon/human/master = get_atom_on_turf(src, /mob/living/carbon/human) // Only humans may wield Him + if(!master || !istype(master)) + go_rabid() return + + if(!(src in list(master.l_hand, master.r_hand))) + go_rabid() + return + + if(bloodthirst <= HIS_GRACE_CONSUME_OWNER || ascended) + master.apply_status_effect(STATUS_EFFECT_HISGRACE) + return + + // They didn't sacrifice enough people, so this is where we go ham + master.visible_message("[src] turns on [master]!", + "[src] turns on you!") + do_attack_animation(master, used_item = src) + master.emote("scream") + master.remove_status_effect(STATUS_EFFECT_HISGRACE) + flags &= ~NODROP + master.Weaken(6 SECONDS) + master.adjustBruteLoss(1000) + playsound(master, 'sound/effects/splat.ogg', 100, FALSE) + go_rabid() + +/obj/item/his_grace/proc/go_rabid() // She Caerbannog on my rabid till I- forceMove(get_turf(src)) //no you can't put His Grace in a locker you just have to deal with Him if(bloodthirst < HIS_GRACE_CONSUME_OWNER) return @@ -182,30 +195,38 @@ /obj/item/his_grace/proc/consume(mob/living/meal) //Here's your dinner, Mr. Grace. if(!meal) return - var/victims = 0 + meal.visible_message("[src] swings open and devours [meal]!", "[src] consumes you!") meal.adjustBruteLoss(300) playsound(meal, 'sound/misc/desceration-02.ogg', 75, TRUE) playsound(src, 'sound/items/eatfood.ogg', 100, TRUE) meal.forceMove(src) - force_bonus += HIS_GRACE_FORCE_BONUS + + force_bonus += (ascended ? ASCEND_BONUS : HIS_GRACE_FORCE_BONUS) + prev_bloodthirst = bloodthirst - if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER) - bloodthirst = max(length(contents), 1) //Never fully sated, and His hunger will only grow. + if(ascended) // Otherwise there might be fractions where His Grace is droppable while ascended + bloodthirst = prev_bloodthirst + else if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER) + bloodthirst = length(contents) //Never fully sated, and His hunger will only grow. else bloodthirst = HIS_GRACE_CONSUME_OWNER - for(var/mob/living/C in contents) - if(C.mind) - victims++ + + if(meal.mind) + victims++ if(victims >= victims_needed) ascend() update_stats() /obj/item/his_grace/proc/adjust_bloodthirst(amt) prev_bloodthirst = bloodthirst - if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended) + if(ascended) + bloodthirst = HIS_GRACE_CONSUME_OWNER // As to maximize their healing buff + update_stats() + return + if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER) bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER) - else if(!ascended) + else bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP) update_stats() @@ -250,7 +271,6 @@ /obj/item/his_grace/proc/ascend() if(ascended) return - force_bonus += ascend_bonus desc = "A legendary toolbox and a distant artifact from The Age of Three Powers. On its three latches engraved are the words \"The Sun\", \"The Moon\", and \"The Stars\". The entire toolbox has the words \"The World\" engraved into its sides." icon_state = "his_grace_ascended" item_state = "toolbox_gold"