From 8e9fb8eaaecaf2da37404201cbb430c5877b8cae Mon Sep 17 00:00:00 2001 From: Putnam Date: Mon, 17 Aug 2020 01:39:51 -0700 Subject: [PATCH] Buffs/hugboxes slaughter demons --- .../dynamic/dynamic_rulesets_midround.dm | 2 +- .../antagonists/slaughter/slaughter.dm | 76 ++++++++++++++----- 2 files changed, 58 insertions(+), 20 deletions(-) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index 6a7671cd5b..b29584aa58 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -538,7 +538,7 @@ name = "Slaughter Demon" config_tag = "slaughter_demon" antag_flag = ROLE_ALIEN - enemy_roles = list("Security Officer","Shaft Miner","Head of Security","Captain","Janitor","AI","Cyborg") + enemy_roles = list("Security Officer","Shaft Miner","Head of Security","Captain","Janitor","AI","Cyborg","Bartender") required_enemies = list(3,2,2,2,2,1,1,1,1,0) required_candidates = 1 weight = 4 diff --git a/code/modules/antagonists/slaughter/slaughter.dm b/code/modules/antagonists/slaughter/slaughter.dm index 3ae9cfcfb0..c2bf9ec8f6 100644 --- a/code/modules/antagonists/slaughter/slaughter.dm +++ b/code/modules/antagonists/slaughter/slaughter.dm @@ -65,6 +65,10 @@ var/wound_bonus_per_hit = 5 // How much our wound_bonus hitstreak bonus caps at (peak demonry) var/wound_bonus_hitstreak_max = 12 + // Keep the people we eat + var/list/consumed_mobs = list() + //buffs only happen when hearts are eaten, so this needs to be kept track separately + var/consumed_buff = 0 /mob/living/simple_animal/slaughter/Initialize() ..() @@ -111,8 +115,44 @@ /mob/living/simple_animal/slaughter/phasein() . = ..() add_movespeed_modifier(/datum/movespeed_modifier/slaughter) - addtimer(CALLBACK(src, .proc/remove_movespeed_modifier, /datum/movespeed_modifier/slaughter), 6 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE) + var/slowdown_time = 6 SECONDS + (0.5 * consumed_buff) + addtimer(CALLBACK(src, .proc/remove_movespeed_modifier, /datum/movespeed_modifier/slaughter), slowdown_time, TIMER_UNIQUE | TIMER_OVERRIDE) +/mob/living/simple_animal/slaughter/Destroy() + release_victims() + . = ..() + +/mob/living/simple_animal/slaughter/proc/release_victims() + if(!consumed_mobs) + return + + for(var/mob/living/M in consumed_mobs) + if(!M) + continue + var/turf/T = find_safe_turf() + if(!T) + T = get_turf(src) + M.forceMove(T) + +/mob/living/simple_animal/slaughter/proc/refresh_consumed_buff() + melee_damage_lower = 22.5 + (0.5 * consumed_buff) + melee_damage_upper = 22.5 + (1 * consumed_buff) + +/mob/living/simple_animal/slaughter/bloodcrawl_swallow(var/mob/living/victim) + if(consumed_mobs) + // Keep their corpse so rescue is possible + consumed_mobs += victim + victim.reagents?.add_reagent(/datum/reagent/preservahyde,3) // make it so that they don't decay in there + var/obj/item/organ/heart/heart = victim.getorganslot(ORGAN_SLOT_HEART) + if(heart) + qdel(heart) + consumed_buff++ + refresh_consumed_buff() + else + // Be safe and just eject the corpse + victim.forceMove(get_turf(victim)) + victim.exit_blood_effect() + victim.visible_message("[victim] falls out of the air, covered in blood, looking highly confused. And dead.") //The loot from killing a slaughter demon - can be consumed to allow the user to blood crawl /obj/item/organ/heart/demon @@ -177,9 +217,6 @@ prison of hugs." loot = list(/mob/living/simple_animal/pet/cat/kitten{name = "Laughter"}) - // Keep the people we hug! - var/list/consumed_mobs = list() - playstyle_string = "You are a laughter \ demon, a wonderful creature from another realm. You have a single \ desire: To hug and tickle.
\ @@ -194,10 +231,6 @@ released and fully healed, because in the end it's just a jape, \ sibling!
" -/mob/living/simple_animal/slaughter/laughter/Destroy() - release_friends() - . = ..() - /mob/living/simple_animal/slaughter/laughter/ex_act(severity) switch(severity) if(1) @@ -207,7 +240,22 @@ if(3) adjustBruteLoss(30) -/mob/living/simple_animal/slaughter/laughter/proc/release_friends() +/mob/living/simple_animal/slaughter/laughter/refresh_consumed_buff() + melee_damage_lower -= 0.5 // JAPES + melee_damage_upper += 1 + +/mob/living/simple_animal/slaughter/laughter/bloodcrawl_swallow(var/mob/living/victim) + if(consumed_mobs) + // Keep their corpse so rescue is possible + consumed_mobs += victim + refresh_consumed_buff() + else + // Be safe and just eject the corpse + victim.forceMove(get_turf(victim)) + victim.exit_blood_effect() + victim.visible_message("[victim] falls out of the air, covered in blood, looking highly confused. And dead.") + +/mob/living/simple_animal/slaughter/laughter/release_victims() if(!consumed_mobs) return @@ -222,13 +270,3 @@ M.grab_ghost(force = TRUE) playsound(T, feast_sound, 50, 1, -1) to_chat(M, "You leave [src]'s warm embrace, and feel ready to take on the world.") - -/mob/living/simple_animal/slaughter/laughter/bloodcrawl_swallow(var/mob/living/victim) - if(consumed_mobs) - // Keep their corpse so rescue is possible - consumed_mobs += victim - else - // Be safe and just eject the corpse - victim.forceMove(get_turf(victim)) - victim.exit_blood_effect() - victim.visible_message("[victim] falls out of the air, covered in blood, looking highly confused. And dead.")