- Joined
- Sep 27, 2017
- Messages
- 22
- Reaction score
- 2
- First Language
- English
- Primarily Uses
- RMMV
So, brief summary. I have a character with some aggressive abilities that, in addition to other effects, buff their own attack and debuff their own defense, making them more dangerous and more fragile as the battle goes on.
I was hoping to give them an ability with low base damage that, if it kills an enemy, heals them a small amount and removes all of their currently ongoing defense debuffs.
I have Yanfly's Skill Core plugin in order to insert javascript into skills. My notebox currently reads:
<Post-Damage Eval>
if (target.hp <= 0) {
user.gainHp(50);
user.removeDebuff(3);
}
</Post-Damage Eval>
So, in theory, this should deal the skill's damage, then evaluate if the target's HP is 0 or less. If it is, the user of the skill gains 50hp and removes their defense debuffs. When I use the skill and it doesn't kill an enemy, everything is fine. When I use the skill and it kills an enemy, the game gets an error and the javascript effects do not trigger. If I remove the "user.removeDebuff(3)" part, it works fine. If it switch it to "user.removeBuff(3)", that works fine.
So, I assume I'm somehow writing "user.removeDebuff(3)" incorrectly? It's driving me a little insane.
I was hoping to give them an ability with low base damage that, if it kills an enemy, heals them a small amount and removes all of their currently ongoing defense debuffs.
I have Yanfly's Skill Core plugin in order to insert javascript into skills. My notebox currently reads:
<Post-Damage Eval>
if (target.hp <= 0) {
user.gainHp(50);
user.removeDebuff(3);
}
</Post-Damage Eval>
So, in theory, this should deal the skill's damage, then evaluate if the target's HP is 0 or less. If it is, the user of the skill gains 50hp and removes their defense debuffs. When I use the skill and it doesn't kill an enemy, everything is fine. When I use the skill and it kills an enemy, the game gets an error and the javascript effects do not trigger. If I remove the "user.removeDebuff(3)" part, it works fine. If it switch it to "user.removeBuff(3)", that works fine.
So, I assume I'm somehow writing "user.removeDebuff(3)" incorrectly? It's driving me a little insane.

