ed boom

I need to creat a ed bomb skill for a monster, this skill is suposed to explode afther 2 turn when the state is leaving character... but thas not working! I use yanfly buffstate engine, what can i do?

<Custom leave Effect>
$gameTroop.members()[1].forceAction(284, 1);
</Custom leave Effect>
Here's an alternative that won't require you to call a force action:
Code:
<Custom leave Effect>
var bombdamage = 0;
bombdamage = Math.round(INSERT DAMAGE FORMULA HERE);
if (bombdamage !== 0) {
  user.startAnimation(X);
  BattleManager.actionWaitForAnimation();
  user.gainHp(bombdamage);
  user.startDamagePopup();
  user.clearResult();
}
</Custom leave Effect>

Change the X in the startAnimation tag to whatever animation you want to play.
Here's an alternative that won't require you to call a force action:
Code:
<Custom leave Effect>
var bombdamage = 0;
bombdamage = Math.round(INSERT DAMAGE FORMULA HERE);
if (bombdamage !== 0) {
  user.startAnimation(X);
  BattleManager.actionWaitForAnimation();
  user.gainHp(bombdamage);
  user.startDamagePopup();
  user.clearResult();
}
</Custom leave Effect>

Change the X in the startAnimation tag to whatever animation you want to play.

Ahh that should be good thank you sir 😀
Hey so i have one more probleme... my enemies cast and cast again the skill on target and reset all the time the cooldown of this bomb

My question is how can i check if i have a valid target (a target without bomb) to be sure my enemies is not using this skill for nothing.

and afther select a target without bomb.

i know that can be do with Yanfly custom target, This working good but... its too lonng sequence. Maybe you have more tricks for me, more short and easy? Each spell i make take me so much time cause i dont have many experience with Java 🙁

sorry for my english, i speak better french 😀
What's a ed bomb?
that spell put a state on target and explose when the state leave target. i guess the term i use is not good... this is my french traduction 🙂
Hey so i have one more probleme... my enemies cast and cast again the skill on target and reset all the time the cooldown of this bomb

My question is how can i check if i have a valid target (a target without bomb) to be sure my enemies is not using this skill for nothing.

This is on what i m working for... the frist thing... but its always true same when all actors have state 102.... why?


<Custom Requirement>
if (($gameParty.aliveMembers().length - ($gameParty.aliveMembers().every(function(member) { return member.isStateAffected(102) }))) >= 1) {
value = true;
}
else {
value = false;
}
</Custom Requirement>

Original thread: https://forums.rpgmakerweb.com/threads/ed-boom.92901/