✨ feat: 整合活动BOSS主题并完善捉鬼驱邪内容
✨ feat: 统一活动BOSS主题入口与武将包合并流程 ✨ feat: 补充十二生肖及捉鬼驱邪武将、技能和配音资源 ✨ feat: 支持更新时安全清理废弃文件与目录
This commit is contained in:
+55
-8
@@ -39,7 +39,7 @@ shuYing.loadVoices = async () => {
|
||||
return shuYing.voices;
|
||||
};
|
||||
|
||||
// 公共函数需要在菜单创建前初始化,扩展菜单可在选将预备阶段被点击,此时还没有 player。
|
||||
// 公共函数需要在菜单创建前初始化,扩展菜单可在选将预备阶段被点击
|
||||
shuYing.initFunction = () => {
|
||||
if (shuYing.functionInitialized) return;
|
||||
if (typeof func == "function") {
|
||||
@@ -89,6 +89,49 @@ shuYing.appendExtension = function (name, translate, obj) {
|
||||
lib.translate[name + '_character_config'] = translate;
|
||||
};
|
||||
|
||||
// 将玩法模块的数据合并进同一个武将包,重复 ID 保留主包内容,避免生成额外的武将包菜单项。
|
||||
shuYing.mergeCharacterPack = function (target, source, sourceName = "附加模块") {
|
||||
if (!target || !source) return target;
|
||||
const sections = [
|
||||
"character", "card", "skill", "translate", "characterSort", "characterFilter",
|
||||
"characterTitle", "dynamicTranslate", "characterIntro", "perfectPair", "pinyins",
|
||||
"boss", "game", "characterReplace",
|
||||
];
|
||||
for (const section of sections) {
|
||||
const data = source[section];
|
||||
if (!data || typeof data != "object") continue;
|
||||
const targetData = target[section] || (target[section] = {});
|
||||
for (const [id, value] of Object.entries(data)) {
|
||||
if (Object.prototype.hasOwnProperty.call(targetData, id)) {
|
||||
console.warn(`术樱包:跳过${sourceName}中重复的${section} ID“${id}”`);
|
||||
continue;
|
||||
}
|
||||
targetData[id] = value;
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
|
||||
// 清理旧版本曾注册的独立武将包,防止历史配置让已合并模块继续出现在武将包列表。
|
||||
shuYing.removeLegacyCharacterPack = function (name) {
|
||||
const removeFrom = list => {
|
||||
if (!Array.isArray(list)) return false;
|
||||
let changed = false;
|
||||
for (let index = list.indexOf(name); index >= 0; index = list.indexOf(name)) {
|
||||
list.splice(index, 1);
|
||||
changed = true;
|
||||
}
|
||||
return changed;
|
||||
};
|
||||
removeFrom(lib.config.all.characters);
|
||||
if (removeFrom(lib.config.characters)) {
|
||||
game.saveConfig("characters", lib.config.characters);
|
||||
}
|
||||
removeFrom(lib.connectCharacterPack);
|
||||
delete lib.characterPack[name];
|
||||
delete lib.translate[`${name}_character_config`];
|
||||
};
|
||||
|
||||
shuYing.getVersion = (callback) => {
|
||||
return updater.getOnlineVersion()
|
||||
.then(version => {
|
||||
@@ -203,20 +246,24 @@ shuYing.initConfig = () => {
|
||||
|
||||
};
|
||||
|
||||
//术樱包菜单配置由 ./menu.js 初始化
|
||||
|
||||
//术樱包初始化武将包
|
||||
shuYing.initCharacter = async () => {
|
||||
let shuYingList;
|
||||
if (lib.config.mode == 'boss') {
|
||||
const shuying_boss = await shuYing.loadModule("./pve/boss/index.js", "活动BOSS", true);
|
||||
if (shuying_boss) {
|
||||
shuYing.appendExtension("shuYing_pve_boss", "活动BOSS", shuying_boss);
|
||||
}
|
||||
shuYing.removeLegacyCharacterPack("shuYing_pve_tianshu");
|
||||
let shuying_boss = await shuYing.loadModule("./pve/boss/index.js", "活动BOSS", true);
|
||||
|
||||
const initTianShu = await shuYing.loadModule("./tianshu/extension.js", "天书乱斗", true);
|
||||
if (typeof initTianShu == "function") {
|
||||
initTianShu(lib, game, ui, get, ai, _status, shuYing);
|
||||
const tianshu = initTianShu(lib, game, ui, get, ai, _status, shuYing);
|
||||
if (tianshu) {
|
||||
if (shuying_boss) shuYing.mergeCharacterPack(shuying_boss, tianshu, "天书乱斗");
|
||||
else shuying_boss = tianshu;
|
||||
}
|
||||
}
|
||||
|
||||
if (shuying_boss) {
|
||||
shuYing.appendExtension("shuYing_pve_boss", "活动BOSS", shuying_boss);
|
||||
}
|
||||
// shuYingList =
|
||||
// [
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const cards = mergeBossSection("卡牌", bossSets, "card");
|
||||
|
||||
export default cards;
|
||||
+3
-11
@@ -1,15 +1,7 @@
|
||||
import shiershengxiao from "./sets/shiershengxiao/character.js";
|
||||
import zhuoguiquxie from "./sets/zhuoguiquxie/character.js";
|
||||
import qingqingzijin from "./sets/qingqingzijin/character.js";
|
||||
import tianshu from "./sets/tianshu/character.js";
|
||||
import mergeBossModules from "./merge.js";
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
// 汇总所有主题武将,PVE 玩法只需引用唯一的 BOSS ID。
|
||||
const characters = mergeBossModules("武将", [
|
||||
["十二生肖", shiershengxiao],
|
||||
["捉鬼驱邪", zhuoguiquxie],
|
||||
["青青子衿", qingqingzijin],
|
||||
["天书乱斗", tianshu],
|
||||
]);
|
||||
const characters = mergeBossSection("武将", bossSets, "character");
|
||||
|
||||
export default characters;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const characterFilters = {
|
||||
};
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const characterFilters = mergeBossSection("武将过滤", bossSets, "characterFilter");
|
||||
|
||||
export default characterFilters;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const characterTitles = {
|
||||
};
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const characterTitles = mergeBossSection("武将称号", bossSets, "characterTitle");
|
||||
|
||||
export default characterTitles;
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import zhuoguiquxie from "./sets/zhuoguiquxie/dynamicTranslate.js";
|
||||
import qingqingzijin from "./sets/qingqingzijin/dynamicTranslate.js";
|
||||
import tianshu from "./sets/tianshu/dynamicTranslate.js";
|
||||
import mergeBossModules from "./merge.js";
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
// 汇总存在动态描述的主题技能;无动态描述的主题不需要空模块占位。
|
||||
const dynamicTranslates = mergeBossModules("动态翻译", [
|
||||
["捉鬼驱邪", zhuoguiquxie],
|
||||
["青青子衿", qingqingzijin],
|
||||
["天书乱斗", tianshu],
|
||||
]);
|
||||
// 汇总所有主题动态描述;空主题模块会被安全忽略。
|
||||
const dynamicTranslates = mergeBossSection("动态翻译", bossSets, "dynamicTranslate");
|
||||
|
||||
export default dynamicTranslates;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import characters from "./character.js";
|
||||
import cards from "./card.js";
|
||||
import pinyins from "./pinyin.js";
|
||||
import skills from "./skill.js";
|
||||
import translates from "./translate.js";
|
||||
import characterFilters from "./characterFilter.js";
|
||||
@@ -20,9 +22,11 @@ const shuying_boss = {
|
||||
characterTitle: { ...characterTitles },
|
||||
dynamicTranslate: { ...dynamicTranslates },
|
||||
characterIntro: { ...characterIntros },
|
||||
card: { ...cards },
|
||||
skill: { ...skills },
|
||||
perfectPair: { ...perfectPairs },
|
||||
translate: { ...translates, ...voices, ...characterSortTranslate },
|
||||
pinyins: { ...pinyins },
|
||||
};
|
||||
|
||||
export default shuying_boss;
|
||||
|
||||
+4
-2
@@ -1,4 +1,6 @@
|
||||
const characterIntros = {
|
||||
};
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const characterIntros = mergeBossSection("武将介绍", bossSets, "characterIntro");
|
||||
|
||||
export default characterIntros;
|
||||
|
||||
@@ -13,4 +13,10 @@ const mergeBossModules = (dataType, modules) => {
|
||||
return result;
|
||||
};
|
||||
|
||||
// 从标准主题入口中提取指定字段,再复用统一的重复 ID 处理规则。
|
||||
const mergeBossSection = (dataType, modules, section) => {
|
||||
return mergeBossModules(dataType, modules.map(([moduleName, data]) => [moduleName, data?.[section]]));
|
||||
};
|
||||
|
||||
export { mergeBossSection };
|
||||
export default mergeBossModules;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const perfectPairs = {
|
||||
};
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const perfectPairs = mergeBossSection("珠联璧合", bossSets, "perfectPair");
|
||||
|
||||
export default perfectPairs;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const pinyins = mergeBossSection("拼音", bossSets, "pinyins");
|
||||
|
||||
export default pinyins;
|
||||
@@ -0,0 +1,14 @@
|
||||
import shiershengxiao from "./sets/shiershengxiao/index.js";
|
||||
import zhuoguiquxie from "./sets/zhuoguiquxie/index.js";
|
||||
import qingqingzijin from "./sets/qingqingzijin/index.js";
|
||||
import tianshu from "./sets/tianshu/index.js";
|
||||
|
||||
// 活动 BOSS 主题清单;新增主题时只需在此接入一次。
|
||||
const bossSets = [
|
||||
["十二生肖", shiershengxiao],
|
||||
["捉鬼驱邪", zhuoguiquxie],
|
||||
["青青子衿", qingqingzijin],
|
||||
["天书乱斗", tianshu],
|
||||
];
|
||||
|
||||
export default bossSets;
|
||||
@@ -0,0 +1,5 @@
|
||||
import { lib, game, ui, get, ai, _status } from "../../../../../../noname.js";
|
||||
|
||||
const cards = {};
|
||||
|
||||
export default cards;
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterFilters = {};
|
||||
|
||||
export default characterFilters;
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterTitles = {};
|
||||
|
||||
export default characterTitles;
|
||||
@@ -0,0 +1,29 @@
|
||||
import characters from "./character.js";
|
||||
import cards from "./card.js";
|
||||
import pinyins from "./pinyin.js";
|
||||
import skills from "./skill.js";
|
||||
import translates from "./translate.js";
|
||||
import characterTitles from "./characterTitle.js";
|
||||
import characterIntros from "./intro.js";
|
||||
import characterFilters from "./characterFilter.js";
|
||||
import dynamicTranslates from "./dynamicTranslate.js";
|
||||
import perfectPairs from "./perfectPairs.js";
|
||||
import voices from "./voices.js";
|
||||
import { characterSort, characterSortTranslate } from "./sort.js";
|
||||
|
||||
// 青青子衿主题数据片段,由活动 BOSS 根入口统一注册。
|
||||
export default {
|
||||
character: characters,
|
||||
card: cards,
|
||||
pinyins,
|
||||
skill: skills,
|
||||
translate: translates,
|
||||
characterTitle: characterTitles,
|
||||
characterIntro: characterIntros,
|
||||
characterFilter: characterFilters,
|
||||
dynamicTranslate: dynamicTranslates,
|
||||
perfectPair: perfectPairs,
|
||||
voices,
|
||||
characterSort,
|
||||
characterSortTranslate,
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterIntros = {};
|
||||
|
||||
export default characterIntros;
|
||||
@@ -0,0 +1,3 @@
|
||||
const perfectPairs = {};
|
||||
|
||||
export default perfectPairs;
|
||||
@@ -0,0 +1,3 @@
|
||||
const pinyins = {};
|
||||
|
||||
export default pinyins;
|
||||
@@ -0,0 +1,14 @@
|
||||
const characterSort = {
|
||||
shuYing_pve_qingqingzijin: [
|
||||
"caocao_boss_shuying",
|
||||
"simayi_boss_shuying",
|
||||
"lvbu_boss_shuying",
|
||||
"dongzhuo_boss_shuying",
|
||||
],
|
||||
};
|
||||
|
||||
const characterSortTranslate = {
|
||||
shuYing_pve_qingqingzijin: "青青子衿",
|
||||
};
|
||||
|
||||
export { characterSort, characterSortTranslate };
|
||||
@@ -0,0 +1,3 @@
|
||||
const voices = {};
|
||||
|
||||
export default voices;
|
||||
@@ -0,0 +1,5 @@
|
||||
import { lib, game, ui, get, ai, _status } from "../../../../../../noname.js";
|
||||
|
||||
const cards = {};
|
||||
|
||||
export default cards;
|
||||
@@ -9,9 +9,40 @@ const characters = {
|
||||
img: "extension/术樱包/pve/images/十二生肖/zishu_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/zishu.mp3"]
|
||||
},
|
||||
// chouniu_boss_shuying: {},
|
||||
// yinhu_boss_shuying: {},
|
||||
// maotu_boss_shuying: {},
|
||||
|
||||
chouniu_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["chouniu_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/十二生肖/chouniu_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/chouniu.mp3"]
|
||||
},
|
||||
|
||||
yinhu_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["yinhu_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/十二生肖/yinhu_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/yinhu.mp3"]
|
||||
},
|
||||
|
||||
maotu_boss_shuying: {
|
||||
sex: "female",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["maotu_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/十二生肖/maotu_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/maotu.mp3"]
|
||||
},
|
||||
|
||||
chenlong_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
@@ -22,7 +53,18 @@ const characters = {
|
||||
img: "extension/术樱包/pve/images/十二生肖/chenlong_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/chenlong.mp3"]
|
||||
},
|
||||
// sishe_boss_shuying: {},
|
||||
|
||||
sishe_boss_shuying: {
|
||||
sex: "female",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["sishe_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/十二生肖/sishe_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/sishe.mp3"]
|
||||
},
|
||||
|
||||
wuma_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
@@ -33,6 +75,7 @@ const characters = {
|
||||
img: "extension/术樱包/pve/images/十二生肖/wuma_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/wuma_shuying.mp3"]
|
||||
},
|
||||
|
||||
weiyang_boss_shuying: {
|
||||
sex: "female",
|
||||
group: "qun",
|
||||
@@ -43,6 +86,7 @@ const characters = {
|
||||
img: "extension/术樱包/pve/images/十二生肖/weiyang_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/weiyang.mp3"]
|
||||
},
|
||||
|
||||
shenhou_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
@@ -53,7 +97,18 @@ const characters = {
|
||||
img: "extension/术樱包/pve/images/十二生肖/shenhou_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/shenhou.mp3"]
|
||||
},
|
||||
// youji_boss_shuying: {},
|
||||
|
||||
youji_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["youji_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/十二生肖/youji_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/youji.mp3"]
|
||||
},
|
||||
|
||||
xvgou_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
@@ -64,7 +119,17 @@ const characters = {
|
||||
img: "extension/术樱包/pve/images/十二生肖/xvgou_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/xvgou.mp3"]
|
||||
},
|
||||
// haizhu_boss_shuying: {},
|
||||
|
||||
haizhu_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["haizhu_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/十二生肖/haizhu_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/十二生肖/haizhu.mp3"]
|
||||
},
|
||||
};
|
||||
|
||||
export default characters;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterFilters = {};
|
||||
|
||||
export default characterFilters;
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterTitles = {};
|
||||
|
||||
export default characterTitles;
|
||||
@@ -0,0 +1,3 @@
|
||||
const dynamicTranslates = {};
|
||||
|
||||
export default dynamicTranslates;
|
||||
@@ -0,0 +1,29 @@
|
||||
import characters from "./character.js";
|
||||
import cards from "./card.js";
|
||||
import pinyins from "./pinyin.js";
|
||||
import skills from "./skill.js";
|
||||
import translates from "./translate.js";
|
||||
import characterTitles from "./characterTitle.js";
|
||||
import characterIntros from "./intro.js";
|
||||
import characterFilters from "./characterFilter.js";
|
||||
import dynamicTranslates from "./dynamicTranslate.js";
|
||||
import perfectPairs from "./perfectPairs.js";
|
||||
import voices from "./voices.js";
|
||||
import { characterSort, characterSortTranslate } from "./sort.js";
|
||||
|
||||
// 十二生肖主题数据片段,由活动 BOSS 根入口统一注册。
|
||||
export default {
|
||||
character: characters,
|
||||
card: cards,
|
||||
pinyins,
|
||||
skill: skills,
|
||||
translate: translates,
|
||||
characterTitle: characterTitles,
|
||||
characterIntro: characterIntros,
|
||||
characterFilter: characterFilters,
|
||||
dynamicTranslate: dynamicTranslates,
|
||||
perfectPair: perfectPairs,
|
||||
voices,
|
||||
characterSort,
|
||||
characterSortTranslate,
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterIntros = {};
|
||||
|
||||
export default characterIntros;
|
||||
@@ -0,0 +1,3 @@
|
||||
const perfectPairs = {};
|
||||
|
||||
export default perfectPairs;
|
||||
@@ -0,0 +1,3 @@
|
||||
const pinyins = {};
|
||||
|
||||
export default pinyins;
|
||||
@@ -71,6 +71,137 @@ const skills = {
|
||||
},
|
||||
},
|
||||
|
||||
//丑牛
|
||||
chouniu_shuying: {
|
||||
mode: ["boss"],
|
||||
audio: "ext:术樱包/pve/audio/skill/十二生肖:1",
|
||||
trigger: {
|
||||
player: "phaseJieshuBegin",
|
||||
},
|
||||
forced: true,
|
||||
locked: true,
|
||||
filter(event, player) {
|
||||
return player.isDamaged() && player.isMinHp();
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
await player.recover();
|
||||
},
|
||||
ai: {
|
||||
threaten: 1.2,
|
||||
},
|
||||
},
|
||||
|
||||
//寅虎
|
||||
yinhu_shuying: {
|
||||
mode: ["boss"],
|
||||
audio: "ext:术樱包/pve/audio/skill/十二生肖:1",
|
||||
enable: "phaseUse",
|
||||
position: "he",
|
||||
filter(event, player) {
|
||||
const enemies = player.getEnemies(null, false);
|
||||
return (
|
||||
enemies.some(target => target.isIn()) &&
|
||||
player.hasCard(card => lib.skill.yinhu_shuying.filterCard(card, player), "he")
|
||||
);
|
||||
},
|
||||
filterCard(card, player) {
|
||||
if (!lib.filter.cardDiscardable(card, player)) return false;
|
||||
return !player.getStorage("yinhu_shuying_used").some(cardx => {
|
||||
return get.type2(cardx[2]) == get.type2(card);
|
||||
});
|
||||
},
|
||||
filterTarget(card, player, target) {
|
||||
return (
|
||||
target != player &&
|
||||
target.isIn() &&
|
||||
player.getEnemies(null, false).includes(target)
|
||||
);
|
||||
},
|
||||
check(card) {
|
||||
return 8 - get.value(card);
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
const card = event.cards[0];
|
||||
const target = event.target;
|
||||
|
||||
player.addTempSkill("yinhu_shuying_used", "phaseUseAfter");
|
||||
player.markAuto("yinhu_shuying_used", [
|
||||
[get.translation(get.type2(card)), "", card.name],
|
||||
]);
|
||||
|
||||
player.line(target);
|
||||
const damageEvent = target.damage(1, player);
|
||||
await damageEvent;
|
||||
|
||||
const causedDying = game.getGlobalHistory("everything", evt => {
|
||||
return evt.name == "dying" && evt.getParent(damageEvent.name) === damageEvent;
|
||||
}).length > 0;
|
||||
|
||||
if (causedDying) {
|
||||
player.tempBanSkill("yinhu_shuying");
|
||||
}
|
||||
},
|
||||
ai: {
|
||||
order: 7,
|
||||
result: {
|
||||
target(player, target) {
|
||||
if (!player.getEnemies(null, false).includes(target)) return 0;
|
||||
return get.damageEffect(target, player, target);
|
||||
},
|
||||
},
|
||||
},
|
||||
subSkill: {
|
||||
used: {
|
||||
charlotte: true,
|
||||
onremove: true,
|
||||
intro: {
|
||||
name: "已弃置的牌类型",
|
||||
mark(dialog, content = []) {
|
||||
if (content.length) {
|
||||
dialog.addSmall([content, "vcard"]);
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
//卯兔
|
||||
maotu_shuying: {
|
||||
mode: ["boss"],
|
||||
audio: "ext:术樱包/pve/audio/skill/十二生肖:1",
|
||||
trigger: {
|
||||
global: "dieAfter",
|
||||
},
|
||||
forced: true,
|
||||
locked: true,
|
||||
filter(event, player) {
|
||||
return !player.hasSkill("maotu_shuying_effect", null, false, false);
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
player.addTempSkill("maotu_shuying_effect", {
|
||||
player: "phaseBegin",
|
||||
});
|
||||
},
|
||||
subSkill: {
|
||||
effect: {
|
||||
charlotte: true,
|
||||
mark: true,
|
||||
marktext: "兔",
|
||||
intro: {
|
||||
content: "你不是体力值大于等于你的其他角色使用牌的合法目标",
|
||||
},
|
||||
mod: {
|
||||
targetEnabled(card, source, target) {
|
||||
if (source != target && source.getHp() >= target.getHp()) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
//辰龙
|
||||
chenlong_shuying: {
|
||||
mode: ["boss"],
|
||||
@@ -133,6 +264,55 @@ const skills = {
|
||||
},
|
||||
},
|
||||
|
||||
//巳蛇
|
||||
sishe_shuying: {
|
||||
mode: ["boss"],
|
||||
audio: "ext:术樱包/pve/audio/skill/十二生肖:1",
|
||||
trigger: {
|
||||
player: "damageEnd",
|
||||
},
|
||||
logTarget: "source",
|
||||
filter(event, player) {
|
||||
return (
|
||||
event.num > 0 &&
|
||||
event.source?.isIn() &&
|
||||
player.getEnemies(null, false).includes(event.source)
|
||||
);
|
||||
},
|
||||
async cost(event, trigger, player) {
|
||||
event.result = await player
|
||||
.chooseBool(get.prompt2(event.skill, trigger.source))
|
||||
.set("ai", () => {
|
||||
const player = get.player();
|
||||
const trigger = get.event().getTrigger();
|
||||
return (
|
||||
player.getEnemies(null, false).includes(trigger.source) &&
|
||||
get.damageEffect(trigger.source, player, player) > 0
|
||||
);
|
||||
})
|
||||
.forResult();
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
const source = trigger.source;
|
||||
player.line(source);
|
||||
await source.damage(trigger.num, player);
|
||||
},
|
||||
ai: {
|
||||
threaten: 0.6,
|
||||
maixie: true,
|
||||
effect: {
|
||||
target(card, source, target) {
|
||||
if (
|
||||
get.tag(card, "damage") &&
|
||||
target.getEnemies(null, false).includes(source)
|
||||
) {
|
||||
return [1, 0, 0, -0.7];
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
//午马
|
||||
wuma_shuying: {
|
||||
mode: ["boss"],
|
||||
@@ -177,6 +357,7 @@ const skills = {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
//未羊
|
||||
weiyang_shuying: {
|
||||
mode: ["boss"],
|
||||
@@ -257,6 +438,26 @@ const skills = {
|
||||
},
|
||||
},
|
||||
|
||||
//酉鸡
|
||||
youji_shuying: {
|
||||
mode: ["boss"],
|
||||
audio: "ext:术樱包/pve/audio/skill/十二生肖:1",
|
||||
trigger: {
|
||||
player: "phaseDrawBegin2",
|
||||
},
|
||||
forced: true,
|
||||
locked: true,
|
||||
filter(event, player) {
|
||||
return game.roundNumber > 0 && !event.numFixed;
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
trigger.num += Math.min(5, game.roundNumber);
|
||||
},
|
||||
ai: {
|
||||
threaten: 1.4,
|
||||
},
|
||||
},
|
||||
|
||||
//戌狗
|
||||
xvgou_shuying: {
|
||||
mode: ["boss"],
|
||||
@@ -292,6 +493,77 @@ const skills = {
|
||||
},
|
||||
},
|
||||
|
||||
//亥猪
|
||||
haizhu_shuying: {
|
||||
mode: ["boss"],
|
||||
audio: "ext:术樱包/pve/audio/skill/十二生肖:1",
|
||||
trigger: {
|
||||
player: "phaseZhunbeiBegin",
|
||||
global: ["loseAfter", "loseAsyncAfter"],
|
||||
},
|
||||
forced: true,
|
||||
locked: true,
|
||||
filter(event, player) {
|
||||
if (event.name == "phaseZhunbei") {
|
||||
return player.isMaxHandcard();
|
||||
}
|
||||
|
||||
if (event.type != "discard" || event.getlx === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return game.hasPlayer(target => {
|
||||
if (target == player) return false;
|
||||
|
||||
return event.getl?.(target)?.cards2?.some(card => {
|
||||
return (
|
||||
get.color(card) == "black" &&
|
||||
get.position(card, true) == "d"
|
||||
);
|
||||
});
|
||||
});
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
if (trigger.name == "phaseZhunbei") {
|
||||
await player.loseHp();
|
||||
return;
|
||||
}
|
||||
|
||||
const cards = game
|
||||
.filterPlayer(target => {
|
||||
if (target == player) return false;
|
||||
|
||||
return trigger.getl?.(target)?.cards2?.some(card => {
|
||||
return (
|
||||
get.color(card) == "black" &&
|
||||
get.position(card, true) == "d"
|
||||
);
|
||||
});
|
||||
})
|
||||
.reduce((list, target) => {
|
||||
return list.addArray(
|
||||
trigger
|
||||
.getl(target)
|
||||
.cards2.filter(card => {
|
||||
return (
|
||||
get.color(card) == "black" &&
|
||||
get.position(card, true) == "d"
|
||||
);
|
||||
})
|
||||
);
|
||||
}, []);
|
||||
|
||||
if (!cards.length) return;
|
||||
|
||||
if (trigger.delay === false) {
|
||||
await game.delay();
|
||||
}
|
||||
await player.gain(cards, "gain2");
|
||||
},
|
||||
ai: {
|
||||
threaten: 1.6,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default skills;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
const characterSort = {
|
||||
shuYing_pve_shiershengxiao: [
|
||||
"zishu_boss_shuying",
|
||||
"chenlong_boss_shuying",
|
||||
"wuma_boss_shuying",
|
||||
"weiyang_boss_shuying",
|
||||
"shenhou_boss_shuying",
|
||||
"xvgou_boss_shuying",
|
||||
],
|
||||
};
|
||||
|
||||
const characterSortTranslate = {
|
||||
shuYing_pve_shiershengxiao: "十二生肖",
|
||||
};
|
||||
|
||||
export { characterSort, characterSortTranslate };
|
||||
@@ -3,10 +3,26 @@ const translates = {
|
||||
zishu_shuying: "子鼠",
|
||||
zishu_shuying_info: "出牌阶段限一次,你可以获得手牌数大于你的其他角色一张手牌,你可以重复此流程,直到你的手牌数为全场最多。",
|
||||
|
||||
chouniu_boss_shuying: "丑牛",
|
||||
chouniu_shuying: "丑牛",
|
||||
chouniu_shuying_info: "锁定技,结束阶段,若你的体力值为全场最小,则你回复1点体力。",
|
||||
|
||||
yinhu_boss_shuying: "寅虎",
|
||||
yinhu_shuying: "寅虎",
|
||||
yinhu_shuying_info: "出牌阶段,你可以弃置一张牌(以此法弃置的牌须类型各不相同),然后对一名其他角色造成1点伤害;若你以此法导致一名角色进入濒死状态,则此技能失效直到回合结束。",
|
||||
|
||||
maotu_boss_shuying: "卯兔",
|
||||
maotu_shuying: "卯兔",
|
||||
maotu_shuying_info: "锁定技,场上有角色阵亡时,你获得【卯兔】标记,你的回合开始时,你移除【卯兔标记】(【卯兔】标记:你不是体力大于等于你的其他角色使用牌的合法目标)。",
|
||||
|
||||
chenlong_boss_shuying: "辰龙",
|
||||
chenlong_shuying: "辰龙",
|
||||
chenlong_shuying_info: "限定技,出牌阶段,你可以失去任意点体力(至多为5),然后对一名其他角色造成等量的伤害。若你以此法进入濒死状态,则你将体力值回复至1,然后减少1点体力上限。",
|
||||
|
||||
sishe_boss_shuying: "巳蛇",
|
||||
sishe_shuying: "巳蛇",
|
||||
sishe_shuying_info: "当你受到伤害后,你可以对伤害来源造成等量伤害。",
|
||||
|
||||
wuma_boss_shuying: "午马",
|
||||
wuma_shuying: "午马",
|
||||
wuma_shuying_info: "锁定技,你不能被翻面;你的阶段不能被跳过;当你成为其他角色使用锦囊牌的目标后,摸一张牌。",
|
||||
@@ -19,10 +35,17 @@ const translates = {
|
||||
shenhou_shuying: "申猴",
|
||||
shenhou_shuying_info: "当你成为【杀】的目标时,你可以进行判定,若结果为红色,则此【杀】对你无效。",
|
||||
|
||||
youji_boss_shuying: "酉鸡",
|
||||
youji_shuying: "酉鸡",
|
||||
youji_shuying_info: "锁定技,摸牌阶段,你多摸X张牌(X为游戏轮数且最多为5)。",
|
||||
|
||||
xvgou_boss_shuying: "戌狗",
|
||||
xvgou_shuying: "戌狗",
|
||||
xvgou_shuying_info: "锁定技,红色【杀】对你无效;你使用红色【杀】无距离限制且造成伤害+1.",
|
||||
|
||||
haizhu_boss_shuying: "亥猪",
|
||||
haizhu_shuying: "亥猪",
|
||||
haizhu_shuying_info: "锁定技,当其他角色的黑色牌因弃置而置入弃牌堆后,你获得这些牌;准备阶段开始时,若你的手牌数为场上最多的或之一,你失去1点体力。",
|
||||
};
|
||||
|
||||
export default translates;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
const voices = {
|
||||
"#zishu_shuying1": "这些牌都归我吧!",
|
||||
"#zishu_boss_shuying:die": "油米全没了。",
|
||||
|
||||
"#chouniu_shuying1": "牛角之歌,自保足以。",
|
||||
"#chouniu_boss_shuying:die": "请将我埋于此地吧。",
|
||||
|
||||
"#yinhu_shuying1": "尝尝我的厉害吧。",
|
||||
"#yinhu_boss_shuying:die": "百兽之王也有终老。",
|
||||
|
||||
"#maotu_shuying1": "想抓到我,不可能!",
|
||||
"#maotu_boss_shuying:die": "这灾祸,是躲不过了。",
|
||||
|
||||
"#chenlong_shuying1": "龙怒的威力,不是你所能承受的。",
|
||||
"#chenlong_boss_shuying:die": "龙威不再,龙鳞已落。",
|
||||
|
||||
"#sishe_shuying1": "伤我者,一一奉还。",
|
||||
"#sishe_boss_shuying:die": "我的毒液失效了。",
|
||||
|
||||
"#wuma_shuying1": "有我在,必成功。",
|
||||
"#wuma_boss_shuying:die": "马有失蹄啊。",
|
||||
|
||||
"#weiyang_shuying1": "共享绵泽,同甘共苦。",
|
||||
"#weiyang_boss_shuying:die": "看不到青草翠绿时。",
|
||||
|
||||
"#shenhou_shuying1": "百般变化,真假难辨。",
|
||||
"#shenhou_boss_shuying:die": "这仙桃无用了。",
|
||||
|
||||
"#youji_shuying1": "鸡豚之息,虽微渐厚。",
|
||||
"#youji_boss_shuying:die": "杀鸡取卵,不可取呀!",
|
||||
|
||||
"#xvgou_shuying1": "驱邪吠恶,遇凶斩杀。",
|
||||
"#xvgou_boss_shuying:die": "不能守护家园了。",
|
||||
|
||||
"#haizhu_shuying1": "这些,都归我吧。",
|
||||
"#haizhu_boss_shuying:die": "果然,还是吃太多了。",
|
||||
};
|
||||
|
||||
export default voices;
|
||||
@@ -0,0 +1,5 @@
|
||||
import { lib, game, ui, get, ai, _status } from "../../../../../../noname.js";
|
||||
|
||||
const cards = {};
|
||||
|
||||
export default cards;
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterFilters = {};
|
||||
|
||||
export default characterFilters;
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterTitles = {};
|
||||
|
||||
export default characterTitles;
|
||||
@@ -0,0 +1,29 @@
|
||||
import characters from "./character.js";
|
||||
import cards from "./card.js";
|
||||
import pinyins from "./pinyin.js";
|
||||
import skills from "./skill.js";
|
||||
import translates from "./translate.js";
|
||||
import characterTitles from "./characterTitle.js";
|
||||
import characterIntros from "./intro.js";
|
||||
import characterFilters from "./characterFilter.js";
|
||||
import dynamicTranslates from "./dynamicTranslate.js";
|
||||
import perfectPairs from "./perfectPairs.js";
|
||||
import voices from "./voices.js";
|
||||
import { characterSort, characterSortTranslate } from "./sort.js";
|
||||
|
||||
// 天书乱斗主题数据片段,由活动 BOSS 根入口统一注册。
|
||||
export default {
|
||||
character: characters,
|
||||
card: cards,
|
||||
pinyins,
|
||||
skill: skills,
|
||||
translate: translates,
|
||||
characterTitle: characterTitles,
|
||||
characterIntro: characterIntros,
|
||||
characterFilter: characterFilters,
|
||||
dynamicTranslate: dynamicTranslates,
|
||||
perfectPair: perfectPairs,
|
||||
voices,
|
||||
characterSort,
|
||||
characterSortTranslate,
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterIntros = {};
|
||||
|
||||
export default characterIntros;
|
||||
@@ -0,0 +1,3 @@
|
||||
const perfectPairs = {};
|
||||
|
||||
export default perfectPairs;
|
||||
@@ -0,0 +1,3 @@
|
||||
const pinyins = {};
|
||||
|
||||
export default pinyins;
|
||||
@@ -0,0 +1,16 @@
|
||||
const characterSort = {
|
||||
shuYing_pve_tianshu: [
|
||||
"shuishengonggong_boss_shuying",
|
||||
"baiqi_boss_shuying",
|
||||
"kuafu_boss_shuying",
|
||||
"shaohao_boss_shuying",
|
||||
"xuannv_boss_shuying",
|
||||
"hanba_boss_shuying",
|
||||
],
|
||||
};
|
||||
|
||||
const characterSortTranslate = {
|
||||
shuYing_pve_tianshu: "天书乱斗",
|
||||
};
|
||||
|
||||
export { characterSort, characterSortTranslate };
|
||||
@@ -0,0 +1,3 @@
|
||||
const voices = {};
|
||||
|
||||
export default voices;
|
||||
@@ -0,0 +1,5 @@
|
||||
import { lib, game, ui, get, ai, _status } from "../../../../../../noname.js";
|
||||
|
||||
const cards = {};
|
||||
|
||||
export default cards;
|
||||
@@ -1,4 +1,36 @@
|
||||
const characters = {
|
||||
mengpo_boss_shuying: {
|
||||
sex: "female",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["aotang_shuying", "yunju_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/mengpo_boss_shuying.png"
|
||||
},
|
||||
|
||||
baowei_boss_shuying:
|
||||
{
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["eli_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/baowei_boss_shuying.png"
|
||||
},
|
||||
|
||||
niaozui_boss_shuying:
|
||||
{
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["suoxue_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/niaozui_boss_shuying.png"
|
||||
},
|
||||
|
||||
heibaiwuchang_boss_shuying:
|
||||
{
|
||||
sex: "male",
|
||||
@@ -7,17 +39,21 @@ const characters = {
|
||||
skills: ["mizui_shuying", "qiangzheng_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/heibaiwuchang_boss_shuying.png"
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/heibaiwuchang_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/捉鬼驱邪/heibaiwuchang.mp3"]
|
||||
},
|
||||
|
||||
niutoumamian_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["shiyv_shuying", "manji_shuying", "xiaoshou_shuying"],
|
||||
skills: ["manji_shuying", "shiyv_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/niutoumamian_boss_shuying.png"
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/niutoumamian_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/捉鬼驱邪/niutoumamian.mp3"]
|
||||
},
|
||||
|
||||
yvsai_boss_shuying: {
|
||||
sex: "female",
|
||||
group: "qun",
|
||||
@@ -27,6 +63,7 @@ const characters = {
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/yvsai_boss_shuying.png"
|
||||
},
|
||||
|
||||
huangfeng_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
@@ -36,6 +73,7 @@ const characters = {
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/huangfeng_boss_shuying.png"
|
||||
},
|
||||
|
||||
riyeyoushen_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
@@ -43,7 +81,29 @@ const characters = {
|
||||
skills: ["huiyun_shuying", "yezhong_shuying", "zhoucha_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/riyeyoushen_boss_shuying.png"
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/riyeyoushen_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/捉鬼驱邪/riyeyoushen.mp3"]
|
||||
},
|
||||
|
||||
guiwang_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["jizhou_shuying", "danshi_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/guiwang_boss_shuying.png",
|
||||
dieAudios: ["ext:术樱包/pve/audio/dead/捉鬼驱邪/guiwang.mp3"]
|
||||
},
|
||||
|
||||
yanluowang_boss_shuying: {
|
||||
sex: "male",
|
||||
group: "qun",
|
||||
hp: 4,
|
||||
skills: ["jizhou_shuying", "danshi_shuying"],
|
||||
isHiddenBoss: true,
|
||||
isBossAllowed: true,
|
||||
img: "extension/术樱包/pve/images/捉鬼驱邪/yanluowang_boss_shuying.png"
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterFilters = {};
|
||||
|
||||
export default characterFilters;
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterTitles = {};
|
||||
|
||||
export default characterTitles;
|
||||
@@ -1,6 +1,86 @@
|
||||
import { getTianshuDifficulty } from "../../shared.js";
|
||||
|
||||
const dynamicTranslates = {
|
||||
//孟婆
|
||||
aotang_shuying(player, skill) {
|
||||
const difficulty = getTianshuDifficulty();
|
||||
|
||||
if (difficulty == "nightmare") {
|
||||
return "锁定技,你的回合开始时,令随机两名敌方角色遗忘所有武将技能直到你的下回合开始。";
|
||||
}
|
||||
if (difficulty == "hard") {
|
||||
return "锁定技,你的回合开始时,令随机一名敌方角色遗忘所有武将技能直到你的下回合开始。";
|
||||
}
|
||||
|
||||
return "锁定技,你的回合开始时,令随机一名敌方角色随机遗忘1个武将技能直到你的下回合开始。";
|
||||
},
|
||||
yunju_shuying(player, skill) {
|
||||
const difficulty = getTianshuDifficulty();
|
||||
let num = 1;
|
||||
|
||||
if (difficulty == "hard") {
|
||||
num = 2;
|
||||
} else if (difficulty == "nightmare") {
|
||||
num = 3;
|
||||
}
|
||||
|
||||
return `锁定技,敌方角色的回合结束时,该角色随机弃置${num}张手牌。`;
|
||||
},
|
||||
|
||||
//豹尾
|
||||
eli_shuying(player, skill) {
|
||||
const difficulty = getTianshuDifficulty();
|
||||
|
||||
if (difficulty == "nightmare") {
|
||||
return "锁定技,你对敌方角色造成伤害时,你进行一次判定:若结果为红色,此伤害+1;若结果为黑色,你摸1张牌并获得“完杀”直到回合结束。";
|
||||
}
|
||||
|
||||
return "锁定技,你每回合首次对敌方角色造成伤害时,你进行一次判定:若结果为红色,此伤害+1;若结果为黑色,你获得“完杀”直到回合结束。";
|
||||
},
|
||||
|
||||
//鸟嘴
|
||||
bingyi_shuying(player, skill) {
|
||||
const num = getTianshuDifficulty() == "nightmare" ? 8 : 5;
|
||||
|
||||
return `锁定技,每回合首次失去最后的手牌时,你摸${num}张牌。`;
|
||||
},
|
||||
suoxue_shuying(player, skill) {
|
||||
const difficulty = getTianshuDifficulty();
|
||||
let num = 1;
|
||||
|
||||
if (difficulty == "hard") {
|
||||
num = 2;
|
||||
} else if (difficulty == "nightmare") {
|
||||
num = 3;
|
||||
}
|
||||
|
||||
return `每回合限${get.cnNumber(num)}次,你使用伤害牌指定单一目标后,若其手牌数大于你,你可将手牌摸至与该角色相同(至多5张);若其手牌数小于你,你可弃置一张手牌令此牌不能抵消。`;
|
||||
},
|
||||
|
||||
//牛头马面
|
||||
xiaoshou_shuying(player, skill) {
|
||||
const num = getTianshuDifficulty() == "nightmare" ? 3 : 2;
|
||||
|
||||
return `锁定技,准备阶段,你对随机一名敌方角色造成${num}点伤害。`;
|
||||
},
|
||||
manji_shuying(player, skill) {
|
||||
const difficulty = getTianshuDifficulty();
|
||||
let num = 1;
|
||||
|
||||
if (difficulty == "hard") {
|
||||
num = 2;
|
||||
} else if (difficulty == "nightmare") {
|
||||
num = 3;
|
||||
}
|
||||
|
||||
const extra =
|
||||
difficulty == "nightmare"
|
||||
? "且你此阶段使用【杀】次数+1"
|
||||
: "";
|
||||
|
||||
return `你使用【杀】指定单一目标后,你可以弃置该角色${num}张手牌。若其中有【杀】,你本次【杀】的伤害+1${extra}。`;
|
||||
},
|
||||
|
||||
//黑白无常
|
||||
mizui_shuying(player, skill) {
|
||||
const num = getTianshuDifficulty() == "normal" ? 1 : 2
|
||||
@@ -68,7 +148,24 @@ const dynamicTranslates = {
|
||||
return `锁定技,准备阶段,你进行一次判定并获得判定牌,若此牌为红色,你本回合使用【杀】的次数+${num}。`
|
||||
},
|
||||
|
||||
//鬼王
|
||||
jizhou_shuying(player, skill) {
|
||||
const num = getTianshuDifficulty() == "nightmare" ? 2 : 1;
|
||||
|
||||
return `锁定技,敌方角色的出牌阶段开始时,你进行一次判定,然后其选择一项:1.弃置任意张点数之和大于判定结果的牌,你获得${num}个“噬”标记;2.失去${num}点体力。`;
|
||||
},
|
||||
danshi_shuying(player, skill) {
|
||||
const difficulty = getTianshuDifficulty();
|
||||
let num = 1;
|
||||
|
||||
if (difficulty == "hard") {
|
||||
num = 2;
|
||||
} else if (difficulty == "nightmare") {
|
||||
num = 3;
|
||||
}
|
||||
|
||||
return `锁定技,你受到伤害时此伤害+1,然后你摸${num}张牌并移去1个“噬”。`;
|
||||
},
|
||||
};
|
||||
|
||||
export default dynamicTranslates;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import characters from "./character.js";
|
||||
import cards from "./card.js";
|
||||
import pinyins from "./pinyin.js";
|
||||
import skills from "./skill.js";
|
||||
import translates from "./translate.js";
|
||||
import characterTitles from "./characterTitle.js";
|
||||
import characterIntros from "./intro.js";
|
||||
import characterFilters from "./characterFilter.js";
|
||||
import dynamicTranslates from "./dynamicTranslate.js";
|
||||
import perfectPairs from "./perfectPairs.js";
|
||||
import voices from "./voices.js";
|
||||
import { characterSort, characterSortTranslate } from "./sort.js";
|
||||
|
||||
// 捉鬼驱邪主题数据片段,由活动 BOSS 根入口统一注册。
|
||||
export default {
|
||||
character: characters,
|
||||
card: cards,
|
||||
pinyins,
|
||||
skill: skills,
|
||||
translate: translates,
|
||||
characterTitle: characterTitles,
|
||||
characterIntro: characterIntros,
|
||||
characterFilter: characterFilters,
|
||||
dynamicTranslate: dynamicTranslates,
|
||||
perfectPair: perfectPairs,
|
||||
voices,
|
||||
characterSort,
|
||||
characterSortTranslate,
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
const characterIntros = {};
|
||||
|
||||
export default characterIntros;
|
||||
@@ -0,0 +1,3 @@
|
||||
const perfectPairs = {};
|
||||
|
||||
export default perfectPairs;
|
||||
@@ -0,0 +1,3 @@
|
||||
const pinyins = {};
|
||||
|
||||
export default pinyins;
|
||||
+1092
-31
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
const characterSort = {
|
||||
shuYing_pve_zhuoguiquxie: [
|
||||
"heibaiwuchang_boss_shuying",
|
||||
"niutoumamian_boss_shuying",
|
||||
"yvsai_boss_shuying",
|
||||
"huangfeng_boss_shuying",
|
||||
"riyeyoushen_boss_shuying",
|
||||
],
|
||||
};
|
||||
|
||||
const characterSortTranslate = {
|
||||
shuYing_pve_zhuoguiquxie: "捉鬼驱邪",
|
||||
};
|
||||
|
||||
export { characterSort, characterSortTranslate };
|
||||
@@ -1,4 +1,24 @@
|
||||
const translates = {
|
||||
mengpo_boss_shuying: "孟婆",
|
||||
aotang_shuying: "熬汤",
|
||||
aotang_shuying_info: "锁定技,你的回合开始时,令随机一名敌方角色随机遗忘1个武将技能直到你的下回合开始。",
|
||||
yunju_shuying: "云飓",
|
||||
yunju_shuying_info: "锁定技,敌方角色的回合结束时,该角色随机弃置1张手牌。",
|
||||
guimei_shuying: "鬼魅",
|
||||
guimei_shuying_info: "锁定技,你不会被翻面。你每回合首次成为其他角色使用牌的唯一目标时,将该牌目标改为随机角色,若目标仍为你,此牌使用者失去1点体力;若目标不为你,你回复1点体力。",
|
||||
|
||||
baowei_boss_shuying: "豹尾",
|
||||
eli_shuying: "恶力",
|
||||
eli_shuying_info: "锁定技,你每回合首次对敌方角色造成伤害时,你进行一次判定:若结果为红色,此伤害+1;若结果为黑色,你获得“完杀”直到回合结束",
|
||||
yinsha_shuying: "隐煞",
|
||||
yinsha_shuying_info: "锁定技,若其他角色的攻击范围内不包括你,其不能使用牌指定你为目标。且这些角色不能响应你使用的牌。",
|
||||
|
||||
niaozui_boss_shuying: "鸟嘴",
|
||||
suoxue_shuying: "索穴",
|
||||
suoxue_shuying_info: "每回合限一次,你使用伤害牌指定单一目标后,若其手牌数大于你,你可将手牌摸至与该角色相同(至多5张);若其手牌数小于你,你可弃置一张手牌令此牌不能抵消。",
|
||||
bingyi_shuying: "病疑",
|
||||
bingyi_shuying_info: "锁定技,每回合首次失去最后的手牌时,你摸5张牌。",
|
||||
|
||||
heibaiwuchang_boss_shuying: "黑白无常",
|
||||
mizui_shuying: "迷醉",
|
||||
mizui_shuying_info: "锁定技,你的伤害牌造成伤害后,你随机弃置受伤角色的1张牌。",
|
||||
@@ -13,9 +33,11 @@ const translates = {
|
||||
shiyv_shuying: "施狱",
|
||||
shiyv_shuying_info: "锁定技,摸牌阶段,你放弃摸牌改为随机获得牌堆中每种花色的牌各一张。",
|
||||
manji_shuying: "蛮击",
|
||||
manji_shuying_info: "你使用【杀】指定单一目标后,你可以弃置该角色2张手牌。若其中有【杀】,你本次【杀】造成的伤害+1。",
|
||||
manji_shuying_info: "你使用【杀】指定单一目标后,你可以弃置该角色1张手牌。若此牌是【杀】,你本次【杀】的伤害+1。",
|
||||
xiaoshou_shuying: "枭首",
|
||||
xiaoshou_shuying_info: "锁定技,准备阶段,你对随机一名敌方角色造成2点伤害",
|
||||
xiaoshou_shuying_info: "锁定技,准备阶段,你对随机一名敌方角色造成2点伤害。",
|
||||
guizhao_shuying: "诡招",
|
||||
guizhao_shuying_info: "锁定技,当你于回合内使用一张牌时,若此牌的类别是你本回合第一次使用,则你摸一张牌。",
|
||||
|
||||
yvsai_boss_shuying: "鱼鳃",
|
||||
anchao_shuying: "暗潮",
|
||||
@@ -39,7 +61,23 @@ const translates = {
|
||||
duane_shuying: "断恶",
|
||||
duane_shuying_info: "锁定技,敌方角色的弃牌阶段结束时,若其此阶段弃置了黑色牌,则该角色失去2点体力。",
|
||||
|
||||
guiwang_boss_shuying: "鬼王",
|
||||
jizhou_shuying: "疾咒",
|
||||
jizhou_shuying_info: "锁定技,敌方角色的出牌阶段开始时,你进行一次判定,然后其选择一项:1.弃置任意张点数之和大于判定结果的牌,你获得1个“噬”标记;2.失去1点体力。",
|
||||
danshi_shuying: "啖噬",
|
||||
danshi_shuying_info: "锁定技,你受到伤害时此伤害+1,然后你摸1张牌并移去1个“噬”。",
|
||||
chihu_shuying: "赤虎",
|
||||
chihu_shuying_info: "锁定技,若你的手牌数不是全场最多的,摸牌阶段你多摸4张牌;若你的体力值不是全场最多的,你造成的伤害+1。",
|
||||
|
||||
yanluowang_boss_shuying: "阎罗王",
|
||||
dianwei_shuying: "殿威",
|
||||
dianwei_shuying_info: "锁定技,准备阶段,你视为对装备区里没牌的敌方角色使用一张【杀】,然后装备区里有牌的敌方角色随机弃置一张装备区里的牌。",
|
||||
xingpan_shuying: "刑判",
|
||||
xingpan_shuying_info: "锁定技,出牌阶段开始时,你进行一次判定:若结果为红色,敌方唯一手牌最多的角色将一半数量的手牌交给你(向下取整);若结果为黑色,敌方唯一体力最多的角色失去1点体力。",
|
||||
zhennu_shuying: "震怒",
|
||||
zhennu_shuying_info: "锁定技,当你的体力值首次降至一半以下时,你立即开始你的回合并摸四张牌。",
|
||||
xuanpan_shuying: "宣判",
|
||||
xuanpan_shuying_info: "一名敌方角色的回合结束后,若其本回合对你造成了4点或更多伤害,你随机对其造成1- 3点伤害;若其本回合摸牌数达到8张或更多,你随机摸1-4张牌;若其本回合回复了3点或更多体力值,你随机回复1 - 3点体力;若你本回合因弃置而进入弃牌堆的牌达到4张或更多,其随机弃置1 - 3张手牌。",
|
||||
};
|
||||
|
||||
export default translates;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
const voices = {};
|
||||
|
||||
export default voices;
|
||||
+3
-11
@@ -1,15 +1,7 @@
|
||||
import shiershengxiao from "./sets/shiershengxiao/skill.js";
|
||||
import zhuoguiquxie from "./sets/zhuoguiquxie/skill.js";
|
||||
import qingqingzijin from "./sets/qingqingzijin/skill.js";
|
||||
import tianshu from "./sets/tianshu/skill.js";
|
||||
import mergeBossModules from "./merge.js";
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
// 汇总所有主题技能,确保跨 PVE 复用 BOSS 时技能始终随统一入口注册。
|
||||
const skills = mergeBossModules("技能", [
|
||||
["十二生肖", shiershengxiao],
|
||||
["捉鬼驱邪", zhuoguiquxie],
|
||||
["青青子衿", qingqingzijin],
|
||||
["天书乱斗", tianshu],
|
||||
]);
|
||||
const skills = mergeBossSection("技能", bossSets, "skill");
|
||||
|
||||
export default skills;
|
||||
|
||||
+4
-6
@@ -1,9 +1,7 @@
|
||||
const characterSort = {
|
||||
shuYing_pve_tianshu: ["chenlong_shuying"],
|
||||
};
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const characterSortTranslate = {
|
||||
shuYing_pve_tianshu: "天书乱斗",
|
||||
};
|
||||
const characterSort = mergeBossSection("武将分组", bossSets, "characterSort");
|
||||
const characterSortTranslate = mergeBossSection("武将分组翻译", bossSets, "characterSortTranslate");
|
||||
|
||||
export { characterSort, characterSortTranslate };
|
||||
|
||||
+3
-11
@@ -1,15 +1,7 @@
|
||||
import shiershengxiao from "./sets/shiershengxiao/translate.js";
|
||||
import zhuoguiquxie from "./sets/zhuoguiquxie/translate.js";
|
||||
import qingqingzijin from "./sets/qingqingzijin/translate.js";
|
||||
import tianshu from "./sets/tianshu/translate.js";
|
||||
import mergeBossModules from "./merge.js";
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
// 汇总所有主题翻译,并阻止同名翻译在后加载模块中被覆盖。
|
||||
const translates = mergeBossModules("翻译", [
|
||||
["十二生肖", shiershengxiao],
|
||||
["捉鬼驱邪", zhuoguiquxie],
|
||||
["青青子衿", qingqingzijin],
|
||||
["天书乱斗", tianshu],
|
||||
]);
|
||||
const translates = mergeBossSection("翻译", bossSets, "translate");
|
||||
|
||||
export default translates;
|
||||
|
||||
+4
-2
@@ -1,4 +1,6 @@
|
||||
const voices = {
|
||||
};
|
||||
import bossSets from "./sets.js";
|
||||
import { mergeBossSection } from "./merge.js";
|
||||
|
||||
const voices = mergeBossSection("语音台词", bossSets, "voices");
|
||||
|
||||
export default voices;
|
||||
|
||||
|
Before Width: | Height: | Size: 617 KiB After Width: | Height: | Size: 617 KiB |
|
Before Width: | Height: | Size: 638 KiB After Width: | Height: | Size: 638 KiB |
+118
-228
@@ -1,210 +1,125 @@
|
||||
const bossList = {
|
||||
// stage1: ["caocao_boss_shuying", "dongzhuo_boss_shuying"],
|
||||
stage1: ["zishu_boss_shuying", "wuma_boss_shuying", "chenlong_boss_shuying", "weiyang_boss_shuying", "shenhou_boss_shuying", "xvgou_boss_shuying"],
|
||||
stage2: ["heibaiwuchang_boss_shuying", "yvsai_boss_shuying", "huangfeng_boss_shuying", "riyeyoushen_boss_shuying"],
|
||||
stage3: ["caocao_boss_shuying", "simayi_boss_shuying", "lvbu_boss_shuying", "dongzhuo_boss_shuying"],
|
||||
stage4: ["shuishengonggong_boss_shuying", "shaohao_boss_shuying", "xuannv_boss_shuying", "hanba_boss_shuying"],
|
||||
const difficultyOrder = [normal, hard, nightmare];
|
||||
|
||||
const stages = [
|
||||
{
|
||||
id: stage1,
|
||||
name: 第一关,
|
||||
// bosses: [caocao_boss_shuying, dongzhuo_boss_shuying],
|
||||
bosses: [zishu_boss_shuying, chouniu_boss_shuying, yinhu_boss_shuying, maotu_boss_shuying, chenlong_boss_shuying, sishe_boss_shuying, wuma_boss_shuying, weiyang_boss_shuying, shenhou_boss_shuying, youji_boss_shuying, xvgou_boss_shuying, haizhu_boss_shuying],
|
||||
},
|
||||
{
|
||||
id: stage2,
|
||||
name: 第二关,
|
||||
bosses: [mengpo_boss_shuying, baowei_boss_shuying, niaozui_boss_shuying, heibaiwuchang_boss_shuying, niutoumamian_boss_shuying, yvsai_boss_shuying, huangfeng_boss_shuying, riyeyoushen_boss_shuying, guiwang_boss_shuying, yanluowang_boss_shuying],
|
||||
},
|
||||
{
|
||||
id: stage3,
|
||||
name: 第三关,
|
||||
bosses: [caocao_boss_shuying, simayi_boss_shuying, lvbu_boss_shuying, dongzhuo_boss_shuying],
|
||||
},
|
||||
{
|
||||
id: stage4,
|
||||
name: 第四关,
|
||||
bosses: [shuishengonggong_boss_shuying, shaohao_boss_shuying, xuannv_boss_shuying, hanba_boss_shuying],
|
||||
},
|
||||
];
|
||||
|
||||
const bossList = Object.fromEntries(stages.map(stage => [stage.id, stage.bosses]));
|
||||
|
||||
const virtualIdols = {
|
||||
Xiaotao: vtb_xiaotao,
|
||||
Xiaosha: vtb_xiaosha,
|
||||
Xiaoshan: vtb_xiaoshan,
|
||||
Xiaole: vtb_xiaole,
|
||||
Xiaojiu: vtb_xiaojiu,
|
||||
};
|
||||
const virtualIdolList = Object.values(virtualIdols);
|
||||
|
||||
const virtualIdolList = ["vtb_xiaotao", "vtb_xiaosha", "vtb_xiaoshan", "vtb_xiaole", "vtb_xiaojiu"];
|
||||
|
||||
const difficultyOrder = ["normal", "hard", "nightmare"];
|
||||
// Boss 的体力与体力上限始终使用相同加成,只需在配置中填写一次。
|
||||
const createDifficultyConfig = (startCards, hpBonus = 0) => ({
|
||||
startCards,
|
||||
hpBonus,
|
||||
maxHpBonus: hpBonus,
|
||||
});
|
||||
|
||||
const bossDifficultyTemplates = {
|
||||
shiershengxiao:
|
||||
{
|
||||
normal: {
|
||||
startCards: 4,
|
||||
},
|
||||
hard: {
|
||||
startCards: 6,
|
||||
hpBonus: 1,
|
||||
maxHpBonus: 1,
|
||||
},
|
||||
nightmare: {
|
||||
startCards: 8,
|
||||
hpBonus: 4,
|
||||
maxHpBonus: 4,
|
||||
},
|
||||
shiershengxiao: {
|
||||
normal: createDifficultyConfig(4),
|
||||
hard: createDifficultyConfig(6, 1),
|
||||
nightmare: createDifficultyConfig(8, 4),
|
||||
},
|
||||
|
||||
zhuoguiquxie: {
|
||||
normal: {
|
||||
startCards: 4,
|
||||
hpBonus: 2,
|
||||
maxHpBonus: 2,
|
||||
},
|
||||
hard: {
|
||||
startCards: 6,
|
||||
hpBonus: 4,
|
||||
maxHpBonus: 4,
|
||||
},
|
||||
nightmare: {
|
||||
startCards: 8,
|
||||
hpBonus: 8,
|
||||
maxHpBonus: 8,
|
||||
},
|
||||
normal: createDifficultyConfig(4, 2),
|
||||
hard: createDifficultyConfig(6, 4),
|
||||
nightmare: createDifficultyConfig(8, 8),
|
||||
},
|
||||
|
||||
qingqingzijin: {
|
||||
normal: {
|
||||
startCards: 6,
|
||||
hpBonus: 6,
|
||||
maxHpBonus: 6,
|
||||
},
|
||||
hard: {
|
||||
startCards: 8,
|
||||
hpBonus: 16,
|
||||
maxHpBonus: 16,
|
||||
},
|
||||
nightmare: {
|
||||
startCards: 10,
|
||||
hpBonus: 26,
|
||||
maxHpBonus: 26,
|
||||
},
|
||||
normal: createDifficultyConfig(6, 6),
|
||||
hard: createDifficultyConfig(8, 16),
|
||||
nightmare: createDifficultyConfig(10, 26),
|
||||
},
|
||||
|
||||
tianshuluandou:
|
||||
{
|
||||
normal: {
|
||||
startCards: 6,
|
||||
hpBonus: 6,
|
||||
maxHpBonus: 6,
|
||||
},
|
||||
hard: {
|
||||
startCards: 8,
|
||||
hpBonus: 11,
|
||||
maxHpBonus: 11,
|
||||
},
|
||||
nightmare: {
|
||||
startCards: 12,
|
||||
hpBonus: 21,
|
||||
maxHpBonus: 21,
|
||||
},
|
||||
tianshuluandou: {
|
||||
normal: createDifficultyConfig(6, 6),
|
||||
hard: createDifficultyConfig(8, 11),
|
||||
nightmare: createDifficultyConfig(12, 21),
|
||||
},
|
||||
};
|
||||
|
||||
// 为单个 Boss 复制模板,并按难度覆盖其补充技能。
|
||||
const createBossConfig = (template, skills = {}) => ({
|
||||
normal: { ...template.normal, ...(skills.normal?.length ? { skills: skills.normal } : {}) },
|
||||
hard: { ...template.hard, ...(skills.hard?.length ? { skills: skills.hard } : {}) },
|
||||
nightmare: { ...template.nightmare, ...(skills.nightmare?.length ? { skills: skills.nightmare } : {}) },
|
||||
});
|
||||
|
||||
// 同组 Boss 使用相同模板,但生成彼此独立的配置对象。
|
||||
const createBossGroup = (bosses, template) => Object.fromEntries(
|
||||
bosses.map(boss => [boss, createBossConfig(template)])
|
||||
);
|
||||
|
||||
const addSkillFromHard = skill => ({ hard: [skill], nightmare: [skill] });
|
||||
|
||||
const bossDifficulty = {
|
||||
default: {
|
||||
normal: {
|
||||
startCards: 4,
|
||||
hp: null,
|
||||
maxHp: null,
|
||||
hpBonus: 0,
|
||||
maxHpBonus: 0,
|
||||
skills: [],
|
||||
},
|
||||
hard: {
|
||||
startCards: 5,
|
||||
hp: null,
|
||||
maxHp: null,
|
||||
hpBonus: 2,
|
||||
maxHpBonus: 2,
|
||||
skills: [],
|
||||
},
|
||||
nightmare: {
|
||||
startCards: 6,
|
||||
hp: null,
|
||||
maxHp: null,
|
||||
hpBonus: 4,
|
||||
maxHpBonus: 4,
|
||||
skills: [],
|
||||
},
|
||||
normal: createDifficultyConfig(4),
|
||||
hard: createDifficultyConfig(5, 2),
|
||||
nightmare: createDifficultyConfig(6, 4),
|
||||
},
|
||||
bosses: {
|
||||
chenlong_boss_shuying: { ...bossDifficultyTemplates.shiershengxiao, },
|
||||
weiyang_boss_shuying: { ...bossDifficultyTemplates.shiershengxiao, },
|
||||
shenhou_boss_shuying: { ...bossDifficultyTemplates.shiershengxiao, },
|
||||
xvgou_boss_shuying: { ...bossDifficultyTemplates.shiershengxiao, },
|
||||
...createBossGroup(stages[0].bosses, bossDifficultyTemplates.shiershengxiao),
|
||||
|
||||
heibaiwuchang_boss_shuying: {
|
||||
...bossDifficultyTemplates.zhuoguiquxie,
|
||||
hard: {
|
||||
...bossDifficultyTemplates.zhuoguiquxie.hard,
|
||||
skills: ["xixing_shuying"],
|
||||
},
|
||||
nightmare: {
|
||||
...bossDifficultyTemplates.zhuoguiquxie.nightmare,
|
||||
skills: ["xixing_shuying", "taiping_shuying"],
|
||||
},
|
||||
},
|
||||
yvsai_boss_shuying: {
|
||||
...bossDifficultyTemplates.zhuoguiquxie,
|
||||
},
|
||||
huangfeng_boss_shuying:
|
||||
{
|
||||
...bossDifficultyTemplates.zhuoguiquxie,
|
||||
},
|
||||
riyeyoushen_boss_shuying: {
|
||||
...bossDifficultyTemplates.zhuoguiquxie,
|
||||
nightmare: {
|
||||
...bossDifficultyTemplates.zhuoguiquxie.nightmare,
|
||||
skills: ["duane_shuying"],
|
||||
},
|
||||
},
|
||||
...createBossGroup([yvsai_boss_shuying, huangfeng_boss_shuying], bossDifficultyTemplates.zhuoguiquxie),
|
||||
mengpo_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, {
|
||||
nightmare: [guimei_shuying],
|
||||
}),
|
||||
baowei_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, addSkillFromHard(yinsha_shuying)),
|
||||
niaozui_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, addSkillFromHard(bingyi_shuying)),
|
||||
heibaiwuchang_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, {
|
||||
hard: [xixing_shuying],
|
||||
nightmare: [xixing_shuying, taiping_shuying],
|
||||
}),
|
||||
riyeyoushen_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, {
|
||||
nightmare: [duane_shuying],
|
||||
}),
|
||||
niutoumamian_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, {
|
||||
hard: [xiaoshou_shuying],
|
||||
nightmare: [xiaoshou_shuying, guizhao_shuying],
|
||||
}),
|
||||
guiwang_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, {
|
||||
nightmare: [chihu_shuying],
|
||||
}),
|
||||
yanluowang_boss_shuying: createBossConfig(bossDifficultyTemplates.zhuoguiquxie, {
|
||||
hard: [zhennu_shuying],
|
||||
nightmare: [zhennu_shuying, xuanpan_shuying],
|
||||
}),
|
||||
|
||||
caocao_boss_shuying:
|
||||
{
|
||||
...bossDifficultyTemplates.qingqingzijin,
|
||||
hard: {
|
||||
...bossDifficultyTemplates.qingqingzijin.hard,
|
||||
skills: ["yishen_shuying"],
|
||||
},
|
||||
nightmare: {
|
||||
...bossDifficultyTemplates.qingqingzijin.nightmare,
|
||||
skills: ["yishen_shuying"],
|
||||
},
|
||||
},
|
||||
simayi_boss_shuying:
|
||||
{
|
||||
...bossDifficultyTemplates.qingqingzijin,
|
||||
hard: {
|
||||
...bossDifficultyTemplates.qingqingzijin.hard,
|
||||
skills: ["yuanlv_shuying"],
|
||||
},
|
||||
nightmare: {
|
||||
...bossDifficultyTemplates.qingqingzijin.nightmare,
|
||||
skills: ["yuanlv_shuying"],
|
||||
},
|
||||
},
|
||||
lvbu_boss_shuying: {
|
||||
...bossDifficultyTemplates.qingqingzijin,
|
||||
hard: {
|
||||
...bossDifficultyTemplates.qingqingzijin.hard,
|
||||
skills: ["zhanjia_shuying"],
|
||||
},
|
||||
nightmare: {
|
||||
...bossDifficultyTemplates.qingqingzijin.nightmare,
|
||||
skills: ["zhanjia_shuying"],
|
||||
},
|
||||
},
|
||||
dongzhuo_boss_shuying: {
|
||||
...bossDifficultyTemplates.qingqingzijin,
|
||||
hard: {
|
||||
...bossDifficultyTemplates.qingqingzijin.hard,
|
||||
skills: ["qubu_shuying"],
|
||||
},
|
||||
nightmare: {
|
||||
...bossDifficultyTemplates.qingqingzijin.nightmare,
|
||||
skills: ["qubu_shuying"],
|
||||
},
|
||||
},
|
||||
|
||||
shuishengonggong_boss_shuying: {
|
||||
...bossDifficultyTemplates.tianshuluandou,
|
||||
hard: {
|
||||
...bossDifficultyTemplates.tianshuluandou.hard,
|
||||
skills: ["shuishen_shuying"],
|
||||
},
|
||||
nightmare: {
|
||||
...bossDifficultyTemplates.tianshuluandou.nightmare,
|
||||
skills: ["shuishen_shuying"],
|
||||
},
|
||||
},
|
||||
shaohao_boss_shuying: { ...bossDifficultyTemplates.tianshuluandou, },
|
||||
xuannv_boss_shuying: { ...bossDifficultyTemplates.tianshuluandou, },
|
||||
hanba_boss_shuying: { ...bossDifficultyTemplates.tianshuluandou, },
|
||||
caocao_boss_shuying: createBossConfig(bossDifficultyTemplates.qingqingzijin, addSkillFromHard(yishen_shuying)),
|
||||
simayi_boss_shuying: createBossConfig(bossDifficultyTemplates.qingqingzijin, addSkillFromHard(yuanlv_shuying)),
|
||||
lvbu_boss_shuying: createBossConfig(bossDifficultyTemplates.qingqingzijin, addSkillFromHard(zhanjia_shuying)),
|
||||
dongzhuo_boss_shuying: createBossConfig(bossDifficultyTemplates.qingqingzijin, addSkillFromHard(qubu_shuying)),
|
||||
|
||||
...createBossGroup([shaohao_boss_shuying, xuannv_boss_shuying, hanba_boss_shuying], bossDifficultyTemplates.tianshuluandou),
|
||||
shuishengonggong_boss_shuying: createBossConfig(bossDifficultyTemplates.tianshuluandou, addSkillFromHard(shuishen_shuying)),
|
||||
|
||||
baiqi_boss_shuying: {},
|
||||
pangu_boss_shuying: {},
|
||||
@@ -213,37 +128,16 @@ const bossDifficulty = {
|
||||
|
||||
const tianshuConfig = {
|
||||
bossList,
|
||||
stages: [
|
||||
{
|
||||
id: "stage1",
|
||||
name: "第一关",
|
||||
bosses: bossList.stage1,
|
||||
},
|
||||
{
|
||||
id: "stage2",
|
||||
name: "第二关",
|
||||
bosses: bossList.stage2,
|
||||
},
|
||||
{
|
||||
id: "stage3",
|
||||
name: "第三关",
|
||||
bosses: bossList.stage3,
|
||||
},
|
||||
{
|
||||
id: "stage4",
|
||||
name: "第四关",
|
||||
bosses: bossList.stage4,
|
||||
},
|
||||
],
|
||||
stages,
|
||||
difficulties: {
|
||||
normal: {
|
||||
name: "普通",
|
||||
name: 普通,
|
||||
},
|
||||
hard: {
|
||||
name: "困难",
|
||||
name: 困难,
|
||||
},
|
||||
nightmare: {
|
||||
name: "阴间",
|
||||
name: 阴间,
|
||||
},
|
||||
},
|
||||
difficultyOrder,
|
||||
@@ -251,11 +145,7 @@ const tianshuConfig = {
|
||||
virtualIdolList,
|
||||
virtualIdols: {
|
||||
random: virtualIdolList,
|
||||
Xiaojiu: "vtb_xiaojiu",
|
||||
Xiaosha: "vtb_xiaosha",
|
||||
Xiaoshan: "vtb_xiaoshan",
|
||||
Xiaole: "vtb_xiaole",
|
||||
Xiaotao: "vtb_xiaotao",
|
||||
...virtualIdols,
|
||||
},
|
||||
reward: {
|
||||
killRecover: 1,
|
||||
@@ -265,32 +155,32 @@ const tianshuConfig = {
|
||||
skillChoiceCount: 5,
|
||||
},
|
||||
settings: {
|
||||
virtualIdolConfigKey: "extension_术樱包_tianShu_Xvni",
|
||||
virtualIdolRandomPoolConfigKey: "extension_术樱包_tianShu_XvniRandomPool",
|
||||
virtualIdolReviveConfigKey: "extension_术樱包_tianShu_dead",
|
||||
addBossConfigKey: "extension_术樱包_tianShu_addBoss",
|
||||
revivePlayersConfigKey: "extension_术樱包_tianShu_revivePlayers",
|
||||
difficultyStatusKey: "shuYing_tianshuDifficulty",
|
||||
virtualIdolConfigKey: extension_术樱包_tianShu_Xvni,
|
||||
virtualIdolRandomPoolConfigKey: extension_术樱包_tianShu_XvniRandomPool,
|
||||
virtualIdolReviveConfigKey: extension_术樱包_tianShu_dead,
|
||||
addBossConfigKey: extension_术樱包_tianShu_addBoss,
|
||||
revivePlayersConfigKey: extension_术樱包_tianShu_revivePlayers,
|
||||
difficultyStatusKey: shuYing_tianshuDifficulty,
|
||||
},
|
||||
skillPool: {
|
||||
banned: ["huoxin", "jueqing", "qinqing", "beige", "huashen", "drlt_zhiti", "olzhiti", "xinfu_pdgyingshi", "rebeige"],
|
||||
banned: [huoxin, jueqing, qinqing, beige, huashen, drlt_zhiti, olzhiti, xinfu_pdgyingshi, rebeige],
|
||||
},
|
||||
keywordBuffs: [
|
||||
{
|
||||
keyword: "杀",
|
||||
keyword: 杀,
|
||||
levels: [
|
||||
{ count: 2, damageBonus: 1 },
|
||||
{ count: 3, damageBonus: 2 },
|
||||
],
|
||||
},
|
||||
{
|
||||
keyword: "闪",
|
||||
keyword: 闪,
|
||||
levels: [
|
||||
{ count: 2, drawAfterShan: 1 },
|
||||
],
|
||||
},
|
||||
{
|
||||
keyword: "桃",
|
||||
keyword: 桃,
|
||||
levels: [
|
||||
{ count: 2, recoverBonus: 1 },
|
||||
],
|
||||
|
||||
+18
-15
@@ -721,20 +721,23 @@ export default function initTianshu(lib, game, ui, get, ai, _status, shuYing) {
|
||||
};
|
||||
|
||||
tianshu.character = {
|
||||
tianshu_boss_shuYing: ["male", "qun", 0,
|
||||
["shuYing_Skill_Tianshu_Go", "shuYing_Tianshu_NewNoStartCards", "shuYing_Skill_Tianshu_intro1", "shuYing_Skill_Tianshu_intro2", "shuYing_Skill_Tianshu_intro3",
|
||||
"shuYing_Skill_Tianshu_intro4", "shuYing_Skill_Tianshu_intro5"],
|
||||
["boss", 'ext:术樱包/pve/images/tianshu.jpg']]
|
||||
};
|
||||
tianshu.init = () => {
|
||||
for (let i in lib.character.character) {
|
||||
if (lib.character.character[i][4].includes('hiddenboss')) continue;
|
||||
lib.character.character.config[i + '_boss_config'] = {
|
||||
name: get.translation(i),
|
||||
init: true,
|
||||
unfrequent: true,
|
||||
}
|
||||
}
|
||||
tianshu_boss_shuYing: {
|
||||
sex: "male",
|
||||
group: "",
|
||||
hp: 0,
|
||||
skills: [
|
||||
"shuYing_Skill_Tianshu_Go",
|
||||
"shuYing_Tianshu_NewNoStartCards",
|
||||
"shuYing_Skill_Tianshu_intro1",
|
||||
"shuYing_Skill_Tianshu_intro2",
|
||||
"shuYing_Skill_Tianshu_intro3",
|
||||
"shuYing_Skill_Tianshu_intro4",
|
||||
"shuYing_Skill_Tianshu_intro5",
|
||||
],
|
||||
isBoss: true,
|
||||
extraModeData: "qun",
|
||||
img: "extension/术樱包/pve/images/tianshu.jpg",
|
||||
},
|
||||
};
|
||||
tianshu.game = {};
|
||||
tianshu.boss = {
|
||||
@@ -869,5 +872,5 @@ export default function initTianshu(lib, game, ui, get, ai, _status, shuYing) {
|
||||
tianshu.characterTitle = {};
|
||||
tianshu.characterReplace = {};
|
||||
|
||||
shuYing.appendExtension("shuYing_pve_tianshu", "天书乱斗", tianshu);
|
||||
return tianshu;
|
||||
}
|
||||
|
||||
@@ -188,6 +188,9 @@ async function getManifest() {
|
||||
throw new Error("校验清单格式错误");
|
||||
}
|
||||
|
||||
getManifestRemoveFiles(manifest);
|
||||
getManifestRemoveDirectories(manifest);
|
||||
|
||||
return manifest;
|
||||
}
|
||||
|
||||
@@ -241,7 +244,46 @@ function getManifestAssetFiles(manifest, coreFiles) {
|
||||
}
|
||||
|
||||
function getManifestRemoveFiles(manifest) {
|
||||
return uniqueManifestList(manifest?.remove || []);
|
||||
const files = uniqueManifestList(manifest?.remove || []);
|
||||
const unsafe = files.filter(file => !isSafeManifestPath(file));
|
||||
|
||||
if (unsafe.length) {
|
||||
throw new Error(`校验清单 remove 包含不安全路径:${unsafe.join("、")}`);
|
||||
}
|
||||
|
||||
const conflicts = files.filter(file => manifest?.files?.[file]);
|
||||
if (conflicts.length) {
|
||||
throw new Error(`待删除文件仍存在于新版清单:${conflicts.join("、")}`);
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
function isSafeManifestPath(path) {
|
||||
const parts = normalizeManifestPath(path).split("/");
|
||||
return parts.length > 0
|
||||
&& parts.every(part => part && part != "." && part != "..")
|
||||
&& !parts.some(part => part.includes(":"));
|
||||
}
|
||||
|
||||
function getManifestRemoveDirectories(manifest) {
|
||||
const directories = uniqueManifestList(manifest?.removeDirectories || []);
|
||||
const unsafe = directories.filter(directory => !isSafeManifestPath(directory));
|
||||
|
||||
if (unsafe.length) {
|
||||
throw new Error(`校验清单 removeDirectories 包含不安全路径:${unsafe.join("、")}`);
|
||||
}
|
||||
|
||||
const manifestFiles = getManifestFileKeys(manifest);
|
||||
const conflicts = directories.filter(directory =>
|
||||
manifestFiles.some(file => file == directory || file.startsWith(`${directory}/`))
|
||||
);
|
||||
|
||||
if (conflicts.length) {
|
||||
throw new Error(`待删除目录仍包含新版文件:${conflicts.join("、")}`);
|
||||
}
|
||||
|
||||
return directories.sort((a, b) => b.split("/").length - a.split("/").length || b.length - a.length);
|
||||
}
|
||||
|
||||
function getManifestDownloadFiles(manifest) {
|
||||
@@ -330,6 +372,20 @@ function removeFile(path) {
|
||||
});
|
||||
}
|
||||
|
||||
function removeDir(path) {
|
||||
return new Promise(resolve => {
|
||||
if (typeof game.removeDir != "function") {
|
||||
resolve({ removed: false, error: new Error("当前环境不支持删除文件夹") });
|
||||
return;
|
||||
}
|
||||
game.removeDir(
|
||||
path,
|
||||
() => resolve({ removed: true }),
|
||||
error => resolve({ removed: false, error })
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function createDir(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
game.createDir(path, resolve, reject);
|
||||
@@ -353,6 +409,28 @@ async function removeManifestFiles(shuYing, manifest) {
|
||||
}
|
||||
}
|
||||
|
||||
async function removeManifestDirectories(shuYing, manifest) {
|
||||
const directories = getManifestRemoveDirectories(manifest);
|
||||
|
||||
for (const directory of directories) {
|
||||
const target = `extension/术樱包/${directory}`;
|
||||
await addLog(shuYing, `删除废弃目录:${directory}`);
|
||||
const result = await removeDir(target);
|
||||
|
||||
if (result.removed) {
|
||||
await addLog(shuYing, `废弃目录已删除:${directory}`);
|
||||
}
|
||||
else {
|
||||
await addLog(shuYing, `废弃目录不存在或删除失败,已跳过:${directory};${getErrorMessage(result.error)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function removeManifestOldPaths(shuYing, manifest) {
|
||||
await removeManifestFiles(shuYing, manifest);
|
||||
await removeManifestDirectories(shuYing, manifest);
|
||||
}
|
||||
|
||||
async function downloadCoreFiles(shuYing, manifest) {
|
||||
if (typeof game.readFile != "function" || typeof game.writeFile != "function") {
|
||||
throw new Error("当前环境不支持安全替换核心文件");
|
||||
@@ -396,7 +474,7 @@ async function downloadCoreFiles(shuYing, manifest) {
|
||||
await writeTargetFile(fileData[file], `extension/术樱包/${file}`);
|
||||
progress++;
|
||||
}
|
||||
await removeManifestFiles(shuYing, manifest);
|
||||
await removeManifestOldPaths(shuYing, manifest);
|
||||
setProgress(shuYing, { title: "核心文件修复", status: "完成", current: coreFiles.length * 2, total: coreFiles.length * 2 });
|
||||
}
|
||||
catch (error) {
|
||||
@@ -524,7 +602,7 @@ async function repairMissingFiles(shuYing) {
|
||||
await createFolders("extension/术樱包/", files, shuYing);
|
||||
|
||||
await downloadList(shuYing, files, manifest);
|
||||
await removeManifestFiles(shuYing, manifest);
|
||||
await removeManifestOldPaths(shuYing, manifest);
|
||||
|
||||
setProgress(shuYing, { title: "查漏补缺", status: "完成", current: files.length, total: files.length });
|
||||
await addLog(shuYing, "查漏补缺完成");
|
||||
|
||||
Reference in New Issue
Block a user