1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Moved battle effects to bonus system. May be buggy.

Moved creature damage to bonus system, simplified its handling. Some changes and tweaks.

Support for Adela's bless.
This commit is contained in:
DjWarmonger
2010-08-30 18:06:17 +00:00
parent 34b4e09927
commit bfe266a377
16 changed files with 259 additions and 248 deletions

View File

@@ -278,15 +278,6 @@ void CStackInstance::getParents(TCNodes &out, const CBonusSystemNode *source /*=
out.insert(&IObjectInterface::cb->gameState()->globalEffects);
}
ui32 CStackInstance::getMinDamage() const
{
return type->damageMin + valOfBonuses(Bonus::CREATURE_DAMAGE, 0) + valOfBonuses(Bonus::CREATURE_DAMAGE, 1);
}
ui32 CStackInstance::getMaxDamage() const
{
return type->damageMax + valOfBonuses(Bonus::CREATURE_DAMAGE, 0) + valOfBonuses(Bonus::CREATURE_DAMAGE, 2);
}
std::string CStackInstance::getQuantityTXT(bool capitalized /*= true*/) const
{
return VLC->generaltexth->arraytxt[174 + getQuantityID()*3 + 2 - capitalized];