So, I have an idea for a game. Have the master plot planned out. Have the assets. But what I need is some help with a dice roll plug in.
Here's what needs to happen - entity A rolls a d100 and needs to roll under a certain number for example 45. At the same time entity B needs to roll under it's own specific number for example it's 35. So when entity A rolls under the number 45 the attack is considered successful. However if the entity B also rolled under it's number 35 his roll is also successful. This is a parry, and nothing happens to either entity. So the mathetimatical formula can be defined as: if(dice(1,100)<User.agi+User.acc&&dice(1,100)>Target.agi+Target.eva,100,0) - this is a Jace.NET expression but it should bring more understanding as to what I want out of this parry system. So here's a question, what plug in I can use to achieve this? And furthermore, what expression or JavaScript code snippet do I need to utilise to get the desired effect? Thanks in advance.
PS
If I understand correctly, this plug in (https://victorenginescripts.wordpress.com/rpg-maker-mv/hit-formula/) is what I need to use.
PPS
(Math.randomInt(20) + 1 + Math.floor((a.agi – 10) * 0.5) >= b.def) ? 100 : 0 -- so this is a more of a DnD style of roll, but I am guessing it's possible to implement d100 in a way I have described?
Here's what needs to happen - entity A rolls a d100 and needs to roll under a certain number for example 45. At the same time entity B needs to roll under it's own specific number for example it's 35. So when entity A rolls under the number 45 the attack is considered successful. However if the entity B also rolled under it's number 35 his roll is also successful. This is a parry, and nothing happens to either entity. So the mathetimatical formula can be defined as: if(dice(1,100)<User.agi+User.acc&&dice(1,100)>Target.agi+Target.eva,100,0) - this is a Jace.NET expression but it should bring more understanding as to what I want out of this parry system. So here's a question, what plug in I can use to achieve this? And furthermore, what expression or JavaScript code snippet do I need to utilise to get the desired effect? Thanks in advance.
PS
If I understand correctly, this plug in (https://victorenginescripts.wordpress.com/rpg-maker-mv/hit-formula/) is what I need to use.
PPS
(Math.randomInt(20) + 1 + Math.floor((a.agi – 10) * 0.5) >= b.def) ? 100 : 0 -- so this is a more of a DnD style of roll, but I am guessing it's possible to implement d100 in a way I have described?