Advertisement
Maliki79

Mal_TPCounting

Dec 1st, 2024 (edited)
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Mal_TPCount_ActorSetup = Game_Actor.prototype.setup;
  2. Game_Actor.prototype.setup = function(actorId) {
  3.     Mal_TPCount_ActorSetup.call(this, actorId);
  4.     this._TPCount = 0;
  5. };
  6.  
  7. var Mal_TPCount_EnemySetup = Game_Enemy.prototype.setup;
  8. Game_Enemy.prototype.setup = function(enemyId, x, y) {
  9.     Mal_TPCount_EnemySetup.call(this, enemyId, x, y);
  10.     this._TPCount = 0;
  11. };
  12.  
  13. var Mal_TPCount_OBS = Game_Battler.prototype.onBattleStart;
  14. Game_Battler.prototype.onBattleStart = function() {
  15.     Mal_TPCount_OBS.call(this);
  16.     this._TPCount = 0;
  17. };
  18.  
  19. var Mal_TPCount_gainTp = Game_Battler.prototype.gainTp;
  20. Game_Battler.prototype.gainTp = function(value) {
  21.     if (value > 0) this._TPCount += value;
  22.     Mal_TPCount_gainTp.call(this, value);
  23. };
  24.  
  25. var Mal_TPCount_gainSilentTp = Game_Battler.prototype.gainSilentTp;
  26. Game_Battler.prototype.gainSilentTp = function(value) {
  27.     if (value > 0) this._TPCount += value;
  28.     Mal_TPCount_gainSilentTp.call(this, value);
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement