MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002882VCMIMechanics - Otherpublic2018-02-20 10:532018-02-20 11:29
Reporterhkoehler 
Assigned ToAVS 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version0.99 
Target VersionFixed in Version0.next 
Summary0002882: School-specific spell damage bonuses don't work properly for multi-school spells
DescriptionLooks 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 Informationint64_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;
}
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0007417)
AVS (administrator)
2018-02-20 11:29

Fixed in develop

- 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 => 0.next
2018-02-20 11:29 AVS Resolution open => fixed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2018 MantisBT Team
Hosting provided by DigitalOcean