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 __()); }; })(); /*:ja * @target MZ * @author ル * * @command addScenario * @text SLGシナリオ追加 * @des SLGシナリオ追加 * @arg scenario * @type string * @arg isSlg * @type boolean * @text SLG画面のみ * * @command reserveActionPoint * @text アクションポイント予約 * @des アクションポイント予約 * @arg point * @type number * @text point * @desc point * * @command consumeActionPoint * @text アクションポイント消費 * @des アクションポイント消費 * * @command clearActionPoint * @text アクションポイントクリア * @des アクションポイントクリア * */ var RECOVER_CIV_CRYSTAL = 50; var NO_ITEM_VAR = 133; var FAN_UNIT = 10; var Nore; (function (Nore) { var pluginName = "Nore_Party"; PluginManager.registerCommand(pluginName, "addScenario", function (args) { var isSlg = args.isSlg == "true"; if (isSlg) { $gameParty.addSlgScenario(args.scenario, -1); } else { $gameParty.addScenario(args.scenario, -1); } }); PluginManager.registerCommand( pluginName, "consumeActionPoint", function (args) { $gameParty.consumeActionPoint(); } ); PluginManager.registerCommand( pluginName, "clearActionPoint", function (args) { $gameParty.clearActionPoint(); } ); })(Nore || (Nore = {})); var SKILL_POINT; (function (SKILL_POINT) { SKILL_POINT[(SKILL_POINT["DUNGEON_START"] = 20)] = "DUNGEON_START"; SKILL_POINT[(SKILL_POINT["WIN_BATTLE"] = 5)] = "WIN_BATTLE"; })(SKILL_POINT || (SKILL_POINT = {})); var SIROHATA_ID = 17; var BAKUDAN_ID = 19; var SUISIDE_ID = 21; var BATTLE_COS_ID = 1; var CAPTIVE_COS_ID = 2; var TEMP_COS_ID = 3; var CRYSTAL_VAR = 68; var GachaTicket = /** @class */ (function () { function GachaTicket(actorId) { this._actorId = actorId; } GachaTicket.prototype.actorId = function () { return this._actorId; }; return GachaTicket; })(); var SlgScenatio = /** @class */ (function () { function SlgScenatio(_scenario, _id) { this._scenario = _scenario; this._id = _id; } SlgScenatio.prototype.scenario = function () { return this._scenario; }; SlgScenatio.prototype.id = function () { return this._id; }; return SlgScenatio; })(); var FriendshipBonusType; (function (FriendshipBonusType) { FriendshipBonusType["hpFlame"] = "hpFlame"; FriendshipBonusType["atkFlame"] = "atkFlame"; FriendshipBonusType["hpWater"] = "hpWater"; FriendshipBonusType["atkWater"] = "atkWater"; FriendshipBonusType["hpWood"] = "hpWood"; FriendshipBonusType["atkWood"] = "atkWood"; })(FriendshipBonusType || (FriendshipBonusType = {})); var Game_NoreParty = /** @class */ (function (_super) { __extends(Game_NoreParty, _super); function Game_NoreParty() { var _this = _super.call(this) || this; _this._scenarioList = []; _this._slgScenarioList = []; _this._commonEventList = []; _this._upGoldValue = 0; _this._gachaTicketList = []; return _this; } Game_NoreParty.prototype.friendshipBonus = function (type) { this._friendshipBonus = this._friendshipBonus || {}; if (this._friendshipBonus[type]) { return this._friendshipBonus[type]; } return 0; }; Game_NoreParty.prototype.upFriendshipBonus = function (type, value) { this._friendshipBonus = this._friendshipBonus || {}; if (!this._friendshipBonus[type]) { this._friendshipBonus[type] = 0; } this._friendshipBonus[type] += value; }; Game_NoreParty.prototype.friendshipBonusRate = function (type) { switch (type) { case FriendshipBonusType.hpFlame: case FriendshipBonusType.hpWater: case FriendshipBonusType.hpWood: return 3; } return 1; }; Game_NoreParty.prototype.setMenuActorId = function (actorId) { this._menuActorId = actorId; }; Game_NoreParty.prototype.menuActor = function () { var actor = $gameActors.actor(this._menuActorId); return actor; }; Game_NoreParty.prototype.maxPower = function () { return $slg.facilityInfo().maxPower(); }; Game_NoreParty.prototype.addScenario = function (scenario, id) { p("addScenario:" + scenario + " id:" + id); this._scenarioList.push(new SlgScenatio(scenario, id)); $slg.setDirty(); }; Game_NoreParty.prototype.addSlgScenario = function (scenario, id) { p("addSlgScenario:" + scenario); this._slgScenarioList.push(new SlgScenatio(scenario, id)); $slg.setDirty(); }; Game_NoreParty.prototype.clearScenario = function () { this._scenarioList = []; }; Game_NoreParty.prototype.nextSlgScenario = function () { if (this._slgScenarioList.length > 0) { var data = this._slgScenarioList.shift(); $slg.fadeoutTimeGaugeEvent(data.id()); return data.scenario(); } }; Game_NoreParty.prototype.nextScenario = function () { if (this._scenarioList.length > 0) { var data = this._scenarioList.shift(); $slg.fadeoutTimeGaugeEvent(data.id()); return data.scenario(); } return null; }; Game_NoreParty.prototype.addCommonEvent = function (commonId, id) { this._commonEventList.push(new CommonEventData(commonId, id)); $slg.setDirty(); }; Game_NoreParty.prototype.insertCommonEvent = function (commonId, id) { this._commonEventList.unshift(new CommonEventData(commonId, id)); $slg.setDirty(); }; Game_NoreParty.prototype.hasCommonEvent = function () { if (this._commonEventList.length > 0) { return true; } return false; }; Game_NoreParty.prototype.nextCommonEvent = function () { if (this._commonEventList.length > 0) { var data = this._commonEventList.shift(); $slg.fadeoutTimeGaugeEvent(data.id()); return data.commonEventId; } return null; }; Game_NoreParty.prototype.isDirty = function () { return this._dirty; }; Game_NoreParty.prototype.setDirty = function () { this._dirty = true; }; Game_NoreParty.prototype.clearDirty = function () { this._dirty = false; }; /*isAllDead() { return this._hp <= 0; }*/ Game_NoreParty.prototype.saveCostume = function (slotId) { for (var i = 1; i <= 24; i++) { var a = $gameActors.actor(i); a.saveCostume(slotId); } }; Game_NoreParty.prototype.restoreCostume = function (slotId) { for (var i = 1; i <= 24; i++) { var a = $gameActors.actor(i); a.restoreCostume(slotId, true); } }; Game_NoreParty.prototype.isLayeredCharacterEnabledMap = function (mapId) { return true; }; Game_NoreParty.prototype.gainGold = function (amount) { if (amount > 0) { this._upGoldValue += amount; } _super.prototype.gainGold.call(this, amount); this._dirty = true; this.checkGoldEvent(); }; Game_NoreParty.prototype.checkGoldEvent = function () { /*if (! $gameSwitches.value(61)) { if (this.gold() >= 125) { $gameSwitches.setValue(61, true); $gameParty.addScenario('1面_02_お金イベント_01'); $slg.setDirty(); } }*/ }; Game_NoreParty.prototype.getActorIdList = function () { var candidates = [8, 10, 11, 9, 4, 13, 17]; var result = []; for ( var _i = 0, candidates_1 = candidates; _i < candidates_1.length; _i++ ) { var actorId = candidates_1[_i]; if (this.isVisible(actorId)) { result.push(actorId); } } return result; }; Game_NoreParty.prototype.isVisible = function (actorId) { switch (actorId) { case 9: // ノノカ return $slg.stage() >= 2; case 10: // カナミ return $gameSwitches.value(253); case 11: // ミユ return $gameSwitches.value(250); case 4: // マリナ //return true; return $slg.stage() >= 3; case 13: // サキ //return true; return $slg.stage() >= 4; case 17: // ココナ //return true; return $slg.stage() >= 5; } return true; }; Game_NoreParty.prototype.makeMenuActorPrevious = function () { var actorId = this.menuActor().actorId(); var actorIdList = this.getActorIdList(); var index = actorIdList.indexOf(actorId); if (index < 0) { this.setMenuActorId(actorIdList[0]); } else if (index == 0) { this.setMenuActorId(actorIdList[actorIdList.length - 1]); } else { this.setMenuActorId(actorIdList[index - 1]); } }; Game_NoreParty.prototype.makeMenuActorNext = function () { var actorId = this.menuActor().actorId(); var actorIdList = this.getActorIdList(); var index = actorIdList.indexOf(actorId); if (index < 0) { this.setMenuActorId(actorIdList[0]); } else if (index == actorIdList.length - 1) { this.setMenuActorId(actorIdList[0]); } else { this.setMenuActorId(actorIdList[index + 1]); } }; Game_NoreParty.prototype.upGoldValue = function () { return this._upGoldValue; }; Game_NoreParty.prototype.clearUpGoldValue = function () { this._upGoldValue = 0; }; Game_NoreParty.prototype.isAllLessHp = function () { for (var _i = 0, _a = this.getActorIdList(); _i < _a.length; _i++) { var actorId = _a[_i]; var actor = $gameActors.actor(actorId); if (actor.hpRate() >= 1) { return false; } } return true; }; Game_NoreParty.prototype.gachaTicket = function () { this._gachaTicketList = this._gachaTicketList || []; return this._gachaTicketList.length; }; Game_NoreParty.prototype.addGachaTicket = function (t) { this._gachaTicketList = this._gachaTicketList || []; this._gachaTicketList.push(t); }; Game_NoreParty.prototype.useGachaTicket = function () { this._gachaTicketList = this._gachaTicketList || []; if (this._gachaTicketList.length == 0) { console.error("ガチャチケがありません。"); return null; } return this._gachaTicketList.shift(); }; return Game_NoreParty; })(Game_Party); var MilkSet = /** @class */ (function () { function MilkSet() { this._map = {}; } MilkSet.prototype.push = function (milk) { if (this._map[milk.id]) { this._map[milk.id].num++; } else { this._map[milk.id] = new Milk(milk); } }; MilkSet.prototype.makeList = function () { var array = []; for (var key in this._map) { var milk = this._map[key]; array.push(milk); } array = array.sort(function (a, b) { return a.id() - b.id(); }); return array; }; return MilkSet; })(); var Milk = /** @class */ (function () { function Milk(item) { this._item = item; this.num = 1; } Milk.prototype.id = function () { return this._item.id; }; Milk.prototype.item = function () { return this._item; }; return Milk; })();