How to make a 50/50 ability.

Budderhydra

Villager
Member
Joined
Nov 15, 2017
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
In the game that I am trying to make, I am attempting to make it so that one of the characters has a starting move called "exuberant strike", which has a fifty percent chance to do two times the amount of damage that a regular strike would, but also has a fifty percent chance to stun the user.

I think it would be an interesting ability, but I have no idea how to make this in RMMV. If any of you have an idea on how to do this, I would be extremely grateful if you informed me.

Thank you for your time! :)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
'Game Mechanics Design' is for looking at aspects of game play at a more conceptual level. "How do I...?" (implementation) questions go in the Support forum for the engine you are using.
[move]RPGMaker MV[/move]
 

Budderhydra

Villager
Member
Joined
Nov 15, 2017
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
'Game Mechanics Design' is for looking at aspects of game play at a more conceptual level. "How do I...?" (implementation) questions go in the Support forum for the engine you are using.
[move]RPGMaker MV[/move]
Thank you. Im new here, and I had no idea where to place this question. Again, thanks.
 

Kevin Hirst

Veteran
Veteran
Joined
Sep 28, 2017
Messages
81
Reaction score
10
First Language
English
Primarily Uses
RMMV
I’m not sure. You would have to create a state that has the stun and then the formula would look something like

If (Math.random() > 0.5) {formula} else {b.addState(stateId); formula*2}
 

Budderhydra

Villager
Member
Joined
Nov 15, 2017
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
Alright, got it. Thanks :)
Now, do I just leave it as Math.random, or do I put something in there, because I am assuming it is just Math.random
 

Kevin Hirst

Veteran
Veteran
Joined
Sep 28, 2017
Messages
81
Reaction score
10
First Language
English
Primarily Uses
RMMV
The only things you need to change here are the parts in bold

If (Math.random() > 0.5) {formula} else {b.addState(stateId); formula*2}

You can change the 0.5 to be any percentage you want. 0.5 being 50%. Note that the higher the percentage the less chance of double damage and stun. [Ex. 0.1, 10%, means that 10% of the time you will deal normal damage, and 90% of the time you will stun and do double damage].

The 2 at the end can be changed to whatever multiplier you want to use. 2 being double. 3 would be triple. 1.5 can be used. Any multiplier you like.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top