diff --git a/config/defaultMods.json b/config/defaultMods.json index b9e5522c6..28b1d23e3 100644 --- a/config/defaultMods.json +++ b/config/defaultMods.json @@ -45,6 +45,13 @@ "COMMANDERS": false, "MITHRIL": false //so far unused }, + "baseBonuses" : [ + { + "type" : "SPELL_DAMAGE", //Default spell damage + "val" : 100, + "valueType" : "BASE_NUMBER" + } + ], "heroBaseBonuses": [ { diff --git a/config/heroes/dungeon.json b/config/heroes/dungeon.json index 5da9ce5db..d5750fb23 100644 --- a/config/heroes/dungeon.json +++ b/config/heroes/dungeon.json @@ -183,11 +183,11 @@ "specialty" : { "bonuses" : { "sorcery" : { - "subtype" : "skill.sorcery", - "type" : "SECONDARY_SKILL_PREMY", + "targetSourceType" : "SECONDARY_SKILL", + "type" : "SPELL_DAMAGE", "updater" : "TIMES_HERO_LEVEL", "val" : 5, - "valueType" : "PERCENT_TO_BASE" + "valueType" : "PERCENT_TO_TARGET_TYPE" } } } diff --git a/config/heroes/fortress.json b/config/heroes/fortress.json index 86975e440..7d1915d57 100644 --- a/config/heroes/fortress.json +++ b/config/heroes/fortress.json @@ -258,11 +258,11 @@ "specialty" : { "bonuses" : { "sorcery" : { - "subtype" : "skill.sorcery", - "type" : "SECONDARY_SKILL_PREMY", + "targetSourceType" : "SECONDARY_SKILL", + "type" : "SPELL_DAMAGE", "updater" : "TIMES_HERO_LEVEL", "val" : 5, - "valueType" : "PERCENT_TO_BASE" + "valueType" : "PERCENT_TO_TARGET_TYPE" } } } diff --git a/config/heroes/inferno.json b/config/heroes/inferno.json index 611e66871..14964f6ea 100644 --- a/config/heroes/inferno.json +++ b/config/heroes/inferno.json @@ -259,11 +259,11 @@ "specialty" : { "bonuses" : { "sorcery" : { - "subtype" : "skill.sorcery", - "type" : "SECONDARY_SKILL_PREMY", + "targetSourceType" : "SECONDARY_SKILL", + "type" : "SPELL_DAMAGE", "updater" : "TIMES_HERO_LEVEL", "val" : 5, - "valueType" : "PERCENT_TO_BASE" + "valueType" : "PERCENT_TO_TARGET_TYPE" } } } diff --git a/config/heroes/necropolis.json b/config/heroes/necropolis.json index c68dc19a6..1a3e643e3 100644 --- a/config/heroes/necropolis.json +++ b/config/heroes/necropolis.json @@ -190,11 +190,11 @@ "specialty" : { "bonuses" : { "sorcery" : { - "subtype" : "skill.sorcery", - "type" : "SECONDARY_SKILL_PREMY", + "targetSourceType" : "SECONDARY_SKILL", + "type" : "SPELL_DAMAGE", "updater" : "TIMES_HERO_LEVEL", "val" : 5, - "valueType" : "PERCENT_TO_BASE" + "valueType" : "PERCENT_TO_TARGET_TYPE" } } } diff --git a/config/heroes/stronghold.json b/config/heroes/stronghold.json index 956739f17..57a140089 100644 --- a/config/heroes/stronghold.json +++ b/config/heroes/stronghold.json @@ -133,11 +133,11 @@ "specialty" : { "bonuses" : { "sorcery" : { - "subtype" : "skill.sorcery", - "type" : "SECONDARY_SKILL_PREMY", + "targetSourceType" : "SECONDARY_SKILL", + "type" : "SPELL_DAMAGE", "updater" : "TIMES_HERO_LEVEL", "val" : 5, - "valueType" : "PERCENT_TO_BASE" + "valueType" : "PERCENT_TO_TARGET_TYPE" } } } @@ -236,11 +236,11 @@ "specialty" : { "bonuses" : { "sorcery" : { - "subtype" : "skill.sorcery", - "type" : "SECONDARY_SKILL_PREMY", + "targetSourceType" : "SECONDARY_SKILL", + "type" : "SPELL_DAMAGE", "updater" : "TIMES_HERO_LEVEL", "val" : 5, - "valueType" : "PERCENT_TO_BASE" + "valueType" : "PERCENT_TO_TARGET_TYPE" } } } diff --git a/config/skills.json b/config/skills.json index b3cd53714..d606fe7aa 100644 --- a/config/skills.json +++ b/config/skills.json @@ -730,8 +730,7 @@ "base" : { "effects" : { "main" : { - "subtype" : "skill.sorcery", - "type" : "SECONDARY_SKILL_PREMY", + "type" : "SPELL_DAMAGE", "valueType" : "BASE_NUMBER" } } diff --git a/lib/HeroBonus.h b/lib/HeroBonus.h index bda3c76a9..9784761ff 100644 --- a/lib/HeroBonus.h +++ b/lib/HeroBonus.h @@ -285,7 +285,7 @@ public: BONUS_NAME(DARKNESS) /*val = radius */ \ BONUS_NAME(SPECIAL_SECONDARY_SKILL) /*subtype = id, val = value per level in percent*/ \ BONUS_NAME(SPECIAL_SPELL_LEV) /*subtype = id, val = value per level in percent*/\ - BONUS_NAME(SPELL_DAMAGE) /*val = value*/\ + BONUS_NAME(SPELL_DAMAGE) /*val = value, now works for sorcery*/\ BONUS_NAME(SPECIFIC_SPELL_DAMAGE) /*subtype = id of spell, val = value*/\ BONUS_NAME(SPECIAL_PECULIAR_ENCHANT) /*blesses and curses with id = val dependent on unit's level, subtype = 0 or 1 for Coronius*/\ BONUS_NAME(SPECIAL_UPGRADE) /*subtype = base, additionalInfo = target */\ diff --git a/lib/mapObjects/CGHeroInstance.cpp b/lib/mapObjects/CGHeroInstance.cpp index 5fc12ab9a..71180a8d0 100644 --- a/lib/mapObjects/CGHeroInstance.cpp +++ b/lib/mapObjects/CGHeroInstance.cpp @@ -618,8 +618,8 @@ int64_t CGHeroInstance::getSpellBonus(const spells::Spell * spell, int64_t base, { //applying sorcery secondary skill - base = static_cast(base * (100 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::SORCERY)) / 100.0); - base = static_cast(base * (100 + valOfBonuses(Bonus::SPELL_DAMAGE) + valOfBonuses(Bonus::SPECIFIC_SPELL_DAMAGE, spell->getIndex())) / 100.0); + base = static_cast(base * (valOfBonuses(Bonus::SPELL_DAMAGE)) / 100.0); + base = static_cast(base * (100 + valOfBonuses(Bonus::SPECIFIC_SPELL_DAMAGE, spell->getIndex())) / 100.0); int maxSchoolBonus = 0;