armor => 0,
hp => 20,
shield => 20,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => 5,
armor => 1,
hp => 150,
shield => 150,
- suit => 3, # armored
+ attr => {
+ armored => 1,
+ },
structure => 1,
attack => {
ground => {
armor => 1,
hp => 130,
shield => 60,
- suit => 3, # armored
- organic => 0, # mech
- psionic => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ psionic => 1,
+ },
attack => {
ground => {
damage => [8 .. 11],
armor => 2,
hp => 350,
shield => 350,
- suit => 3, # armored
- organic => 0, # mech
- psionic => 1,
- massive => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ psionic => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [6 .. 9],
armor => 1,
hp => 1000,
shield => 1000,
- suit => 3, # armored
+ attr => {
+ armored => 1,
+ },
structure => 1,
attack => {
ground => {
armor => 1,
hp => 100,
shield => 50,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [8 .. 11],
armor => 1,
hp => 40,
shield => 40,
- suit => 1, # light
- organic => 0, # mech
- psionic => 1,
+ attr => {
+ light => 1,
+ mech => 1,
+ psionic => 1,
+ },
attack => {
ground => {
damage => [6 .. 9],
armor => 1,
hp => 80,
shield => 80,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [10 .. 13],
armor => 0,
hp => 40,
shield => 40,
- suit => 1, # light
- organic => 1,
- psionic => 1,
+ attr => {
+ light => 1,
+ psionic => 1,
+ organic => 1,
+ },
speed => 1.875,
sight => 10,
},
armor => 1,
hp => 40,
shield => 80,
- suit => 1, # light
- organic => 1,
- psionic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ psionic => 1,
+ },
attack => {
ground => {
damage => [45, 50, 55, 60],
armor => 0,
hp => 10,
shield => 350,
- psionic => 1,
- massive => 1,
+ attr => {
+ psionic => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [25, 28, 31, 34],
armor => 1,
hp => 200,
shield => 100,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [20, 22, 24, 26],
armor => 1,
hp => 200,
shield => 150,
- suit => 3, # armored
- organic => 0, # mech
- massive => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [15, 17, 19, 21],
armor => 0,
hp => 40,
shield => 20,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
speed => 1.875,
upgrade => [
{
armor => 0,
hp => 100,
shield => 100,
- suit => 3, # armored
- organic => 0, # mech
- psionic => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ psionic => 1,
+ },
speed => 2.9531,
upgrade => [
{
armor => 0,
hp => 120,
shield => 60,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
attack => {
air => {
damage => [5 .. 8],
armor => 0,
hp => 150,
shield => 100,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [6 .. 9],
armor => 0,
hp => 100,
shield => 60,
- suit => 1, # light
- organic => 0, # mech
- psionic => 1,
+ attr => {
+ light => 1,
+ mech => 1,
+ psionic => 1,
+ },
attack => {
ground => {
name => 'Pulsar Beam',
armor => 2,
hp => 120,
shield => 60,
- suit => 3, # armored
- organic => 0, # mech
- massive => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [30, 33, 36, 39],
armor => 2,
hp => 300,
shield => 150,
- suit => 3, # armored
- organic => 0, # mech
- massive => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ massive => 1,
+ },
attack => {
range => 8,
},
armor => 0,
hp => 40,
shield => 40,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [5 .. 8],
cargo => 1,
armor => 0,
hp => 45,
- suit => 1, # light
- organic => 1,
- organic => 0, # mech
+ attr => {
+ light => 1,
+ organic => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => 5,
size => 0.75,
armor => 0,
hp => 60,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
speed => 2.8,
sight => 8,
},
cargo => 0,
armor => 0,
hp => 250,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
structure => 1,
attack => {
air => {
cargo => 0,
armor => 3,
hp => 1500,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
structure => 1,
attack => {
ground => {
cargo => 1,
armor => 0,
hp => 45,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [6 .. 9],
cargo => 2,
armor => 1,
hp => 125,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [10 .. 13],
cargo => 1,
armor => 0,
hp => 60,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [4 .. 7],
cargo => 2,
armor => 0,
hp => 100,
- organic => 1,
- psionic => 1,
+ attr => {
+ organic => 1,
+ psionic => 1,
+ },
attack => {
ground => {
damage => [10 .. 13],
cargo => 2,
armor => 0,
hp => 90,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [8 .. 11],
cargo => 4,
armor => 0,
hp => 135,
- suit => 1, # light
- organic => 1,
- organic => 0, # mech
+ attr => {
+ light => 1,
+ organic => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [18, 20, 22, 24],
cargo => 2,
armor => 0,
hp => 90,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => 125,
cargo => 4,
armor => 1,
hp => 160,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [15, 17, 19, 21],
cargo => 8,
armor => 1,
hp => 400,
- suit => 3, # armored
- organic => 0, # mech
- massive => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [30, 33, 36, 39],
cargo => 0,
armor => 0,
hp => 125,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
attack => {
air => {
damage => [10 .. 13],
cargo => 0,
armor => 1,
hp => 150,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
speed => 2.5,
upgrade => [
{
cargo => 0,
armor => 0,
hp => 140,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
attack => {
ground => {
damage => [12 .. 15],
cargo => 0,
armor => 1,
hp => 140,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
speed => 2.25,
sight => 11,
special => [
cargo => 0,
armor => 1,
hp => 150,
- suit => 3, # armored
- organic => 0, # mech
+ attr => {
+ armored => 1,
+ mech => 1,
+ },
structure => 1,
attack => {
ground => {
cargo => 0,
armor => 0,
hp => 50,
- suit => 1, # light
- organic => 0, # mech
+ attr => {
+ light => 1,
+ mech => 1,
+ },
structure => 1,
cooldown => 0,
attack => {
cargo => 0,
armor => 3,
hp => 550,
- suit => 3, # armored
- organic => 0, # mech
- massive => 1,
+ attr => {
+ armored => 1,
+ mech => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [8 .. 11],
cargo => 1,
armor => 0,
hp => 40,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => 5,
cargo => 2,
armor => 1,
hp => 175,
- organic => 1,
- psionic => 1,
+ attr => {
+ organic => 1,
+ psionic => 1,
+ },
attack => {
ground => {
damage => [4 .. 7],
cargo => -8,
armor => 0,
hp => 200,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
speed => 0.586,
creep => 0,
sight => 11,
cargo => 0,
armor => 1,
hp => 200,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
speed => 1.875,
creep => 0,
sight => 11,
cargo => 0,
armor => 0,
hp => 5,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
speed => 2.25,
creep => 1.0,
sight => 8,
cargo => 0,
armor => 10,
hp => 25,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
speed => 0.5625,
creep => 1.0,
sight => 5,
cargo => 0,
armor => 2,
hp => 300,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
structure => 1,
attack => {
ground => {
cargo => 0,
armor => 1,
hp => 400,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
structure => 1,
attack => {
air => {
cargo => 1,
armor => 0,
hp => 35,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [5 .. 8],
cargo => 2,
armor => 0,
hp => 30,
- organic => 1,
+ attr => {
+ organic => 1,
+ },
attack => {
ground => {
damage => [20, 22, 24, 26],
cargo => 2,
armor => 1,
hp => 145,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [16, 18, 20, 22],
cargo => 2,
armor => 0,
hp => 80,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [12 .. 15],
cargo => 2,
armor => 0,
hp => 90,
- suit => 3, # armored
- organic => 1,
- psionic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ psionic => 1,
+ },
speed => 2.25,
creep => 1.3,
sight => 10,
cargo => 0,
armor => 0,
hp => 50,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => 8,
cargo => 0,
armor => 1,
hp => 200,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
structure => 1,
speed => 0,
sight => 10,
cargo => 4,
armor => 1,
hp => 160,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
attack => {
ground => {
dps => [27.9, 30.2, 32.5, 34.8],
cargo => 0,
armor => 0,
hp => 65,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [12 .. 15],
cargo => 0,
armor => 0,
hp => 120,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [9 .. 12],
cargo => 0,
armor => 2,
hp => 200,
- suit => 3, # armored
- organic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ },
attack => {
air => {
damage => [14 .. 17],
cargo => 0,
armor => 1,
hp => 225,
- suit => 3, # armored
- organic => 1,
- massive => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [20, 22, 24, 26],
cargo => 0,
armor => 0,
hp => 30,
- suit => 1, # light
- organic => 1,
+ attr => {
+ light => 1,
+ organic => 1,
+ },
attack => {
ground => {
damage => [4 .. 7],
cargo => 0,
armor => 1,
hp => 150,
- suit => 3, # armored
- organic => 1,
- psionic => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ psionic => 1,
+ },
speed => 2.9531,
sight => 11,
},
cargo => 8,
armor => 1,
hp => 500,
- suit => 3, # armored
- organic => 1,
- massive => 1,
+ attr => {
+ armored => 1,
+ organic => 1,
+ massive => 1,
+ },
attack => {
ground => {
damage => [35, 38, 41, 44],
<th class="val min"><img src="/minerals.png" alt="min"></th>
<th class="val gas"><img src="/gas.png" alt="gas"></th>
<th class="val time"><:= coltoggle(qw'build cost') :></th>
- <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
+ <th class="unit" colspan="4"><:= coltoggle(qw'size size') :></th>
<th class="val unit-hp">HP</th>
<th class="val unit-shield">shield</th>
<th class="val unit-armor">armor</th>
local $_ = $row;
$_->{hp} += $_->{shield} if $_->{shield};
my $suitchar = '';
- if ($_->{cargo} > 0) {
+ if ($_->{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 ($_->{suit}) {
- $suitchar = [qw/? s m l/]->[$_->{suit}];
+ elsif ($_->{attr} and $_->{attr}->{light}) {
+ $suitchar = 's';
+ }
+ elsif ($_->{attr} and $_->{attr}->{armored}) {
+ $suitchar = 'l';
}
return (
$_->{build} || '0',
),
!$suitchar ? '<td>' : sprintf('<td class="unit unit-%s">%s', $suitchar, ucfirst $suitchar),
- '<td class="val unit">' . join('',
- defined $_->{unit} && $_->{unit} == .5 ? '½' : $_->{unit},
- defined $_->{organic} && sprintf(
- '<span class="unit-%s" title="%s">%s</span>',
- $_->{organic} ? 'o' : 'u',
- $_->{organic} ? 'organic' : 'mechanic',
- $_->{organic} ? 'o' : 'm',
- ),
+ '<td class="val unit">' . (
+ defined $_->{unit} && $_->{unit} == .5 ? '½' : $_->{unit}
+ ),
+ '<td class="unit unit-type">' . join('', grep { $_ }
+ (defined $_->{organic} || $_->{attr}->{organic})
+ && '<span class="unit-o" title="organic">o</span>',
+ (defined $_->{organic} ? !$_->{organic} : $_->{attr}->{mech})
+ && '<span class="unit-u" title="mechanic">m</span>',
+ $_->{attr}->{psionic}
+ && '<span class="unit-p" title="psionic">ψ</span>',
+ ),
+ '<td class="unit unit-attr">' . join('', grep { $_ }
+ $_->{attr}->{armored}
+ && '<span class="unit unit-l" title="armored">A</span>',
+ $_->{attr}->{light}
+ && '<span class="unit unit-s" title="light">L</span>',
),
'<td class="val unit-hp">' . $_->{hp} // '',
'<td class="val unit-shield">' . (
showval($_, 'sight')
),
'<td class="val unit-speed">' . showval($_, 'speed'),
+ $_->{attr}->{massive} && '<span class="unit-massive">☇</span>',
'<td class="unit-magic">' . showmagic($_),
"\n"
);
my ($race, $cat) = ('', '');
for (@rows) {
if ($grouped) {
- printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n",
+ printf '<tbody id="%s"><tr class="race"><th colspan="20"><h2>%s</h2>'."\n",
$race = $_->{race}, ucfirst $race
unless $race eq $_->{race};
}