mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
vcmi: translate wisdom
Make wisdom as separate bonus. It will be enough for now. But next is should be done as IsLearnable for each spell.
This commit is contained in:
parent
ddcff9dc36
commit
20a9332a3f
@ -50,6 +50,11 @@
|
||||
"type" : "SPELL_DAMAGE", //Default spell damage
|
||||
"val" : 100,
|
||||
"valueType" : "BASE_NUMBER"
|
||||
},
|
||||
{
|
||||
"type" : "MAX_LEARNABLE_SPELL_LEVEL", //Hero can always learn level 1 and 2 spells
|
||||
"val" : 2,
|
||||
"valueType" : "BASE_NUMBER"
|
||||
}
|
||||
],
|
||||
"heroBaseBonuses":
|
||||
|
@ -198,8 +198,7 @@
|
||||
"base" : {
|
||||
"effects" : {
|
||||
"main" : {
|
||||
"subtype" : "skill.wisdom",
|
||||
"type" : "SECONDARY_SKILL_PREMY",
|
||||
"type" : "MAX_LEARNABLE_SPELL_LEVEL",
|
||||
"valueType" : "BASE_NUMBER"
|
||||
}
|
||||
}
|
||||
|
@ -346,6 +346,7 @@ public:
|
||||
BONUS_NAME(HERO_GRANTS_ATTACKS) /*If hero can grant additional attacks to creature, value is number of attacks, subtype is creatureID*/\
|
||||
BONUS_NAME(BONUS_DAMAGE_PERCENTAGE) /*If hero can grant conditional damage to creature, value is percentage, subtype is creatureID*/\
|
||||
BONUS_NAME(BONUS_DAMAGE_CHANCE) /*If hero can grant additional damage to creature, value is chance, subtype is creatureID*/\
|
||||
BONUS_NAME(MAX_LEARNABLE_SPELL_LEVEL) /*This can work as wisdom before. val = max learnable spell level*/\
|
||||
/* end of list */
|
||||
|
||||
|
||||
|
@ -1078,7 +1078,7 @@ const std::set<SpellID> & CGHeroInstance::getSpellsInSpellbook() const
|
||||
|
||||
int CGHeroInstance::maxSpellLevel() const
|
||||
{
|
||||
return std::min(GameConstants::SPELL_LEVELS, 2 + valOfBonuses(Selector::typeSubtype(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::WISDOM)));
|
||||
return std::min(GameConstants::SPELL_LEVELS, valOfBonuses(Selector::type()(Bonus::MAX_LEARNABLE_SPELL_LEVEL)));
|
||||
}
|
||||
|
||||
void CGHeroInstance::deserializationFix()
|
||||
|
@ -682,11 +682,8 @@ void CGameHandler::changeSecSkill(const CGHeroInstance * hero, SecondarySkill wh
|
||||
sss.abs = abs;
|
||||
sendAndApply(&sss);
|
||||
|
||||
if (which == SecondarySkill::WISDOM)
|
||||
{
|
||||
if (hero->visitedTown)
|
||||
giveSpells(hero->visitedTown, hero);
|
||||
}
|
||||
if (hero->visitedTown)
|
||||
giveSpells(hero->visitedTown, hero);
|
||||
}
|
||||
|
||||
void CGameHandler::endBattle(int3 tile, const CGHeroInstance * heroAttacker, const CGHeroInstance * heroDefender)
|
||||
|
Loading…
x
Reference in New Issue
Block a user