Fix negative spell cost

This commit is contained in:
nordsoft
2023-09-22 01:12:10 +02:00
parent 099109b7d2
commit 16b147d588
+1 -1
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