mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-21 12:06:49 +02:00
Fixed #597 once more.
This commit is contained in:
parent
968080a890
commit
7d56db6fb3
@ -914,13 +914,14 @@ ui32 BattleInfo::calculateSpellDmg( const CSpell * sp, const CGHeroInstance * ca
|
|||||||
//24 - death ripple, 25 - destroy undead, 26 - armageddon, 77 - thunderbolt
|
//24 - death ripple, 25 - destroy undead, 26 - armageddon, 77 - thunderbolt
|
||||||
|
|
||||||
//FIXME: what point of dmgMultipliers map? all damage multipliers are already present in CSpell::power
|
//FIXME: what point of dmgMultipliers map? all damage multipliers are already present in CSpell::power
|
||||||
static std::map <int, int> dmgMultipliers = boost::assign::map_list_of(15, 10)(16, 20)(17, 25)(18, 75)(20, 10)(21, 10)(22, 10)(23, 10)(24, 5)(25, 10)(26, 50)(77, 10);
|
//TODO: better way to determine damage spells
|
||||||
|
static std::map <int, int> dmgMultipliers = boost::assign::map_list_of(15, 10)(16, 20)(17, 25)(18, 75)(20, 10)(21, 10)(22, 10)(23, 25)(24, 5)(25, 10)(26, 50)(77, 10);
|
||||||
|
|
||||||
//check if spell really does damage - if not, return 0
|
//check if spell really does damage - if not, return 0
|
||||||
if(dmgMultipliers.find(sp->id) == dmgMultipliers.end())
|
if(dmgMultipliers.find(sp->id) == dmgMultipliers.end())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = usedSpellPower * dmgMultipliers[sp->id];
|
ret = usedSpellPower * sp->power;
|
||||||
ret += sp->powers[spellSchoolLevel];
|
ret += sp->powers[spellSchoolLevel];
|
||||||
|
|
||||||
//affected creature-specific part
|
//affected creature-specific part
|
||||||
|
Loading…
x
Reference in New Issue
Block a user