- Joined
- Apr 12, 2012
- Messages
- 6,526
- Reaction score
- 7,033
- First Language
- English
- Primarily Uses
- RMMZ
That would work. The default engine also factors in attack state rate of the user and luck effect, but if you don't want those that should be sufficient.ah I see, thanks. So, I should just ignore the engine options to inflict the state.
JavaScript:<JS Pre-Apply> if (Math.random() < 0.85 * target.stateRate(99)) { // 0.85 is the basic infliction rate, 99 is the state ID let turns = Math.randomInt(10) + 3; // Generates a random integer between 3 and 12 target.addState(99, turns); } </JS Pre-Apply>