From: Mischa POSLAWSKY Date: Fri, 19 Jun 2015 05:49:04 +0000 (+0200) Subject: sc: inline damage type indicators in html X-Git-Tag: v1.8~135 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/70cddeb28fadb6c81c9af75483c179a521a1dcdf?hp=ff8430cbb1b88a898dcceff83537980c24edffaa sc: inline damage type indicators in html Distinguish metadata without CSS styling, preparing for additional classes without depending on stylesheet updates. --- diff --git a/sc.css b/sc.css index 95f53a3..6c2d151 100644 --- a/sc.css +++ b/sc.css @@ -44,18 +44,10 @@ table h2 { color: #C88; font-size: 70%; } -.unit.unit-s {color: #770} -.unit.unit-m {color: #C70} -.unit.unit-l {color: #D22} -.unit.unit-h {color: #804} -.hurt.unit-s::before { - content: '~'; - color: #773; -} -.hurt.unit-l::before { - content: '*'; - color: #C66; -} +.unit-s {color: #770} +.unit-m {color: #C70} +.unit-l {color: #D22} +.unit-h {color: #804} td .unit-massive, td .unit-jump, .hurt .unit-splash { diff --git a/sc.plp b/sc.plp index 0a0f161..b06f22e 100644 --- a/sc.plp +++ b/sc.plp @@ -111,16 +111,7 @@ sub showrange { my $out = ''; $out .= '' . '▽' x !!($attack->{anti} & 1); $out .= '' . '△' x !!($attack->{anti} & 2); - $out .= ''; + $out .= ''; my $upattack = $row->{upgraded}->{attack}->[$area]; my $damage = $attack->{damage}; @@ -129,6 +120,10 @@ sub showrange { $maxdamage = $maxdamage->[-1] if ref $maxdamage; $out .= "$attack->{count}× " if $attack->{count} > 1; + $out .= '*' + if $attack->{type} eq 'explosive'; + $out .= '~' + if $attack->{type} eq 'implosive'; $out .= showrange($damage, $maxdamage); $out .= sprintf('%s', $attack->{splash} eq 'line' ? ('linear', '×') : ('splash', '+') @@ -360,9 +355,9 @@ if ($scver{major} > 1) { 1 second of in-game time
splash damage hits all objects nearby + or in a straight line ×. -
explosive damage does only +
*explosive damage does only 50% damage to small units, 75% to medium, 100% to large -
concussive/plasma damage does +
~concussive/plasma damage does 25% to large, 50% medium, 100% to small units
sight
range in which the unit detects other units