|
|
|
@ -210,28 +210,28 @@ Yanfly.BSW.version = 1.09;
|
|
|
|
|
// Parameter Variables
|
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
|
|
Yanfly.Parameters = PluginManager.parameters('YEP_BattleStatusWindow');
|
|
|
|
|
Yanfly.Parameters = PluginManager.parameters("YEP_BattleStatusWindow");
|
|
|
|
|
Yanfly.Param = Yanfly.Param || {};
|
|
|
|
|
Yanfly.Icon = Yanfly.Icon || {};
|
|
|
|
|
|
|
|
|
|
Yanfly.Icon.NoAction = Number(Yanfly.Parameters['No Action Icon']);
|
|
|
|
|
Yanfly.Param.BSWNameFontSize = Number(Yanfly.Parameters['Name Font Size']);
|
|
|
|
|
Yanfly.Param.BSWParamFontSize = Number(Yanfly.Parameters['Param Font Size']);
|
|
|
|
|
Yanfly.Param.BSWParamYBuffer = Number(Yanfly.Parameters['Param Y Buffer']);
|
|
|
|
|
Yanfly.Param.BSWCurrentMax = String(Yanfly.Parameters['Param Current Max']);
|
|
|
|
|
Yanfly.Icon.NoAction = Number(Yanfly.Parameters["No Action Icon"]);
|
|
|
|
|
Yanfly.Param.BSWNameFontSize = Number(Yanfly.Parameters["Name Font Size"]);
|
|
|
|
|
Yanfly.Param.BSWParamFontSize = Number(Yanfly.Parameters["Param Font Size"]);
|
|
|
|
|
Yanfly.Param.BSWParamYBuffer = Number(Yanfly.Parameters["Param Y Buffer"]);
|
|
|
|
|
Yanfly.Param.BSWCurrentMax = String(Yanfly.Parameters["Param Current Max"]);
|
|
|
|
|
Yanfly.Param.BSWCurrentMax = eval(Yanfly.Param.BSWCurrentMax);
|
|
|
|
|
Yanfly.Param.BSWAdjustCol = eval(String(Yanfly.Parameters['Adjust Columns']));
|
|
|
|
|
Yanfly.Param.BSWStateIconRow = Number(Yanfly.Parameters['State Icons Row']);
|
|
|
|
|
|
|
|
|
|
Yanfly.Param.BSWLfRt = eval(String(Yanfly.Parameters['Left / Right']));
|
|
|
|
|
Yanfly.Param.BSWPageUpDn = eval(String(Yanfly.Parameters['PageUp / PageDown']));
|
|
|
|
|
Yanfly.Param.BSWTurnSkip = eval(String(Yanfly.Parameters['Allow Turn Skip']));
|
|
|
|
|
|
|
|
|
|
Yanfly.Param.BSWShowAni = eval(String(Yanfly.Parameters['Show Animations']));
|
|
|
|
|
Yanfly.Param.BSWShowSprite = eval(String(Yanfly.Parameters['Show Sprites']));
|
|
|
|
|
Yanfly.Param.BSWAlignAni = eval(String(Yanfly.Parameters['Align Animations']));
|
|
|
|
|
Yanfly.Param.BSWXOffset = Number(Yanfly.Parameters['X Offset']);
|
|
|
|
|
Yanfly.Param.BSWYOffset = Number(Yanfly.Parameters['Y Offset']);
|
|
|
|
|
Yanfly.Param.BSWAdjustCol = eval(String(Yanfly.Parameters["Adjust Columns"]));
|
|
|
|
|
Yanfly.Param.BSWStateIconRow = Number(Yanfly.Parameters["State Icons Row"]);
|
|
|
|
|
|
|
|
|
|
Yanfly.Param.BSWLfRt = eval(String(Yanfly.Parameters["Left / Right"]));
|
|
|
|
|
Yanfly.Param.BSWPageUpDn = eval(String(Yanfly.Parameters["PageUp / PageDown"]));
|
|
|
|
|
Yanfly.Param.BSWTurnSkip = eval(String(Yanfly.Parameters["Allow Turn Skip"]));
|
|
|
|
|
|
|
|
|
|
Yanfly.Param.BSWShowAni = eval(String(Yanfly.Parameters["Show Animations"]));
|
|
|
|
|
Yanfly.Param.BSWShowSprite = eval(String(Yanfly.Parameters["Show Sprites"]));
|
|
|
|
|
Yanfly.Param.BSWAlignAni = eval(String(Yanfly.Parameters["Align Animations"]));
|
|
|
|
|
Yanfly.Param.BSWXOffset = Number(Yanfly.Parameters["X Offset"]);
|
|
|
|
|
Yanfly.Param.BSWYOffset = Number(Yanfly.Parameters["Y Offset"]);
|
|
|
|
|
Yanfly.Param.ATBGaugeStyle = 1;
|
|
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
@ -290,22 +290,19 @@ Game_Actor.prototype.changeClass = function(classId, keepExp) {
|
|
|
|
|
this.battleStatusWindowRefresh();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Yanfly.BSW.Game_Actor_setCharacterImage =
|
|
|
|
|
Game_Actor.prototype.setCharacterImage;
|
|
|
|
|
Yanfly.BSW.Game_Actor_setCharacterImage = Game_Actor.prototype.setCharacterImage;
|
|
|
|
|
Game_Actor.prototype.setCharacterImage = function (name, index) {
|
|
|
|
|
Yanfly.BSW.Game_Actor_setCharacterImage.call(this, name, index);
|
|
|
|
|
this.battleStatusWindowRefresh();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Yanfly.BSW.Game_Actor_setFaceImage =
|
|
|
|
|
Game_Actor.prototype.setFaceImage;
|
|
|
|
|
Yanfly.BSW.Game_Actor_setFaceImage = Game_Actor.prototype.setFaceImage;
|
|
|
|
|
Game_Actor.prototype.setFaceImage = function (faceName, faceIndex) {
|
|
|
|
|
Yanfly.BSW.Game_Actor_setFaceImage.call(this, faceName, faceIndex);
|
|
|
|
|
this.battleStatusWindowRefresh();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Yanfly.BSW.Game_Actor_setBattlerImage =
|
|
|
|
|
Game_Actor.prototype.setBattlerImage;
|
|
|
|
|
Yanfly.BSW.Game_Actor_setBattlerImage = Game_Actor.prototype.setBattlerImage;
|
|
|
|
|
Game_Actor.prototype.setBattlerImage = function (battlerName) {
|
|
|
|
|
Yanfly.BSW.Game_Actor_setBattlerImage.call(this, battlerName);
|
|
|
|
|
this.battleStatusWindowRefresh();
|
|
|
|
@ -321,8 +318,7 @@ Game_Actor.prototype.battleStatusWindowRefresh = function() {
|
|
|
|
|
// Sprite_Actor
|
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
|
|
Yanfly.BSW.Sprite_Actor_createMainSprite =
|
|
|
|
|
Sprite_Actor.prototype.createMainSprite;
|
|
|
|
|
Yanfly.BSW.Sprite_Actor_createMainSprite = Sprite_Actor.prototype.createMainSprite;
|
|
|
|
|
Sprite_Actor.prototype.createMainSprite = function () {
|
|
|
|
|
Yanfly.BSW.Sprite_Actor_createMainSprite.call(this);
|
|
|
|
|
if ($gameSystem.isSideView()) return;
|
|
|
|
@ -360,7 +356,7 @@ Sprite_Actor.prototype.setActorHomeFrontView = function(index) {
|
|
|
|
|
var size = $gameParty.maxBattleMembers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var homeX = screenW / size * index + windowW + screenW / (size * 2);
|
|
|
|
|
var homeX = (screenW / size) * index + windowW + screenW / (size * 2);
|
|
|
|
|
homeX += Yanfly.Param.BSWXOffset;
|
|
|
|
|
var homeY = Graphics.boxHeight - statusHeight;
|
|
|
|
|
homeY += Yanfly.Param.BSWYOffset;
|
|
|
|
@ -402,13 +398,13 @@ Window_Base.prototype.drawActorActionIcon = function(actor, wx, wy) {
|
|
|
|
|
|
|
|
|
|
Window_PartyCommand.prototype.processHandling = function () {
|
|
|
|
|
if (this.isOpenAndActive() && Yanfly.Param.BSWPageUpDn) {
|
|
|
|
|
if (this.isHandled('pagedown') && Input.isRepeated('pagedown')) {
|
|
|
|
|
if (this.isHandled("pagedown") && Input.isRepeated("pagedown")) {
|
|
|
|
|
return this.processPagedown();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Window_Selectable.prototype.processHandling.call(this);
|
|
|
|
|
if (this.isOpenAndActive() && Yanfly.Param.BSWLfRt) {
|
|
|
|
|
if (this.isHandled('right') && Input.isRepeated('right')) {
|
|
|
|
|
if (this.isHandled("right") && Input.isRepeated("right")) {
|
|
|
|
|
this.processRight();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -418,7 +414,7 @@ Window_PartyCommand.prototype.processRight = function() {
|
|
|
|
|
SoundManager.playCursor();
|
|
|
|
|
this.updateInputData();
|
|
|
|
|
this.deactivate();
|
|
|
|
|
this.callHandler('right');
|
|
|
|
|
this.callHandler("right");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
@ -427,17 +423,17 @@ Window_PartyCommand.prototype.processRight = function() {
|
|
|
|
|
|
|
|
|
|
Window_ActorCommand.prototype.processHandling = function () {
|
|
|
|
|
if (this.isOpenAndActive() && Yanfly.Param.BSWPageUpDn) {
|
|
|
|
|
if (this.isHandled('pageup') && Input.isRepeated('pageup')) {
|
|
|
|
|
if (this.isHandled("pageup") && Input.isRepeated("pageup")) {
|
|
|
|
|
return this.processPageup();
|
|
|
|
|
} else if (this.isHandled('pagedown') && Input.isRepeated('pagedown')) {
|
|
|
|
|
} else if (this.isHandled("pagedown") && Input.isRepeated("pagedown")) {
|
|
|
|
|
return this.processPagedown();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Window_Selectable.prototype.processHandling.call(this);
|
|
|
|
|
if (this.isOpenAndActive() && Yanfly.Param.BSWLfRt) {
|
|
|
|
|
if (this.isHandled('left') && Input.isRepeated('left')) {
|
|
|
|
|
if (this.isHandled("left") && Input.isRepeated("left")) {
|
|
|
|
|
this.processLeft();
|
|
|
|
|
} else if (this.isHandled('right') && Input.isRepeated('right')) {
|
|
|
|
|
} else if (this.isHandled("right") && Input.isRepeated("right")) {
|
|
|
|
|
this.processRight();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -447,7 +443,7 @@ Window_ActorCommand.prototype.processLeft = function() {
|
|
|
|
|
SoundManager.playCursor();
|
|
|
|
|
this.updateInputData();
|
|
|
|
|
this.deactivate();
|
|
|
|
|
this.callHandler('left');
|
|
|
|
|
this.callHandler("left");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Window_ActorCommand.prototype.processRight = function () {
|
|
|
|
@ -456,7 +452,7 @@ Window_ActorCommand.prototype.processRight = function() {
|
|
|
|
|
}
|
|
|
|
|
this.updateInputData();
|
|
|
|
|
this.deactivate();
|
|
|
|
|
this.callHandler('right');
|
|
|
|
|
this.callHandler("right");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Window_ActorCommand.prototype.processCancel = function () {
|
|
|
|
@ -468,6 +464,9 @@ Window_ActorCommand.prototype.processCancel = function() {
|
|
|
|
|
//=============================================================================
|
|
|
|
|
// Window_BattleStatus
|
|
|
|
|
//=============================================================================
|
|
|
|
|
Window_BattleStatus.prototype.windowWidth = function () {
|
|
|
|
|
return Graphics.boxWidth;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Window_BattleStatus.prototype.createContents = function () {
|
|
|
|
|
this.createFaceContents();
|
|
|
|
@ -558,7 +557,7 @@ Window_BattleStatus.prototype.drawGaugeArea = function(rect, actor) {
|
|
|
|
|
this.contents.fontSize = Yanfly.Param.BSWParamFontSize;
|
|
|
|
|
this._enableYBuffer = true;
|
|
|
|
|
var wy = rect.y + rect.height - this.lineHeight();
|
|
|
|
|
var wymod = (Imported.YEP_CoreEngine) ? Yanfly.Param.GaugeHeight : 6;
|
|
|
|
|
var wymod = Imported.YEP_CoreEngine ? Yanfly.Param.GaugeHeight : 6;
|
|
|
|
|
var wymod = Math.max(16, wymod);
|
|
|
|
|
this.drawActorHp(actor, rect.x, wy - wymod * 2, rect.width);
|
|
|
|
|
if (this.getGaugesDrawn(actor) <= 2) {
|
|
|
|
@ -575,7 +574,7 @@ Window_BattleStatus.prototype.drawGaugeArea = function(rect, actor) {
|
|
|
|
|
Window_BattleStatus.prototype.drawStateArea = function (rect, actor) {
|
|
|
|
|
var row = Yanfly.Param.BSWStateIconRow;
|
|
|
|
|
if (row === undefined) row = 1;
|
|
|
|
|
var wy = rect.y + (this.lineHeight() * row);
|
|
|
|
|
var wy = rect.y + this.lineHeight() * row;
|
|
|
|
|
this.drawActorIcons(actor, rect.x + 2, wy, rect.width);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -612,7 +611,7 @@ Window_BattleStatus.prototype.drawFace = function(fn, fi, x, y, width, height) {
|
|
|
|
|
var sh = Math.min(height, ph);
|
|
|
|
|
var dx = Math.floor(x + Math.max(width - pw, 0) / 2);
|
|
|
|
|
var dy = Math.floor(y + Math.max(height - ph, 0) / 2);
|
|
|
|
|
var sx = fi % 4 * pw + (pw - sw) / 2;
|
|
|
|
|
var sx = (fi % 4) * pw + (pw - sw) / 2;
|
|
|
|
|
var sy = Math.floor(fi / 4) * ph + (ph - sh) / 2;
|
|
|
|
|
this._faceContents.bitmap.blt(bitmap, sx, sy, sw, sh, dx, dy);
|
|
|
|
|
};
|
|
|
|
@ -642,61 +641,78 @@ Window_BattleStatus.prototype.drawText = function(text, wx, wy, ww, align) {
|
|
|
|
|
Window_Selectable.prototype.drawText.call(this, text, wx, wy, ww, align);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Window_BattleStatus.prototype.drawCurrentAndMax = function(current, max, x, y,
|
|
|
|
|
width, color1, color2) {
|
|
|
|
|
Window_BattleStatus.prototype.drawCurrentAndMax = function (current, max, x, y, width, color1, color2) {
|
|
|
|
|
if (this._currentMax) {
|
|
|
|
|
Window_Selectable.prototype.drawCurrentAndMax.call(this, current, max,
|
|
|
|
|
x, y, width, color1, color2);
|
|
|
|
|
Window_Selectable.prototype.drawCurrentAndMax.call(this, current, max, x, y, width, color1, color2);
|
|
|
|
|
} else {
|
|
|
|
|
this.changeTextColor(color1);
|
|
|
|
|
var value = Yanfly.Util.toGroup(current);
|
|
|
|
|
this.drawText(value, x, y, width, 'right');
|
|
|
|
|
this.drawText(value, x, y, width, "right");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Window_BattleStatus.prototype.drawItemGaugeIcon = function (iconIndex, wx, wy) {
|
|
|
|
|
var bitmap = ImageManager.loadSystem('IconSet');
|
|
|
|
|
var bitmap = ImageManager.loadSystem("IconSet");
|
|
|
|
|
var pw = Window_Base._iconWidth;
|
|
|
|
|
var ph = Window_Base._iconHeight;
|
|
|
|
|
var sx = iconIndex % 16 * pw;
|
|
|
|
|
var sx = (iconIndex % 16) * pw;
|
|
|
|
|
var sy = Math.floor(iconIndex / 16) * ph;
|
|
|
|
|
var iconWidth = (Imported.YEP_CoreEngine) ? Yanfly.Param.GaugeHeight : 32;
|
|
|
|
|
var iconHeight = (Imported.YEP_CoreEngine) ? Yanfly.Param.GaugeHeight : 32;
|
|
|
|
|
var iconWidth = Imported.YEP_CoreEngine ? Yanfly.Param.GaugeHeight : 32;
|
|
|
|
|
var iconHeight = Imported.YEP_CoreEngine ? Yanfly.Param.GaugeHeight : 32;
|
|
|
|
|
wy += Window_Base._iconHeight - iconHeight;
|
|
|
|
|
this.contents.blt(bitmap, sx, sy, pw, ph, wx, wy, iconWidth, iconHeight);
|
|
|
|
|
return iconWidth;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Window_BattleStatus.prototype._refreshCursor = function () {
|
|
|
|
|
var pad = this._padding;
|
|
|
|
|
var x = this._cursorRect.x + pad - this.origin.x;
|
|
|
|
|
var y = this._cursorRect.y + pad - this.origin.y;
|
|
|
|
|
var w = this._cursorRect.width;
|
|
|
|
|
var h = this._cursorRect.height;
|
|
|
|
|
var m = 4;
|
|
|
|
|
var x2 = Math.max(x, pad);
|
|
|
|
|
var y2 = Math.max(y, pad);
|
|
|
|
|
var ox = x - x2;
|
|
|
|
|
var oy = y - y2;
|
|
|
|
|
var w2 = Math.min(w, this._width - pad - x2);
|
|
|
|
|
var h2 = Math.min(h, this._height - pad - y2);
|
|
|
|
|
var bitmap = new Bitmap(w2, h2);
|
|
|
|
|
|
|
|
|
|
this._windowCursorSprite.bitmap = bitmap;
|
|
|
|
|
this._windowCursorSprite.setFrame(0, 0, w2, h2);
|
|
|
|
|
this._windowCursorSprite.move(x2, y2);
|
|
|
|
|
|
|
|
|
|
bitmap.fillAll("rgba(250, 250, 240, 0.6)");
|
|
|
|
|
};
|
|
|
|
|
//=============================================================================
|
|
|
|
|
// Scene_Battle
|
|
|
|
|
//=============================================================================
|
|
|
|
|
|
|
|
|
|
Yanfly.BSW.Scene_Battle_createPartyCommandWindow =
|
|
|
|
|
Scene_Battle.prototype.createPartyCommandWindow;
|
|
|
|
|
Yanfly.BSW.Scene_Battle_createPartyCommandWindow = Scene_Battle.prototype.createPartyCommandWindow;
|
|
|
|
|
Scene_Battle.prototype.createPartyCommandWindow = function () {
|
|
|
|
|
Yanfly.BSW.Scene_Battle_createPartyCommandWindow.call(this);
|
|
|
|
|
var win = this._partyCommandWindow;
|
|
|
|
|
if (Yanfly.Param.BSWLfRt) {
|
|
|
|
|
win.setHandler('right', this.commandFight.bind(this));
|
|
|
|
|
win.setHandler("right", this.commandFight.bind(this));
|
|
|
|
|
}
|
|
|
|
|
if (Yanfly.Param.BSWPageUpDn) {
|
|
|
|
|
win.setHandler('pagedown', this.commandFight.bind(this));
|
|
|
|
|
};
|
|
|
|
|
win.setHandler("pagedown", this.commandFight.bind(this));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Yanfly.BSW.Scene_Battle_createActorCommandWindow =
|
|
|
|
|
Scene_Battle.prototype.createActorCommandWindow;
|
|
|
|
|
Yanfly.BSW.Scene_Battle_createActorCommandWindow = Scene_Battle.prototype.createActorCommandWindow;
|
|
|
|
|
Scene_Battle.prototype.createActorCommandWindow = function () {
|
|
|
|
|
Yanfly.BSW.Scene_Battle_createActorCommandWindow.call(this);
|
|
|
|
|
var win = this._actorCommandWindow;
|
|
|
|
|
if (Yanfly.Param.BSWLfRt) {
|
|
|
|
|
win.setHandler('left', this.selectPreviousCommand.bind(this));
|
|
|
|
|
win.setHandler('right', this.selectRightCommand.bind(this));
|
|
|
|
|
win.setHandler("left", this.selectPreviousCommand.bind(this));
|
|
|
|
|
win.setHandler("right", this.selectRightCommand.bind(this));
|
|
|
|
|
}
|
|
|
|
|
if (Yanfly.Param.BSWPageUpDn) {
|
|
|
|
|
win.setHandler('pageup', this.selectPreviousCommand.bind(this));
|
|
|
|
|
win.setHandler('pagedown', this.selectRightCommand.bind(this));
|
|
|
|
|
};
|
|
|
|
|
win.setHandler("pageup", this.selectPreviousCommand.bind(this));
|
|
|
|
|
win.setHandler("pagedown", this.selectRightCommand.bind(this));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Scene_Battle.prototype.clearInputtingAction = function () {
|
|
|
|
@ -755,8 +771,8 @@ Yanfly.Util = Yanfly.Util || {};
|
|
|
|
|
if (!Yanfly.Util.toGroup) {
|
|
|
|
|
Yanfly.Util.toGroup = function (inVal) {
|
|
|
|
|
return inVal;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=============================================================================
|
|
|
|
|
// End of File
|
|
|
|
|