koishi-plugin-ggcevo-game 1.4.83 → 1.4.84

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.
package/lib/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface Config {
15
15
  sameOpponentLimit: boolean;
16
16
  maxDailyBeChallenged: number;
17
17
  unlimitedBossAttack: boolean;
18
+ pointBonusEnabled: boolean;
18
19
  }
19
20
  export declare const Config: Schema<Config>;
20
21
  export declare function apply(ctx: Context, config: Config): void;
package/lib/index.js CHANGED
@@ -4535,11 +4535,14 @@ for (const key in weaponConfig) {
4535
4535
  weaponConfigById[weaponConfig[key].id] = weaponConfig[key];
4536
4536
  }
4537
4537
  async function calculateTotalPower(ctx, config, handle) {
4538
- const [rankData] = await ctx.database.get("ggcevo_rank", {
4539
- handle,
4540
- rankseason: config.rankseason
4541
- });
4542
- const baseRank = rankData?.rank || 0;
4538
+ let baseRank = 0;
4539
+ if (config.pointBonusEnabled) {
4540
+ const [rankData] = await ctx.database.get("ggcevo_rank", {
4541
+ handle,
4542
+ rankseason: config.rankseason
4543
+ });
4544
+ baseRank = rankData?.rank || 0;
4545
+ }
4543
4546
  let total = baseRank;
4544
4547
  const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
4545
4548
  const career = careerData?.career;
@@ -5051,9 +5054,12 @@ async function calculateTotalDamage(ctx, session, config, equippedWeapon, target
5051
5054
  if (careerAddResult.message) effectMessage.push(careerAddResult.message);
5052
5055
  const wishAddResult = await calculateWishAdditive(ctx, handle, equippedWeapon);
5053
5056
  if (wishAddResult.message) effectMessage.push(wishAddResult.message);
5054
- const [rankRecord] = await ctx.database.get("ggcevo_rank", { handle, rankseason: config.rankseason });
5055
- const rankAddResult = calculateRankAdditive(rankRecord);
5056
- if (rankAddResult.message) effectMessage.push(rankAddResult.message);
5057
+ let rankAddResult = { value: 0, message: "" };
5058
+ if (config.pointBonusEnabled) {
5059
+ const [rankRecord] = await ctx.database.get("ggcevo_rank", { handle, rankseason: config.rankseason });
5060
+ const rankAddResult2 = calculateRankAdditive(rankRecord);
5061
+ if (rankAddResult2.message) effectMessage.push(rankAddResult2.message);
5062
+ }
5057
5063
  const otherAdditive = careerAddResult.value + wishAddResult.value + rankAddResult.value;
5058
5064
  const otherMultiplier = 1 + otherAdditive;
5059
5065
  let finalDamage = baseDamage * tagMultiplier * modMultiplier * otherMultiplier;
@@ -5087,16 +5093,16 @@ async function calculateCrit(ctx, handle, equippedWeapon, weaponName) {
5087
5093
  if (equippedWeapon.installedMods?.includes("棱镜超载核心") && modConfig["棱镜超载核心"]?.exclusiveTo === weaponName && pityCounter >= 4) {
5088
5094
  return {
5089
5095
  hasCrit: true,
5090
- critSources: ["⚙️ 棱镜超载核心模组:保底暴击"]
5096
+ critSources: ["⚙️ 【棱镜超载核心】:保底暴击"]
5091
5097
  };
5092
5098
  }
5093
5099
  if (equippedWeapon.installedMods?.includes("棱镜水晶")) {
5094
5100
  critRate += 10;
5095
- critSources.push("⚙️ 棱镜水晶:暴击率+10%");
5101
+ critSources.push("⚙️ 【棱镜水晶】:暴击率+10%");
5096
5102
  }
5097
5103
  if (equippedWeapon.installedMods?.includes("棱镜超载核心") && modConfig["棱镜超载核心"]?.exclusiveTo === weaponName) {
5098
5104
  critRate += 20;
5099
- critSources.push("⚙️ 棱镜超载核心:暴击率+20%");
5105
+ critSources.push("⚙️ 【棱镜超载核心】:暴击率+20%");
5100
5106
  }
5101
5107
  const [critRhythm] = await ctx.database.get("ggcevo_wish", {
5102
5108
  handle,
@@ -5872,7 +5878,8 @@ var Config = import_koishi.Schema.intersect([
5872
5878
  import_koishi.Schema.object({
5873
5879
  rankseason: import_koishi.Schema.string().description("当前赛季名称(影响兑换系统)").default("S1"),
5874
5880
  autorank: import_koishi.Schema.boolean().description("自动同步天梯数据").default(false),
5875
- ignoreGlobalLimit: import_koishi.Schema.boolean().description("禁用全局兑换限制(谨慎开启)").default(false)
5881
+ ignoreGlobalLimit: import_koishi.Schema.boolean().description("禁用全局兑换限制(谨慎开启)").default(false),
5882
+ pointBonusEnabled: import_koishi.Schema.boolean().description("是否开启积分加成功能").default(false)
5876
5883
  }).description("赛季配置"),
5877
5884
  // 对战系统配置组
5878
5885
  import_koishi.Schema.object({
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.83",
4
+ "version": "1.4.84",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [