Hey, so I'm trying to create four accessories: two of which will decrease by 1 the turns of any ailments/stat debuffs that affect the user, and two of which will instead increase by 1 the turns of all positive stats/stat buffs, respectively.
I'm struggling to figure out how to make the script for that since using the same keywords and logic that Yanfly used in his plugins to modify state stats and check for state categories is not doing anything, and Visustella's plugins are all encrypted.
Here's what I tried to do for the first one, the Tenacity Charm that decreases the turns of ailments:
All my states are properly categorized too
Can someone lend a hand?
I'm struggling to figure out how to make the script for that since using the same keywords and logic that Yanfly used in his plugins to modify state stats and check for state categories is not doing anything, and Visustella's plugins are all encrypted.
Here's what I tried to do for the first one, the Tenacity Charm that decreases the turns of ailments:
JavaScript:
<JS Post-Apply as Target>
var states = target.states();
for(var i = 0; i < states.length; i++){
var st = states[i];
if(st.category.includes('ailment').toUpperCase){
target.setStateTurns(st.id, target.stateTurns(st.id.turns)-1);
}
}
</JS Post-Apply as Target>
All my states are properly categorized too
Can someone lend a hand?