1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

made ballistics bonus-based

This commit is contained in:
Henning Koehler 2017-08-26 21:16:05 +12:00
parent 19e619f61e
commit fc77c40a82
3 changed files with 101 additions and 2 deletions

View File

@ -270,6 +270,105 @@
]
}
},
"mysticism" : {
"basic" : {
"description" : "",
"effects" : [
{
"type" : "MANA_REGENERATION",
"val" : 1,
"valueType" : "BASE_NUMBER"
}
]
},
"advanced" : {
"description" : "",
"effects" : [
{
"type" : "MANA_REGENERATION",
"val" : 2,
"valueType" : "BASE_NUMBER"
}
]
},
"expert" : {
"description" : "",
"effects" : [
{
"type" : "MANA_REGENERATION",
"val" : 3,
"valueType" : "BASE_NUMBER"
}
]
}
},
"luck" : {
"basic" : {
"description" : "",
"effects" : [
{
"type" : "LUCK",
"val" : 1,
"valueType" : "BASE_NUMBER"
}
]
},
"advanced" : {
"description" : "",
"effects" : [
{
"type" : "LUCK",
"val" : 2,
"valueType" : "BASE_NUMBER"
}
]
},
"expert" : {
"description" : "",
"effects" : [
{
"type" : "LUCK",
"val" : 3,
"valueType" : "BASE_NUMBER"
}
]
}
},
"ballistics" : {
"basic" : {
"description" : "",
"effects" : [
{
"subtype" : "skill.ballistics",
"type" : "SECONDARY_SKILL_PREMY",
"val" : 1,
"valueType" : "BASE_NUMBER"
}
]
},
"advanced" : {
"description" : "",
"effects" : [
{
"subtype" : "skill.ballistics",
"type" : "SECONDARY_SKILL_PREMY",
"val" : 2,
"valueType" : "BASE_NUMBER"
}
]
},
"expert" : {
"description" : "",
"effects" : [
{
"subtype" : "skill.ballistics",
"type" : "SECONDARY_SKILL_PREMY",
"val" : 3,
"valueType" : "BASE_NUMBER"
}
]
}
},
"estates" : {
"basic" : {
"description" : "",

View File

@ -1079,7 +1079,7 @@ si32 CGHeroInstance::manaRegain() const
if (hasBonusOfType(Bonus::FULL_MANA_REGENERATION))
return manaLimit();
return 1 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, 8) + valOfBonuses(Bonus::MANA_REGENERATION); //1 + Mysticism level
return 1 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::MYSTICISM) + valOfBonuses(Bonus::MANA_REGENERATION); //1 + Mysticism level
}
si32 CGHeroInstance::getManaNewTurn() const

View File

@ -4070,7 +4070,7 @@ bool CGameHandler::makeBattleAction(BattleAction &ba)
CHeroHandler::SBallisticsLevelInfo sbi;
if(stack->getCreature()->idNumber == CreatureID::CATAPULT)
sbi = VLC->heroh->ballistics.at(attackingHero->getSecSkillLevel(SecondarySkill::BALLISTICS));
sbi = VLC->heroh->ballistics.at(attackingHero->valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::BALLISTICS));
else //may need to use higher ballistics level for creatures in future for some cases to match original H3 (upgraded cyclops etc)
{
sbi = VLC->heroh->ballistics.at(1);