| //============================================================================= | |
| // Garnet LevelUP Animation.js | |
| //============================================================================= | |
| /*: | |
| * @plugindesc Adds an animation when level up. | |
| * @author Takkun | |
| * | |
| * @help This plugin does not provide plugin commands. | |
| * | |
| * @param Animation ID | |
| * @desc Set the animation that will be displayed when you level up (Based on the database). | |
| * @default 41 | |
| * @param Recover All | |
| * @desc Recover All status when level up (true/false). | |
| * @default true | |
| */ | |
| //(function() { | |
| (function() { | |
| var GarnetlvlParams = PluginManager.parameters('Garnet LevelUP Animation'); | |
| var GarnetlvlAnimation = Number(GarnetlvlParams['Animation ID'] || 41); | |
| var GarnetlvlRecover = Boolean(GarnetlvlParams['Recover All'] === "true" ? true : false); | |
| Game_Actor.prototype.levelUp = function() { | |
| $gamePlayer.requestAnimation(GarnetlvlAnimation); | |
| this._level++; | |
| this.currentClass().learnings.forEach(function(learning) { | |
| if (learning.level === this._level) { | |
| this.learnSkill(learning.skillId); | |
| } | |
| }, this); | |
| if (GarnetlvlRecover == true) { | |
| this.recoverAll(); | |
| } | |
| };} | |
| )(); |