1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Support for configuring minimal cost for moving between tiles

- Added `movementCostBase` parameter to game config that defines minimal
amount of movement points that will be spent when moving from one tile
on another while offroad (and cost of Fly / Town Portal spells)
- Added `BASE_TILE_MOVEMENT_COST` bonus type that allows modifying
`movementCostBase` on per-hero basis

Example usage for hota-like pathfinding skill
```json
"tileCostReduction" : {
	"type" : "BASE_TILE_MOVEMENT_COST",
	"val" : -15
}
```
This commit is contained in:
Ivan Savenko
2025-01-24 17:46:18 +00:00
parent b36f5e4026
commit ec970c7b22
18 changed files with 80 additions and 37 deletions

View File

@@ -84,6 +84,6 @@ RoadType::RoadType():
id(Road::NO_ROAD),
identifier("empty"),
modScope("core"),
movementCost(GameConstants::BASE_MOVEMENT_COST)
movementCost(0)
{}
VCMI_LIB_NAMESPACE_END