Stealth Effect and Removal?

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
So, one of my abilities applies a state to the actor.


I want another attack to then check if that actor has the state. If the actor does have the state, the effect deals damage, burns the target (another state), and then removes the state from the actor that uses the skill. If the actor does not have that skill, the attack deals a little less damage than it does from stealth. What would a damage formula look like for this? I've tried:


a.state?(91)? b.add_state(2) a.atk * 0.6 : a.atk * 0.4


a.state?(91)? b.add_state(2) ; a.atk * 0.6 : a.atk * 0.4


The first formula fails due to syntax and the second one fails due to the semicolon. Could I get some help, please?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
try adding brackets around the 'true' block.


a.state?(91) ? (b.add_state(2); a.atk * 0.6) : a.atk * 0.4


I don't know if it'll work - haven't tested it.  There is a longer if-then-else version but I don't use it so am not sure of the format.
 

Feliaria

Good with Ideas, Bad with Execution
Veteran
Joined
Feb 4, 2016
Messages
364
Reaction score
50
First Language
English
Primarily Uses
Alright! It's working now. Thanks, Shaz! :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top