From 728abda9dc6fc8e65c7c0e0240a2e7d61a43a583 Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Sun, 5 Sep 2021 22:36:13 +0200 Subject: tech tostring, all sprites, heal and convert --- game/gst.h | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'game/gst.h') diff --git a/game/gst.h b/game/gst.h index 82f4b07..dc68b31 100644 --- a/game/gst.h +++ b/game/gst.h @@ -46,20 +46,32 @@ class BattleResult { float atk_hp, def_hp; }; -class Gst { - private: std::default_random_engine engine = std::default_random_engine{}; +class Inv { public: - Gst(int sx, int sy) : ground(sx, sy) { } + Inv () {} std::vector techs; std::vector abilities; std::vector infos; std::vector tiles; - std::vector entities; Ground ground; + private: + std::default_random_engine engine = std::default_random_engine{}; +} + +class Gst { + public: + Gst() { } + + Inv *inv; + + std::vector entities; std::vector players; + int turn { 0 }; + int day { 0 }; + Player& get_player (int id); Tech* get_tech (int id); EntityInfo* get_info (std::string name); @@ -76,11 +88,15 @@ class Gst { 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 get_possible_trains (Entity &ent); + void battle (Entity &atk, Entity &def); + + void heal (Entity &atk, Entity &def); + void convert (Entity &atk, Entity &def); + + std::vector get_possible_trains (Entity &ent); std::vector get_possible_builds (Entity &ent); bool check_req_build (Entity &ent, EntityInfo *info); @@ -88,9 +104,6 @@ class Gst { bool check_req_level (Player &player); bool check_obstructed (Entity &ent); - int turn { 0 }; - int day { 0 }; - void end_day (); void level_upgrade (Player &player); -- cgit v1.2.3-54-g00ecf