mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Small refactoring of adventure map spell casting:
- Removed duplicated checks for DD possibility - Moved most of spell-specific code from AdventureMapInterface to library code - AdventureSpellMechanics class now provides methods to check whether spellcast is possible, similarly to battle spells - If it is not possible to cast adventure map spell (e.g. no mana or no move points) game will show infowindow immediately on clicking spellbook instead of on cast attempt - If hero does not have movement points for a DD, game will show correct error message - Added game settings 'dimensionDoorFailureSpendsPoints' due to discovered H3 logic
This commit is contained in:
@@ -105,6 +105,7 @@ void GameSettings::load(const JsonNode & input)
|
||||
{EGameSettings::PATHFINDER_ORIGINAL_FLY_RULES, "pathfinder", "originalFlyRules" },
|
||||
{EGameSettings::DIMENSION_DOOR_ONLY_TO_UNCOVERED_TILES, "spells", "dimensionDoorOnlyToUncoveredTiles"},
|
||||
{EGameSettings::DIMENSION_DOOR_EXPOSES_TERRAIN_TYPE, "spells", "dimensionDoorExposesTerrainType" },
|
||||
{EGameSettings::DIMENSION_DOOR_FAILURE_SPENDS_POINTS, "spells", "dimensionDoorFailureSpendsPoints" },
|
||||
{EGameSettings::DIMENSION_DOOR_TRIGGERS_GUARDS, "spells", "dimensionDoorTriggersGuards" },
|
||||
{EGameSettings::DIMENSION_DOOR_TOURNAMENT_RULES_LIMIT, "spells", "dimensionDoorTournamentRulesLimit"},
|
||||
{EGameSettings::TOWNS_BUILDINGS_PER_TURN_CAP, "towns", "buildingsPerTurnCap" },
|
||||
|
||||
Reference in New Issue
Block a user