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:
parent
099109b7d2
commit
16b147d588
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user