From 76a60e07e9d299953461640b3409aff13045295d Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 23 Aug 2025 02:16:32 +0200 Subject: [PATCH] fix SuperReactionTweaks --- src/plugins/superReactionTweaks/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/superReactionTweaks/index.ts b/src/plugins/superReactionTweaks/index.ts index 22e7d6f3..2edf99e8 100644 --- a/src/plugins/superReactionTweaks/index.ts +++ b/src/plugins/superReactionTweaks/index.ts @@ -42,8 +42,13 @@ export default definePlugin({ { find: ",BURST_REACTION_EFFECT_PLAY", replacement: { - match: /(BURST_REACTION_EFFECT_PLAY:\i=>{.+?if\()(\(\(\i,\i\)=>.+?\(\i,\i\))>=\d+?(?=\))/, - replace: (_, rest, playingCount) => `${rest}!$self.shouldPlayBurstReaction(${playingCount})` + /* + * var limit = 5 + * ... + * if (calculatePlayingCount(a,b) >= limit) return; + */ + match: /(?<=(\i)=5.+?)if\((.{0,20}?)>=\1\)return;/, + replace: "if(!$self.shouldPlayBurstReaction($2))return;" } }, { @@ -58,8 +63,7 @@ export default definePlugin({ shouldPlayBurstReaction(playingCount: number) { if (settings.store.unlimitedSuperReactionPlaying) return true; - if (settings.store.superReactionPlayingLimit === 0) return false; - if (playingCount <= settings.store.superReactionPlayingLimit) return true; + if (settings.store.superReactionPlayingLimit > playingCount) return true; return false; },