Sanquil

Warper
Member
Joined
Jul 10, 2014
Messages
2
Reaction score
0
First Language
English
Primarily Uses
So, in my current project, I've designed an skill, Stitch Up, that deals damage in it's own unique element, Torn. All enemies have a 0% Rate to torn because the skill is supposed to be a follow up kind of attack that only works if the Torn State is applied to the target. I've set the Torn State to have Element Rate: Torn * 100%. I get the message saying "*Enemy*'s soul was reassembled" so I know the skill worked, but the enemy took no damage. I've made sure that the Torn State is applied every time. What am I doing wrong and how can I fix it?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,660
First Language
Czech
Primarily Uses
RMMV
The enemy's rate is 0%. 0% means immunity.
 

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
448
Reaction score
212
First Language
English
Primarily Uses
RMMV
The state doesn't overwrite the trait the enemy already has. It accounts for both, meaning it reads the rate as 0% * 100%, which is still zero.

You need an if statement to make this work. This can be done in the damage formula. I think it's something like this:

b.isStateAffected(Torn ID State) ? damage effect : 0

Replace Torn ID State with the ID of the state you're checking for (keep the parentheses), and replace damage effect with the formula for that attack. 0 occurs if the condition is false.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,315
Reaction score
11,737
First Language
English
Primarily Uses
RMVXA
That code is for MV and this is Ace.

If no one has given the correct formula by the time I'm back on my computer, I'll edit this post with it.

EDIT
if b.state?(x); a.atk * 4 - b.def * 2; end; 0

where x is the ID number of the state 'Torn'. Change the a.atk * 4 - b.def to whatever damage formula you want.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

My ex put my heart upon a self he said don't give me no lines and keep my hands to myself :,(
An Old... old Harold | RPG Maker News #71

Did a test on myself and I was negative on COVID. I was sitting near my aunt the whole time while doing stuff.
RPG Maker Games Critique with Studio Blue starts now! Join us and follow along live as we explore A Thief's Voyage by walldeaf.

Forum statistics

Threads
112,242
Messages
1,066,795
Members
145,852
Latest member
MH-Pride
Top