Is it possible to output the result of the damage formula to the console? I tried using:
console.log( a.atk * 4 - b.def * 2 )
as my damage formula and it throws errors whenever the skill is used. I trying figure out where I screwed a formula up in my game and would like to see if the damage formula is being evaluated correctly. MV really needs a full debug mode that outputs more information to the console.
console.log( a.atk * 4 - b.def * 2 )
as my damage formula and it throws errors whenever the skill is used. I trying figure out where I screwed a formula up in my game and would like to see if the damage formula is being evaluated correctly. MV really needs a full debug mode that outputs more information to the console.
Well for something as simple as that formula you could just use a calculator. Spreadsheets are also very handy for more complex formula. As far as I'm aware, if you set the variance of a skill to 0% then the damage output will always be the same. The value will be the exact sum of your formula... so let's work this out for you:
let's say users attack is 32 and target defence is 22. so what your formula is saying is (32*4) - (22*2) = 128 - 44 = 84
Therefore your attack damage output constant is 84. the variance thereafter is just how much as a percentage above or below that constant will be.
Failing that I find an easy way to test skills out is to create a dummy troop and run a battle test.
Hope that Helps