You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With caravan_bonus_style CLASSIC, the revenue is calculated using map_distance instead of real_map_distance. There is even a comment saying Should this be real_map_distance?. map_distance corresponds to the Manhattan distance and real_map_distance to the Euclidean one.
As a consequence of this, moving a caravan diagonally grants a bonus roughly 2x the bonus of a caravan moving along x or y (for the same number of moves).
To Reproduce
Steps to reproduce the behavior:
Read the code (common/traderoutes.cpp)
Expected behavior
I propose to change this to real_map_distance instead. A correction factor could be introduced to maintain the balance of existing rulesets (on average).
Platform and version (please complete the following information):
OS: any
Freeciv21 version: master
Ruleset/Longturn game (if applicable): any of the shipped rulesets with caravans that can Enter marketplace
The CLASSIC trade route revenue style was using map_distance() which is the
Manhattan distance. Using Euclidian makes much more sense since this is how
units move.
Closeslongturn#882.
lmoureaux
added a commit
to lmoureaux/freeciv21
that referenced
this issue
Dec 27, 2023
The CLASSIC trade route revenue style was using map_distance() which is the
Manhattan distance. Using Euclidian makes much more sense since this is how
units move.
Closes#882.
Describe the bug
With
caravan_bonus_style CLASSIC
, the revenue is calculated usingmap_distance
instead ofreal_map_distance
. There is even a comment sayingShould this be real_map_distance?
.map_distance
corresponds to the Manhattan distance andreal_map_distance
to the Euclidean one.As a consequence of this, moving a caravan diagonally grants a bonus roughly 2x the bonus of a caravan moving along x or y (for the same number of moves).
To Reproduce
Steps to reproduce the behavior:
common/traderoutes.cpp
)Expected behavior
I propose to change this to
real_map_distance
instead. A correction factor could be introduced to maintain the balance of existing rulesets (on average).Platform and version (please complete the following information):
master
Enter marketplace
Additional context
#880
The text was updated successfully, but these errors were encountered: