)} keys %{ $attack->{bonus} }),
) if $attack->{bonus};
+ $out .= sprintf '<span title="%s">', $attack->{name} if $attack->{name};
$out .= showrange($damage, $maxdamage);
+ $out .= '</span>' if $attack->{name};
$out .= sprintf('<span class="unit-splash" title="%s">%s</span>',
$attack->{splash} eq 'line' ? ('linear', '×') : ('splash', '+')
) if $attack->{splash};
join('',
$_->{name},
$_->{desc} ? ": $_->{desc}" : '',
- $_->{range} || $_->{cost} ? sprintf(' (%s)', join ', ',
+ (map { $_ && " ($_)" } join ', ',
+ #TODO: apply upgrades
$_->{range} ? "range $_->{range}" : (),
$_->{cost} ? sprintf('cost %.0f%%%s',
100 * $_->{cost} / $row->{energy},
defined $_->{maint} && sprintf('+%.1f%%/s',
100 * $_->{maint} / $row->{energy},
),
- ) : (),
- ) : '',
+ ) :
+ $_->{cooldown} ? "cooldown $_->{cooldown}s" : (),
+ ),
),
sprintf($_->{build} ? '(%s)' : '%s', $_->{abbr}),
} grep { defined $_->{abbr} } @{$specials};
<dt>speed
<dd>relative speed of movement (when in full motion, startup speed ignored)
<dt>specials
- <dd>special abilities are usually casted manually, but some are <span class="magic-perma">always active</span>
<dd>parentheses () indicate that it needs to be researched first
+ <dd><span class="magic-perma">passive</span> abilities are always enabled
<dd>hover for description
<dd>range is maximum range required to activate
<dd>cost is percentage of total energy lost