aboutsummaryrefslogtreecommitdiff
path: root/game/gst.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/gst.h')
-rw-r--r--game/gst.h13
1 files changed, 10 insertions, 3 deletions
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 <vector>
#include <functional>
+#include <random> // 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<Tech> techs;
std::vector<Ability> abilities;
@@ -63,6 +69,7 @@ class Gst {
std::vector<float> 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<Bonus> 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<int> get_possible_trains (Entity &ent);
std::vector<int> 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);