diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 747e547146..571b7c42e7 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -248,16 +248,20 @@ prob2fail += (10-L.STALUC) if(L.STAINT > 10) prob2craft += ((10-L.STAINT)*-1)*2 - prob2craft = CLAMP(prob2craft, 0, 99) - if(prob(prob2fail)) - to_chat(user, "MISTAKE! I've failed to craft [R.name]!") - continue - if(!prob(prob2craft)) - if(user.client?.prefs.showrolls) - to_chat(user, "I've failed to craft [R.name]... [prob2craft]%") + if(prob2craft < 1) + to_chat(user, "I lack the skills for this...") + return + else + prob2craft = CLAMP(prob2craft, 5, 99) + if(prob(prob2fail)) + to_chat(user, "MISTAKE! I've failed to craft [R.name]!") + continue + if(!prob(prob2craft)) + if(user.client?.prefs.showrolls) + to_chat(user, "I've failed to craft [R.name]. (Success chance: [prob2craft]%)") + continue + to_chat(user, "I've failed to craft [R.name].") continue - to_chat(user, "I've failed to craft [R.name].") - continue var/list/parts = del_reqs(R, user) if(islist(R.result)) var/list/L = R.result diff --git a/code/modules/mob/living/roguetownprocs.dm b/code/modules/mob/living/roguetownprocs.dm index eac37a4418..ef3339130c 100644 --- a/code/modules/mob/living/roguetownprocs.dm +++ b/code/modules/mob/living/roguetownprocs.dm @@ -184,7 +184,9 @@ attacker_skill = U.mind.get_skill_level(/datum/skill/combat/unarmed) prob2defend -= (attacker_skill * 20) - prob2defend = clamp(prob2defend, 5, 99) + if(!(mobility_flags & MOBILITY_STAND)) // checks if laying down and applies 50% defense malus if so + prob2defend *= 0.8 + prob2defend = clamp(prob2defend, 5, 95) if(src.client?.prefs.showrolls) to_chat(src, "Roll to parry... [prob2defend]%") @@ -408,7 +410,9 @@ prob2defend = prob2defend - (UH.mind.get_skill_level(/datum/skill/combat/unarmed) * 10) if(H.mind) prob2defend = prob2defend + (H.mind.get_skill_level(/datum/skill/combat/unarmed) * 10) - prob2defend = clamp(prob2defend, 5, 99) + if(!(L.mobility_flags & MOBILITY_STAND)) // checks if laying down and applies 50% defense malus if so + prob2defend *= 0.8 + prob2defend = clamp(prob2defend, 5, 95) if(client?.prefs.showrolls) to_chat(src, "Roll to dodge... [prob2defend]%") if(!prob(prob2defend)) @@ -419,7 +423,7 @@ else //we are a non human if(client?.prefs.showrolls) to_chat(src, "Roll to dodge... [prob2defend]%") - prob2defend = clamp(prob2defend, 5, 99) + prob2defend = clamp(prob2defend, 5, 95) if(!prob(prob2defend)) return FALSE dodgecd = TRUE