region: jump cost to hub is always 1, but spokes are more expensive

This commit is contained in:
Torrie Fischer 2022-09-11 22:28:54 +02:00
parent 8af0909110
commit 75087b23e1

View File

@ -151,8 +151,8 @@ public class Region {
public int getTravelCost(Region destination) {
int baseCost = getBaseTravelCost(destination);
if (destination.isHub()) {
// Travel *to* a hub is 50% cheaper, before charges applied
baseCost /= 2;
// Travel *to* a hub is always 1
baseCost = 1;
}
return Math.max(1, (int)(baseCost / (Math.min(4, m_charges + 1))));
}
@ -166,7 +166,7 @@ public class Region {
return 1;
}
double distance = teleportLocation().distance(destination.teleportLocation());
double blocksPerXP = 500;
double blocksPerXP = 768;
return Math.max(1, (int)(distance / blocksPerXP));
}