Anonymous | Login | 2024-11-21 11:14 UTC |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0002882 | VCMI | Mechanics - Other | public | 2018-02-20 10:53 | 2018-02-20 11:29 | ||||||||
Reporter | hkoehler | ||||||||||||
Assigned To | AVS | ||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||
Status | resolved | Resolution | fixed | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | 0.99 | ||||||||||||
Target Version | Fixed in Version | 1.next | |||||||||||
Summary | 0002882: School-specific spell damage bonuses don't work properly for multi-school spells | ||||||||||||
Description | Looks like it only applies the bonus (if any) from the first school. So e.g. magic arrow would only benefit from air bonus (as air is the first school), all other bonuses (like FIRE_SPELL_DMG_PREMY) are irrelevant. I believe the maximal bonus should apply here. | ||||||||||||
Additional Information | int64_t CGHeroInstance::getSpellBonus(const spells::Spell * spell, int64_t base, const battle::Unit * affectedStack) const { //applying sorcery secondary skill base *= (100.0 + valOfBonuses(Bonus::SECONDARY_SKILL_PREMY, SecondarySkill::SORCERY)) / 100.0; base *= (100.0 + valOfBonuses(Bonus::SPELL_DAMAGE) + valOfBonuses(Bonus::SPECIFIC_SPELL_DAMAGE, spell->getIndex())) / 100.0; spell->forEachSchool([&base, this](const spells::SchoolInfo & cnf, bool & stop) { base *= (100.0 + valOfBonuses(cnf.damagePremyBonus)) / 100.0; stop = true; //only bonus from one school is used }); if(affectedStack && affectedStack->creatureLevel() > 0) //Hero specials like Solmyr, Deemer base *= (100. + ((valOfBonuses(Bonus::SPECIAL_SPELL_LEV, spell->getIndex()) * level) / affectedStack->creatureLevel())) / 100.0; return base; } | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | |||||||||||||
Issue History | |||
Date Modified | Username | Field | Change |
2018-02-20 10:53 | hkoehler | New Issue | |
2018-02-20 11:17 | AVS | Assigned To | => AVS |
2018-02-20 11:17 | AVS | Status | new => assigned |
2018-02-20 11:29 | AVS | Note Added: 0007417 | |
2018-02-20 11:29 | AVS | Status | assigned => resolved |
2018-02-20 11:29 | AVS | Fixed in Version | => 1.next |
2018-02-20 11:29 | AVS | Resolution | open => fixed |
Copyright © 2000 - 2024 MantisBT Team |