Advertisement
TroyZ

Testt

Dec 29th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Imported = Imported || {};
  2. Imported.TroyZ_SlipDamageMods = true;
  3.  
  4. var TroyZ = TroyZ || {};
  5. TroyZ.SlipDamageMods = TroyZ.SlipDamageMods || {};
  6. TroyZ.SlipDamageMods.version = 1.0;
  7.  
  8. TroyZ.SlipDamageMods.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
  9.  
  10. DataManager.isDatabaseLoaded = function() {
  11.   if (!TroyZ.SlipDamageMods.DataManager_isDatabaseLoaded.call(this)) return false;
  12.   if (!TroyZ.processSDMnote) {
  13.     this.loadSDMNote($dataStates);
  14.     TroyZ.processSDMnote = true;
  15.   }
  16.   return true;
  17. };
  18.  
  19. DataManager.loadSDMNote = function(data) {
  20.     for (var a = 1; a < data.length; a++) {
  21.         var obj = data[a];
  22.         var notedata = obj.note.split(/[\r\n]+/);
  23.         obj.slipcankill = true;
  24.        
  25.         for (var b = 0; b < notedata.length; b++) {
  26.             var line = notedata[b];
  27.             if (line.match(/<(?:SLIP NO KILL)>/i)) {
  28.                 obj.slipcankill = false;
  29.             }
  30.         }
  31.     }
  32. };
  33.  
  34. Game_Battler.prototype.maxSlipDamage = function() {
  35.     return $dataSystem.optSlipDeath && this.states.slipcankill ? this.hp : Math.max(this.hp - 1, 0);
  36. };
  37.  
  38. // Game_Battler.prototype.maxSlipDamage = function() {
  39. //     if ($dataSystem.optSlipDeath && this.states.slipcankill) {
  40. //         this.hp;
  41. //     }
  42. //     else
  43. //     {
  44. //         Math.max(this.hp - 1, 0);
  45. //     }
  46. // };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement