Feature: Mods system improvement, Part III. Bonusing buildings customization. #672
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New special building parameters are introduced:
bonuses (list of bonuses), which holds all permanent bonuses which intended to be apllied when building is built
onVisitBonuses (list of bonuses), which holds all on bonuses for visiting hero when building is built
overrides (list of overridden buildings): Now it's possible to determine behavior of special building, should it override effects from other special buildings (such as Brotherhood overrides Tavern) or not.
Necropolis bonusing buildings are switched to the JSON-defined bonus system.
Cove-like Grail, affects all creatures which belong to the current town faction:
"bonuses" : [ { "type" : "NO_TERRAIN_PENALTY", "propagator" : "ALL_CREATURES", "limiters" : "CREATURE_FACTION" } ]
This type of propagator will cause effect even if the corresponding town with the Grail is neutral.
List of available propagators now:
"BATTLE_WIDE"
"VISITED_TOWN_AND_VISITOR",
"PLAYER_PROPAGATOR",
"HERO",
"TEAM_PROPAGATOR",
"GLOBAL_EFFECT",
"ALL_CREATURES"
Limiters are:
"SHOOTER_ONLY",
"DRAGON_NATURE",
"IS_UNDEAD",
"CREATURE_NATIVE_TERRAIN"
"CREATURE_FACTION"
Not all of them are tested in the context of this PR.
Bonuses may be combined. For example, that's Fortress town Grail definition:
"bonuses": [ { "type": "PRIMARY_SKILL", "subtype": "primSkill.attack", "val": 10 }, { "type": "PRIMARY_SKILL", "subtype": "primSkill.defence", "val": 10 } ]
Confession Chapel (increases morale and luck by 1 for troops defending the city) in the Cathedral town:
"bonuses": [ { "type": "MORALE", "val": 1 }, { "type": "LUCK", "val": 1 } ]
It's not recommended to mix permanent and time limited bonuses.
Example: Increases luck of any visiting hero for next battle by +1 (such as Nanomedic in the Covenant town):
"onVisitBonuses": [ { "duration": "ONE_BATTLE", "type": "LUCK", "val": 1 } ]