From 46f9ef7cc6631eb9bd3fdcd4259b05429d4ccc37 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 8 Nov 2020 20:29:36 +0100 Subject: [PATCH] [MIRROR] Fix TRAIT_PERFECT_ATTACKER (#1636) * Fix randomness in combat test (#54874) * Fix TRAIT_PERFECT_ATTACKER Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com> --- code/modules/mob/living/carbon/human/species.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index ee8e9b47420..5d90764e29e 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1340,7 +1340,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) 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 || HAS_TRAIT(src, TRAIT_PERFECT_ATTACKER)) //kicks never miss (provided your species deals more than 0 damage) + if(atk_verb == ATTACK_EFFECT_KICK || HAS_TRAIT(user, TRAIT_PERFECT_ATTACKER)) //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()