Last active
March 31, 2017 03:52
-
-
Save TakkunMaker/6828e5d1fae5436c70802ba32dc5d87e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//============================================================================= | |
// 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(); | |
} | |
};} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment