aboutsummaryrefslogtreecommitdiff
path: root/game/ground.cpp
diff options
context:
space:
mode:
authorjacopograndi <jak.sk8@hotmail.it>2021-08-31 23:53:53 +0200
committerjacopograndi <jak.sk8@hotmail.it>2021-08-31 23:53:53 +0200
commit8af1284654a4a5d454a559eca371bf0ac3c79786 (patch)
tree70e9cf9d3d11a205175bdad394b6201870cf7f07 /game/ground.cpp
parentfb5a98b72ab79949d1da7f75a3d6150c2906ef40 (diff)
tech done, building sprites, upgrade on age up, gui
Diffstat (limited to 'game/ground.cpp')
-rw-r--r--game/ground.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/game/ground.cpp b/game/ground.cpp
index e6055bf..4308047 100644
--- a/game/ground.cpp
+++ b/game/ground.cpp
@@ -38,9 +38,13 @@ class step { public:
};
std::vector<int> Ground::move_area (Gst &gst, Entity &ent) {
+ Player &player = gst.players[ent.owner];
+ int move_num = ent.info->move;
+ move_num += player.tech_lookup.id(ent.info->id).move;
+
std::vector<int> moves;
std::vector<int> visited { at(ent.x, ent.y) };
- std::vector<step> frontier { step { at(ent.x, ent.y), ent.info->move } };
+ std::vector<step> frontier { step { at(ent.x, ent.y), move_num } };
int maxcost = 99;
if (gst.info_has_ability(ent.info, "Scout")) maxcost = 2;