From a04a2d4732274b5e709394554e8f6a2474234d9d Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Fri, 8 Dec 2023 07:23:31 -0800 Subject: [PATCH] Migrate the extension menu. --- noname/library.js | 2 + noname/library/extension-menu.js | 11 ++++++ noname/library/extension-menu/boss.js | 11 ++++++ .../library/extension-menu/boss/enable-ai.js | 4 ++ noname/library/extension-menu/boss/enable.js | 37 +++++++++++++++++++ noname/library/extension-menu/boss/hide.js | 19 ++++++++++ .../extension-menu/boss/introduction.js | 5 +++ noname/library/extension-menu/card-pile.js | 33 +++++++++++++++++ .../card-pile/card-pile-item.js | 5 +++ .../extension-menu/card-pile/enable.js | 5 +++ .../library/extension-menu/card-pile/guohe.js | 7 ++++ .../library/extension-menu/card-pile/hide.js | 19 ++++++++++ .../extension-menu/card-pile/introduction.js | 5 +++ .../library/extension-menu/card-pile/jiu.js | 7 ++++ .../extension-menu/card-pile/nanman.js | 7 ++++ .../extension-menu/card-pile/sha-fire.js | 7 ++++ .../extension-menu/card-pile/sha-thunder.js | 7 ++++ .../library/extension-menu/card-pile/sha.js | 7 ++++ .../library/extension-menu/card-pile/shan.js | 7 ++++ .../extension-menu/card-pile/shunshou.js | 7 ++++ .../library/extension-menu/card-pile/tao.js | 7 ++++ .../extension-menu/card-pile/tiesuo.js | 7 ++++ .../extension-menu/card-pile/wanjian.js | 7 ++++ .../library/extension-menu/card-pile/wuxie.js | 7 ++++ noname/library/extension-menu/coin.js | 13 +++++++ noname/library/extension-menu/coin/canvas.js | 13 +++++++ noname/library/extension-menu/coin/display.js | 11 ++++++ .../extension-menu/coin/display/item.js | 4 ++ noname/library/extension-menu/coin/enable.js | 14 +++++++ noname/library/extension-menu/coin/hide.js | 19 ++++++++++ .../extension-menu/coin/introduction.js | 5 +++ noname/library/extension-menu/wuxing.js | 11 ++++++ .../library/extension-menu/wuxing/enable.js | 5 +++ noname/library/extension-menu/wuxing/hide.js | 19 ++++++++++ .../extension-menu/wuxing/introduction.js | 5 +++ .../library/extension-menu/wuxing/number.js | 7 ++++ .../extension-menu/wuxing/number/item.js | 6 +++ 37 files changed, 372 insertions(+) create mode 100644 noname/library/extension-menu.js create mode 100644 noname/library/extension-menu/boss.js create mode 100644 noname/library/extension-menu/boss/enable-ai.js create mode 100644 noname/library/extension-menu/boss/enable.js create mode 100644 noname/library/extension-menu/boss/hide.js create mode 100644 noname/library/extension-menu/boss/introduction.js create mode 100644 noname/library/extension-menu/card-pile.js create mode 100644 noname/library/extension-menu/card-pile/card-pile-item.js create mode 100644 noname/library/extension-menu/card-pile/enable.js create mode 100644 noname/library/extension-menu/card-pile/guohe.js create mode 100644 noname/library/extension-menu/card-pile/hide.js create mode 100644 noname/library/extension-menu/card-pile/introduction.js create mode 100644 noname/library/extension-menu/card-pile/jiu.js create mode 100644 noname/library/extension-menu/card-pile/nanman.js create mode 100644 noname/library/extension-menu/card-pile/sha-fire.js create mode 100644 noname/library/extension-menu/card-pile/sha-thunder.js create mode 100644 noname/library/extension-menu/card-pile/sha.js create mode 100644 noname/library/extension-menu/card-pile/shan.js create mode 100644 noname/library/extension-menu/card-pile/shunshou.js create mode 100644 noname/library/extension-menu/card-pile/tao.js create mode 100644 noname/library/extension-menu/card-pile/tiesuo.js create mode 100644 noname/library/extension-menu/card-pile/wanjian.js create mode 100644 noname/library/extension-menu/card-pile/wuxie.js create mode 100644 noname/library/extension-menu/coin.js create mode 100644 noname/library/extension-menu/coin/canvas.js create mode 100644 noname/library/extension-menu/coin/display.js create mode 100644 noname/library/extension-menu/coin/display/item.js create mode 100644 noname/library/extension-menu/coin/enable.js create mode 100644 noname/library/extension-menu/coin/hide.js create mode 100644 noname/library/extension-menu/coin/introduction.js create mode 100644 noname/library/extension-menu/wuxing.js create mode 100644 noname/library/extension-menu/wuxing/enable.js create mode 100644 noname/library/extension-menu/wuxing/hide.js create mode 100644 noname/library/extension-menu/wuxing/introduction.js create mode 100644 noname/library/extension-menu/wuxing/number.js create mode 100644 noname/library/extension-menu/wuxing/number/item.js diff --git a/noname/library.js b/noname/library.js index 8869613f3..957725c5c 100644 --- a/noname/library.js +++ b/noname/library.js @@ -14,6 +14,7 @@ import { CONFIGURATION_MENU } from "./library/configuration-menu.js"; import { dynamicTranslate } from "./library/dynamic-translate.js"; import { element } from "./library/element.js"; import { emotionList } from "./library/emotion-list.js"; +import { extensionMenu } from "./library/extension-menu.js"; import { extensionPack } from "./library/extension-pack.js"; import { hookMap } from "./library/hook-map.js"; import { hook } from "./library/hook.js"; @@ -101,6 +102,7 @@ export class Library { ]) static characterDialogGroup = CharacterDialogGroup; static configMenu = CONFIGURATION_MENU; + static extensionMenu = extensionMenu; constructor() { throw new TypeError(`${new.target.name} is not a constructor`); diff --git a/noname/library/extension-menu.js b/noname/library/extension-menu.js new file mode 100644 index 000000000..7bd3dbc75 --- /dev/null +++ b/noname/library/extension-menu.js @@ -0,0 +1,11 @@ +import { BOSS } from "./extension-menu/boss.js"; +import { CARD_PILE } from "./extension-menu/card-pile.js"; +import { COIN } from "./extension-menu/coin.js"; +import { WUXING } from "./extension-menu/wuxing.js"; + +export const extensionMenu = { + cardpile: CARD_PILE, + boss: BOSS, + wuxing: WUXING, + coin: COIN +}; diff --git a/noname/library/extension-menu/boss.js b/noname/library/extension-menu/boss.js new file mode 100644 index 000000000..c5ede908f --- /dev/null +++ b/noname/library/extension-menu/boss.js @@ -0,0 +1,11 @@ +import { ENABLE_AI } from "./boss/enable-ai.js"; +import { ENABLE } from "./boss/enable.js"; +import { HIDE } from "./boss/hide.js"; +import { INTRODUCTION } from "./boss/introduction.js"; + +export const BOSS = { + enable: ENABLE, + intro: INTRODUCTION, + enableai: ENABLE_AI, + hide: HIDE +}; diff --git a/noname/library/extension-menu/boss/enable-ai.js b/noname/library/extension-menu/boss/enable-ai.js new file mode 100644 index 000000000..9ff95df58 --- /dev/null +++ b/noname/library/extension-menu/boss/enable-ai.js @@ -0,0 +1,4 @@ +export const ENABLE_AI = { + name: "随机选将可用", + init: false +}; diff --git a/noname/library/extension-menu/boss/enable.js b/noname/library/extension-menu/boss/enable.js new file mode 100644 index 000000000..7c4bfb19b --- /dev/null +++ b/noname/library/extension-menu/boss/enable.js @@ -0,0 +1,37 @@ +export const ENABLE = { + name: "开启", + init: false, + restart: true, + onswitch(bool) { + if (bool) { + var storage = { boss: {}, versus: {}, translate: {} }; + var loadversus = function () { + game.loadModeAsync("versus", function (mode) { + for (var i in mode.translate) { + storage.translate[i] = mode.translate[i]; + } + for (var i in mode.jiangeboss) { + if (mode.jiangeboss[i][4].contains("bossallowed")) { + storage.versus[i] = mode.jiangeboss[i]; + } + } + localStorage.setItem("boss_storage_playpackconfig", JSON.stringify(storage)); + }); + }; + game.loadModeAsync("boss", function (mode) { + for (var i in mode.translate) { + storage.translate[i] = mode.translate[i]; + } + for (var i in mode.characterPack.mode_boss) { + if (mode.characterPack.mode_boss[i][4].contains("bossallowed")) { + storage.boss[i] = mode.characterPack.mode_boss[i]; + } + } + loadversus(); + }); + } + else { + localStorage.removeItem("boss_storage_playpackconfig"); + } + } +}; diff --git a/noname/library/extension-menu/boss/hide.js b/noname/library/extension-menu/boss/hide.js new file mode 100644 index 000000000..07d0af97a --- /dev/null +++ b/noname/library/extension-menu/boss/hide.js @@ -0,0 +1,19 @@ +export const HIDE = { + name: "隐藏此扩展", + clear: true, + onclick() { + if (this.firstChild.innerHTML == "隐藏此扩展") { + this.firstChild.innerHTML = "此扩展将在重启后隐藏"; + lib.config.hiddenPlayPack.add("boss"); + if (!lib.config.prompt_hidepack) { + alert("隐藏的扩展包可通过选项-其它-重置隐藏内容恢复"); + game.saveConfig("prompt_hidepack", true); + } + } + else { + this.firstChild.innerHTML = "隐藏此扩展"; + lib.config.hiddenPlayPack.remove("boss"); + } + game.saveConfig("hiddenPlayPack", lib.config.hiddenPlayPack); + } +}; diff --git a/noname/library/extension-menu/boss/introduction.js b/noname/library/extension-menu/boss/introduction.js new file mode 100644 index 000000000..c8477163a --- /dev/null +++ b/noname/library/extension-menu/boss/introduction.js @@ -0,0 +1,5 @@ +export const INTRODUCTION = { + name: "将剑阁和挑战模式的武将添加到其它模式", + clear: true, + nopointer: true +}; diff --git a/noname/library/extension-menu/card-pile.js b/noname/library/extension-menu/card-pile.js new file mode 100644 index 000000000..ca6998e8f --- /dev/null +++ b/noname/library/extension-menu/card-pile.js @@ -0,0 +1,33 @@ +import { ENABLE } from "./card-pile/enable.js"; +import { GUOHE } from "./card-pile/guohe.js"; +import { HIDE } from "./card-pile/hide.js"; +import { INTRODUCTION } from "./card-pile/introduction.js"; +import { JIU } from "./card-pile/jiu.js"; +import { NANMAN } from "./card-pile/nanman.js"; +import { SHA_FIRE } from "./card-pile/sha-fire.js"; +import { SHA_THUNDER } from "./card-pile/sha-thunder.js"; +import { SHA } from "./card-pile/sha.js"; +import { SHAN } from "./card-pile/shan.js"; +import { SHUNSHOU } from "./card-pile/shunshou.js"; +import { TAO } from "./card-pile/tao.js"; +import { TIESUO } from "./card-pile/tiesuo.js"; +import { WANJIAN } from "./card-pile/wanjian.js"; +import { WUXIE } from "./card-pile/wuxie.js"; + +export const CARD_PILE = { + enable: ENABLE, + intro: INTRODUCTION, + sha: SHA, + huosha: SHA_FIRE, + leisha: SHA_THUNDER, + shan: SHAN, + tao: TAO, + jiu: JIU, + wuxie: WUXIE, + nanman: NANMAN, + wanjian: WANJIAN, + guohe: GUOHE, + shunshou: SHUNSHOU, + tiesuo: TIESUO, + hide: HIDE +}; diff --git a/noname/library/extension-menu/card-pile/card-pile-item.js b/noname/library/extension-menu/card-pile/card-pile-item.js new file mode 100644 index 000000000..75e2b86e2 --- /dev/null +++ b/noname/library/extension-menu/card-pile/card-pile-item.js @@ -0,0 +1,5 @@ +export const CARD_PILE_ITEM = { + "1": "补充全部", + "0.5": "补充一半", + "0": "不补充" +}; diff --git a/noname/library/extension-menu/card-pile/enable.js b/noname/library/extension-menu/card-pile/enable.js new file mode 100644 index 000000000..51f7c7be1 --- /dev/null +++ b/noname/library/extension-menu/card-pile/enable.js @@ -0,0 +1,5 @@ +export const ENABLE = { + name: "开启", + init: false, + restart: true +}; diff --git a/noname/library/extension-menu/card-pile/guohe.js b/noname/library/extension-menu/card-pile/guohe.js new file mode 100644 index 000000000..ef9adb615 --- /dev/null +++ b/noname/library/extension-menu/card-pile/guohe.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const GUOHE = { + name: "过河拆桥", + init: "0", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/hide.js b/noname/library/extension-menu/card-pile/hide.js new file mode 100644 index 000000000..07d0af97a --- /dev/null +++ b/noname/library/extension-menu/card-pile/hide.js @@ -0,0 +1,19 @@ +export const HIDE = { + name: "隐藏此扩展", + clear: true, + onclick() { + if (this.firstChild.innerHTML == "隐藏此扩展") { + this.firstChild.innerHTML = "此扩展将在重启后隐藏"; + lib.config.hiddenPlayPack.add("boss"); + if (!lib.config.prompt_hidepack) { + alert("隐藏的扩展包可通过选项-其它-重置隐藏内容恢复"); + game.saveConfig("prompt_hidepack", true); + } + } + else { + this.firstChild.innerHTML = "隐藏此扩展"; + lib.config.hiddenPlayPack.remove("boss"); + } + game.saveConfig("hiddenPlayPack", lib.config.hiddenPlayPack); + } +}; diff --git a/noname/library/extension-menu/card-pile/introduction.js b/noname/library/extension-menu/card-pile/introduction.js new file mode 100644 index 000000000..64aea608f --- /dev/null +++ b/noname/library/extension-menu/card-pile/introduction.js @@ -0,0 +1,5 @@ +export const INTRODUCTION = { + name: "将杀闪等牌在牌堆中的比例维持在与军争牌堆相同,防止开启扩展包后被过多地稀释", + clear: true, + nopointer: true +}; diff --git a/noname/library/extension-menu/card-pile/jiu.js b/noname/library/extension-menu/card-pile/jiu.js new file mode 100644 index 000000000..63c96809b --- /dev/null +++ b/noname/library/extension-menu/card-pile/jiu.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const JIU = { + name: "酒", + init: "0", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/nanman.js b/noname/library/extension-menu/card-pile/nanman.js new file mode 100644 index 000000000..12e50737e --- /dev/null +++ b/noname/library/extension-menu/card-pile/nanman.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const NANMAN = { + name: "南蛮入侵", + init: "0", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/sha-fire.js b/noname/library/extension-menu/card-pile/sha-fire.js new file mode 100644 index 000000000..411f3e23f --- /dev/null +++ b/noname/library/extension-menu/card-pile/sha-fire.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const SHA_FIRE = { + name: "火杀", + init: "1", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/sha-thunder.js b/noname/library/extension-menu/card-pile/sha-thunder.js new file mode 100644 index 000000000..aa7d4ef2d --- /dev/null +++ b/noname/library/extension-menu/card-pile/sha-thunder.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const SHA_THUNDER = { + name: "雷杀", + init: "1", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/sha.js b/noname/library/extension-menu/card-pile/sha.js new file mode 100644 index 000000000..a70b973f1 --- /dev/null +++ b/noname/library/extension-menu/card-pile/sha.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const SHA = { + name: "杀", + init: "1", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/shan.js b/noname/library/extension-menu/card-pile/shan.js new file mode 100644 index 000000000..6242ddcff --- /dev/null +++ b/noname/library/extension-menu/card-pile/shan.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const SHAN = { + name: "闪", + init: "1", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/shunshou.js b/noname/library/extension-menu/card-pile/shunshou.js new file mode 100644 index 000000000..270860eb7 --- /dev/null +++ b/noname/library/extension-menu/card-pile/shunshou.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const SHUNSHOU = { + name: "顺手牵羊", + init: "0", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/tao.js b/noname/library/extension-menu/card-pile/tao.js new file mode 100644 index 000000000..0bddad0d1 --- /dev/null +++ b/noname/library/extension-menu/card-pile/tao.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const TAO = { + name: "桃", + init: "0", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/tiesuo.js b/noname/library/extension-menu/card-pile/tiesuo.js new file mode 100644 index 000000000..4d0ba22d5 --- /dev/null +++ b/noname/library/extension-menu/card-pile/tiesuo.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const TIESUO = { + name: "铁索连环", + init: "0", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/wanjian.js b/noname/library/extension-menu/card-pile/wanjian.js new file mode 100644 index 000000000..796ff2822 --- /dev/null +++ b/noname/library/extension-menu/card-pile/wanjian.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const WANJIAN = { + name: "万箭齐发", + init: "0", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/card-pile/wuxie.js b/noname/library/extension-menu/card-pile/wuxie.js new file mode 100644 index 000000000..b72584853 --- /dev/null +++ b/noname/library/extension-menu/card-pile/wuxie.js @@ -0,0 +1,7 @@ +import { CARD_PILE_ITEM } from "./card-pile-item.js"; + +export const WUXIE = { + name: "无懈可击", + init: "0.5", + item: CARD_PILE_ITEM +}; diff --git a/noname/library/extension-menu/coin.js b/noname/library/extension-menu/coin.js new file mode 100644 index 000000000..b02ba4736 --- /dev/null +++ b/noname/library/extension-menu/coin.js @@ -0,0 +1,13 @@ +import { CANVAS } from "./coin/canvas.js"; +import { DISPLAY } from "./coin/display.js"; +import { ENABLE } from "./coin/enable.js"; +import { HIDE } from "./coin/hide.js"; +import { INTRODUCTION } from "./coin/introduction.js"; + +export const COIN = { + enable: ENABLE, + intro: INTRODUCTION, + display: DISPLAY, + canvas: CANVAS, + hide: HIDE +}; diff --git a/noname/library/extension-menu/coin/canvas.js b/noname/library/extension-menu/coin/canvas.js new file mode 100644 index 000000000..48265efa1 --- /dev/null +++ b/noname/library/extension-menu/coin/canvas.js @@ -0,0 +1,13 @@ +export const CANVAS = { + name: "特效置顶", + init: false, + onclick(bool) { + game.saveConfig("coin_canvas_playpackconfig", bool); + if (bool) { + ui.window.classList.add("canvas_top"); + } + else { + ui.window.classList.remove("canvas_top"); + } + } +}; diff --git a/noname/library/extension-menu/coin/display.js b/noname/library/extension-menu/coin/display.js new file mode 100644 index 000000000..84a97f577 --- /dev/null +++ b/noname/library/extension-menu/coin/display.js @@ -0,0 +1,11 @@ +import { ITEM } from "./display/item.js"; + +export const DISPLAY = { + name: "金币显示", + init: "text", + item: ITEM, + onclick(item) { + game.saveConfig("coin_display_playpackconfig", item); + if (game.changeCoin) game.changeCoin(0); + } +}; diff --git a/noname/library/extension-menu/coin/display/item.js b/noname/library/extension-menu/coin/display/item.js new file mode 100644 index 000000000..f52e1e586 --- /dev/null +++ b/noname/library/extension-menu/coin/display/item.js @@ -0,0 +1,4 @@ +export const ITEM = { + symbol: "符号", + text: "文字" +}; diff --git a/noname/library/extension-menu/coin/enable.js b/noname/library/extension-menu/coin/enable.js new file mode 100644 index 000000000..dc06677b4 --- /dev/null +++ b/noname/library/extension-menu/coin/enable.js @@ -0,0 +1,14 @@ +export const ENABLE = { + name: '开启', + init: false, + restart: true, + onclick(bool) { + if (bool) { + lib.config.plays.add('coin'); + } + else { + lib.config.plays.remove('coin'); + } + game.saveConfig('plays', lib.config.plays); + } +}; diff --git a/noname/library/extension-menu/coin/hide.js b/noname/library/extension-menu/coin/hide.js new file mode 100644 index 000000000..f4bf9c7d7 --- /dev/null +++ b/noname/library/extension-menu/coin/hide.js @@ -0,0 +1,19 @@ +export const HIDE = { + name: "隐藏此扩展", + clear: true, + onclick() { + if (this.firstChild.innerHTML == "隐藏此扩展") { + this.firstChild.innerHTML = "此扩展将在重启后隐藏"; + lib.config.hiddenPlayPack.add("coin"); + if (!lib.config.prompt_hidepack) { + alert("隐藏的扩展包可通过选项-其它-重置隐藏内容恢复"); + game.saveConfig("prompt_hidepack", true); + } + } + else { + this.firstChild.innerHTML = "隐藏此扩展"; + lib.config.hiddenPlayPack.remove("coin"); + } + game.saveConfig("hiddenPlayPack", lib.config.hiddenPlayPack); + } +}; diff --git a/noname/library/extension-menu/coin/introduction.js b/noname/library/extension-menu/coin/introduction.js new file mode 100644 index 000000000..3daf55ea4 --- /dev/null +++ b/noname/library/extension-menu/coin/introduction.js @@ -0,0 +1,5 @@ +export const INTRODUCTION = { + name: "每完成一次对局,可获得一定数量的金币;金币可用于购买游戏特效", + clear: true, + nopointer: true +}; diff --git a/noname/library/extension-menu/wuxing.js b/noname/library/extension-menu/wuxing.js new file mode 100644 index 000000000..d40e69020 --- /dev/null +++ b/noname/library/extension-menu/wuxing.js @@ -0,0 +1,11 @@ +import { ENABLE } from "./wuxing/enable.js"; +import { HIDE } from "./wuxing/hide.js"; +import { INTRODUCTION } from "./wuxing/introduction.js"; +import { NUMBER } from "./wuxing/number.js"; + +export const WUXING = { + enable: ENABLE, + intro: INTRODUCTION, + num: NUMBER, + hide: HIDE +}; diff --git a/noname/library/extension-menu/wuxing/enable.js b/noname/library/extension-menu/wuxing/enable.js new file mode 100644 index 000000000..51f7c7be1 --- /dev/null +++ b/noname/library/extension-menu/wuxing/enable.js @@ -0,0 +1,5 @@ +export const ENABLE = { + name: "开启", + init: false, + restart: true +}; diff --git a/noname/library/extension-menu/wuxing/hide.js b/noname/library/extension-menu/wuxing/hide.js new file mode 100644 index 000000000..6c54ab6fe --- /dev/null +++ b/noname/library/extension-menu/wuxing/hide.js @@ -0,0 +1,19 @@ +export const HIDE = { + name: "隐藏此扩展", + clear: true, + onclick() { + if (this.firstChild.innerHTML == "隐藏此扩展") { + this.firstChild.innerHTML = "此扩展将在重启后隐藏"; + lib.config.hiddenPlayPack.add("wuxing"); + if (!lib.config.prompt_hidepack) { + alert("隐藏的扩展包可通过选项-其它-重置隐藏内容恢复"); + game.saveConfig("prompt_hidepack", true); + } + } + else { + this.firstChild.innerHTML = "隐藏此扩展"; + lib.config.hiddenPlayPack.remove("wuxing"); + } + game.saveConfig("hiddenPlayPack", lib.config.hiddenPlayPack); + } +}; diff --git a/noname/library/extension-menu/wuxing/introduction.js b/noname/library/extension-menu/wuxing/introduction.js new file mode 100644 index 000000000..355a56658 --- /dev/null +++ b/noname/library/extension-menu/wuxing/introduction.js @@ -0,0 +1,5 @@ +export const INTRODUCTION = { + name: "每名角色和部分卡牌在游戏开始时随机获得一个属性", + clear: true, + nopointer: true +}; diff --git a/noname/library/extension-menu/wuxing/number.js b/noname/library/extension-menu/wuxing/number.js new file mode 100644 index 000000000..cb7ee5641 --- /dev/null +++ b/noname/library/extension-menu/wuxing/number.js @@ -0,0 +1,7 @@ +import { ITEM } from "./number/item.js"; + +export const NUMBER = { + name: "带属性卡牌", + init: "0.3", + item: ITEM +}; diff --git a/noname/library/extension-menu/wuxing/number/item.js b/noname/library/extension-menu/wuxing/number/item.js new file mode 100644 index 000000000..05c59627d --- /dev/null +++ b/noname/library/extension-menu/wuxing/number/item.js @@ -0,0 +1,6 @@ +export const ITEM = { + "0.1": "10%", + "0.2": "20%", + "0.3": "30%", + "0.5": "50%" +};