Need help making a "Living Bomb" spell/state

So in World of Warcraft, there's a spell called Living Bomb. This applies an effect that works like a simple damage-over-time at first, but upon expiration it casts an explosion that does significant Fire damage to the target and reduced amount to other enemies within a range.

I'm wishing to recreate this effect in my game where a state is applied through a spell, it does Burn damage using Yanfly's Extended DoT plugin, and then an explosion deals damage to the target and half of it to the other enemies once the effect ends. I've tried looking everywhere for tips on how to recreate it but I'm not able to. Can someone help?
1771429149655.png
It's pretty simple really.

Make a <custom leave> effect, using yanfly's buffs and states core, that simply queues a forced action like
Code:
BattleManager.queueForceAction(user, SKILL ID, user)

That way when the state expires you can make whatever you want happen via the skill that's forced. If you want, you can combine that with yanfly's instant skills so it doesn't accidentally use up the turn of the affected character.

Alternatively you can also just have the dmg effects happen via js too, but I find making it a skill looks more clean and can have better effects.
It's pretty simple really.

Make a <custom leave> effect, using yanfly's buffs and states core, that simply queues a forced action like
Code:
BattleManager.queueForceAction(user, SKILL ID, user)

That way when the state expires you can make whatever you want happen via the skill that's forced. If you want, you can combine that with yanfly's instant skills so it doesn't accidentally use up the turn of the affected character.

Alternatively you can also just have the dmg effects happen via js too, but I find making it a skill looks more clean and can have better effects.
Is this Forced Action done by the affected target or the initial caster? Because I want the initial caster to be the one dealing the damage.

EDIT: I tested this out and the explosion dealt very small damage, probably because the enemy its attached to has very low magic damage.
Is this Forced Action done by the affected target or the initial caster? Because I want the initial caster to be the one dealing the damage.

EDIT: I tested this out and the explosion dealt very small damage, probably because the enemy its attached to has very low magic damage.
Yes the enemy would be the one that's using the skill. (Changing that is going to be a little more complex because there's no target available) You can however use the same custom leave effect with js to just make it take a formula of dmg dependent on the stats of whatever actor you want.
Yes the enemy would be the one that's using the skill. (Changing that is going to be a little more complex because there's no target available) You can however use the same custom leave effect with js to just make it take a formula of dmg dependent on the stats of whatever actor you want.
What I tried is change the "user" on the code you gave to "origins". Now the skill is being cast by the actor, but since I'm using ABT there's a delay for them to cast the explosion.

I need some help with how to do the js method, I'm not too good at codes.
What I tried is change the "user" on the code you gave to "origins". Now the skill is being cast by the actor, but since I'm using ABT there's a delay for them to cast the explosion.

I need some help with how to do the js method, I'm not too good at codes.
Sadly I can't help when it comes to how the ATB system works in terms of timing. I would think it's a requirement to have the enemy use the forced skill, not the origin.

Then I would guess you'll need to implement some code perhaps to put said enemy in the action phase of the ATB so the skill executes immediately, but that's just me taking a guess.
Sadly I can't help when it comes to how the ATB system works in terms of timing. I would think it's a requirement to have the enemy use the forced skill, not the origin.

Then I would guess you'll need to implement some code perhaps to put said enemy in the action phase of the ATB so the skill executes immediately, but that's just me taking a guess.
Eh, that's fine. I was still able to make it work using Instant Casting, and the Actor could still use up its turn afterwards.
Is this Forced Action done by the affected target or the initial caster? Because I want the initial caster to be the one dealing the damage.
Im not sure how the timing on it works, but if you keep it as the state's target using the skill, try a.stateOrigin(stateId).mat in your damage formula instead a.mat and change the "stateId" for the state's id. it might use the origin's stats depending on when the forced action resolves compared to the leave effect

edit: hadnt refreshed the page yet to see that it was resolved already
Im not sure how the timing on it works, but if you keep it as the state's target using the skill, try a.stateOrigin(stateId).mat in your damage formula instead a.mat and change the "stateId" for the state's id. it might use the origin's stats depending on when the forced action resolves compared to the leave effect

edit: hadnt refreshed the page yet to see that it was resolved already
Not really fully resolved, but still appreciate this tip. Might try it out.

EDIT: Tested it out, it's the same as before (using the target's MAT instead of the origin's). I might just use my method, though I'm still open for suggestions for solutions.
Tested it out, it's the same as before (using the target's MAT instead of the origin's). I might just use my method, though I'm still open for suggestions for solutions.
then you might have to use a property instead. try adding this to your leave effect

Code:
user._livingBomb = origin.mat;
and then use a._livingBomb || 0 in your formula in place of your a.stateOrigin(x).mat
then you might have to use a property instead. try adding this to your leave effect

Code:
user._livingBomb = origin.mat;
and then use a._livingBomb || 0 in your formula in place of your a.stateOrigin(x).mat
Awesome! This actually worked!

I even modified the code to say
Code:
user._livingBomb = origin.mat * 1.25 - target.mdf;
to make it be affected by the enemy's MDF as well as have scaling.

Thanks for the help! ^_^

Original thread: https://forums.rpgmakerweb.com/threads/need-help-making-a-living-bomb-spell-state.182508/