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 Sprite_DouseiSet = /** @class */ (function (_super) { __extends(Sprite_DouseiSet, _super); function Sprite_DouseiSet() { var _this = _super.call(this) || this; _this._douseiLayer = new Sprite(); _this.addChild(_this._douseiLayer); _this.bitmap = new Bitmap(200, 60); _this.refresh(); _this.x = 880; _this.y = 50; return _this; } Sprite_DouseiSet.prototype.refresh = function () { this.refreshChildren(); if (this._douseiLayer.children.length > 0) { this.refreshTitle(); } }; Sprite_DouseiSet.prototype.refreshTitle = function () { this.bitmap.fillRect(0, 0, 200, 40, "#333333"); this.bitmap.drawText("同棲中の女の子たち", 0, 0, 200, 30); }; Sprite_DouseiSet.prototype.refreshChildren = function () { this._douseiLayer.removeChildren(); var index = 0; var top = 40; for (var _i = 0, _a = $gameParty.getActorIdList(); _i < _a.length; _i++) { var actorId = _a[_i]; var dousei = $gameActors.actor(actorId).dousei(); if (!dousei.isActive()) { continue; } p("dousei"); var s = new Sprite_Dousei(dousei, index); this._douseiLayer.addChild(s); index++; } }; Sprite_DouseiSet.prototype.update = function () { _super.prototype.update.call(this); this.updateVisible(); }; Sprite_DouseiSet.prototype.updateVisible = function () { if ($gameMap._interpreter.isRunning()) { this.visible = false; } else { this.visible = true; } }; return Sprite_DouseiSet; })(Sprite); var Sprite_Dousei = /** @class */ (function (_super) { __extends(Sprite_Dousei, _super); function Sprite_Dousei(dousei, yy) { var _this = _super.call(this) || this; _this._dousei = dousei; _this.y = yy; _this._eroSprite = new Sprite_DouseiH(dousei); _this.addChild(_this._eroSprite); _this.bitmap = new Bitmap(300, 129); _this._eroSprite.x = 0; _this._eroSprite.y = 26; _this._numberSprite = new Sprite(); _this.addChild(_this._numberSprite); _this.refresh(); return _this; } Sprite_Dousei.prototype.spriteHeight = function () { return 120; }; Sprite_Dousei.prototype.update = function () { _super.prototype.update.call(this); //this.updateGold(); if (this._dousei.isDirty()) { this._dousei.clearDirty(); this.refresh(); } if (this.isVisibleChanged()) { this.refresh(); } /*if (this.isRestChanged()) { this.refresh(); }*/ }; Sprite_Dousei.prototype.updateGold = function () { if (this._dousei.lastGainGold() > 0) { this.addGainGoldSprite(this._dousei.lastGainGold()); this._dousei.clearLastGainGold(); } }; Sprite_Dousei.prototype.addGainGoldSprite = function (g) { var s = new Sprite_GainGold(g); s.x = 122; s.y = 18; this.addChild(s); }; Sprite_Dousei.prototype.isVisibleChanged = function () { return this._lastVisible != this._eroSprite.visible; }; Sprite_Dousei.prototype.isRestChanged = function () { return this._lastRest != this._dousei.isRest(); }; Sprite_Dousei.prototype.refresh = function () { this._numberSprite.removeChildren(); this.bitmap.clear(); this.refreshBack(); this.refreshEroAnime(); this.refreshText(); this.refreshParams(); this._lastVisible = this._eroSprite.visible; }; Sprite_Dousei.prototype.refreshBack = function () { //this.bitmap.fillRect(0, 0, 200, 120, '#cccccc'); }; Sprite_Dousei.prototype.refreshParams = function () { if ($gameTemp.isIdleMode()) { return; } var upList = this._dousei.nextUpInfo(); if (!upList) { return; } if (this._dousei.isRest()) { return; } for (var _i = 0, upList_1 = upList; _i < upList_1.length; _i++) { var up = upList_1[_i]; this.drawNumber( this.upValueText1(up), 167, 87, 48, "right", 1, this._numberSprite ); this.drawNumber( this.upValueText2(up), 226, 87, 48, "right", 1, this._numberSprite ); this.drawIcon(up.iconIndex(), 152, 89); { var baseTexture = Nore.getSystemBaseTexture("main"); var r2 = new Rectangle(0, 74, 20, 20); var texture2 = new PIXI.Texture(baseTexture, r2); var s2 = new PIXI.Sprite(texture2); s2.x = 224; s2.y = 101; this._numberSprite.addChild(s2); } } }; Sprite_Dousei.prototype.upValueText1 = function (up) { var value = this._dousei.actor().eroParam(up.type); var text1 = Math.floor(value / 10); var text2 = value % 10; return text1 + "." + text2; }; Sprite_Dousei.prototype.upValueText2 = function (up) { var value = this._dousei.actor().eroParam(up.type); var value2 = value + up.up; var text1 = Math.floor(value2 / 10); var text2 = value2 % 10; return text1 + "." + text2; }; Sprite_Dousei.prototype.refreshEroAnime = function () { this._eroSprite.stop(); if (!this._dousei.isActive()) { this._eroSprite.visible = false; return; } if (this._dousei.manId() == 0) { return; } this._eroSprite.visible = true; switch (this._dousei.actorId()) { case 4: this.refreshActor4(); return; case 8: this.refreshActor8(); return; case 9: this.refreshActor9(); return; case 10: this.refreshActor10(); return; // カナミ case 11: this.refreshActor11(); return; // ミユ case 13: this.refreshActor13(); return; // サキ case 17: this.refreshActor17(); return; // ココナ } }; Sprite_Dousei.prototype.refreshText = function () { //this.bitmap.fillRect(0, 0, 200, 120, '#666666'); this.bitmap.fontSize = 14; //this.bitmap.drawText(this._dousei.name(), 154, 20, 190, 30); }; Sprite_Dousei.prototype.refreshActor4 = function () { var actor = $gameActors.actor(this._dousei.actorId()); var boteId = actor.boteId; switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.sex: this.refreshActor4Sex(boteId); break; case DouseiPlayId.chichi: this.refreshActor4Chichi(boteId); break; case DouseiPlayId.fela: this.refreshActor4Fela(); break; case DouseiPlayId.sm: this.refreshActor4Sm(boteId); break; case DouseiPlayId.kunni: this.refreshActor4Kunni(boteId); break; case DouseiPlayId.anal: this.refreshActor4Anal(boteId); break; } this.refreshActor4Sw(); }; Sprite_Dousei.prototype.refreshActor4Sw = function () { var base = 141; this.offActorSwicthes(base); var list = this.actor4SwList(base); var dice = 0; //Math.randomInt(list.length); $gameSwitches.setValue(list[dice], true); }; Sprite_Dousei.prototype.actor4SwList = function (base) { switch (this._dousei.currentDouseiValue()) { case Nore.DOUSEI_CHAR_VAR.sex: case Nore.DOUSEI_CHAR_VAR.gyaku: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.fela: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.sm: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.kunni: return [base, base + 2]; case Nore.DOUSEI_CHAR_VAR.chichi: return [base, base + 1, base + 2]; case Nore.DOUSEI_CHAR_VAR.kijoui: return [base]; default: return [base]; } }; Sprite_Dousei.prototype.refreshActor4Sex = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); if (this.isShota()) { this._eroSprite.setup(100, [4], 0, boteId); this._eroSprite.setupEroAnime("04_02", 200, EroSpeed.normal, 500); } else { this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("04_03", 200, EroSpeed.normal, 500); } }; Sprite_Dousei.prototype.refreshActor4Chichi = function (boteId) { this._eroSprite.setup(10, [], 0, boteId); this._eroSprite.setupBaseEroSprite("04_05", 10, []); this._eroSprite.setupEroSprite1(11, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor4Sm = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.back); this._eroSprite.setup(2000, [], 0, boteId); this._eroSprite.setupBaseEroSprite("04_02", 2000, []); this._eroSprite.setupEroSprite1(2001, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor4Fela = function () { this._eroSprite.setup(50, []); this._eroSprite.setupEroAnime("04_06", 50, EroSpeed.normal, 60); }; Sprite_Dousei.prototype.refreshActor4Anal = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.back); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("04_06", 200, EroSpeed.normal, 300); }; Sprite_Dousei.prototype.refreshActor4Kunni = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kunni); if (this.isShota()) { this._eroSprite.setup(100, [], 3, boteId); this._eroSprite.setupBaseEroSprite("04_11", 100, []); this._eroSprite.setupEroSprite1(101, []); this._eroSprite.update(); } else { this._eroSprite.setup(100, [], 1, boteId); this._eroSprite.setupBaseEroSprite("04_11", 100, []); this._eroSprite.setupEroSprite1(101, [], 2); this._eroSprite.update(); } }; Sprite_Dousei.prototype.refreshActor8 = function () { var actor = $gameActors.actor(this._dousei.actorId()); var boteId = actor.boteId; switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.sex: this.refreshActor8Sex(boteId); break; case DouseiPlayId.chichi: this.refreshActor8Chichi(boteId); break; case DouseiPlayId.fela: this.refreshActor8Fela(); break; case DouseiPlayId.sm: this.refreshActor8Sm(boteId); break; case DouseiPlayId.kunni: this.refreshActor8Kunni(boteId); break; case DouseiPlayId.anal: this.refreshActor8Anal(boteId); break; default: console.error(this._dousei.currentPlayItem().itemId()); } this.refreshActor8Sw(); }; Sprite_Dousei.prototype.refreshActor8Sw = function () { var base = 131; this.offActorSwicthes(base); var list = this.actor8SwList(base); var dice = Math.randomInt(list.length); $gameSwitches.setValue(list[dice], true); }; Sprite_Dousei.prototype.actor8SwList = function (base) { switch (this._dousei.currentDouseiValue()) { case Nore.DOUSEI_CHAR_VAR.sex: case Nore.DOUSEI_CHAR_VAR.gyaku: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.fela: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.sm: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.kunni: return [base, base + 2]; case Nore.DOUSEI_CHAR_VAR.chichi: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.kijoui: return [base]; default: return [base]; } }; Sprite_Dousei.prototype.refreshActor8Sex = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); if (this._dousei.manId() == 5) { this._eroSprite.setup(100, [5]); this._eroSprite.setupEroAnime("05_02", 200, EroSpeed.normal, 400); } else { this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("08_05", 100, EroSpeed.normal, 200); } }; Sprite_Dousei.prototype.refreshActor8Anal = function (boteId) { if (this._dousei.manId() == 5) { this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("05_03", 200, EroSpeed.normal, 400); } else { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("08_01", 200, EroSpeed.normal, 400); } }; Sprite_Dousei.prototype.refreshActor8Chichi = function (boteId) { this._eroSprite.setup(9, [], 0, boteId); this._eroSprite.setupBaseEroSprite("08_03", 101, []); this._eroSprite.setupEroSprite1(102, []); this._eroSprite.update(); return; if (this._dousei.manId() == 5) { this._eroSprite.setup(100, [5], 0, boteId); this._eroSprite.setupEroAnime("05_03", 200, EroSpeed.normal, 400); } else { this._eroSprite.stop(); } }; Sprite_Dousei.prototype.refreshActor8Fela = function () { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.fela); if (this._dousei.manId() == 5) { this._eroSprite.setup(10, [], 2); this._eroSprite.setupBaseEroSprite("08_06", 10, [4]); this._eroSprite.setupEroSprite1(11, []); this._eroSprite.update(); } else { this._eroSprite.setup(10, [], 1); this._eroSprite.setupBaseEroSprite("08_06", 10, [4]); this._eroSprite.setupEroSprite1(11, []); this._eroSprite.update(); } }; Sprite_Dousei.prototype.refreshActor8Kunni = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kunni); if (this._dousei.manId() == 5) { this._eroSprite.setup(1, [], 1, boteId); this._eroSprite.setupBaseEroSprite("08_04", 1, []); this._eroSprite.setupEroSprite1(2, []); this._eroSprite.update(); } else { this._eroSprite.setup(9, [], 1, boteId); this._eroSprite.setupBaseEroSprite("08_03", 20, [4]); this._eroSprite.setupEroSprite1(21, []); this._eroSprite.update(); } }; Sprite_Dousei.prototype.refreshActor8Sm = function (boteId) { this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("08_09", 100, EroSpeed.normal, 200); }; Sprite_Dousei.prototype.refreshActor9 = function () { var actor = $gameActors.actor(this._dousei.actorId()); var boteId = actor.boteId; switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.sex: this.refreshActor9Sex(boteId); break; case DouseiPlayId.fela: this.refreshActor9Fela(); break; case DouseiPlayId.sm: this.refreshActor9Sm(boteId); break; case DouseiPlayId.kunni: this.refreshActor9Kunni(); break; case DouseiPlayId.chichi: this.refreshActor9Chichi(boteId); break; case DouseiPlayId.anal: this.refreshActor9Anal(boteId); break; default: console.error(this._dousei.currentPlayItem().itemId()); } this.refreshActor9Sw(); }; Sprite_Dousei.prototype.refreshActor9Sw = function () { var base = 136; this.offActorSwicthes(base); var list = this.actor9SwList(base); var dice = 0; //Math.randomInt(list.length); $gameSwitches.setValue(list[dice], true); }; Sprite_Dousei.prototype.actor9SwList = function (base) { switch (this._dousei.currentDouseiValue()) { case Nore.DOUSEI_CHAR_VAR.sex: case Nore.DOUSEI_CHAR_VAR.gyaku: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.fela: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.sm: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.kunni: return [base, base + 2]; case Nore.DOUSEI_CHAR_VAR.chichi: return [base, base + 1, base + 2]; case Nore.DOUSEI_CHAR_VAR.kijoui: return [base]; default: return [base]; } }; Sprite_Dousei.prototype.refreshActor9Sex = function (boteId) { if (this.isShota()) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); this._eroSprite.setup(100, [5], 2, boteId); if (boteId > 0) { this._eroSprite.setupEroAnime("09_09", 300, EroSpeed.normal, 500); } else { this._eroSprite.setupEroAnime("09_09", 300, EroSpeed.normal, 500); } return; } var dice = Math.randomInt(2); switch (dice) { case 1: this.refreshActor9Sex1(boteId); break; default: this.refreshActor9Sex2(boteId); break; } }; Sprite_Dousei.prototype.refreshActor9Sex1 = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); this._eroSprite.setup(100, [5], 0, boteId); if (boteId > 0) { this._eroSprite.setupEroAnime("09_04", 800, EroSpeed.normal, 900); } else { this._eroSprite.setupEroAnime("09_04", 800, EroSpeed.normal, 900); } }; Sprite_Dousei.prototype.refreshActor9Sex2 = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kijoui); if (boteId > 0) { var ignoreList = [6, 7]; var actor = $gameActors.actor(this._dousei.actorId()); if (!actor.isKuroChikubi()) { ignoreList.push(3); } this._eroSprite.setup(100, ignoreList, 0, boteId, 2); this._eroSprite.setupEroAnime("09_06", 400, EroSpeed.normal, 600); } else { this._eroSprite.setup(100, [], 0, boteId, 2); this._eroSprite.setupEroAnime("09_06", 400, EroSpeed.normal, 600); } }; Sprite_Dousei.prototype.refreshActor9Fela = function () { this._eroSprite.setup(100, []); this._eroSprite.setupEroAnime("09_14", 100, EroSpeed.normal, 200); }; Sprite_Dousei.prototype.refreshActor9Sm = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.back); if (boteId > 0) { this._eroSprite.setup(1, [3, 4, 5], 0, boteId, 2); this._eroSprite.setupBaseEroSprite("09_02", 1, [3, 4, 5, 7]); this._eroSprite.setupEroSprite1(20, [3, 4, 5]); this._eroSprite.update(); } else { var type = this.animeTypeId(DouseiPlayId.sm, 2); if (type == 0) { this._eroSprite.setup(100, []); this._eroSprite.setupEroAnime("09_03", 100, EroSpeed.normal, 200); } else { this._eroSprite.setup(1, [3, 4, 5], 0, boteId, 2); this._eroSprite.setupBaseEroSprite("09_02", 1, [3, 4, 5, 7]); this._eroSprite.setupEroSprite1(20, [3, 4, 5]); this._eroSprite.update(); } } }; Sprite_Dousei.prototype.refreshActor9Kunni = function () { this._eroSprite.setup(20, []); this._eroSprite.setupBaseEroSprite("09_13", 21, []); this._eroSprite.setupEroSprite1(22, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor9Chichi = function (boteId) { this._eroSprite.setup(10, [], 0, boteId); this._eroSprite.setupBaseEroSprite("09_09", 10, [5]); this._eroSprite.setupEroSprite1(11, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor9Anal = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.back); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("09_16", 100, EroSpeed.normal, 200); }; Sprite_Dousei.prototype.refreshActor10 = function () { var actor = $gameActors.actor(this._dousei.actorId()); var boteId = actor.boteId; switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.sex: this.refreshActor10Sex(boteId); break; case DouseiPlayId.fela: this.refreshActor10Fela(boteId); break; case DouseiPlayId.sm: this.refreshActor10Sm(boteId); break; case DouseiPlayId.kunni: this.refreshActor10Kunni(boteId); break; case DouseiPlayId.chichi: this.refreshActor10Chichi(boteId); break; case DouseiPlayId.anal: this.refreshActor10Anal(boteId); break; default: console.error(this._dousei.currentPlayItem().itemId()); } this.refreshActor10Sw(); }; Sprite_Dousei.prototype.refreshActor10Sw = function () { var base = 126; this.offActorSwicthes(base); var list = this.actor10SwList(base); var dice = Math.randomInt(list.length); $gameSwitches.setValue(list[dice], true); }; Sprite_Dousei.prototype.actor10SwList = function (base) { switch (this._dousei.currentDouseiValue()) { case Nore.DOUSEI_CHAR_VAR.sex: case Nore.DOUSEI_CHAR_VAR.gyaku: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.fela: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.sm: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.kunni: return [base, base + 2]; case Nore.DOUSEI_CHAR_VAR.chichi: return [base, base + 1, base + 2]; case Nore.DOUSEI_CHAR_VAR.kijoui: return [base]; default: return [base]; } }; Sprite_Dousei.prototype.refreshActor10Sex = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); if (this._dousei.manId() != 3) { this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("010_03", 900, EroSpeed.normal, 800); } else { this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("010_06", 900, EroSpeed.normal, 800); } }; Sprite_Dousei.prototype.refreshActor10Fela = function (boteId) { if (this._dousei.manId() != 3 && this._dousei.manId() != 5) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.fela); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("010_10", 100, EroSpeed.normal, 200); } else { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.fela); this._eroSprite.setup(300, [], 0, boteId); this._eroSprite.setupEroAnime("010_10", 300, EroSpeed.normal, 400); } }; Sprite_Dousei.prototype.refreshActor10Chichi = function (boteId) { this._eroSprite.setup(10, [], 0, boteId); this._eroSprite.setupBaseEroSprite("010_08", 10, []); this._eroSprite.setupEroSprite1(11, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor10Sm = function (boteId) { this._eroSprite.setup(20, [], 0, boteId); this._eroSprite.setupBaseEroSprite("010_01", 20, []); this._eroSprite.setupEroSprite1(21, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor10Kunni = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kunni); if (this._dousei.manId() != 3 && this._dousei.manId() != 5) { this._eroSprite.setup(10, [], 9, boteId); this._eroSprite.setupBaseEroSprite("010_06", 12, []); this._eroSprite.setupEroSprite1(14, [], 10); this._eroSprite.update(); } else { this._eroSprite.setup(10, [], 2, boteId); this._eroSprite.setupBaseEroSprite("010_06", 12, []); this._eroSprite.setupEroSprite1(14, [], 6); this._eroSprite.update(); } }; Sprite_Dousei.prototype.refreshActor10Anal = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); this._eroSprite.setup(2000, [], 0, boteId); this._eroSprite.setupEroAnime("010_04", 2000, EroSpeed.normal, 2100); }; Sprite_Dousei.prototype.refreshActor11Sex = function (boteId) { var dice = Math.randomInt(2); if (dice == 0) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("011_02", 400, EroSpeed.normal, 800); } else { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kijoui); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("011_07", 400, EroSpeed.normal, 800); } }; Sprite_Dousei.prototype.refreshActor11 = function () { var actor = $gameActors.actor(this._dousei.actorId()); var boteId = actor.boteId; switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.sex: this.refreshActor11Sex(boteId); break; case DouseiPlayId.fela: this.refreshActor11Fela(boteId); break; case DouseiPlayId.sm: this.refreshActor11Sm(boteId); break; case DouseiPlayId.kunni: this.refreshActor11Kunni(boteId); break; case DouseiPlayId.chichi: this.refreshActor11Chichi(boteId); break; case DouseiPlayId.anal: this.refreshActor11Anal(boteId); break; default: console.error(this._dousei.currentPlayItem().itemId()); } this.refreshActor11Sw(); }; Sprite_Dousei.prototype.offActorSwicthes = function (start) { for (var i = 0; i < 5; i++) { $gameSwitches.setValue(start + i, false); } }; Sprite_Dousei.prototype.refreshActor11Sw = function () { var base = 121; this.offActorSwicthes(base); var list = this.actor11SwList(base); var dice = Math.randomInt(list.length); $gameSwitches.setValue(list[dice], true); }; Sprite_Dousei.prototype.actor11SwList = function (base) { switch (this._dousei.currentDouseiValue()) { case Nore.DOUSEI_CHAR_VAR.sex: case Nore.DOUSEI_CHAR_VAR.gyaku: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.fela: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.sm: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.kunni: return [base, base + 2]; case Nore.DOUSEI_CHAR_VAR.chichi: return [base, base + 1, base + 2]; case Nore.DOUSEI_CHAR_VAR.kijoui: return [base]; default: return [base]; } }; Sprite_Dousei.prototype.refreshActor11Fela = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.fela); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("011_09", 100, EroSpeed.normal, 200); }; Sprite_Dousei.prototype.refreshActor11Kunni = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kunni); this._eroSprite.setup(20, [], 0, boteId); this._eroSprite.setupBaseEroSprite("011_08", 20, []); this._eroSprite.setupEroSprite1(21, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor11Sm = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.back); this._eroSprite.setup(1, [], 0, boteId); this._eroSprite.setupBaseEroSprite("011_04", 1, [5]); this._eroSprite.setupEroSprite1(2, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor11Anal = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.back); this._eroSprite.setup(2000, [], 0, boteId); this._eroSprite.setupEroAnime("011_06", 200, EroSpeed.normal, 600); }; Sprite_Dousei.prototype.refreshActor11Chichi = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.chichi); this._eroSprite.setup(10, [], 0, boteId); this._eroSprite.setupBaseEroSprite("011_10", 10, []); this._eroSprite.setupEroSprite1(11, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor13 = function () { var actor = $gameActors.actor(this._dousei.actorId()); var boteId = actor.boteId; switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.sex: this.refreshActor13Sex(boteId); break; case DouseiPlayId.anal: this.refreshActor13Anal(boteId); break; case DouseiPlayId.sm: this.refreshActor13Sm(boteId); break; case DouseiPlayId.kunni: this.refreshActor13Kunni(); break; case DouseiPlayId.chichi: this.refreshActor13Chichi(boteId); break; case DouseiPlayId.fela: this.refreshActor13Fela(boteId); break; } this.refreshActor13Sw(); }; Sprite_Dousei.prototype.refreshActor13Sw = function () { var base = 146; this.offActorSwicthes(base); var list = this.actor13SwList(base); var dice = 0; //Math.randomInt(list.length); $gameSwitches.setValue(list[dice], true); }; Sprite_Dousei.prototype.actor13SwList = function (base) { switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.anal: return [base + 1]; } switch (this._dousei.currentDouseiValue()) { case Nore.DOUSEI_CHAR_VAR.sex: case Nore.DOUSEI_CHAR_VAR.gyaku: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.fela: return [base + 1]; case Nore.DOUSEI_CHAR_VAR.sm: return [base + 1]; case Nore.DOUSEI_CHAR_VAR.kunni: return [base, base + 2]; case Nore.DOUSEI_CHAR_VAR.chichi: return [base + 1]; case Nore.DOUSEI_CHAR_VAR.kijoui: return [base]; default: return [base]; } }; Sprite_Dousei.prototype.refreshActor13Fela = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.fela); this._eroSprite.setup(100, [], 0, boteId); this._eroSprite.setupEroAnime("013_02", 100, EroSpeed.normal, 300); }; Sprite_Dousei.prototype.refreshActor13Sex = function (boteId) { if (this.isShota()) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.back); this._eroSprite.setup(100, [], 2, boteId); this._eroSprite.setupEroAnime("013_04", 100, EroSpeed.normal, 700); } else { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); var dice = Math.randomInt(2); if (dice == 0) { this._eroSprite.setup(100, [], 1, boteId); this._eroSprite.setupEroAnime("013_04", 100, EroSpeed.normal, 700); } else { this._eroSprite.setup(100, [5], 0, boteId); this._eroSprite.setupEroAnime("013_01", 100, EroSpeed.normal, 700); } } }; Sprite_Dousei.prototype.isShota = function () { switch (this._dousei.manId()) { case 1: case 3: case 5: return true; } return false; }; Sprite_Dousei.prototype.refreshActor13Anal = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); this._eroSprite.setup(100, [5], 1, boteId); this._eroSprite.setupEroAnime("013_05", 100, EroSpeed.normal, 700); }; Sprite_Dousei.prototype.refreshActor13Sm = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.fela); var max = 2; if ($gameSwitches.value(1156)) { max++; } var dice = Math.randomInt(max); switch (dice) { case 0: this._eroSprite.setup(21, [], 0, boteId); this._eroSprite.setupBaseEroSprite("013_02", 31, [5]); this._eroSprite.setupEroSprite1(34, [5]); this._eroSprite.update(); break; case 1: this._eroSprite.setup(40, [], 0, boteId); this._eroSprite.setupBaseEroSprite("013_02", 40, [5]); this._eroSprite.setupEroSprite1(41, [5]); this._eroSprite.update(); break; case 2: this._eroSprite.setup(10, [], 0, boteId); this._eroSprite.setupBaseEroSprite("013_06", 10, [3, 5, 6, 8, 9]); this._eroSprite.setupEroSprite1(13, [3, 6, 8, 9]); this._eroSprite.update(); break; default: console.error("不正なダイスです:" + dice); } }; Sprite_Dousei.prototype.refreshActor13Kunni = function () { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kunni); this._eroSprite.setup(10, []); this._eroSprite.setupBaseEroSprite("013_13", 13, []); this._eroSprite.setupEroSprite1(20, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor13Chichi = function (boteId) { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.chichi); this._eroSprite.setup(2000, [], 0, boteId); this._eroSprite.setupBaseEroSprite("013_07", 2000, []); this._eroSprite.setupEroSprite1(2001, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor17 = function () { var actor = $gameActors.actor(this._dousei.actorId()); switch (this._dousei.currentPlayItem().itemId()) { case DouseiPlayId.sex: this.refreshActor17Sex(); break; case DouseiPlayId.anal: this.refreshActor17Anal(); break; case DouseiPlayId.kunni: this.refreshActor17Kunni(); break; case DouseiPlayId.sm: this.refreshActor17Sm(actor); break; case DouseiPlayId.chichi: this.refreshActor17Chichi(actor); break; case DouseiPlayId.fela: this.refreshActor17Fela(actor); break; } this.refreshActor17Sw(); }; Sprite_Dousei.prototype.refreshActor17Sw = function () { var base = 151; this.offActorSwicthes(base); var list = this.actor17SwList(base); var dice = 0; //Math.randomInt(list.length); $gameSwitches.setValue(list[dice], true); }; Sprite_Dousei.prototype.actor17SwList = function (base) { switch (this._dousei.currentDouseiValue()) { case Nore.DOUSEI_CHAR_VAR.sex: case Nore.DOUSEI_CHAR_VAR.gyaku: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.fela: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.sm: return [base, base + 1]; case Nore.DOUSEI_CHAR_VAR.kunni: return [base, base + 2]; case Nore.DOUSEI_CHAR_VAR.chichi: return [base, base + 1, base + 2]; case Nore.DOUSEI_CHAR_VAR.kijoui: return [base]; default: return [base]; } }; Sprite_Dousei.prototype.refreshActor17Sex = function () { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.gyaku); var dice = Math.randomInt(2); if (dice == 0) { if (this.isShota()) { this._eroSprite.setup(100, [], 1, 0); this._eroSprite.setupEroAnime("017_04", 100, EroSpeed.normal, 400); } else { this._eroSprite.setup(100, [], 0, this.boteId()); this._eroSprite.setupEroAnime("017_04", 100, EroSpeed.normal, 400); } } else { if (this.isShota()) { this._eroSprite.setup(100, [5, 7], 1, this.boteId()); this._eroSprite.setupEroAnime("017_02", 100, EroSpeed.normal, 400); } else { this._eroSprite.setup(100, [5, 7], 0, this.boteId()); this._eroSprite.setupEroAnime("017_02", 100, EroSpeed.normal, 400); } } }; Sprite_Dousei.prototype.refreshActor17Anal = function () { this._dousei.setDouseiValue(Nore.DOUSEI_CHAR_VAR.kijoui); this._eroSprite.setup(100, [7, 8], 0, this.boteId()); this._eroSprite.setupEroAnime("017_09", 100, EroSpeed.normal, 400); }; Sprite_Dousei.prototype.refreshActor17Kunni = function () { this._eroSprite.setup(20, [], 0, this.boteId()); this._eroSprite.setupBaseEroSprite("017_07", 20, []); this._eroSprite.setupEroSprite1(21, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor17Sm = function (actor) { var ignoreList = [5]; if (actor.isKuroChikubi()) { ignoreList = []; } this._eroSprite.setup(10, ignoreList, 0, actor.boteId); this._eroSprite.setupBaseEroSprite("017_03", 50, ignoreList); this._eroSprite.setupEroSprite1(51, ignoreList); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor17Fela = function (actor) { this._eroSprite.setup(60, [], 0, this.boteId()); this._eroSprite.setupBaseEroSprite("017_05", 60, []); this._eroSprite.setupEroSprite1(61, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.refreshActor17Chichi = function (actor) { this._eroSprite.setup(10, [], 0, this.boteId()); this._eroSprite.setupBaseEroSprite("017_12", 10, []); this._eroSprite.setupEroSprite1(11, []); this._eroSprite.update(); }; Sprite_Dousei.prototype.boteId = function () { return this._dousei.actor().boteId; }; Sprite_Dousei.prototype.animeTypeId = function (id, max) { this._animeTypeMap = this._animeTypeMap || {}; this._animeTypeMap[id] = this._animeTypeMap[id] || 0; this._animeTypeMap[id]++; return this._animeTypeMap[id] % max; }; return Sprite_Dousei; })(Sprite); var EroSpeed; (function (EroSpeed) { EroSpeed["normal"] = "normal"; EroSpeed["fast"] = "fast"; })(EroSpeed || (EroSpeed = {})); var DouseiAnimeType; (function (DouseiAnimeType) { DouseiAnimeType["anime"] = "anime"; DouseiAnimeType["sprite"] = "sprite"; })(DouseiAnimeType || (DouseiAnimeType = {})); var DouseiDrawType; (function (DouseiDrawType) { DouseiDrawType["anime"] = "anime"; DouseiDrawType["spriteBase"] = "apriteBase"; DouseiDrawType["sprite1"] = "aprite1"; DouseiDrawType["sprite2"] = "aprite2"; })(DouseiDrawType || (DouseiDrawType = {})); var Sprite_DouseiH = /** @class */ (function (_super) { __extends(Sprite_DouseiH, _super); function Sprite_DouseiH(dousei) { var _this = _super.call(this) || this; _this._isEroReverse = false; _this._boteId = 0; _this._manId = 0; _this._backId = 0; _this._baseManId = 0; _this._startWait = 0; _this._dousei = dousei; _this._renderTexture = PIXI.RenderTexture.create(147, 92); _this._sw11 = true; return _this; } Sprite_DouseiH.prototype.stop = function () { this._animeId = null; this._animeFiles = []; this._animeIndex = 0; this._loopCount = 0; this.removeChildren(); }; Sprite_DouseiH.prototype.maxLoopCount = function () { return 7; }; Sprite_DouseiH.prototype.setupEroAnime = function ( eroId, animeId, speed, finishAnimeId ) { this._eroId = eroId; this._animeId = animeId; this._finishAnimeId = finishAnimeId; this._animeIndex = 0; this._loopCount = 0; this._finish = false; this._waiting = false; this._animeFiles = []; this._startWait = 0; //Math.randomInt(10); this._type = DouseiAnimeType.anime; this._sw10 = false; if (animeId >= 100) { this._sw11 = true; } else { this._sw11 = false; } switch (speed) { case EroSpeed.normal: this._animeFiles = this.setupNormalAnime(); break; } this.update(); }; Sprite_DouseiH.prototype.setupBaseEroSprite = function ( eroId, animeId, ignoreIndexList ) { this._eroId = eroId; this._animeId = animeId; this._ignoreIndexSpriteBase = ignoreIndexList; this._finish = false; this._waiting = false; this._startWait = 0; this._type = DouseiAnimeType.sprite; this._isDrawBaseSprite = true; this._spriteWait = this.spriteAnimeWait(); this._sw10 = true; this._sw11 = false; }; Sprite_DouseiH.prototype.spriteAnimeWait = function () { return 90; }; Sprite_DouseiH.prototype.setupEroSprite1 = function ( animeId, ignoreIndexList, manId ) { if (manId === void 0) { manId = -1; } this._spriteAnimeId1 = animeId; this._ignoreIndexSpriteAnime1 = ignoreIndexList; this._spriteManId1 = manId; }; Sprite_DouseiH.prototype.setupEroSprite2 = function ( animeId, ignoreIndexList ) { this._spriteAnimeId2 = animeId; this._ignoreIndexSpriteAnime2 = ignoreIndexList; }; Sprite_DouseiH.prototype.setupFinish = function () { this._finish = true; var files = []; { var index = this._animeId; for (var i = 0; i < 5; i++) { files.push(this._eroId + "_" + (index + this.getEroIndex(i))); } } { var index2 = this._finishAnimeId; for (var i = 5; i < 10; i++) { files.push(this._eroId + "_" + (index2 + this.getEroIndex(i))); } } this._animeFiles = files; }; Sprite_DouseiH.prototype.setupNormalAnime = function () { var files = []; var index = this._animeId; for (var i = 0; i < 10; i++) { files.push(this._eroId + "_" + (index + this.getEroIndex(i))); } for (var i = 0; i < 10; i++) { for (var k = 0; k < 2; k++) { files.push(this._eroId + "_" + (index + this.getEroIndex(9 - i))); } } return files; }; Sprite_DouseiH.prototype.getEroIndex = function (i) { if (this._isEroReverse) { return 9 - i; } else { return i; } }; Sprite_DouseiH.prototype.setup = function ( eroBaseId, ignoreIndex, manId, boteId, backId ) { if (manId === void 0) { manId = 0; } if (boteId === void 0) { boteId = 0; } if (backId === void 0) { backId = 1; } this._eroBaseId = eroBaseId; this._ignoreIndex = ignoreIndex; this._manId = manId; this._baseManId = manId; this._boteId = boteId; this._backId = backId; }; Sprite_DouseiH.prototype.eroBaseId = function () { return this._eroBaseId; }; Sprite_DouseiH.prototype.isIgnoreIndex = function (index, drawType) { switch (drawType) { case DouseiDrawType.anime: return this._ignoreIndex.contains(index); case DouseiDrawType.spriteBase: return this._ignoreIndexSpriteBase.contains(index); case DouseiDrawType.sprite1: return this._ignoreIndexSpriteAnime1.contains(index); case DouseiDrawType.sprite2: return this._ignoreIndexSpriteAnime2.contains(index); } }; Sprite_DouseiH.prototype.update = function () { _super.prototype.update.call(this); //this.updateVisible(); if (this._type == DouseiAnimeType.anime) { if (this._waiting) { return; } if (this._startWait > 0) { this._startWait--; return; } } if (this._type == DouseiAnimeType.sprite) { this.updateEroSprite(); } else { this.updateEroAnime(); } }; Sprite_DouseiH.prototype.updateEroAnime = function () { if (this._animeId && this._animeFiles.length > 0) { this.drawEroAnime(); } }; Sprite_DouseiH.prototype.updateEroSprite = function () { if (!this._animeId) { return; } this._spriteWait--; if (this._spriteWait == 0) { this._spriteWait = this.spriteAnimeWait(); this._isDrawBaseSprite = !this._isDrawBaseSprite; } if (this._isDrawBaseSprite) { this._manId = this._baseManId; var file = this._eroId + "_" + this._animeId.padZero(2); this.drawEro(file, DouseiDrawType.spriteBase); } else { if (this._spriteManId1 > 0) { this._manId = this._spriteManId1; } else { this._manId = this._baseManId; } var file = this._eroId + "_" + this._spriteAnimeId1.padZero(2); this.drawEro(file, DouseiDrawType.sprite1); } }; Sprite_DouseiH.prototype.drawEroAnime = function () { var file = this._animeFiles[this._animeIndex]; this.drawEro(file, DouseiDrawType.anime); this._animeIndex++; if (this._animeIndex >= this._animeFiles.length) { if (this._finish) { this._waiting = true; return; } this._animeIndex = 0; this._loopCount++; if (this._loopCount >= this.maxLoopCount()) { this.setupFinish(); } } }; Sprite_DouseiH.prototype.drawEro = function (file, drawType) { var renderTexture = this._renderTexture; var s = new PIXI.Sprite(); var index = file.indexOf("_") == 2 ? 6 : 7; switch (1) { case 1: this.drawEro2(s, file.substring(0, index) + "back" + this._backId); break; } var max = 10; for (var i = 1; i <= max; i++) { var imageId = i.padZero(2); if (this.isIgnoreIndex(i, drawType)) { continue; } this.drawEro2(s, file + "_" + imageId, file, i); } //this.drawNakaRakugaki(s, file); var renderer = Graphics.app.renderer; renderer.render(s, renderTexture); var sprite = new PIXI.Sprite(renderTexture); this.removeChildren(); this._eroSprite = sprite; this.addChild(sprite); }; Sprite_DouseiH.prototype.drawEro2 = function (s, file, fileId, index) { var texture = this.selectEro2Texture(s, file, fileId, index); if (!texture) { return; } var sprite = new PIXI.Sprite(texture); if (texture.textureCacheIds.length > 0) { if (texture.textureCacheIds[0].includes("man")) { sprite.alpha = $gameSystem.manAlpha(); } } s.addChild(sprite); }; Sprite_DouseiH.prototype.selectEro2Texture = function ( s, file, fileId, index ) { var texture = this.selectTexture(s, file); if (texture) { return texture; } var eroBaseId = this.eroBaseId(); if (eroBaseId == 0) { return null; } if (!fileId) { return null; } var list = fileId.split("_"); var eroId = Math.trunc(list[2]); var animeId; if (this._sw10) { animeId = eroBaseId; } else { if (this._sw11) { animeId = eroBaseId + (eroId % 100); } else { animeId = eroBaseId + (eroId % 10); } } var baseFileId = list[0] + "_" + list[1] + "_" + animeId.padZero(2) + "_" + index.padZero(2); texture = this.selectTexture(s, baseFileId); if (texture) { return texture; } if (this._sw12) { var baseFileId4 = list[0] + "_" + list[1] + "_" + Math.floor(eroId / 10) * 10 + "_" + index.padZero(2); texture = this.selectTexture(s, baseFileId4); if (!texture) { return null; } } else { // ベースの index var animeId_1 = eroBaseId; var baseFileId2 = list[0] + "_" + list[1] + "_" + animeId_1.padZero(2) + "_" + index.padZero(2); texture = this.selectTexture(s, baseFileId2); if (texture) { return texture; } // 今の if (!this._sw11) { return null; } animeId_1 = Math.round(eroId / 100) * 100; var baseFileId3 = list[0] + "_" + list[1] + "_" + animeId_1.padZero(2) + "_" + index.padZero(2); texture = this.selectTexture(s, baseFileId3); if (!texture) { return null; } } return texture; }; Sprite_DouseiH.prototype.selectTexture = function (s, file) { var prefix = "av_"; var boteId = this._boteId; var manId = this._manId; if (manId > 0) { var manFile = file + "_man" + manId.padZero(2) + ".png"; if (boteId > 0) { var texture1_1 = PIXI.utils.TextureCache[ prefix + file + "_man" + manId.padZero(2) + "_bote" + boteId + ".png" ]; if (texture1_1) { return texture1_1; } var texture2 = PIXI.utils.TextureCache[ prefix + file + "_man" + manId.padZero(2) + "_bote" + ".png" ]; if (texture2) { return texture2; } } var texture1 = PIXI.utils.TextureCache[prefix + manFile]; if (texture1) { return texture1; } } if (boteId > 0) { var texture1 = PIXI.utils.TextureCache[prefix + file + "_bote" + boteId + ".png"]; if (texture1) { return texture1; } var texture2 = PIXI.utils.TextureCache[prefix + file + "_bote" + ".png"]; if (texture2) { return texture2; } } var texture = PIXI.utils.TextureCache[prefix + file + ".png"]; if (texture) { return texture; } return texture; }; return Sprite_DouseiH; })(Sprite);