From 38bd037b663a5489e206e53b071e7192f6fee30d Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Tue, 4 Oct 2022 14:14:04 -0500 Subject: [PATCH 1/2] box that mf up --- code/datums/status_effects/debuffs.dm | 16 ++++-- .../mining/equipment/gauntlet_styles.dm | 31 +++++++++++ .../mining/equipment/kinetic_crusher.dm | 55 +++++++++++++++++-- 3 files changed, 93 insertions(+), 9 deletions(-) create mode 100644 code/modules/mining/equipment/gauntlet_styles.dm diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 5fc0263952..2e7a7ea9d2 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -162,7 +162,7 @@ animate(filter, radius = 32, time = 15, size = 0, loop = -1) /datum/status_effect/grouped/stasis/proc/InterruptBiologicalLife() - return COMPONENT_INTERRUPT_LIFE_BIOLOGICAL + return COMPONENT_INTERRUPT_LIFE_BIOLOGICAL /datum/status_effect/grouped/stasis/tick() update_time_of_death() @@ -1186,13 +1186,19 @@ /datum/status_effect/cgau_conc id = "cgau_conc" - examine_text = "SUBJECTPRONOUN rocks from side to side, confused." + examine_text = "SUBJECTPRONOUN sways from side to side hesitantly!" duration = 5 SECONDS -/datum/status_effect/cgau_conc/on_creation(mob/living/new_owner, ...) +/datum/status_effect/cgau_conc/on_apply() . = ..() - new_owner.add_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion) + owner.add_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion) + if(ishostile(owner)) + var/mob/living/simple_animal/hostile/simple_owner = owner + simple_owner.ranged_cooldown_time *= 2.5 /datum/status_effect/cgau_conc/on_remove() - owner.remove_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion) . = ..() + owner.remove_movespeed_modifier(/datum/movespeed_modifier/gauntlet_concussion) + if(ishostile(owner)) + var/mob/living/simple_animal/hostile/simple_owner = owner + simple_owner.ranged_cooldown_time /= 2.5 diff --git a/code/modules/mining/equipment/gauntlet_styles.dm b/code/modules/mining/equipment/gauntlet_styles.dm new file mode 100644 index 0000000000..0706d50429 --- /dev/null +++ b/code/modules/mining/equipment/gauntlet_styles.dm @@ -0,0 +1,31 @@ +/datum/gauntlet_style + var/name = "Baseline" + var/desc = "There's no combos here, only bugs. Report this to a coder if you see this." + var/list/examine_movesets /// you're manually filling this out btw + +/datum/gauntlet_style/proc/on_apply(obj/item/kinetic_crusher/glaive/gauntlets/hands) + return // todo: changing variables per style + +/datum/gauntlet_style/proc/check_streak(mob/living/carbon/human/attacker, mob/living/defender, obj/item/kinetic_crusher/glaive/gauntlets/hands) + return FALSE + +#define BRAWLER_COMBO_CROSS "DH" +/datum/gauntlet_style/brawler + name = "Brawler" + desc = "Throwing a punch is, theoretically, simple. Throwing a punch with a destabilizing module strapped to your hand? ...A bit less simple." + examine_movesets = list("Disarm, Harm" = "One-Two Cross: Bonus damage. Chance of stunning.") + +/datum/gauntlet_style/brawler/check_streak(mob/living/carbon/human/attacker, mob/living/defender, obj/item/kinetic_crusher/glaive/gauntlets/hands) + if(hands.streak.findtext(BRAWLER_COMBO_CROSS)) + hands.streak = "" + crossCombo(attacker, defender) + return TRUE + return FALSE + +/datum/gauntlet_style/brawler/proc/crossCombo(attacker, defender) + defender.apply_damage(hands.detonation_damage/3, BRUTE, blocked = defender.getarmor(type = BOMB)) + playsound(attacker, 'sound/weapons/punch1.ogg', 100, 1) + D.visible_message("[attacker] delivers a solid one-two punch to [defender]!", \ + "[attacker] hits you with a solid one-two punch!") + +#undef BRAWLER_CROSS diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 988314d8d1..2036212fb9 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -244,9 +244,10 @@ /obj/item/kinetic_crusher/glaive/gauntlets name = "proto-kinetic gauntlets" - desc = "A pair of scaled-down proto-kinetic crusher destabilizer modules shoved into gauntlets and greaves, often used by \ - those who wish to spit in the eyes of God. Sacrifices outright damage for \ - a reliance on backstabs and the ability to give fauna concussions on a parry." + desc = "A pair of scaled-down proto-kinetic crusher destabilizer modules shoved into gauntlets and concealed greaves, \ + often fielded by those who wish to spit in the eyes of God. Sacrifices outright damage for \ + a reliance on backstabs and the ability to stagger fauna on a parry, \ + slowing them and increasing the time between their special attacks." attack_verb = list("pummeled", "punched", "jabbed", "hammer-fisted", "uppercut", "slammed") hitsound = 'sound/weapons/resonator_blast.ogg' sharpness = SHARP_NONE // use your survival dagger or smth @@ -256,6 +257,27 @@ "Fingerless" = "crusher-hands-bare") detonation_damage = 45 // 60 on wield, compared to normal crusher's 70 backstab_bonus = 70 // 130 on backstab though + var/combo_on_anything = FALSE // @admins if you're varediting this you don't get to whine at me + var/streak = "" // you know what time it is + var/max_streak_length = 2 // changes with style module + var/mob/living/current_target + var/datum/gauntlet_style/active_style + +/obj/item/kinetic_crusher/glaive/gauntlets/Initialize(mapload) + . = ..() + active_style = new /datum/gauntlet_style/brawler + +/obj/item/kinetic_crusher/glaive/gauntlets/examine(mob/living/user) + . = ..() + . += "According to a very small display, the currently loaded style is \"[active_style.name]\"." + +/* wip todo +/obj/item/kinetic_crusher/glaive/gauntlets/examine_more(mob/user) + return +*/ + +/obj/item/kinetic_crusher/glaive/gauntlets/style_change(datum/gauntlet_style/new_style) + new_style.on_apply(src) /obj/item/kinetic_crusher/glaive/gauntlets/ComponentInitialize() . = ..() @@ -265,7 +287,7 @@ . = ..() if(isliving(attacker)) var/mob/living/liv_atk = attacker - if(liv_atk.mob_size >= MOB_SIZE_LARGE && !ismegafauna(liv_atk)) + if(liv_atk.mob_size >= MOB_SIZE_LARGE) // are you goated with the sauce liv_atk.apply_status_effect(STATUS_EFFECT_GAUNTLET_CONC) /obj/item/kinetic_crusher/glaive/gauntlets/update_icon_state() @@ -274,6 +296,31 @@ else item_state = "crusher[wielded]-fist" +/obj/item/kinetic_crusher/glaive/gauntlets/attack(mob/living/target, mob/living/carbon/user) + . = ..() + if(!combo_on_anything && target.mob_size < MOB_SIZE_LARGE) + switch(user.a_intent) + if(INTENT_DISARM) + add_to_streak("D", user) + if(INTENT_GRAB) + add_to_streak("G", user) + if(INTENT_HARM) + add_to_streak("H", user) + +/obj/item/kinetic_crusher/glaive/gauntlets/proc/add_to_streak(element,mob/living/carbon/user, mob/living/target) + if(target != current_target) + reset_streak(target, user) + streak = streak+element + if(length(streak) > max_streak_length) + streak = copytext(streak, 1 + length(streak[1])) + user?.hud_used?.combo_display.update_icon_state(streak) + return + +/obj/item/kinetic_crusher/glaive/gauntlets/proc/reset_streak(mob/living/new_target, mob/living/carbon/user) + current_target = new_target + streak = "" + user?.hud_used?.combo_display.update_icon_state(streak) + //destablizing force /obj/item/projectile/destabilizer name = "destabilizing force" From 282cc819dc45f7e4ca0667ecdf2c26b0cc38d091 Mon Sep 17 00:00:00 2001 From: Hatterhat Date: Tue, 4 Oct 2022 20:10:09 -0500 Subject: [PATCH 2/2] works on my machine --- .../mining/equipment/gauntlet_styles.dm | 49 +++++++++++++------ .../mining/equipment/kinetic_crusher.dm | 18 +++---- tgstation.dme | 1 + 3 files changed, 44 insertions(+), 24 deletions(-) diff --git a/code/modules/mining/equipment/gauntlet_styles.dm b/code/modules/mining/equipment/gauntlet_styles.dm index 0706d50429..3e0d9afa57 100644 --- a/code/modules/mining/equipment/gauntlet_styles.dm +++ b/code/modules/mining/equipment/gauntlet_styles.dm @@ -1,31 +1,50 @@ /datum/gauntlet_style var/name = "Baseline" - var/desc = "There's no combos here, only bugs. Report this to a coder if you see this." - var/list/examine_movesets /// you're manually filling this out btw + var/desc = "Somehow, you sense two things; one, that there's no combos on this, and two, that you should probably have someone address this." + var/obj/item/kinetic_crusher/glaive/gauntlets/hands // catch these -/datum/gauntlet_style/proc/on_apply(obj/item/kinetic_crusher/glaive/gauntlets/hands) +/datum/gauntlet_style/proc/on_apply(obj/item/kinetic_crusher/glaive/gauntlets/theseNewHands) + hands = theseNewHands return // todo: changing variables per style -/datum/gauntlet_style/proc/check_streak(mob/living/carbon/human/attacker, mob/living/defender, obj/item/kinetic_crusher/glaive/gauntlets/hands) +/datum/gauntlet_style/proc/check_streak(mob/living/carbon/human/attacker, mob/living/defender) return FALSE +/datum/gauntlet_style/proc/reset_streak(mob/living/carbon/user) + hands.streak = "" + user?.hud_used?.combo_display.update_icon_state(hands.streak) + +/datum/gauntlet_style/proc/examine_more_info() + return desc + #define BRAWLER_COMBO_CROSS "DH" /datum/gauntlet_style/brawler - name = "Brawler" - desc = "Throwing a punch is, theoretically, simple. Throwing a punch with a destabilizing module strapped to your hand? ...A bit less simple." - examine_movesets = list("Disarm, Harm" = "One-Two Cross: Bonus damage. Chance of stunning.") + name = "Rough and Tumble" + desc = "Throwing a punch is simple. Throwing a punch with a destabilizing module strapped to your hand is less so, but still doable." -/datum/gauntlet_style/brawler/check_streak(mob/living/carbon/human/attacker, mob/living/defender, obj/item/kinetic_crusher/glaive/gauntlets/hands) - if(hands.streak.findtext(BRAWLER_COMBO_CROSS)) - hands.streak = "" +/datum/gauntlet_style/brawler/examine_more_info() + var/msg = list(span_notice(desc)) + msg += "Techniques:" + msg += "Cross Punch - Disarm, Harm. In addition to being a regular strike, deals an extra third of a regular detonation's damage." // this wording kinda sucks i think + return msg + +/datum/gauntlet_style/brawler/check_streak(mob/living/carbon/human/attacker, mob/living/defender) + if(findtext(hands.streak, BRAWLER_COMBO_CROSS)) crossCombo(attacker, defender) return TRUE return FALSE -/datum/gauntlet_style/brawler/proc/crossCombo(attacker, defender) - defender.apply_damage(hands.detonation_damage/3, BRUTE, blocked = defender.getarmor(type = BOMB)) - playsound(attacker, 'sound/weapons/punch1.ogg', 100, 1) - D.visible_message("[attacker] delivers a solid one-two punch to [defender]!", \ +/datum/gauntlet_style/brawler/proc/crossCombo(mob/living/carbon/attacker, mob/living/defender) + reset_streak(attacker) + playsound(attacker, 'sound/weapons/punch4.ogg', 100, FALSE) + var/bonus_damage = (hands.force + hands.detonation_damage) / 3 + defender.apply_damage(bonus_damage, BRUTE, blocked = defender.getarmor(type = BOMB)) + var/datum/status_effect/crusher_damage/cd_tracker = defender.has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING) + if(!QDELETED(defender) && !QDELETED(cd_tracker)) + cd_tracker.total_damage += bonus_damage //we did some damage, but let's not assume how much we did + defender.visible_message("[attacker] delivers a solid one-two punch to [defender]!", \ "[attacker] hits you with a solid one-two punch!") + return TRUE -#undef BRAWLER_CROSS + +#undef BRAWLER_COMBO_CROSS diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm index 2036212fb9..3c2a4541b2 100644 --- a/code/modules/mining/equipment/kinetic_crusher.dm +++ b/code/modules/mining/equipment/kinetic_crusher.dm @@ -266,17 +266,16 @@ /obj/item/kinetic_crusher/glaive/gauntlets/Initialize(mapload) . = ..() active_style = new /datum/gauntlet_style/brawler + active_style.on_apply(src) /obj/item/kinetic_crusher/glaive/gauntlets/examine(mob/living/user) . = ..() . += "According to a very small display, the currently loaded style is \"[active_style.name]\"." -/* wip todo /obj/item/kinetic_crusher/glaive/gauntlets/examine_more(mob/user) - return -*/ + return active_style.examine_more_info() -/obj/item/kinetic_crusher/glaive/gauntlets/style_change(datum/gauntlet_style/new_style) +/obj/item/kinetic_crusher/glaive/gauntlets/proc/style_change(datum/gauntlet_style/new_style) new_style.on_apply(src) /obj/item/kinetic_crusher/glaive/gauntlets/ComponentInitialize() @@ -297,15 +296,16 @@ item_state = "crusher[wielded]-fist" /obj/item/kinetic_crusher/glaive/gauntlets/attack(mob/living/target, mob/living/carbon/user) - . = ..() - if(!combo_on_anything && target.mob_size < MOB_SIZE_LARGE) + ..() + if((combo_on_anything || target.mob_size >= MOB_SIZE_LARGE) && wielded) switch(user.a_intent) if(INTENT_DISARM) - add_to_streak("D", user) + add_to_streak("D", user, target) if(INTENT_GRAB) - add_to_streak("G", user) + add_to_streak("G", user, target) if(INTENT_HARM) - add_to_streak("H", user) + add_to_streak("H", user, target) + active_style.check_streak(user, target) /obj/item/kinetic_crusher/glaive/gauntlets/proc/add_to_streak(element,mob/living/carbon/user, mob/living/target) if(target != current_target) diff --git a/tgstation.dme b/tgstation.dme index 028b5926f7..8d0bcde685 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2524,6 +2524,7 @@ #include "code\modules\mining\satchel_ore_boxdm.dm" #include "code\modules\mining\shelters.dm" #include "code\modules\mining\equipment\explorer_gear.dm" +#include "code\modules\mining\equipment\gauntlet_styles.dm" #include "code\modules\mining\equipment\goliath_hide.dm" #include "code\modules\mining\equipment\kinetic_crusher.dm" #include "code\modules\mining\equipment\lazarus_injector.dm"