hi! i have a question regarding strange results in the damage calc. i have the following:
if (b.elementRate(2) > 1) {((20+a.mat)/2) - (b.mdf/4) + b.addState(11); 100} else {((20+a.mat)/2) - (b.mdf/4)}
and it does exactly what i want it to do—inflict a status upon hitting an elemental weakness. however, for some reason, the damage that is dealt is somewhere around 700% of what it should be. for reference, the elemental weakness is set to 150%, the attacker has a MAG of 21, and the opponent has a MDF of 20. when the state is inflicted, all damage is increased by a further 125%, but this shouldn't apply on the first turn.
i should be dealing ~25 damage, but i end up getting ~180 damage when testing. is my syntax incorrect? even factoring in all of the damage mods, i should only be maxing out near 32. i suspect that the "100" for the addState() may be confusing the calculation. any ideas?
thank you ahead of time! 🙂
if (b.elementRate(2) > 1) {((20+a.mat)/2) - (b.mdf/4) + b.addState(11); 100} else {((20+a.mat)/2) - (b.mdf/4)}
and it does exactly what i want it to do—inflict a status upon hitting an elemental weakness. however, for some reason, the damage that is dealt is somewhere around 700% of what it should be. for reference, the elemental weakness is set to 150%, the attacker has a MAG of 21, and the opponent has a MDF of 20. when the state is inflicted, all damage is increased by a further 125%, but this shouldn't apply on the first turn.
i should be dealing ~25 damage, but i end up getting ~180 damage when testing. is my syntax incorrect? even factoring in all of the damage mods, i should only be maxing out near 32. i suspect that the "100" for the addState() may be confusing the calculation. any ideas?
thank you ahead of time! 🙂