koishi-plugin-ggcevo-game 1.3.8 → 1.3.9

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.
Files changed (2) hide show
  1. package/lib/index.js +13 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -633,7 +633,7 @@ function apply(ctx, config) {
633
633
  defineBoss({
634
634
  main: {
635
635
  id: 1,
636
- name: "异齿猛兽-首领",
636
+ name: "异齿猛兽首领",
637
637
  type: "主宰",
638
638
  maxHP: 15e3,
639
639
  tags: asBossTags(["重甲", "生物", "异形"]),
@@ -723,7 +723,7 @@ function apply(ctx, config) {
723
723
  defineBoss({
724
724
  main: {
725
725
  id: 5,
726
- name: "吸血蝙蝠-首领",
726
+ name: "吸血蝙蝠首领",
727
727
  type: "主宰",
728
728
  maxHP: 1e4,
729
729
  tags: asBossTags(["生物", "异形"]),
@@ -823,7 +823,7 @@ function apply(ctx, config) {
823
823
  },
824
824
  {
825
825
  professionName: "清洁工",
826
- effect: "击败主宰能够根据排名获得红晶",
826
+ effect: "击败主宰能够根据排名获得红晶; 每次攻击额外获得红晶",
827
827
  requirements: "当期伤害榜排名前3",
828
828
  Jobtransfer: true,
829
829
  costcoins: 0,
@@ -4629,6 +4629,7 @@ ${validTypes.join("、")}`;
4629
4629
  const career = careerData?.career;
4630
4630
  let careerMultiplier = 1;
4631
4631
  let careerMessage = "";
4632
+ let redcrystalMessage = "";
4632
4633
  if (career === "警卫员下士") {
4633
4634
  careerMultiplier = 1.5;
4634
4635
  careerMessage = "(+50% 警卫员下士职业加成)";
@@ -4636,6 +4637,13 @@ ${validTypes.join("、")}`;
4636
4637
  careerMultiplier = 2;
4637
4638
  careerMessage = "(+100% 警卫长职业加成)";
4638
4639
  }
4640
+ if (career === "清洁工") {
4641
+ await ctx.database.upsert("ggcevo_careers", [{
4642
+ handle,
4643
+ redcrystal: (careerData?.redcrystal || 0) + 1
4644
+ }], ["handle"]);
4645
+ redcrystalMessage = "🔴 清洁工职业加成:获得1个红晶!";
4646
+ }
4639
4647
  const finalReward = Math.round(initialDamage * careerMultiplier);
4640
4648
  const [existingSign] = await ctx.database.get("ggcevo_sign", { handle });
4641
4649
  await ctx.database.upsert("ggcevo_sign", [{
@@ -4653,6 +4661,7 @@ ${effectMessage.join("\n")}`
4653
4661
  `造成伤害:${initialDamage}${hasCrit ? "(✨ 暴击)" : ""}`,
4654
4662
  // 修改金币显示行
4655
4663
  `获得金币:${finalReward}${careerMessage}`,
4664
+ redcrystalMessage,
4656
4665
  `目标剩余HP:${Math.max(currentHP, 0)}/${maxHP}`,
4657
4666
  isDefeated ? `🎉 恭喜,已成功击败 ${targetBoss.name}!` : ""
4658
4667
  ].filter((line) => line).join("\n");
@@ -4965,7 +4974,7 @@ ${effectMessage.join("\n")}`
4965
4974
  });
4966
4975
  return `成功使用${goldAmount}金币,获得${exchangeCount}红晶!`;
4967
4976
  });
4968
- ctx.command("ggcevo/加入 <faction>", "加入阵营").action(async ({ session }, faction) => {
4977
+ ctx.command("ggcevo/加入 <faction>", "加入阵营").alias("加入阵营").action(async ({ session }, faction) => {
4969
4978
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
4970
4979
  if (!profile) return "您暂未绑定句柄。";
4971
4980
  const { regionId, realmId, profileId } = profile;
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.3.8",
4
+ "version": "1.3.9",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [