Attacking an enemy deals damage to attacker (SOLVED)

(RPGVXA) (RGSS3)

lets say the enemy is some kind of sea urchin monster.
you can attack it but it deals damage to you too.

its only for some enemies so I cant put a common event on the
Attack skill.. and the counterattack in general has the "Enemy counterattacks!" message

I tried copy-pasted the counterattack state to change the text:
saddsa.PNG

dddd.PNG


it doesn't do anything do anything
fair enough because I dont know what im doing

Sorry If I posted on the wrong thread I was hoping there would be a script for it
but I dont really know if this needs scripting or im very big brain and didnt do things right
thank you have a nice day pls help
it doesn't do anything do anything
of course not, because you told the troop event "don't run".

"Run" here has absolutely nothing to do with escaping (I don't knwo what idiot süread the false rumor this means the player has not escaped).
It comes from "to run a program" and as a result "don't run" = "never execute this troop event"
of course not, because you told the troop event "don't run".

"Run" here has absolutely nothing to do with escaping (I don't knwo what idiot süread the false rumor this means the player has not escaped).
It comes from "to run a program" and as a result "don't run" = "never execute this troop event"

ok so I changed it and it worked It gave the enemy the state that I put in. (Thank you)
but still the problem is the state I made, its still the same counterattack state.

I have to change this:
1.PNG

(Because in battle it still gives the message "Enemy Counterattacks!".)
but no other trait in the options would be able to damage the player/attacker.

Right now im seeing if something else could work
making the said monster have "State on attack"
and give the state to the player instead:
2.PNG


but then it just works like poison and thats not really what im going for..
I need it to damage the player/attacker as soon as they attack the 'spiked' enemy
I'm not sure if this is necessary, but Yanfly's Lunatic States allow for a relatively difficult easy thorns effect.
Be aware that Lunatic States has a bug in it. To fix it, change lines 505 and 508 from
Code:
for state in states; run_lunatic_states(:react); end
to
Code:
run_lunatic_states(:react)

To make the thorns effect itself, create a state that has the notetag:
Code:
<shock effect>
# Your script to do damage or apply states or whatever
<\shock effect>
and apply it to the enemy on turn 0 like you already have been doing.
Unfortunately you'll have to do some scripting to damage someone, but here's a relatively simplified list to help.
https://forums.rpgmakerweb.com/index.php?threads/script-call-collection-for-vxace.25759/#entry247426
I'm not sure if this is necessary, but Yanfly's Lunatic States allow for a relatively difficult easy thorns effect.
Be aware that Lunatic States has a bug in it. To fix it, change lines 505 and 508 from
Code:
for state in states; run_lunatic_states(:react); end
to
Code:
run_lunatic_states(:react)

To make the thorns effect itself, create a state that has the notetag:
Code:
<shock effect>
# Your script to do damage or apply states or whatever
<\shock effect>
and apply it to the enemy on turn 0 like you already have been doing.
Unfortunately you'll have to do some scripting to damage someone, but here's a relatively simplified list to help.
https://forums.rpgmakerweb.com/index.php?threads/script-call-collection-for-vxace.25759/#entry247426


hello! thank you for this! I already found a solution (script) for my issue
which is a script from Tsukihime, I really appreciate the help though!
hello! im good now, ive used this script from himeworks/Tsukihime!

I will leave the link here in case people are in need of it too:
http://himeworks.com/rmvxa-scripts/
https://www.rpgmakercentral.com/topic/7525-thorn-mail/

Original thread: https://forums.rpgmakerweb.com/threads/attacking-an-enemy-deals-damage-to-attacker-solved.112691/