On a skill, you can make said skill add a state to the affected unit via notetag, so, is there a way for said state to be affected by enemy state resist.
So if an enemy resists Slow or Stun, It will respect those state resists.
<JS Post-Damage As Target>
if (value > 0 && this.isPhysical()) {
const rate = 0.1;
const recoil = value * rate;
const defRate = 0.25;
const bonus = target.def * defRate;
const damage = Math.ceil(bonus + recoil);
user.gainHp(-damage);
if (user.isDead()) {
user.performCollapse();
}
}
</JS Post-Damage As Target><JS Pre-Damage As User>
if (this.isMagical() && value !== 0) {
value = Math.ceil(value * 1.5);
}
</JS Pre-Damage As User><JS Post-Apply>
if (user.isEnemy()) {
const successRate = 0.5;
if (Math.random() < successRate) {
let items = [];
const total = $gameParty.items().length;
for (let i = 0; i < total; ++i) {
const item = $gameParty.items()[i];
if (item.itypeId !== 2) {
items.push(item);
}
}
if (items.length > 0) {
const random = Math.randomInt(items.length);
const item = items[random];
$gameParty.loseItem(item, 1);
var text = user.name() + ' stole ' + item.name + ' from the party!';
SoundManager.playEquip();
}
} else {
var text = user.name() + ' failed to steal an item!';
SoundManager.playBuzzer();
}
const window = SceneManager._scene._logWindow;
if (text) {
window.addStealText(text + '<CENTER>');
}
}
</JS Post-Apply><JS On Add State>
this._toxicCounter = 1;
</JS On Add State>
<JS Pre-Regenerate>
const n = this._toxicCounter / 16;
const value = Math.floor(n * target.mhp);
this._toxicCounter++;
target.gainHp(-value);
</JS Pre-Regenerate>