I realize this was posted 4 months ago, but I am new to the game, and the first week’s comments didn’t address the obvious math formula errors, such as…
Obviously you have confused “min” and “max” between text and formula. But I think the error goes deeper. You get a divide by zero problem unless what you said is i the formula. It should be
MANA_BONUS = MyTotalMana/MIN(4,EnemyTotalMana) * C
Or are you suggesting that the ratio is clamped a 4?
The same goes for the DAMAGE_BONUS. Right?
It would be odd if you didnt do a div by 0 check, and it would be odder still to clamp the ratio to 4. Why 4, unless C% <= 0.25. That might make sense for mana, but for damage, this might be weird, as the opponent could have much less starting health.
Also, you might want to clarify if “friendly fire” is excluded from the damage or not. And even though youb said devouring is excluded, I wonder if freindly devouring (Black Beast) and sacrifice are also excluded.
Finally, the next time you adjust, you might want to multiply the damage ratio above by the ratio of starting armor+life. So,
DAMAGE_BONUS * ( MyTotalStartingHealth / EnemyTotalStartingHealth )
That way, you’re awarding the bonus on which was more efficient at deaming damage relevant to the opponent’s health. Then again if you did this, best include devouring as damage.
As a programmer and engineer, I know how tricky these corners can be.