Counter attack inflicts state not physical ATK???

I would like counter attack to inflict a state on the enemy instead of hitting them physically, because not all characters have a physical attack that is particularly useful.

I thought one way of doing this would be:

  • to give a physically weak character a skill [called Retaliation]
  • which inflicted a state that is equivalent to counter attack on that character
  • and would last, say, 3 turns.
  • During those 3 turns, if the character is attacked, s/he would retaliate by inflicting a state (I am undecided which one, it might be poison, stun or confusion) on the enemy which attacked.
My problem is that, after a week of thinking about it, I am no nearer to seeing how this might be done.

Can anyone suggest a method for doing this?

Thanks.
Maybe using some of yanfly's lunatic scripts

since ur applying the counter via states, maybe lunatic states can be used for this
Thanks for the suggestion.  Unfortunately Yanfly's lunatic scripts are for advanced users and not even my kindest friends would call me that.  I have no idea how to set up what I want to do, or indeed if it is possible to modify counter attack at all - which is why I thought it might have to be some sort of 'add-on' to that state.

I think it might need something like a forced action to use skill abc which itself inflicts the state on the enemy. 

So the setup would be something like:

Select skill Retaliation

This inflicts the modifed counter attack state on the user (let's call it counter attack +)

Counter attack + forces the user to respond to an enemy's attack with inflicting stun/whatever on that enemy instead of a physical attack

But I cannot see how to do that last line.
Since Counters use the attack skill, you'd need either an Attack Replace script or figure out how to do this within the damage formula of the attack skill itself.

I'm pretty sure you can use a conditional in the dam form along the lines of:

if counter?

and if so, you could change the attack to do what you want.  Of course, you'd probably have to script the damage formula since it would likely go way beyond the character limit, but in the meantime, you can do something simpler just to see if it works.

Try:

c = 0; if counter? b.add_state(x); else c= a.atk * 4 - b.def * 2; end; c

Make x whatever state you like.
Thanks for the suggestion.  I copy/pasted the formula you gave into the damage formula box of the attack skill, but unfortunately it meant that somehow it prevents any damage to the enemy at all in normal play.  Any suggestions about why that happened?
It seems I was wrong about the counter skills.  But I did find a topic that may help.

http://forums.rpgmakerweb.com/index.php?/topic/13546-parrying-skills-after-blocks/#entry137314
Thanks for that link.  Tsukihime's script is exactly what I need.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/counter-attack-inflicts-state-not-physical-atk.17424/