koishi-plugin-ggcevo-game 1.4.75 → 1.4.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ export interface BattleStatistics {
2
2
  name: string;
3
3
  hpChange: number;
4
4
  energyChange: number;
5
+ armorChange: number;
5
6
  tagsAdded: string[];
6
7
  tagsRemoved: string[];
7
8
  skillsAdded: string[];
@@ -398,7 +399,7 @@ export declare const BattleEffectProcessor: {
398
399
  name: string;
399
400
  updates: Partial<BattleStatistics>;
400
401
  } | null;
401
- buffMultiplier: number;
402
+ armorReduction: number;
402
403
  layerAdded: boolean;
403
404
  } | null;
404
405
  handleColdEffect: (targetBoss: any, weaponName: string) => {
@@ -564,6 +565,14 @@ export declare const BattleEffectProcessor: {
564
565
  messages: string[];
565
566
  spawnNewBossMark: string;
566
567
  };
568
+ handlePulseRifleEffect: (weaponName: string, targetBoss: any) => {
569
+ pulseGrenadeTriggered: boolean;
570
+ targetUpdates: {
571
+ name: string;
572
+ updates: Partial<BattleStatistics>;
573
+ } | null;
574
+ messages: string[];
575
+ };
567
576
  };
568
577
  /**
569
578
  * 统一处理所有被动效果(包含伤害修正、免疫检查、状态更新等)
package/lib/database.d.ts CHANGED
@@ -122,12 +122,15 @@ export interface WeaponInventory {
122
122
  installedMods: string[];
123
123
  equipped: boolean;
124
124
  comboCount: number;
125
+ pityCounter: number;
125
126
  }
126
127
  export interface BossInfo {
127
128
  name: string;
128
129
  groupId: number;
129
130
  type: string;
130
131
  HP: number;
132
+ energy: number;
133
+ armor: number;
131
134
  tags: string[];
132
135
  skills: string[];
133
136
  skillStacks: number;
@@ -135,7 +138,6 @@ export interface BossInfo {
135
138
  statusLayers: number;
136
139
  radiationLayers: number;
137
140
  coldLayers: number;
138
- energy: number;
139
141
  lastWeaponName: string;
140
142
  isActive: boolean;
141
143
  respawnTime: Date;
package/lib/index.js CHANGED
@@ -148,7 +148,7 @@ var weaponConfig = {
148
148
  damage: 25,
149
149
  armorDamageReduction: 1,
150
150
  description: "喷射稳定的液氮恒流,对长时间接触者造成致命的损伤",
151
- specialeffect: "攻击使目标叠加[寒冷]层数,每层使其受到的伤害提高2.5%(上限50%)",
151
+ specialeffect: "攻击时为目标附加[寒冷]效果,每层使目标受到的伤害提高2.5%(最多提高50%)",
152
152
  price: 775,
153
153
  redCrystalCost: 7,
154
154
  isantiair: false,
@@ -165,7 +165,7 @@ var weaponConfig = {
165
165
  damage: 24,
166
166
  armorDamageReduction: 0.5,
167
167
  description: "一种经过改造的电动工具,可对近距离的目标放出高压电",
168
- specialeffect: "攻击消耗目标200点能量",
168
+ specialeffect: "每次攻击消耗目标200点能量值",
169
169
  price: 750,
170
170
  redCrystalCost: 7,
171
171
  isantiair: true,
@@ -181,7 +181,7 @@ var weaponConfig = {
181
181
  damage: 27,
182
182
  armorDamageReduction: 0.75,
183
183
  description: "一种高度危险性的武器,设计用辐射照射并伤害敌人",
184
- specialeffect: "攻击使无机械标签的[生物]目标叠加[辐射]层数,每层使其受到的伤害提高2.5%(上限50%)",
184
+ specialeffect: "攻击无[机械]标签的[生物]目标时附加[辐射]效果,每层使目标的护甲值减少0.05",
185
185
  price: 825,
186
186
  redCrystalCost: 8,
187
187
  isantiair: true,
@@ -197,7 +197,7 @@ var weaponConfig = {
197
197
  damage: 27,
198
198
  armorDamageReduction: 0,
199
199
  description: "激光步枪的变种,采用折射技术升级",
200
- specialeffect: "触发散射攻击,对非主目标造成120%基础伤害",
200
+ specialeffect: "攻击触发散射,对次要目标造成120%基础伤害",
201
201
  price: 1450,
202
202
  redCrystalCost: 14,
203
203
  isantiair: true,
@@ -212,7 +212,7 @@ var weaponConfig = {
212
212
  damage: 29,
213
213
  armorDamageReduction: 0.75,
214
214
  description: "面对护盾目标而开发的武器",
215
- specialeffect: "攻击[护盾]目标时无视50%减伤",
215
+ specialeffect: "[护盾]目标无视50%伤害减免",
216
216
  price: 1050,
217
217
  redCrystalCost: 10,
218
218
  isantiair: true,
@@ -244,7 +244,7 @@ var weaponConfig = {
244
244
  damage: 36,
245
245
  armorDamageReduction: 1,
246
246
  description: "一种原型能量武器,能够发射强大的脉冲",
247
- specialeffect: "攻击使目标技能层数减少2",
247
+ specialeffect: "攻击减少目标2层技能层数",
248
248
  price: 1500,
249
249
  redCrystalCost: 15,
250
250
  isantiair: true,
@@ -351,7 +351,7 @@ var weaponConfig = {
351
351
  damage: 80,
352
352
  armorDamageReduction: -1,
353
353
  description: "一件传奇武器",
354
- specialeffect: "暴击率+25%;若连续3次攻击没暴击,则下一次攻击必定暴击",
354
+ specialeffect: "暴击率提高25%;连续3次未暴击时,下次攻击必定暴击",
355
355
  price: 6400,
356
356
  redCrystalCost: 200,
357
357
  isantiair: true,
@@ -398,7 +398,7 @@ var weaponConfig = {
398
398
  damage: 100,
399
399
  armorDamageReduction: 0,
400
400
  description: "优雅而独特的武器",
401
- specialeffect: "无视100%减伤",
401
+ specialeffect: "无视目标100%伤害减免",
402
402
  price: 6400,
403
403
  redCrystalCost: 200,
404
404
  isantiair: false,
@@ -411,7 +411,7 @@ var weaponConfig = {
411
411
  damage: 100,
412
412
  armorDamageReduction: 1,
413
413
  description: "一件传奇武器",
414
- specialeffect: "攻击消耗目标500点能量",
414
+ specialeffect: "攻击触发散射,对次要目标造成30%基础伤害;每次攻击消耗目标500点能量值",
415
415
  price: 6400,
416
416
  redCrystalCost: 200,
417
417
  isantiair: true,
@@ -426,7 +426,7 @@ var weaponConfig = {
426
426
  damage: 80,
427
427
  armorDamageReduction: 0,
428
428
  description: "一件传奇武器",
429
- specialeffect: "无视50%减伤;每次攻击有33%概率发射一枚特殊的榴弹,额外造成50%的伤害并减少目标0.5护甲",
429
+ specialeffect: "无法暴击;无视50%伤害减免;33%几率发射脉冲榴弹,额外造成50%伤害并降低目标0.5护甲值",
430
430
  price: 6400,
431
431
  redCrystalCost: 200,
432
432
  isantiair: true,
@@ -455,21 +455,21 @@ var weaponConfig = {
455
455
  var modConfig = {
456
456
  "动能增幅": {
457
457
  cost: 1750,
458
- effect: "伤害+15%",
458
+ effect: "伤害提高15%",
459
459
  // 规范术语
460
460
  exclusiveTo: "",
461
461
  isExclusive: false
462
462
  },
463
463
  "棱镜水晶": {
464
- cost: 2250,
465
- effect: "暴击率+10%",
464
+ cost: 2050,
465
+ effect: "暴击率提升10%",
466
466
  // 保持原描述
467
467
  exclusiveTo: "",
468
468
  isExclusive: false
469
469
  },
470
470
  "破甲模块": {
471
471
  cost: 1250,
472
- effect: "无视10%减伤",
472
+ effect: "无视目标10%伤害减免",
473
473
  // 术语统一
474
474
  exclusiveTo: "",
475
475
  isExclusive: false
@@ -477,43 +477,37 @@ var modConfig = {
477
477
  // 专属模组修改
478
478
  "裂甲核心": {
479
479
  cost: 750,
480
- effect: "伤害+40%,无视40%减伤",
481
- // 统一伤害/防御描述
480
+ effect: "伤害提高40%,无视目标40%伤害减免",
482
481
  exclusiveTo: "高斯步枪",
483
482
  isExclusive: true
484
483
  },
485
484
  "棱镜超载核心": {
486
- cost: 2550,
487
- effect: "暴击率+20%;若连续4次攻击没暴击,则下一次攻击必定暴击",
488
- // 保持原描述
485
+ cost: 2250,
486
+ effect: "暴击率提升20%;连续4次未暴击时,下次攻击必定暴击",
489
487
  exclusiveTo: "激光步枪",
490
488
  isExclusive: true
491
489
  },
492
490
  "助燃核心": {
493
491
  cost: 2550,
494
492
  effect: "对[惧热]目标造成300%伤害,对[生物]目标造成200%伤害",
495
- // 规范标签引用和效果描述
496
493
  exclusiveTo: "焚烧枪",
497
494
  isExclusive: true
498
495
  },
499
496
  "光束曲射晶片": {
500
497
  cost: 2750,
501
- effect: "触发散射攻击,对非主目标造成100%基础伤害",
502
- // 明确机制命名
498
+ effect: "攻击触发散射,对次要目标造成100%基础伤害",
503
499
  exclusiveTo: "碎骨步枪",
504
500
  isExclusive: true
505
501
  },
506
502
  "金刚石瞄准镜": {
507
503
  cost: 2250,
508
- effect: "无视20%减伤",
509
- // 术语统一
504
+ effect: "无视目标20%伤害减免",
510
505
  exclusiveTo: "侦察步枪",
511
506
  isExclusive: true
512
507
  },
513
508
  "微型聚变核心": {
514
509
  cost: 2750,
515
- effect: "连续攻击叠加[伤害提升],每层提高7.5%伤害(上限6层)",
516
- // 机制命名和数值规范化
510
+ effect: "连续攻击叠加[聚变]效果,每层提高7.5%伤害(最多6层)",
517
511
  exclusiveTo: "聚变磁轨枪",
518
512
  isExclusive: true
519
513
  }
@@ -1551,6 +1545,8 @@ function updateStatsByName(name2, updates) {
1551
1545
  // 键与 name 一致
1552
1546
  hpChange: 0,
1553
1547
  energyChange: 0,
1548
+ armorChange: 0,
1549
+ // 新增字段初始化
1554
1550
  tagsAdded: [],
1555
1551
  tagsRemoved: [],
1556
1552
  skillsAdded: [],
@@ -1573,6 +1569,7 @@ function updateStatsByName(name2, updates) {
1573
1569
  statusLayersChanged: existing.statusLayersChanged + (updates.statusLayersChanged ?? 0),
1574
1570
  radiationLayersChange: existing.radiationLayersChange + (updates.radiationLayersChange ?? 0),
1575
1571
  coldLayersChange: existing.coldLayersChange + (updates.coldLayersChange ?? 0),
1572
+ armorChange: existing.armorChange + (updates.armorChange ?? 0),
1576
1573
  // 数组类型:合并(新增内容追加到现有数组)
1577
1574
  tagsAdded: [...existing.tagsAdded, ...updates.tagsAdded ?? []],
1578
1575
  tagsRemoved: [...existing.tagsRemoved, ...updates.tagsRemoved ?? []],
@@ -3042,12 +3039,8 @@ var BattleEffectProcessor = {
3042
3039
  const messages = [];
3043
3040
  let layerAdded = false;
3044
3041
  const currentLayers = targetBoss.radiationLayers || 0;
3045
- const effectiveLayers = Math.min(currentLayers, 20);
3046
- const buffMultiplier = effectiveLayers * 0.025;
3047
- if (effectiveLayers > 0) {
3048
- messages.push(`☢️ 【辐射】:当前${currentLayers}层,受到的伤害+${(effectiveLayers * 2.5).toFixed(1)}%`);
3049
- if (currentLayers > 20) {
3050
- }
3042
+ const armorReduction = currentLayers * 0.05;
3043
+ if (currentLayers > 0) {
3051
3044
  }
3052
3045
  let targetUpdates = null;
3053
3046
  if (weaponName === "伽马枪" && // 使用伽马枪
@@ -3056,18 +3049,20 @@ var BattleEffectProcessor = {
3056
3049
  targetUpdates = {
3057
3050
  name: targetBoss.name,
3058
3051
  updates: {
3059
- radiationLayersChange: 1
3052
+ radiationLayersChange: 1,
3060
3053
  // 辐射层数增加1
3054
+ armorChange: -0.05
3055
+ // 同时削减0.05护甲值(永久生效)
3061
3056
  }
3062
3057
  };
3063
3058
  const newLayers = currentLayers + 1;
3064
- messages.push(`☢️ 【伽马枪】武器效果:获得1层「辐射」`);
3059
+ messages.push(`☢️ 【伽马枪】武器效果:获得1层「辐射」并削减0.05护甲值`);
3065
3060
  layerAdded = true;
3066
3061
  }
3067
3062
  return {
3068
3063
  messages,
3069
3064
  targetUpdates,
3070
- buffMultiplier,
3065
+ armorReduction,
3071
3066
  layerAdded
3072
3067
  // 返回层数增加标记
3073
3068
  };
@@ -3603,7 +3598,30 @@ var BattleEffectProcessor = {
3603
3598
  messages: [`🥚 【孵化】触发:成功孵化1只${randomBossName}`],
3604
3599
  spawnNewBossMark: randomBossName
3605
3600
  };
3606
- }, "handleHatching")
3601
+ }, "handleHatching"),
3602
+ // M4AE脉冲步枪特殊效果处理
3603
+ handlePulseRifleEffect: /* @__PURE__ */ __name(function(weaponName, targetBoss) {
3604
+ const messages = [];
3605
+ let targetUpdates = null;
3606
+ let pulseGrenadeTriggered = false;
3607
+ if (weaponName !== "M4AE脉冲步枪") return null;
3608
+ if (Math.random() < 0.33) {
3609
+ pulseGrenadeTriggered = true;
3610
+ targetUpdates = {
3611
+ name: targetBoss.name,
3612
+ updates: {
3613
+ armorChange: -0.5
3614
+ // 负值表示削减护甲
3615
+ }
3616
+ };
3617
+ messages.push(`💥 【脉冲榴弹】触发:额外造成50%伤害,削减目标0.5点护甲值`);
3618
+ } else return null;
3619
+ return {
3620
+ pulseGrenadeTriggered,
3621
+ targetUpdates,
3622
+ messages
3623
+ };
3624
+ }, "handlePulseRifleEffect")
3607
3625
  };
3608
3626
  function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCrit, ignoreRate, careerData) {
3609
3627
  const messages = [];
@@ -3687,6 +3705,13 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
3687
3705
  updateStatsByName(solarFlareResult.targetUpdates.name, solarFlareResult.targetUpdates.updates);
3688
3706
  }
3689
3707
  }
3708
+ const pulseEffect = BattleEffectProcessor.handlePulseRifleEffect(weaponName, targetBoss);
3709
+ if (pulseEffect) {
3710
+ messages.push(...pulseEffect.messages);
3711
+ if (pulseEffect.targetUpdates) {
3712
+ updateStatsByName(pulseEffect.targetUpdates.name, pulseEffect.targetUpdates.updates);
3713
+ }
3714
+ }
3690
3715
  const carpetBombResult = BattleEffectProcessor.handleCarpetBombing(targetBoss);
3691
3716
  if (carpetBombResult) {
3692
3717
  isolatedImmunityMark = carpetBombResult.tempMark || false;
@@ -3848,9 +3873,6 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
3848
3873
  const radiationResult = BattleEffectProcessor.handleRadiationEffect(targetBoss, weaponName);
3849
3874
  if (radiationResult) {
3850
3875
  messages.push(...radiationResult.messages);
3851
- if (radiationResult.buffMultiplier) {
3852
- totalBuffMultiplier += radiationResult.buffMultiplier;
3853
- }
3854
3876
  if (radiationResult.targetUpdates) {
3855
3877
  updateStatsByName(radiationResult.targetUpdates.name, radiationResult.targetUpdates.updates);
3856
3878
  }
@@ -3887,6 +3909,9 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
3887
3909
  let adjustedNerfMultiplier = totalNerfMultiplier * (1 - ignoreRate);
3888
3910
  const damageMultiplier = 1 + totalBuffMultiplier - adjustedNerfMultiplier;
3889
3911
  finalDamage = damage * damageMultiplier;
3912
+ if (pulseEffect?.pulseGrenadeTriggered) {
3913
+ finalDamage *= 1.5;
3914
+ }
3890
3915
  if (hasCrit) {
3891
3916
  finalDamage *= 2;
3892
3917
  }
@@ -3894,11 +3919,14 @@ function applyPassiveEffects(targetBoss, activeBosses, weaponName, damage, hasCr
3894
3919
  if (careerData?.career === "猩红杀手" && weaponName === "侦察步枪") {
3895
3920
  armorDamageReduction = 1;
3896
3921
  }
3897
- armor = getArmorByName(targetBoss.name);
3922
+ armor = targetBoss.armor;
3898
3923
  if (targetBoss.name === "测试假人") {
3899
3924
  armor = targetBoss.armor;
3900
3925
  }
3901
3926
  const armorReduction = armorDamageReduction * armor;
3927
+ if (armorReduction !== 0) {
3928
+ messages.push(`护甲减伤: ${armorReduction.toFixed(2)}点`);
3929
+ }
3902
3930
  finalDamage = Math.max(Math.round(finalDamage - armorReduction), 1);
3903
3931
  const frostEvolutionResult = BattleEffectProcessor.handleFrostEvolution(
3904
3932
  targetBoss,
@@ -4450,6 +4478,7 @@ async function activateNextBossGroup(ctx, currentBossId = null) {
4450
4478
  // 新增标签字段
4451
4479
  skills: [...nextBossGroup.main.passive],
4452
4480
  energy: nextBossGroup.main.maxEnergy,
4481
+ armor: nextBossGroup.main.armor,
4453
4482
  groupId: nextBossGroup.id,
4454
4483
  isActive: true,
4455
4484
  respawnTime: /* @__PURE__ */ new Date()
@@ -4463,6 +4492,7 @@ async function activateNextBossGroup(ctx, currentBossId = null) {
4463
4492
  // 新增标签字段
4464
4493
  skills: [...minion.passive],
4465
4494
  energy: minion.maxEnergy,
4495
+ armor: minion.armor,
4466
4496
  groupId: nextBossGroup.id,
4467
4497
  isActive: true,
4468
4498
  respawnTime: /* @__PURE__ */ new Date()
@@ -5007,14 +5037,33 @@ async function calculateTotalDamage(ctx, session, config, equippedWeapon, target
5007
5037
  __name(calculateTotalDamage, "calculateTotalDamage");
5008
5038
  async function calculateCrit(ctx, handle, equippedWeapon, weaponName) {
5009
5039
  let critRate = 0;
5040
+ const pityCounter = equippedWeapon?.pityCounter || 0;
5010
5041
  const critSources = [];
5042
+ if (weaponName === "M4AE脉冲步枪") {
5043
+ return {
5044
+ hasCrit: false,
5045
+ critSources: []
5046
+ };
5047
+ }
5048
+ if (weaponName === "MK-4激光步枪" && pityCounter >= 3) {
5049
+ return {
5050
+ hasCrit: true,
5051
+ critSources: ["🔫 MK-4激光步枪:保底暴击"]
5052
+ };
5053
+ }
5054
+ if (equippedWeapon.installedMods?.includes("棱镜超载核心") && modConfig["棱镜超载核心"]?.exclusiveTo === weaponName && pityCounter >= 4) {
5055
+ return {
5056
+ hasCrit: true,
5057
+ critSources: ["⚙️ 棱镜超载核心模组:保底暴击"]
5058
+ };
5059
+ }
5011
5060
  if (equippedWeapon.installedMods?.includes("棱镜水晶")) {
5012
5061
  critRate += 10;
5013
- critSources.push("🔼 棱镜水晶:暴击率+10%");
5062
+ critSources.push("⚙️ 棱镜水晶:暴击率+10%");
5014
5063
  }
5015
5064
  if (equippedWeapon.installedMods?.includes("棱镜超载核心") && modConfig["棱镜超载核心"]?.exclusiveTo === weaponName) {
5016
5065
  critRate += 20;
5017
- critSources.push("🔼 棱镜超载核心:暴击率+20%");
5066
+ critSources.push("⚙️ 棱镜超载核心:暴击率+20%");
5018
5067
  }
5019
5068
  const [critRhythm] = await ctx.database.get("ggcevo_wish", {
5020
5069
  handle,
@@ -5351,6 +5400,9 @@ async function handleScatterAttack(ctx, session, handle, config, equippedWeapon,
5351
5400
  } else if (weaponName === "中子步枪") {
5352
5401
  scatterEffectMessages.push("🔆 【中子步枪】触发散射攻击!");
5353
5402
  scatterRatio = 1.2;
5403
+ } else if (weaponName === "DG-3电弧步枪") {
5404
+ scatterEffectMessages.push("🔆 【DG-3电弧步枪】触发散射攻击!");
5405
+ scatterRatio = 0.3;
5354
5406
  }
5355
5407
  for (const secondaryTarget of secondaryTargets) {
5356
5408
  const damageResult = await calculateTotalDamage(
@@ -5430,6 +5482,8 @@ async function handleDeathTargets(ctx, deadTargets, killerName, killerHandle) {
5430
5482
  "🏆 伤害排行榜奖励:",
5431
5483
  ...rewardMessages
5432
5484
  );
5485
+ } else if (deadBoss.name === "巢穴雷兽" || deadBoss.name === "巢穴战士" || deadBoss.name === "巢穴甲虫") {
5486
+ await ctx.database.remove("ggcevo_boss", { name: deadBoss.name });
5433
5487
  } else {
5434
5488
  await ctx.database.upsert("ggcevo_boss", [{
5435
5489
  name: deadBoss.name,
@@ -5611,6 +5665,10 @@ async function updateDatabaseWithStats(ctx, stats) {
5611
5665
  const newEnergy = boss.energy + stats.energyChange;
5612
5666
  updateData.energy = Math.max(0, Math.min(maxEnergy, newEnergy));
5613
5667
  }
5668
+ if (stats.armorChange !== 0) {
5669
+ const newarmor = boss.armor + stats.armorChange;
5670
+ updateData.armor = newarmor;
5671
+ }
5614
5672
  if (stats.skillStacksChanged !== 0) {
5615
5673
  const newStacks = boss.skillStacks + stats.skillStacksChanged;
5616
5674
  updateData.skillStacks = Math.max(0, Math.min(maxStacks, newStacks));
@@ -5663,8 +5721,8 @@ async function handleIgnoreReductionEffects(ctx, handle, weaponName, targetBoss)
5663
5721
  ignoreEffects.push(1);
5664
5722
  messages.push(`⚔️ 【光剑】武器效果:无视100%减伤效果`);
5665
5723
  } else if (weaponName === "M4AE脉冲步枪") {
5666
- ignoreEffects.push(0.8);
5667
- messages.push(`🔫 【M4AE脉冲步枪】武器效果:无视80%减伤效果`);
5724
+ ignoreEffects.push(0.5);
5725
+ messages.push(`🔫 【M4AE脉冲步枪】武器效果:无视50%减伤效果`);
5668
5726
  } else if (weaponName === "粒子相位枪" && targetBoss?.tags.includes("护盾")) {
5669
5727
  ignoreEffects.push(0.5);
5670
5728
  messages.push(`⚡ 【粒子相位枪】武器效果:无视50%减伤效果`);
@@ -5947,8 +6005,9 @@ function apply(ctx, config) {
5947
6005
  modificationSlots: "unsigned",
5948
6006
  installedMods: "list",
5949
6007
  equipped: "boolean",
5950
- comboCount: "unsigned"
6008
+ comboCount: "unsigned",
5951
6009
  // 新增:记录连续攻击次数的计数器
6010
+ pityCounter: "unsigned"
5952
6011
  }, {
5953
6012
  primary: ["handle", "weaponId"]
5954
6013
  });
@@ -5958,6 +6017,7 @@ function apply(ctx, config) {
5958
6017
  type: "string",
5959
6018
  HP: "unsigned",
5960
6019
  energy: "unsigned",
6020
+ armor: "integer",
5961
6021
  tags: "list",
5962
6022
  skills: "list",
5963
6023
  skillStacks: "unsigned",
@@ -6066,6 +6126,7 @@ function apply(ctx, config) {
6066
6126
  const currentGroupId = group.groupId;
6067
6127
  await ctx.database.remove("ggcevo_boss_damage", {});
6068
6128
  await ctx.database.remove("ggcevo_boss", {});
6129
+ await ctx.database.set("ggcevo_weapons", {}, { comboCount: 0 });
6069
6130
  const newBossGroup = await activateNextBossGroup(ctx, currentGroupId);
6070
6131
  await ctx.broadcast(
6071
6132
  groupId,
@@ -7992,7 +8053,8 @@ ${validTypes.join("、")}`;
7992
8053
  level: 0,
7993
8054
  modificationSlots: 1,
7994
8055
  equipped: false,
7995
- comboCount: 0
8056
+ comboCount: 0,
8057
+ pityCounter: 0
7996
8058
  }], ["handle", "weaponId"]);
7997
8059
  const equippedCount = await ctx.database.select("ggcevo_weapons").where({ handle, equipped: true }).execute((row) => import_koishi.$.count(row.weaponId));
7998
8060
  if (equippedCount === 0) {
@@ -8433,6 +8495,21 @@ ${validTypes.join("、")}`;
8433
8495
  }, {
8434
8496
  comboCount: 0
8435
8497
  });
8498
+ if (!primaryAttackResult.hasCrit) {
8499
+ await ctx.database.set("ggcevo_weapons", {
8500
+ handle,
8501
+ weaponId: equippedWeapon.weaponId
8502
+ }, {
8503
+ pityCounter: (equippedWeapon?.pityCounter || 0) + 1
8504
+ });
8505
+ } else {
8506
+ await ctx.database.set("ggcevo_weapons", {
8507
+ handle,
8508
+ weaponId: equippedWeapon.weaponId
8509
+ }, {
8510
+ pityCounter: 0
8511
+ });
8512
+ }
8436
8513
  const resultMessage = buildResultMessage(
8437
8514
  session,
8438
8515
  weaponName,
@@ -8601,7 +8678,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
8601
8678
  if (bossGroup.main.maxEnergy > 0) {
8602
8679
  result.push(`⚡ 能量:${mainBoss.energy}/1000`);
8603
8680
  }
8604
- result.push(`🛡️ 护甲:${bossGroup.main.armor || 0}`);
8681
+ result.push(`🛡️ 护甲:${mainBoss.armor || 0}`);
8605
8682
  result.push(`🏷️ 标签:${mainBoss.tags?.join("、") || "无"}`);
8606
8683
  if (mainBoss.radiationLayers > 0) {
8607
8684
  result.push(`☢️ 辐射:${mainBoss.radiationLayers}层`);
@@ -8665,7 +8742,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
8665
8742
  if (minionConfig && minionConfig.maxEnergy > 0) {
8666
8743
  minionInfo.push(`⚡ 能量:${minion.energy}/1000`);
8667
8744
  }
8668
- minionInfo.push(`🛡️ 护甲:${minionConfig?.armor || 0}`);
8745
+ minionInfo.push(`🛡️ 护甲:${minion.armor || 0}`);
8669
8746
  minionInfo.push(`🏷️ 标签:${minion.tags?.join("、") || "无"}`);
8670
8747
  if (minion.radiationLayers > 0) {
8671
8748
  minionInfo.push(`☢️ 辐射:${minion.radiationLayers}层`);
@@ -8730,6 +8807,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
8730
8807
  }
8731
8808
  await ctx.database.remove("ggcevo_boss_damage", {});
8732
8809
  await ctx.database.remove("ggcevo_boss", {});
8810
+ await ctx.database.set("ggcevo_weapons", {}, { comboCount: 0 });
8733
8811
  await ctx.database.create("ggcevo_boss", {
8734
8812
  name: bossConfig.main.name,
8735
8813
  type: "主宰",
@@ -8737,6 +8815,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
8737
8815
  tags: bossConfig.main.tags,
8738
8816
  skills: [...bossConfig.main.passive],
8739
8817
  energy: bossConfig.main.maxEnergy,
8818
+ armor: bossConfig.main.armor,
8740
8819
  groupId: groupid,
8741
8820
  isActive: true,
8742
8821
  respawnTime: /* @__PURE__ */ new Date()
@@ -8753,6 +8832,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
8753
8832
  tags: minion.tags,
8754
8833
  skills: [...minion.passive],
8755
8834
  energy: minion.maxEnergy,
8835
+ armor: minion.armor,
8756
8836
  groupId: groupid,
8757
8837
  isActive: true,
8758
8838
  respawnTime: /* @__PURE__ */ new Date()
@@ -9401,7 +9481,8 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
9401
9481
  modificationSlots: 1,
9402
9482
  installedMods: [],
9403
9483
  equipped: false,
9404
- comboCount: 0
9484
+ comboCount: 0,
9485
+ pityCounter: 0
9405
9486
  });
9406
9487
  const equippedCount = await ctx.database.select("ggcevo_weapons").where({ handle, equipped: true }).execute((row) => import_koishi.$.count(row.weaponId));
9407
9488
  if (equippedCount === 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "《星际争霸2》咕咕虫-evolved地图的专属游戏助手插件,集成天梯排行、抽奖系统、签到福利、兑换商城等丰富功能。",
4
- "version": "1.4.75",
4
+ "version": "1.4.77",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [