From 23179b23187caf12240bfd64fc0ab1305d85a586 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Sat, 2 Dec 2023 20:10:54 -0800 Subject: [PATCH 1/4] Update human_attackhand.dm --- code/modules/mob/living/carbon/human/human_attackhand.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 2bb113d67739..354d9c759f23 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -155,7 +155,7 @@ return held_weapon.afterattack(target,src) var/disarm_chance = rand(1, 100) - var/attacker_skill_level = skills && attacking_mob.skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max + var/attacker_skill_level = attacking_mob.skills ? attacking_mob.skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max var/defender_skill_level = skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max disarm_chance -= 5 * attacker_skill_level disarm_chance += 5 * defender_skill_level From 5c2f4dda4495535fced94ac13787ba4b73fd93a5 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Sun, 3 Dec 2023 00:34:13 -0800 Subject: [PATCH 2/4] did more testing. should be better in fringe cases --- code/modules/mob/living/carbon/human/human_attackhand.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 354d9c759f23..2d5bc82efa99 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -155,8 +155,8 @@ return held_weapon.afterattack(target,src) var/disarm_chance = rand(1, 100) - var/attacker_skill_level = attacking_mob.skills ? attacking_mob.skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max - var/defender_skill_level = skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max + var/attacker_skill_level = attacking_mob.skills ? attacking_mob.skills.get_skill_level(SKILL_CQC) : SKILL_CQC_DEFAULT // No skills, so assume default + var/defender_skill_level = skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_DEFAULT // No skills, so assume default disarm_chance -= 5 * attacker_skill_level disarm_chance += 5 * defender_skill_level From a4c1c8bd95b20e84ec32cfbcfd70a525a453ebc8 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Sun, 3 Dec 2023 07:43:38 -0800 Subject: [PATCH 3/4] fira review --- code/modules/mob/living/carbon/human/human_attackhand.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 2d5bc82efa99..677c8e383dd9 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -155,8 +155,8 @@ return held_weapon.afterattack(target,src) var/disarm_chance = rand(1, 100) - var/attacker_skill_level = attacking_mob.skills ? attacking_mob.skills.get_skill_level(SKILL_CQC) : SKILL_CQC_DEFAULT // No skills, so assume default - var/defender_skill_level = skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_DEFAULT // No skills, so assume default + var/attacker_skill_level = attacking_mob.skills && skills ? attacking_mob.skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max + var/defender_skill_level = skills && attacking_mob.skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max disarm_chance -= 5 * attacker_skill_level disarm_chance += 5 * defender_skill_level From 8773d4b9ec867029b61bf4b067e86d9742e42e95 Mon Sep 17 00:00:00 2001 From: zzzmike <85382350+zzzmike@users.noreply.github.com> Date: Wed, 6 Dec 2023 03:04:23 -0800 Subject: [PATCH 4/4] undefined-skills-person = CQC-god Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_attackhand.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 677c8e383dd9..354d9c759f23 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -155,8 +155,8 @@ return held_weapon.afterattack(target,src) var/disarm_chance = rand(1, 100) - var/attacker_skill_level = attacking_mob.skills && skills ? attacking_mob.skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max - var/defender_skill_level = skills && attacking_mob.skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max + var/attacker_skill_level = attacking_mob.skills ? attacking_mob.skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max + var/defender_skill_level = skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max disarm_chance -= 5 * attacker_skill_level disarm_chance += 5 * defender_skill_level