X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FPages%2FRaids.pm;h=afb91c1adb64501481b5f643837489755edc570d;hb=99ea1738beb3fd8eba6a016cbb4d5c95fa6834e2;hp=7bcb1f4e633d0ce13a4498c056cdbb10f4c6508c;hpb=0121660a54d34d0e14a4550fa88beef63705e69d;p=ndwebbie.git diff --git a/ND/Web/Pages/Raids.pm b/ND/Web/Pages/Raids.pm index 7bcb1f4..afb91c1 100644 --- a/ND/Web/Pages/Raids.pm +++ b/ND/Web/Pages/Raids.pm @@ -203,6 +203,14 @@ sub render_body { my @targets; while (my $target = $targetquery->fetchrow_hashref){ my %target; + if ($planet){ + if ($planet->{x} == $target->{x}){ + $target{style} = 'incluster'; + } + $target{ScoreBash} = 'bash' if ($target->{score}/$planet->{score} < 0.4); + $target{ValueBash} = 'bash' if ($target->{value}/$planet->{value} < 0.4); + #next if ($target->{score}/$planet->{score} < 0.4) && ($target->{value}/$planet->{value} < 0.4); + } $target{Id} = $target->{id}; $target{Race} = $target->{race}; my $num = pow(10,length($target->{score})-2); @@ -243,13 +251,6 @@ sub render_body { } $target{Scans} = \@scans; - if ($planet){ - if ($planet->{x} == $target->{x}){ - $target{style} = 'incluster'; - } - $target{ScoreBash} = 'bash' if ($target->{score}/$planet->{score} < 0.4); - $target{ValueBash} = 'bash' if ($target->{value}/$planet->{value} < 0.4); - } my @roids; my @claims; @@ -259,7 +260,7 @@ sub render_body { $size -= $roids; my $xp = 0; if ($planet){ - $xp = max(0,floor($roids * 10 * (min(2,$target{Score}/$planet->{score}) + min(2,$target{Value}/$planet->{value})-1))); + $xp = pa_xp($roids,$planet->{score},$planet->{value},$target{Score},$target{Value}); } push @roids,{Wave => $i, Roids => $roids, XP => $xp}; if ($self->{AJAX}){