FF9 trouble state

Is there any way to make a state like "trouble" in final fantasy 9?

For those unfamiliar...in FF9 trouble is a state that makes every character in the team receive damagetogether with the character that has the trouble state...for example

Actor 1 has trouble and is hit with a fire spell...every character in the team is hit with the fire spell...

So basically is a state that spread whatever damage is give to the "troubled" character...
I can see this being done with a custom damage formula.
untested
Ruby:
    def party_damage_attack(a,b)
      c = a.atk * 4 - b.def * 2
      $game_party.battle_members.each do |actor|
        a.hp -= (c * 0.75).to_i
      end
  end
If you're not sure about damage formulas, there is a thread that talks about it, just do a search.
I am sorry but I don't understand how a damage formula can cause damage to everybody based of a state...if this is a damage formula wouldn't I have to put this in a specific atack? I need a state that causes this effect on any atack/skill that hits the target...Unless there is a way of causing a state to use a specific damage formula (which if there is I am not aware of how it works)
based of a state
Right, forgot that part. Then I can only suggest that you use a method to apply an passive state that has the damage effect to all battle memebrs.
There is a script that will perform an action when a state is added or removed. Apply the damage state to all battle members when the 'fire' state is applied.
and take it off when it is removed.

Original thread: https://forums.rpgmakerweb.com/threads/ff9-trouble-state.127712/