Stage 9.2: mixer operator Tumbler storyline with key drive item

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Opus 5.5 committed 2026-11-04 09:12:47 +08:00
1 parent 62bd641283
commit a5f9639970
15 files changed
+386 -6

No files matched your search

@@ -1475,6 +1475,35 @@ internal static class Program
finally { StoryMods.Current = saved; }
});
Test("Tumbler 剧情线:开始条件、上门日程、混币器倍率", () =>
{
var saved = StoryMods.Current;
try
{
var t = new Tumbler();
Check(!t.TryStart(Tuning.TumblerMinDay - 1, true) && !t.TryStart(40, false), "没到日子或没解锁混币器不开始");
Check(t.TryStart(40, true) && t.StartDay == 41 && !t.TryStart(42, true), "开始一次,明天第一次上门");
Check(t.Due(40) == 0 && t.Due(41) == 1, "第 1 次在开始日");
t.Visited(41);
Check(t.Due(41) == 0 && t.Due(43) == 0 && t.Due(44) == 2, "同一天不重复,第 2 次在 +3");
t.Visited(44); Check(t.Due(46) == 3, "第 3 次在 +5"); t.Choice = Tumbler.Hide; t.Visited(46);
Check(t.Due(49) == 0 && t.Due(50) == 4, "第 4 次在 +9"); t.Visited(50);
Check(t.Done && t.Due(60) == 0, "结束");
var t2 = new Tumbler(); t2.TryStart(40, true); t2.Visited(45);
Check(t2.Due(46) == 2, "错过的上门往后补");
// 混币器倍率
var sm = new StoryMods(); StoryMods.Current = sm;
double fee0 = Mixer.Fee, rate0 = Mixer.RoundRate(1000);
sm.Apply("tumbler_kept", 50);
Check(Math.Abs(Mixer.Fee - fee0 * Tuning.TumblerKeptFee) < 1e-12 && Mixer.RoundRate(1000) > rate0, "藏好密钥盘:手续费降、匿名集变大");
var sm2 = new StoryMods(); StoryMods.Current = sm2; sm2.Apply("tumbler_sold", 50);
Check(Mixer.Fee > fee0 && sm2.MixerRug == Tuning.TumblerSoldRug, "卖给黑市:手续费涨、跑路概率上升");
var sm3 = new StoryMods(); sm3.Apply("tumbler_reported", 50);
Check(sm3.MixerClosed, "举报:混币器关闭");
}
finally { StoryMods.Current = saved; }
});
Test("预测市场:先验概率", () =>
{
Check(Math.Abs(PredictMath.PurityAtLeast(8500, 8000, 8999) - 0.5) < 1e-9, "纯度 8500 以上一半");