Skip to content

Commit

Permalink
Change hitpoints handling in stats
Browse files Browse the repository at this point in the history
Each component now has two base hitpoint stats,
'hitpoints' and 'hitpoint percentage'. The latter
increases the hitpoints of the whole droid. Each
can be upgraded through the scripts. The old
"body points" has been renamed to "hitpoints"
throughout the stats code, to match JSON stats.

Propulsions also have a new 'hitpoint percentage
of body' stat, to emulate the current strange
calculation, where propulsions are a percentage
of the body hitpoints, without preventing scripts
from setting hitpoints directly.

Tiny balance change: The brain component can be
upgraded to increase hitpoints from this
component by 20%. This is mostly an example of how
the new system can be used - commanders are still
useless.
  • Loading branch information
perim committed Jun 13, 2017
1 parent e760917 commit b1cb129
Show file tree
Hide file tree
Showing 17 changed files with 480 additions and 232 deletions.
1 change: 1 addition & 0 deletions data/base/stats/brain.json
@@ -1,6 +1,7 @@
{
"CommandBrain01": {
"designable": 1,
"hitpoints": 500,
"id": "CommandBrain01",
"maxDroids": 6,
"maxDroidsMult": 2,
Expand Down
38 changes: 18 additions & 20 deletions data/base/stats/propulsion.json
Expand Up @@ -2,7 +2,6 @@
"BaBaLegs": {
"buildPoints": 15,
"deceleration": 450,
"hitpoints": 1,
"id": "BaBaLegs",
"name": "BaBaLegs",
"speed": 200,
Expand All @@ -14,7 +13,6 @@
},
"BaBaProp": {
"buildPoints": 15,
"hitpoints": 1,
"id": "BaBaProp",
"name": "BaBaProp",
"speed": 200,
Expand All @@ -25,7 +23,7 @@
"buildPoints": 50,
"buildPower": 10,
"deceleration": 450,
"hitpoints": 50,
"hitpointPctOfBody": 50,
"id": "CyborgLegs",
"name": "Cyborg Propulsion",
"speed": 400,
Expand All @@ -39,7 +37,7 @@
"buildPoints": 50,
"buildPower": 10,
"deceleration": 450,
"hitpoints": 100,
"hitpointPctOfBody": 100,
"id": "CyborgLegs02",
"name": "Cyborg Propulsion II",
"speed": 400,
Expand All @@ -53,7 +51,7 @@
"buildPoints": 50,
"buildPower": 10,
"deceleration": 450,
"hitpoints": 150,
"hitpointPctOfBody": 150,
"id": "CyborgLegs03",
"name": "Cyborg Propulsion III",
"speed": 400,
Expand All @@ -67,7 +65,7 @@
"buildPoints": 75,
"buildPower": 75,
"designable": 1,
"hitpoints": 200,
"hitpointPctOfBody": 200,
"id": "HalfTrack",
"model": "PRLRHTR1.PIE",
"name": "Half-tracks",
Expand All @@ -79,7 +77,7 @@
"HalfTrack02": {
"buildPoints": 75,
"buildPower": 100,
"hitpoints": 350,
"hitpointPctOfBody": 350,
"id": "HalfTrack02",
"model": "PRLRHTR1.PIE",
"name": "Half-tracks II",
Expand All @@ -91,7 +89,7 @@
"HalfTrack03": {
"buildPoints": 75,
"buildPower": 125,
"hitpoints": 500,
"hitpointPctOfBody": 500,
"id": "HalfTrack03",
"model": "PRLRHTR1.PIE",
"name": "Half-tracks III",
Expand All @@ -106,7 +104,7 @@
"buildPower": 150,
"deceleration": 200,
"designable": 1,
"hitpoints": 100,
"hitpointPctOfBody": 100,
"id": "V-Tol",
"model": "DPVTOL.PIE",
"name": "VTOL",
Expand All @@ -121,7 +119,7 @@
"buildPoints": 125,
"buildPower": 250,
"deceleration": 200,
"hitpoints": 150,
"hitpointPctOfBody": 150,
"id": "V-Tol02",
"model": "DPVTOL.PIE",
"name": "VTOL II",
Expand All @@ -136,7 +134,7 @@
"buildPoints": 125,
"buildPower": 300,
"deceleration": 200,
"hitpoints": 300,
"hitpointPctOfBody": 300,
"id": "V-Tol03",
"model": "DPVTOL.PIE",
"name": "VTOL III",
Expand All @@ -156,7 +154,7 @@
"buildPoints": 100,
"buildPower": 100,
"designable": 1,
"hitpoints": 150,
"hitpointPctOfBody": 150,
"id": "hover01",
"model": "PRLHOV1.PIE",
"name": "Hover",
Expand All @@ -168,7 +166,7 @@
"hover02": {
"buildPoints": 100,
"buildPower": 150,
"hitpoints": 200,
"hitpointPctOfBody": 200,
"id": "hover02",
"model": "PRLHOV1.PIE",
"name": "Hover II",
Expand All @@ -180,7 +178,7 @@
"hover03": {
"buildPoints": 100,
"buildPower": 200,
"hitpoints": 300,
"hitpointPctOfBody": 300,
"id": "hover03",
"model": "PRLHOV1.PIE",
"name": "Hover III",
Expand All @@ -193,7 +191,7 @@
"buildPoints": 125,
"buildPower": 125,
"designable": 1,
"hitpoints": 400,
"hitpointPctOfBody": 400,
"id": "tracked01",
"model": "PRLRTRK1.PIE",
"name": "Tracks",
Expand All @@ -205,7 +203,7 @@
"tracked02": {
"buildPoints": 125,
"buildPower": 200,
"hitpoints": 600,
"hitpointPctOfBody": 600,
"id": "tracked02",
"model": "PRLRTRK1.PIE",
"name": "Tracks II",
Expand All @@ -217,7 +215,7 @@
"tracked03": {
"buildPoints": 125,
"buildPower": 275,
"hitpoints": 800,
"hitpointPctOfBody": 800,
"id": "tracked03",
"model": "PRLRTRK1.PIE",
"name": "Tracks III",
Expand All @@ -230,7 +228,7 @@
"buildPoints": 50,
"buildPower": 50,
"designable": 1,
"hitpoints": 100,
"hitpointPctOfBody": 100,
"id": "wheeled01",
"model": "PRLRWHL1.PIE",
"name": "Wheels",
Expand All @@ -242,7 +240,7 @@
"wheeled02": {
"buildPoints": 50,
"buildPower": 100,
"hitpoints": 200,
"hitpointPctOfBody": 200,
"id": "wheeled02",
"model": "PRLRWHL1.PIE",
"name": "Wheels II",
Expand All @@ -254,7 +252,7 @@
"wheeled03": {
"buildPoints": 50,
"buildPower": 150,
"hitpoints": 300,
"hitpointPctOfBody": 300,
"id": "wheeled03",
"model": "PRLRWHL1.PIE",
"name": "Wheels III",
Expand Down
12 changes: 6 additions & 6 deletions data/base/stats/research_cam1.json
Expand Up @@ -153,7 +153,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -184,7 +184,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -217,7 +217,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1371,7 +1371,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1402,7 +1402,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1435,7 +1435,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down
16 changes: 8 additions & 8 deletions data/base/stats/research_cam2.json
Expand Up @@ -172,7 +172,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -202,7 +202,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -231,7 +231,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -261,7 +261,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1730,7 +1730,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1760,7 +1760,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1789,7 +1789,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1819,7 +1819,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down
16 changes: 8 additions & 8 deletions data/base/stats/research_cam3.json
Expand Up @@ -181,7 +181,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -211,7 +211,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -240,7 +240,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -270,7 +270,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Cyborgs",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1709,7 +1709,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1739,7 +1739,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1768,7 +1768,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down Expand Up @@ -1798,7 +1798,7 @@
"class": "Body",
"filterParameter": "BodyClass",
"filterValue": "Droids",
"parameter": "HitPoints",
"parameter": "HitPointPct",
"value": 30
}
],
Expand Down

0 comments on commit b1cb129

Please sign in to comment.