EDIT: nevermind, I should have written > minChange and >maxChange, but my dumbass brain wrote >0
The only thing I altered was the return values. Why are my conditions working for magic level = 0, but as soon as player gets magic level 1 the damage is 0? Shouldn't the magic level formula only work when it is higher than the minChange/maxChange?
C++:
int32_t WeaponWand::getWeaponDamage(const Player* player, const Creature*, const Item*, bool maxDamage /*= false*/) const
{
if (maxDamage) {
return -maxChange;
}
return -normal_random(minChange*(player->getMagicLevel()*0.015) > 0 ? minChange*(player->getMagicLevel()*0.015) : minChange, maxChange*(player->getMagicLevel()*0.015) > 0 ? maxChange*(player->getMagicLevel()*0.015) : maxChange);
}
The only thing I altered was the return values. Why are my conditions working for magic level = 0, but as soon as player gets magic level 1 the damage is 0? Shouldn't the magic level formula only work when it is higher than the minChange/maxChange?