// Declare Constants
const actor = arguments[0];
const rect = arguments[1];
// Draw Actor Graphic
const gx = rect.x + (this.graphicType() === 'face' ? 1 : 0);
const gy = rect.y + (this.graphicType() === 'face' ? 1 : 0);
const gw = Math.min(rect.width, ImageManager.faceWidth);
const gh = Math.min(rect.height, ImageManager.faceHeight);
this.drawActorGraphic(actor, gx, gy, gw, gh);
// Draw Status Stuff
sx = rect.x + 180;
sy = rect.y + rect.height / 2 - this.lineHeight() * 1.5;
lineHeight = this.lineHeight();
sx2 = sx + 180;
this.drawActorName(actor, sx, sy);
this.drawActorLevel(actor, sx, sy + lineHeight * 1);
this.drawActorIcons(actor, sx, sy + lineHeight * 2);
this.drawActorClass(actor, sx2, sy);
// Place Gauges
sy2 = sy + lineHeight;
gaugeLineHeight = this.gaugeLineHeight();
tw = rect.width / 20;
this.contents.fontSize -= 8;
this.contents.drawText("HP", sx2, sy2, tw, gaugeLineHeight, 'left');
this.contents.drawText(actor.hp, sx2 + 80, sy2, tw, gaugeLineHeight, 'right');
sy2 += gaugeLineHeight;
this.contents.drawText("MP", sx2, sy2, tw, gaugeLineHeight, 'left');
this.contents.drawText(actor.mp, sx2 + 80, sy2, tw, gaugeLineHeight, 'right');
if ($dataSystem.optDisplayTp)
sy2 += gaugeLineHeight;
this.contents.drawText("TP", sx2, sy2, tw, gaugeLineHeight, 'left');
this.contents.drawText(actor.tp, sx2 + 80, sy2, tw, gaugeLineHeight, 'right');
sx += 160;
// Following Requires VisuStella MZ's Core Engine
// Draw Additional Parameter Data if Enough Room
sx3 = sx2 + 180;
sw = rect.width - sx3 - 2;
if (Imported.VisuMZ_0_CoreEngine && sw >= 300) {
const params = VisuMZ.CoreEngine.Settings.Param.DisplayedParams;
const pw = Math.floor(sw / 2) - 24;
let px = sx3;
let py = rect.y + Math.floor((rect.height - (Math.ceil(params.length / 2) * gaugeLineHeight)) / 2);
let counter = 0;
for (const param of params) {
this.resetFontSettings();
this.drawParamText(px, py, pw, param, true);
this.resetTextColor();
this.contents.fontSize -= 8;
const paramValue = actor.paramValueByName(param, true);
this.contents.drawText(paramValue, px, py, pw, gaugeLineHeight, 'right');
counter++;
if (counter % 2 === 0) {
px = sx3;
py += gaugeLineHeight;
} else {
px += pw + 24;
}
}
}