dead-bunny/js/plugins/Nore_EroStatus.js
2025-01-12 01:21:39 -06:00

1252 lines
37 KiB
JavaScript

var __extends =
(this && this.__extends) ||
(function () {
var extendStatics = function (d, b) {
extendStatics =
Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array &&
function (d, b) {
d.__proto__ = b;
}) ||
function (d, b) {
for (var p in b)
if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
};
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError(
"Class extends value " + String(b) + " is not a constructor or null"
);
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype =
b === null
? Object.create(b)
: ((__.prototype = b.prototype), new __());
};
})();
var Nore;
(function (Nore) {
var Scene_EroStatus = /** @class */ (function (_super) {
__extends(Scene_EroStatus, _super);
function Scene_EroStatus() {
return (_super !== null && _super.apply(this, arguments)) || this;
}
Scene_EroStatus.prototype.create = function () {
_super.prototype.create.call(this);
ImageManager.loadSystem("status_back");
ImageManager.loadSystem("status_label");
ImageManager.loadSystem("name");
this.loadImages();
TouchInput.clear();
};
Scene_EroStatus.prototype.start = function () {
if (!this._bg) {
this.createBackground();
}
this.createEroStatusWindow();
this._eroStatusWindow.refresh();
if ($gameTemp.lastSelectedEroStatusIndex >= 0) {
this._eroStatusWindow.select($gameTemp.lastSelectedEroStatusIndex);
}
_super.prototype.start.call(this);
};
Scene_EroStatus.prototype.createButtons = function () {};
Scene_EroStatus.prototype.loadImages = function () {
for (var _i = 0, _a = $gameParty.getActorIdList(); _i < _a.length; _i++) {
var actorId = _a[_i];
var babyList = $gameActors.actor(actorId).babyList();
for (var _b = 0, babyList_1 = babyList; _b < babyList_1.length; _b++) {
var baby = babyList_1[_b];
baby.loadImage();
}
}
};
Scene_EroStatus.prototype.createBackground = function () {
var baseTexture = Nore.getSystemBaseTexture("status_back");
if (!baseTexture) {
return;
}
var texture = new PIXI.Texture(baseTexture);
this._bg = new PIXI.Sprite(texture);
this.addChild(this._bg);
};
Scene_EroStatus.prototype.createEroStatusWindow = function () {
this._eroStatusWindow = new Window_EroStatus();
this._eroStatusWindow.setHandler("ok", this.onOk.bind(this));
this.addChild(this._eroStatusWindow);
};
Scene_EroStatus.prototype.onOk = function () {
var index = this._eroStatusWindow.index();
switch (index) {
case 0:
SceneManager.snapForBackground();
SceneManager.push(Scene_SalesPage);
break;
case 1:
this._eroStatusWindow.activate();
this._eroStatusWindow.onFace();
break;
case 2:
this._eroStatusWindow.activate();
this._eroStatusWindow.onHoppe();
break;
case 3:
this._eroStatusWindow.activate();
this._eroStatusWindow.onNamida();
break;
case 4:
$gameTemp.lastSelectedEroStatusIndex = index;
SceneManager.push(Nore.Scene_Kigae);
break;
case 5:
this.popScene();
break;
}
};
Scene_EroStatus.prototype.popScene = function () {
$gameTemp.lastSelectedEroStatusIndex = 0;
$gameParty.menuActor().setCacheChanged();
SoundManager.playCancel();
_super.prototype.popScene.call(this);
};
Scene_EroStatus.prototype.update = function () {
_super.prototype.update.call(this);
this.updateKey();
this.updateWheel();
};
Scene_EroStatus.prototype.updateWheel = function () {
if (TouchInput.wheelY > 0) {
$gameParty.menuActor().setCacheChanged();
this.nextActor();
} else if (TouchInput.wheelY < 0) {
$gameParty.menuActor().setCacheChanged();
this.previousActor();
}
};
Scene_EroStatus.prototype.updateKey = function () {
if (
Input.isTriggered("cancel") ||
TouchInput.rightButton ||
this._eroStatusWindow.isBackClicked()
) {
this.popScene();
} else if (Input.isTriggered("pageup")) {
$gameParty.menuActor().setCacheChanged();
this.nextActor();
} else if (Input.isTriggered("pagedown")) {
$gameParty.menuActor().setCacheChanged();
this.previousActor();
}
};
Scene_EroStatus.prototype.nextActor = function () {
_super.prototype.nextActor.call(this);
this._eroStatusWindow.refresh();
};
Scene_EroStatus.prototype.previousActor = function () {
_super.prototype.previousActor.call(this);
this._eroStatusWindow.refresh();
};
return Scene_EroStatus;
})(Scene_MenuBase);
Nore.Scene_EroStatus = Scene_EroStatus;
var MANKO_HENKEI_ID = 51;
var MANKO_KURO_ID = 52;
var ANAL_GABA_ID = 54;
var CHIKUBI_KURO_ID = 56;
var Window_EroStatus = /** @class */ (function (_super) {
__extends(Window_EroStatus, _super);
function Window_EroStatus() {
var _this = this;
var r = new Rectangle(
0,
0,
Graphics.boxWidth + 8,
Graphics.boxHeight + 8
);
_this = _super.call(this, r) || this;
_this.frameVisible = false;
_this._margin = 0;
_this.padding = 0;
_this.createContents();
_this._actorLayer = new Sprite();
_this.addChild(_this._actorLayer);
_this.backOpacity = 0;
_this.contents.outlineWidth = 5;
_this.initParams();
_this.activate();
return _this;
}
Window_EroStatus.prototype.select = function (index) {
_super.prototype.select.call(this, index);
if (!this._avButton) {
return;
}
this.deselectAllButtons();
switch (index) {
case 0:
this._avButton.focus();
break;
case 1:
this._faceButton.focus();
break;
case 2:
this._hoppeButton.focus();
break;
case 3:
this._namidaButton.focus();
break;
case 4:
this._kigaeButton.focus();
break;
case 5:
this._backButton.focus();
break;
}
};
Window_EroStatus.prototype.deselectAllButtons = function () {
this._avButton.defocus();
this._faceButton.defocus();
this._hoppeButton.defocus();
this._namidaButton.defocus();
this._kigaeButton.defocus();
this._backButton.defocus();
};
Window_EroStatus.prototype.setCursorRect = function (x, y, w, h) {};
Window_EroStatus.prototype.maxItems = function () {
return 6;
};
Window_EroStatus.prototype.maxCols = function () {
return this.maxItems();
};
Window_EroStatus.prototype.itemRect = function (index) {
switch (index) {
case 0:
return new Rectangle(138, 318, 50, 50);
case 1:
return new Rectangle(513, 327, 70, 70);
case 2:
return new Rectangle(513 + 73, 327, 70, 70);
case 3:
return new Rectangle(513 + 73 * 2, 327, 70, 70);
case 4:
return new Rectangle(954, 22, 70, 70);
case 5:
return new Rectangle(1207, 23, 52, 52);
}
return new Rectangle(400, 200, 70, 70);
};
Window_EroStatus.prototype.initParams = function () {
this._valueWidth = 178;
};
Window_EroStatus.prototype.refresh = function () {
this._actor = $gameParty.menuActor();
this._windowContentsSprite.removeChildren();
this._actorLayer.removeChildren();
this.contents.clear();
// 左
var xx = 30;
var yy = 30;
this.drawEroAbilityList(xx, 440);
// 中央
this.drawBody(544, yy);
this.drawAvInfo(155, 280);
this.drawAvList(46, yy);
// 右
this.drawSyusan(760, 65);
this.addAvButton(152, 330);
this.addMankoButton(522, 336);
this.drawMankoImage(454, 448);
this.drawTachieImage(830, -140);
this.addKigaeButton(964, 31);
this.addBackButton(1206, 25);
this.drawNameLabel(970, 700, this._actor.actorId());
};
Window_EroStatus.prototype.addKigaeButton = function (x, y) {
var button = new Sprite_Button2("kigae", true);
var left = x;
var yy = y;
button.x = left;
button.y = yy;
this._windowContentsSprite.addChild(button);
button.setClickHandler(this.onKigae.bind(this));
button.setMouseExitHandler(this.onMouseExit.bind(this));
this._kigaeButton = button;
};
Window_EroStatus.prototype.addBackButton = function (x, y) {
var button = new Sprite_Button2("back", true);
var left = x;
var yy = y;
button.x = left;
button.y = yy;
this._windowContentsSprite.addChild(button);
button.setClickHandler(this.onBack.bind(this));
button.setMouseExitHandler(this.onMouseExit.bind(this));
this._backButton = button;
};
Window_EroStatus.prototype.onBack = function () {
this._backClicked = true;
};
Window_EroStatus.prototype.isBackClicked = function () {
return this._backClicked;
};
Window_EroStatus.prototype.addMankoButton = function (x, y) {
var button1 = new Sprite_Button2("face", true);
button1.x = x;
button1.y = y;
this._windowContentsSprite.addChild(button1);
button1.setClickHandler(this.onFace.bind(this));
button1.setMouseExitHandler(this.onMouseExit.bind(this));
this._faceButton = button1;
var button2 = new Sprite_Button2("hoppe", true);
button2.x = x + 73;
button2.y = y;
this._windowContentsSprite.addChild(button2);
button2.setClickHandler(this.onHoppe.bind(this));
button2.setMouseExitHandler(this.onMouseExit.bind(this));
this._hoppeButton = button2;
var button3 = new Sprite_Button2("namida", true);
button3.x = x + 146;
button3.y = y;
this._windowContentsSprite.addChild(button3);
button3.setClickHandler(this.onNamida.bind(this));
button3.setMouseExitHandler(this.onMouseExit.bind(this));
this._namidaButton = button3;
};
Window_EroStatus.prototype.onMouseExit = function () {
this.deselectAllButtons();
};
Window_EroStatus.prototype.onFace = function () {
SoundManager.playOk();
this._faceButton.afterClick();
var faceId = this._actor.mankoFaceId();
var next = faceId + 1;
this._actor.setMankoFaceId(next);
if (this._mankoSprite.getFaceImage()) {
this._mankoSprite.refresh();
} else {
if (faceId != 1) {
this._actor.setMankoFaceId(1);
this._mankoSprite.refresh();
}
}
};
Window_EroStatus.prototype.onHoppe = function () {
SoundManager.playOk();
this._hoppeButton.afterClick();
var hoppeId = this._actor.mankoHoppeId();
var next = hoppeId + 1;
this._actor.setMankoHoppeId(next);
if (this._mankoSprite.getHoppeImage()) {
this._mankoSprite.refresh();
} else {
if (hoppeId != 0) {
this._actor.setMankoHoppeId(0);
this._mankoSprite.refresh();
}
}
};
Window_EroStatus.prototype.onNamida = function () {
SoundManager.playOk();
this._namidaButton.afterClick();
var namidaId = this._actor.mankoNamidaId();
var next = namidaId + 1;
this._actor.setMankoNamidaId(next);
if (this._mankoSprite.getNamidaImage()) {
this._mankoSprite.refresh();
} else {
if (namidaId != 0) {
this._actor.setMankoNamidaId(0);
this._mankoSprite.refresh();
}
}
};
Window_EroStatus.prototype.onKigae = function () {
SoundManager.playOk();
SceneManager.push(Nore.Scene_Kigae);
};
Window_EroStatus.prototype.drawNameLabel = function (x, y, actorId) {
var index = 0;
switch (actorId) {
case 10:
index = 1;
break;
case 11:
index = 2;
break;
case 9:
index = 3;
break;
case 4:
index = 4;
break;
case 13:
index = 5;
break;
case 17:
index = 6;
break;
}
var baseTexture = Nore.getSystemBaseTexture("name");
var rect = new Rectangle(0, index * 88, 247, 88);
if (ConfigManager.language != "jp") {
rect.x = 247;
}
var texture = new PIXI.Texture(baseTexture, rect);
var sprite = new PIXI.Sprite(texture);
sprite.x = x;
sprite.y = y;
this._actorLayer.addChild(sprite);
};
Window_EroStatus.prototype.drawLabel = function (x, y, index) {
var baseTexture = Nore.getSystemBaseTexture("status_label");
var rect = new Rectangle(0, index * 32, 32 * 5, 32);
if (ConfigManager.language != "jp") {
rect.x = 10 * 32;
}
var texture = new PIXI.Texture(baseTexture, rect);
var sprite = new PIXI.Sprite(texture);
sprite.x = x + 10;
sprite.y = y + 10;
this._windowContentsSprite.addChild(sprite);
};
Window_EroStatus.prototype.drawAvInfo = function (x, y) {
this.rsetTitleFont();
this.drawLabel(x - 130, y + 40, 3);
var list = [AvEroType.avCount, AvEroType.number];
var xx = x + 60;
var yy = y + 10;
this.resetNormalFont();
var actor = this._actor;
this.contents.fontSize = 22;
for (var _i = 0, list_1 = list; _i < list_1.length; _i++) {
var type = list_1[_i];
yy += this.lineHeight() + 6;
var paramTitle = getAvParamTitle(type);
this.drawText(paramTitle.label(), xx + 10, yy, 140, "left");
var value = actor.countAv(type);
var margin = 73;
this.drawText(
paramTitle.unit().format(value),
xx,
yy,
this._valueWidth + margin,
"right"
);
}
};
Window_EroStatus.prototype.addAvButton = function (x, y) {
var button = new Sprite_ButtonFocusable("av", true);
var left = x;
var yy = y;
button.x = left;
button.y = yy;
this._windowContentsSprite.addChild(button);
button.setClickHandler(this.onAvList.bind(this));
button.setMouseExitHandler(this.onMouseExit.bind(this));
this._avButton = button;
};
Window_EroStatus.prototype.onAvList = function () {
SceneManager.snapForBackground();
SoundManager.playOk();
SceneManager.push(Scene_SalesPage);
};
Window_EroStatus.prototype.drawAvList = function (x, y) {
var xx = x;
var yy = y + 7;
var actor = this._actor;
this.rsetTitleFont();
this.drawLabel(x - 22, 30, 0);
this.resetNormalFont();
var avList = $slg.avInfo().actorAvList(actor.actorId());
var av10List = [];
for (var i = 0; i < 10; i++) {
var av_1 = avList[avList.length - 1 - i];
if (!av_1) {
break;
}
if (!av_1.isShowResult()) {
continue;
}
av10List.push(av_1);
}
var count = 0;
for (var _i = 0, av10List_1 = av10List; _i < av10List_1.length; _i++) {
var av = av10List_1[_i];
if (av.avJacket()) {
var sprite = new Sprite_AvJacket(av.avJacket());
sprite.x = xx;
sprite.y = yy + 45;
this._windowContentsSprite.addChild(sprite);
sprite.refresh();
sprite.setHandler(this.onAv.bind(this, av));
}
this.drawText(
TextManager.avUnit.format(av.realSales()),
xx + 20,
yy + 240,
this._valueWidth,
"left"
);
xx += 157;
count++;
if (count >= 3) {
break;
}
}
};
Window_EroStatus.prototype.onAv = function (av) {
SceneManager.snapForBackground();
SoundManager.playOk();
$gameTemp.bigAv = av;
SceneManager.push(Nore.Scene_AvJacketBig);
};
Window_EroStatus.prototype.drawTextEx2 = function (text, x, y, width) {
this.contents.fontSize = 15;
var w = 0;
for (var _i = 0, text_1 = text; _i < text_1.length; _i++) {
var t = text_1[_i];
this.contents.drawText(t, x + w, y, 50, 50);
w += this.textWidth(t);
if (w > width) {
w = 0;
y += 22;
}
}
};
Window_EroStatus.prototype.drawBody = function (x, y) {
this.rsetTitleFont();
this.drawLabel(x - 20, 30, 2);
var list = Nore.$avParamManager.list();
var xx = x + 30;
var yy = y + 4;
this.resetNormalFont();
var actor = this._actor;
for (var _i = 0, list_2 = list; _i < list_2.length; _i++) {
var info = list_2[_i];
var type = info.type();
yy += this.lineHeight() + 11;
var paramTitle = getAvParamType(type);
this.drawText(paramTitle, xx + 15, yy, 50, "left");
var value = Math.floor(actor.eroParam(type) / 10);
this.drawText(value, xx - 30 + 18, yy, this._valueWidth - 60, "right");
var value2 = actor.eroParam(type) % 10;
this.drawText(
"." + value2,
xx - 40 + this._valueWidth - 30,
yy,
40,
"left"
);
}
};
Window_EroStatus.prototype.drawSyusan = function (x, y) {
this.rsetTitleFont();
var countTxt = "";
var syusanCount = this._actor.countSyusan();
if (syusanCount > 0) {
countTxt = TextManager.countUnit.format(syusanCount);
this.drawText(" " + countTxt, x, y, 120, "right");
} else {
countTxt = TextManager.syusanZero;
this.drawText(" " + countTxt, x + 30, y, 120, "left");
}
this.drawLabel(x - 10, 30, 1);
var babyList = [];
for (var _i = 0, _a = this._actor.babyList(); _i < _a.length; _i++) {
var b = _a[_i];
if (!b.isSyusan()) {
continue;
}
babyList.unshift(b);
}
this.resetNormalFont();
var xx = x;
var yy = y + 40;
var count = 0;
for (var _b = 0, babyList_2 = babyList; _b < babyList_2.length; _b++) {
var baby = babyList_2[_b];
if (count >= 7) {
break;
}
if (count == 6 && babyList.length != 7) {
this.drawText(
TextManager.syusanOther.format(babyList.length - 6),
xx + 50,
yy,
100,
"left"
);
yy += 36;
count++;
break;
}
if (baby.taneoyaId() == 41) {
this.drawIcon(646, xx + 8, yy);
} else {
var bitmap = ImageManager.loadCharacter(baby.babyImageId());
var imageW = 48;
var imageY = baby.growth() * imageW;
this.contents.blt(
bitmap,
imageW,
imageY,
imageW,
imageW,
xx,
yy - 8,
imageW,
imageW
);
}
this.drawText(baby.taneoyaName(), xx + 50, yy + 5, 100, "left");
yy += 36;
count++;
}
};
Window_EroStatus.prototype.lineHeight = function () {
return 26;
};
Window_EroStatus.prototype.resetNormalFont = function () {
this.changeTextColor(ColorManager.normalColor());
this.contents.fontSize = 18;
this.changePaintOpacity(true);
};
Window_EroStatus.prototype.rsetTitleFont = function () {
this.changeTextColor(ColorManager.normalColor());
this.contents.fontSize = 22;
this.changePaintOpacity(true);
};
Window_EroStatus.prototype.drawTachieImage = function (x, y) {
var a = this._actor;
var actor = JsonEx.makeDeepCopy(a);
/*if (actor.actorId() == 8) {
actor.setPoseId(3);
}*/
var acceHoppe = actor.getAcceHoppeId();
actor.setHoppeId(acceHoppe);
actor.setDefaultHoppeId(acceHoppe);
var s = this.drawTachieActor(
actor,
this._actorLayer,
x,
y,
null,
actor.getDefaultFaceId()
);
if (s) {
var filter3 = new PIXI.filters.GlowFilter({
distance: 4,
outerStrength: 2,
color: 0x000000,
quality: 0.7,
});
s.filters = [filter3];
}
};
Window_EroStatus.prototype.drawEroAbilityList = function (x, y) {
this.contents.fontSize = 18;
var interval = 39;
var a = this._actor;
this.drawLabel(x - 0, y - 6, 4);
var yy = y + 30;
this.drawEroAbility(
x,
yy,
MANKO_HENKEI_ID,
a.mankoHenkei100Value(),
a.mankoHenkeiLv()
);
this.drawEroAbility(
x,
yy + interval * 1,
MANKO_KURO_ID,
a.mankoKuro100Value(),
a.mankoKuroLv()
);
this.drawEroAbility(
x,
yy + interval * 2,
ANAL_GABA_ID,
a.analGaba100Value(),
a.analGabaLv()
);
this.drawEroAbility(
x,
yy + interval * 3,
CHIKUBI_KURO_ID,
a.chikubiKuro100Value(),
a.chikubiKuroLv()
);
var acceList = a.abilityAcceList();
yy = interval * 4 + y + 30 + 10;
for (var _i = 0, acceList_1 = acceList; _i < acceList_1.length; _i++) {
var acce = acceList_1[_i];
this.drawAcceAbility(x, yy, acce);
yy += interval - 5;
}
};
Window_EroStatus.prototype.drawEroAbility = function (
x,
y,
itemId,
value,
level
) {
this.changeTextColor(ColorManager.normalColor());
this.drawText(this.abilityName(itemId), x + 4, y + 4, 120, "left");
this.drawText(value, x, y + 4, 196, "right");
if (level.equipAcce) {
this.contents.fillRect(x + 140, y + 2, 32, 32, "#FF000033");
}
this.drawIcon(this.levelIcon(level.level), x + 140, y + 4);
};
Window_EroStatus.prototype.drawEroAbilityBack = function (x, y) {
var w = 130;
var h = 36;
this.contents.fillRect(x, y, w + 2, h + 2, "#22449955");
this.contents.fillRect(x + 1, y + 1, w, h, "#DDDDDD55");
};
Window_EroStatus.prototype.drawAcceAbility = function (x, y, acceId) {
var acce = $dataArmors[acceId];
this.drawEroAcceBack(x, y);
var name = acce.name;
if (ConfigManager.language != "jp") {
if (acce.meta["nameEn"]) {
name = acce.meta["nameEn"];
}
}
this.drawText(name, x + 4, y + 4, 116, "left");
};
Window_EroStatus.prototype.drawEroAcceBack = function (x, y) {
var bitmap = ImageManager.loadSystem("status_label");
this.contents.blt(bitmap, 32 * 5, 0, 32 * 4, 32, x, y + 1);
};
Window_EroStatus.prototype.levelIcon = function (level) {
switch (level) {
case 0:
return Icon.rankS;
case 1:
return Icon.rankA;
case 2:
return Icon.rankB;
case 3:
return Icon.rankC;
case 4:
return Icon.rankD;
case 5:
return Icon.rankE;
case 6:
return Icon.rankF;
case 7:
return Icon.rankG;
}
return Icon.rankS;
};
Window_EroStatus.prototype.abilityName = function (itemId) {
var item = $dataSkills[itemId];
switch (ConfigManager.language) {
case "en":
if (item.meta["nameEn"]) {
return item.meta["nameEn"];
}
break;
case "ch":
case "jp":
break;
}
return item.name;
};
Window_EroStatus.prototype.drawMankoImage = function (x, y) {
if (this._mankoSprite) {
this.removeChild(this._mankoSprite);
}
this._eroStatus = new EroStatus(this._actor.actorId());
var sprite = new Nore.MankoSprite(this._eroStatus);
this._windowContentsSprite.addChild(sprite);
sprite.x = x;
sprite.y = y;
this._mankoSprite = sprite;
var filter3 = new PIXI.filters.GlowFilter({
distance: 7,
outerStrength: 1,
color: 0x000000,
quality: 0.7,
});
this._mankoSprite.filters = [filter3];
this.drawRectGraphic(x - 1, y - 1, 301, 351);
this.drawMankoStatus(x, y);
sprite.setHandler(this.onManko.bind(this));
};
Window_EroStatus.prototype.onManko = function () {
this._mankoSprite.showAction(5);
switch (Math.randomInt(3)) {
case 0:
SoundManager.playEnemyAttack();
break;
case 1:
SoundManager.playBossCollapse1();
break;
case 2:
SoundManager.playBossCollapse2();
break;
}
};
Window_EroStatus.prototype.drawRectGraphic = function (x, y, w, h) {
var color = 0xffffff;
{
var g = new PIXI.Graphics();
g.beginFill(color, 1);
g.drawRect(0, 0, w, 1);
g.endFill();
g.x = x;
g.y = y;
this._windowContentsSprite.addChild(g);
}
{
var g = new PIXI.Graphics();
g.beginFill(color, 1);
g.drawRect(0, 0, w, 1);
g.endFill();
g.x = x;
g.y = y + h;
this._windowContentsSprite.addChild(g);
}
{
var g = new PIXI.Graphics();
g.beginFill(color, 1);
g.drawRect(0, 0, 1, h);
g.endFill();
g.x = x;
g.y = y;
this._windowContentsSprite.addChild(g);
}
{
var g = new PIXI.Graphics();
g.beginFill(color, 1);
g.drawRect(0, 0, 1, h);
g.endFill();
g.x = x + w;
g.y = y;
this._windowContentsSprite.addChild(g);
}
};
Window_EroStatus.prototype.drawMankoStatus = function (x, y) {
var analLv = this._actor.analGabaLv().level;
this.drawMankoStatusLeft(
x,
y + 260 + this.mankoOffsetY(),
EroType.nakadashi,
this.mankoText(),
EroParamDirection.top
);
this.drawMankoStatusLeft(
x,
y + 135,
EroType.syusan,
this.sikyuText(),
EroParamDirection.bottom
);
this.drawMankoStatusRight(
x,
y + 280 + this.analOffsetY(),
EroType.anal,
ANAL_TIGHTENING[analLv],
EroParamDirection.top
);
this.drawMankoStatusRight(
x,
y + 160 + this.acmeOffsetY(),
EroType.acme,
"",
EroParamDirection.bottom
);
if (this._actor.isFriends()) {
return;
}
var depravityLv = this._actor.depravityLv();
this.drawMankoStatusLeft(
x,
y + 20 + this.depravityOffsetY(),
EroType.depravity,
this.depravityText(depravityLv),
EroParamDirection.bottom
);
var reputationLv = this._actor.reputationLv();
this.drawMankoStatusRight(
x,
y + 20 + this.depravityOffsetY(),
EroType.reputation,
this.reputationText(reputationLv),
EroParamDirection.bottom
);
};
Window_EroStatus.prototype.sikyuText = function () {
var sikyuLv = this._actor.sikyuLv();
var text = SIKYU_TEXT[sikyuLv];
return text;
};
Window_EroStatus.prototype.mankoText = function () {
var mankoLv = this._actor.mankoHenkeiLv().level;
var text = CHITSU_TIGHTENING[mankoLv];
var kuroLv = this._actor.mankoKuroLv().level;
text += "\n";
text += MANKO_BLACKHEAD[kuroLv];
return text;
};
Window_EroStatus.prototype.depravityText = function (lv) {
switch (this._actor.actorId()) {
case 9:
return DEPRAVITY_NONOKA[lv];
case 4:
return DEPRAVITY_MARINA[lv];
case 13:
return DEPRAVITY_SAKI[lv];
case 17:
return DEPRAVITY_KOKONA[lv];
}
console.error("不正なactorIdです:" + this._actor.actorId());
return "";
};
Window_EroStatus.prototype.reputationText = function (lv) {
switch (this._actor.actorId()) {
case 9:
return REPUTATION_NONOKA[lv];
case 4:
return REPUTATION_MARINA[lv];
case 13:
return REPUTATION_SAKI[lv];
case 17:
return REPUTATION_KOKONA[lv];
}
console.error("不正なactorIdです:" + this._actor.actorId());
return "";
};
Window_EroStatus.prototype.drawMankoStatusLeft = function (
x,
y,
type,
text,
topBottom
) {
var xx = x - 193;
var eroParamSprite = new EroParamSpriteSet(
this._actor,
type,
y,
EroParamDirection.left,
topBottom
);
var texts = text.split("\n");
eroParamSprite.setTexts(texts);
eroParamSprite.x = xx;
this._windowContentsSprite.addChild(eroParamSprite);
//this.drawEroTexts(xx + 25, y, type, text);
};
Window_EroStatus.prototype.drawMankoStatusRight = function (
x,
y,
type,
text,
topBottom
) {
var xx = x + 306;
//this._windowContentsSprite.addChild(sprite);
var eroParamSprite = new EroParamSpriteSet(
this._actor,
type,
y,
EroParamDirection.right,
topBottom
);
var texts = text.split("\n");
eroParamSprite.setTexts(texts);
eroParamSprite.x = xx;
this._windowContentsSprite.addChild(eroParamSprite);
//this.drawEroTexts(xx + 149, y, type, text);
};
Window_EroStatus.prototype.depravityOffsetY = function () {
switch (this._actor.actorId()) {
case 13:
return 20;
case 17:
return 20;
}
return 0;
};
Window_EroStatus.prototype.acmeOffsetY = function () {
switch (this._actor.actorId()) {
case 4:
return 25;
case 8:
return -5;
case 9:
return 18;
case 11:
return 20;
case 13:
return 20;
case 17:
return 10;
}
return 0;
};
Window_EroStatus.prototype.mankoOffsetY = function () {
switch (this._actor.actorId()) {
case 8:
return -20;
case 9:
return -11;
case 10:
return -15;
case 11:
return -10;
case 13:
return -10;
case 17:
return -10;
}
return 0;
};
Window_EroStatus.prototype.analOffsetY = function () {
switch (this._actor.actorId()) {
case 8:
return -18;
case 10:
return -17;
case 17:
return -10;
}
return 0;
};
Window_EroStatus.prototype.drawEroTexts = function (x, y, type, text) {
this.contents.fontSize = 14;
var texts = [];
if (text) {
texts = text.split("\n").reverse();
}
var xx = x;
var yy = y - 32;
for (var _i = 0, texts_1 = texts; _i < texts_1.length; _i++) {
var t = texts_1[_i];
this.drawText(t, xx, yy, 180);
yy -= 19;
}
var paramTitle = getEroParamTitle(type);
var value = this._actor.countEro(type);
this.drawText(paramTitle.label(), xx, yy, 120, "left");
this.drawText(paramTitle.unit().format(value), xx, yy, 115, "right");
};
Window_EroStatus.prototype.playOkSound = function () {
if (this.index() == 5) {
// back button
return;
}
_super.prototype.playOkSound.call(this);
};
return Window_EroStatus;
})(Window_Selectable);
var EroParamDirection;
(function (EroParamDirection) {
EroParamDirection[(EroParamDirection["left"] = 0)] = "left";
EroParamDirection[(EroParamDirection["right"] = 1)] = "right";
EroParamDirection[(EroParamDirection["top"] = 2)] = "top";
EroParamDirection[(EroParamDirection["bottom"] = 3)] = "bottom";
})(EroParamDirection || (EroParamDirection = {}));
var EroParamSpriteSet = /** @class */ (function (_super) {
__extends(EroParamSpriteSet, _super);
function EroParamSpriteSet(actor, type, y, leftRight, topBottom) {
var _this = _super.call(this) || this;
_this._sprite = new EroParamSprite(actor, type);
_this.y = y;
_this.addLine(leftRight, topBottom);
_this.addChild(_this._sprite);
return _this;
}
EroParamSpriteSet.prototype.setTexts = function (texts) {
this._sprite.setTexts(texts);
};
EroParamSpriteSet.prototype.addLine = function (leftRight, topBottom) {
var baseTexture = Nore.getSystemBaseTexture("status_label");
var rect;
if (topBottom == EroParamDirection.bottom) {
rect = new Rectangle(0, 200, 180, 40);
} else {
rect = new Rectangle(0, 240, 180, 40);
}
var texture = new PIXI.Texture(baseTexture, rect);
var sprite = new PIXI.Sprite(texture);
if (leftRight == EroParamDirection.right) {
sprite.scale.x = -1;
sprite.x = 26;
} else {
sprite.x = 154;
}
if (topBottom == EroParamDirection.bottom) {
sprite.y = 70;
} else {
sprite.y = 39;
}
this.addChild(sprite);
};
return EroParamSpriteSet;
})(Sprite);
var EroParamSprite = /** @class */ (function (_super) {
__extends(EroParamSprite, _super);
function EroParamSprite(actor, type) {
var _this = _super.call(this) || this;
_this._yOffset = 0;
_this._actor = actor;
_this._type = type;
_this.bitmap = new Bitmap(340, 120);
_this.bitmap.outlineWidth = 5;
_this.bitmap.fontSize = 12;
return _this;
}
EroParamSprite.prototype.setTexts = function (texts) {
this._texts = texts;
this.refresh();
};
EroParamSprite.prototype.refresh = function () {
this.bitmap.clear();
this.refreshBack();
this.refreshText();
this.upadtePosition();
};
EroParamSprite.prototype.upadtePosition = function () {
this.y = this._yOffset;
};
EroParamSprite.prototype.refreshBack = function () {
var bitmap = ImageManager.loadSystem("status_label");
var rect;
if (this._texts.length <= 1) {
rect = this.back1Rect();
this._yOffset = 21;
} else if (this._texts.length <= 2) {
rect = this.back2Rect();
} else if (this._texts.length <= 3) {
rect = this.back3Rect();
this._yOffset = -20;
} else {
rect = this.back4Rect();
this._yOffset = -20;
}
this.bitmap.blt(bitmap, rect.x, rect.y, rect.width, rect.height, 0, 0);
};
EroParamSprite.prototype.back1Rect = function () {
return new Rectangle(0, 460, 220, 70);
};
EroParamSprite.prototype.back2Rect = function () {
return new Rectangle(0, 540, 220, 90);
};
EroParamSprite.prototype.back3Rect = function () {
return new Rectangle(0, 640, 220, 110);
};
EroParamSprite.prototype.back4Rect = function () {
return new Rectangle(224, 640, 220, 130);
};
EroParamSprite.prototype.refreshText = function () {
var xx = 14;
var yy = 4;
var interval = 16;
var paramTitle = getEroParamTitle(this._type);
var value = this._actor.countEro(this._type);
this.bitmap.drawText(paramTitle.label(), xx, yy, 120, 32, "left");
this.bitmap.drawText(
paramTitle.unit().format(value),
xx,
yy,
115,
32,
"right"
);
yy += interval + 5;
for (var _i = 0, _a = this._texts; _i < _a.length; _i++) {
var t = _a[_i];
this.bitmap.drawText(t, xx, yy, 180, 32);
yy += interval;
}
};
return EroParamSprite;
})(Sprite);
})(Nore || (Nore = {}));
var EroStatus = /** @class */ (function () {
function EroStatus(actorId) {
this._actorId = actorId;
this._costume = new CostumeSaver(this._actorId);
}
EroStatus.prototype.actor = function () {
return $gameActors.actor(this._actorId);
};
EroStatus.prototype.costume = function () {
return this._costume;
};
EroStatus.prototype.actorId = function () {
return this._actorId;
};
EroStatus.prototype.baseImageId = function () {
return 1;
};
EroStatus.prototype.boteId = function () {
return this._costume.boteId();
};
EroStatus.prototype.mankoImageId = function () {
return this.actor().mankoHenkeiLv().level;
};
EroStatus.prototype.mankoKuroImageAlpha = function () {
var level = this.actor().mankoKuroLv().level;
return level / 7;
};
EroStatus.prototype.chikubiKuroImageAlpha = function () {
return this.actor().chikubiKuroImageAlpha();
};
EroStatus.prototype.analImageId = function () {
var lv = this.actor().analGabaLv().level;
switch (lv) {
case 1:
case 2:
return 1;
case 3:
case 4:
return 2;
case 5:
return 3;
case 6:
return 4;
case 7:
return 5;
}
};
EroStatus.prototype.hasAcce = function (acceId) {
return this.actor().hasAcce(acceId);
};
EroStatus.prototype.faceId = function () {
return this.actor().mankoFaceId();
};
EroStatus.prototype.hoppeId = function () {
return this.actor().mankoHoppeId();
};
EroStatus.prototype.namidaId = function () {
return this.actor().mankoNamidaId();
};
EroStatus.prototype.kuchiId = function () {
return this.actor().mankoKuchiId();
};
EroStatus.prototype.mekakushiId = function () {
return this.actor().mankoMekakushiId();
};
EroStatus.prototype.isNoHightlight = function () {
return this.actor().isNoHightlight();
};
EroStatus.prototype.isBottomHightlight = function () {
return this.actor().isBottomHightlight();
};
EroStatus.prototype.outerId = function () {
return this.actor().outerId;
};
return EroStatus;
})();