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

@@ -78,6 +78,7 @@ const std::vector<GameSettings::SettingOption> GameSettings::settingProperties =
{EGameSettings::HEROES_RETREAT_ON_WIN_WITHOUT_TROOPS, "heroes", "retreatOnWinWithoutTroops" },
{EGameSettings::HEROES_STARTING_STACKS_CHANCES, "heroes", "startingStackChances" },
{EGameSettings::HEROES_TAVERN_INVITE, "heroes", "tavernInvite" },
{EGameSettings::HEROES_MOVEMENT_COST_BASE, "heroes", "movementCostBase" },
{EGameSettings::HEROES_MOVEMENT_POINTS_LAND, "heroes", "movementPointsLand" },
{EGameSettings::HEROES_MOVEMENT_POINTS_SEA, "heroes", "movementPointsSea" },
{EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE, "mapFormat", "armageddonsBlade" },