Is it possible to redirect damage with a state?

Is it possible to make a state so that when a enemy attacks it targets and hits character x but the damage is dealt to character y? I'm toying with the idea of a summon system where the summons can be attacked but instead of having health the damage is done to the summoner's mp and once they run out of mp the summon goes away.
yes, but the state itself wouldn't handle that, it should be handled by the battle system.... although I'm not sure exactly where, because that depends on the battle system.

basically, upon a hit, the battle system would scan for that state and run the damage routine but over another character.
whether that another character is defined by the state, or by a plugin..... it depends.
If you only have 1 summoner or the summoner of the summon can be easily picked, you can have a state on the summon and use Yanfly's buff and state core to do this..
@Engr. Adiktuzmiko can you explain how I would go about doing that? I've used the buff and state core before so I understand the basics of how it works but I'm not really sure what to do for this.
You would be using the "react" notetag to reduce the damage value to the summon to 0, and then deal the damage to the summoner's MP instead..

Like:

Code:
<Custom React Effect>
Summoner.mp -= value;
value = 0; //Turns the damage value to 0 so that your summon wont get damaged

Now, how to get your summoner object depends on how the summon sytem works on the first place..

If you need it to actually show a damage pop-up or a battle log message, that would also need additional code.
@Engr. Adiktuzmiko thanks for the help I just tested it using this code

<Custom React Effect>
$gameActors.actor(1).mp -= value;
value = 0;
</Custom React Effect>

For some reason that didn't work but when I changed it to

<Custom React Effect>
$gameActors.actor(1).gainMp((value) * -1);
value = 0;
</Custom React Effect>

It worked. Any chance you can point me in a direction for the code for damage popups and battle log messages? Also do you think using gainMp instead would have any effect on that? Thanks again for all of your help.
Damage popups depend on what plugin you are using to show them, iirc there is no default damage pop-up.

For the battle log messages, you can check the default scripts for how it passes the message to the battle log window. Im not that versed in the MV calls for it as I mostly use Ace

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-redirect-damage-with-a-state.108726/