
If you’re going for an ability that just targets one enemy and deals more damage based on a state, just use if b.state?(20) a.mat * 5 else a.mat * 2.5 end and have it remove the state in the effects box. You could put this in the formula as well ( (b.remove_state(x) ), but that sometimes leads to issues where an ability won’t act correctly it’s simpler/foolproof if you’re new to formula stuff to just put it into effects, as those apply after the formula. Because it targets everything and deals the extra damage only to things that have Frozen, you can just have it remove Frozen from all enemies. In the effects box, have the ability remove Frozen from it’s targets. Obviously, you can adjust the damage however you need and add a defense/magic defense check by doing something like if b.state?(20) a.mat * 5 – b.mdf * 2 else a.mat * 2.5 – b.mdf * 2 end. This reads “If shatter is on the target, deal a.mat * 5. If you’d like to make it deal no damage if Shatter isn’t present, just do this: This reads “if Frozen is on the target, deal a.mat * 5. Replace “20” with whatever your state for Frozen is. If b.state?(20) a.mat * 5 else a.mat * 2.5 end You can either remove that if it’s not something you need in your game (easy to do in the script itself in the parts designed for plug and play editing), or common event the entire skill through conditional branches that check all enemies for the Frozen state, and then force your Actor attack to them with the ability if they have the state present. The downside is you may have a “Null” pop-up if you have Yanfly’s Popup system and have that enabled and don’t want to have the ability damage things that don’t have the state on them. It doesn’t need fancy scripting or an extra weakness. It’s much easier to just do something like this through the ability formula. I know this is an old post, but I wanted to put this here for anyone who finds this via Google and needs a similar solution to make an ability deal damage to targets based on if a state is present and remove it. Targets will not be re-added if the targets already exist within the current targeting scope. This will select all targets in the specified team who is afflicted by all of the listed states. This will select all targets in the specified team who is afflicted by any of the listed states. This will select all targets in the specified team whose specified stat is x or below x. Replace “stat” with MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, or LUK. This will select all targets in the specified team whose specified stat is x or above x. This will select all targets in the specified team whose current HP, MP, or TP is x% or below x%. Replace x with the number percentage requirement. This will select all targets in the specified team whose current HP, MP, or TP is x% or above x%.
Rpg maker mv yanfly conditional state odd turn how to#
Look within the script for more instructions on how to use each effect. Then, proceed to use the proper effects notetags to apply the proper LTP Conditions item desired. Install this script under YEA – Lunatic Targets. These scopes include targeting a group of units whose stats are above or below a certain amount, current HP, MP, or TP is above or below a certain percentage, whether or not they’re affected by a specific state, or whether or not they’re affected by all of the specified states. This is a script for Lunatic Targets Package Scopes with conditional themed scopes.
