X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=PA.pm;h=2eb88b1f3abbcc33cda310d83e650ac589a51aec;hb=480a92ac89c055627316da5d72865be84a0d109d;hp=29bdb7722f647226b3f230d289ea7e0878682653;hpb=2d63dadea0c5b15232ea5d7a1767a7fecdf6ac48;p=NDIRC.git diff --git a/PA.pm b/PA.pm index 29bdb77..2eb88b1 100644 --- 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);