thats a notetag for skills. i think you want <JS Pre-Damage as User>
AFAIK, that functionality was renamed to state display and is within the skills and states core plugin. I believe it functions exactly the same but with an altered name
View attachment 332668
But also FWIW, you could have gotten the mechanical aspect of it working just by using properties instead of the state counter. it wouldnt let you display it on the state icons though.
Hmmmm...
So for the Undead state, I tried <JS Pre-Damage as User> and that didn't work. I also tried <JS Pre-Damage as Target> and <JS Pre-Regenerate> and even changed
value = Math.abs(value); to
value = Math.abs(-value); for each of those note tags but yet when using a healing item on the affected battler, the item still healed as opposed to doing damage.
For the counters in the Petrify state, I didn't clarify well enough I think! I mean I can't figure out how to store a number in a variable and then have it lower by 1 per turn taken. Originally,
target.setStateCounter(14, 6); would add the counter, here it's 6, and then in the 'every turn' segment of the passive state
battler.addStateCounter(14, -1); would lower it by 1 per turn. I've scoured this thread and forum looking for a solution and I've tried a ton of things but haven't yet landed on something working. I've tested the 'every turn' functionality itself and it works, so that's good at least!
So right now, on the Petrify Apply state, I have
Code:
<Reapply Rules: Ignore>
<JS On Add State>
user._petrifyCounter = 6;
</JS On Add State>
And in the Every Turn passive state I have
Code:
<JS Post-End Turn>
$gameTroop.aliveMembers().forEach(battler => {
if (user.isStateAffected(13)) {
user._petrifyCounter--;
if (user._petrifyCounter == 0) {
user.addState(14);
user.removeState(13);
}
}
})
$gameParty.aliveMembers().forEach(battler => {
// Petrify effect
if (user.isStateAffected(13)) {
user._petrifyCounter--;
if (user._petrifyCounter == 0) {
user.addState(14);
user.removeState(13);
}
}
})
</JS Post-End Turn>
Not sure what I'm missing here.
EDIT: Got it! For Petrify, I had to change 'user' in the apply state to 'target' and 'user' in the Every Turn state to 'battler'. So now I just have to get the counter number to show, if possible.
The Undead state is still a mystery, however.