From c298eb988874bc2cf3adb39c2532419ec76a24bc Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Thu, 2 Sep 2021 10:13:25 +0200 Subject: all imp sprites + train problems solved --- game/gst.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'game/gst.h') diff --git a/game/gst.h b/game/gst.h index c9c5d3c..82f4b07 100644 --- a/game/gst.h +++ b/game/gst.h @@ -7,6 +7,8 @@ #include #include +#include // just for picking market trains + #include "ground.h" #include "entity.h" #include "tile.h" @@ -23,13 +25,16 @@ class Bonus { public: 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 }; + enum Id { ground, type, ability, tech, veteran, on_bld, adjacency }; std::string id_string () { switch (id) { case ground: return "Ground"; case type: return "Class"; case ability: return "Ability"; case tech: return "Tech"; + case veteran: return "Veteran"; + case on_bld: return "On Building"; + case adjacency: return "Adjacency"; } } }; @@ -42,8 +47,9 @@ class BattleResult { }; class Gst { + private: std::default_random_engine engine = std::default_random_engine{}; public: - Gst(int sx, int sy) : ground(sx, sy) {} + Gst(int sx, int sy) : ground(sx, sy) { } std::vector techs; std::vector abilities; @@ -63,6 +69,7 @@ class Gst { std::vector get_cost (EntityInfo *info, Player &player); float get_trade_rate (Player &player); + int get_vet_level (Entity &ent); float get_type_bonus (Entity &atk, Entity &def); std::vector get_bonuses (Entity &atk, Entity &def); float get_damage (Entity &atk, Entity &def); @@ -73,10 +80,10 @@ class Gst { void clear_dead(); int get_range(Entity &ent); + std::vector get_possible_trains (Entity &ent); std::vector get_possible_builds (Entity &ent); bool check_req_build (Entity &ent, EntityInfo *info); - bool check_req_train (Entity &ent, EntityInfo *info); bool check_req_tech (Tech *tech, Player &player); bool check_req_level (Player &player); bool check_obstructed (Entity &ent); -- cgit v1.2.3-54-g00ecf