git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bd72883
)
sc: separate shield and hp values in data
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 10 Jun 2015 22:56:30 +0000
(
00:56
+0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 10 Jun 2015 23:40:32 +0000
(
01:40
+0200)
sc-units.inc.pl
patch
|
blob
|
history
sc.plp
patch
|
blob
|
history
diff --git
a/sc-units.inc.pl
b/sc-units.inc.pl
index 03fbc4b166b2ab652b91d4597b1a51f6993ba69f..62fbf8fc30a51cb11f3ba094956da2cd7217f0c4 100644
(file)
--- a/
sc-units.inc.pl
+++ b/
sc-units.inc.pl
@@
-14,8
+14,8
@@
suit => 1,
unit => 1,
race => 'protoss',
organic => 0,
unit => 1,
race => 'protoss',
organic => 0,
-hp =>
4
0,
-shield =>
5
0,
+hp =>
2
0,
+shield =>
2
0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-44,8
+44,8
@@
build => 50,
suit => 3,
unit => 0,
race => 'protoss',
suit => 3,
unit => 0,
race => 'protoss',
-hp =>
2
00,
-shield =>
5
0,
+hp =>
1
00,
+shield =>
10
0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-79,8
+79,8
@@
suit => 1,
unit => 2,
race => 'protoss',
organic => 1,
unit => 2,
race => 'protoss',
organic => 1,
-hp => 1
6
0,
-shield =>
38
,
+hp => 1
0
0,
+shield =>
60
,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-116,8
+116,8
@@
suit => 3,
unit => 2,
race => 'protoss',
organic => 0,
unit => 2,
race => 'protoss',
organic => 0,
-hp => 1
8
0,
-shield =>
44
,
+hp => 1
0
0,
+shield =>
80
,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-160,8
+160,8
@@
suit => 1,
unit => 2,
race => 'protoss',
organic => 1,
unit => 2,
race => 'protoss',
organic => 1,
-hp =>
8
0,
-shield =>
5
0,
+hp =>
4
0,
+shield =>
4
0,
armor => 0,
attack => {
},
armor => 0,
attack => {
},
@@
-221,8
+221,8
@@
suit => 1,
unit => 2,
race => 'protoss',
organic => 1,
unit => 2,
race => 'protoss',
organic => 1,
-hp =>
12
0,
-shield =>
33
,
+hp =>
8
0,
+shield =>
40
,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-253,8
+253,8
@@
suit => 3,
unit => 4,
race => 'protoss',
organic => 0,
unit => 4,
race => 'protoss',
organic => 0,
-hp =>
36
0,
-shield =>
97
,
+hp =>
1
0,
+shield =>
350
,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-290,8
+290,8
@@
suit => 3,
unit => 4,
race => 'protoss',
organic => 0,
unit => 4,
race => 'protoss',
organic => 0,
-hp => 2
2
5,
-shield =>
89
,
+hp => 25,
+shield =>
200
,
armor => 1,
attack => {
},
armor => 1,
attack => {
},
@@
-359,8
+359,8
@@
unit => 3,
race => 'protoss',
organic => 0,
air => 1,
race => 'protoss',
organic => 0,
air => 1,
-hp =>
2
50,
-shield =>
4
0,
+hp =>
1
50,
+shield =>
10
0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-401,8
+401,8
@@
unit => 2,
race => 'protoss',
organic => 0,
air => 1,
race => 'protoss',
organic => 0,
air => 1,
-hp => 1
8
0,
-shield =>
44
,
+hp => 1
0
0,
+shield =>
80
,
armor => 1,
attack => {
air => {
armor => 1,
attack => {
air => {
@@
-441,8
+441,8
@@
suit => 3,
unit => 6,
race => 'protoss',
organic => 0,
unit => 6,
race => 'protoss',
organic => 0,
-hp =>
45
0,
-shield =>
33
,
+hp =>
30
0,
+shield =>
150
,
armor => 4,
attack => {
ground => {
armor => 4,
attack => {
ground => {
@@
-481,8
+481,8
@@
unit => 4,
race => 'protoss',
organic => 0,
air => 1,
race => 'protoss',
organic => 0,
air => 1,
-hp =>
35
0,
-shield =>
43
,
+hp =>
20
0,
+shield =>
150
,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-540,8
+540,8
@@
suit => 3,
unit => 4,
race => 'protoss',
organic => 0,
unit => 4,
race => 'protoss',
organic => 0,
-hp => 1
8
0,
-shield =>
44
,
+hp => 1
0
0,
+shield =>
80
,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-597,8
+597,8
@@
unit => 1,
race => 'protoss',
organic => 0,
air => 1,
race => 'protoss',
organic => 0,
air => 1,
-hp =>
6
0,
-shield =>
33
,
+hp =>
4
0,
+shield =>
20
,
armor => 0,
attack => {
},
armor => 0,
attack => {
},
@@
-636,8
+636,8
@@
suit => 3,
unit => 2,
race => 'protoss',
organic => 0,
unit => 2,
race => 'protoss',
organic => 0,
-hp =>
14
0,
-shield =>
43
,
+hp =>
8
0,
+shield =>
60
,
armor => 1,
attack => {
},
armor => 1,
attack => {
},
@@
-664,7
+664,6
@@
unit => 1,
race => 'terran',
organic => 0,
hp => 60,
race => 'terran',
organic => 0,
hp => 60,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-691,7
+690,6
@@
suit => 3,
unit => 0,
race => 'terran',
hp => 200,
unit => 0,
race => 'terran',
hp => 200,
-shield => 0,
armor => 0,
attack => {
air => {
armor => 0,
attack => {
air => {
@@
-721,7
+719,6
@@
unit => 1,
race => 'terran',
organic => 1,
hp => 40,
race => 'terran',
organic => 1,
hp => 40,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-773,7
+770,6
@@
unit => 1,
race => 'terran',
organic => 1,
hp => 50,
race => 'terran',
organic => 1,
hp => 50,
-shield => 0,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-814,7
+810,6
@@
unit => 1,
race => 'terran',
organic => 1,
hp => 45,
race => 'terran',
organic => 1,
hp => 45,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-872,7
+867,6
@@
unit => 1,
race => 'terran',
organic => 1,
hp => 60,
race => 'terran',
organic => 1,
hp => 60,
-shield => 0,
armor => 1,
attack => {
},
armor => 1,
attack => {
},
@@
-920,7
+914,6
@@
unit => 2,
race => 'terran',
organic => 0,
hp => 80,
race => 'terran',
organic => 0,
hp => 80,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-966,7
+959,6
@@
unit => 2,
race => 'terran',
organic => 0,
hp => 150,
race => 'terran',
organic => 0,
hp => 150,
-shield => 0,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-1012,7
+1004,6
@@
unit => 2,
race => 'terran',
organic => 0,
hp => 125,
race => 'terran',
organic => 0,
hp => 125,
-shield => 0,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-1052,7
+1043,6
@@
race => 'terran',
organic => 0,
air => 1,
hp => 120,
organic => 0,
air => 1,
hp => 120,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-1094,7
+1084,6
@@
race => 'terran',
organic => 0,
air => 1,
hp => 500,
organic => 0,
air => 1,
hp => 500,
-shield => 0,
armor => 3,
attack => {
ground => {
armor => 3,
attack => {
ground => {
@@
-1138,7
+1127,6
@@
race => 'terran',
organic => 0,
air => 1,
hp => 200,
organic => 0,
air => 1,
hp => 200,
-shield => 0,
armor => 1,
attack => {
},
armor => 1,
attack => {
},
@@
-1191,7
+1179,6
@@
race => 'terran',
organic => 0,
air => 1,
hp => 200,
organic => 0,
air => 1,
hp => 200,
-shield => 0,
armor => 2,
attack => {
air => {
armor => 2,
attack => {
air => {
@@
-1219,7
+1206,6
@@
race => 'terran',
organic => 0,
air => 1,
hp => 150,
organic => 0,
air => 1,
hp => 150,
-shield => 0,
armor => 1,
attack => {
},
armor => 1,
attack => {
},
@@
-1241,7
+1227,6
@@
unit => (1),
race => 'zerg',
organic => 1,
hp => 40,
race => 'zerg',
organic => 1,
hp => 40,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-1267,7
+1252,6
@@
race => 'zerg',
organic => 1,
air => 1,
hp => 200,
organic => 1,
air => 1,
hp => 200,
-shield => 0,
armor => 0,
attack => {
},
armor => 0,
attack => {
},
@@
-1300,7
+1284,6
@@
unit => 0,
race => 'zerg',
organic => 1,
hp => 25,
race => 'zerg',
organic => 1,
hp => 25,
-shield => 0,
armor => 10,
attack => {
},
armor => 10,
attack => {
},
@@
-1323,7
+1306,6
@@
unit => 0,
race => 'zerg',
organic => 1,
hp => 200,
race => 'zerg',
organic => 1,
hp => 200,
-shield => 0,
armor => 10,
attack => {
},
armor => 10,
attack => {
},
@@
-1342,7
+1324,6
@@
suit => 3,
unit => 0,
race => 'zerg',
hp => 300,
unit => 0,
race => 'zerg',
hp => 300,
-shield => 0,
armor => 2,
attack => {
ground => {
armor => 2,
attack => {
ground => {
@@
-1367,7
+1348,6
@@
suit => 3,
unit => 0,
race => 'zerg',
hp => 400,
unit => 0,
race => 'zerg',
hp => 400,
-shield => 0,
armor => 0,
attack => {
air => {
armor => 0,
attack => {
air => {
@@
-1393,7
+1373,6
@@
unit => 0.5,
race => 'zerg',
organic => 1,
hp => 35,
race => 'zerg',
organic => 1,
hp => 35,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-1431,7
+1410,6
@@
unit => 1,
race => 'zerg',
organic => 1,
hp => 80,
race => 'zerg',
organic => 1,
hp => 80,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-1473,7
+1451,6
@@
unit => 2,
race => 'zerg',
organic => 1,
hp => 125,
race => 'zerg',
organic => 1,
hp => 125,
-shield => 0,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
@@
-1500,7
+1477,6
@@
race => 'zerg',
organic => 1,
air => 1,
hp => 120,
organic => 1,
air => 1,
hp => 120,
-shield => 0,
armor => 0,
attack => {
},
armor => 0,
attack => {
},
@@
-1549,7
+1525,6
@@
unit => 0,
race => 'zerg',
organic => 1,
hp => 30,
race => 'zerg',
organic => 1,
hp => 30,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-1574,7
+1549,6
@@
unit => 1,
race => 'zerg',
organic => 1,
hp => 60,
race => 'zerg',
organic => 1,
hp => 60,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-1601,7
+1575,6
@@
race => 'zerg',
organic => 1,
air => 1,
hp => 25,
organic => 1,
air => 1,
hp => 25,
-shield => 0,
armor => 0,
attack => {
air => {
armor => 0,
attack => {
air => {
@@
-1626,7
+1599,6
@@
race => 'zerg',
organic => 1,
air => 1,
hp => 120,
organic => 1,
air => 1,
hp => 120,
-shield => 0,
armor => 0,
attack => {
ground => {
armor => 0,
attack => {
ground => {
@@
-1643,7
+1615,7
@@
attack => {
},
sight => 7,
speed => 18,
},
sight => 7,
speed => 18,
-special => [],
+special => [],
#TODO: glaive
counter => ['templar', 'corsair', 'valkyrie'],
},
counter => ['templar', 'corsair', 'valkyrie'],
},
@@
-1660,7
+1632,6
@@
race => 'zerg',
organic => 1,
air => 1,
hp => 150,
organic => 1,
air => 1,
hp => 150,
-shield => 0,
armor => 2,
attack => {
ground => {
armor => 2,
attack => {
ground => {
@@
-1687,7
+1658,6
@@
race => 'zerg',
organic => 1,
air => 1,
hp => 250,
organic => 1,
air => 1,
hp => 250,
-shield => 0,
armor => 2,
attack => {
air => {
armor => 2,
attack => {
air => {
@@
-1713,7
+1683,6
@@
unit => 2,
race => 'zerg',
organic => 1,
hp => 80,
race => 'zerg',
organic => 1,
hp => 80,
-shield => 0,
armor => 1,
attack => {
},
armor => 1,
attack => {
},
@@
-1758,7
+1727,6
@@
unit => 4,
race => 'zerg',
organic => 1,
hp => 400,
race => 'zerg',
organic => 1,
hp => 400,
-shield => 0,
armor => 1,
attack => {
ground => {
armor => 1,
attack => {
ground => {
diff --git
a/sc.plp
b/sc.plp
index 873c75b6964c71a95ec178e9c507ceacd92dcac2..9a9a12a2e8af7ac4ff7e9e0e14382ac077404bcd 100644
(file)
--- a/
sc.plp
+++ b/
sc.plp
@@
-269,6
+269,7
@@
sub showrange {
printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
if $grouped and $race ne $_->{race};
$_->{cat} = $_->{race} if not $grouped;
printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
if $grouped and $race ne $_->{race};
$_->{cat} = $_->{race} if not $grouped;
+ $_->{hp} += $_->{shield};
my $suitchar = [qw/? s m l/]->[$_->{suit}];
print(
'<tr>',
my $suitchar = [qw/? s m l/]->[$_->{suit}];
print(
'<tr>',
@@
-291,7
+292,9
@@
sub showrange {
),
),
'<td class="val unit-hp">' . $_->{hp},
),
),
'<td class="val unit-hp">' . $_->{hp},
- '<td class="val unit-shield">' . ($_->{shield} ? $_->{shield}.'%' : ' '),
+ '<td class="val unit-shield">' . (
+ $_->{shield} ? sprintf('%.0f%%', 100 * $_->{shield} / $_->{hp}) : ' '
+ ),
'<td class="val unit-armor">' . showrange($_, 'armor'),
showattack($_, 'ground'),
showattack($_, 'air'),
'<td class="val unit-armor">' . showrange($_, 'armor'),
showattack($_, 'ground'),
showattack($_, 'air'),