From 3026fe601259ee378b05334af07b1004885e8174 Mon Sep 17 00:00:00 2001 From: prosolis <5590409+prosolis@users.noreply.github.com> Date: Fri, 10 Jul 2026 18:27:32 -0700 Subject: [PATCH] N6/C3 review cleanup: retire the combined-level reducer duplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The W1 extraction added combinedAdvLevel but left twinBeeMaxTier and distributeTwinBeeRewards inlining the identical dndLevel+3-skills expression, so the reducer lived in three places. Rewire both twinbee sites to combinedAdvLevel — pure refactor, byte-identical arithmetic. Deliberately did NOT share tierForCombinedLevel's switch into twinbee: its default arm is worldBossMinTier, a world-boss knob, and coupling twinbee's tier floor to it would let a world-boss retune silently leak into TwinBee's activity selection. The reducer is the safe shared piece; the tier thresholds stay independent. Suite green, combat golden byte-identical. Claude-Session: https://claude.ai/code/session_017mEwUmmS7aQTP2NQXj6rUa --- internal/plugin/adventure_twinbee.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/plugin/adventure_twinbee.go b/internal/plugin/adventure_twinbee.go index b9dc8ed..daa7669 100644 --- a/internal/plugin/adventure_twinbee.go +++ b/internal/plugin/adventure_twinbee.go @@ -40,7 +40,7 @@ func twinBeeMaxTier() int { if !c.Alive { continue } - combined := dndLevelForUser(c.UserID) + c.MiningSkill + c.ForagingSkill + c.FishingSkill + combined := combinedAdvLevel(&c) if combined > bestLevel { bestLevel = combined } @@ -283,7 +283,7 @@ func (p *AdventurePlugin) distributeTwinBeeRewards(result *TwinBeeResult) TwinBe weight := 4 // minimum (level 1 in all 4 skills) for _, c := range chars { if c.UserID == uid { - weight = dndLevelForUser(c.UserID) + c.MiningSkill + c.ForagingSkill + c.FishingSkill + weight = combinedAdvLevel(&c) if weight < 4 { weight = 4 }