I might just be dense, but the instructions are unclear. Would you be able to elaborate? All I think I've figured out is inputting the following into the first skill's Notes box.
Code:<Pre-Damage Eval>
value = a.mat/4) * 24 ;
if(a.isStateAffected(70)== true){
if(Math.randomInt(2)+1=<1) {value = value - b.mat * 2 / 3 * 4;} else{value = value-b.mat * 4;}
}
else{value = value-b.mat * 4;}
</Pre-Damage Eval>
I'm also unsure I was clear enough with the second, given I don't know code, but I'll mention it just to be on the safe side: The "seven status problems" are seven specific ones, namely states 5, 6, 7, 8, 9, 10, and 13.
No problem I'll try to make it clearer.
The first one should work it's just a matter of testing.
note* Math.randomInt(x) is an function build-in RPG maker MV that returns a random rounded(down) value "between" 0 and x.(As it is thus rounded down the value can never be x)
And the 2nd one I seem to have forgotten a part.
Code:<After Eval>
var state = [1,2,3,4,5,6] ;
var rndstate = Math.randomInt(6);
var basechance = 100;
var roll = Math.randomInt(100) + 1;
var chance = basechance * target.stateRate(state[rndstate]) ;
if(roll < chance && target.result().isHit() ){target.addState(state[rndstate]);}
</After Eval>
note2* Arrays: An array is an variable that con store multiple values in this case the variable state has
5 values because we are counting 0 as well for arrays.
You can access the individual values in this array by typing state[0] to get 1 or state[5] to get the value 6.
As we know Math.randomInt() returns a value
between 0 and it's given number rounded down, this means it can return the values 0, 1, 2, 3, 4 and 5.
So in this case the variable "state" is the array while the variable "rndstate" will be pointing to an value inside the array.
Extra: Javascript has some methods that you can use I will try to explain a bit of the .length method to you.
.length is simply a method that returns the length of an variable, giving you different results depending on what kind data you have stored inside this variable.
In our case we have created an array called "state" and when we say state.length it will return the amount of values stored within this array (not including 0) thus it would return 6.
So if you would use this:
Code:<After Eval>
var state = [1,2,3,4,5,6] ;
var rndstate = Math.randomInt(state.length);
var basechance = 100;
var roll = Math.randomInt(100) + 1;
var chance = basechance * target.stateRate(state[rndstate]) ;
if(roll < chance && target.result().isHit() ){target.addState(state[rndstate]);}
</After Eval>
You would be able to add as much states as you want in the array "state" without having a need to change the rest.
Hope it helps, I also suggest doing a bit of reading up on javascript at w3schools( or a similar website) they also cover all what I have mentioned.