<th class="val unit-hp">HP</th>
<th class="val unit-shield">shield</th>
<th class="val unit-armor" title="armor">⛨</th>
- <th class="val hurt">attack</th>
- <th class="hurt hurtrel"><:= coltoggle(qw'dps attack 1') :></th>
+ <th class="val hurt"><:= coltoggle(attack => 'attack') :></th>
+ <th class="hurt hurtrel">dps</th>
<th class="val unit-range" colspan=3>range</th>
<th class="val unit-sight">sight</th>
<th class="val unit-speed">speed</th>
elsif ($get{order} eq 'attack') {
$_->{order} = $_->{hp} / 1024 + $_->{shield} / 1008 + max(
map {
- ($_->{damage} + $_->{upgrade} * 3)
- * ($_->{count} // 1) / ($_->{cooldown} // 1)
+ ($_->{dps} ? $_->{dps}->[-1] :
+ ($_->{damage} + $_->{upgrade} * 3)
+ * ($_->{count} // 1) / ($_->{cooldown} // 1)
+ )
* ($_->{splash} ? 1.01 : 1)
* ($_->{type} eq 'implosive' ? .96 : 1)
* ($_->{type} eq 'explosive' ? .98 : 1)