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

265 lines
6.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 ル
*
*/
var Nore;
(function (Nore) {
var pluginName = "Nore_EroActor";
})(Nore || (Nore = {}));
var EroType;
(function (EroType) {
EroType["nakadashi"] = "nakadashi";
EroType["anal"] = "anal";
EroType["acme"] = "acme";
EroType["fela"] = "fela";
EroType["chichi"] = "chichi";
EroType["syusan"] = "syusan";
EroType["depravity"] = "depravity";
EroType["reputation"] = "reputation";
})(EroType || (EroType = {}));
var AvEroType;
(function (AvEroType) {
AvEroType["avCount"] = "avCount";
AvEroType["popularity"] = "popularity";
AvEroType["number"] = "number";
})(AvEroType || (AvEroType = {}));
var BodyType;
(function (BodyType) {
BodyType["chichi"] = "chichi";
BodyType["manko"] = "manko";
BodyType["anal"] = "anal";
BodyType["cri"] = "cri";
BodyType["kiss"] = "kiss";
BodyType["sm"] = "sm";
})(BodyType || (BodyType = {}));
var Game_EroActor = /** @class */ (function (_super) {
__extends(Game_EroActor, _super);
function Game_EroActor() {
var _this = (_super !== null && _super.apply(this, arguments)) || this;
_this._eroCount = {};
_this._reputation = 100;
_this._depravity = 23;
return _this;
}
//_douseiCount: {[key: string]: Dousei} = {}
/*douseiList(): Array<Dousei> {
let result = [];
for (let key in this._douseiCount) {
let dousei = this._douseiCount[key];
if (dousei.count() > 0) {
result.push(dousei);
}
}
return result;
}*/
/*addDousei(actorId: number, count: number) {
if (! this._douseiCount[actorId]) {
this._douseiCount[actorId] = new Dousei(actorId);
}
const dousei = this._douseiCount[actorId];
dousei.addCount(count);
}*/
Game_EroActor.prototype.countSyusan = function () {
return 0;
};
Game_EroActor.prototype.countEro = function (type) {
if (type == EroType.syusan) {
return this.countSyusan();
}
if (type == EroType.reputation) {
return this.reputation();
}
if (type == EroType.depravity) {
return this.depravity();
}
if (this._eroCount[type]) {
return this._eroCount[type];
}
return 0;
};
Game_EroActor.prototype.reputation = function () {
var n = 0;
for (
var _i = 0, _a = $slg.avInfo().actorAvList(this._actorId);
_i < _a.length;
_i++
) {
var av = _a[_i];
n += av.fan();
}
return -Math.floor(n / 40);
};
Game_EroActor.prototype.depravity = function () {
if (this.isFriends()) {
return 0;
}
var total = this.totalAvCount();
if (total == 0) {
console.error("AV数がです");
return 0;
}
//p('total:' + total);
var map = {};
var n = 0;
for (
var _i = 0, _a = $slg.avInfo().actorAvList(this.actorId());
_i < _a.length;
_i++
) {
var av = _a[_i];
if (map[av.itemId()]) {
continue;
}
map[av.itemId()] = true;
n++;
}
return Math.floor((n / total) * 100);
};
Game_EroActor.prototype.totalAvCount = function () {
var actorId = this.actorId();
var n = 0;
for (var _i = 0, _a = this.avList(); _i < _a.length; _i++) {
var av = _a[_i];
if (av.type == AvItemType.sex) {
n++;
}
}
return n;
};
Game_EroActor.prototype.avList = function () {
switch (this.actorId()) {
case 4:
return MARINA_AV;
case 8:
return SENRI_AV;
case 9:
return NONOKA_AV;
case 10:
return KANAMI_AV;
case 11:
return MIYU_AV;
case 13:
return SAKI_AV;
case 17:
return KOKONA_AV;
}
};
Game_EroActor.prototype.isFriends = function () {
switch (this.actorId()) {
case 8:
case 10:
case 11:
return true;
}
return false;
};
Game_EroActor.prototype.upEro = function (type, value) {
if (!this._eroCount[type]) {
this._eroCount[type] = 0;
}
this._eroCount[type] += value;
};
Game_EroActor.prototype.countAv = function (type) {
switch (type) {
case AvEroType.avCount:
return $slg.avInfo().actorAvList(this.actorId()).length;
case AvEroType.number:
return this.countAvNumber();
}
return 0;
};
Game_EroActor.prototype.countAvNumber = function () {
var list = $slg.avInfo().actorAvList(this.actorId());
var n = 0;
for (var _i = 0, list_1 = list; _i < list_1.length; _i++) {
var av = list_1[_i];
if (av.isFinishSale()) {
n += av.realSales();
}
}
return n;
};
Game_EroActor.prototype.mankoId = function () {
return 0;
};
Game_EroActor.prototype.analId = function () {
return 1;
};
Game_EroActor.prototype.attributeList = function () {
return this.skills();
};
Game_EroActor.prototype.manParam = function (param) {
var manParam = MAN_PARAMS[this.actorId()];
if (!manParam) {
console.error(this.actorId() + " の MAN_PARAMS が見つかりません");
return 0;
}
return manParam[param];
};
Game_EroActor.prototype.manSkillList = function () {
var result = [];
var manParam = MAN_PARAMS[this.actorId()];
if (!manParam) {
console.error(this.actorId() + " の MAN_PARAMS が見つかりません");
return result;
}
var skill1 = findManSkill(manParam.skill1);
var skill2 = findManSkill(manParam.skill2);
var skill3 = findManSkill(manParam.skill3);
if (skill1) {
result.push(skill1);
}
if (skill2) {
result.push(skill2);
}
if (skill3) {
result.push(skill3);
}
return result;
};
Game_EroActor.prototype.job = function () {
var manParam = MAN_PARAMS[this.actorId()];
if (!manParam) {
console.error(this.actorId() + " の MAN_PARAMS が見つかりません");
return "";
}
if (ConfigManager.language == "en") {
return manParam.jobEn;
}
return manParam.job;
};
return Game_EroActor;
})(Game_CostumeActor);