code:
var ATK_MINI_ICON = 386;
var DEF_MINI_ICON = 506;
var MAT_MINI_ICON = 413;
var MDF_MINI_ICON = 510;
Sprite.prototype.drawIcon = function (iconIndex, x, y) {
  var bitmap = ImageManager.loadSystem("IconSet");
  var pw = ImageManager.iconWidth;
  var ph = ImageManager.iconHeight;
  var sx = (iconIndex % 16) * pw;
  var sy = Math.floor(iconIndex / 16) * ph;
  if (iconIndex == 656 || iconIndex == 658) {
    this.bitmap.blt(bitmap, sx, sy, pw + 10, ph + 10, x, y - 2);
    return;
  }
  if (iconIndex == Icon.sr || iconIndex == Icon.ssr) {
    this.bitmap.blt(bitmap, sx, sy, pw + 20, ph, x, y - 2);
    return;
  }
  this.bitmap.blt(bitmap, sx, sy, pw, ph, x, y);
};
Window_Base.prototype.drawIcon = function (iconIndex, x, y) {
  var bitmap = ImageManager.loadSystem("IconSet");
  var pw = ImageManager.iconWidth;
  var ph = ImageManager.iconHeight;
  var sx = (iconIndex % 16) * pw;
  var sy = Math.floor(iconIndex / 16) * ph;
  if (iconIndex == 656 || iconIndex == 658) {
    this.contents.blt(bitmap, sx, sy, pw + 10, ph + 10, x, y - 2);
    return;
  }
  if (
    iconIndex == 480 ||
    iconIndex == 483 ||
    iconIndex == 486 ||
    iconIndex == 518
  ) {
    this.contents.blt(bitmap, sx, sy, pw * 3, 58, x, y - 2);
    return;
  }
  if (iconIndex == Icon.sr || iconIndex == Icon.ssr) {
    this.contents.blt(bitmap, sx, sy, pw + 20, ph, x, y - 2);
    return;
  }
  this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
};
Window_Base.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_Base.prototype.friendshipIcon = function (level) {
  switch (level) {
    case FriendshipLevel.S:
      return Icon.rankS;
    case FriendshipLevel.A:
      return Icon.rankA;
    case FriendshipLevel.B:
      return Icon.rankB;
    case FriendshipLevel.C:
      return Icon.rankC;
    case FriendshipLevel.D:
      return Icon.rankD;
    case FriendshipLevel.E:
      return Icon.rankE;
  }
  return Icon.rankS;
};
Sprite.prototype.drawIconMini = function (iconIndex, x, y) {
  var bitmap = ImageManager.loadSystem("IconSetMini");
  var pw = 24;
  var ph = 24;
  var sx = (iconIndex % 16) * pw;
  var sy = Math.floor(iconIndex / 16) * ph;
  this.bitmap.blt(bitmap, sx, sy, pw, ph, x, y);
};
Window_Base.prototype.drawIconMini = function (iconIndex, x, y) {
  var bitmap = ImageManager.loadSystem("IconSetMini");
  var pw = 24;
  var ph = 24;
  var sx = (iconIndex % 16) * pw;
  var sy = Math.floor(iconIndex / 16) * ph;
  this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
};


code:
var Nore;
(function (Nore) {
  function getBaseTexture() {
    var baseTexture = PIXI.utils.BaseTextureCache["system/number"];
    if (!baseTexture) {
      var bitmap = ImageManager.loadSystem("number");
      if (!bitmap.isReady()) {
        return;
      }
      baseTexture = new PIXI.BaseTexture(bitmap._image);
      baseTexture.resource.url = "system/number";
      PIXI.utils.BaseTextureCache["system/number"] = baseTexture;
    }
    return baseTexture;
  }
  Nore.getBaseTexture = getBaseTexture;
  Window_Base.prototype.drawNumber = function (num, x, y, w, align, type) {
    drawNumber(num, x, y, w, align, type, this._windowContentsSprite);
  };
  Sprite.prototype.drawNumber = function (num, x, y, w, align, type, parent) {
    drawNumber(num, x, y, w, align, type, parent || this);
  };
  Window_Base.prototype.drawNumberOne = function (index, x, y, type) {
    var baseTexture = getBaseTexture();
    if (!baseTexture) {
      return;
    }
    switch (type) {
      case 1:
        var pw = 32;
        var ph = 32;
        var yy = 0;
        var ww = 32;
        break;
      case 2:
        var pw = 48;
        var ph = 48;
        var yy = 48 * 2;
        var ww = 24;
        break;
      case 3:
        var pw = 38;
        var ph = 48;
        var yy = 48 * 3;
        var ww = 24;
        break;
    }
    var texture = new PIXI.Texture(baseTexture);
    texture.frame = new PIXI.Rectangle(index * pw, yy, pw, ph);
    var sprite = new PIXI.Sprite(texture);
    sprite.x = x;
    sprite.y = y;
    if (parent.paintOpacity !== undefined) {
      sprite.alpha = parent.paintOpacity / 256;
    }
    this._windowContentsSprite.addChild(sprite);
  };
  function drawNumber(num, x, y, w, align, type, parent) {
    var baseTexture = getBaseTexture();
    if (!baseTexture) {
      return;
    }
    var xx = 0;
    switch (type) {
      case 1:
        var pw = 32;
        var ph = 32;
        var yy = 0;
        var ww = 10;
        break;
      case 2:
        var pw = 32;
        var ph = 32;
        var yy = 32;
        var ww = 14;
        break;
    }
    var str = num + "";
    if (num < 0) {
      str = Math.abs(num) + "";
    }
    var minusW = 0;
    for (var i = 0; i < str.length; i++) {
      var s;
      if (align == "right") {
        s = str[str.length - i - 1];
      } else {
        s = str[i];
      }
      var c = parseInt(s);
      if (isNaN(c)) {
        if (s == "%") {
          c = 10;
        } else if (s == ".") {
          c = 10;
        } else if (s == "/") {
          c = 12;
        } else {
          c = 11;
        }
        minusW += -1;
      }
      var texture = new PIXI.Texture(baseTexture);
      texture.frame = new PIXI.Rectangle(c * pw + xx, yy, pw, ph);
      var sprite = new PIXI.Sprite(texture);
      if (align == "right") {
        sprite.x = x + w - (i + 1) * ww - 8 - minusW;
        if (type == 1 && i == str.length - 1 && c == 1) {
          //sprite.x += 2;
        }
      } else {
        sprite.x = x + i * ww;
      }
      if (parent.paintOpacity !== undefined) {
        sprite.alpha = parent.paintOpacity / 256;
      }
      sprite.y = y;
      parent.addChild(sprite);
      if (c == 10) {
        minusW += -5;
      }
    }
  }
})(Nore || (Nore = {}));

repo_name: onms/dead

license: unknown


code:
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 Kigae
 * @text 着替え
 * @des 着替え
 * @arg actorId
 * @type number
 */
var Nore;
(function (Nore) {
  Nore.WINDOW_TOP_MARGIN = 50;
  var pluginName = "Nore_Kigae";
  var NAKED_ONLY = "nakedOnly";
  var CURSE = "curse";
  Nore.CURSE_ICON_INDEX = 711;
  PluginManager.registerCommand(pluginName, "Kigae", function (args) {
    var actorId = parseInt(args.actorId);
    $gameParty.setMenuActorId(actorId);
    SceneManager.push(Scene_Kigae);
  });
  var Scene_Kigae = /** @class */ (function (_super) {
    __extends(Scene_Kigae, _super);
    function Scene_Kigae() {
      return (_super !== null && _super.apply(this, arguments)) || this;
    }
    Scene_Kigae.prototype.create = function () {
      Nore.Scene_Talk.prototype.create.call(this);
      this.createWindowLayer();
      this.createKigaeSlotWindow();
      this.setKigaeSlotHandler();
      this.createKigaeCommandWindow();
      this.createKigaeActorWindow();
      this.createKigaeOmankoWindow();
      this.createKigaeLabel();
      this.createAllWindows();
      this.createConfirmWindow();
      this.createButtons();
      this.updateActor();
      this.saveLastCos();
      this.onCommandChange();
      this.showBackground();
    };
    Scene_Kigae.prototype.start = function () {
      _super.prototype.start.call(this);
      this.startInitialScenario();
    };
    Scene_Kigae.prototype.createMessageWindow = function () {
      var rect = this.messageWindowRect();
      this._messageWindow = new Window_NormalMessage(rect);
      this.addChild(this._messageWindow);
    };
    Scene_Kigae.prototype.updateBackLog = function () {};
    Scene_Kigae.prototype.createButtons = function () {
      /*this._leftButton = new Sprite_Button("pageup");
            this._leftButton.x = 20;
            this._leftButton.y = this.buttonY();
            this.addChild(this._leftButton);

            this._rightButton = new Sprite_Button("pagedown");
            this._rightButton.x = 140;
            this._rightButton.y = this.buttonY();
            this.addChild(this._rightButton);*/
    };
    Scene_Kigae.prototype.buttonY = function () {
      return 5;
    };
    Scene_Kigae.prototype.startInitialScenario = function () {
      if ($gameSwitches.value(336)) {
        return;
      }
      $gameTemp.confirmWindowActive = true;
      this._kigaeSlotWindow.deactivate();
      this._kigaeCommandWindow.deactivate();
      $gameSwitches.setValue(336, true);
      this.playScenario("着替えチュートリアル");
    };
    Scene_Kigae.prototype.finishScenario = function () {
      $gameTemp.confirmWindowActive = false;
      this._kigaeCommandWindow.activate();
      //this._kigaeSlotWindow.activate();
    };
    Scene_Kigae.prototype.createWindowLayer = function () {
      this.createPictures();
      _super.prototype.createWindowLayer.call(this);
    };
    Scene_Kigae.prototype.showBackground = function () {
      /*if (this._actor.isCaptive()) {
                $gameScreen.showPicture(1, 'kadofan_003n_1920.1080', 0, 0, 0, 100, 100, 155, PIXI.BLEND_MODES.NORMAL, 0);
            } else {
                $gameScreen.showPicture(1, 'esfan_004_1920_1080', 0, 0, 0, 100, 100, 155, PIXI.BLEND_MODES.NORMAL, 0);
            }*/
    };
    Scene_Kigae.prototype.createPictures = function () {
      return;
      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 <= $gameScreen.maxPictures(); i++) {
        this._pictureContainer.addChild(new Sprite_Picture(i));
      }
      this.addChild(this._pictureContainer);
    };
    Scene_Kigae.prototype.createConfirmWindow = function () {
      this._confirmWindow = new Nore.Window_Confirm();
      this._confirmWindow.setText(TextManager.cancelText);
      this._confirmWindow.setHandler("ok", this.onConfirmOk.bind(this));
      this._confirmWindow.setHandler("cancel", this.onConfirmCancel.bind(this));
      this._confirmWindow.deactivate();
      this.addChild(this._confirmWindow);
      this._confirmWindow.hide();
    };
    Scene_Kigae.prototype.onConfirmOk = function () {
      //this._actor.resetFace();
      this._actor.setNaked(0);
      this._actor.putOnOuter();
      this._lastCos.restoreCostume();
      this._actor.setCacheChanged();
      $gamePlayer.refresh();
      $gameTemp.isCancelMenu = true;
      this.popScene();
    };
    Scene_Kigae.prototype.onConfirmCancel = function () {
      this._confirmWindow.hide();
      this._confirmWindow.deactivate();
      this._kigaeCommandWindow.activate();
    };
    Scene_Kigae.prototype.saveLastCos = function () {
      this._lastCos = new CostumeSaver(this._actor.actorId());
    };
    Scene_Kigae.prototype.createKigaeLabel = function () {
      this._label1 = new Window_Label3(TextManager.kigaeError1, 600, 20);
      this._label1.visible = false;
      this.addWindow(this._label1);
      this._label2 = new Window_Label3(TextManager.kigaeError2, 600, 20);
      this._label2.visible = false;
      this.addWindow(this._label2);
      this._label3 = new Window_Label3("", 200, 10);
      this._label3.hideFrame();
      //this._label3.visible = false;
      this.addWindow(this._label3);
    };
    Scene_Kigae.prototype.createBackground = function () {
      /*this._backgroundSprite = new Sprite();
            this._backgroundSprite.bitmap = SceneManager.backgroundBitmap();
            this.addChild(this._backgroundSprite);*/
    };
    Scene_Kigae.prototype.createKigaeSlotWindow = function () {
      this._kigaeSlotWindow = new Window_KigaeSlot("cos");
      this.addWindow(this._kigaeSlotWindow);
      this._kigaeSlotWindow2 = new Window_KigaeSlot("acce");
      this.addWindow(this._kigaeSlotWindow2);
      this._kigaeSlotWindow3 = new Window_KigaeSlot("face");
      this.addWindow(this._kigaeSlotWindow3);
      this._kigaeSlotWindow4 = new Window_KigaeSlot("inner");
      this.addWindow(this._kigaeSlotWindow4);
      this._kigaeSlotWindow5 = new Window_KigaeSlot("rakugaki");
      this.addWindow(this._kigaeSlotWindow5);
      this._kigaeSlotWindow6 = new Window_KigaeSlot("curse");
      this.addWindow(this._kigaeSlotWindow6);
    };
    Scene_Kigae.prototype.setKigaeSlotHandler = function () {
      this._kigaeSlotWindow.setHandler("ok", this.onOk.bind(this));
      this._kigaeSlotWindow.setHandler("change", this.onChange.bind(this));
      this._kigaeSlotWindow.setHandler("cancel", this.onCancelSlot.bind(this));
      this._kigaeSlotWindow.setHandler(
        "touchSelect",
        this.onTouchSelect.bind(this)
      );
      this._kigaeSlotWindow.setHandler("pageup", this.onPageup.bind(this));
      this._kigaeSlotWindow.setHandler("pagedown", this.onPagedown.bind(this));
      this._kigaeSlotWindow.deactivate();
      this._kigaeSlotWindow2.setHandler("ok", this.onOk2.bind(this));
      this._kigaeSlotWindow2.setHandler("change", this.onChange.bind(this));
      this._kigaeSlotWindow2.setHandler("cancel", this.onCancelSlot.bind(this));
      this._kigaeSlotWindow2.setHandler(
        "touchSelect",
        this.onTouchSelect.bind(this)
      );
      this._kigaeSlotWindow2.setHandler("pageup", this.onPageup.bind(this));
      this._kigaeSlotWindow2.setHandler("pagedown", this.onPagedown.bind(this));
      this._kigaeSlotWindow3.setHandler("ok", this.onOk3.bind(this));
      this._kigaeSlotWindow3.setHandler("change", this.onChange.bind(this));
      this._kigaeSlotWindow3.setHandler("cancel", this.onCancelSlot.bind(this));
      this._kigaeSlotWindow3.setHandler(
        "touchSelect",
        this.onTouchSelect.bind(this)
      );
      this._kigaeSlotWindow3.setHandler("pageup", this.onPageup.bind(this));
      this._kigaeSlotWindow3.setHandler("pagedown", this.onPagedown.bind(this));
      this._kigaeSlotWindow4.setHandler("ok", this.onOk4.bind(this));
      this._kigaeSlotWindow4.setHandler("change", this.onChange.bind(this));
      this._kigaeSlotWindow4.setHandler("cancel", this.onCancelSlot.bind(this));
      this._kigaeSlotWindow4.setHandler(
        "touchSelect",
        this.onTouchSelect.bind(this)
      );
      this._kigaeSlotWindow4.setHandler("pageup", this.onPageup.bind(this));
      this._kigaeSlotWindow4.setHandler("pagedown", this.onPagedown.bind(this));
      this._kigaeSlotWindow5.setHandler("ok", this.onOk5.bind(this));
      this._kigaeSlotWindow5.setHandler("change", this.onChange.bind(this));
      this._kigaeSlotWindow5.setHandler("cancel", this.onCancelSlot.bind(this));
      this._kigaeSlotWindow5.setHandler(
        "touchSelect",
        this.onTouchSelect.bind(this)
      );
      this._kigaeSlotWindow5.setHandler("pageup", this.onPageup.bind(this));
      this._kigaeSlotWindow5.setHandler("pagedown", this.onPagedown.bind(this));
      this._kigaeSlotWindow6.setHandler("ok", this.onOk6.bind(this));
      this._kigaeSlotWindow6.setHandler("change", this.onChange.bind(this));
      this._kigaeSlotWindow6.setHandler("cancel", this.onCancelSlot.bind(this));
      this._kigaeSlotWindow6.setHandler(
        "touchSelect",
        this.onTouchSelect.bind(this)
      );
      this._kigaeSlotWindow6.setHandler("pageup", this.onPageup.bind(this));
      this._kigaeSlotWindow6.setHandler("pagedown", this.onPagedown.bind(this));
    };
    Scene_Kigae.prototype.onPageup = function () {
      if (!this.canActorChange()) {
        this.onCancelSlot();
        this._kigaeCommandWindow.activate();
        return;
      }
      this.previousActor();
      this.onCancelSlot();
      this._kigaeCommandWindow.activate();
    };
    Scene_Kigae.prototype.onPagedown = function () {
      if (!this.canActorChange()) {
        this.onCancelSlot();
        this._kigaeCommandWindow.activate();
        return;
      }
      this.nextActor();
      this.onCancelSlot();
      this._kigaeCommandWindow.activate();
    };
    Scene_Kigae.prototype.canActorChange = function () {
      if (this._actor.actorId() == 3) {
        return false;
      }
      if (this._actor.actorId() == 5) {
        return false;
      }
      if (this._actor.actorId() == 1) {
        return false;
      }
      return true;
    };
    Scene_Kigae.prototype.onTouchSelect = function () {
      if (this.isInterpreterRunning()) {
        return;
      }
      this.onCancelSlot();
      if (this._kigaeSlotWindow.visible) {
        this._kigaeSlotWindow.activate();
      } else if (this._kigaeSlotWindow2.visible) {
        this._kigaeSlotWindow2.activate();
      } else if (this._kigaeSlotWindow3.visible) {
        this._kigaeSlotWindow3.activate();
      } else if (this._kigaeSlotWindow4.visible) {
        this._kigaeSlotWindow4.activate();
      } else if (this._kigaeSlotWindow5.visible) {
        this._kigaeSlotWindow5.activate();
      } else if (this._kigaeSlotWindow6.visible) {
        this._kigaeSlotWindow6.activate();
      } else {
        return;
      }
      this._kigaeCommandWindow.deactivate();
    };
    Scene_Kigae.prototype.createKigaeCommandWindow = function () {
      this._kigaeCommandWindow = new Window_KigaeCommand(
        new Rectangle(6, Nore.WINDOW_TOP_MARGIN, 200, 39 * 7 + 60)
      );
      this._kigaeCommandWindow.setHandler(
        "change",
        this.onCommandChange.bind(this)
      );
      this._kigaeCommandWindow.setHandler("ok", this.onDecide.bind(this));
      this._kigaeCommandWindow.setHandler("cancel", this.onCancel.bind(this));
      this._kigaeCommandWindow.setHandler("cos", this.onCos.bind(this));
      this._kigaeCommandWindow.setHandler("acce", this.onAcce.bind(this));
      this._kigaeCommandWindow.setHandler("face", this.onFace.bind(this));
      this._kigaeCommandWindow.setHandler("inner", this.onInner.bind(this));
      this._kigaeCommandWindow.setHandler(
        "rakugaki",
        this.onRakugaki.bind(this)
      );
      this._kigaeCommandWindow.setHandler("curse", this.onCurse.bind(this));
      this._kigaeCommandWindow.setHandler(
        "pagedown",
        this.onPagedown.bind(this)
      );
      this._kigaeCommandWindow.setHandler("pageup", this.onPageup.bind(this));
      this.addWindow(this._kigaeCommandWindow);
    };
    Scene_Kigae.prototype.nextActor = function () {
      SoundManager.playCursor();
      this.decideActor();
      $gameParty.makeMenuActorNext();
      this.updateActor();
      this._kigaeCommandWindow.activate();
    };
    Scene_Kigae.prototype.previousActor = function () {
      SoundManager.playCursor();
      this.decideActor();
      $gameParty.makeMenuActorPrevious();
      this.updateActor();
      this._kigaeCommandWindow.activate();
    };
    Scene_Kigae.prototype.onCancelSlot = function () {
      this._kigaeSlotWindow.deactivate();
      this._kigaeSlotWindow2.deactivate();
      this._kigaeSlotWindow3.deactivate();
      this._kigaeSlotWindow4.deactivate();
      this._kigaeSlotWindow5.deactivate();
      this._kigaeSlotWindow6.deactivate();
      this._kigaeCommandWindow.activate();
      this._kigaeActorWindow.drawTexts("");
    };
    Scene_Kigae.prototype.onAcce = function () {
      this._kigaeSlotWindow2.activate();
    };
    Scene_Kigae.prototype.onCos = function () {
      this._kigaeSlotWindow.activate();
    };
    Scene_Kigae.prototype.onFace = function () {
      this._kigaeSlotWindow3.activate();
    };
    Scene_Kigae.prototype.onInner = function () {
      this._kigaeSlotWindow4.activate();
    };
    Scene_Kigae.prototype.onRakugaki = function () {
      this._kigaeSlotWindow5.activate();
    };
    Scene_Kigae.prototype.onCurse = function () {
      this._kigaeSlotWindow6.activate();
    };
    Scene_Kigae.prototype.hideAllSlotWindow = function () {
      this._kigaeSlotWindow.hide();
      this._kigaeSlotWindow2.hide();
      this._kigaeSlotWindow3.hide();
      this._kigaeSlotWindow4.hide();
      this._kigaeSlotWindow5.hide();
      this._kigaeSlotWindow6.hide();
    };
    Scene_Kigae.prototype.onCommandChange = function () {
      this.hideAllSlotWindow();
      if (this._kigaeOmankoWindow) {
        this._kigaeOmankoWindow.visible = false;
      }
      if (this._kigaeCommandWindow.currentSymbol() == "cos") {
        this._kigaeSlotWindow.show();
        this._kigaeActorWindow.setNaked(0);
      } else if (this._kigaeCommandWindow.currentSymbol() == "acce") {
        this._kigaeSlotWindow2.show();
        this._kigaeActorWindow.setNaked(2);
      } else if (this._kigaeCommandWindow.currentSymbol() == "face") {
        this._kigaeSlotWindow3.show();
        this._kigaeActorWindow.setNaked(2);
      } else if (this._kigaeCommandWindow.currentSymbol() == "inner") {
        this._kigaeSlotWindow4.show();
        this._kigaeActorWindow.setNaked(1);
      } else if (this._kigaeCommandWindow.currentSymbol() == "rakugaki") {
        this._kigaeSlotWindow5.show();
        this._kigaeActorWindow.setNaked(2);
      } else if (this._kigaeCommandWindow.currentSymbol() == "curse") {
        this._kigaeSlotWindow6.show();
        this._kigaeActorWindow.setNaked(2);
        if (this._kigaeOmankoWindow) {
          this._kigaeOmankoWindow.visible = true;
          this._kigaeOmankoWindow.refresh();
        }
      } else {
        this._kigaeActorWindow.setNaked(0);
      }
    };
    Scene_Kigae.prototype.decideActor = function () {
      this._actor.setNaked(0);
      this._actor.putOnOuter();
      this._actor.setCacheChanged();
    };
    Scene_Kigae.prototype.onDecide = function () {
      $gameScreen.erasePicture(1);
      //this._actor.resetFace();
      this.decideActor();
      $gamePlayer.refresh();
      $gameTemp.isCancelMenu = true;
      this.popScene();
    };
    Scene_Kigae.prototype.onCancel = function () {
      this.onDecide();
      return;
      this._confirmWindow.setInfo(true);
      this._confirmWindow.show();
      this._confirmWindow.activate();
    };
    Scene_Kigae.prototype.createKigaeActorWindow = function () {
      this._kigaeActorWindow = new Window_KigaeActor();
      this.addWindow(this._kigaeActorWindow);
    };
    Scene_Kigae.prototype.createKigaeOmankoWindow = function () {
      this._kigaeOmankoWindow = new Window_KigaeOmanko();
      this.addWindow(this._kigaeOmankoWindow);
    };
    Scene_Kigae.prototype.getActor = function () {
      return $gameParty.menuActor();
    };
    Scene_Kigae.prototype.updateActor = function () {
      this._actor = this.getActor();
      this._actor.putOnOuter();
      this._actor.setCacheChanged();
      this._kigaeCommandWindow.setActor(this._actor);
      if (this._kigaeActorWindow) {
        this._kigaeSlotWindow.setActor(this._actor);
        this._kigaeSlotWindow2.setActor(this._actor);
        this._kigaeSlotWindow3.setActor(this._actor);
        this._kigaeSlotWindow4.setActor(this._actor);
        this._kigaeSlotWindow5.setActor(this._actor);
        this._kigaeSlotWindow6.setActor(this._actor);
        this._kigaeActorWindow.setActor(this._actor);
        if (this._kigaeOmankoWindow) {
          this._kigaeOmankoWindow.setActor(this._actor);
        }
      }
      this.updateLabel3();
    };
    Scene_Kigae.prototype.updateLabel3 = function () {
      var text;
      this._label3.setText(text);
      this._label3.hide();
    };
    Scene_Kigae.prototype.onCosChange = function () {};
    Scene_Kigae.prototype.onOk = function () {
      this._actor.setCacheChanged();
      this._kigaeSlotWindow.decide();
      this._kigaeSlotWindow.refresh();
      this._kigaeSlotWindow2.refresh();
      this._kigaeSlotWindow3.refresh();
      this._kigaeSlotWindow4.refresh();
      this._kigaeSlotWindow5.refresh();
      this._kigaeSlotWindow6.refresh();
      this._kigaeActorWindow.refresh();
      this._kigaeSlotWindow.activate();
      this.onCosChange();
    };
    Scene_Kigae.prototype.onOk2 = function () {
      this._actor.setCacheChanged();
      this._kigaeSlotWindow2.decide();
      this._kigaeSlotWindow2.refresh();
      this._kigaeActorWindow.refresh();
      this._kigaeSlotWindow2.activate();
      this.onCosChange();
    };
    Scene_Kigae.prototype.onOk3 = function () {
      this._actor.setCacheChanged();
      this._kigaeSlotWindow3.decide();
      this._kigaeSlotWindow3.refresh();
      this._kigaeActorWindow.refresh();
      this._kigaeSlotWindow3.activate();
      this.onCosChange();
    };
    Scene_Kigae.prototype.onOk4 = function () {
      this._actor.setCacheChanged();
      this._kigaeSlotWindow4.decide();
      this._kigaeSlotWindow4.refresh();
      this._kigaeActorWindow.refresh();
      this._kigaeSlotWindow4.activate();
      this.onCosChange();
    };
    Scene_Kigae.prototype.onOk5 = function () {
      this._actor.setCacheChanged();
      this._kigaeSlotWindow5.decide();
      this._kigaeSlotWindow5.refresh();
      this._kigaeActorWindow.refresh();
      this._kigaeSlotWindow5.activate();
      this.onCosChange();
    };
    Scene_Kigae.prototype.onOk6 = function () {
      //this._actor.setCacheChanged();
      this._kigaeSlotWindow6.decide();
      this._kigaeSlotWindow6.refresh();
      this._kigaeActorWindow.refresh();
      this._kigaeSlotWindow6.activate();
      this.onCosChange();
      this._kigaeOmankoWindow.refresh();
    };
    Scene_Kigae.prototype.updateCanOk = function () {
      this._label1.visible = !this.isCanOk();
      this._kigaeCommandWindow.setCanOk(this.isCanOk());
    };
    Scene_Kigae.prototype.isCanOk = function () {
      return true;
    };
    Scene_Kigae.prototype.selectedArmor = function () {
      if (this._kigaeSlotWindow.active) {
        return this._kigaeSlotWindow.armor();
      }
      if (this._kigaeSlotWindow2.active) {
        return this._kigaeSlotWindow2.armor();
      }
      if (this._kigaeSlotWindow3.active) {
        return this._kigaeSlotWindow3.armor();
      }
      if (this._kigaeSlotWindow4.active) {
        return this._kigaeSlotWindow4.armor();
      }
      if (this._kigaeSlotWindow5.active) {
        return this._kigaeSlotWindow5.armor();
      }
      if (this._kigaeSlotWindow6.active) {
        return this._kigaeSlotWindow6.armor();
      }
      return null;
    };
    Scene_Kigae.prototype.selectedAcceId = function () {
      if (this._kigaeSlotWindow.active) {
        return this._kigaeSlotWindow.acceId();
      }
      if (this._kigaeSlotWindow2.active) {
        return this._kigaeSlotWindow2.acceId();
      }
      if (this._kigaeSlotWindow3.active) {
        return this._kigaeSlotWindow3.acceId();
      }
      if (this._kigaeSlotWindow4.active) {
        return this._kigaeSlotWindow4.acceId();
      }
      if (this._kigaeSlotWindow5.active) {
        return this._kigaeSlotWindow5.acceId();
      }
      if (this._kigaeSlotWindow6.active) {
        return this._kigaeSlotWindow6.acceId();
      }
      return null;
    };
    Scene_Kigae.prototype.onChange = function () {
      this._kigaeActorWindow.drawTexts("");
      var acceId = this.selectedAcceId();
      var armor = this.selectedArmor();
      if (!armor) {
        return;
      }
      this._label1.visible = false;
      this._label2.visible = false;
      /*if (! this._actor.isObedienceOk(armor)) {
                this._label2.visible = true;
            }
            if (! this._actor.isNastyOk(armor)) {
                this._label1.visible = true;
            }*/
      if (acceId) {
        this._kigaeActorWindow.drawTexts([]);
        if (armor.id == 1013) {
          var per = Math.round(this._actor.chikubiKuroImageAlpha() * 100);
          this._kigaeActorWindow.drawTexts([
            TextManager.kigaeChikubi1,
            TextManager.kigaeChikubi2.format(per),
          ]);
        } else if (this.isBodyModification(armor.id)) {
          this._kigaeActorWindow.drawTexts([
            TextManager.kigaeBodyModification1,
            TextManager.kigaeBodyModification2,
          ]);
        } else if (armor.meta[CURSE] && !$gameSwitches.value(66)) {
          this._kigaeActorWindow.drawTexts([TextManager.curse]);
        } else if (this._kigaeSlotWindow.isLocked(armor)) {
          this._kigaeActorWindow.drawTexts([TextManager.kigaePierce]);
        } else if (!this._kigaeSlotWindow.isEnabled(armor)) {
          var hint = armor.meta["hint"];
          if (hint) {
            this._kigaeActorWindow.drawTexts([TextManager.hint, hint]);
          }
        } else if (!armor.meta["open"]) {
          if (armor.meta[CURSE] && !$gameSwitches.value(66)) {
            this._kigaeActorWindow.drawTexts([TextManager.curse]);
          } else if (armor.meta[NAKED_ONLY]) {
            this._kigaeActorWindow.drawTexts([TextManager.nakedOnly]);
          } else {
            this._kigaeActorWindow.drawTexts([""]);
          }
        }
        var miniChimpo = armor.meta["miniChimpo"];
        if (miniChimpo) {
          this._kigaeActorWindow.drawTexts([TextManager.miniChimpoEquip]);
        }
        return;
      }
      if (this.isNaked()) {
        //this._kigaeActorWindow.setNaked(1);
        return;
      } else {
      }
      //this._kigaeActorWindow.setNaked(0);
    };
    Scene_Kigae.prototype.isBodyModification = function (id) {
      if (id >= 1121) {
        if (id <= 1158) {
          return true;
        }
      }
      return false;
    };
    Scene_Kigae.prototype.isNaked = function () {
      var window = this._kigaeSlotWindow;
      if (window.outerId() || window.outerTopId() || window.outerBottomId()) {
        return false;
      }
      if (window.armId() || window.legId() || window.faceId()) {
        return false;
      }
      return true;
    };
    return Scene_Kigae;
  })(Nore.Scene_Talk);
  Nore.Scene_Kigae = Scene_Kigae;
  var Window_KigaeCommand = /** @class */ (function (_super) {
    __extends(Window_KigaeCommand, _super);
    function Window_KigaeCommand() {
      var _this = (_super !== null && _super.apply(this, arguments)) || this;
      _this._canOk = true;
      return _this;
    }
    Window_KigaeCommand.prototype.setCanOk = function (b) {
      if (this._canOk == b) {
        return;
      }
      this._canOk = b;
      this.refresh();
    };
    Window_KigaeCommand.prototype.makeCommandList = function () {
      this.clearCommandList();
      this.addCommand(TextManager.cosLabel, "cos", true, null);
      this.addCommand(TextManager.innerLabel, "inner", true, null);
      this.addCommand(TextManager.acceLabel, "acce", true, null);
      if (this.isRakugakiEnabled()) {
        this.addCommand(TextManager.rakugakiLabel, "rakugaki", true, null);
        this.addCommand(TextManager.curseLabel, "curse", true, null);
      }
      this.addCommand(TextManager.faceLabel, "face", true, null);
      this.addCommand("OK", "ok", this._canOk, null);
    };
    Window_KigaeCommand.prototype.setActor = function (actor) {
      this._actor = actor;
      this.makeCommandList();
      this.refresh();
    };
    Window_KigaeCommand.prototype.isRakugakiEnabled = function () {
      if (!this._actor) {
        return true;
      }
      if (this._actor.actorId() == 3) {
        return false;
      }
      if (this._actor.actorId() == 5) {
        return false;
      }
      if (this._actor.actorId() == 1) {
        return false;
      }
      return true;
    };
    return Window_KigaeCommand;
  })(Window_Command);
  Nore.Window_KigaeCommand = Window_KigaeCommand;
  var Window_KigaeSlot = /** @class */ (function (_super) {
    __extends(Window_KigaeSlot, _super);
    function Window_KigaeSlot(_type, width, y) {
      if (width === void 0) {
        width = 380;
      }
      if (y === void 0) {
        y = Nore.WINDOW_TOP_MARGIN;
      }
      var _this =
        _super.call(this, new Rectangle(210, y, width, 800 - y - 20)) || this;
      _this._type = _type;
      return _this;
    }
    Window_KigaeSlot.prototype.initialize = function (rect) {
      _super.prototype.initialize.call(this, rect);
      this.initTexture();
      this.refresh();
      this.select(0);
      this.initMask();
    };
    Window_KigaeSlot.prototype.initMask = function () {
      var myMask = new PIXI.Graphics();
      myMask.beginFill(999, 1);
      var m = this.margin + 1;
      myMask.drawRect(0, this.y + this.margin + 6, 300, 706);
      myMask.endFill();
      this._windowContentsSprite.mask = myMask;
    };
    Window_KigaeSlot.prototype.update = function () {
      _super.prototype.update.call(this);
      if (!this.active && this.visible) {
        if ($gameTemp.confirmWindowActive) {
          return;
        }
        if (TouchInput.isTriggered()) {
          if (this.isTouchedInsideFrame()) {
            SoundManager.playOk();
            this.callHandler("touchSelect");
          }
        }
      }
      //this._windowContentsSprite.y = -this.scrollY() + this.scrollBaseY();
    };
    Window_KigaeSlot.prototype.initTexture = function () {};
    Window_KigaeSlot.prototype.processPagedown = function () {
      this.callHandler("pagedown");
    };
    Window_KigaeSlot.prototype.processPageup = function () {
      this.callHandler("pageup");
    };
    Window_KigaeSlot.prototype.refresh = function () {
      this._windowContentsSprite.removeChildren();
      _super.prototype.refresh.call(this);
    };
    Window_KigaeSlot.prototype.drawAllItems = function () {
      this._windowContentsSprite.removeChildren();
      _super.prototype.drawAllItems.call(this);
    };
    Window_KigaeSlot.prototype.setActor = function (actor) {
      this._actor = actor;
      this.makeItemList(actor);
      this.refresh();
      this.resetSelection();
    };
    Window_KigaeSlot.prototype.resetSelection = function () {
      if (this.index() >= this.maxItems()) {
        this.select(0);
      }
    };
    Window_KigaeSlot.prototype.makeItemList = function (actor) {
      this._itemList = [];
      if (!this._actor) {
        return;
      }
      //var armors = $gameParty.armors();
      //for (var armor of armors) {
      for (var i = 800; i <= 999; i++) {
        this.addArmor($dataArmors[i], this._itemList, true);
      }
      for (var i = 1000; i <= 1100; i++) {
        var armor = $dataArmors[i];
        this.addArmor(armor, this._itemList, false);
      }
      for (var i = 1101; i <= 1185; i++) {
        var armor = $dataArmors[i];
        if (armor.name.length > 0) {
          this.addArmor(armor, this._itemList, false);
        }
      }
      this._itemList = this._itemList.sort(function (a, b) {
        if (a.meta["acce"] && !b.meta["acce"]) {
          return 1;
        }
        if (!a.meta["acce"] && b.meta["acce"]) {
          return -1;
        }
        var orderA = a.id;
        var orderB = b.id;
        if (a.meta["order"]) {
          orderA = parseInt(a.meta["order"]);
        }
        if (b.meta["order"]) {
          orderB = parseInt(b.meta["order"]);
        }
        return orderA - orderB;
      });
    };
    Window_KigaeSlot.prototype.inAv = function () {
      return false;
    };
    Window_KigaeSlot.prototype.addArmor = function (armor, list, force) {
      if (!armor) {
        return;
      }
      if (!this._actor.canEquip(armor)) {
        return;
      }
      if (!armor.meta["initial"] && !force) {
        return;
      }
      if (armor.meta["eventItem"]) {
        if (!this._actor.hasAcce(armor.id)) {
          return false;
        }
      }
      if (armor.meta["avOnly"]) {
        if (!this.inAv()) {
          return;
        }
      }
      if (armor.meta["notAv"]) {
        if (this.inAv()) {
          return;
        }
      }
      if (this._type == "face") {
        if (armor.meta["face"]) {
          if (parseInt(armor.meta["face"]) >= 20) {
            if (parseInt(armor.meta["face"]) <= 30) {
              return;
            }
          }
          list.push(armor);
        }
        if (armor.meta["hoppe"] !== undefined) {
          list.push(armor);
        }
        if (armor.meta["highlight"] !== undefined) {
          list.push(armor);
        }
        if (armor.meta["namida"] !== undefined) {
          list.push(armor);
        }
        return;
      }
      if (this._type == "inner") {
        if (armor.meta["innerTop"]) {
          list.push(armor);
        }
        if (armor.meta["innerBottom"]) {
          list.push(armor);
        }
        return;
      }
      if (this._type == "rakugaki") {
        if (parseInt(armor.meta["rakugaki"]) >= 0) {
          if (this._type == "rakugaki") {
            if (armor.meta["rakugaki"] || armor.meta["editRakugaki"]) {
              list.push(armor);
            }
          } else {
            if (!armor.meta["rakugaki"] && !armor.meta["editRakugaki"]) {
              list.push(armor);
            }
          }
        }
        return;
      }
      if (this._type == "acce") {
        if (parseInt(armor.meta["rakugaki"]) >= 0) {
          return;
        }
        if (armor.meta["curse"]) {
          return;
        }
        if (parseInt(armor.meta["acce"]) >= 0) {
          list.push(armor);
        }
        return;
      }
      if (this._type == "curse") {
        if (armor.meta["curse"]) {
          list.push(armor);
        }
        return;
      }
      if (armor.meta["cos"]) {
        list.push(armor);
      }
      if (armor.meta["outer"]) {
        list.push(armor);
      }
      if (armor.meta["pose"]) {
        list.push(armor);
      }
      if (armor.meta["outerTop"]) {
        list.push(armor);
      }
      if (armor.meta["outerBottom"]) {
        list.push(armor);
      }
      if (armor.meta["arm"]) {
        list.push(armor);
      }
      if (armor.meta["leg"]) {
        list.push(armor);
      }
    };
    Window_KigaeSlot.prototype.maxItems = function () {
      if (!this._itemList) {
        return 0;
      }
      return this._itemList.length;
    };
    Window_KigaeSlot.prototype.armorName = function (armor) {
      if (ConfigManager.language == "en") {
        var nameEn = armor.meta["nameEn"];
        if (nameEn) {
          return nameEn;
        }
      }
      if (ConfigManager.language == "ch") {
        var nameCh = armor.meta["nameCh"];
        if (nameCh) {
          return nameCh;
        }
      }
      return armor.name;
    };
    Window_KigaeSlot.prototype.curseColor = function (armor) {
      {
        var mankoHenkeiLv = this.mankoHenkeiLv(armor.id);
        if (mankoHenkeiLv > 0) {
          var body = this._actor.realMankoHenkeiLv();
          if (!body) {
            return 0;
          }
          if (mankoHenkeiLv == body.level) {
            return 2;
          }
          return 0;
        }
      }
      {
        var mankoKuroLv = this.mankoKuroLv(armor.id);
        if (mankoKuroLv > 0) {
          var body = this._actor.realMankoKuroLv();
          if (!body) {
            return 0;
          }
          if (mankoKuroLv == body.level) {
            return 2;
          }
          return 0;
        }
      }
      {
        var analHenkeiLv = this.analHenkeiLv(armor.id);
        if (analHenkeiLv > 0) {
          var body = this._actor.realAnalGabaLv();
          if (!body) {
            return 0;
          }
          if (analHenkeiLv == body.level) {
            return 2;
          }
          return 0;
        }
      }
      {
        var chikubiKuroLv = this.chikubiKuroLv(armor.id);
        if (chikubiKuroLv > 0) {
          var body = this._actor.realChikubiKuroLv();
          if (!body) {
            return 0;
          }
          if (chikubiKuroLv == body.level) {
            return 2;
          }
          return 0;
        }
      }
      return 0;
    };
    Window_KigaeSlot.prototype.mankoHenkeiLv = function (acceId) {
      var acceMap = {
        1122: 1,
        1123: 2,
        1124: 3,
        1125: 4,
        1126: 5,
        1127: 6,
        1128: 7,
      };
      if (acceMap[acceId]) {
        return acceMap[acceId];
      }
      return -1;
    };
    Window_KigaeSlot.prototype.mankoKuroLv = function (acceId) {
      var acceMap = {
        1132: 1,
        1133: 2,
        1134: 3,
        1135: 4,
        1136: 5,
        1137: 6,
        1138: 7,
      };
      if (acceMap[acceId]) {
        return acceMap[acceId];
      }
      return -1;
    };
    Window_KigaeSlot.prototype.chikubiKuroLv = function (acceId) {
      var acceMap = {
        1152: 1,
        1153: 2,
        1154: 3,
        1155: 4,
        1156: 5,
        1157: 6,
        1158: 7,
      };
      if (acceMap[acceId]) {
        return acceMap[acceId];
      }
      return -1;
    };
    Window_KigaeSlot.prototype.analHenkeiLv = function (acceId) {
      var acceMap = {
        1142: 1,
        1143: 2,
        1144: 3,
        1145: 4,
        1146: 5,
      };
      if (acceMap[acceId]) {
        return acceMap[acceId];
      }
      return -1;
    };
    Window_KigaeSlot.prototype.drawItem = function (index) {
      var armor = this._itemList[index];
      var rect = this.itemRect(index);
      if (!this._actor) {
        return;
      }
      this.changePaintOpacity(this.isEnabled(armor));
      rect.x += 40 + 40;
      var acceIndex = parseInt(armor.meta["acce"]);
      var name = this.armorName(armor);
      this.drawIcon(armor.iconIndex, rect.x - 38, rect.y + 2);
      if (acceIndex >= 0) {
        var colorIndex = 0;
        if (armor.meta["curse"]) {
          colorIndex = this.curseColor(armor);
        }
        this.drawTextEx(
          "\\C[" + colorIndex + "]" + name + "\\C[0]",
          rect.x,
          rect.y,
          200
        );
        if (this._actor.acceMap[armor.id]) {
          this.drawEquip(rect.y, armor);
        }
      }
      var outerId = armor.meta["outer"];
      if (outerId) {
        if (outerId == "z") {
          this.drawTextEx("\\C[2]" + name + "\\C[0]", rect.x, rect.y, 200);
        } else {
          this.drawTextEx("\\C[24]" + name + "\\C[0]", rect.x, rect.y, 200);
          if (this._actor.outerId == outerId) {
            this.drawEquip(rect.y, armor);
          }
        }
      }
      var outerTopId = armor.meta["outerTop"];
      if (outerTopId) {
        this.drawTextEx("\\C[23]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.outerTopId == outerTopId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var outerBottomId = armor.meta["outerBottom"];
      if (outerBottomId) {
        this.drawTextEx("\\C[24]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.outerBottomId == outerBottomId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var faceId = parseInt(armor.meta["face"]);
      if (faceId) {
        this.drawTextEx("\\C[6]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.getDefaultFaceId() == faceId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var armId = armor.meta["arm"];
      if (armId) {
        this.drawTextEx("\\C[6]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.armId == armId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var legId = armor.meta["leg"];
      if (legId) {
        this.drawTextEx("\\C[5]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.legId == legId) {
          this.drawEquip(rect.y, armor);
        }
      }
      if (armor.meta["pose"]) {
        var poseId = this.selectPoseId(armor.meta["pose"]);
        this.drawTextEx("\\C[12]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.poseId == poseId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var hoppeId = parseInt(armor.meta["hoppe"]);
      if (hoppeId >= 0) {
        this.drawTextEx("\\C[12]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.getAcceHoppeId() == hoppeId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var namidaId = parseInt(armor.meta["namida"]);
      if (namidaId >= 0) {
        this.drawTextEx("\\C[12]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.getNamidaAcceId() == namidaId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var highlight = Math.trunc(armor.meta["highlight"]);
      if (highlight > 0) {
        this.drawTextEx("\\C[12]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (highlight == Hightlight.none) {
          if (this._actor.isNoHightlight()) {
            this.drawEquip(rect.y, armor);
          }
        } else if (highlight == Hightlight.bottom) {
          if (this._actor.isBottomHightlight()) {
            this.drawEquip(rect.y, armor);
          }
        } else {
          if (this._actor.isNormalHightlight()) {
            this.drawEquip(rect.y, armor);
          }
        }
      }
      var innerTopId = armor.meta["innerTop"];
      if (this._actor.boteId > 0 && armor.meta["innerTopBote"]) {
        innerTopId = armor.meta["innerTopBote"];
      }
      if (innerTopId) {
        this.drawTextEx("\\C[14]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.innerTopId == innerTopId) {
          this.drawEquip(rect.y, armor);
        }
      }
      var innerBottomId = armor.meta["innerBottom"];
      if (this._actor.boteId > 0 && armor.meta["innerBottomBote"]) {
        innerBottomId = armor.meta["innerBottomBote"];
      }
      if (innerBottomId) {
        this.drawTextEx("\\C[14]" + name + "\\C[0]", rect.x, rect.y, 200);
        if (this._actor.innerBottomId == innerBottomId) {
          this.drawEquip(rect.y, armor);
        }
      }
      //if (armor.meta['lock']) {
      if (this.isLocked(armor)) {
        this.drawLock(rect.y, this.isEnabled(armor));
        return;
      }
    };
    Window_KigaeSlot.prototype.selectPoseId = function (pose) {
      var original = parseInt(pose);
      if (original == 2 && this._actor.actorId() == 8) {
        return 5;
      }
      if (original == 2 && this._actor.actorId() == 17) {
        return 6;
      }
      return original;
    };
    Window_KigaeSlot.prototype.drawEquip = function (y) {
      var baseTexture = this.getBaseTexture();
      var texture = new PIXI.Texture(
        baseTexture,
        new PIXI.Rectangle(0, 36, 40, 36)
      );
      var sprite = new PIXI.Sprite(texture);
      sprite.x = 18;
      sprite.y = y + 12;
      this._windowContentsSprite.addChild(sprite);
    };
    Window_KigaeSlot.prototype.drawLock = function (y, isEnabled) {
      //this.drawIcon(Icon.lock, 35, y - 2);
      return;
      var baseTexture = this.getBaseTexture();
      var texture = new PIXI.Texture(
        baseTexture,
        new PIXI.Rectangle(0, 103, 40, 36)
      );
      var sprite = new PIXI.Sprite(texture);
      sprite.x = 22 + 28;
      sprite.y = y + 11;
      if (!isEnabled) {
        sprite.alpha = 0.4;
      }
      this._windowContentsSprite.addChild(sprite);
    };
    Window_KigaeSlot.prototype.drawCurse = function (y, isEnabled, armor) {
      /*var baseTexture = this.getBaseTexture();
            var texture = new PIXI.Texture(baseTexture, new PIXI.Rectangle(0,103, 40, 36));
            var sprite = new PIXI.Sprite(texture);
            sprite.x = 22 + 30;
            sprite.y = y + 12;
            if (! isEnabled) {
                sprite.alpha = 0.4;
            }
            this._windowContentsSprite.addChild(sprite);*/
      this.drawIcon(armor.iconIndex, 40, y);
    };
    Window_KigaeSlot.prototype.getBaseTexture = function () {
      var baseTexture = PIXI.utils.BaseTextureCache["system/skill_tree"];
      if (!baseTexture) {
        var bitmap = ImageManager.loadSystem("skill_tree");
        if (!bitmap.isReady()) {
          return;
        }
        baseTexture = new PIXI.BaseTexture(bitmap._image);
        baseTexture.resource.url = "system/skill_tree";
        PIXI.utils.BaseTextureCache["system/skill_tree"] = baseTexture;
      }
      return baseTexture;
    };
    Window_KigaeSlot.prototype.isEnabled = function (armor) {
      if (armor.meta["rotorNg"]) {
        return false;
      }
      if (this.isLocked(armor)) {
        return false;
      }
      /*if (this.isChinpoError(armor)) {
                return false;
            }*/
      return true;
    };
    Window_KigaeSlot.prototype.isLocked = function (armor) {
      if (!this._actor.isOpened(armor)) {
        return true;
      }
      if (armor.meta["curse"]) {
        if ($gameSwitches.value(66)) {
          return false;
        }
        return !this._actor.hasAcce(armor.id);
      }
      if (armor.meta["pierce"]) {
        return !$slg.facilityInfo().hasFacility(59);
      }
      if (armor.meta["sw2"]) {
        var sw = parseInt(armor.meta["sw2"]);
        return !$gameSwitches.value(sw);
      }
      if (armor.meta["sw"]) {
        if ($gameSystem.isEroAcceAllOpened()) {
          return false;
        }
        var sw = parseInt(armor.meta["sw"]);
        return !$gameSwitches.value(sw);
      }
      /*if (! this._actor.isObedienceOk(armor)) {
                return true;
            }
            if (! this._actor.isNastyOk(armor)) {
                return true;
            }*/
      if (armor.meta["rakugaki"]) {
        /*if (this._actor.isRakugakiEdited()) {
                    return false;
                }*/
        return false;
      }
      return false;
    };
    Window_KigaeSlot.prototype.isChinpoError = function (armor) {
      if (!armor.meta["chinpo"]) {
        return false;
      }
      return $gameActors.mainActor().hasAcce(221);
    };
    Window_KigaeSlot.prototype.decide = function () {
      var armor = this.armor();
      if (!this.isEnabled(armor)) {
        SoundManager.playBuzzer();
        return;
      }
      if (armor.meta["lock"]) {
        if (!$gameSystem.isEroAcceAllOpened()) {
          SoundManager.playBuzzer();
          return;
        }
      }
      if (armor.meta[CURSE]) {
        if (!$gameSwitches.value(66)) {
          SoundManager.playBuzzer();
          return;
        }
      }
      var group = parseInt(armor.meta["group"]);
      var acceId = parseInt(armor.meta["acce"]);
      if (acceId > 0) {
        if (armor.meta["syusan"]) {
          if (this._actor.countSyusan() == 0) {
            return;
          }
        }
      }
      if (group > 0) {
        this._actor.removeGroup(group, armor);
        return;
      }
      if (acceId === 0) {
        for (var i = 1001; i < 1100; i++) {
          if (this._actor.acceMap[i]) {
            this._actor.acceMap[i] = false;
          }
        }
      } else if (acceId === 100) {
        for (var i = 1101; i < 1120; i++) {
          if (this._actor.acceMap[i]) {
            this._actor.acceMap[i] = false;
          }
        }
      } else if (acceId > 0) {
        this._actor.acceMap[armor.id] = !this._actor.acceMap[armor.id];
      }
      var outerId = armor.meta["outer"];
      if (outerId) {
        if (outerId == "z") {
          for (var i = 1001; i < 1120; i++) {
            if (this._actor.acceMap[i]) {
              this._actor.acceMap[i] = false;
            }
          }
          this._actor.setOuterId("b");
          this._actor.setInnerTopId("b");
          this._actor.setInnerBottomId("b");
          this._actor.setPoseId(1);
          this._actor.setDefaultFaceId(1);
          this._actor.setNamidaAcce(0);
          this._actor.setAcceHoppeId(0);
          if (this._actor.actorId() == 8) {
            this._actor.setHightlight(Hightlight.bottom);
          } else {
            this._actor.setHightlight(Hightlight.normal);
          }
          return;
        }
        this._actor.setOuterId(outerId);
        if (outerId != "a" && outerId != "c") {
          if (this._actor.poseId > 1 && this._actor.poseId != 6) {
            this._actor.setPoseId(1);
          }
        }
      }
      var outerTopId = armor.meta["outerTop"];
      if (outerTopId) {
        this._actor.setOuterId("a");
        this._actor.setOuterTopId(outerTopId);
      }
      var outerBottomId = armor.meta["outerBottom"];
      if (outerBottomId) {
        this._actor.setOuterId("a");
        this._actor.setOuterBottomId(outerBottomId);
      }
      var faceId = parseInt(armor.meta["face"]);
      if (faceId > 0) {
        this._actor.setDefaultFaceId(faceId);
      }
      var hoppeId = parseInt(armor.meta["hoppe"]);
      if (hoppeId >= 0) {
        this._actor.setAcceHoppeId(hoppeId);
        //this._actor.resetFace();
      }
      var highlight = Math.trunc(armor.meta["highlight"]);
      if (highlight > 0) {
        this._actor.setHightlight(highlight);
      }
      var namida = Math.trunc(armor.meta["namida"]);
      if (namida >= 0) {
        this._actor.setNamidaAcce(namida);
      }
      if (armor.meta["pose"]) {
        var poseId = this.selectPoseId(armor.meta["pose"]);
        this._actor._poseId = poseId;
        if (poseId > 1 && this._actor.outerId != "c") {
          if (
            poseId == 3 &&
            this._actor.outerId == "b" &&
            this._actor.actorId() == 3
          ) {
            // ユヅキ用の特殊処理
            return;
          }
          if (poseId == 6) {
            // センリ用の特殊処理
            return;
          }
          this._actor.setOuterId("a");
        }
      }
      var innerTopId = armor.meta["innerTop"];
      if (this._actor.boteId > 1 && armor.meta["innerTopBote"]) {
        innerTopId = armor.meta["innerTopBote"];
      }
      if (innerTopId) {
        this._actor.setInnerTopId(innerTopId);
      }
      var innerBottomId = armor.meta["innerBottom"];
      if (this._actor.boteId > 1 && armor.meta["innerBottomBote"]) {
        innerBottomId = armor.meta["innerBottomBote"];
      }
      if (innerBottomId) {
        this._actor.setInnerBottomId(innerBottomId);
      }
      var armId = armor.meta["arm"];
      if (armId) {
        this._actor.setArmId(armId);
      }
      var legId = armor.meta["leg"];
      if (legId) {
        this._actor.setLegId(legId);
      }
    };
    Window_KigaeSlot.prototype.armor = function () {
      return this._itemList[this.index()];
    };
    Window_KigaeSlot.prototype.outerId = function () {
      var armor = this._itemList[this.index()];
      return armor.meta["outer"];
    };
    Window_KigaeSlot.prototype.outerTopId = function () {
      var armor = this._itemList[this.index()];
      return armor.meta["outerTop"];
    };
    Window_KigaeSlot.prototype.outerBottomId = function () {
      var armor = this._itemList[this.index()];
      return armor.meta["outerBottom"];
    };
    Window_KigaeSlot.prototype.armId = function () {
      var armor = this._itemList[this.index()];
      return armor.meta["arm"];
    };
    Window_KigaeSlot.prototype.legId = function () {
      var armor = this._itemList[this.index()];
      return armor.meta["leg"];
    };
    Window_KigaeSlot.prototype.acceId = function () {
      var armor = this._itemList[this.index()];
      return armor.meta["acce"];
    };
    Window_KigaeSlot.prototype.faceId = function () {
      var armor = this._itemList[this.index()];
      return armor.meta["face"];
    };
    Window_KigaeSlot.prototype.playOkSound = function () {
      var armor = this.armor();
      if (this.isEnabled(armor)) {
        SoundManager.playCursor();
      }
    };
    Window_KigaeSlot.prototype.selectAuto = function () {
      this.selectAutoParts("outer");
      this.selectAutoParts("pose");
      this.selectAutoParts("innerTop");
      this.selectAutoParts("innerBottom");
      this.selectAutoParts("face");
      this.selectAutoParts("hoppe");
    };
    Window_KigaeSlot.prototype.selectAutoParts = function (type) {
      var candidates = [];
      for (var _i = 0, _a = this._itemList; _i < _a.length; _i++) {
        var a = _a[_i];
        if (a.meta[type]) {
          if (this.isEnabled(a)) {
            candidates.push(a);
          }
        }
      }
      if (candidates.length == 0) {
        return;
      }
      var index = Math.randomInt(candidates.length);
      var armor = candidates[index];
      this.select(this.indexOf(armor));
      this.decide();
    };
    Window_KigaeSlot.prototype.indexOf = function (armor) {
      return this._itemList.indexOf(armor);
    };
    return Window_KigaeSlot;
  })(Window_Selectable);
  Nore.Window_KigaeSlot = Window_KigaeSlot;
  var Window_KigaeActor = /** @class */ (function (_super) {
    __extends(Window_KigaeActor, _super);
    function Window_KigaeActor() {
      var _this = _super.call(this, new Rectangle(590, 0, 800, 868)) || this;
      _this.opacity = 0;
      return _this;
    }
    Window_KigaeActor.prototype.setActor = function (actor) {
      this._actor = actor;
      this.refresh();
    };
    Window_KigaeActor.prototype.setNaked = function (b) {
      var changed = this._actor.setNaked(b);
      if (changed) {
        this.refresh();
      }
    };
    Window_KigaeActor.prototype.setNoInner = function (b) {
      if (this._noInner != b) {
        this._noInner = b;
        this._actor.setCacheChanged();
        this.refresh();
      }
    };
    Window_KigaeActor.prototype.refresh = function () {
      this.contents.clear();
      this._windowContentsSprite.removeChildren();
      //var actor = JsonEx.makeDeepCopy(this._actor);
      var actor = this._actor;
      if (this._noInner) {
        actor.setInnerTopId("a");
        actor.setInnerBottomId("a");
      }
      actor.setCacheChanged();
      this.drawTachieActor(
        actor,
        this._windowContentsSprite,
        40,
        -100,
        null,
        actor.getDefaultFaceId(),
        1,
        false
      );
    };
    Window_KigaeActor.prototype.drawTexts = function (texts) {
      this.contents.clearRect(40, 10, 580, 70);
      this.changeTextColor(ColorManager.textColor(2));
      var yy = 10;
      for (var _i = 0, texts_1 = texts; _i < texts_1.length; _i++) {
        var t = texts_1[_i];
        this.drawText(t, 40, yy, 580, "left");
        yy += this.lineHeight();
      }
    };
    return Window_KigaeActor;
  })(Window_Base);
  var Window_KigaeOmanko = /** @class */ (function (_super) {
    __extends(Window_KigaeOmanko, _super);
    function Window_KigaeOmanko() {
      var _this = _super.call(this, new Rectangle(590, 0, 800, 868)) || this;
      _this.opacity = 0;
      return _this;
    }
    Window_KigaeOmanko.prototype.setActor = function (actor) {
      this._actor = actor;
      this._eroStatus = new EroStatus(this._actor.actorId());
      this._mankoSprite = new Nore.MankoSprite(this._eroStatus);
      this._mankoSprite.x = 150;
      this._mankoSprite.y = 200;
      this.addChild(this._mankoSprite);
    };
    Window_KigaeOmanko.prototype.refresh = function () {
      this._mankoSprite.refresh();
    };
    Window_KigaeOmanko.prototype.drawTexts = function (texts) {};
    return Window_KigaeOmanko;
  })(Window_Base);
  var Window_Label2 = /** @class */ (function (_super) {
    __extends(Window_Label2, _super);
    function Window_Label2(text, x, y, w) {
      if (w === void 0) {
        w = 370;
      }
      var _this = _super.call(this, new Rectangle(x, y, w, 60)) || this;
      _this.drawText(text, 2, 0, w - 30, "left");
      return _this;
    }
    return Window_Label2;
  })(Window_Base);
  Nore.Window_Label2 = Window_Label2;
  var Window_Label3 = /** @class */ (function (_super) {
    __extends(Window_Label3, _super);
    function Window_Label3(text, x, y, w) {
      if (w === void 0) {
        w = 570;
      }
      var _this = _super.call(this, new Rectangle(x, y, w, 60)) || this;
      _this.changeTextColor(ColorManager.deathColor());
      _this.drawText(text, 2, 0, w, "left");
      return _this;
    }
    Window_Label3.prototype.setText = function (text) {
      this.contents.clear();
      this.changeTextColor(ColorManager.systemColor());
      this.drawText(text, 2, 0, this.width, "left");
    };
    Window_Label3.prototype.hideFrame = function () {
      this.frameVisible = false;
      this.backOpacity = 0;
    };
    return Window_Label3;
  })(Window_Base);
  Nore.Window_Label3 = Window_Label3;
})(Nore || (Nore = {}));


code:
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_ActorCharacter = /** @class */ (function (_super) {
  __extends(Sprite_ActorCharacter, _super);
  function Sprite_ActorCharacter(character, cos) {
    var _this = this;
    if (!cos || !(cos instanceof CostumeSaver)) {
      throw new Error();
    }
    _this = _super.call(this, character) || this;
    _this._cos = cos;
    _this._meganeLayer = new Sprite_LayeredCharacter(
      character,
      EquipType.megane,
      cos
    );
    _this._hoppeLayer = new Sprite_LayeredCharacter(
      character,
      EquipType.hoppe,
      cos
    );
    _this._innerBottomLayer = new Sprite_LayeredCharacter(
      character,
      EquipType.innerBottom,
      cos
    );
    _this._innerTopLayer = new Sprite_LayeredCharacter(
      character,
      EquipType.innerTop,
      cos
    );
    _this._outerLayer = new Sprite_LayeredCharacter(
      character,
      EquipType.outer,
      cos
    );
    _this._legLayer = new Sprite_LayeredCharacter(
      character,
      EquipType.leg,
      cos
    );
    _this.addChild(_this._innerBottomLayer);
    _this.addChild(_this._innerTopLayer);
    _this.addChild(_this._outerLayer);
    _this.addChild(_this._legLayer);
    _this.addChild(_this._hoppeLayer);
    _this.addChild(_this._meganeLayer);
    _this._colorFilter = new ColorFilter();
    if (!_this.filters) {
      _this.filters = [];
    }
    _this._monoToneColor = [40, 40, 40, 190];
    _this.filters.push(_this._colorFilter);
    return _this;
  }
  Sprite_ActorCharacter.prototype.isEmptyCharacter = function () {
    if (this._character == $gamePlayer) {
      return false;
    }
    if (!this._character.characterName()) {
      return true;
    }
    return _super.prototype.isEmptyCharacter.call(this);
  };
  Sprite_ActorCharacter.prototype.update = function () {
    _super.prototype.update.call(this);
    this.updateCostume();
    this.updateVisible();
  };
  Sprite_ActorCharacter.prototype.updateCostume = function () {
    var actorId = $gameVariables.value(135);
    if (actorId == 0) {
      return;
    }
    if (this._cos.actorId() == actorId) {
      this.refreshCostume();
      $gameVariables.setValue(135, 0);
    }
  };
  Sprite_ActorCharacter.prototype.updateVisible = function () {
    if (this._character && this._character._characterIndex == 7) {
      this.visible = false;
    } else {
      this.updateVisibility();
    }
  };
  Sprite_ActorCharacter.prototype.refreshCostume = function () {
    this._cos = new CostumeSaver(this._cos.actorId());
    this._outerLayer.refreshCostume(this._cos);
  };
  Sprite_ActorCharacter.prototype.updateBitmap = function () {
    this.updateTone();
    if (this.isImageChanged()) {
      this._initialized = true;
      this._characterName = this.characterName();
      this._characterIndex = this.characterIndex();
      this.setCharacterBitmap();
    }
  };
  Sprite_ActorCharacter.prototype.characterIndex = function () {
    return 0;
  };
  Sprite_ActorCharacter.prototype.updateTone = function () {
    if (!this._character.isMonoTone) {
      return;
    }
    if (this._character.isMonoTone()) {
      this._colorFilter.setBlendColor(this._monoToneColor);
    } else {
      this._colorFilter.setBlendColor([0, 0, 0, 0]);
    }
  };
  Sprite_ActorCharacter.prototype.isImageChanged = function () {
    if (this._initialized) {
      return this._characterName != this.characterName();
    }
    return true;
  };
  Sprite_ActorCharacter.prototype.characterName = function () {
    var actorId = this._cos.actorId();
    var fileName = "actor" + actorId.padZero(2);
    if (actorId > 90) {
      return "";
    }
    if (this._cos.boteId() >= 1) {
      return fileName + "_base-bote";
    } else {
      if (this._cos.actorId() == 7) {
        if (this._cos.hasAcce(1091)) {
          return fileName + "_base2";
        }
        return fileName + "_base";
      }
      return fileName + "_base";
    }
  };
  Sprite_ActorCharacter.prototype.updateOther = function () {
    this.opacity = this._character.opacity();
    this.blendMode = this._character.blendMode();
    //this._bushDepth = this._character.bushDepth();
  };
  Sprite_ActorCharacter.prototype.listFiles = function () {
    var files = [];
    files.push(this._characterName);
    files.push(this._hoppeLayer.fileName());
    files.push(this._innerBottomLayer.fileName());
    files.push(this._innerTopLayer.fileName());
    files.push(this._legLayer.fileName());
    files.push(this._outerLayer.fileName());
    files.push(this._meganeLayer.fileName());
    return files;
  };
  Sprite_ActorCharacter.prototype.characterBlockX = function () {
    var index = this._characterIndex;
    return (index % 4) * 3;
  };
  Sprite_ActorCharacter.prototype.characterBlockY = function () {
    var index = this._characterIndex;
    return Math.floor(index / 4) * 4;
  };
  return Sprite_ActorCharacter;
})(Sprite_Character);
var Sprite_Follower = /** @class */ (function (_super) {
  __extends(Sprite_Follower, _super);
  function Sprite_Follower() {
    return (_super !== null && _super.apply(this, arguments)) || this;
  }
  Sprite_Follower.prototype.update = function () {
    _super.prototype.update.call(this);
    this.visible = this._character.isVisible();
  };
  return Sprite_Follower;
})(Sprite_ActorCharacter);
var Sprite_Player = /** @class */ (function (_super) {
  __extends(Sprite_Player, _super);
  function Sprite_Player() {
    return (_super !== null && _super.apply(this, arguments)) || this;
  }
  Sprite_Player.prototype.characterName = function () {
    var actor;
    if ($gameSystem.sarachiActorId() > 0) {
      actor = $gameActors.actor(18);
      this._meganeLayer.visible = false;
      this._hoppeLayer.visible = false;
      this._innerBottomLayer.visible = false;
      this._innerTopLayer.visible = false;
      this._outerLayer.visible = false;
      this._legLayer.visible = false;
      //}
      //else if ($gamePlayer.followers().isVisible()) {
      //    actor = $gameParty.battleMembers()[0];
    } else if ($gameSystem.isNekoPlayer()) {
      return "Nature";
    } else {
      actor = $gamePlayer.mainActor();
    }
    var fileName = "actor" + actor.actorId().padZero(2);
    if (actor.boteId >= 1) {
      return fileName + "_base-bote";
    } else {
      return fileName + "_base";
    }
  };
  Sprite_Player.prototype.characterIndex = function () {
    if ($gameSystem.isNekoPlayer()) {
      return 1;
    }
    return _super.prototype.characterIndex.call(this);
  };
  return Sprite_Player;
})(Sprite_ActorCharacter);
var Sprite_Prisoner = /** @class */ (function (_super) {
  __extends(Sprite_Prisoner, _super);
  function Sprite_Prisoner() {
    return (_super !== null && _super.apply(this, arguments)) || this;
  }
  Sprite_Prisoner.prototype.updateCharacterFrame = function () {
    var pw = this.patternWidth();
    var ph = this.patternHeight();
    var sx = (this.characterBlockX() + this.characterPatternX()) * pw;
    var sy = (this.characterBlockY() + this.characterPatternY()) * ph;
    this.updateHalfBodySprites();
    var hh = ph - 28;
    this.setFrame(sx, sy, pw, hh);
    this._outerLayer.setFrame(sx, sy, pw, hh);
    this._innerBottomLayer.setFrame(sx, sy, pw, hh);
    this._innerTopLayer.setFrame(sx, sy, pw, hh);
    this._legLayer.setFrame(sx, sy, pw, hh);
    this._hoppeLayer.setFrame(sx, sy, pw, hh);
    this._meganeLayer.setFrame(sx, sy, pw, hh);
  };
  return Sprite_Prisoner;
})(Sprite_ActorCharacter);
var EquipType;
(function (EquipType) {
  EquipType[(EquipType["megane"] = 0)] = "megane";
  EquipType[(EquipType["hoppe"] = 1)] = "hoppe";
  EquipType[(EquipType["outer"] = 2)] = "outer";
  EquipType[(EquipType["outerTop"] = 3)] = "outerTop";
  EquipType[(EquipType["outerBottom"] = 4)] = "outerBottom";
  EquipType[(EquipType["head"] = 5)] = "head";
  EquipType[(EquipType["head2"] = 6)] = "head2";
  EquipType[(EquipType["leg"] = 7)] = "leg";
  EquipType[(EquipType["arm"] = 8)] = "arm";
  EquipType[(EquipType["innerBottom"] = 9)] = "innerBottom";
  EquipType[(EquipType["innerTop"] = 10)] = "innerTop";
})(EquipType || (EquipType = {}));
var Sprite_LayeredCharacter = /** @class */ (function (_super) {
  __extends(Sprite_LayeredCharacter, _super);
  function Sprite_LayeredCharacter(character, _type, _cos) {
    var _this = _super.call(this, character) || this;
    _this._type = _type;
    _this._cos = _cos;
    return _this;
  }
  Sprite_LayeredCharacter.prototype.updateBitmap = function () {
    if (this.isImageChanged()) {
      this._fileName = this.fileName();
      this._characterName = this._fileName;
      this._characterIndex = 0;
      this.setCharacterBitmap();
    }
  };
  Sprite_LayeredCharacter.prototype.refreshCostume = function (cos) {
    this._cos = cos;
  };
  Sprite_LayeredCharacter.prototype.updatePosition = function () {
    this.x = 0;
    this.y = 0;
    this.z = 0;
  };
  Sprite_LayeredCharacter.prototype.isImageChanged = function () {
    return this._fileName != this.fileName();
  };
  Sprite_LayeredCharacter.prototype.fileNameActor7 = function () {
    return "";
  };
  Sprite_LayeredCharacter.prototype.fileName = function () {
    var cos = this._cos;
    if (!cos) {
      console.error("actornas");
      return "";
    }
    if (cos.isNull()) {
      return "";
    }
    var bote = "";
    if (cos.boteId() >= 1) {
      bote = "-bote";
    }
    var actorStr = cos.actorId().padZero(2);
    switch (this._type) {
      case EquipType.hoppe:
        if (cos.actorId() == 1 || cos.actorId() == 3 || cos.actorId() == 5) {
          return "";
        }
        if (cos.hoppeId() <= 0) {
          return "";
        }
        if (this._cos.actorId() == 7) {
          if (this._cos.hasAcce(1091)) {
            return "actor0%1_hoppe2".format(cos.actorId());
          }
        }
        return "actor%1_hoppe".format(cos.actorId().padZero(2));
      //return 'actor0%1_hoppe'.format(1);
      case EquipType.outer:
        if (cos.outerId() == "a") {
          return "";
        }
        if (cos.outerId() == "g") {
          return "";
        }
        if (cos.outerId() == "c") {
          return "";
        }
        if (cos.outerId() == "b") {
          if (this._cos.actorId() == 7) {
            if (this._cos.hasAcce(1091)) {
              return (
                "actor%2_outer_%1_2".format(cos.outerId(), actorStr) + bote
              );
            }
          }
        }
        return "actor%2_outer_%1".format(cos.outerId(), actorStr) + bote;
      case EquipType.megane:
        if (!cos.hasAcce(1099)) {
          return "";
        }
        return "actor%1_megane".format(actorStr);
      case EquipType.leg:
        if (cos.legId() == "a") {
          return "";
        }
        return "actor%2_leg_%1".format(cos.legId(), actorStr);
      /*case EquipType.arm:
                if (actor.armId == 'a') {
                    return '';
                }
                return 'actor%2_arm_%1'.format(actor.armId, actorStr);*/
      case EquipType.innerBottom:
        if (cos.actorId() == 1 || cos.actorId() == 3 || cos.actorId() == 5) {
          return "";
        }
        switch (cos.innerBottomId()) {
          case "a":
          case "f":
          case "g":
          case "h":
            return "";
        }
        switch (cos.outerId()) {
          case "b":
            return "";
        }
        return (
          "actor%2_innerBottom_%1".format(cos.innerBottomId(), actorStr) + bote
        );
      case EquipType.innerTop:
        if (cos.actorId() == 1 || cos.actorId() == 3 || cos.actorId() == 5) {
          return "";
        }
        if (cos.innerTopId() == "a") {
          return "";
        }
        switch (cos.outerId()) {
          case "b":
          case "g":
            return "";
        }
        return "actor%2_innerTop_%1".format(cos.innerTopId(), actorStr) + bote;
    }
  };
  return Sprite_LayeredCharacter;
})(Sprite_Character);
Spriteset_Map.prototype.createCharacters = function () {
  this._characterSprites = [];
  for (var _i = 0, _a = $gameMap.events(); _i < _a.length; _i++) {
    var event_1 = _a[_i];
    //p(event.characterName())
    //p(event)
    if ($gameParty.isLayeredCharacterEnabledMap()) {
      var result = event_1.characterName().match(/actor([0-9/]+)/);
      if (result) {
        var actorId = Math.trunc(result[1]);
        if (isLayerdActor(actorId)) {
          //p('layertd' + actorId)
          var cos_1 = new CharacterCostume(actorId);
          this._characterSprites.push(
            new Sprite_ActorCharacter(event_1, cos_1)
          );
          continue;
        }
      }
    }
    if (isDouseiManEvent(event_1)) {
      this._characterSprites.push(new Sprite_DouseiMan(event_1));
    } else if (isBabyCharacterEvent(event_1)) {
      this._characterSprites.push(new Sprite_BabyCharacter(event_1));
    } else if (isAvManEvent(event_1)) {
      this._characterSprites.push(new Sprite_AvMan(event_1));
    } else if (isKaijinEvent(event_1)) {
      this._characterSprites.push(new Sprite_Kaijin(event_1));
    } else {
      this._characterSprites.push(new Sprite_Character(event_1));
    }
  }
  for (var _b = 0, _c = $gameMap.vehicles(); _b < _c.length; _b++) {
    var vehicle = _c[_b];
    this._characterSprites.push(new Sprite_Character(vehicle));
  }
  for (
    var _d = 0, _e = $gamePlayer.followers().reverseData();
    _d < _e.length;
    _d++
  ) {
    var follower = _e[_d];
    if (follower.actor()) {
      var cos_2 = new CostumeSaver(follower.actor().actorId());
      this._characterSprites.push(new Sprite_Follower(follower, cos_2));
    }
  }
  var cos;
  if ($gameSystem.isNekoPlayer()) {
    cos = new CostumeSaver(-1);
  } else if ($gamePlayer.followers().isVisible()) {
    cos = new CharacterCostume($gameParty.battleMembers()[0].actorId());
  } else {
    cos = new CharacterCostume($gamePlayer.mainActor().actorId());
  }
  this._characterSprites.push(new Sprite_Player($gamePlayer, cos));
  for (var _f = 0, _g = this._characterSprites; _f < _g.length; _f++) {
    var sprite = _g[_f];
    this._tilemap.addChild(sprite);
  }
};
function isLayerdActor(actorId) {
  return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17].contains(actorId);
}


code:
/*:ja
 * @target MZ
 * @author ル
 *
 * @command ShowAnimation
 *
 * @command ShowAnimationGacha
 */
var Nore;
(function (Nore) {
  var pluginName = "Nore_Layout";
  PluginManager.registerCommand(pluginName, "ShowAnimation", function (args) {
    SceneManager._scene._spriteset.addEffectCountainer();
  });
  PluginManager.registerCommand(
    pluginName,
    "ShowAnimationGacha",
    function (args) {
      SceneManager._scene._spriteset.showEffectCountainerGacha();
    }
  );
  Window_ChoiceList.prototype.windowX = function () {
    var offset = 728;
    switch ($gameVariables.value(18)) {
      case 0:
        return 180 + offset - this.windowWidth();
      case 1:
        return 330 + offset - this.windowWidth();
      case 2:
        return 630 + offset - this.windowWidth();
      case 4:
        return 530 + offset - this.windowWidth();
      case 3:
      case 7:
        return 0 + offset - this.windowWidth() - 200;
    }
    var positionType = $gameMessage.choicePositionType();
    if (positionType === 1) {
      return (Graphics.boxWidth - this.windowWidth()) / 2;
    } else if (positionType === 2) {
      return Graphics.boxWidth - this.windowWidth() - 300;
    } else {
      return 0;
    }
  };
  Window_ChoiceList.prototype.createCancelButton = function () {
    if (ConfigManager.touchUI) {
      this._cancelButton = new Sprite_Button2("cancel", true);
      this._cancelButton.visible = false;
      this.addChild(this._cancelButton);
    }
  };
  Game_Screen.prototype.maxPictures = function () {
    return 30;
  };
  Window_StatusBase.prototype.drawActorSimpleStatus = function (actor, x, y) {
    var lineHeight = this.lineHeight();
    var x2 = x + 180;
    var x3 = x2 + 180;
    this.drawActorName(actor, x, y);
    this.drawActorLevel(actor, x, y + lineHeight * 1);
    this.drawActorIcons(actor, x, y + lineHeight * 2);
    this.drawActorNickname(actor, x, y - lineHeight, 270);
    this.drawActorClass(actor, x2, y);
    this.placeBasicGauges(actor, x2, y + lineHeight);
  };
  Scene_Message.prototype.messageWindowRect = function () {
    var ww = Graphics.boxWidth - 280;
    var wh = 140;
    var wx = 200;
    var wy = 0;
    return new Rectangle(wx, wy, ww, wh);
  };
  Window_ChoiceList.prototype.windowY = function () {
    var messageY = this._messageWindow.y;
    if (messageY >= Graphics.boxHeight / 2) {
      return messageY - this.windowHeight() - 20;
    } else {
      return messageY + this._messageWindow.height - 20;
    }
  };
  /*
    Spriteset_Map.prototype.createUpperLayer = function() {
        Spriteset_Base.prototype.createUpperLayer.call(this);
        this.addChild(this._effectsContainer);
    };*/
  Spriteset_Map.prototype.showEffectCountainerGacha = function () {
    this._effectsContainer = this._tilemap;
  };
  Spriteset_Map.prototype.addEffectCountainer = function () {
    this.addChild(this._effectsContainer);
  };
  Game_Screen.prototype.updateFadeOut = function () {
    if (this._fadeOutDuration > 0) {
      if (isSkipKey()) {
        this._brightness = 0;
        this._fadeOutDuration = 0;
      } else {
        var d = this._fadeOutDuration;
        this._brightness = (this._brightness * (d - 1)) / d;
        this._fadeOutDuration--;
      }
    }
  };
  Game_Screen.prototype.updateFadeIn = function () {
    if (this._fadeInDuration > 0) {
      if (isSkipKey()) {
        this._brightness = 255;
        this._fadeInDuration = 0;
      } else {
        var d = this._fadeInDuration;
        this._brightness = (this._brightness * (d - 1) + 255) / d;
        this._fadeInDuration--;
      }
    }
  };
  var _Game_Interpreter_prototype_wait = Game_Interpreter.prototype.wait;
  Game_Interpreter.prototype.wait = function (duration) {
    if (isSkipKey()) {
      //duration = Math.trunc(duration / 2);
    }
    _Game_Interpreter_prototype_wait.call(this, duration);
  };
  var _Game_Picture_prototype_updateMove = Game_Picture.prototype.updateMove;
  Game_Picture.prototype.updateMove = function () {
    if (this._duration > 0) {
      if (isSkipKey()) {
        this._duration = 1;
        this._x = this.applyEasing(this._x, this._targetX);
        this._y = this.applyEasing(this._y, this._targetY);
        this._scaleX = this.applyEasing(this._scaleX, this._targetScaleX);
        this._scaleY = this.applyEasing(this._scaleY, this._targetScaleY);
        this._opacity = this.applyEasing(this._opacity, this._targetOpacity);
        this._duration--;
      } else {
        _Game_Picture_prototype_updateMove.call(this);
      }
    }
  };
})(Nore || (Nore = {}));


code:
/*:ja
 * @target MZ
 */
var Nore;
(function (Nore) {
  Nore.TEMP_SWITCH1 = 20;
  Nore.TEMP_VAR1 = 20;
  Nore.applyMyMethods = function (myClass, presetClass, applyConstructor) {
    for (var p_1 in myClass.prototype) {
      if (myClass.prototype.hasOwnProperty(p_1)) {
        if (p_1 === "constructor" && !applyConstructor) {
          continue;
        }
        Object.defineProperty(
          presetClass.prototype,
          p_1,
          Object.getOwnPropertyDescriptor(myClass.prototype, p_1)
        );
        //presetClass.prototype[p] = myClass.prototype[p];
      }
    }
  };
  Nore.toIntArray = function (list) {
    var ret = [];
    for (var i = 0; i < list.length; i++) {
      ret[i] = parseInt(list[i]);
    }
    return ret;
  };
  Nore.toIntArrayByStr = function (str, minLength) {
    if (minLength === void 0) {
      minLength = 0;
    }
    var ret = [];
    for (var i = 0; i < minLength; i++) {
      ret[i] = 0;
    }
    if (!str) {
      return ret;
    }
    var list = str.split(",");
    for (var i = 0; i < list.length; i++) {
      ret[i] = parseInt(list[i]);
      if (isNaN(ret[i])) {
        ret[i] = 0;
      }
    }
    return ret;
  };
  Nore.parseIntValue = function (value, defaultValue) {
    var intNum = parseInt(value);
    if (isNaN(intNum)) {
      return defaultValue;
    } else {
      return intNum;
    }
  };
})(Nore || (Nore = {}));
function hankaku2Zenkaku(str) {
  return (str + "").replace(/[A-Za-z0-9]/g, function (s) {
    return String.fromCharCode(s.charCodeAt(0) + 0xfee0);
  });
}
function rnorm() {
  return (
    Math.sqrt(-2 * Math.log(1 - Math.random())) *
    Math.cos(2 * Math.PI * Math.random())
  );
}


code:
/*:ja
 * @target MZ
 * @author ル
 *
 * @command add
 * @text 男優追加
 * @des 男優追加
 * @arg actorId
 * @type number
 * @text actorId
 * @desc actorId
 *
 * @command reload
 * @text 男優リロード
 * @des 男優リロード
 *
 * @command setNameToVar
 * @text 変数60に男優の名前を設定
 * @arg actorId
 * @type number
 * @text actorId
 * @desc actorId
 *
 * @command newManEvent
 * @text 新規男優のイベント(実行時sw 20がONになる)
 *
 * @command runManEvent
 * @text 男優会話のイベント
 * @arg actorId
 * @type number
 * @text actorId
 * @desc actorId
 */
var Nore;
(function (Nore) {
  var pluginName = "Nore_Man";
  PluginManager.registerCommand(pluginName, "add", function (args) {
    var actorId = parseInt(args.actorId);
    if (!$slg.manInfo().contains(actorId)) {
      $slg.manInfo().addMan(actorId);
    }
  });
  PluginManager.registerCommand(pluginName, "reload", function (args) {
    var soupKichen = $slg.facilityInfo().findFacility(FacilityId.soupKichen);
    if (!soupKichen) {
      return;
    }
    $slg.manInfo().soupKichen().reload();
  });
  PluginManager.registerCommand(pluginName, "setNameToVar", function (args) {
    var actorId = parseInt(args.actorId);
    var name = $gameActors.actor(actorId).name();
    $gameVariables.setValue(60, name);
  });
  PluginManager.registerCommand(pluginName, "newManEvent", function (args) {
    var manId = $slg.manInfo().nextHireManId();
    if (manId <= 0) {
      return;
    }
    var manName = $gameActors.actor(manId).nameJp();
    $gameVariables.setValue(52, manName);
    $gameVariables.setValue(55, manId);
    var manScenario = $slg.manInfo().manScenario(manId, 1);
    if (this.runDouseiScenario(manScenario)) {
      $slg.manInfo().onManSwitch(manId);
      $gameSwitches.setValue(20, true);
    }
  });
  PluginManager.registerCommand(pluginName, "runManEvent", function (args) {
    var manId = parseInt(args.actorId);
    var manScenario = $slg.manInfo().manScenario(manId, 2);
    var manName = $gameActors.actor(manId).name();
    $gameVariables.setValue(52, manName);
    $gameVariables.setValue(55, manId);
    if (this.runDouseiScenario(manScenario)) {
    }
  });
})(Nore || (Nore = {}));
var ManInfo = /** @class */ (function () {
  function ManInfo() {
    this._manIdList = [];
    this.addMan(18);
    this.addMan(20);
  }
  ManInfo.prototype.nextHireManId = function () {
    this._finishedEventMap = this._finishedEventMap || [];
    for (var _i = 0, _a = this._manIdList; _i < _a.length; _i++) {
      var manId = _a[_i];
      if (this._finishedEventMap[manId]) {
        continue;
      }
      if (this.hasManEvent(manId)) {
        this._finishedEventMap[manId] = true;
        return manId;
      }
    }
    return -1;
  };
  ManInfo.prototype.onManSwitch = function (manId) {
    var sw = this.manSwitch(manId);
    if (sw > 0) {
      $gameSwitches.setValue(sw, true);
    } else {
      console.error(manId + "のスイッチが見つかりません");
    }
  };
  ManInfo.prototype.manSwitch = function (manId) {
    switch (manId) {
      case 50:
        return 501; // ヌマオ
      case 51:
        return 502; // シゲさん
      case 52:
        return 503; // むなし
      case 53:
        return 504; // ノッブ
      case 54:
        return 505; // 鈴木 ゴンゾウ
      case 55:
        return 506; // アナルのヤシチ
      case 56:
        return 507; // ゴンザレス
      case 57:
        return 508; // アンドレ
      case 61:
        return 509; // 鉄橋下の帝王
      case 22:
        return 510; // デブオ
      case 48:
        return 511; // クズオ
      case 49:
        return 512; // ガリオ
      case 2:
        return 513; // タクオ
      case 1:
        return 514; // シンジ
      case 24:
        return 515; // 田吾作
    }
    return -1;
  };
  ManInfo.prototype.hasManEvent = function (manId) {
    return this.manScenario(manId, 1) != null;
  };
  ManInfo.prototype.manScenario = function (manId, index) {
    var actor = $gameActors.actor(manId);
    var name = actor.nameJp().replace(" ", "_");
    var scenarioBase = "男優_%1_0" + index;
    var scenarioName = scenarioBase.format(name);
    if ($dataScenario && $dataScenario[scenarioName]) {
      return scenarioName;
    }
  };
  ManInfo.prototype.manList = function () {
    var result = [];
    for (var _i = 0, _a = this._manIdList; _i < _a.length; _i++) {
      var actorId = _a[_i];
      result.push($gameActors.actor(actorId));
    }
    return result;
  };
  ManInfo.prototype.addMan = function (actorId) {
    if (this._manIdList.contains(actorId)) {
      console.error("既に" + actorId + "は加わっています");
      return;
    }
    this._manIdList.push(actorId);
  };
  ManInfo.prototype.soupKichen = function () {
    this._soupKichen = this._soupKichen || new SoupKichen();
    return this._soupKichen;
  };
  ManInfo.prototype.hire = function (man) {
    p("hire:" + man.id());
    this._hireCount = this._hireCount || 0;
    this._hireCount++;
    this._manIdList.push(man.id());
    this._soupKichen.hire(man.id());
    $gameActors.actor(man.id()).setupEroParams();
    if (man.id() == 1) {
      $gameSwitches.setValue(284, true);
    }
  };
  ManInfo.prototype.contains = function (id) {
    return this._manIdList.contains(id);
  };
  ManInfo.prototype.hireCount = function () {
    this._hireCount = this._hireCount || 0;
    return this._hireCount;
  };
  return ManInfo;
})();
var TUTO_MAN_ID = 50;
var YANG_MAN_ID = 60;
var DEBUO_MAN_ID = 22;
var KUZUO_MAN_ID = 48;
var GARIO_MAN_ID = 49;
var SoupKichen = /** @class */ (function () {
  function SoupKichen() {
    this.reload();
  }
  SoupKichen.prototype.level = function () {
    if (!$slg.facilityInfo().isFacilityExists(FacilityId.soupKichen)) {
      return 0;
    }
    return $slg.facilityInfo().findMaxFacilityLevel(FacilityType.soupKitchen);
  };
  SoupKichen.prototype.reload = function () {
    this._manIdList = [];
    var candidates = this.candidates();
    candidates = Nore.shuffle(candidates);
    for (var i = 0; i < this.maxCandidaets(); i++) {
      if (candidates.length == 0) {
        break;
      }
      this._manIdList.push(candidates.shift());
    }
    this.addTutorialMan(this._manIdList);
    //this.addYang(this._manIdList);
    this.addDebuo(this._manIdList);
    this.addKuzuo(this._manIdList);
    this.addGario(this._manIdList);
    $slg.removeTimeGaugeEventType(TimeGaugeEventType.soupKichen);
    if (!this.isEmptyOrFixed()) {
      var time = $slg.facilityInfo().calcSoupKichenReloadTime();
      $slg.addTimeGaugeEvent(new SoupKichenTimeGaugeEvent(time));
    }
  };
  SoupKichen.prototype.maxCandidaets = function () {
    switch (this.level()) {
      case 1:
        return 2;
      case 2:
        return 3;
      case 3:
        return 4;
      default:
        return 5;
    }
  };
  SoupKichen.prototype.candidates = function () {
    var result = [];
    var level = this.level();
    for (var key in MAN_PARAMS) {
      var man = MAN_PARAMS[key];
      if (man.level == 0) {
        continue;
      }
      if (man.level > level) {
        continue;
      }
      if ($slg.manInfo().contains(parseInt(key))) {
        continue;
      }
      result.push(parseInt(key));
    }
    return result;
  };
  SoupKichen.prototype.addYang = function (list) {
    if (!$gameSwitches.value(253)) {
      return;
    }
    if ($slg.manInfo().contains(YANG_MAN_ID)) {
      return;
    }
    if (list.contains(YANG_MAN_ID)) {
      return;
    }
    list.push(YANG_MAN_ID);
  };
  SoupKichen.prototype.addTutorialMan = function (list) {
    if ($slg.manInfo().contains(TUTO_MAN_ID)) {
      return;
    }
    if (list.contains(TUTO_MAN_ID)) {
      return;
    }
    list.push(TUTO_MAN_ID);
  };
  SoupKichen.prototype.addDebuo = function (list) {
    if (!$gameSwitches.value(269)) {
      return;
    }
    if ($slg.manInfo().contains(DEBUO_MAN_ID)) {
      return;
    }
    if (list.contains(DEBUO_MAN_ID)) {
      return;
    }
    list.push(DEBUO_MAN_ID);
  };
  SoupKichen.prototype.addKuzuo = function (list) {
    if (!$gameSwitches.value(267)) {
      return;
    }
    if ($slg.manInfo().contains(KUZUO_MAN_ID)) {
      return;
    }
    if (list.contains(KUZUO_MAN_ID)) {
      return;
    }
    list.push(KUZUO_MAN_ID);
  };
  SoupKichen.prototype.addGario = function (list) {
    if (!$gameSwitches.value(270)) {
      return;
    }
    if ($slg.manInfo().contains(GARIO_MAN_ID)) {
      return;
    }
    if (list.contains(GARIO_MAN_ID)) {
      return;
    }
    list.push(GARIO_MAN_ID);
  };
  SoupKichen.prototype.manList = function () {
    var result = [];
    if (!this.isEnabled()) {
      return result;
    }
    for (var _i = 0, _a = this._manIdList; _i < _a.length; _i++) {
      var id = _a[_i];
      result.push(new Man(parseInt(id)));
    }
    return result;
  };
  SoupKichen.prototype.isEmpty = function () {
    return this.manList().length == 0;
  };
  SoupKichen.prototype.hire = function (id) {
    var index = this._manIdList.indexOf(id);
    this._manIdList.splice(index, 1);
    if (id == YANG_MAN_ID) {
      $gameParty.addCommonEvent(268, -1);
    }
  };
  SoupKichen.prototype.isEmptyOrFixed = function () {
    var candidates = this.candidates();
    this.addTutorialMan(candidates);
    this.addDebuo(candidates);
    this.addKuzuo(candidates);
    this.addGario(candidates);
    return candidates.length == this._manIdList.length;
  };
  SoupKichen.prototype.isEnabled = function () {
    return $slg.manInfo().soupKichen().level() >= 1;
  };
  SoupKichen.prototype.isEmptyOrDisabled = function () {
    return this.isEmpty() || !this.isEnabled();
  };
  return SoupKichen;
})();
var Man = /** @class */ (function () {
  function Man(id) {
    this._id = id;
  }
  Man.prototype.price = function () {
    if (!this.param()) {
      return -1;
    }
    return this.param().price;
  };
  Man.prototype.param = function () {
    return MAN_PARAMS[this._id];
  };
  Man.prototype.name = function () {
    var actor = this.actor();
    if (actor) {
      return actor.name();
    } else {
      console.error("IDが" + this._id + "の男優が見つかりません");
      return "";
    }
  };
  Man.prototype.job = function () {
    if (!this.param()) {
      return "";
    }
    if (ConfigManager.language == "en") {
      return this.param().jobEn;
    }
    return this.param().job;
  };
  Man.prototype.iconIndex = function () {
    return this.actor().iconIndex();
  };
  Man.prototype.actor = function () {
    return $gameActors.actor(this._id);
  };
  Man.prototype.id = function () {
    return this._id;
  };
  Man.prototype.bonusNinshinRate = function () {
    var param = this.param();
    var skills = [param.skill1, param.skill2, param.skill3];
    for (var _i = 0, skills_1 = skills; _i < skills_1.length; _i++) {
      var skill = skills_1[_i];
      if (skill == "精液多め") {
        return 0.5;
      }
    }
    return 0;
  };
  Man.prototype.isOsusume = function () {
    return this._id == TUTO_MAN_ID || this._id == YANG_MAN_ID;
  };
  return Man;
})();