Advertisement
Maliki79

MalOmitSkillTypes

Dec 31st, 2018
704
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //This plugin will remove Skill Types from all applicable menus when there are no available skills
  2. //in that category.
  3.  
  4. var MalGame_BattlerBase_addedSkillTypes = Game_BattlerBase.prototype.addedSkillTypes;
  5. Game_BattlerBase.prototype.addedSkillTypes = function() {
  6.     var skillT = MalGame_BattlerBase_addedSkillTypes.call(this);
  7.     var skills = this._skills;
  8.     var skillT2 = [];
  9.     var newSkills = [];
  10.     for (var i = 0; i < skills.length; i++) {
  11.         var type = $dataSkills[skills[i]].stypeId;
  12.         if (!skillT2.contains(type)) {
  13.             skillT2.push(type);
  14.         }
  15.     };
  16.     for (var i = 0; i < skillT.length; i++) {
  17.         if (skillT2.contains(skillT[i])) {
  18.             if (!newSkills.contains(skillT[i])) newSkills.push(skillT[i]);
  19.         }
  20.     };
  21.     return newSkills;
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement