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 SlgCommand; (function (SlgCommand) { SlgCommand["play"] = "play"; SlgCommand["stop"] = "stop"; SlgCommand["actor"] = "actor"; SlgCommand["facility"] = "facility"; SlgCommand["business"] = "business"; SlgCommand["study"] = "study"; SlgCommand["military"] = "military"; SlgCommand["invasion"] = "invasion"; SlgCommand["formation"] = "formation"; SlgCommand["decisiveBattle"] = "decisiveBattle"; SlgCommand["soupKichen"] = "soupKichen"; SlgCommand["option"] = "option"; SlgCommand["save"] = "save"; SlgCommand["character"] = "character"; SlgCommand["av"] = "av"; SlgCommand["kigae"] = "kigae"; SlgCommand["dousei"] = "dousei"; SlgCommand["status"] = "status"; SlgCommand["endRecording"] = "endRecording"; SlgCommand["none"] = "none"; })((SlgCommand = Nore.SlgCommand || (Nore.SlgCommand = {}))); Nore.TOP_Y = 43; var PAPA_VAR = 21; var PRICE_VAR = 22; Nore.BATTLE_ID_VAR = 23; var PAPA_SW = 41; Nore.VIDEO_ID_VAR = 24; var X_INTERVAL = 110; var Y_INTERVAL = 100; var Scene_Slg = /** @class */ (function (_super) { __extends(Scene_Slg, _super); function Scene_Slg() { var _this = (_super !== null && _super.apply(this, arguments)) || this; _this._waitEventList = []; return _this; } Scene_Slg.prototype.create = function () { $gameTemp.inSlg = true; this._backlogDisabled = true; _super.prototype.create.call(this); this.createBackground(); this.createPictures(); this.createWindowLayer(); this.createAllWindows(); this.createPictures2(); this.addChild(this._messageWindow); this.createCharacterWindow(); this.createFormationWindow(); this.createFacilityListWindow(); this.createCommandWindow(); this.createParameterWindow(); this.createMilitaryWindow(); this.createDecisiveBattleWindow(); this.createManListWindow(); this.setParentCommand(); this.createConfirmWindow(); this.onCommandChange(); this.createFadeSprite(); this.checkSlgInterpreter(); }; Scene_Slg.prototype.setParentCommand = function () { this._facilityListWindow.setParentCommandWindow(this._commandWindow); this._formationWindow.setParentCommandWindow(this._commandWindow); this._militaryWindow.setParentCommandWindow(this._commandWindow); this._charListWindow.setParentCommandWindow(this._commandWindow); this._decisiveBattleWindow.setParentCommandWindow(this._commandWindow); this._manCommandWindow.setParentCommandWindow(this._commandWindow); }; Scene_Slg.prototype.setFirstSelection = function () { var command = $gameTemp.lastCharCommand; if (!command) { return; } this._commandWindow.selectSymbol(command); this.onCharacterActivate(true); if ($gameParty.menuActor()) { this._charListWindow.selectActor($gameParty.menuActor().actorId()); } }; Scene_Slg.prototype.selectInitialSelection = function () {}; Scene_Slg.prototype.terminate = function () { $gameTemp.inSlg = false; $slg.setSlg(false); $slg.onSlgTerminate(); _super.prototype.terminate.call(this); //SceneManager.snapForBackground(); }; Scene_Slg.prototype.start = function () { _super.prototype.start.call(this); this._commandWindow.refresh(); this._commandWindow.select(0); this.setFirstSelection(); this._militaryWindow.refresh(); this._facilityListWindow.start(); this.update(); $slg.setSlg(true); }; Scene_Slg.prototype.updateBackLog = function () { if (this._backlogDisabled) { return; } if (!this._commandWindow.active) { return; } if ( Input.isTriggered(Nore.BackLog.backLogButton) || TouchInput.wheelY < 0 ) { this._windowBackLog = new Nore.BackLog.Window_BackLog(); SoundManager.playOk(); this.addChild(this._windowBackLog); } }; Scene_Slg.prototype.update = function () { _super.prototype.update.call(this); this.updateFade(); $gameScreen.update(); this.updateSlgEvent(); }; Scene_Slg.prototype.updateSlgEvent = function () { var isRunning = $slg.isInterpreterRunning(); //$slg.update(); if ($slg.isInterpreterRunning()) { return; } else { if (isRunning) { $slg.clearInterpreter(); this.finishScenario(); return; } } if (this.isInterpreterRunning()) { return; } if ($slg.isDirty()) { var slgScenario = $gameParty.nextSlgScenario(); if (slgScenario) { p("TimeEvent SlgScenario:" + slgScenario); this.playScenario(slgScenario); return; } var scenario = $gameParty.nextScenario(); if (scenario) { p("TimeEvent scenario:" + scenario); this.playScenario(scenario); return; } if ($gameParty.hasCommonEvent()) { this.popScene(); return; } } if ($slg.isDirty()) { this.refresh(); $gameParty.clearDirty(); } if (!this._interpreter) { this.updateEvent(); } }; Scene_Slg.prototype.updateFade = function () { this._fadeSprite.opacity = 255 - $gameScreen.brightness(); }; Scene_Slg.prototype.refresh = function () { this._topWindow.refresh(); this._formationWindow.refresh(); this._formationFilterWindow.refresh(); this._formationListWindow.refresh(); this._formationDetailWindow.refresh(); $slg.clearDirty(); var list = $slg.eventList(); if (list.length > 0) { var history_1 = list.shift(); if (history_1.status() == TanetsukeStatus.fertilize) { history_1.becomePregnant(); } else if (history_1.status() == TanetsukeStatus.syusan) { history_1.syusan(); } else if (history_1.status() == TanetsukeStatus.firstSex) { history_1.playSex(); } var event_1 = new SlgEvent(history_1); this.playScenario(event_1.eventName()); } }; Scene_Slg.prototype.createFadeSprite = function () { this._fadeSprite = new ScreenSprite(); this.addChild(this._fadeSprite); }; Scene_Slg.prototype.createWindowLayer = function () { this._windowLayer = new WindowLayer(); this._windowLayer.x = 0; this._windowLayer.y = 0; this.addChild(this._windowLayer); }; Scene_Slg.prototype.createConfirmWindow = function () { this._confirmWindow = new Nore.Window_Confirm(500); this._confirmWindow.setText("AV撮影を行いますか?"); this.addChild(this._confirmWindow); this._confirmWindow.visible = false; this._confirmWindow.setHandler("ok", this.onConfirmOk.bind(this)); this._confirmWindow.setHandler("cancel", this.onConfirmCancel.bind(this)); this._msgWindow = new Nore.Window_Msg(); this._msgWindow.setText("AV撮影を行いますか?"); this.addChild(this._msgWindow); this._msgWindow.visible = false; this._msgWindow.setHandler("ok", this.onConfirmCancel.bind(this)); this._msgWindow.setHandler("cancel", this.onConfirmCancel.bind(this)); }; Scene_Slg.prototype.startInitialScenario = function () {}; Scene_Slg.prototype.finishScenario = function () { var slgScenario = $gameParty.nextSlgScenario(); if (slgScenario) { this.playScenario(slgScenario); return; } var scenario = $gameParty.nextScenario(); if (scenario) { this.playScenario(scenario); return; } $gameTemp.inSlg = true; if (this._confirmBattle) { $gameVariables.setValue(Nore.BATTLE_ID_VAR, 1); this.popScene(); return; } if (this._showAvResult) { SceneManager.push(Scene_AvResult); return; } this.refresh(); this._commandWindow.refresh(); this._commandWindow.show(); this._facilityListWindow.select(-1); this._facilityListWindow.deactivate(); if ($gameTemp.selectBattle) { $gameTemp.selectBattle = false; this._commandWindow.selectSymbol(SlgCommand.invasion); this._commandWindow.deactivate(); this.onInvasion(); } else if ($gameTemp.selectFormation) { $gameTemp.selectFormation = false; this._commandWindow.selectSymbol(SlgCommand.formation); this._commandWindow.deactivate(); this.onFormation(); } else if ($gameTemp.menuIndex() >= 0) { this._commandWindow.select($gameTemp.menuIndex()); if ($gameTemp.lastSelection == SlgCommand.actor) { $gameTemp.lastSelection = null; this._commandWindow.deactivate(); } else if ($gameTemp.lastSelection == SlgCommand.character) { $gameTemp.lastSelection = null; this._commandWindow.deactivate(); this._charListWindow.selectActor($gameParty.menuActor().actorId()); this._charListWindow.activate(); } else { this._commandWindow.activate(); } } else { this._commandWindow.activate(); this._commandWindow.select(0); } $slg.setDirty(); }; Scene_Slg.prototype.updateEvent = function () { if (this._waitEventList.length > 0) { var event_2 = this._waitEventList.shift(); this.playScenario(event_2.eventName()); } }; Scene_Slg.prototype.playScenario = function (name) { this.beforePlayScenario(); _super.prototype.playScenario.call(this, name); }; Scene_Slg.prototype.playCommonEvent = function (commonId) { p("playCommonEvent:" + commonId); var commonEvent = $dataCommonEvents[commonId]; if (isNaN(commonId)) { console.error("コモンイベントが存在しません:"); return; } p(commonEvent.list); this.beforePlayScenario(); $slg._interpreter = new Game_Interpreter(); $slg._interpreter._list = []; $slg._interpreter._list.push({ code: 0, indent: 0, parameters: [] }); $slg._interpreter.setupChild(commonEvent.list, 0); }; Scene_Slg.prototype.beforePlayScenario = function () { $gameTemp.inSlg = false; this._commandWindow.hide(); this._facilityListWindow.hide(); this._facilityCommandWindow.hide(); this._formationWindow.hide(); this._formationListWindow.hide(); this._formationFilterWindow.hide(); this._formationListWindow.deactivate(); this._formationDetailWindow.hide(); this._charListWindow.hide(); this._charListWindow.deactivate(); this._militaryWindow.hide(); this._decisiveBattleWindow.hide(); this._manCommandWindow.hide(); this._manListWindow.hide(); this._soupKichenCommandWindow.hide(); this._soupKichenListWindow.hide(); this._manParamWindow.hide(); this._militaryWindow.deactivate(); }; Scene_Slg.prototype.checkSlgInterpreter = function () { if ($slg.isInterpreterRunning()) { this.beforePlayScenario(); } }; Scene_Slg.prototype.createBackground = function () { /*this._backgroundSprite = new Sprite(SceneManager.backgroundBitmap()); this.addChild(this._backgroundSprite); const dark = new PIXI.Graphics(); dark.beginFill(0x000000, 0.7); dark.drawRect(0, 0, Graphics.width, Graphics.height); dark.endFill(); this.addChild(dark); */ this._backgroundFilter = new PIXI.filters.BlurFilter(); this._backgroundSprite = new Sprite(); this._backgroundSprite.bitmap = SceneManager.backgroundBitmap(); this._backgroundSprite.filters = [this._backgroundFilter]; this.addChild(this._backgroundSprite); this.setBackgroundOpacity(42); }; Scene_Slg.prototype.setBackgroundOpacity = function (opacity) { this._backgroundSprite.opacity = opacity; }; Scene_Slg.prototype.createFacilityListWindow = function () { this._facilityListWindow = new Window_FacilityTree(); this.addChild(this._facilityListWindow); this._facilityListWindow.select(0); this._facilityListWindow.setHandler("ok", this.onFacilityOk.bind(this)); this._facilityListWindow.setHandler( "cancel", this.onFacilityCancel.bind(this) ); this._facilityListWindow.setHandler( "activate", this.onFacilityActivate.bind(this) ); this._facilityListWindow.deactivate(); this._facilityListWindow.select(-1); this._facilityCommandWindow = new Nore.Window_FacilityCommand(); this._facilityCommandWindow.setHandler( FacilityCommand.levelUp, this.onFacilityCommandLevelUp.bind(this) ); this._facilityCommandWindow.setHandler( "cancel", this.onFacilityCommandCancel.bind(this) ); this.addChild(this._facilityCommandWindow); this._facilityCommandWindow.activate(); this._facilityCommandWindow.select(0); }; Scene_Slg.prototype.createMilitaryWindow = function () { this._militaryWindow = new Nore.Window_Military(); this.addWindow(this._militaryWindow); this._militaryWindow.activate(); this._militaryWindow.setHandler("ok", this.onMilitary.bind(this)); this._militaryWindow.setHandler( "cancel", this.onMilitaryCancel.bind(this) ); this._militaryWindow.setHandler( "activate", this.onMilitaryActivate.bind(this) ); this._militaryWindow.deactivate(); this._militaryWindow.hide(); }; Scene_Slg.prototype.onMilitary = function () { this._confirmWindow.visible = true; this._confirmMilitary = true; this._confirmWindow.select(0); this._confirmWindow.setText(TextManager.confirmBattle); this._confirmWindow.activate(); }; Scene_Slg.prototype.createCharacterWindow = function () { this._charListWindow = new Window_CharacterList(); this.addChild(this._charListWindow); this._charListWindow.deactivate(); this._charListWindow.select(-1); this._charListWindow.setHandler("ok", this.onCharacterOk.bind(this)); this._charListWindow.setHandler( "cancel", this.onCharacterCancel.bind(this) ); this._charListWindow.setHandler( "activate", this.onCharacterActivate.bind(this) ); }; Scene_Slg.prototype.onCharacterCommand2 = function () { p(this._charListWindow.index()); if (this._charListWindow.index() < 0) { this._charListWindow.select(0); } this._charListWindow.activate(); }; Scene_Slg.prototype.onCharacterOk = function () { var actor = this._charListWindow.selectedActor(); $gameParty.setMenuActor(actor); $gameTemp.lastSelection = SlgCommand.character; var symbol = this._commandWindow.currentSymbol(); switch (symbol) { case SlgCommand.av: if (actor.dousei().isDouseiNinshin()) { this._msgWindow.setTexts([TextManager.avNg1, TextManager.avNg2]); this._msgWindow.visible = true; SoundManager.playBuzzer(); this._msgWindow.activate(); return; } if ($slg.hasLastSaleTimeGaugeEvent(actor.actorId())) { $gameParty.addCommonEvent(491, -1); return; } $gameTemp.lastCharCommand = SlgCommand.av; SceneManager.push(Scene_AvTree); return; case SlgCommand.kigae: $gameTemp.lastCharCommand = SlgCommand.kigae; SceneManager.push(Nore.Scene_Kigae); return; case SlgCommand.dousei: if (actor.dousei().isTaikenbanNg()) { this._msgWindow.setTexts([ TextManager.douseiTaikenbanNg, TextManager.douseiTaikenbanNg2, ]); this._msgWindow.visible = true; SoundManager.playBuzzer(); this._msgWindow.activate(); return; } $gameTemp.lastCharCommand = SlgCommand.dousei; SceneManager.push(Nore.Scene_Dousei); return; case SlgCommand.status: $gameTemp.lastCharCommand = SlgCommand.status; $gameTemp.lastSelectedEroStatusIndex = 0; SceneManager.push(Nore.Scene_EroStatus); return; } }; Scene_Slg.prototype.onCharacterCancel = function () { this._charListWindow.select(-1); this._charListWindow.deactivate(); this._commandWindow.activate(); }; Scene_Slg.prototype.createFormationWindow = function () { this._formationWindow = new Nore.Window_Formation(); this.addWindow(this._formationWindow); this._formationWindow.deactivate(); this._formationWindow.select(0); this._formationWindow.setHandler("ok", this.onFormationSelect.bind(this)); this._formationWindow.setHandler( "cancel", this.onFormationCancel.bind(this) ); this._formationWindow.setHandler( "change", this.onFormationChange.bind(this) ); this._formationWindow.setHandler("pageup", this.onPageup.bind(this)); this._formationWindow.setHandler("pagedown", this.onPagedown.bind(this)); this._formationWindow.setHandler( "tab", this.onFormationLevelUp.bind(this) ); this._formationWindow.setHandler( "activate", this.onFormationActivate.bind(this) ); this._formationListWindow = new Nore.Window_FormationList(); this.addWindow(this._formationListWindow); this._formationListWindow.deactivate(); this._formationListWindow.select(0); this._formationListWindow.setHandler( "ok", this.onFormationListOk.bind(this) ); this._formationListWindow.setHandler( "cancel", this.onFormationListCancel.bind(this) ); this._formationListWindow.setHandler( "change", this.onFormationListChange.bind(this) ); this._formationFilterWindow = new Nore.Window_FormationFilter(); this.addWindow(this._formationFilterWindow); this._formationDetailWindow = new Nore.Window_FormationDetail(); this.addWindow(this._formationDetailWindow); this._formationDetailWindow.deactivate(); this._formationLevelUpWindow = new Nore.Window_FormationLevelUp(); this.addWindow(this._formationLevelUpWindow); this._formationLevelUpWindow.deactivate(); this._formationDetailWindow.setLevelUpWindow( this._formationLevelUpWindow ); this._formationDetailWindow.setListWindow(this._formationListWindow); this._formationDetailWindow.setFormationWindow(this._formationWindow); this._formationLevelUpWindow.hide(); }; Scene_Slg.prototype.onFormationLevelUp = function () { this._formationDetailWindow.onLevelUp(); }; Scene_Slg.prototype.onPageup = function () { this._formationWindow.pageup(); }; Scene_Slg.prototype.onPagedown = function () { this._formationWindow.pagedown(); }; Scene_Slg.prototype.onFormationSelect = function () { this._formationListWindow.activate(); }; Scene_Slg.prototype.onFormationChange = function () { if (!this._formationWindow.visible) { return; } var actor = this._formationWindow.selectedActor(); this._formationDetailWindow.setup(actor); this._commandWindow.deactivate(); this._formationWindow.refreshLabel(); }; Scene_Slg.prototype.onFormationListChange = function () { var actor = this._formationListWindow.selectedActor(); this._formationDetailWindow.setup(actor); }; Scene_Slg.prototype.onFormationCancel = function () { this._commandWindow.activate(); }; Scene_Slg.prototype.onFormationListOk = function () { var actor = this._formationListWindow.selectedActor(); if ($slg.formation().isBattleMamber(actor)) { SoundManager.playBuzzer(); this._formationWindow.activate(); return; } this._formationWindow.setBattleActor(actor); this._formationWindow.activate(); this._formationListWindow.refresh(); }; Scene_Slg.prototype.onFormationListCancel = function () { this._formationWindow.activate(); }; Scene_Slg.prototype.createDecisiveBattleWindow = function () { this._decisiveBattleWindow = new Nore.Window_DecisiveBattle(); this.addWindow(this._decisiveBattleWindow); this._decisiveBattleWindow.hide(); this._decisiveBattleWindow.setHandler( "ok", this.onDecisiveBattleOk.bind(this) ); this._decisiveBattleWindow.setHandler( "cancel", this.onDecisiveBattleCancel.bind(this) ); this._decisiveBattleWindow.setHandler( "activate", this.onDecisiveBattleActivate.bind(this) ); }; Scene_Slg.prototype.createManListWindow = function () { var av = new Av(1, 1); this._manParamWindow = new Nore.Window_AvManParams(av, 372); this._manParamWindow.y = Nore.TOP_Y; this.addWindow(this._manParamWindow); this._manParamWindow.hide(); this._manCommandWindow = new Window_ManCommand(); this.addWindow(this._manCommandWindow); this._manCommandWindow.select(0); this._manCommandWindow.hide(); this._manCommandWindow.deactivate(); this._manCommandWindow.setHandler("change", this.onManChange.bind(this)); this._manCommandWindow.setHandler("ok", this.onManOk.bind(this)); this._manCommandWindow.setHandler("cancel", this.onManCancel.bind(this)); this._manListWindow = new Window_ManList(); this._manListWindow.setHandler("cancel", this.onManListCancel.bind(this)); this.addWindow(this._manListWindow); this._manListWindow.hide(); this._manListWindow.deactivate(); this._manInfoWindow = new Window_ManInfo(); this.addWindow(this._manInfoWindow); this._manInfoWindow.hide(); this._manParamWindow.x = this._manInfoWindow.x; this._manListWindow.setManInfoWindow(this._manInfoWindow); this._manListWindow.setManParamWindow(this._manParamWindow); this._soupKichenListWindow = new Window_SoupKichenList(); this.addWindow(this._soupKichenListWindow); this._soupKichenListWindow.select(0); this._soupKichenListWindow.hide(); this._soupKichenListWindow.setManParamWindow(this._manParamWindow); this._soupKichenListWindow.setHandler( "ok", this.onSoupKichenOk.bind(this) ); this._soupKichenListWindow.setHandler( "cancel", this.onSoupKichenCancel.bind(this) ); this._soupKichenListWindow.setHandler( "change", this.onSoupKichenChange.bind(this) ); this._soupKichenListWindow.setHandler( "change", this.onSoupKichenChange.bind(this) ); this._soupKichenListWindow.setHandler( "activate", this.onManActivate.bind(this) ); this._soupKichenCommandWindow = new Window_SoupKichenCommand(); this.addWindow(this._soupKichenCommandWindow); this._soupKichenCommandWindow.select(0); this._soupKichenCommandWindow.hide(); this._soupKichenCommandWindow.setHandler( SoupKichenCommand.hire, this.onManHireOk.bind(this) ); this._soupKichenCommandWindow.setHandler( SoupKichenCommand.cancel, this.onManHireCancel.bind(this) ); }; Scene_Slg.prototype.onManOk = function () { if (this._manCommandWindow.index() == 0) { this._manListWindow.activate(); } else { this._soupKichenListWindow.activate(); } }; Scene_Slg.prototype.onManCancel = function () { this._commandWindow.activate(); }; Scene_Slg.prototype.onManListCancel = function () { this._manCommandWindow.activate(); }; Scene_Slg.prototype.onManChange = function () { this.updateManCommandList(); }; Scene_Slg.prototype.onSoupKichenChange = function () { var man = this._soupKichenListWindow.selectedMan(); if (!man) { this._manParamWindow.hide(); return; } this._manParamWindow.setMan(man.actor()); }; Scene_Slg.prototype.onManHireOk = function () { this._soupKichenCommandWindow.hire(); this._soupKichenCommandWindow.hide(); this._soupKichenListWindow.makeData(); this._soupKichenListWindow.refresh(); this._soupKichenListWindow.show(); this._soupKichenListWindow.activate(); this._manListWindow.makeData(); this._manListWindow.refresh(); }; Scene_Slg.prototype.onManHireCancel = function () { this._soupKichenCommandWindow.hide(); this._soupKichenListWindow.show(); this._soupKichenListWindow.activate(); }; Scene_Slg.prototype.onSoupKichenOk = function () { var man = this._soupKichenListWindow.selectedMan(); this._soupKichenCommandWindow.setMan(man); this._soupKichenCommandWindow.select(0); this._soupKichenCommandWindow.activate(); this._soupKichenCommandWindow.show(); }; Scene_Slg.prototype.onSoupKichenCancel = function () { this._manParamWindow.hide(); this._manCommandWindow.activate(); }; Scene_Slg.prototype.createPictures = function () { var width = Graphics.width; var height = Graphics.height; var x = (Graphics.width - width) / 2; var y = (Graphics.height - height) / 2; this._pictureContainer = new Sprite(); this._pictureContainer.setFrame(x, y, width, height); for (var i = 0; i < 10; i++) { this._pictureContainer.addChild(new Sprite_Picture(i)); } this.addChild(this._pictureContainer); }; Scene_Slg.prototype.createPictures2 = function () { var width = Graphics.width; var height = Graphics.height; var x = (Graphics.width - width) / 2; var y = (Graphics.height - height) / 2; this._pictureContainer2 = new Sprite(); this._pictureContainer2.setFrame(x, y, width, height); for (var i = 10; i <= $gameScreen.maxPictures() - 1; i++) { this._pictureContainer2.addChild(new Sprite_Picture(i)); } this.addChild(this._pictureContainer2); }; Scene_Slg.prototype.createParameterWindow = function () { this._topWindow = new Nore.Window_Top(true); this._topWindow.hideTimeGauge(); this.addChild(this._topWindow); this._topWindow.update(); }; Scene_Slg.prototype.createCommandWindow = function () { this._commandWindow = new Nore.Window_SlgCommand(); this.addChild(this._commandWindow); this._commandWindow.setHandler( SlgCommand.invasion, this.onInvasion.bind(this) ); this._commandWindow.setHandler( SlgCommand.option, this.onOption.bind(this) ); this._commandWindow.setHandler(SlgCommand.save, this.onSave.bind(this)); this._commandWindow.setHandler( SlgCommand.facility, this.onFacility.bind(this) ); this._commandWindow.setHandler( SlgCommand.formation, this.onFormation.bind(this) ); this._commandWindow.setHandler( SlgCommand.decisiveBattle, this.onDecisiveBattle.bind(this) ); this._commandWindow.setHandler( SlgCommand.soupKichen, this.onSoupKichen.bind(this) ); this._commandWindow.setHandler( SlgCommand.av, this.onCharacterAv.bind(this) ); this._commandWindow.setHandler( SlgCommand.kigae, this.onCharacterKigae.bind(this) ); this._commandWindow.setHandler( SlgCommand.dousei, this.onCharacterDousei.bind(this) ); this._commandWindow.setHandler( SlgCommand.status, this.onCharacterStatus.bind(this) ); this._commandWindow.setHandler( SlgCommand.endRecording, this.onEndRecording.bind(this) ); this._commandWindow.setHandler("cancel", this.onCommandCancel.bind(this)); this._commandWindow.setHandler("change", this.onCommandChange.bind(this)); }; Scene_Slg.prototype.onEndRecording = function () {}; Scene_Slg.prototype.selectCharacterList = function () { if (this._charListWindow.index() < 0) { this._charListWindow.select(0); } this._charListWindow.activate(); }; Scene_Slg.prototype.onCharacterActivate = function (noSe) { if (noSe === void 0) { noSe = false; } TouchInput.clear(); if (!noSe) { SoundManager.playOk(); } this._commandWindow.deactivate(); switch (this._commandWindow.currentSymbol()) { case SlgCommand.av: this.onCharacterAv(); return; case SlgCommand.kigae: this.onCharacterKigae(); return; case SlgCommand.dousei: this.onCharacterDousei(); return; case SlgCommand.status: this.onCharacterStatus(); return; } this._commandWindow.activate(); }; Scene_Slg.prototype.onCharacterAv = function () { this._charListWindow.setSlgType(SlgCommand.av); this.selectCharacterList(); }; Scene_Slg.prototype.onCharacterKigae = function () { this._charListWindow.setSlgType(SlgCommand.kigae); this.selectCharacterList(); }; Scene_Slg.prototype.onCharacterDousei = function () { this._charListWindow.setSlgType(SlgCommand.dousei); this.selectCharacterList(); }; Scene_Slg.prototype.onCharacterStatus = function () { this._charListWindow.setSlgType(SlgCommand.status); this.selectCharacterList(); }; Scene_Slg.prototype.onRest = function () { this._commandWindow.activate(); }; Scene_Slg.prototype.onManActivate = function () { TouchInput.clear(); SoundManager.playOk(); this._commandWindow.deactivate(); this.onSoupKichen(); }; Scene_Slg.prototype.updateManCommandList = function () { if (this._manCommandWindow.index() == 0) { this._manListWindow.show(); this._soupKichenListWindow.hide(); this._manInfoWindow.show(); this._manParamWindow.show(); this._manListWindow.reselect(); } else { this._manListWindow.hide(); if ($slg.manInfo().soupKichen().isEmptyOrDisabled()) { this._manParamWindow.hide(); } else { this._manParamWindow.show(); } this._soupKichenListWindow.show(); this._manInfoWindow.hide(); } }; Scene_Slg.prototype.onSoupKichen = function () { //this._manParamWindow.show(); this._manCommandWindow.activate(); }; Scene_Slg.prototype.onFacilityOk = function () { var f = this._facilityListWindow.selectedFacility(); if (f.isTaikenbanNg()) { this._facilityListWindow.activate(); SoundManager.playBuzzer(); return; } if ($slg.facilityInfo().hasFacility(f.itemId())) { this._facilityListWindow.activate(); return; } var x = this._facilityListWindow.commandX(); var y = this._facilityListWindow.commandY(); var facility = new Facility(f.itemId(), f.level()); if (facility.level() == facility.maxLevel()) { this._facilityListWindow.activate(); SoundManager.playBuzzer(); return; } this._facilityCommandWindow.x = x; this._facilityCommandWindow.y = y; this._facilityCommandWindow.setFacility(facility); this._facilityCommandWindow.show(); this._facilityCommandWindow.activate(); }; Scene_Slg.prototype.onFacilityCancel = function () { this._facilityListWindow.select(-1); this._commandWindow.activate(); }; Scene_Slg.prototype.onFacilityCommandCancel = function () { this._facilityListWindow.activate(); this._facilityCommandWindow.hide(); }; Scene_Slg.prototype.onFacilityCommandLevelUp = function () { var facility = this._facilityListWindow.selectedFacility().facility(); if (facility.price() > $gameParty.gold()) { SoundManager.playBuzzer(); this._facilityCommandWindow.activate(); return; } this._facilityCommandWindow.hide(); $gameParty.loseGold(facility.price()); SoundManager.playShop(); var e = new FacilityTimeGaugeEvent( facility.constructionTime(), facility.itemId(), facility.level() ); $slg.addTimeGaugeEvent(e); //$slg.facilityInfo().levelUp(facility); this._facilityListWindow.refresh(); this._facilityListWindow.activate(); this._facilityListWindow.select(0); }; // military Scene_Slg.prototype.onMilitaryCancel = function () { this._militaryWindow.select(-1); this._commandWindow.activate(); }; Scene_Slg.prototype.onFormationActivate = function () { TouchInput.clear(); SoundManager.playOk(); this._commandWindow.deactivate(); this.onFormation(); }; Scene_Slg.prototype.onFormation = function () { this._formationWindow.activate(); this._formationWindow.select(0); }; Scene_Slg.prototype.popScene = function () { $gameTemp.lastCharCommand = null; _super.prototype.popScene.call(this); }; Scene_Slg.prototype.onConfirmOk = function () { if (this._confirmMilitary) { var reserveCommon = this._militaryWindow.decide(); if (reserveCommon < 0) { this.popScene(); $gameTemp.reserveCommonEvent(141); } else { // マリナとの戦闘前 if (reserveCommon == 237) { // 左のメニュー非表示 $gameSwitches.setValue(17, false); $gameSwitches.setValue(42, true); } } } else if (this._confirmDecisiveBattle) { this.onFinishDecisiveBattle(); } else { } }; Scene_Slg.prototype.onConfirmCancel = function () { this._confirmWindow.visible = false; this._msgWindow.visible = false; if (this._confirmMilitary) { this._militaryWindow.activate(); } else if (this._confirmDecisiveBattle) { this._commandWindow.activate(); } else { this._charListWindow.activate(); } this._confirmMilitary = false; }; Scene_Slg.prototype.onMilitaryActivate = function () { TouchInput.clear(); SoundManager.playOk(); this._commandWindow.deactivate(); this.onInvasion(); }; Scene_Slg.prototype.onInvasion = function () { this._militaryWindow.show(); this._militaryWindow.activate(); }; Scene_Slg.prototype.onFacilityActivate = function () { TouchInput.clear(); this._commandWindow.deactivate(); SoundManager.playOk(); this.onFacility(); }; Scene_Slg.prototype.onFacility = function () { this._facilityListWindow.show(); this._facilityListWindow.activate(); this._facilityListWindow.select(0); }; Scene_Slg.prototype.onOption = function () { $gameTemp.lastCharCommand = null; SceneManager.push(Scene_Options); }; Scene_Slg.prototype.onSave = function () { $gameTemp.lastCharCommand = SlgCommand.save; SceneManager.push(Scene_Save); }; Scene_Slg.prototype.onCommandCancel = function () { this.popScene(); }; Scene_Slg.prototype.onCommandChange = function () { var symbol = this._commandWindow.currentSymbol(); if (this._interpreter) { return; } $gameTemp.setMenuIndex(this._commandWindow.index()); this._facilityListWindow.hide(); this._militaryWindow.hide(); this._charListWindow.hide(); this._formationWindow.hide(); this._formationFilterWindow.hide(); this._formationListWindow.hide(); this._formationDetailWindow.hide(); this._decisiveBattleWindow.hide(); this._soupKichenListWindow.hide(); this._manInfoWindow.hide(); this._manCommandWindow.hide(); this._manListWindow.hide(); this._manParamWindow.hide(); switch (symbol) { case SlgCommand.facility: this._facilityListWindow.show(); break; case SlgCommand.invasion: this._militaryWindow.show(); break; case SlgCommand.formation: this._formationWindow.show(); this._formationFilterWindow.show(); this._formationListWindow.show(); break; case SlgCommand.character: case SlgCommand.av: case SlgCommand.kigae: case SlgCommand.dousei: case SlgCommand.status: this._charListWindow.show(); break; case SlgCommand.decisiveBattle: this._decisiveBattleWindow.refresh(); this._decisiveBattleWindow.show(); break; case SlgCommand.soupKichen: this._soupKichenListWindow.refresh(); this._manCommandWindow.show(); this.updateManCommandList(); //this._soupKichenListWindow.show(); break; } }; Scene_Slg.prototype.onDecisiveBattleActivate = function () { TouchInput.clear(); SoundManager.playOk(); this._commandWindow.deactivate(); this.onDecisiveBattle(); }; Scene_Slg.prototype.onDecisiveBattle = function () { this._confirmDecisiveBattle = true; var canExecute = $slg.decisiveBattleInfo().canExecute(); if (!canExecute) { this._msgWindow.setText(TextManager.decisiveBattleDialog); this._msgWindow.visible = true; SoundManager.playBuzzer(); this._msgWindow.activate(); return; } this._confirmWindow.visible = true; this._confirmWindow.setText(TextManager.decisiveBattleConfirm); this._confirmWindow.activate(); }; Scene_Slg.prototype.onDecisiveBattleOk = function () { var cost = this._decisiveBattleWindow.selectedCost(); if (cost.isFinished()) { SoundManager.playBuzzer(); this._decisiveBattleWindow.activate(); return; } this._confirmDecisiveBattle = true; this._confirmWindow.visible = true; this._confirmWindow.setText("この資源を納品しますか?"); this._confirmWindow.activate(); }; Scene_Slg.prototype.onDecisiveBattleCancel = function () { this._decisiveBattleWindow.select(-1); this._commandWindow.activate(); }; Scene_Slg.prototype.onFinishDecisiveBattle = function () { this._confirmWindow.hide(); $gameSwitches.setValue(5, true); $slg.decisiveBattleInfo().consumeCost(); this.popScene(); }; return Scene_Slg; })(Nore.Scene_Talk); Nore.Scene_Slg = Scene_Slg; var SlgEvent = /** @class */ (function () { function SlgEvent(history) { this._source = history; } SlgEvent.prototype.eventName = function () { var actorId = this._source.actorId().padZero(2); if (this._source.status() == TanetsukeStatus.pregnant) { return "妊娠イベント_01"; } if (this._source.status() == TanetsukeStatus.inSex) { return "セックスイベント_%1_01".format(actorId); } else { return "出産イベント_01"; } }; return SlgEvent; })(); Nore.MAIN_MENU_W = 182; })(Nore || (Nore = {})); var Sprite_Tachie = /** @class */ (function (_super) { __extends(Sprite_Tachie, _super); function Sprite_Tachie(x, y, scale) { if (x === void 0) { x = 860; } if (y === void 0) { y = -100; } if (scale === void 0) { scale = 1; } var _this = _super.call(this, new Rectangle(0, 0, 0, 0)) || this; _this._x = x; _this._y = y; _this._scale = scale; _this.update(); return _this; } Sprite_Tachie.prototype.initialize = function () { var x = 550; _super.prototype.initialize.call( this, new Rectangle(x, 0, this.contentsWidth(), this.contentsHeight()) ); this.frameVisible = false; this.backOpacity = 0; this.margin = 0; this.padding = 0; var g = new PIXI.Graphics(); g.beginFill(0x000); g.drawRect(0, 0, 500, 500); g.endFill(); this._back = g; this.addChild(this._back); this._actorLayer = new Sprite(); this.addChild(this._actorLayer); }; Sprite_Tachie.prototype.setActorId = function (actorId) { if (this._actorId == actorId) { return; } this._actorId = actorId; this.redraw(); }; Sprite_Tachie.prototype.update = function () { _super.prototype.update.call(this); this.updatePosition(); if (this.actor() && this.actor().isDirty()) { this.redraw(); } }; Sprite_Tachie.prototype.updatePosition = function () { this.x = this._x; this.y = this._y; this.scale.x = this._scale; this.scale.y = this._scale; this._back.visible = false; }; Sprite_Tachie.prototype.actor = function () { return $gameActors.actor(this._actorId); }; Sprite_Tachie.prototype.redraw = function () { if (!this.visible) { // return; } this.contents.clear(); this.contentsBack.clear(); if (!this._actorLayer) { return; } this.drawActor(); }; Sprite_Tachie.prototype.drawActor = function () { var hMinus = 0; if ($gameSwitches.value(4)) { hMinus = 0; } var rect = new Rectangle(120, 0, 600, 1000); var x = -10; //$gameActors.actor(this._actorId).posByActor(); var y = 10; var actor = this.actor(); if (!actor) { return; } this._actorLayer.removeChildren(); var faceId = actor.getDefaultFaceId(); this.drawTachieActor(actor, this._actorLayer, x, y, null, faceId); }; Sprite_Tachie.prototype.contentsWidth = function () { return 378; }; Sprite_Tachie.prototype.contentsHeight = function () { return Graphics.height; }; return Sprite_Tachie; })(Window_Base);