How to make two attacks

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
There are two skills I'm having trouble figuring out how to make so I'll ask for help with both on the same post.

The first one I need help with is I want a skill that works like Facade from Pokemon. In Pokemon, Facade is a move that does a certain amount of damage normally, but does double when the user of it is affected by burn, poison, or paralysis. The states I want it to cause to hit with double damage are state numbers 2, 3, 4, 7, 26, and 30. I want the normal damage that this move deals without the statuses be the same as a normal attack, a.atk * 4 - b.def * 2. How would I go about with the formula?

The other skill I need help with is an all target attack that gives each enemy a random weakness, either to fire, ice, or thunder. The numbers for my "element weak" states are 50, 51, and 52. This move will also do damage. So it hits all enemies for damage, and then gives each one a random one of those states. I was assuming that it would be with a common event, and then using variables it will randomly pick which state is given to the enemies, but I tried that and it doesn't work.
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
219
First Language
English
Primarily Uses
RMVXA
These damage formulas come to mind. I haven't tested them...


Code:
dmg = a.atk * 4 - b.def * 2 ; b.states.any? {|s| [2,3,4,7,26,30].include?(s.id)} ? dmg * 2 : dmg

b.add_state([50, 51, 52].sample) ; a.atk * 4 - b.def * 2
 

HopeFragment

H'witch Nerd
Veteran
Joined
Mar 15, 2014
Messages
121
Reaction score
11
First Language
English
Primarily Uses
RMVXA
Tested the first one you gave me, it didn't work, but the issue was you put b.states.any when I intended for the user of the attack to have the state, so I changed it to a.states.any and after that it worked. Thank you!

The other one does damage but didn't give enemies a state.

EDIT: Oh nvm, it works! I just needed to remove the spaces between each state. Thank you very much!
 
Last edited:

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,868
Messages
1,017,066
Members
137,576
Latest member
SadaSoda
Top