aboutsummaryrefslogtreecommitdiff
path: root/game/ground.cpp
diff options
context:
space:
mode:
authorjacopograndi <jak.sk8@hotmail.it>2021-08-30 14:48:06 +0200
committerjacopograndi <jak.sk8@hotmail.it>2021-08-30 14:48:06 +0200
commitfb5a98b72ab79949d1da7f75a3d6150c2906ef40 (patch)
tree9097b4e1f31e530874df9ab85be03f763fc4ef1b /game/ground.cpp
parentace5c3f3093c50ff7fa6f8b281a377e3788abbd5 (diff)
gui: tech representation, menu, tile & unit info, attack info
Diffstat (limited to 'game/ground.cpp')
-rw-r--r--game/ground.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/game/ground.cpp b/game/ground.cpp
index 0ea273d..e6055bf 100644
--- a/game/ground.cpp
+++ b/game/ground.cpp
@@ -88,9 +88,7 @@ std::vector<int> Ground::move_area (Gst &gst, Entity &ent) {
std::vector<int> Ground::attack_targets (Gst &gst, Entity &ent) {
std::vector<int> attacks;
- int range = ent.info->range;
- range += gst.tiles[gst.ground.tiles[gst.ground.at(ent.x, ent.y)]]
- .range_bonus;
+ int range = gst.get_range(ent);
bool builds = !gst.info_has_ability(ent.info, "Units Only");
bool units = !gst.info_has_ability(ent.info, "Buildings Only");
for (Entity &e : gst.entities) {