Help needed with buffs/states plugin. Trying to create a state that deals extra damage to affected battlers when they take damage.

I own all the Yanfly plugins but currently have installed: BuffsStatesCore, CoreEngine, Battleengine, action pack 1.
I'm trying to create a status effect called 'Ablaze.' Here's what it's supposed to do:
From application it should start keeping track of the amount of times the afflicted battler has taken physical damage through yanfly's counters in the buffstatescore.
Each time the counter goes up by one, the afflicted battler loses 30 HP.
The counters are relevant because at 10 counters, the unit should explode for a lot more damage, however, that is the next step and I'm trying to deal with problems one at a time. If anyone has an idea for this Id love to hear it though.

Problems I have:
Right now the afflicted battler loses HP regardless of the element of the move that hit them. I have no idea how to program it for only physical moves.
The HP lost is not displayed during battle. No numbers pop up except for the usual damage numbers of the move used to damage the battler.

Here is how I'm trying to do it right now:
Help would be greatly appreciated 🙂

1587039932901.png
target.startDamagePopup(); after the target.gainHp to show the dmg.
not sure about this
if (this.isPhysical()) {
}
you could also try Respond instead of React
and last https://forums.rpgmakerweb.com/index.php?threads/rmmv-damage-formula-ideas-and-help.47099/
since that's made for stuff like this.
Thank you very much sir! I was wondering if there is some place that has all of these functions (like startDamagePopup or gainHP) so I would be able to find them myself?
Thank you very much sir! I was wondering if there is some place that has all of these functions (like startDamagePopup or gainHP) so I would be able to find them myself?
well, one place like i said above is the thread,you could also try yanfly's tips and tricks to see some javascript and make your own and last thing would be to search the forum overall.At least that's how i learned of certain stuff.
if (this.isPhysical()) {
}
I would instead write down
Code:
 if (value > 0 && this.isPhysical()) {
 // insert your effect here
 }
so only physical moves that deal damage trigger the effect.

Also, if you want the affected battler to die from the state's effect, then add
Code:
  if (target.isDead()) {
    target.performCollapse();
  }

at the end of the React effect
Thanks so so much guys! Everything is working now, I'd just like to add an animation for the fire damage. Is there a function that allows me to play the Fire battle animation on the location of the target inflicted with the status?
To play an animation when the target takes damage from the state, type:
Code:
var fireAnim = 66;
target.startAnimation(fireAnim);
right before where you wrote
Code:
target.startDamagePopup();

Original thread: https://forums.rpgmakerweb.com/threads/help-needed-with-buffs-states-plugin-trying-to-create-a-state-that-deals-extra-damage-to-affected-battlers-when-they-take-damage.120263/