X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/80a615f8414664e34d48d6ffc1263943ae6fbf73..bd7288335390bc941dde7a1ad728bc0000d8386a:/sc.plp?ds=sidebyside diff --git a/sc.plp b/sc.plp index 44940e5..873c75b 100644 --- a/sc.plp +++ b/sc.plp @@ -200,8 +200,8 @@ sub showrange { elsif ($type eq 'implosive') { $min /= 4; } - $min = int($min + .5); # round halves up }} + $_ = int($_ + .5) for $min, $max; # round halves up return $min == $max ? $min : "$min-$max"; } @@ -252,7 +252,7 @@ sub showrange { if (exists $get{order}) { $get{order} ||= ''; if ($get{order} eq 'size') { - $_->{order} = $_->{unit}*8 + $_->{size} + $_->{hp}/512 + $_->{min}/8192 for @$units; + $_->{order} = $_->{unit}*8 + $_->{suit} + $_->{hp}/512 + $_->{min}/8192 for @$units; } elsif ($get{order} eq 'cost') { $_->{order} = $_->{gas}*1.5 + $_->{min} + $_->{unit}/8 + $_->{build}/256/8 for @$units; @@ -269,7 +269,7 @@ sub showrange { printf '