I'm trying to work on abilities that combo with one another. For example, a Water Bolt that applies a Wet state. Then a Freezing Breath that damages, but if the enemy is Wet, it also replaces the Wet state with a Frozen state that stuns. I have no idea how to go about achieving this so any suggestions or solutions are welcome.
MV YEP Buffs and States Core, Need help with state check then replace
Javascript/Plugin SupportYou can try inserting something like this in your damage formular for Freezing Breath:
'if (b.isStateAffected(1)) b.addState(2)'
where 1 is the State ID of Wet and 2 the State ID of Frozen.
Then you can add an effect to your Freezing Breath that would remove the state Wet, just like you do with a Cure Skill/Item.
Another way would be giving everyone a 100% resistance against Frozen, but having the Wet state reduce this resistnace to 0.
Lastly, since you are using Yanfly Plugins, his Action Sequence Pack allows Skills to have an if-Condition, where you could make the Wet State a condition forapllying the Frozen State in your Freezing Breath notetag.
EDIT: If you use the first solution, to have Freezing Breath inflict damage add ; before typing your damage formular as usual:
'if (b.isStateAffected(1)) b.addState(2); a.mat * 6 - b.mdf * 2'
for example.
'if (b.isStateAffected(1)) b.addState(2)'
where 1 is the State ID of Wet and 2 the State ID of Frozen.
Then you can add an effect to your Freezing Breath that would remove the state Wet, just like you do with a Cure Skill/Item.
Another way would be giving everyone a 100% resistance against Frozen, but having the Wet state reduce this resistnace to 0.
Lastly, since you are using Yanfly Plugins, his Action Sequence Pack allows Skills to have an if-Condition, where you could make the Wet State a condition forapllying the Frozen State in your Freezing Breath notetag.
EDIT: If you use the first solution, to have Freezing Breath inflict damage add ; before typing your damage formular as usual:
'if (b.isStateAffected(1)) b.addState(2); a.mat * 6 - b.mdf * 2'
for example.
So far I have this, I'm very new to rpgmaker mv so I am not sure if I'm on the right track. Should I be adding anything to the notes, feel free to explain like I'm clueless (because I am). Currently my Wet state is 13 and the Frozen state is 47.
Here is what I added to the skill notes.
You have to add it to the formular right under HP Damage, where you 1 * a.mat. The Note can remain empty in this case.
Formular:
if (b.isStateAffected(13)) b.addState(47); a.mat
Also you'll want to add to Effects:
Remove State: Wet
So that the target won't be Frozen and Wet at the same time.
Formular:
if (b.isStateAffected(13)) b.addState(47); a.mat
Also you'll want to add to Effects:
Remove State: Wet
So that the target won't be Frozen and Wet at the same time.
Thank you so much it worked just like how I want it!
Original thread: https://forums.rpgmakerweb.com/threads/yep-buffs-and-states-core-need-help-with-state-check-then-replace.135278/