Maliki79

MalActorMPCountVZ

Nov 10th, 2025
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var MalMPCGPInit = Game_Party.prototype.initialize
  2. Game_Party.prototype.initialize = function() {
  3.     this._actorMPCount = [];
  4.     MalMPCGPInit.call(this);
  5. };
  6.  
  7. var MalMPCpaySkillCost = Game_BattlerBase.prototype.paySkillCost;
  8. Game_BattlerBase.prototype.paySkillCost = function(skill) {
  9.     MalMPCpaySkillCost.call(this, skill);
  10.     if (this._actorId) this.countMP(this.skillMpCost(skill))
  11. };
  12.  
  13. Game_BattlerBase.prototype.countMP = function(count) {
  14.     var id = this._actorId;
  15.     if (!$gameParty._actorMPCount[id]) $gameParty._actorMPCount[id] = 0;
  16.     $gameParty._actorMPCount[id] += count;
  17. };
  18.  
  19. Game_Party.prototype.getActorMPCount = function (id){
  20.         if (!$gameParty._actorMPCount[id]) $gameParty._actorMPCount[id] = 0;
  21.         return $gameParty._actorMPCount[id];
  22. }
Advertisement
Add Comment
Please, Sign In to add comment