1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Fix negative spell cost

This commit is contained in:
nordsoft 2023-09-22 01:12:10 +02:00
parent 099109b7d2
commit 16b147d588

View File

@ -1573,7 +1573,7 @@ int32_t CBattleInfoCallback::battleGetSpellCost(const spells::Spell * sp, const
}
}
return ret - manaReduction + manaIncrease;
return std::max(0, ret - manaReduction + manaIncrease);
}
bool CBattleInfoCallback::battleHasShootingPenalty(const battle::Unit * shooter, BattleHex destHex) const