box that mf up

This commit is contained in:
Hatterhat
2022-10-04 14:14:04 -05:00
parent 3f04b95ba9
commit 38bd037b66
3 changed files with 93 additions and 9 deletions

View File

@@ -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("<span class='warning'>[attacker] delivers a solid one-two punch to [defender]!</span>", \
"<span class='userdanger'>[attacker] hits you with a solid one-two punch!</span>")
#undef BRAWLER_CROSS

View File

@@ -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"