Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*:
- * @plugindesc Skills Menu
- * @author RicoRob
- * @help
- */
- Scene_Skill.prototype = Object.create(Scene_ItemBase.prototype);
- Scene_Skill.prototype.constructor = Scene_Skill;
- Scene_Skill.prototype.initialize = function() {
- Scene_ItemBase.prototype.initialize.call(this);
- };
- Scene_Skill.prototype.create = function() {
- Scene_ItemBase.prototype.create.call(this);
- this.createHelpWindow();
- //this.createSkillTypeWindow();
- this.createStatusWindow();
- this.createItemWindow();
- this.createActorWindow();
- this.refreshActor();
- this.commandSkill();
- };
- Scene_Skill.prototype.createStatusWindow = function() {
- var wx = 0;
- var wy = this._helpWindow.height;
- var ww = Graphics.boxWidth / 2.5;
- var wh = this._helpWindow.height * 1.8;
- this._statusWindow = new Window_SkillStatus(wx, wy, ww, wh);
- this.addWindow(this._statusWindow);
- };
- Scene_Skill.prototype.createItemWindow = function() {
- var wx = this._statusWindow.width;
- var wy = this._helpWindow.height;
- var ww = Graphics.boxWidth;
- var wh = this._statusWindow.height;
- this._itemWindow = new Window_SkillList(wx, wy, ww, wh);
- this._itemWindow.setHelpWindow(this._helpWindow);
- this._itemWindow.setHandler('ok', this.onItemOk.bind(this));
- this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this));
- //this._skillTypeWindow.setSkillWindow(this._itemWindow);
- this.addWindow(this._itemWindow);
- };
- Scene_Skill.prototype.refreshActor = function() {
- var actor = this.actor();
- //this._skillTypeWindow.setActor(actor);
- this._statusWindow.setActor(actor);
- this._itemWindow.setActor(actor);
- };
- Scene_Skill.prototype.user = function() {
- return this.actor();
- };
- Scene_Skill.prototype.commandSkill = function() {
- this._itemWindow.activate();
- this._itemWindow.selectLast(0);
- };
- Scene_Skill.prototype.onItemOk = function() {
- this.actor().setLastMenuSkill(this.item());
- this.determineItem();
- };
- Scene_Skill.prototype.onItemCancel = function() {
- SceneManager.pop();
- };
- Scene_Skill.prototype.playSeForItem = function() {
- SoundManager.playUseSkill();
- };
- Scene_Skill.prototype.useItem = function() {
- Scene_ItemBase.prototype.useItem.call(this);
- this._statusWindow.refresh();
- this._itemWindow.refresh();
- };
- Scene_Equip.prototype.onActorChange = function() {
- this.refreshActor();
- this.commandSkill();
- };
RAW Paste Data