MV Multiple hit Action Sequence against "Remove by Damage"

Using MV

Plugin: http://www.yanfly.moe/wiki/Category:Action_Sequences_(MV)

Made a multi hit "Lightning Bolt" skill that works fine:

Spoiler: Target Action
Code:
<Target Action>

perform action

motion wait: user

action animation

wait: 30

action effect

death break

action animation

wait: 30

action effect

death break

action animation

wait: 30

action effect

death break

</Target Action>


Problem is: states that "Remove by Damage".

Example: Enemy inflicted with "Frozen" state has "Remove by Damage". Lightning damage is doubled while "Frozen" , but because Lightning is multi hit, the first hit removes "Frozen" and only the first hit benefits from double damage.

Is there a way to activate "Remove by Damage" after the last hit in an Action Sequence?
Do you have Yep Skill core?


<After Eval>
code
code
</After Eval>

I would check it out, I'd remove the damage by remove for the frozen, and put in the code to remove it in the after Eval. That should work.
I'd remove the damage by remove for the frozen, and put in the code to remove it in the after Eval. That should work.
All of the steps of the skill phase in Skill Core happen per hit. So After Eval would still fire each time.

@Kruize Since you're using Action Sequences for your skills, what I would do is take out the Remove by Damage notetag from the states, then use action sequence commands to remove them after all the hits have been performed.

You could make the process easier by using Yanfly's State Categories and giving them all a "removedamage" category or something, and use just one script call to remove them all inside the action sequence.
All of the steps of the skill phase in Skill Core happen per hit. So After Eval would still fire each time.

@Kruize Since you're using Action Sequences for your skills, what I would do is take out the Remove by Damage notetag from the states, then use action sequence commands to remove them after all the hits have been performed.

You could make the process easier by using Yanfly's State Categories and giving them all a "removedamage" category or something, and use just one script call to remove them all inside the action sequence.

That's an interesting idea, but I want other attacks and skills to remove Frozen by damage, even a basic attack for example. This would probably mean I'd need to add that category tag to all skills, which would make things a bit complicated.

However, you both led me to a solution that works in my case.

I used http://www.yanfly.moe/wiki/Action_Sequence_Pack_1_(YEP)

I took the Double Lightning Damage aspect out of "Frozen" and made a separate state for it.

Then in my "Lightning Bolt" skill, I added a check at the start to see if the enemy is "Frozen" and if they are, then apply the "Double Lightning Damage" state. All hits go off and then at the end I remove the "Double Lightning Damage" state.

Everything seems to work fine! Thanks everyone!

Here's my updated action sequence for reference:

Spoiler: UPDATED TARGET ACTION
<Target Action>

if target.isStateAffected(13)

add state 14: target

end

else

perform action

motion wait: user

action animation

wait: 30

action effect

death break

action animation

wait: 30

action effect

death break

action animation

wait: 30

action effect

death break

remove state 14: target

</Target Action>
This would probably mean I'd need to add that category tag to all skills, which would make things a bit complicated.
It doesn't need to be complicated - you can use Action Sequence notetags to put that command to remove the desired state into a section that doesn't normally do anything - follow action.

Then if you have skills that you aren't programming with action sequences, you can just paste in the <action copy> notetag for the one skill where you typed it in.

But it sounds like you got it working how you like, so cool beans.

Original thread: https://forums.rpgmakerweb.com/threads/multiple-hit-action-sequence-against-remove-by-damage.171284/