Stage 7.2: manipulation detection (player price push, prediction/perp forfeits)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Sonnet 5.5 committed 2026-11-04 08:03:44 +08:00
1 parent 002606056d
commit 786de325da
11 files changed
+99 -8

No files matched your search

+2 -2
View File
@@ -77,14 +77,14 @@ namespace Decentralized
}));
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Give ASIC M1/M2/M3 (test)", () => { foreach (var m in new[] { "M1", "M2", "M3" }) Items.Give(AsicItems.New(m, 100)); for (int i = 0; i < 4; i++) Items.Give(ModHelper.SpawnItem("rare_electronic")); });
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Era in 2 days (test)", () => { var n = Session.Data.Network; int day = StoreStation.GetDayCounter(); n.EraDay = day + 2; n.EraWarnDay = day; n.EraWarned = false; n.EraDone = false; Log.Info($"测试:矿机时代第 {n.EraDay} 天,NPC 耗电 {n.NpcKj}"); });
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Predict: markets now (test)", () => Log.Guard("预测测试", () =>
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Predict: refill all kinds (test)", () => Log.Guard("预测测试", () =>
{
var d = Session.Data; int day = StoreStation.GetDayCounter();
d.Predict.Markets.Clear();
var made = new List<PredictMarket>(); for (int i = 0; i < 4; i++) made.AddRange(d.Predict.Refill(day, d.Rng, PredictGame.Candidates(day)));
Log.Info($"测试:新开 {made.Count} 个预测盘口(不看解锁日)");
}));
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Predict: era + CRA markets (test)", () =>
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Predict: add era and CRA (test)", () =>
{
var d = Session.Data; int day = StoreStation.GetDayCounter(); var bk = d.Predict;
bk.Markets.Add(PredictMarket.Create(++bk.Seq, PredictKind.Era, "era", L.T("predict.era"), 0, day, day + 1, day + 3, PredictMath.EraProb(day, day + 1, day + 3, -1) + 0.05));