From f35e3bf3323b5330ad6375378b7c03362a86f27e Mon Sep 17 00:00:00 2001
From: ElTata <eltata@firemail.cc>
Date: Wed, 1 Jul 2020 19:01:36 +0200
Subject: [PATCH] fix & improve critic strike range

90% for neutral, 95 for good, 85 for evil
---
 Irpg/Action.pm         | 4 ++--
 Irpg/Classes/Farmer.pm | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Irpg/Action.pm b/Irpg/Action.pm
index 3148031..5f28c80 100644
--- a/Irpg/Action.pm
+++ b/Irpg/Action.pm
@@ -297,8 +297,8 @@ sub perform_action {
         # VICTORY
         $ret->{vict}++;
         my $align_mod = $rps->{$p1}{alignment} eq 'Good' ? 0.05 :
-                        $rps->{$p1}{alignment} eq 'Evil' ? -0.10 :
-                        1;
+                        $rps->{$p1}{alignment} eq 'Evil' ? -0.05 :
+                        0;
         if ($p1roll*$p1atk >= $p1sum*$p1atk*($rps->{$p1}{class}->{CRIT_SK} + $align_mod)) {
             # CRITICAL STRIKE
             $ret->{vict}++;
diff --git a/Irpg/Classes/Farmer.pm b/Irpg/Classes/Farmer.pm
index 0bcc68d..db74568 100644
--- a/Irpg/Classes/Farmer.pm
+++ b/Irpg/Classes/Farmer.pm
@@ -17,7 +17,7 @@ sub new {
 	$self->{MOD_INT} = 1; # intelligence
 	$self->{MOD_CHA} = 1; # charisma
 	$self->{MOD_DEX} = 1; # dexterity
-	$self->{CRIT_SK} = 0.95; # critical strike minimum range, the lower the largest acceptance
+	$self->{CRIT_SK} = 0.90; # critical strike minimum range, the lower the largest acceptance
 	$self->{MOD_CRT} = 1; # criticak strike modificator
 	return $self;
 }
-- 
GitLab