Yanfly States Custom Effect Issues with Evasion

theolis-wolfpaw

Villager
Member
Joined
Jan 4, 2016
Messages
22
Reaction score
4
First Language
English
So, I'm using Yanfly's Buffs and States Core and have been trying to make a defensive state that deflects weak attacks. After much trial and error I have determined that you cannot decide the success rate of the skill before the game has decided it, which then would overwrite your decision. So, as a work around I decided I'd just increase the target's evasion rate if the attack was weak enough. The only problem is the target's evasion isn't changing.

This is what I have under <Custom Select Effect>:

alert([target.eva, target.mev, target.cev]);target.eva += 1;target.mev += 1;target.cev += 0.5;alert([target.eva, target.mev, target.cev]);It's buried in an if, then statement that's being used to determine if the attack is a weak attack. That part works, I'm not worried about that, after all both of the alerts do fire. Even more baffling is the evasions listed, do in fact match the targets evasions. So, in theory the target.eva += 1; would be increasing the correct stat on the correct character, but nothing happens. Both, alerts return identical values and the skill still hits as if the original evasion is in play.

So the question is, what am I doing wrong?
 

Yanfly

Veteran
Joined
Mar 15, 2012
Messages
1,742
Reaction score
2,635
The xparams (eva, mev, etc.) are unlike the params (atk, def, mat, mdf, etc). You cannot add to them and make them change since they are unconfigurable as they're strictly calculated based on traits. My only suggestion for you is to make a dummy state that has 100% evasion, magic evasion, 50% critical evasion, add it to the target, and then remove it with a deselect effect.
 

theolis-wolfpaw

Villager
Member
Joined
Jan 4, 2016
Messages
22
Reaction score
4
First Language
English
Thanks a bunch, Yanfly, it worked perfectly. I just need to balance the conditions for its activation now.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

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,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top