sc: indicate and explain composed units
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 10 Jun 2015 00:00:17 +0000 (02:00 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 10 Jun 2015 00:13:48 +0000 (02:13 +0200)
Prefix '+' to [additional] build time.

sc.plp

diff --git a/sc.plp b/sc.plp
index 7207117f79831f6f3928ae7bd33d6e24f10e418d..e5f528fedcfb0c4839c3c7870471528a0d7822c1 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -63,6 +63,10 @@ Unit properties as seen or measured in Brood War
                margin-left: 0.2em;
                vertical-align: middle;
        }
                margin-left: 0.2em;
                vertical-align: middle;
        }
+       .unit-composed {
+               color: #C88;
+               font-size: 70%;
+       }
        .unit {
                text-align: center;
                white-space: nowrap;
        .unit {
                text-align: center;
                white-space: nowrap;
@@ -265,7 +269,10 @@ sub showrange {
                        '<td>' . $_->{name},
                        '<td class="val min">' . ($_->{min} || '0'),
                        '<td class="val gas">' . ($_->{gas} || ''),
                        '<td>' . $_->{name},
                        '<td class="val min">' . ($_->{min} || '0'),
                        '<td class="val gas">' . ($_->{gas} || ''),
-                       '<td class="val time">' . sprintf('%.0f', $_->{build} || '0'),
+                       sprintf('<td class="val time">%s%.0f',
+                               !!$_->{base} && '<span class="unit-composed">+</span>',
+                               $_->{build} || '0',
+                       ),
                        sprintf('<td class="unit unit-%s">%s', $sizechar, ucfirst $sizechar),
                        '<td class="val unit">' . join('',
                                $_->{unit} ? $_->{unit} == .5 ? '½' : $_->{unit} : '&nbsp;',
                        sprintf('<td class="unit unit-%s">%s', $sizechar, ucfirst $sizechar),
                        '<td class="val unit">' . join('',
                                $_->{unit} ? $_->{unit} == .5 ? '½' : $_->{unit} : '&nbsp;',
@@ -316,14 +323,17 @@ sub showrange {
 <dl>
 <dt>cost
        <dd>minerals+gas required to create one unit
 <dl>
 <dt>cost
        <dd>minerals+gas required to create one unit
+       <dd>includes total expenses if based on existing units
 <dt>build
        <dd>relative time needed to create at least one unit
 <dt>build
        <dd>relative time needed to create at least one unit
+       <dd>excludes construction of dependencies such as buildings
+               and <span class="unit-composed">+</span>parent units
 <dt>size
 <dt>size
-       <dd><span class="unit unit-s">S</span>mall,
+       <dd>affected by <span class="unit unit-s">S</span>mall,
                <span class="unit unit-m">M</span>edium,
                or <span class="unit unit-l">L</span>arge unit damage
        <dd>number of command points taken per unit
                <span class="unit unit-m">M</span>edium,
                or <span class="unit unit-l">L</span>arge unit damage
        <dd>number of command points taken per unit
-       <dd><span class="unit unit-o">organic</span>/<span class="unit unit-u">mechanic</span> unit
+       <dd><span class="unit unit-o">o</span>rganic/<span class="unit unit-u">m</span>echanic unit
 <dt>HP<dd>
        total number of hitpoints (including shields)
 <dt>shield
 <dt>HP<dd>
        total number of hitpoints (including shields)
 <dt>shield
@@ -334,7 +344,7 @@ sub showrange {
        <dd>base unit armor
        <dd>can be increased by upto 3 at various facilities
        <dd>each point decreases damage per hit by one, upto a minimum of ½
        <dd>base unit armor
        <dd>can be increased by upto 3 at various facilities
        <dd>each point decreases damage per hit by one, upto a minimum of ½
-       <dd>reduction applies to initial damage, before size penalties <small>(so a large plasma hit of 12 to 4 armor deals 2 damage, not ½)</small>
+       <dd>reduction applies to initial damage, before size penalties <small>(so a plasma hit of 12 to 4 armor large deals 2 damage, not ½)</small>
 <dt>ground/air
        <dd>damage done per single attack against ground/air units
        <dd>2nd column indicates relative amount of damage done in
 <dt>ground/air
        <dd>damage done per single attack against ground/air units
        <dd>2nd column indicates relative amount of damage done in