]> ruin.nu Git - ndwebbie.git/commitdiff
ignore xp when both factors are negative
authorMichael Andreen <harv@ruin.nu>
Wed, 18 Apr 2007 21:47:54 +0000 (21:47 +0000)
committerMichael Andreen <harv@ruin.nu>
Wed, 18 Apr 2007 21:47:54 +0000 (21:47 +0000)
ND/Include.pm

index 257ae91f205afea45e8cd48cdbf35ee4342af2c3..992f978d9b28ff733bff43d06b2db0aebeafe732 100644 (file)
@@ -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))
 
 }