Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned monsterCalculateExpTotal(float exp_factor, uint16_t level)
- {
- return unsigned(std::ceil( std::pow(1.f + level/4.f, 2.8f)*exp_factor ));
- }
- unsigned Monster::getExp() const
- {
- int lvl = (level()>1)? level()-1: 1;
- unsigned exp = monsterCalculateExpTotal( MonsterInfo::get(_attribs.ind).experienceFactor(), lvl );
- float coef = 1.f + rarity().rarity() * 0.1f;
- if(rarity().shiny())
- coef *= 1.2f;
- if(!isPet() && findSuffix(SuffixType::SavageBoss))
- coef /= 10.f;
- return std::ceil( exp * coef / 50.f );
- }
Advertisement
Add Comment
Please, Sign In to add comment