I'm looking to make a skill that will steal gold from humanoid creatures. It can only steal once per humanoid enemy, and will scale depending on the enemy's level. I have an idea how to do this, but don't know the syntax for rpg maker.
1.) Check to see if the enemy has state 1-5 on them. If state 1-5 doesn't exist, then the ability isn't able to be used.
These will be hidden states that indicate that the enemy is a humanoid. 1 is Humanoid level 1, 2 is humanoid level 10, 3 is humanoid level 20 etc.
2.) If state == 1 then roll rng 1-3. If rng != 3 then continue, if ==3 then print in battle (Failed to steal)
3.) Roll rng 1-10, save as variable X. Give player Var X gold. Print in battle (Stole Var X gold). Remove State 1.
4.) If state == 2 then roll rng 1-3. If rng != 3 then continue, if ==3 then print in battle (Failed to steal)
4.) Roll rng 10-20, save as variable X. Give player Var X gold. Print in battle (Stole Var X gold). Remove State 2.
Etc.
If my thinking is correct, when you use this skill it will first check to see if state 1-5 is on them. If so it then will find what state, and roll an rng to see if you steal. Then it will roll a random number to decide how much gold you steal, give you that gold, then say how much gold you stole in battle. After it will delete the state from the enemy so that you can't steal from the enemy again.
I'm using the yanfly core / battle core so it should allow me to type scripts like this into the notes section, I just don't know how to write it in rpg maker.
Thanks!
1.) Check to see if the enemy has state 1-5 on them. If state 1-5 doesn't exist, then the ability isn't able to be used.
These will be hidden states that indicate that the enemy is a humanoid. 1 is Humanoid level 1, 2 is humanoid level 10, 3 is humanoid level 20 etc.
2.) If state == 1 then roll rng 1-3. If rng != 3 then continue, if ==3 then print in battle (Failed to steal)
3.) Roll rng 1-10, save as variable X. Give player Var X gold. Print in battle (Stole Var X gold). Remove State 1.
4.) If state == 2 then roll rng 1-3. If rng != 3 then continue, if ==3 then print in battle (Failed to steal)
4.) Roll rng 10-20, save as variable X. Give player Var X gold. Print in battle (Stole Var X gold). Remove State 2.
Etc.
If my thinking is correct, when you use this skill it will first check to see if state 1-5 is on them. If so it then will find what state, and roll an rng to see if you steal. Then it will roll a random number to decide how much gold you steal, give you that gold, then say how much gold you stole in battle. After it will delete the state from the enemy so that you can't steal from the enemy again.
I'm using the yanfly core / battle core so it should allow me to type scripts like this into the notes section, I just don't know how to write it in rpg maker.
Thanks!