var MalMPCGPInit = Game_Party.prototype.initialize
Game_Party.prototype.initialize = function() {
this._actorMPCount = [];
MalMPCGPInit.call(this);
};
var MalMPCpaySkillCost = Game_BattlerBase.prototype.paySkillCost;
Game_BattlerBase.prototype.paySkillCost = function(skill) {
MalMPCpaySkillCost.call(this, skill);
if (this._actorId) this.countMP(this.skillMpCost(skill))
};
Game_BattlerBase.prototype.countMP = function(count) {
var id = this._actorId;
if (!$gameParty._actorMPCount[id]) $gameParty._actorMPCount[id] = 0;
$gameParty._actorMPCount[id] += count;
};
Game_Party.prototype.getActorMPCount = function (id){
if (!$gameParty._actorMPCount[id]) $gameParty._actorMPCount[id] = 0;
return $gameParty._actorMPCount[id];
}