Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * @plugindesc Heal up hp/mp from actors on lvl up
- * @author Alejandro López
- *
- * @param % of HP
- * @desc Percentage to heal up the health point on level up, set 0 to disable
- * @default 100
- *
- * @param % of MP
- * @desc Percentage to heal up the magic point on level up, set 0 to disable
- * @default 100
- *
- * @param Value of HP
- * @desc Value to heal up the health point on level up, set 0 to disable
- * @default 0
- *
- * @param Value of MP
- * @desc Value to heal up the magic point on level up, set 0 to disable
- * @default 0
- */
- (function() {
- var parameters = PluginManager.parameters('HealOnLvUp');
- Game_Actor.prototype.levelUp = function() {
- this._level++;
- this.currentClass().learnings.forEach(function(learning) {
- if (learning.level === this._level) {
- this.learnSkill(learning.skillId);
- }
- }, this);
- for (var i = 0; i < $gameActors.length; i++) {
- $gameActors.actor(i).gainHP($gameActors.actor(i).mhp);
- $gameActors.actor(i).gainHP($gameActors.actor(i).mmp);
- };
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement