重构key武将包的character.js,初步处理部分屎山

This commit is contained in:
Spmario233 2024-04-23 12:52:30 +08:00
parent c7209ee903
commit 4b029b7686
8 changed files with 515 additions and 114 deletions

View File

@ -3,90 +3,444 @@ const characters = {
sex: "female",
group: "qun",
hp: 4,
skills: ["mubing", "ziqu", "diaoling"],
skills: ["mubing", "ziqu", "diaoling"],
groupBorder: "key",
},
key_lucia: ["female", "key", "2/3", ["lucia_duqu", "lucia_zhenren"]],
key_kyousuke: ["male", "key", 4, ["nk_shekong", "key_huanjie"]],
key_yuri: ["female", "key", 3, ["yuri_xingdong", "key_huanjie", "yuri_wangxi"], ["zhu"]],
key_haruko: ["female", "key", 4, ["haruko_haofang", "haruko_zhuishi"]],
key_umi: ["female", "key", 3, ["umi_chaofan", "umi_lunhui", "umi_qihuan"]],
key_umi2: ["female", "key", 3, [], ["unseen"]],
key_rei: ["male", "key", 4, ["xiandeng", "shulv", "xisheng"]],
key_komari: ["female", "key", 3, ["komari_tiankou", "komari_xueshang"]],
key_yukine: ["female", "key", 3, ["yukine_wenzhou"]],
key_yusa: ["female", "key", 3, ["yusa_yanyi", "yusa_misa", "dualside"], ["dualside:key_misa"]],
key_misa: ["female", "key", 3, ["misa_yehuo", "misa_yusa", "dualside"], ["unseen"]],
key_masato: ["male", "key", "4/8", ["masato_baoquan"]],
key_iwasawa: ["female", "key", 3, ["iwasawa_yinhang", "iwasawa_mysong"]],
key_kengo: ["male", "key", 4, ["kengo_weishang", "kengo_guidui"]],
key_yoshino: ["male", "key", 4, ["yoshino_jueyi"]],
key_yui: ["female", "key", 3, ["yui_jiang", "yui_lieyin", "yui_takaramono"]],
key_tsumugi: ["female", "key", 3, ["tsumugi_mugyu", "tsumugi_huilang"]],
key_saya: ["female", "key", 3, ["saya_shouji", "saya_powei"]],
key_harukakanata: ["female", "key", 3, ["haruka_shuangche"]],
key_inari: ["female", "key", 2, ["inari_baiwei", "inari_huhun"]],
key_shiina: ["female", "key", 3, ["shiina_qingshen", "shiina_feiyan"]],
key_sunohara: [
"double",
"key",
"3/3/2",
["sunohara_chengshuang", "sunohara_tiaoyin", "sunohara_jianren"],
],
key_rin: ["female", "key", 3, ["rin_baoqiu"]],
key_sasami: ["female", "key", 3, ["sasami_miaobian"]],
key_akane: ["female", "key", 3, ["akane_jugu", "akane_quanqing", "akane_yifu"], ["zhu"]],
key_doruji: ["female", "key", 16, ["doruji_feiqu"]],
key_yuiko: ["female", "key", 3, ["yuiko_fenglun", "yuiko_dilve"]],
key_riki: ["double", "key", 3, ["riki_spwenji", "riki_nvzhuang", "riki_mengzhong"]],
key_hisako: ["female", "key", 3, ["hisako_yinbao", "hisako_zhuanyun"]],
key_hinata: ["male", "key", 4, ["hinata_qiulve", "hinata_ehou"]],
key_noda: ["male", "key", 4, ["noda_fengcheng", "noda_xunxin"]],
key_tomoya: ["male", "key", 4, ["tomoya_shangxian", "tomoya_wangjin"]],
key_nagisa: ["female", "key", 3, ["nagisa_tiandu", "nagisa_fuxin"]],
key_ayato: ["male", "key", 3, ["ayato_jianshen", "ayato_zonghuan"]],
key_ao: ["female", "key", 3, ["ao_xishi", "ao_kuihun", "ao_shixin"]],
key_yuzuru: ["male", "key", 5, ["yuzuru_wuxin", "yuzuru_deyi"]],
sp_key_kanade: ["female", "key", 3, ["kanade_mapo", "kanade_benzhan"]],
key_mio: ["female", "key", 3, ["mio_tuifu", "mio_tishen"]],
key_midori: ["female", "key", 3, ["midori_nonghuan", "midori_tishen"]],
key_kyoko: ["female", "key", 3, ["kyoko_juwu", "kyoko_zhengyi"]],
key_shizuru: ["female", "key", 3, ["shizuru_nianli", "shizuru_benzhan"]],
key_shiorimiyuki: ["female", "key", 3, ["shiorimiyuki_banyin", "shiorimiyuki_tingxian"]],
key_miki: ["female", "key", 3, ["miki_shenqiang", "miki_huanmeng", "miki_zhiluo"]],
key_shiori: ["female", "key", "2/3", ["shiori_huijuan"]],
key_kaori: ["female", "key", "3/4", ["kaori_siyuan"]],
key_akiko: ["female", "key", 3, ["akiko_dongcha"]],
key_abyusa: ["female", "key", 3, ["abyusa_jueqing", "abyusa_dunying"]],
key_godan: ["male", "key", 6, ["godan_yuanyi", "godan_feiqu", "godan_xiaoyuan"]],
key_yuu: ["male", "key", 3, ["yuu_lveduo"]],
key_ryoichi: ["male", "key", 4, ["ryoichi_baoyi", "ryoichi_tuipi"]],
key_kotori: ["female", "key", 3, ["kotori_yumo", "kotori_huazhan"]],
key_jojiro: ["male", "key", 4, ["jojiro_shensu", "jojiro_shunying"]],
key_shiroha: ["female", "key", 3, ["shiroha_yuzhao", "shiroha_guying", "shiroha_jiezhao"]],
key_shizuku: ["female", "key", 3, ["shizuku_sizhi", "shizuku_biyi", "shizuku_sanhua"]],
key_hiroto: ["male", "key", 3, ["hiroto_huyu", "hiroto_tuolao"]],
key_sakuya: ["male", "key", 3, ["youlong", "luanfeng", "sakuya_junbu"]],
key_youta: ["male", "key", 4, []],
key_rumi: ["female", "key", "3/4", ["rumi_shuwu"]],
key_chihaya: ["female", "key", 3, ["chihaya_liewu", "chihaya_youfeng"]],
key_yukito: ["male", "key", 4, ["yukito_kongwu", "yukito_yaxiang"]],
key_crow: ["male", "key", 4, [], ["unseen"]],
key_asara: ["female", "key", 3, ["asara_shelu", "asara_yingwei"]],
key_kotomi: ["female", "key", 3, ["kotomi_qinji", "kotomi_chuanxiang"]],
key_mia: ["female", "key", 3, ["mia_shihui", "mia_qianmeng"]],
key_kano: ["female", "key", 3, ["kano_liezhen", "kano_poyu"]],
db_key_liyingxia: [
"female",
"shu",
3,
["liyingxia_sanli", "liyingxia_zhenjun", "liyingxia_wumai"],
["doublegroup:shu:key"],
],
key_erika: ["female", "key", "3/3/2", ["erika_shisong", "erika_yousheng"]],
key_satomi: ["female", "key", 3, ["satomi_luodao", "satomi_daohai"]],
key_iriya: ["female", "key", 3, ["iriya_yinji", "iriya_haozhi"]],
key_fuuko: ["female", "key", 3, ["fuuko_xingdiao", "fuuko_chuanyuan"]],
key_lucia: {
sex: "female",
group: "key",
hp: 2,
maxHp: 3,
skills: ["lucia_duqu", "lucia_zhenren"]
},
key_kyousuke: {
sex: "male",
group: "key",
hp: 4,
skills: ["nk_shekong", "key_huanjie"]
},
key_yuri: {
sex: "female",
group: "key",
hp: 3,
skills: ["yuri_xingdong", "key_huanjie", "yuri_wangxi"],
isZhugong: true,
},
key_haruko: {
sex: "female",
group: "key",
hp: 4,
skills: ["haruko_haofang", "haruko_zhuishi"]
},
key_umi: {
sex: "female",
group: "key",
hp: 3,
skills: ["umi_chaofan", "umi_lunhui", "umi_qihuan"]
},
key_umi2: {
sex: "female",
group: "key",
hp: 3,
isUnseen: true,
},
key_rei: {
sex: "male",
group: "key",
hp: 4,
skills: ["xiandeng", "shulv", "xisheng"]
},
key_komari: {
sex: "female",
group: "key",
hp: 3,
skills: ["komari_tiankou", "komari_xueshang"]
},
key_yukine: {
sex: "female",
group: "key",
hp: 3,
skills: ["yukine_wenzhou"]
},
key_yusa: {
sex: "female",
group: "key",
hp: 3,
skills: ["yusa_yanyi", "yusa_misa", "dualside"],
dualSideCharacter: "key_misa",
},
key_misa: {
sex: "female",
group: "key",
hp: 3,
skills: ["misa_yehuo", "misa_yusa", "dualside"],
isUnseen: true,
},
key_masato: {
sex: "male",
group: "key",
hp: 4,
maxHp: 8,
skills: ["masato_baoquan"]
},
key_iwasawa: {
sex: "female",
group: "key",
hp: 3,
skills: ["iwasawa_yinhang", "iwasawa_mysong"]
},
key_kengo: {
sex: "male",
group: "key",
hp: 4,
skills: ["kengo_weishang", "kengo_guidui"]
},
key_yoshino: {
sex: "male",
group: "key",
hp: 4,
skills: ["yoshino_jueyi"]
},
key_yui: {
sex: "female",
group: "key",
hp: 3,
skills: ["yui_jiang", "yui_lieyin", "yui_takaramono"]
},
key_tsumugi: {
sex: "female",
group: "key",
hp: 3,
skills: ["tsumugi_mugyu", "tsumugi_huilang"]
},
key_saya: {
sex: "female",
group: "key",
hp: 3,
skills: ["saya_shouji", "saya_powei"]
},
key_harukakanata: {
sex: "female",
group: "key",
hp: 3,
skills: ["haruka_shuangche"]
},
key_inari: {
sex: "female",
group: "key",
hp: 2,
skills: ["inari_baiwei", "inari_huhun"]
},
key_shiina: {
sex: "female",
group: "key",
hp: 3,
skills: ["shiina_qingshen", "shiina_feiyan"]
},
key_sunohara: {
sex: "double",
group: "key",
hp: 3,
hujia: 2,
skills: ["sunohara_chengshuang", "sunohara_tiaoyin", "sunohara_jianren"]
},
key_rin: {
sex: "female",
group: "key",
hp: 3,
skills: ["rin_baoqiu"]
},
key_sasami: {
sex: "female",
group: "key",
hp: 3,
skills: ["sasami_miaobian"]
},
key_akane: {
sex: "female",
group: "key",
hp: 3,
skills: ["akane_jugu", "akane_quanqing", "akane_yifu"],
isZhugong: true,
},
key_doruji: {
sex: "female",
group: "key",
hp: 16,
skills: ["doruji_feiqu"]
},
key_yuiko: {
sex: "female",
group: "key",
hp: 3,
skills: ["yuiko_fenglun", "yuiko_dilve"]
},
key_riki: {
sex: "double",
group: "key",
hp: 3,
skills: ["riki_spwenji", "riki_nvzhuang", "riki_mengzhong"]
},
key_hisako: {
sex: "female",
group: "key",
hp: 3,
skills: ["hisako_yinbao", "hisako_zhuanyun"]
},
key_hinata: {
sex: "male",
group: "key",
hp: 4,
skills: ["hinata_qiulve", "hinata_ehou"]
},
key_noda: {
sex: "male",
group: "key",
hp: 4,
skills: [
"noda_fengcheng",
"noda_xunxin"]
},
key_tomoya: {
sex: "male",
group: "key",
hp: 4,
skills: ["tomoya_shangxian", "tomoya_wangjin"]
},
key_nagisa: {
sex: "female",
group: "key",
hp: 3,
skills: ["nagisa_tiandu", "nagisa_fuxin"]
},
key_ayato: {
sex: "male",
group: "key",
hp: 3,
skills: ["ayato_jianshen", "ayato_zonghuan"]
},
key_ao: {
sex: "female",
group: "key",
hp: 3,
skills: ["ao_xishi", "ao_kuihun", "ao_shixin"]
},
key_yuzuru: {
sex: "male",
group: "key",
hp: 5,
skills: ["yuzuru_wuxin", "yuzuru_deyi"]
},
sp_key_kanade: {
sex: "female",
group: "key",
hp: 3,
skills: ["kanade_mapo", "kanade_benzhan"]
},
key_mio: {
sex: "female",
group: "key",
hp: 3,
skills: ["mio_tuifu", "mio_tishen"]
},
key_midori: {
sex: "female",
group: "key",
hp: 3,
skills: ["midori_nonghuan", "midori_tishen"]
},
key_kyoko: {
sex: "female",
group: "key",
hp: 3,
skills: ["kyoko_juwu", "kyoko_zhengyi"]
},
key_shizuru: {
sex: "female",
group: "key",
hp: 3,
skills: ["shizuru_nianli", "shizuru_benzhan"]
},
key_shiorimiyuki: {
sex: "female",
group: "key",
hp: 3,
skills: ["shiorimiyuki_banyin", "shiorimiyuki_tingxian"]
},
key_miki: {
sex: "female",
group: "key",
hp: 3,
skills: ["miki_shenqiang", "miki_huanmeng", "miki_zhiluo"]
},
key_shiori: {
sex: "female",
group: "key",
hp: 2,
maxHp: 3,
skills: ["shiori_huijuan"]
},
key_kaori: {
sex: "female",
group: "key",
hp: 3,
maxHp: 4,
skills: ["kaori_siyuan"]
},
key_akiko: {
sex: "female",
group: "key",
hp: 3,
skills: ["akiko_dongcha"]
},
key_abyusa: {
sex: "female",
group: "key",
hp: 3,
skills: ["abyusa_jueqing", "abyusa_dunying"]
},
key_godan: {
sex: "male",
group: "key",
hp: 6,
skills: ["godan_yuanyi", "godan_feiqu", "godan_xiaoyuan"]
},
key_yuu: {
sex: "male",
group: "key",
hp: 3,
skills: ["yuu_lveduo"]
},
key_ryoichi: {
sex: "male",
group: "key",
hp: 4,
skills: ["ryoichi_baoyi", "ryoichi_tuipi"]
},
key_kotori: {
sex: "female",
group: "key",
hp: 3,
skills: ["kotori_yumo", "kotori_huazhan"]
},
key_jojiro: {
sex: "male",
group: "key",
hp: 4,
skills: ["jojiro_shensu", "jojiro_shunying"]
},
key_shiroha: {
sex: "female",
group: "key",
hp: 3,
skills: ["shiroha_yuzhao", "shiroha_guying", "shiroha_jiezhao"]
},
key_shizuku: {
sex: "female",
group: "key",
hp: 3,
skills: ["shizuku_sizhi", "shizuku_biyi", "shizuku_sanhua"]
},
key_hiroto: {
sex: "male",
group: "key",
hp: 3,
skills: ["hiroto_huyu", "hiroto_tuolao"]
},
key_sakuya: {
sex: "male",
group: "key",
hp: 3,
skills: ["youlong", "luanfeng", "sakuya_junbu"]
},
key_youta: {
sex: "male",
group: "key",
hp: 4,
skills: []
},
key_rumi: {
sex: "female",
group: "key",
hp: 3,
maxHp: 4,
skills: ["rumi_shuwu"]
},
key_chihaya: {
sex: "female",
group: "key",
hp: 3,
skills: ["chihaya_liewu", "chihaya_youfeng"]
},
key_yukito: {
sex: "male",
group: "key",
hp: 4,
skills: ["yukito_kongwu", "yukito_yaxiang"]
},
key_crow: {
sex: "male",
group: "key",
hp: 4,
skills: [],
isUnseen: true,
},
key_asara: {
sex: "female",
group: "key",
hp: 3,
skills: ["asara_shelu", "asara_yingwei"]
},
key_kotomi: {
sex: "female",
group: "key",
hp: 3,
skills: ["kotomi_qinji", "kotomi_chuanxiang"]
},
key_mia: {
sex: "female",
group: "key",
hp: 3,
skills: ["mia_shihui", "mia_qianmeng"]
},
key_kano: {
sex: "female",
group: "key",
hp: 3,
skills: ["kano_liezhen", "kano_poyu"]
},
db_key_liyingxia: {
sex: "female",
group: "shu",
hp: 3,
skills: ["liyingxia_sanli", "liyingxia_zhenjun", "liyingxia_wumai"],
doubleGroup: ['shu', 'key'],
},
key_erika: {
sex: "female",
group: "key",
hp: 3,
hujia: 2,
skills: ["erika_shisong", "erika_yousheng"]
},
key_satomi: {
sex: "female",
group: "key",
hp: 3,
skills: ["satomi_luodao", "satomi_daohai"]
},
key_iriya: {
sex: "female",
group: "key",
hp: 3,
skills: ["iriya_yinji", "iriya_haozhi"]
},
key_fuuko: {
sex: "female",
group: "key",
hp: 3,
skills: ["fuuko_xingdiao", "fuuko_chuanyuan"]
}
};
export default characters;

View File

@ -31,6 +31,15 @@ export class Get {
const [major, minor, patch] = result[1].split(".");
return ["safari", parseInt(major), parseInt(minor), parseInt(patch)];
}
/**
* 将一个传统格式的character转化为Character对象格式
* @param { Array|Object|import("../library/element/character").Character } data
* @returns {import("../library/element/character").Character}
*/
convertedCharacter(data){
if(!(data instanceof lib.element.Character)) return new lib.element.Character(data);
return data;
}
/**
* 返回 VCard[] 形式的所有牌用于印卡将遍历
* @param {Function} filter
@ -591,7 +600,7 @@ export class Get {
/**
* @overload
* @param { string } name
* @returns { Character }
* @returns { import("../library/element/character").Character }
*/
/**
* @template { 0 | 1 | 2 | 3 | 4 } T
@ -604,7 +613,7 @@ export class Get {
let info = lib.character[name];
if (!info) {
const pack = Object.keys(lib.characterPack).find((pack) => name in lib.characterPack[pack]);
if (pack) info = new lib.element.Character(lib.characterPack[pack][name]);
if (pack) info = get.convertedCharacter(lib.characterPack[pack][name]);
}
if (typeof num === "number") {
if (!info) info = [];
@ -2610,7 +2619,7 @@ export class Get {
if (lib.character[name][4].includes("boss")) return list;
if (lib.character[name][4].includes("hiddenboss")) return list;
if (lib.character[name][4].includes("minskin")) return list;
if (lib.character[name][4].includes("unseen")) return list;
if (lib.character[name].isUnseen) return list;
}
for (var j = 0; j < lib.character[name][3].length; j++) {
var skill = lib.character[name][3][j];

View File

@ -206,15 +206,13 @@ export class Is {
/**
* 是否是双势力武将
* @param { string } name
* @param { string[] } array
* @param { string[] } [array]
* @returns { boolean | string[] }
*/
double(name, array) {
const extraInformations = get.character(name, 4);
if (!extraInformations) return false;
for (const extraInformation of extraInformations) {
if (!extraInformation.startsWith("doublegroup:")) continue;
return array ? extraInformation.split(":").slice(1) : true;
const extraInformation = get.character(name);
if(extraInformation && extraInformation.doubleGroup && extraInformation.doubleGroup.length>0){
return array ? extraInformation.doubleGroup.slice(0) : true;
}
return false;
}

View File

@ -29,6 +29,22 @@ export class Character {
hasHiddenSkill = false;
/** @type { Array } */
trashBin = [];
/** @type { string } */
dualSideCharacter;
/** @type { Array } */
doubleGroup = [];
/** @type { boolean } */
isMinskin = false;
/** @type { boolean } */
isBoss = false;
/** @type { boolean } */
isHiddenBoss = false;
/** @type { boolean } */
isAiForbidden = false;
/** @type { boolean } */
isHiddenInStoneMode = false;
/** @type { boolean } */
isBossAllowed = false;
/**
* @param { Array|Object } [data]
*/
@ -45,31 +61,55 @@ export class Character {
}
else if (get.is.object(data)) {
Object.assign(this, data);
if(typeof this.maxHp !== 'number') this.maxHp = this.hp;
if (typeof this.maxHp !== 'number') this.maxHp = this.hp;
}
};
/**
* @param { Character } character
* @param { Array } trash
*/
static convertTrashToProperties(character, trash){
for(let i = 0; i < trash.length; i++){
static convertTrashToProperties(character, trash) {
for (let i = 0; i < trash.length; i++) {
let item = trash[i];
if (i === 0 && lib.group.includes(item)){
if (i === 0 && lib.group.includes(item)) {
character.groupInGuozhan = item;
}
else if(item === 'zhu'){
else if (item === 'zhu') {
character.isZhugong = true;
}
else if(item === 'unseen'){
else if (item === 'unseen') {
character.isUnseen = true;
}
else if(item === 'hiddenSkill'){
else if (item === 'minskin') {
character.isMinskin = true;
}
else if (item === 'boss') {
character.isBoss = true;
}
else if (item === 'bossallowed') {
character.isBossAllowed = true;
}
else if (item === 'hiddenBoss') {
character.isHiddenBoss = true;
}
else if (item === 'forbidai') {
character.isAiForbidden = true;
}
else if (item === 'stonehidden') {
character.isHiddenInStoneMode = true;
}
else if (item === 'hiddenSkill') {
character.hasHiddenSkill = true;
}
else if(item.startsWith('border:')){
else if (item.startsWith('border:')) {
character.groupBorder = item.slice(7);
}
else if (item.startsWith('dualside:')) {
character.dualSideCharacter = item.slice(9);
}
else if (item.startsWith('doublegroup:')) {
character.doubleGroup = item.slice(12).split(":")
}
}
};
/**

View File

@ -2358,7 +2358,7 @@ export class Player extends HTMLDivElement {
}
var info = lib.character[character];
if (!info) {
info = new lib.element.Character(["", "", 1, [], []]);
info = get.convertedCharacter(["", "", 1, [], []]);
}
var skills = info.skills.slice(0);
this.clearSkills(true);
@ -2398,7 +2398,7 @@ export class Player extends HTMLDivElement {
if (character2 && lib.character[character2]) {
var info2 = lib.character[character2];
if (!info2) {
info2 = new lib.element.Character(["", "", 1, [], []]);
info2 = get.convertedCharacter(["", "", 1, [], []]);
}
this.name2 = character2;
@ -2487,7 +2487,7 @@ export class Player extends HTMLDivElement {
this.classList.add("fullskin");
var info = lib.character[character];
if (!info) {
info = new lib.element.Character(["", "", 1, [], []]);
info = get.convertedCharacter(["", "", 1, [], []]);
}
if (!game.minskin && get.is.newLayout() && !info[4].includes("minskin")) {
@ -2530,7 +2530,7 @@ export class Player extends HTMLDivElement {
if (character2 && lib.character[character2]) {
var info2 = lib.character[character2];
if (!info2) {
info2 = new lib.element.Character(["", "", 1, [], []]);
info2 = get.convertedCharacter(["", "", 1, [], []]);
}
this.classList.add("fullskin2");
this.node.avatar2.setBackground(character2, "character");

View File

@ -10533,7 +10533,7 @@ export class Library {
characterDisabled: function (i, libCharacter) {
if (!lib.character[i] || (lib.character[i][4] && lib.character[i][4].includes("forbidai")))
return true;
if (lib.character[i][4] && lib.character[i][4].includes("unseen")) return true;
if (lib.character[i].isUnseen) return true;
if (lib.config.forbidai.includes(i)) return true;
if (lib.characterFilter[i] && !lib.characterFilter[i](get.mode())) return true;
if (_status.connectMode) {
@ -10605,7 +10605,7 @@ export class Library {
if (info[4].includes("boss")) return true;
if (info[4].includes("hiddenboss")) return true;
if (info[4].includes("minskin")) return true;
if (info[4].includes("unseen")) return true;
if (info.isUnseen) return true;
if (info[4].includes("forbidai") && (!_status.event.isMine || !_status.event.isMine()))
return true;
if (lib.characterFilter[i] && !lib.characterFilter[i](get.mode())) return true;
@ -12777,8 +12777,7 @@ export class Library {
};
character = new Proxy({}, {
set(target, prop, newValue) {
if(!(newValue instanceof Element.Character)) newValue = new Element.Character(newValue);
return Reflect.set(target, prop, newValue);
return Reflect.set(target, prop, get.convertedCharacter(newValue));
}
});
perfectPair = {};

View File

@ -1316,7 +1316,7 @@ export class Create {
}
if (lib.character[i][4].includes("stonehidden")) continue;
if (lib.character[i][4].includes("unseen")) continue;
if (lib.character[i].isUnseen) continue;
}
if (lib.config.banned.includes(i)) continue;
if (

View File

@ -159,18 +159,19 @@ export const characterPackMenu = function (connectMenu) {
var alterableCharacters = [];
var charactersToAlter = [];
for (var i in _info) {
if (_info[i][4] && _info[i][4].includes("unseen")) continue;
const characterInfo = get.convertedCharacter( _info[i]);
if (characterInfo.isUnseen) continue;
if (connectMenu && lib.connectBanned.includes(i)) continue;
list.push(i);
if (boolAI && !lib.config.forbidai_user.includes(i)) boolAI = false;
for (var j = 0; j < _info[i][3].length; j++) {
if (!lib.skill[_info[i][3][j]]) {
for (var j = 0; j < characterInfo.skills.length; j++) {
if (!lib.skill[characterInfo.skills[j]]) {
continue;
}
if (lib.skill[_info[i][3][j]].alter) {
alterableSkills.add(_info[i][3][j]);
if (lib.skill[characterInfo.skills[j]].alter) {
alterableSkills.add(characterInfo.skills[j]);
alterableCharacters.add(i);
if (lib.config.vintageSkills.includes(_info[i][3][j])) {
if (lib.config.vintageSkills.includes(characterInfo.skills[j])) {
charactersToAlter.add(i);
}
}