From: Michael Andreen Date: Wed, 18 Apr 2007 21:47:54 +0000 (+0000) Subject: ignore xp when both factors are negative X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=eafb5ef101dfc9cf22655a532073e8b71a036a67;p=ndwebbie.git ignore xp when both factors are negative --- diff --git a/ND/Include.pm b/ND/Include.pm index 257ae91..992f978 100644 --- a/ND/Include.pm +++ b/ND/Include.pm @@ -83,7 +83,7 @@ sub intel_log { sub pa_xp { my ($roids,$ascore,$avalue,$tscore,$tvalue) = @_; - my $bravery = (min(2,$tscore/$ascore)-0.6) * (min(2,$tvalue/$avalue)-0.4); + my $bravery = (max(0,min(2,$tscore/$ascore)-0.6)) * (min(2,$tvalue/$avalue)-0.4); return int(max($roids * 10 * $bravery,0)) }