From c5b55826b5b0893cfb4fea7ad3f87581dbd102d6 Mon Sep 17 00:00:00 2001 From: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Date: Fri, 3 Apr 2020 23:19:40 +1100 Subject: [PATCH] Punches land with the same consistency across races, punches cheaper, king hits are nastier (#11707) * I think everyone should be landing punches now. * brawling just got mathematical? * pawnch harder get tired less this is a balance change now I guess * nearly added instastun king hits, now stun punches are more rng * I'm tired okay --- .../mob/living/carbon/human/species.dm | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index f0bf2fc23e..34c65982dc 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1474,13 +1474,17 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) else user.do_attack_animation(target, ATTACK_EFFECT_PUNCH) - user.adjustStaminaLossBuffered(5) //CITADEL CHANGE - makes punching cause staminaloss + user.adjustStaminaLossBuffered(3.5) //CITADEL CHANGE - makes punching cause staminaloss var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh) + var/puncherstam = user.getStaminaLoss() + var/puncherbrute = user.getBruteLoss() + var/punchedstam = target.getStaminaLoss() + var/punchedbrute = target.getBruteLoss() //CITADEL CHANGES - makes resting and disabled combat mode reduce punch damage, makes being out of combat mode result in you taking more damage - if(!(target.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE) && damage < user.dna.species.punchstunthreshold) - damage = user.dna.species.punchstunthreshold - 1 + if(!(target.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) + damage *= 1.5 if(!CHECK_MOBILITY(user, MOBILITY_STAND)) damage *= 0.5 if(!(user.combat_flags & COMBAT_FLAG_COMBAT_ACTIVE)) @@ -1494,7 +1498,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(atk_verb == ATTACK_EFFECT_KICK) //kicks never miss (provided your species deals more than 0 damage) miss_chance = 0 else - miss_chance = min((user.dna.species.punchdamagehigh/user.dna.species.punchdamagelow) + user.getStaminaLoss() + (user.getBruteLoss()*0.5), 100) //old base chance for a miss + various damage. capped at 100 to prevent weirdness in prob() + miss_chance = min(10 + ((puncherstam + puncherbrute)*0.5), 100) //probability of miss has a base of 10, and modified based on half your stamina and brute total. Capped at max 100 and min 0 to prevent weirdness in prob() if(!damage || !affecting || prob(miss_chance))//future-proofing for species that have 0 damage/weird cases where no zone is targeted playsound(target.loc, user.dna.species.miss_sound, 25, TRUE, -1) @@ -1529,13 +1533,14 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) log_combat(user, target, "punched") if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold) - target.visible_message("[user] knocks [target] down!", \ - "You're knocked down by [user]!", "You hear aggressive shuffling followed by a loud thud!", COMBAT_MESSAGE_RANGE, user) - to_chat(user, "You knock [target] down!") - var/knockdown_duration = 40 + (target.getStaminaLoss() + (target.getBruteLoss()*0.5))*0.8 - armor_block - target.DefaultCombatKnockdown(knockdown_duration) - target.forcesay(GLOB.hit_appends) - log_combat(user, target, "got a stun punch with their previous punch") + if((punchedstam > 50) && prob(punchedstam*0.5)) //If our punch victim has been hit above the threshold, and they have more than 50 stamina damage, roll for stun, probability of 1% per 2 stamina damage + target.visible_message("[user] knocks [target] down!", \ + "You're knocked down by [user]!", "You hear aggressive shuffling followed by a loud thud!", COMBAT_MESSAGE_RANGE, user) + to_chat(user, "You knock [target] down!") + var/knockdown_duration = 40 + (punchedstam + (punchedbrute*0.5))*0.8 - armor_block + target.DefaultCombatKnockdown(knockdown_duration) + target.forcesay(GLOB.hit_appends) + log_combat(user, target, "got a stun punch with their previous punch") else if(!(target.mobility_flags & MOBILITY_STAND)) target.forcesay(GLOB.hit_appends)