1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

Implement shortcut for hero skill specialties

Should make changes to secondary skill bonuses less mod-breaking, and
reduce chances of incorrectly defined specialties in mods
This commit is contained in:
Ivan Savenko
2025-06-03 17:32:15 +03:00
parent 4fda657296
commit eb9a5bb71b
17 changed files with 170 additions and 382 deletions

View File

@ -71,6 +71,9 @@ public:
std::array<si32, 2> gainChance; // gainChance[0/1] = default gain chance on level-up for might/magic heroes
/// Bonuses that should be given to hero that specializes in this skill
std::vector<std::shared_ptr<const Bonus>> specialtyTargetBonuses;
void updateFrom(const JsonNode & data);
void serializeJson(JsonSerializeFormat & handler);