Merge pull request #11605 from necromanceranne/ONLY_TRUST_YOUR_FISTS
PUNCHING: YOU SHOULD BE SCREAMING EDITION
This commit is contained in:
@@ -580,7 +580,7 @@
|
||||
/mob/living/carbon/update_stamina()
|
||||
var/stam = getStaminaLoss()
|
||||
if(stam > DAMAGE_PRECISION)
|
||||
var/total_health = (health - stam)
|
||||
var/total_health = (maxHealth - stam)
|
||||
if(total_health <= crit_threshold && !stat)
|
||||
if(CHECK_MOBILITY(src, MOBILITY_STAND))
|
||||
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
|
||||
|
||||
@@ -769,7 +769,7 @@
|
||||
return
|
||||
else
|
||||
if(hud_used.healths)
|
||||
var/health_amount = health - CLAMP(getStaminaLoss()-50, 0, 80)//CIT CHANGE - makes staminaloss have less of an impact on the health hud
|
||||
var/health_amount = min(health, maxHealth - CLAMP(getStaminaLoss()-50, 0, 80))//CIT CHANGE - makes staminaloss have less of an impact on the health hud
|
||||
if(..(health_amount)) //not dead
|
||||
switch(hal_screwyhud)
|
||||
if(SCREWYHUD_CRIT)
|
||||
|
||||
@@ -62,9 +62,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
var/coldmod = 1 // multiplier for cold damage
|
||||
var/heatmod = 1 // multiplier for heat damage
|
||||
var/stunmod = 1 // multiplier for stun duration
|
||||
var/punchdamagelow = 0 //lowest possible punch damage
|
||||
var/punchdamagehigh = 9 //highest possible punch damage
|
||||
var/punchstunthreshold = 9//damage at which punches from this race will stun //yes it should be to the attacked race but it's not useful that way even if it's logical
|
||||
var/punchdamagelow = 1 //lowest possible punch damage. if this is set to 0, punches will always miss
|
||||
var/punchdamagehigh = 10 //highest possible punch damage
|
||||
var/punchstunthreshold = 10//damage at which punches from this race will stun //yes it should be to the attacked race but it's not useful that way even if it's logical
|
||||
var/siemens_coeff = 1 //base electrocution coefficient
|
||||
var/damage_overlay_type = "human" //what kind of damage overlays (if any) appear on our species when wounded?
|
||||
var/fixed_mut_color = "" //to use MUTCOLOR with a fixed color that's independent of dna.feature["mcolor"]
|
||||
@@ -1464,15 +1464,15 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
else
|
||||
|
||||
var/atk_verb = user.dna.species.attack_verb
|
||||
if(target.lying)
|
||||
atk_verb = "kick"
|
||||
if(!(target.mobility_flags & MOBILITY_STAND))
|
||||
atk_verb = ATTACK_EFFECT_KICK
|
||||
|
||||
switch(atk_verb)
|
||||
if("kick")
|
||||
if(ATTACK_EFFECT_KICK)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_KICK)
|
||||
if("slash")
|
||||
if(ATTACK_EFFECT_CLAW)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_CLAW)
|
||||
if("smash")
|
||||
if(ATTACK_EFFECT_SMASH)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_SMASH)
|
||||
else
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_PUNCH)
|
||||
@@ -1492,10 +1492,19 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
|
||||
|
||||
if(!damage || !affecting)
|
||||
playsound(target.loc, user.dna.species.miss_sound, 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] has attempted to [atk_verb] [target]!</span>",\
|
||||
"<span class='userdanger'>[user] has attempted to [atk_verb] [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
var/miss_chance = 100//calculate the odds that a punch misses entirely. considers stamina and brute damage of the puncher. punches miss by default to prevent weird cases
|
||||
if(user.dna.species.punchdamagelow)
|
||||
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()
|
||||
|
||||
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)
|
||||
target.visible_message("<span class='danger'>[user]'s [atk_verb] misses [target]!</span>", \
|
||||
"<span class='danger'>You avoid [user]'s [atk_verb]!</span>", "<span class='hear'>You hear a swoosh!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='warning'>Your [atk_verb] misses [target]!</span>")
|
||||
log_combat(user, target, "attempted to punch")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -1512,14 +1521,25 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if(user.limb_destroyer)
|
||||
target.dismembering_strike(user, affecting.body_zone)
|
||||
target.apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
log_combat(user, target, "punched")
|
||||
|
||||
if(atk_verb == ATTACK_EFFECT_KICK)//kicks deal 1.5x raw damage + 0.5x stamina damage
|
||||
target.apply_damage(damage*1.5, BRUTE, affecting, armor_block)
|
||||
target.apply_damage(damage*0.5, STAMINA, affecting, armor_block)
|
||||
log_combat(user, target, "kicked")
|
||||
else//other attacks deal full raw damage + 2x in stamina damage
|
||||
target.apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
target.apply_damage(damage*2, STAMINA, affecting, armor_block)
|
||||
log_combat(user, target, "punched")
|
||||
|
||||
if((target.stat != DEAD) && damage >= user.dna.species.punchstunthreshold)
|
||||
target.visible_message("<span class='danger'>[user] has knocked [target] down!</span>", \
|
||||
"<span class='userdanger'>[user] has knocked [target] down!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
target.apply_effect(80, EFFECT_KNOCKDOWN, armor_block)
|
||||
target.visible_message("<span class='danger'>[user] knocks [target] down!</span>", \
|
||||
"<span class='userdanger'>You're knocked down by [user]!</span>", "<span class='hear'>You hear aggressive shuffling followed by a loud thud!</span>", COMBAT_MESSAGE_RANGE, user)
|
||||
to_chat(user, "<span class='danger'>You knock [target] down!</span>")
|
||||
var/knockdown_duration = 40 + (target.getStaminaLoss() + (target.getBruteLoss()*0.5))*0.8 - armor_block
|
||||
target.DefaultCombatKnockdown(knockdown_duration)
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
else if(target.lying)
|
||||
log_combat(user, target, "got a stun punch with their previous punch")
|
||||
else if(!(target.mobility_flags & MOBILITY_STAND))
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
|
||||
/datum/species/proc/spec_unarmedattacked(mob/living/carbon/human/user, mob/living/carbon/human/target)
|
||||
|
||||
Reference in New Issue
Block a user