aboutsummaryrefslogtreecommitdiff
path: root/game/gst.h
diff options
context:
space:
mode:
authorjacopograndi <jak.sk8@hotmail.it>2021-09-05 22:36:13 +0200
committerjacopograndi <jak.sk8@hotmail.it>2021-09-05 22:36:13 +0200
commit728abda9dc6fc8e65c7c0e0240a2e7d61a43a583 (patch)
tree545187ed3d634792af1082ce021665d3ef4934fc /game/gst.h
parentc298eb988874bc2cf3adb39c2532419ec76a24bc (diff)
tech tostring, all sprites, heal and convert
Diffstat (limited to 'game/gst.h')
-rw-r--r--game/gst.h31
1 files changed, 22 insertions, 9 deletions
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<Tech> techs;
std::vector<Ability> abilities;
std::vector<EntityInfo> infos;
std::vector<Tile> tiles;
- std::vector<Entity> entities;
Ground ground;
+ private:
+ std::default_random_engine engine = std::default_random_engine{};
+}
+
+class Gst {
+ public:
+ Gst() { }
+
+ Inv *inv;
+
+ std::vector<Entity> entities;
std::vector<Player> 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<int> 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<int> get_possible_trains (Entity &ent);
std::vector<int> 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);