Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ford^Overlay: Costs for worst(best(a, b), c, d) terrain are worst(a, b, c, d) #4279

Open
stevecotton opened this issue Aug 25, 2019 · 0 comments

Comments

@stevecotton
Copy link
Contributor

commented Aug 25, 2019

Some terrains' movement costs are best of, and some are worst of. For example ford, Wwf is best(flat, shallow_water), and snowy pine forest, ^Fpa is worst(_bas, forest, arctic).

Bug: the movement costs for Wwf^Fpa are worst(all four types), instead of the expected worst(best(flat, shallow_water), forest, arctic). There's already a unit test for this, to prevent OOS once we get to the 1.16 stable branch.

# ford snowy forest (Frozen, Forest, Flat, Shallow Water)
# Keep
#
# Note: in 1.14 (and 1.15 at the time of writing), ford snowy forest's movement is
# the worst of all four types, not the worst of (Frozen, Forest, Ford).

For this terrain, ter_data_cache::underlying_mvt_terrain(terrain) returns {-, Gt, Wst, -, At, Ft}.

Logging now because I'm not trying to debug this now, rather I was investigating whether movetype.cpp and help_topic_generators.cpp are more complicated than necessary, as they have recursive logic which might already be handled in terrain.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.