mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Adv 2.0 Phase L3: delete co-op dungeons; refund in-flight runs on startup
Drop the coop_dungeon system per migration plan §5. 11 coop_*.go files removed; cleanup_l3.go added with an idempotent per-run status-guarded UPDATE that cancels any open/active runs and refunds member contributions plus unsettled bets via EuroPlugin.Credit. Tables retained for now; schema purge deferred to a future GOGOBEE_COOP_PURGE pass. adventure.go drops !coop dispatch, coopTicker, the startup combat-lock hook, and the !coop help line. adventure_scheduler.go loses the activeCoopMemberSet skip branch and the post-reset combat-lock call. adventure_render.go drops the teaser plus the in-coop status block; replaced with a one-week morning-DM closure announcement (TODO: remove after 2026-05-16). TestPickCoopTeaserCandidate_SkipsLeader removed. go vet ./... and go test ./... clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -321,34 +321,6 @@ func TestCraftingReminderWeekday_StableWithinWeek(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// ── Co-op Teaser Leader Skip ───────────────────────────────────────────────
|
||||
|
||||
func TestPickCoopTeaserCandidate_SkipsLeader(t *testing.T) {
|
||||
me := id.UserID("@me:test")
|
||||
other := id.UserID("@other:test")
|
||||
|
||||
myRun := &CoopRun{ID: 1, Tier: 1, LeaderID: me}
|
||||
theirRunMatch := &CoopRun{ID: 2, Tier: 1, LeaderID: other}
|
||||
theirRunStretch := &CoopRun{ID: 3, Tier: 5, LeaderID: other}
|
||||
|
||||
char := &AdventureCharacter{UserID: me, CombatLevel: 10}
|
||||
|
||||
// Player leads run 1, qualifies for run 2 (T1 minLevel 5), under-level for run 3 (T5 minLevel 40).
|
||||
match, stretch := pickCoopTeaserCandidate([]*CoopRun{myRun, theirRunMatch, theirRunStretch}, char)
|
||||
if match == nil || match.ID != 2 {
|
||||
t.Errorf("expected match=run 2, got %v", match)
|
||||
}
|
||||
if stretch == nil || stretch.ID != 3 {
|
||||
t.Errorf("expected stretch=run 3, got %v", stretch)
|
||||
}
|
||||
|
||||
// Only own run open: nothing to surface.
|
||||
match, stretch = pickCoopTeaserCandidate([]*CoopRun{myRun}, char)
|
||||
if match != nil || stretch != nil {
|
||||
t.Errorf("expected both nil when only own run open; got match=%v stretch=%v", match, stretch)
|
||||
}
|
||||
}
|
||||
|
||||
// ── Location Risk/Reward Numbers ───────────────────────────────────────────
|
||||
|
||||
func TestCalculateAdvProbabilities_RiskReward_NormalizesAcrossConfigs(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user