summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-01-08 15:38:00 +0100
committerAki <please@ignore.pl>2023-01-08 15:38:00 +0100
commit209648a39c98ccddc622703554912a21c2471531 (patch)
tree3e322af8eefd566cdf2b5d6f997431c6d6a184b4 /sim/include
parent088f57155c79c5ee41e667496e2cd657af91a605 (diff)
downloadkurator-209648a39c98ccddc622703554912a21c2471531.zip
kurator-209648a39c98ccddc622703554912a21c2471531.tar.gz
kurator-209648a39c98ccddc622703554912a21c2471531.tar.bz2
Implemented naive armour and shield without parametrized resits
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim/HitPoints.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sim/include/kurator/sim/HitPoints.h b/sim/include/kurator/sim/HitPoints.h
index b9a8523..0004999 100644
--- a/sim/include/kurator/sim/HitPoints.h
+++ b/sim/include/kurator/sim/HitPoints.h
@@ -9,8 +9,18 @@ namespace sim
struct HitPoints
{
- double structure;
- double structure_resists = 0.7;
+ HitPoints(double base_shield, double base_armour, double base_structure);
+
+ struct Layer
+ {
+ double points;
+ double resists = 0.7;
+ double consume(double& damage);
+ };
+
+ Layer structure;
+ Layer armour;
+ Layer shield;
double deal(double damage);
bool is_alive() const;
double total() const;