Skip to content

Conversation

ShubusCorporation
Copy link
Contributor

@ShubusCorporation ShubusCorporation commented Jan 6, 2021

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 } ]

@ShubusCorporation ShubusCorporation changed the title Do feature part3 Feature: Mods system improvement, Part III. Bunusing buildings customization. Jan 6, 2021
@ShubusCorporation ShubusCorporation changed the title Feature: Mods system improvement, Part III. Bunusing buildings customization. Feature: Mods system improvement, Part III. Bonusing buildings customization. Jan 6, 2021
@ShubusCorporation ShubusCorporation force-pushed the do_feature_part3 branch 3 times, most recently from 16d1f3d to 9f91964 Compare January 8, 2021 17:36
Copy link
Member

@alexvins alexvins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus source id should be more stable than just local pointer (may be smth like town`s object instance id combined with building id).

@alexvins alexvins merged commit 925857d into vcmi:develop Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants