]> ruin.nu Git - NDIRC.git/blobdiff - PA.pm
fixed .xp
[NDIRC.git] / PA.pm
diff --git a/PA.pm b/PA.pm
index 29bdb7722f647226b3f230d289ea7e0878682653..2eb88b1f3abbcc33cda310d83e650ac589a51aec 100644 (file)
--- a/PA.pm
+++ b/PA.pm
@@ -154,7 +154,7 @@ sub calcXp {
        unless($roids){
                $roids = int($tsize*$cap);
        }elsif ($roids < 10){
-               $tsize *= int(.75**($roids-1));
+               $tsize = ceil($tsize*.75**($roids-1));
                $roids = int($cap*$tsize);
        }
        $tsize -= $roids;
@@ -166,7 +166,7 @@ sub calcXp {
                $ND::server->command("notice $ND::target Doesn't seem to be a planet at $x:$y:$z");
                return;
        }
-       my $xp = int(max($roids * 10 * (min(2,$tscore/$ascore) + min(2,$tvalue/$avalue) - 1),0));
+       my $xp = pa_xp($roids,$ascore,$avalue,$tscore,$tvalue);
        my $score = 60 * $xp;
        my $value = $roids*200;
        my $totscore = prettyValue($score + $value);