sc: special-case invulnerability for adept shades
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 22 Apr 2018 01:30:13 +0000 (03:30 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 10 May 2018 14:49:06 +0000 (16:49 +0200)
sc-units-lotv.inc.pl
sc.plp

index 9d99fcc0ce4bf182563bbd64d49881c327a229fd..dfa9748c7867104f6165b0814b4bde8d47b0fd76 100644 (file)
@@ -118,9 +118,7 @@ $unit{sentry},
                        build => 0,
                        size => 0,
                        cargo => 0,
-                       attr => {
-                               trans => 1,
-                       },
+                       hp => -1,
                        attack => [], #TODO: indicate diff from parent
                        speed => 5, #XXX: faster than 3.5
                        range => 7, #XXX: calculate from speed
diff --git a/sc.plp b/sc.plp
index bbcd9c91102c181cefb9a0c325ca7b8527693f43..53934f2298a28f2eff04a632b8f9db3a31042fda 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -318,6 +318,7 @@ sub showrangeint {
                                $_->{attr}->{massive}
                                        && '<span class="unit-massive" title="massive">⚓</span>',
                        ),
+                       $_->{hp} < 0 ? '<td class="val unit-hp" title="invulnerable">∞' :
                        '<td class="val unit-hp">' . $_->{hp} // '',
                        $_->{shield} ? sprintf('<td class="val unit-shield">%.0f%%<td',
                                100 * $_->{shield} / $_->{hp}