I wanted an attack to apply a state, and when the state is removed, it will take a random chance to deal full or half damage.
This is what i used:
<Custom Remove Effect>
if (target.agi + Math.randomInt(20) + 1 >= 11)
{ target.gaintHP(-((Math.randomInt(6) + (Math.randomInt(6) + (Math.randomInt(6))) {
else { target.gaintHP(-((Math.randomInt(6) + (Math.randomInt(6) + (Math.randomInt(6)) / 2) }
target.startDamagePopup();
// Check if the target is dead.
if (target.isDead()) {
// Make the target collapse.
target.performCollapse();
}
</Custom Remove Effect>
This did not work. And i realized that i probably got wrong, so i tried this to make sure i knew what worked:
<Custom Apply Effect>
var value = (Math.randomInt(6) + Math.randomInt(6) + Math.randomInt(6));
target.gainHP(-value);
</Custom Apply Effect>
this did not work tho, and i took this from yanfly's website
pls help thanks xoxox
This is what i used:
<Custom Remove Effect>
if (target.agi + Math.randomInt(20) + 1 >= 11)
{ target.gaintHP(-((Math.randomInt(6) + (Math.randomInt(6) + (Math.randomInt(6))) {
else { target.gaintHP(-((Math.randomInt(6) + (Math.randomInt(6) + (Math.randomInt(6)) / 2) }
target.startDamagePopup();
// Check if the target is dead.
if (target.isDead()) {
// Make the target collapse.
target.performCollapse();
}
</Custom Remove Effect>
This did not work. And i realized that i probably got wrong, so i tried this to make sure i knew what worked:
<Custom Apply Effect>
var value = (Math.randomInt(6) + Math.randomInt(6) + Math.randomInt(6));
target.gainHP(-value);
</Custom Apply Effect>
this did not work tho, and i took this from yanfly's website
pls help thanks xoxox