UNPKG

koishi-plugin-ggcevo-game

Version:

《星际争霸2》咕咕虫-evolved地图的专属游戏助手插件,集成天梯排行、抽奖系统、签到福利、兑换商城等丰富功能。

2,003 lines (1,994 loc) 368 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __export = (target, all) => { for (var name2 in all) __defProp(target, name2, { get: all[name2], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { Config: () => Config, apply: () => apply, inject: () => inject, name: () => name }); module.exports = __toCommonJS(src_exports); var import_koishi = require("koishi"); var import_koishi_plugin_sc2arcade_search = require("koishi-plugin-sc2arcade-search"); // src/weapons.ts var weaponConfig = { // 武器配置 "高斯步枪": { id: 1, type: "实弹武器", category: "实弹武器", damage: 10, armorDamageReduction: 1, // 每点护甲减伤1点伤害 description: "标准配置武器,中距离作战利器", specialeffect: "", price: 100, redCrystalCost: 1, isantiair: true, tagEffects: { "轻甲": 1.5 // 对轻甲目标造成150%伤害 } }, "激光步枪": { id: 2, type: "能量武器", category: "能量武器", damage: 23, armorDamageReduction: 0, description: "先进激光武器,远距离精准打击", specialeffect: "", price: 300, redCrystalCost: 3, isantiair: true, tagEffects: { "重甲": 1.5 } }, "焚烧枪": { id: 3, type: "热能武器", category: "热能武器", damage: 20, armorDamageReduction: 0.25, description: "基于热能的强大武器,烧烬一切", specialeffect: "", price: 450, redCrystalCost: 4, isantiair: false, tagEffects: { "惧热": 1.5, "生物": 1.2, "护盾": 0.5 } }, "碎骨步枪": { id: 4, type: "能量武器", category: "能量武器", damage: 28, armorDamageReduction: 0, description: "由激光步枪改良而来,高效的对重甲武器", specialeffect: "", price: 850, redCrystalCost: 8, isantiair: true, tagEffects: { "重甲": 1.75 } }, "等离子切割机": { id: 5, type: "实弹武器", category: "实弹武器", damage: 20, armorDamageReduction: 1, description: "一种改造后的采矿切割机,有效对抗重甲目标", specialeffect: "", price: 150, redCrystalCost: 1, isantiair: true, tagEffects: { "建筑": 2, "重甲": 1.5, "机械": 1.2 } }, "突击霰弹枪": { id: 6, type: "实弹武器", category: "实弹武器", damage: 48, armorDamageReduction: 4, description: "近距离攻击武器,专为遭遇战设计使用", specialeffect: "", price: 325, redCrystalCost: 3, isantiair: false, tagEffects: { "轻甲": 1.5 } }, "侦察步枪": { id: 7, type: "实弹武器", category: "实弹武器", damage: 60, armorDamageReduction: 3, description: "用于隐秘射击的最佳武器,但是无法穿透护甲", specialeffect: "", price: 550, redCrystalCost: 5, isantiair: true, tagEffects: {} }, "零度之下": { id: 8, type: "热能武器", category: "热能武器", damage: 22, armorDamageReduction: 1, description: "喷射稳定的液氮恒流,对长时间接触者造成致命的损伤", specialeffect: "攻击使目标叠加“寒冷”层数,每层使其受到的伤害+2.5%(至多+50%)", price: 775, redCrystalCost: 7, isantiair: false, tagEffects: { "惧寒": 2, "灵能": 1.5, "护盾": 0.5 } }, "弧焊枪": { id: 9, type: "能量武器", category: "能量武器", damage: 25, armorDamageReduction: 0.5, description: "一种经过改造的电动工具,可对近距离的目标放出高压电", specialeffect: "攻击消耗目标200点能量", price: 750, redCrystalCost: 7, isantiair: true, tagEffects: { "机械": 2, "建筑": 1.5 } }, "伽马枪": { id: 10, type: "热能武器", category: "热能武器", damage: 24, armorDamageReduction: 0.75, description: "一种高度危险性的武器,设计用辐射照射并伤害敌人", specialeffect: "攻击使生物目标(无机械标签)叠加“辐射”层数,每层使其受到的伤害+2.5%(至多+50%)", price: 825, redCrystalCost: 8, isantiair: true, tagEffects: { "生物": 1.5, "护盾": 0.5, "机械": 0.2 } }, "中子步枪": { id: 11, type: "能量武器", category: "能量武器", damage: 30, armorDamageReduction: 0, description: "激光步枪的变种,采用折射技术升级", specialeffect: "拥有“散射”效果,对其他目标造成50%的伤害", price: 1450, redCrystalCost: 14, isantiair: true, tagEffects: { "灵能": 1.2 } }, "粒子相位枪": { id: 12, type: "能量武器", category: "能量武器", damage: 30, armorDamageReduction: 0.75, description: "面对护盾目标而开发的武器", specialeffect: "攻击无视护盾目标50%的减伤效果", price: 1050, redCrystalCost: 10, isantiair: true, tagEffects: { "护盾": 1.8 } }, "动力钻头": { id: 13, type: "实弹武器", category: "实弹武器", damage: 30, armorDamageReduction: 0.5, description: "这种强大的钻头是由那些想把矿工SCV上的大螺丝用作武器的人创造的", specialeffect: "", price: 1e3, redCrystalCost: 10, isantiair: true, tagEffects: { "建筑": 2, "重甲": 1.5, "机械": 1.5 } }, "脉冲扰乱枪": { id: 14, type: "能量武器", category: "能量武器", damage: 40, armorDamageReduction: 1, description: "一种原型能量武器,能够发射强大的脉冲", specialeffect: "攻击使目标的技能层数减少2层", price: 1500, redCrystalCost: 15, isantiair: true, tagEffects: {} }, "MK79榴弹发射器": { id: 15, type: "热能武器", category: "热能武器", damage: 50, armorDamageReduction: 0.5, description: "发射非常坚固的专属榴弹,对具有坚固防御的目标几乎没有效果", specialeffect: "", price: 2e3, redCrystalCost: 20, isantiair: true, tagEffects: { "重甲": 1.5, "轻甲": 0.8, "护盾": 0.8 } }, "EC13电浆步枪": { id: 16, type: "能量武器", category: "能量武器", damage: 64, armorDamageReduction: 4, description: "用于解决高生命值目标的次时代武器,擅长对付护盾耗尽或没有护甲的敌人", specialeffect: "", price: 1750, redCrystalCost: 17, isantiair: true, tagEffects: { "生物": 1.5, "护盾": 0.5 } }, "聚变磁轨枪": { id: 17, type: "能量武器", category: "能量武器", damage: 58, armorDamageReduction: 0, description: "一种实验性的超级武器,能造成巨大的伤害", specialeffect: "", price: 1550, redCrystalCost: 15, isantiair: true, tagEffects: {} }, "M134轮转机枪": { id: 18, type: "实弹武器", category: "实弹武器", damage: 50, armorDamageReduction: 0.1, description: "二十一世纪的武器,经过修改以减少后坐力并提高远程精度", specialeffect: "", price: 2e3, redCrystalCost: 20, isantiair: true, tagEffects: { "轻甲": 1.5 } }, "星灼灵焰炮": { id: 19, type: "能量武器", category: "能量武器", damage: 35, armorDamageReduction: 1, description: "这是在一位高级灵能者的帮助下,解析灵能力量制作出的高科技武器", specialeffect: "", price: 1550, redCrystalCost: 15, isantiair: true, tagEffects: { "机械": 2, "建筑": 2, "异形": 2 } }, "外星电浆": { id: 101, type: "能量武器", category: "传奇武器", damage: 88, armorDamageReduction: 3, description: "一件传奇武器", specialeffect: "", price: 6400, redCrystalCost: 200, isantiair: true, tagEffects: { "生物": 2, "护盾": 0.5 } }, "MK-4激光步枪": { id: 102, type: "能量武器", category: "传奇武器", damage: 70, armorDamageReduction: -1, description: "一件传奇武器", specialeffect: "暴击率+80%", price: 6400, redCrystalCost: 200, isantiair: true, tagEffects: { "重甲": 1.5 } }, "龙息霰弹枪": { id: 103, type: "实弹武器", category: "传奇武器", damage: 80, armorDamageReduction: 0, description: "这是传说中的武器", specialeffect: "", price: 6400, redCrystalCost: 200, isantiair: false, tagEffects: { "惧热": 2, "轻甲": 1.5 } }, "DSR-55反器材步枪": { id: 104, type: "实弹武器", category: "传奇武器", damage: 125, armorDamageReduction: -2, description: "一件传奇武器", specialeffect: "", price: 6400, redCrystalCost: 200, isantiair: true, tagEffects: { "重甲": 1.2 } }, "光剑": { id: 105, type: "能量武器", category: "传奇武器", damage: 100, armorDamageReduction: 0, description: "优雅而独特的武器", specialeffect: "无视目标100%的减伤效果", price: 6400, redCrystalCost: 200, isantiair: false, tagEffects: {} }, "DG-3电弧步枪": { id: 106, type: "能量武器", category: "传奇武器", damage: 100, armorDamageReduction: 1, description: "一件传奇武器", specialeffect: "攻击消耗目标500点能量", price: 6400, redCrystalCost: 200, isantiair: true, tagEffects: { "机械": 1.5 } }, "M4AE脉冲步枪": { id: 107, type: "能量武器", category: "传奇武器", damage: 60, armorDamageReduction: 0, description: "一件传奇武器", specialeffect: "攻击无视目标80%的减伤效果", price: 6400, redCrystalCost: 200, isantiair: true, tagEffects: { "重甲": 2 } }, "核聚变重炮": { id: 108, type: "能量武器", category: "传奇武器", damage: 90, armorDamageReduction: 0, description: "一件传奇武器", specialeffect: "", price: 6400, redCrystalCost: 200, isantiair: true, tagEffects: { "建筑": 2, "重型": 1.5, "重甲": 1.2 } } }; var modConfig = { "动能增幅": { cost: 1750, effect: "伤害+20%", exclusiveTo: "", isExclusive: false }, "棱镜水晶": { cost: 2250, effect: "暴击率+20%", exclusiveTo: "", isExclusive: false }, "破甲模块": { cost: 1250, effect: "攻击无视目标10%的减伤效果", exclusiveTo: "", isExclusive: false }, // 新增专属模块 "裂甲核心": { cost: 750, effect: "攻击伤害+40%,攻击无视目标的40%减伤效果", exclusiveTo: "高斯步枪", // 指定专属武器 isExclusive: true // 标记为专属模块 }, "棱镜超载核心": { cost: 3050, effect: "暴击率+80%", exclusiveTo: "激光步枪", isExclusive: true }, "助燃核心": { cost: 2550, effect: "对惧热目标改为造成300%伤害,对生物目标改为造成200%伤害", exclusiveTo: "焚烧枪", isExclusive: true }, "光束曲射晶片": { cost: 2750, effect: "攻击时造成散射,只能对其他目标造成50%的伤害", exclusiveTo: "碎骨步枪", isExclusive: true }, "金刚石瞄准镜": { cost: 2250, effect: "无视目标20%的减伤效果", exclusiveTo: "侦察步枪", isExclusive: true }, "微型聚变核心": { cost: 2750, effect: "连续攻击每次提高7.5%的伤害(至多提高45%)", exclusiveTo: "聚变磁轨枪", isExclusive: true } }; // src/items.ts var SyndicatedItems = { "E-2能量炸弹": { id: 1, type: "爆破物", description: "一种小型的机械装置,用于吸收空间站能量并进行爆破", price: 0, redCrystalCost: 30, condition: "空间站哨枪塔存活", effects: "对空间站哨枪塔造成其当前血量值的伤害(获得等同于伤害值的金币)" }, "闪光弹": { id: 2, type: "手榴弹", description: "非致命军用炸药", price: 75, redCrystalCost: 0, condition: "目标无建筑标签和重型标签", effects: "使目标的技能层数减少10层" }, "CRED-17": { id: 3, type: "设备工具", description: "一个小型辛迪加机器人,可以破坏电子银行账户", price: 0, redCrystalCost: 60, condition: "辛迪加海盗阵营", effects: "每日签到金币奖励+50%,每有一名人类联盟玩家额外+1%(至多额外+50%)" }, "脉冲手雷": { id: 4, type: "手榴弹", description: "电磁脉冲干扰机械目标和灵能目标", price: 75, redCrystalCost: 0, condition: "目标拥有能量", effects: "消耗目标500点能量" }, "MP3播放器": { id: 5, type: "设备工具", description: "这是一款未来派音乐设备", price: 0, redCrystalCost: 10, condition: "辛迪加海盗阵营", effects: "主动发起的PK对战结果为失败时上交给对方的金币-50%" }, "雷达面罩": { id: 6, type: "设备工具", description: "一个复杂的雷达面罩,用于远距离侦察或探测隐藏单位", price: 0, redCrystalCost: 25, condition: "辛迪加海盗阵营", effects: "使用武器攻击时,无视目标10%的减伤效果" }, "气喇叭": { id: 7, type: "设备工具", description: "气喇叭一直被用于展示纯粹的勇气", price: 0, redCrystalCost: 30, condition: "辛迪加海盗阵营", effects: "主动发起的PK对战结果为胜利时将获得辛迪加海盗总部发放的等额抢夺金币作为奖励" } }; var initDefaultItems = { "咕咕币": { id: 1, type: "抽奖道具", description: "用于进行抽奖" }, "兑换券": { id: 2, type: "兑换货币", description: "用于兑换赞助物品" }, "扭蛋币": { id: 3, type: "抽奖道具", description: "用于进行宠物扭蛋" }, "t3级宠物扭蛋": { id: 4, type: "宠物蛋", description: "用于兑换t3系列宠物" }, "t2级宠物扭蛋": { id: 5, type: "宠物蛋", description: "用于兑换t2系列宠物" }, "t1级宠物扭蛋": { id: 6, type: "宠物蛋", description: "用于兑换t1系列宠物" }, "t0级宠物扭蛋": { id: 7, type: "宠物蛋", description: "用于兑换t0系列宠物" }, "🥇先行者赛季冠军勋章": { id: 101, type: "勋章", description: "" }, "🥈先行者赛季亚军勋章": { id: 102, type: "勋章", description: "" }, "🥉先行者赛季季军勋章": { id: 103, type: "勋章", description: "" }, "🏅先行者赛季前十勋章": { id: 104, type: "勋章", description: "" }, "🎖先行者赛季前二十勋章": { id: 105, type: "勋章", description: "" }, "🥇S1赛季冠军勋章": { id: 106, type: "勋章", description: "" }, "🥈S1赛季亚军勋章": { id: 107, type: "勋章", description: "" }, "🥉S1赛季季军勋章": { id: 108, type: "勋章", description: "" }, "🏅S1赛季前十勋章": { id: 109, type: "勋章", description: "" }, "🎖S1赛季前二十勋章": { id: 110, type: "勋章", description: "" } }; var itemConfig = { "拾荒者": { quality: "t3", type: "皮肤", cost: 3, isLimited: false }, "劳工": { quality: "t3", type: "皮肤", cost: 3, isLimited: false }, "老兵": { quality: "t2", type: "皮肤", cost: 4, isLimited: false }, "合成人": { quality: "t2", type: "皮肤", cost: 4, isLimited: false }, "阿斯塔特": { quality: "t1", type: "皮肤", cost: 5, isLimited: false }, "皇家指挥官": { quality: "t1", type: "皮肤", cost: 5, isLimited: false }, "个性开场白": { quality: "t1", type: "入场特效", cost: 5, quantity: 5, isLimited: false }, "史蒂夫": { quality: "t0", type: "皮肤", cost: 6, quantity: 1, isLimited: true }, "ep4": { quality: "t0", type: "物品", cost: 6, quantity: 3, isLimited: false }, "小狗": { quality: "t3", type: "宠物", cost: 3, quantity: 5, isLimited: false }, "小猫": { quality: "t3", type: "宠物", cost: 3, quantity: 5, isLimited: false }, "小黄鸭": { quality: "t3", type: "宠物", cost: 3, quantity: 5, isLimited: false }, "萌萌熊": { quality: "t2", type: "宠物", cost: 4, quantity: 3, isLimited: false }, "荆棘蜥蜴": { quality: "t2", type: "宠物", cost: 4, quantity: 3, isLimited: false }, "萌宠小狗": { quality: "t1", type: "宠物", cost: 5, quantity: 2, isLimited: false }, "熔岩虫": { quality: "t1", type: "宠物", cost: 5, quantity: 2, isLimited: false }, "尸甲虫": { quality: "t1", type: "宠物", cost: 5, quantity: 2, isLimited: false }, "绿毛虫": { quality: "t0", type: "宠物", cost: 6, quantity: 1, isLimited: false }, "妙蛙种子": { quality: "t0", type: "宠物", cost: 6, quantity: 1, isLimited: false }, "皮卡丘": { quality: "t0", type: "宠物", cost: 6, quantity: 1, isLimited: false }, "哆啦A梦": { quality: "t0", type: "宠物", cost: 6, quantity: 1, isLimited: false } }; // src/careersystem/careers.ts var spaceStationCrewConfig = [ { professionName: "深空矿工", effect: "每日签到获得的金币+50%", requirements: "当月累计签到7天及以上", Jobtransfer: true, costcoins: 1500 }, { professionName: "警卫员下士", effect: "攻击获得的金币+50%", requirements: "当期伤害榜累计攻击4次及以上", Jobtransfer: true, costcoins: 2e3 }, { professionName: "警卫长", effect: "攻击伤害+5%,攻击获得的金币+100%", requirements: "当期伤害榜前二十名", Jobtransfer: true, costcoins: 3e3 }, { professionName: "武器中士", effect: "攻击伤害+15%; 购买武器享有50%的折扣", requirements: "当期伤害榜累计造成100及以上伤害", Jobtransfer: true, costcoins: 3e3 }, { professionName: "医疗专家", effect: "", requirements: "", Jobtransfer: false, costcoins: 2e3 }, { professionName: "情报副官", effect: "升级空间站科技享有10%的折扣", requirements: "至少一个空间站科技等级≥3级", Jobtransfer: true, costcoins: 2e3 }, { professionName: "总工程师", effect: "拥有独特的C.O.R.E科技升级权限", requirements: "", Jobtransfer: false, costcoins: 3e3 }, { professionName: "舰长", effect: "完成任务奖励+50%", requirements: "累计完成4次及以上任务", Jobtransfer: true, costcoins: 2e3 }, { professionName: "机械化专家", effect: "机甲形态攻击伤害+50%", requirements: "", Jobtransfer: false, costcoins: 3e3 }, { professionName: "联盟新兵", effect: "你只是一个普通人", requirements: "无", Jobtransfer: false, costcoins: 0 } ]; var syndicatePirateConfig = [ { professionName: "能量武器专家", effect: "能量武器攻击伤害+20%; 购买MK-4激光步枪(传奇)享有50%的折扣", requirements: "至少拥有一把3级及以上等级的能量武器", Jobtransfer: true, costredcrystal: 30 }, { professionName: "清洁工", effect: "当有异形被击败时获得红晶(击败者获得双倍红晶); 每次攻击额外获得红晶", requirements: "当期伤害榜前二十名", Jobtransfer: true, costredcrystal: 20 }, { professionName: "枪手", effect: "武器等级上限为7级; 升级武器享有10%的折扣; 购买M4AE脉冲步枪(传奇)享有50%的折扣", requirements: "至少拥有一把6级及以上等级的武器", Jobtransfer: true, costredcrystal: 35 }, { professionName: "猩红杀手", effect: "“侦察步枪”攻击伤害+15%; 使用“侦察步枪”攻击时每1点护甲减少0点伤害; 购买DSR-55反器材步枪(传奇)享有50%的折扣", requirements: "“侦察步枪”武器等级≥3级", Jobtransfer: true, costredcrystal: 30 }, { professionName: "纵火狂", effect: "热能武器攻击伤害+20%; 购买龙息霰弹枪(传奇)享有50%的折扣", requirements: "至少拥有一把3级及以上等级的热能武器", Jobtransfer: true, costredcrystal: 30 }, { professionName: "辛迪加财务经理", effect: "每日签到能额外获得红晶; 主动发起的PK对战结果为胜利时,额外奖励1红晶", requirements: "当月累计签到14天及以上", Jobtransfer: true, costredcrystal: 25 }, { professionName: "计算机专家", effect: "黑市订购设备工具类物品享有50%折扣; 被动应战的PK对战结果为失败时,不会损失金币", requirements: "仓库中至少拥有一个黑市订购的设备工具类物品", Jobtransfer: true, costredcrystal: 30 }, { professionName: "指挥官", effect: "可以使用红晶升级独特的辛迪加空间站科技", requirements: "", Jobtransfer: false, costredcrystal: 10 }, { professionName: "装甲兵", effect: "", requirements: "", Jobtransfer: false, costredcrystal: 10 }, { professionName: "破坏者", effect: "黑市订购爆破物类物品享有50%折扣", requirements: "仓库中至少拥有一个黑市订购的爆破物类物品", Jobtransfer: true, costredcrystal: 25 }, { professionName: "征募官", effect: "", requirements: "", Jobtransfer: false, costredcrystal: 10 }, { professionName: "辛迪加炮灰新兵", effect: "你只是一个炮灰", requirements: "无", Jobtransfer: false, costredcrystal: 0 } ]; async function checkTransferRequirements(ctx, handle, profession) { const [mainBoss] = await ctx.database.get("ggcevo_boss", { type: "主宰", isActive: true }); const [signData] = await ctx.database.get("ggcevo_sign", { handle }); const [careerData] = await ctx.database.get("ggcevo_careers", { handle }); const damageRecords = await ctx.database.get("ggcevo_boss_damage", { handle }); const totalAttack = damageRecords.reduce((sum, r) => sum + r.attackCount, 0); const totalDamage = damageRecords.reduce((sum, r) => sum + r.totalDamage, 0); const weapons = await ctx.database.get("ggcevo_weapons", { handle, level: { $gte: 3 } }); switch (profession) { case "深空矿工": return { success: signData?.monthlyDays >= 7, message: `需要当月累计签到7天及以上(当前${signData?.monthlyDays || 0}天)` }; case "警卫员下士": if (!mainBoss) return { success: false, message: "当前暂无伤害榜。" }; return { success: totalAttack >= 4, message: `需要当期伤害榜累计攻击4次及以上(当前${totalAttack}次)` }; case "警卫长": { if (careerData?.career !== "警卫员下士") { return { success: false, message: "需要当前职业为警卫员下士" }; } if (!mainBoss) return { success: false, message: "当前暂无伤害榜。" }; const top20 = await ctx.database.select("ggcevo_boss_damage").where({ bossGroupId: mainBoss.groupId }).orderBy("totalDamage", "desc").limit(20).execute(); const isInTop202 = top20.some((r) => r.handle === handle); return { success: isInTop202, message: isInTop202 ? "" : "需要当期伤害榜前二十名" // 消息提示更新为前二十名 }; } case "武器中士": if (!mainBoss) return { success: false, message: "当前暂无伤害榜。" }; return { success: totalDamage >= 100, message: `需要当期伤害榜累计造成100及以上伤害(当前${totalDamage})` }; // +++ 新增舰长检查 +++ case "舰长": { const taskRecords = await ctx.database.get("ggcevo_task", { handle }); const totalCompletions = taskRecords.reduce( (sum, task) => sum + (task.Completions || 0), 0 ); return { success: totalCompletions >= 4, message: totalCompletions >= 4 ? "" : `需要累计完成4次及以上任务(当前${totalCompletions}次)` }; } case "情报副官": const techs = await ctx.database.get("ggcevo_tech", { handle }); const hasValidTech = techs.some((t) => t.level >= 3); return { success: hasValidTech, message: hasValidTech ? "" : "需要至少一个空间站科技等级≥3级" }; case "能量武器专家": const hasEnergyWeapon = weapons.some((weapon) => { const weaponConfigEntry = Object.values(weaponConfig).find((c) => c.id === weapon.weaponId); return weaponConfigEntry?.type === "能量武器"; }); return { success: hasEnergyWeapon, message: `需要至少拥有一把3级及以上等级的能量武器` }; case "纵火狂": const hasthermalWeapon = weapons.some((weapon) => { const weaponConfigEntry = Object.values(weaponConfig).find((c) => c.id === weapon.weaponId); return weaponConfigEntry?.type === "热能武器"; }); return { success: hasthermalWeapon, message: `需要至少拥有一把3级及以上等级的热能武器` }; case "猩红杀手": { const scoutRifle = weapons.find((weapon) => weapon.weaponId === 7); return { success: !!scoutRifle, message: scoutRifle ? "" : "需要“侦察步枪”武器等级≥3级" }; } ; case "枪手": const hasLevel6Weapon = weapons.some((weapon) => weapon.level >= 6); return { success: hasLevel6Weapon, message: hasLevel6Weapon ? "" : "需要至少拥有一把6级及以上等级的武器" }; case "破坏者": const warehouseItems = await ctx.database.get("ggcevo_warehouse", { handle }); const blackMarketExplosives = Object.values(SyndicatedItems).filter((item) => item.type === "爆破物" && item.redCrystalCost > 0).map((item) => item.id); const hasExplosive = warehouseItems.some( (item) => blackMarketExplosives.includes(item.itemId) && item.quantity > 0 ); return { success: hasExplosive, message: hasExplosive ? "" : "需要仓库中拥有一个从黑市订购的爆破物类物品" }; case "清洁工": if (!mainBoss) return { success: false, message: "当前暂无伤害榜。" }; const cleanTop20 = await ctx.database.select("ggcevo_boss_damage").where({ bossGroupId: mainBoss.groupId }).orderBy("totalDamage", "desc").limit(20).execute(); const isInTop20 = cleanTop20.some((r) => r.handle === handle); return { success: isInTop20, message: "需要当期伤害榜前二十名" }; case "辛迪加财务经理": return { success: signData?.monthlyDays >= 14, message: `需要当月累计签到14天及以上(当前${signData?.monthlyDays || 0}天)` }; case "计算机专家": { const warehouseItems2 = await ctx.database.get("ggcevo_warehouse", { handle }); const blackMarketDeviceTools = Object.values(SyndicatedItems).filter((item) => item.type === "设备工具" && item.redCrystalCost > 0).map((item) => item.id); const hasDeviceTool = warehouseItems2.some( (item) => blackMarketDeviceTools.includes(item.itemId) && item.quantity > 0 ); return { success: hasDeviceTool, message: hasDeviceTool ? "" : "需要仓库中拥有一个从黑市订购的设备工具物品" }; } default: return { success: false, message: "未知职业要求" }; } } __name(checkTransferRequirements, "checkTransferRequirements"); // src/careersystem/technology.ts var Spacestationtechnology = [ { techId: 1, techname: "采掘系统", careerNames: ["深空矿工", "情报副官"], // 新增职业名称字段 maxLevel: 5, levels: [ { level: 1, cost: 500, description: "提高挖矿效率,每日签到金币奖励+5%", careerBonus: "每日签到金币奖励+10%" }, { level: 2, cost: 1750, description: "提高挖矿效率,每日签到金币奖励+10%", careerBonus: "每日签到金币奖励+20%; 解锁太空“挖矿”权限" }, { level: 3, cost: 2950, description: "提高挖矿效率,每日签到金币奖励+15%", careerBonus: "每日签到金币奖励+30%; 解锁太空“挖矿”权限; 建造矿骡协同挖矿,效率提高20%" }, { level: 4, cost: 4250, description: "提高挖矿效率,每日签到金币奖励+20%", careerBonus: "每日签到金币奖励+40%; 解锁太空“挖矿”权限; 建造矿骡协同挖矿,效率提高40%" }, { level: 5, cost: 5375, description: "提高挖矿效率,每日签到金币奖励+25%", careerBonus: "每日签到金币奖励+50%; 解锁太空“挖矿”权限; 建造矿骡协同挖矿,效率提高60%,并且单次挖矿时间上限增加至48小时" } ] }, { techId: 2, techname: "武器系统", careerNames: ["武器中士", "情报副官"], // 新增职业名称字段 maxLevel: 5, levels: [ { level: 1, cost: 500, description: "提升空间站武器等级,升级武器享有5%的折扣", careerBonus: "升级武器享有10%的折扣" }, { level: 2, cost: 1500, description: "提升空间站武器等级,升级武器享有10%的折扣", careerBonus: "升级武器享有20%的折扣" }, { level: 3, cost: 2550, description: "提升空间站武器等级,升级武器享有15%的折扣", careerBonus: "升级武器享有30%的折扣" }, { level: 4, cost: 3950, description: "提升空间站武器等级,升级武器享有20%的折扣", careerBonus: "在升级武器享有40%的折扣" }, { level: 5, cost: 4650, description: "提升空间站武器等级,升级武器享有25%的折扣", careerBonus: "升级武器享有50%的折扣; 解锁传奇武器购买权限1次" } ] }, { techId: 3, techname: "武器升级平台", careerNames: ["武器中士", "情报副官"], maxLevel: 2, levels: [ { level: 1, cost: 750, description: "重启武器升级站,武器改装通用模块享有5%的折扣", careerBonus: "武器改装通用模块享有10%的折扣" }, { level: 2, cost: 1e3, description: "重启高级武器改装站,武器改装通用模块享有5%的折扣; 武器改装专属模块享有5%的折扣", careerBonus: "武器改装通用模块享有10%的折扣; 武器改装专属模块享有10%的折扣" } ] }, { techId: 4, techname: "安防系统", careerNames: ["警卫员下士", "警卫长", "情报副官"], // 新增职业名称字段 maxLevel: 5, levels: [ { level: 1, cost: 500, description: "重启安防参数代码,攻击获得的金币+5%", careerBonus: "攻击获得的金币+10%" }, { level: 2, cost: 2050, description: "提高空间站安防系统强度,攻击获得的金币+10%", careerBonus: "攻击获得的金币+20%" }, { level: 3, cost: 3250, description: "进一步提高空间站安防系统强度,攻击获得的金币+15%", careerBonus: "攻击获得的金币+30%" }, { level: 4, cost: 4250, description: "大幅提高空间站安防系统强度,攻击获得的金币+20%", careerBonus: "攻击获得的金币+40%" }, { level: 5, cost: 5350, description: "完全恢复空间站安防系统,攻击获得的金币+25%", careerBonus: "攻击获得的金币+50%; 获得一次打开安全军械库防爆门的权限,可以随机获得一把传奇武器" } ] }, { techId: 5, techname: "关键系统固件", careerNames: ["舰长", "情报副官"], // 新增职业名称字段 maxLevel: 5, levels: [ { level: 1, cost: 500, description: "升级空间站关键系统,完成任务奖励+5%", careerBonus: "完成任务奖励+10%" }, { level: 2, cost: 1250, description: "升级空间站关键系统,完成任务奖励+10%", careerBonus: "完成任务奖励+20%" }, { level: 3, cost: 2250, description: "升级空间站关键系统,完成任务奖励+15%", careerBonus: "完成任务奖励+30%,移除签到7日以下奖励区间" }, { level: 4, cost: 2950, description: "升级空间站关键系统,完成任务奖励+20%", careerBonus: "完成任务奖励+40%,移除签到14日以下奖励区间" }, { level: 5, cost: 3550, description: "升级空间站关键系统,完成任务奖励+25%", careerBonus: "完成任务奖励+50%,移除签到21日以下奖励区间" } ] } ]; // src/tasks.ts var Tasklist = { "伽马辐射": { id: 1, type: "可重复任务", target: 1, price: 50, redCrystalCost: 0, condition: "使用【伽马枪】攻击目标并成功增加其辐射层数" }, "绝对零度": { id: 2, type: "可重复任务", target: 1, price: 50, redCrystalCost: 0, condition: "使用【零度之下】攻击目标并成功增加其寒冷层数" }, "胆汁引爆": { id: 3, type: "可重复任务", target: 1, price: 200, redCrystalCost: 0, condition: "使用【焚烧枪】攻击目标并成功引爆其≥10层的胆汁" }, "脉冲干扰": { id: 4, type: "可重复任务", target: 1, price: 75, redCrystalCost: 0, condition: "使用【脉冲扰乱枪】攻击目标并成功减少其技能层数" }, "能量消耗": { id: 5, type: "可重复任务", target: 1, price: 75, redCrystalCost: 0, condition: "使用【弧焊枪】或【DG-3电弧步枪】攻击目标并成功消耗其能量" } }; // src/boss/boss.ts var bossPool = [ { id: 1, main: { name: "异齿猛兽首领", type: "主宰", maxHP: 15e3, maxShield: 5e3, maxEnergy: 0, armor: 9, shieldArmor: 25, maxStacks: 0, tags: ["重甲", "生物", "异形"], passive: ["异形甲壳"] }, minions: [ { name: "异齿猛兽", type: "子代", maxHP: 5e3, maxShield: 1e3, maxEnergy: 0, armor: 6, shieldArmor: 20, maxStacks: 0, tags: ["重甲", "生物", "重型", "异形"], passive: ["弱化形态", "异形甲壳"] } ] }, { id: 2, main: { name: "寒冰王蛇", type: "主宰", maxHP: 15e3, maxShield: 0, maxEnergy: 0, armor: 6, shieldArmor: 0, maxStacks: 0, tags: ["重甲", "生物", "惧热", "重型", "异形"], passive: ["冰霜环绕", "冰霜进化"] }, minions: [ { name: "冰蛇", type: "子代", maxHP: 5e3, maxShield: 0, maxEnergy: 0, armor: 4, shieldArmor: 0, maxStacks: 0, tags: ["生物", "惧热", "异形"], passive: ["弱化形态", "冰霜回复", "冰霜进化"] } ] }, { id: 3, main: { name: "莽兽", type: "主宰", maxHP: 12e3, maxShield: 0, maxEnergy: 0, armor: 8, shieldArmor: 0, maxStacks: 0, tags: ["重甲", "生物", "重型", "异形"], passive: ["应激甲壳II", "求生本能II", "冷适应"] }, minions: [ { name: "狂暴畸变体", type: "子代", maxHP: 4e3, maxShield: 0, maxEnergy: 0, armor: 5, shieldArmor: 0, maxStacks: 0, tags: ["重甲", "生物", "重型", "极地", "异形"], passive: ["弱化形态", "应激甲壳I", "求生本能I", "冷适应"] }, { name: "剧毒畸变体", type: "子代", maxHP: 4e3, maxShield: 0, maxEnergy: 0, armor: 7, shieldArmor: 0, maxStacks: 0, tags: ["重甲", "生物", "重型", "极地", "异形"], passive: ["弱化形态", "应激甲壳I", "求生本能I", "冷适应"] } ] }, { id: 4, main: { name: "空间站感染虫", type: "主宰", maxHP: 1e4, maxShield: 0, maxEnergy: 0, armor: 5, shieldArmor: 0, maxStacks: 0, tags: ["重甲", "生物", "机械", "异形"], passive: ["感染空间站", "病毒云", "霉菌滋生"] }, minions: [ { name: "机械感染虫", type: "子代", maxHP: 3e3, maxShield: 0, maxEnergy: 0, armor: 4, shieldArmor: 0, maxStacks: 0, tags: ["重甲", "生物", "机械", "异形"], passive: ["弱化形态", "病毒云", "霉菌滋生"] }, { name: "空间站哨枪塔", type: "子代", maxHP: 5e3, maxShield: 0, maxEnergy: 0, armor: 6.5, shieldArmor: 0, maxStacks: 10, tags: ["重甲", "机械", "建筑"], passive: ["岗哨机枪", "结构装甲"] } ] }, { id: 5, main: { name: "吸血蝙蝠首领", type: "主宰", maxHP: 12e3, maxShield: 0, maxEnergy: 0, armor: 2.5, shieldArmor: 0, maxStacks: 20, tags: ["生物", "异形"], passive: ["吸血唾液", "进食", "吐血", "嗜血狂暴"] }, minions: [ { name: "吸血蝙蝠", type: "子代", maxHP: 4e3, maxShield: 0, maxEnergy: 0, armor: 2.5, shieldArmor: 0, maxStacks: 20, tags: ["生物", "异形"], passive: ["弱化形态", "吸血唾液", "进食", "吐血"] } ] }, { id: 6, main: { name: "亚电主宰者", type: "主宰", maxHP: 2e3, maxShield: 2e4, maxEnergy: 1e3, armor: 0, shieldArmor: 4, maxStacks: 0, tags: ["重甲", "灵能", "重型", "异形"], passive: ["超导体", "能源虹吸", "电能冲击波", "电能立场", "脉冲", "能量黑洞"] }, minions: [ { name: "亚电能者", type: "子代", maxHP: 1e3, maxShield: 5e3, maxEnergy: 0, armor: 1, shieldArmor: 4, maxStacks: 0, tags: ["重甲", "灵能", "异形"], passive: ["弱化形态", "超导体", "能源虹吸", "能量黑洞"] } ] }, { id: 7, main: { name: "烈焰庞兽", type: "主宰", maxHP: 15e3, maxShield: 5e3, maxEnergy: 0, armor: 5, shieldArmor: 20, maxStacks: 20, tags: ["重甲", "生物", "惧寒", "重型", "异形"], passive: ["火焰异形", "庞兽狂暴", "灼烧粘液", "炼狱爆弹", "火焰吐息", "太阳耀斑"] }, minions: [ { name: "火焰甲虫", type: "子代", maxHP: 5e3, maxShield: 1e3, maxEnergy: 0, armor: 5, shieldArmor: 15, maxStacks: 20, tags: ["重甲", "生物", "惧寒", "异形"], passive: ["弱化形态", "火焰异形", "灼烧粘液", "腐蚀胆汁", "燃烧潜地"] } ] }, { id: 8, main: { name: "狂猎猛禽首领", type: "主宰", maxHP: 2e4, maxShield: 0, maxEnergy: 0, armor: 3, shieldArmor: 0, maxStacks: 0, tags: ["生物", "异形"], passive: ["猎手异形", "致命一击", "狂暴", "伪装"] }, minions: [ { name: "狂猎猛禽1", type: "子代", maxHP: 5e3, maxShield: 0, maxEnergy: 0, armor: 2.5, shieldArmor: 0, maxStacks: 0, tags: ["生物", "异形"], passive: ["弱化形态", "猎手异形", "狂暴", "伪装"] }, { name: "狂猎猛禽2", type: "子代", maxHP: 5e3, maxShield: 0, maxEnergy: 0, armor: 2.5, shieldArmor: 0, maxStacks: 0, tags: ["生物", "异形"], passive: ["弱化形态", "猎手异形", "狂暴", "伪装"] } ] }, { id: 9, main: { name: "宇宙界主", type: "主宰", maxHP: 2e4, maxShield: 2e3, maxEnergy: 1e3, armor: 2, shieldArmor: 0, maxStacks: 50, tags: ["重甲", "生物", "灵能", "异形"], passive: ["宇宙能量", "复苏", "光影之刃", "远古预兆", "星界之风", "超视距穿梭"] }, minions: [ { name: "宇宙战将", type: "子代", maxHP: 5e3, maxShield: 500, maxEnergy: 0, armor: 1, shieldArmor: 0, maxStacks: 0, tags: ["重甲", "生物", "灵能", "异形"], passive: ["弱化形态", "心灵狂热", "星界之风"] } ] }, { id: 10, main: { name: "猛毒异兽", type: "主宰", maxHP: 2e4, maxShield: 0, maxEnergy: 0, armor: 4, shieldArmor: 0, maxStacks: 20, tags: ["生物", "异形"], passive: ["毒性唾液", "剧毒狂暴", "毒气波", "淬毒撕咬", "酸蚀池", "剧毒突袭"] }, minions: [ { name: "剧毒蝙蝠", type: "子代", maxHP: 5e3, maxShield: 0, maxEnergy: 0, armor: 3, shieldArmor: 0, maxStacks: 20, tags: ["轻甲", "生物", "异形"], passive: ["弱化形态", "毒性唾液", "毒气波", "淬毒撕咬", "酸蚀池"] } ] } ]; // src/boss/BattleEffectProcessor.ts var battleStatsMap = {}; function updateStatsByName(name2, updates) { const existing = battleStatsMap[name2] ?? { name: name2, // 键与 name 一致 hpChange: 0, energyChange: 0, tagsAdded: [], tagsRemoved: [], skillsAdded: [], skillsRemoved: [], skillStacksChanged: 0, skillStatusChanged: 0, statusLayersChanged: 0, radiationLayersChange: 0, coldLayersChange: 0, lastWeaponName: "" }; battleStatsMap[name2] = { // name 不可变(保持原键) name: existing.name, // 数值类型:累加(支持正负变化) hpChange: existing.hpChange + (updates.hpChange ?? 0), energyChange: existing.energyChange + (updates.energyChange ?? 0), skillStacksChanged: existing.skillStacksChanged + (updates.skillStacksChanged ?? 0), skillStatusChanged: existing.skillStatusChanged + (updates.skillStatusChanged ?? 0), statusLayersChanged: existing.statusLayersChanged + (updates.statusLayersChanged ?? 0), radiationLayersChange: existing.radiationLayersChange + (updates.radiationLayersChange ?? 0), coldLayersChange: existing.coldLayersChange + (updates.coldLayersChange ?? 0), // 数组类型:合并(新增内容追加到现有数组) tagsAdded: [...existing.tagsAdded, ...updates.tagsAdded ?? []], tagsRemoved: [...existing.tagsRemoved, ...updates.tagsRemoved ?? []], skillsAdded: [...existing.skillsAdded, ...updates.skillsAdded ?? []], skillsRemoved: [...existing.skillsRemoved, ...updates.skillsRemoved ?? []], // 字符串类型:覆盖(取最新值) lastWeaponName: updates.lastWeaponName ?? existing.lastWeaponName }; } __name(updateStatsByName, "updateStatsByName"); function getMaxHPByName(bossName) { if (bossName === "测试假人") { return 1e6; } for (const boss of bossPool) { if (boss.main.name === bossName) { return boss.main.maxHP; } for (const minion of boss.minions) { if (minion.name === bossName) { return minion.maxHP; } } } return void 0; } __name(getMaxHPByName, "getMaxHPByName"); function getMaxEnergyByName(bossName) { if (bossName === "测试假人") { return 1e3; } for (const boss of bossPool) { if (boss.main.name === bossName) { return boss.main.maxEnergy; } for (const minion of boss.minions) { if (minion.name === bossName) { return minion.maxEnergy; } } } return void 0; } __name(getMaxEnergyByName, "getMaxEnergyByName"); function getMaxStacksByName(bossName) { if (bossName === "测试假人") { return 100; } for (const boss of bossPool) { if (boss.main.name === bossName) { return boss.main.maxStacks; } for (const minion of boss.minions) { if (minion.name === bossName) { return minion.maxStacks; } } } return void 0; } __name(getMaxStacksByName, "getMaxStacksByName"); function getMaxShieldByName(bossName) { if (bossName === "测试假人") return 0; for (const boss of bossPool) { if (boss.main.name === bossName) return boss.main.maxShield; for (const minion of boss.minions) { if (minion.name === bossName) return minion.maxShield; } } return void 0; } __name(getMaxShieldByName, "getMaxShieldByName"); function getArmorByName(bossName) { if (bossName === "测试假人") return 0; for (const boss of bossPool) { if (boss.main.name === bossName) return boss.main.armor; for (const minion of boss.minions) { if (minion.name === bossName) return minion.armor; } } return void 0; } __name(getArmorByName, "getArmorByName"); function getShieldArmorByName(bossName) { if (bossName === "测试假人") return 0; for (const boss of bossPool) { if (boss.main.name === bossName) return boss.main.shieldArmor; for (const minion of boss.minions) { if (minion.name === bossName) return minion.shieldArmor; } } return void 0; } __name(getShieldArmorByName, "getShieldArmorByName"); var BattleEffectProcessor = { // 弱化形态 handleWeakForm: /* @__PURE__ */ __name(function(targetBoss) { if (targetBoss.skills.includes("弱化形态")) { const newBuffMultiplier = 0.1; const messages = [`📚 【弱化形态】生效:子代防御脆弱,受到的伤害+10%`]; return { buffMultiplier: newBuffMultiplier, messages }; } return null; }, "handleWeakForm"), // 异形甲壳 handleAlienShell: /* @__PURE__ */ __name(function(targetBoss) { if (targetBoss.skills.includes("异形甲壳")) { const newNerfMultiplier = 0.2; const messages = [`🛡️ 【异形甲壳】生效:受到的伤害-20%`]; return { nerfMultiplier: newNerfMultiplier, messages }; } return null; }, "handleAlienShell"), // 孤立无援处理(活跃Boss中仅自己时增伤20%) handleIsolated: /* @__PURE__ */ __name(function(targetBoss, activeBosses, tempMark) { if (tempMark || targetBoss.name === "测试假人") { return null; } const isIsolated = activeBosses.length === 1 && // 活跃Boss仅1个 activeBosses[0].name === targetBoss.name; if (isIsolated) { const newBuffMultiplier = 0.2; const messages = [ `📚 【孤立无援】生效:无存活子代时,受到的伤害+20%` ]; return { buffMultiplier: newBuffMultiplier, messages }; } return null; }, "handleIsolated"), handleFrostRegeneration: /* @__PURE__ */ __name(function(targetBoss, activeBosses, maxStatsForTarget) { const messages = []; const otherUpdates = []; if (!targetBoss.skills.includes("冰霜回复")) { return null; } const targetMaxHP = maxStatsForTarget.maxHP; const currentHP = targetBoss.HP; if (currentHP > targetMaxHP * 0.3) { return null; } const selfHealAmount = Math.round(targetMaxHP * 0.4); const targetUpdates = { hpChange: selfHealAmount, // 累加HP变化量(正数回复) skillsRemoved: ["冰霜回复"] // 移除技能 }; messages.push(`❄️ 【冰霜回复】触发:生命值≤30%,自身回复${selfHealAmount}点生命值`); const otherSurvivingBosses = activeBosses.filter( (boss) => boss.name !== targetBoss.name && boss.isActive ); otherSurvivingBosses.forEach((otherBoss) => { const otherName = otherBoss.name; const otherMaxHP = maxStatsForTarget.maxHP; const otherHealAmount = Math.round(otherMaxHP * 0.1); otherUpdates.push({ name: otherName, updates: { hpChange: otherHealAmount } }); messages.push(`❄️ 「${otherName}」回复${otherHealAmount}点生命值`); }); messages.push(`❄️ 【冰霜回复】技能移除`); return { messages, targetUpdates: { name: targetBoss.name, updates: targetUpdates }, otherUpdates }; }, "handleFrostRegeneration"), handleFrostAura: /* @__PURE__ */ __name(function(targetBoss, activeBosses) { const messages = []; const otherUpdates = []; if (!targetBoss.skills.includes("冰霜环绕")) { return null; } const targetMaxHP = getMaxHPByName(targetBoss.name); const currentHP = targetBoss.HP; const triggerCondition = currentHP <= targetMaxHP * 0.3; if (!triggerCondition) { return null; } const selfHealAmount = Math.round(targetMaxHP * 0.45); const targetUpdates = { hpChange: selfHealAmount, // 累加HP变化量(正数回复) skillsRemoved: ["冰霜环绕"], // 移除自身原有技能 skillsAdded: ["寒霜地狱"] // 新增【寒霜地狱】技能(自身) }; messages.push(`❄️ 【冰霜环绕】触发:生命值≤30%,自身回复${selfHealAmount}点生命值`); messages.push(`❄️ 「${targetBoss.name}」获得「寒霜地狱」技能`); const survivingMinions = activeBosses.filter( (boss) => boss.name !== targetBoss.name && boss.isActive ); if (survivingMinions.length > 0) { survivingMinions.forEach((minion) => { const minionName = minion.name; const minionUpdates = { skillsAdded: ["寒霜地狱"] // 新增【寒霜地狱】技能(仅异形) }; otherUpdates.push({ name: minionName, updates: minionUpdates }); messages.push(`❄️ 「${minionName}」获得「寒霜地狱」技能`); }); } messages.push(`❄️ 【冰霜环绕】技能移除`); return { messages, targetUpdates: { name: targetBoss.name, updates: targetUpdates }, otherUpdates }; }, "handleFrostAura"), // 冰霜进化处理(免疫伤害并回复生命值) handleFrostEvolution: /* @__PURE__ */ __name(function(targetBoss, weaponName, damage) { const messages = []; let isImmune = false; if (!targetBoss.skills.includes("冰霜进化")) { return null; } const isColdWeapon = weaponName === "零度之下"; if (!isColdWeapon) { return null; } isImmune = true; const healAmount = damage; const targetUpdates = { name: targetBoss.name, updates: { hpChange: healAmount // 生命值变化量 } }; messages.push(`❄️ 【冰霜进化】生效:免疫寒冷伤害并回复${healAmount}点生命值`); return { isImmune, messages, targetUpdates }; }, "handleFrostEvolution"), // 寒霜地狱处理 handleFrostHell: /* @__PURE__ */ __name(function(targetBoss) { if (targetBoss.skills.includes("寒霜地狱")) { const newNerfMultiplier = 0.3; const messages = [`❄️ 【寒霜地狱】生效:受到的伤害-30%`]; return { nerfMultiplier: newNerfMultiplier, messages }; } return null; }, "handleFrostHell"), // 应激甲壳I处理(基础减伤20%) handleStressShellI: /* @__PURE__ */ __name(function(targetBoss) { if (targetBoss.skills.includes("应激甲壳I")) { const newNerfMultiplier = 0.2; const messages = [`🛡️ 【应激甲壳I】生效:受到的伤害-20%`]; return { nerfMultiplier: newNerfMultiplier, messages }; } return null; }, "handleStressShellI"), // 应激甲壳II处理(进阶减伤25%) handleStressShellII: /* @__PURE__ */ __name(function(targetBoss) { if (targetBoss.skills.includes("应激甲壳II")) { const newNerfMultiplier = 0.25; const messages = [`🛡️ 【应激甲壳II】生效:受到的伤害-25%`]; return { nerfMultiplier: newNerfMultiplier, messages }; } return null; }, "handleStressShellII"), // 求生本能I (修改后) handleSurvivalInstinctI: /* @__PURE__ */ __name(function(targetBoss, damageAmount) { const messages = []; if (!targetBoss.skills.includes("求生本能I")) { return null; } const targetMaxHP = getMaxHPByName(targetBoss.name); const isLethal = damageAmount >= targetBoss.HP; if (!isLethal) { return null; } const selfHealAmount = Math.round(targetMaxHP * 0.3); const updates = { hpChange: selfHealAmount, // 回复生命值 skillsRemoved: ["求生本能I"] // 移除技能 }; messages.push(`❤️ 【求生本能I】触发:承受致命伤害时,回复${selfHealAmount}点生命值`); messages.push(`❤️ 【求生本能I】技能移除`); return { messages, targetUpdates: { name: targetBoss.name, updates } }; }, "handleSurvivalInstinctI"), // 求生本能II (修改后) handleSurvivalInstinctII: /* @__PURE__ */ __name(function(targetBoss, damageAmount) { const messages = []; if (!targetBoss.skills.includes("求生本能II")) { return null; } const targetMaxHP = getMaxHPByName(targetBoss.name); const isLethal = damageAmount >= targetBoss.HP; if (!isLethal) { return null; } const selfHealAmount = Math.round(targetMaxHP * 0.5); const updates = { hpChange: selfHealAmount, // 生命值变化量 skillsRemoved: ["求生本能II"] // 移除的技能 }; messages.push(`❤️ 【求生本能II】触发:承受致命伤害时,回复${selfHealAmount}点生命值`); messages.push(`❤️ 【求生本能II】技能移除`); return { messages, targetUpdates: { name: targetBoss.name, updates } }; }, "handleSurvivalInstinctII"), // 在 PassiveHandler 对象中添加冷适应技能的处理函数 handleColdAdaptation: /* @__PURE__ */ __name(function(targetBoss, weaponName) { const messages = []; let isImmune = false; let targetUpdates = null; if (!targetBoss.skills.includes("冷适应")) { return null; } const currentLayers = targetBoss.statusLayers || 0; const hasFearHeatTag = targetBoss.tags.includes("惧热") || false; if (hasFearHeatTag && weaponName === "零度之下") { isImmune = true; messages.push(`🧊 【冷适应】生效:免疫寒冷伤害`); return { isImmune, messages, targetUpdates }; } if (currentLayers < 10) { const newLayers = currentLayers + 1; targetUpdates = { name: targetBoss.name, updates: { statusLayersChanged: 1 // 层数+1 } }; messages.push(`❄️ 【冷适应】叠层:当前${newLayers}/10次寒冷伤害`); if (newLayers >= 10) { targetUpdates.updates.tagsAdded = ["惧热"]; messages.push(`🧊 【冷适应】生效:获得「惧热」标签并免疫寒冷伤害`); } } return { isImmune, messages, targetUpdates }; }, "handleColdAdaptation"), // 感染空间站处理(空间站存活时自身减伤50%) handleInfectedSpaceStation: /* @__PURE__ */ __name(function(targetBoss, activeBosses) { const messages = []; if (!targetBoss.skills.includes("感染空间站")) { return null; } const spaceStation = activeBosses.find( (boss) => boss.name === "空间站哨枪塔" && boss.isActive ); if (!spaceStation) { return null; } const newNerfMultiplier = 0.5; messages.push(`🛸 【感染空间站】生效:「空间站哨枪塔」存活,受到的伤害-50%`); return { nerfMultiplier: newNerfMultiplier, // 返回调整后的减伤系数 messages }; }, "handleInfectedSpaceStation"), // 病毒云处理(释放病毒云雾减伤10%) handleVirusCloud: /* @__PURE__ */ __name(function(targetBoss) { const messages = []; if (!targetBoss.skills.includes("病毒云")) { return null; } const newNerfMultiplier = 0.1; messages.push(`☁️ 【病毒云】生效:受到的伤害-10%`); return { nerfMultiplier: newNerfMultiplier, // 返回调整后的减伤系数 messages }; }, "handleVirusCloud"), // 霉菌滋生处理(空间站存活时为其回复1%最大生命值) handleMoldGrowth: /* @__PURE__ */ __name(function(targetBoss, activeBosses) { const messages = []; if (!targetBoss.skills.includes("霉菌滋生")) { return null; } const spaceStation = activeBosses.find( (boss) => boss.name === "空间站哨枪塔" && boss.isActive ); if (!spaceStation) { return null; } const spaceStationMaxHP = getMaxHPByName(spaceStation.name); const healAmount = Math.round(spaceStationMaxHP * 0.01); const spaceStationUpdates = { name: spaceStation.name, updates: { hpChange: healAmount } }; messages.push(`🍄 【霉菌滋生】生效:为「空间站哨枪塔」回复${healAmount}点生命值`); return { messages, spaceStationUpdates }; }, "handleMoldGrowth"), // 岗哨机枪处理(累计10次攻击后为其他异形回复10%最大生命值) handleSentryGun: /* @__PURE__ */ __name(function(targetBoss, activeBosses) { const messages = []; let targetUpdates = null; const otherUpdates = []; if (!targetBoss.skills.includes("岗哨机枪")) { return null; } const currentStacks = targetBoss.skillStacks || 0; if (currentStacks < 10) { targetUpdates = { name: targetBoss.name, updates: { skillStacksChanged: 1 // 层数+1 } }; const newStacks = currentStacks + 1; messages.push(`🔫 【岗哨机枪】充能:当前${newStacks}/10次攻击`); return { messages, targetUpdates, otherUpdates }; } targetUpdates = { name: targetBoss.name, updates: { skillStacksChanged: -currentStacks // 重置层数 } }; const otherSurvivingBosses = activeBosses.filter( (boss) => boss.name !== targetBoss.name && boss.isActive ); otherSurvivingBosses.forEach((otherBoss) => { const otherName = otherBoss.name; const otherMaxHP = getMaxHPByName(otherName); const healAmount = Math.round(otherMaxHP * 0.1); otherUpdates.push({ name: otherName, updates: { hpChange: healAmount // 生命值回复 } }); messages.push(`🔫 【岗哨机枪】触发:为「${otherName}」回复${healAmount}点生命值`); }); return { messages,