X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/f5e535f48dc60fdcaa93b9b6ee523801448b9f82..711561e506ad48db7b5cbcf002ebaecd90558761:/sc.plp?ds=inline
diff --git a/sc.plp b/sc.plp
index 09ae989..f134226 100644
--- a/sc.plp
+++ b/sc.plp
@@ -98,7 +98,8 @@ sub coltoggle {
|
|
<:= coltoggle(qw'build cost') :> |
- <:= coltoggle(qw'size size') :> |
+ <:= coltoggle(qw'size size') :> |
+ attr |
HP |
shield |
⨠|
@@ -233,25 +234,6 @@ sub showrange {
my ($row) = @_;
local $_ = $row;
$_->{hp} += $_->{shield} if $_->{shield};
- my $suitchar = '';
- if ($_->{attr}->{structure}) {
- $suitchar = 'b';
- }
- elsif ($_->{suit}) {
- $suitchar = [qw/? s m l/]->[$_->{suit}];
- }
- elsif ($_->{cargo} > 0) {
- $suitchar = [qw/? s m l l h h h h/]->[abs $_->{cargo}];
- }
- elsif ($_->{size}) {
- $suitchar = [qw/s m l h h h/]->[$_->{size}];
- }
- elsif ($_->{attr} and $_->{attr}->{light}) {
- $suitchar = 's';
- }
- elsif ($_->{attr} and $_->{attr}->{armored}) {
- $suitchar = 'l';
- }
return (
'' . ($_->{min} // ''),
@@ -260,10 +242,17 @@ sub showrange {
!!$_->{base} && '+',
$_->{build} || '0',
),
- !$suitchar ? ' | ' : sprintf(' | %s%s',
- $suitchar, ucfirst $suitchar,
- $_->{attr}->{massive}
- && 'â',
+ sprintf(' | %s',
+ $_-> {cargo} < 0 ? ('supply', T => 'transport') :
+ $_->{upgraded}->{cargo} < 0 ? ('supply magic-opt', T => 'optional transport') :
+ $_->{attr}->{flying} ? ('air', F => 'flying') :
+ $_->{attr}->{structure} ? ('x', B => 'building') :
+ (
+ [qw( x s m l l h h h h )]->[ $_->{cargo} ],
+ $_->{cargo} || '-',
+ $_->{cargo} ? 'transportable' : 'untransportable',
+ ),
+ defined $_->{size} && sprintf('â%.1f ', $_->{size}),
),
sprintf(' | %s',
defined $_->{pop} && $_->{pop} < 0 && ' unit-supply',
@@ -282,6 +271,17 @@ sub showrange {
&& 'A',
$_->{attr}->{light}
&& 'L',
+ $_->{suit} && sprintf(
+ '%s',
+ map { @{$_} } [
+ [qw( x ? unknown )],
+ [qw( s S small )],
+ [qw( m M medium )],
+ [qw( l L large )],
+ ]->[ $_->{suit} ],
+ ),
+ $_->{attr}->{massive}
+ && 'â',
),
' | ' . $_->{hp} // '',
$_->{shield} ? sprintf(' | %.0f%% | {speed}, $_->{upgraded}->{speed}),
$_->{attr}->{jump}
&& qq'â',
- $_->{attr}->{flying}
- && qq'â',
' | ' . showmagic($_),
!$_->{attack}->[1] ? () : (
' | ', showattack($_, 1), ' | '
@@ -385,19 +383,9 @@ sub showrange {
excludes construction of dependencies such as buildings
and +parent units
size
- <:
-if ($scver{major} > 1) {
- :>transports can fit 8 Small,
- 4 Medium,
- 2 Large,
- or a single Huge unit
- massive â units
- cannot be lifted or slowed and can break force fields<:
-} else {
- :>affected by Small,
- Medium, or
- Large unit damage<:
-} :>
+ Transports can fit upto
+ 8
+ non-Flying units
number of command points taken per unit
<:
if ($scver{major} > 1) {
@@ -407,9 +395,14 @@ if ($scver{major} > 1) {
Ï(ps)ionic,
Light, and
Armored
- attributes<:
+ attributes
+ massive â units
+ cannot be lifted or slowed and can break force fields<:
} else {
- :>organic/mechanic unit<:
+ :>organic/mechanic unit
+ affected by Small,
+ Medium, or
+ Large unit damage<:
} :>
HP
total number of hitpoints (including shields)
|