A way to make one actor's HP and MP always be the same as another actors?

I'm wondering how to have Actor A's current HP and MP always be the same as Actor B's HP and MP. Whats the best way to do this?
try this as a plugin and put it at the bottom of the plugin list. its only been slightly tested

Spoiler: plugin
Code:
Object.defineProperties(Game_Actor.prototype, {
  hp: { get: function() {
    var a = 2  //here
    var b = 1
    if (this.actorId() === a){
      this.setHp($gameActors.actor(b).hp)
      return this._hp;
    }
    return this._hp; }, configurable: true },
  mp: { get: function() {
    var a = 2  //here
    var b = 1
    if (this.actorId() === a){
      this.setMp($gameActors.actor(b).mp)
      return this._mp;
    }
    return this._mp; }, configurable: true }
});


var _Game_Actor_param = Game_Actor.prototype.param;
Game_Actor.prototype.param = function(paramId){
  var a = 2 //here
  var b = 1
  if (this.actorId() === a && (paramId === 0 || paramId === 1))
    return $gameActors.actor(b).param(paramId);
  return _Game_Actor_param.call(this, paramId)
}

that makes actor 2's hp and mp equal to actor 1's. change the value of the "var a"'s in the 3 places with the "//here" to the id of the actor copying another and change the "var b"'s to the id of the one being copied

Original thread: https://forums.rpgmakerweb.com/threads/a-way-to-make-one-actors-hp-and-mp-always-be-the-same-as-another-actors.173681/