1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

support setting dice molecule for rolling morale and luck

This commit is contained in:
kdmcser
2025-03-16 23:44:38 +08:00
parent daa57f30d5
commit ffb31cc77c
6 changed files with 41 additions and 20 deletions

View File

@ -71,8 +71,8 @@ int AFactionMember::getMaxDamage(bool ranged) const
int AFactionMember::moraleValAndBonusList(TConstBonusListPtr & bonusList) const
{
int32_t maxGoodMorale = LIBRARY->engineSettings()->getVector(EGameSettings::COMBAT_GOOD_MORALE_DICE).size();
int32_t maxBadMorale = - (int32_t) LIBRARY->engineSettings()->getVector(EGameSettings::COMBAT_BAD_MORALE_DICE).size();
int32_t maxGoodMorale = LIBRARY->engineSettings()->getDiceVector(EGameSettings::COMBAT_GOOD_MORALE_DICE).size();
int32_t maxBadMorale = - (int32_t) LIBRARY->engineSettings()->getDiceVector(EGameSettings::COMBAT_BAD_MORALE_DICE).size();
if(getBonusBearer()->hasBonusOfType(BonusType::MAX_MORALE))
{
@ -100,8 +100,8 @@ int AFactionMember::moraleValAndBonusList(TConstBonusListPtr & bonusList) const
int AFactionMember::luckValAndBonusList(TConstBonusListPtr & bonusList) const
{
int32_t maxGoodLuck = LIBRARY->engineSettings()->getVector(EGameSettings::COMBAT_GOOD_LUCK_DICE).size();
int32_t maxBadLuck = - (int32_t) LIBRARY->engineSettings()->getVector(EGameSettings::COMBAT_BAD_LUCK_DICE).size();
int32_t maxGoodLuck = LIBRARY->engineSettings()->getDiceVector(EGameSettings::COMBAT_GOOD_LUCK_DICE).size();
int32_t maxBadLuck = - (int32_t) LIBRARY->engineSettings()->getDiceVector(EGameSettings::COMBAT_BAD_LUCK_DICE).size();
if(getBonusBearer()->hasBonusOfType(BonusType::MAX_LUCK))
{