How to make a weapon that does something after x amount of hits?

Here on the topic of battling, is it possible to have a weapon that after X amount of hits also does something additional? For example, a weapon that, has a "counter" persay that expels a fire spell after two regular hits?
yes and no

the easiest way would be to have a plugin for follow-up states, and then have the weapon inflict a waiting state that does nothing but is replaced by a regular state after its timeout.
That however is not the same as an action.

It is a bit more tricky to do the same with common events (waiting common event before triggering a follow-up), but still possible.

Unfortunately counting hits by the weapon and triggering an effect after multiple hits is more difficult.
Unless using plugins with a lot of javascript to create their own variables this would have to be done in a troop event running each turn and checking what has been done this turn, and that can get complicated if used for more than one or two weapons.
Just as a tip, the Game Mechanics Design section is specifically for Maker-agnostic design questions.

Asking how to do something is dependent on the software you use (your profile says MV) so would go in either the MV Support or more appropriately the Plugin Requests section.

The easiest way to do this would be with Yanfly's Auto Passive States and Buffs & States Core.

Create a state that's applied by the weapon as a passive state. Then give it the notetag:
Code:
<Custom Establish Effect>
if (this.isAttack())
{
    user.weapAttacks = user.weapAttacks || 0;
    if (++user.weapAttacks == 2 && target.hp > 0)
    {
        // Play a fire animation on the target
        target.startAnimation(66);
        // Deal 100 damage
        target.gainHp(-100);
    }
}
</Custom Establish Effect>

You could also try replacing the animation and damage with the script call to force the user to perform a second, separate skill.

You could also program the entire Attack skill using Yanfly's Action Sequences and embed the entire other skill inside of that. There are lots of ways to approach this.

a weapon that, has a "counter" persay
It's "per se" 😉
ahhh thank you the both of you!!! also I was not aware of where I should ask this question but I do now, whoops!


It's "per se" 😉
I swear I'm trying to English here,... I swear!!!
I was not aware of where I should ask this question but I do now, whoops!
It's not a big deal, and mods are happy willing to shuffle posts between sections.

But if you're looking at the list of sections, each one has a little description.
1716911075064.png

(you're not stuck coming up with an idea, since you already know what you want the mechanic to be)

And every section has, as soon as you click into it, a pinned thread with guidelines for that specific section.
1716911144625.png

1716911157516.png


Good luck with your project!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-weapon-that-does-something-after-x-amount-of-hits.169063/