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