diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-08-30 14:48:06 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-08-30 14:48:06 +0200 |
commit | fb5a98b72ab79949d1da7f75a3d6150c2906ef40 (patch) | |
tree | 9097b4e1f31e530874df9ab85be03f763fc4ef1b /game/gst.h | |
parent | ace5c3f3093c50ff7fa6f8b281a377e3788abbd5 (diff) |
gui: tech representation, menu, tile & unit info, attack info
Diffstat (limited to 'game/gst.h')
-rw-r--r-- | game/gst.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -24,6 +24,21 @@ class Bonus { Bonus(float amt, int id, bool atk) : amt(amt), id(id), atk(atk) {} float amt; int id; bool atk; enum Id { ground, type, ability, tech }; + std::string id_string () { + switch (id) { + case ground: return "Ground"; + case type: return "Class"; + case ability: return "Ability"; + case tech: return "Tech"; + } + } +}; + +class BattleResult { + public: + BattleResult(float atk_hp, float def_hp) + : atk_hp(atk_hp), def_hp(def_hp) {} + float atk_hp, def_hp; }; class Gst { @@ -47,9 +62,12 @@ class Gst { float get_type_bonus (Entity &atk, Entity &def); std::vector<Bonus> get_bonuses (Entity &atk, Entity &def); float get_damage (Entity &atk, Entity &def); + float get_damage (Entity &atk, Entity &def, float atk_hp); bool get_first_strike (Entity &atk, Entity &def); + BattleResult battle_res (Entity &atk, Entity &def); void battle (Entity &atk, Entity &def); void clear_dead(); + int get_range(Entity &ent); std::vector<int> get_possible_builds (Entity &ent); |