Final verification pass: forged transfers, insider catch, rug pool, funding, news; debug helpers
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb29b61a6a
commit
d0054443ec
4 files changed
+30
-4
No files matched your search
@@ -4,6 +4,16 @@
|
|||||||
|
|
||||||
### 第九阶段:剧情与收尾
|
### 第九阶段:剧情与收尾
|
||||||
|
|
||||||
|
- 收尾补验证(游戏内,用游戏自己的开日流程:调试"Run night"和 `day 1` 过夜,墙上的卷帘门按钮开门):
|
||||||
|
- 伪造转账顾客:新增调试入口"Coin buyer forged"。开口"CRT 我已经转过去了,截图给你看……"(正常顾客说"我用 CRT 付,链上确认要一会儿");成交 4 件共 118 信用点后现金没变(信用点被扣回),日志逐件记"伪造转账",晨间日志列出四条"拿走了……说付了……链上没有这笔"。
|
||||||
|
- 内幕被查:线人排期的停电盘口押「是」花 600(2,046 份,超过上限的 40%,标内幕),结算夜"内幕下注被查:本金和收益 2,046 全部没收,记诈骗罪证",罪证账本 FRAUD 380。
|
||||||
|
- 骗局池跑路:第一晚"收益池「Test Scam」跑路,主钱包 存的 563 CRC 没了"。钓鱼授权不撤销时"主钱包 的 9,000 CRT 被「P0inbase」用授权转走了"。
|
||||||
|
- 永续资金费:多头 2 倍、资金费率 0.3%:保证金 1000 → 994.06 → 987.97 → 981.73(每晚约扣名义价值的 0.3%)。夜里在日志里记各仓位的保证金、资金费率和标记价。
|
||||||
|
- 报纸:调试"Chain drama"后报纸上出现"链上拥堵"和"POINBASE 公告:充值地址迁移"(钓鱼公告)。
|
||||||
|
- Tumbler 自然开始:解锁混币器、第 35 天开门,日志"Tumbler 剧情开始:第 36 天第一次上门",同时当天的预测盘口补盘和开盘钩子正常。
|
||||||
|
- 密钥盘:`inspect` 看到 CONTRABAND_ITEM_TAG、等级 CONTRABAND_LEVEL_HIGH、类型 CONTRABAND(游戏自己的搜查查的就是这几个标签);真实被搜出来的路径没有触发。新增调试入口"Give key drive""Perp: PSC long 1000 x2"。
|
||||||
|
- 发现:`Run night`、`day N` 都不走开门(OnShutterOpened),所以以前只靠它们的测试没有跑过每天开门的逻辑(市场开盘波动、K 线开盘、预测补盘、Tumbler 开始、顾客相关钩子);这些要点墙上的卷帘门按钮开门才会触发。
|
||||||
|
- 仍没有在游戏里验证:ASIC 自然暴毙和黑市收货、永续穿仓后 30 天拉黑和没收单、杰克逊柜台上钱包的标价、游戏输入框里 Ctrl+V、密钥盘被真实搜查翻出、Serpico / Eleanor 剧情在游戏自己的对话里选择后的联动(只用调试设置过选择)。
|
||||||
- 界面文案去口语化:理财子页改为"收益池""发行理财";高息理财页的"风声:有人在议论"改为"举报风险:低 / 中 / 高","开张"改为"发行","昨晚新存入""今晚要付利息""自己垫付的利息"改为"昨日存入""今晚应付利息""自付利息合计";预测、情报、空投、收益池、K 线图、混币器的提示句一并改成陈述句(如"今日无开放盘口""需用授权钱包签名")。对话(Tumbler、假客服、顾客)不改。
|
- 界面文案去口语化:理财子页改为"收益池""发行理财";高息理财页的"风声:有人在议论"改为"举报风险:低 / 中 / 高","开张"改为"发行","昨晚新存入""今晚要付利息""自己垫付的利息"改为"昨日存入""今晚应付利息""自付利息合计";预测、情报、空投、收益池、K 线图、混币器的提示句一并改成陈述句(如"今日无开放盘口""需用授权钱包签名")。对话(Tumbler、假客服、顾客)不改。
|
||||||
- 理财页合并:Web3"理财"页签分两个子页——"存钱(别人的池子)"是 NPC 开的第三方收益池(原来在质押页下面,挪过来了),"发行(自己当庄)"是自己开的高息理财。页签一直显示,第 15 天前"发行"子页只写哪天起能开。手册里两处位置说明一并改了。游戏内验证:两个子页切换、收益池表格和存入金额、发行页开张选项都正常。
|
- 理财页合并:Web3"理财"页签分两个子页——"存钱(别人的池子)"是 NPC 开的第三方收益池(原来在质押页下面,挪过来了),"发行(自己当庄)"是自己开的高息理财。页签一直显示,第 15 天前"发行"子页只写哪天起能开。手册里两处位置说明一并改了。游戏内验证:两个子页切换、收益池表格和存入金额、发行页开张选项都正常。
|
||||||
- 补验证(游戏内,阶段 5–9 只有单元测试的路径):
|
- 补验证(游戏内,阶段 5–9 只有单元测试的路径):
|
||||||
|
|||||||
@@ -139,7 +139,13 @@ namespace Decentralized
|
|||||||
PlayerStore.Instance.storeClientManager.clientStack.Insert(0, BlackDelivery.CreateCourier());
|
PlayerStore.Instance.storeClientManager.clientStack.Insert(0, BlackDelivery.CreateCourier());
|
||||||
PlayerStore.Instance.TryCallNextClient();
|
PlayerStore.Instance.TryCallNextClient();
|
||||||
}));
|
}));
|
||||||
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Coin buyer (test)", () => Log.Guard("用币付款顾客(测试)", () =>
|
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Coin buyer forged (test)", () => { ForceFake = true; CoinBuyerTest(); });
|
||||||
|
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Coin buyer (test)", () => { ForceFake = false; CoinBuyerTest(); });
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool ForceFake;
|
||||||
|
|
||||||
|
private static void CoinBuyerTest() => Log.Guard("用币付款顾客(测试)", () =>
|
||||||
{
|
{
|
||||||
var c = new StoreClient
|
var c = new StoreClient
|
||||||
{
|
{
|
||||||
@@ -152,7 +158,7 @@ namespace Decentralized
|
|||||||
c.mainDialogue.SetText(c.displayName, "CRT.").SetEndAction(() => { });
|
c.mainDialogue.SetText(c.displayName, "CRT.").SetEndAction(() => { });
|
||||||
c.AddBasicDialog();
|
c.AddBasicDialog();
|
||||||
c.CompleteClientCreation();
|
c.CompleteClientCreation();
|
||||||
Mark(c, Assets.CRT, false);
|
Mark(c, Assets.CRT, ForceFake);
|
||||||
Log.Info($"用币付款顾客(测试)已设置,钱包污点 {Session.Data.Hot.Taint:0.##},当前顾客 {PlayerStore.Instance.currentClientInstance?.GetClientBlueprint()?.identifier},队列 {PlayerStore.Instance.storeClientManager.clientStack.Count} 人");
|
Log.Info($"用币付款顾客(测试)已设置,钱包污点 {Session.Data.Hot.Taint:0.##},当前顾客 {PlayerStore.Instance.currentClientInstance?.GetClientBlueprint()?.identifier},队列 {PlayerStore.Instance.storeClientManager.clientStack.Count} 人");
|
||||||
PlayerStore.Instance.currentClientInstance = null; // 测试:丢掉在场的顾客(开局的高利贷者不可遣散)
|
PlayerStore.Instance.currentClientInstance = null; // 测试:丢掉在场的顾客(开局的高利贷者不可遣散)
|
||||||
PlayerStore.Instance.storeClientManager.clientStack.Insert(0, c);
|
PlayerStore.Instance.storeClientManager.clientStack.Insert(0, c);
|
||||||
@@ -160,8 +166,8 @@ namespace Decentralized
|
|||||||
// 把后柜里的种子都标成赃物(热度 50%),买走后钱包的污点应为成交额的一半
|
// 把后柜里的种子都标成赃物(热度 50%),买走后钱包的污点应为成交额的一半
|
||||||
foreach (var it in EmporiumEntry.Instance.backInvinvElement.childItems)
|
foreach (var it in EmporiumEntry.Instance.backInvinvElement.childItems)
|
||||||
if (it.IsTag("SEED")) it.ModifyTag("STOLEN_VALUE_INT", t => t.Enable().SetInt(50));
|
if (it.IsTag("SEED")) it.ModifyTag("STOLEN_VALUE_INT", t => t.Enable().SetInt(50));
|
||||||
}));
|
});
|
||||||
}
|
|
||||||
public static void Unsubscribe() => ModHook.OnGenerateCustomerLate -= OnGenerate;
|
public static void Unsubscribe() => ModHook.OnGenerateCustomerLate -= OnGenerate;
|
||||||
|
|
||||||
private static void OnGenerate(StoreClientManager manager)
|
private static void OnGenerate(StoreClientManager manager)
|
||||||
|
|||||||
@@ -169,6 +169,15 @@ namespace Decentralized
|
|||||||
d.Scams.Deposit(bad, w, 500, Session.Price); d.Scams.Deposit(ok, w, 500, Session.Price); d.Scams.Withdraw(ok, w, day);
|
d.Scams.Deposit(bad, w, 500, Session.Price); d.Scams.Deposit(ok, w, 500, Session.Price); d.Scams.Withdraw(ok, w, day);
|
||||||
Log.Info($"测试:钓鱼授权 #{d.Scams.Approvals[0].Id}(明晚转走 CRT {w.Get(Assets.CRT):0}),骗局池存 500,时间锁池取款第 {day + Tuning.YieldLockDays} 天到账;CRC {w.Get(Assets.CRC):0}");
|
Log.Info($"测试:钓鱼授权 #{d.Scams.Approvals[0].Id}(明晚转走 CRT {w.Get(Assets.CRT):0}),骗局池存 500,时间锁池取款第 {day + Tuning.YieldLockDays} 天到账;CRC {w.Get(Assets.CRC):0}");
|
||||||
}));
|
}));
|
||||||
|
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Perp: PSC long 1000 x2 (test)", () => Log.Guard("永续测试", () =>
|
||||||
|
{
|
||||||
|
var d = Session.Data; d.Poinbase.Add(Assets.CRC, 2000);
|
||||||
|
// 先让价格偏离 7 日均线,资金费才不为零:补几个历史标记价
|
||||||
|
d.Perps.Marks["PSC"] = new System.Collections.Generic.List<double> { d.Market.Price * 0.8, d.Market.Price * 0.8, d.Market.Price * 0.8 };
|
||||||
|
var res = d.Perps.Open(d.Poinbase, "PSC", true, 1000, 2, d.Market.Price, StoreStation.GetDayCounter(), Session.Price);
|
||||||
|
Log.Info($"测试:永续开多 {res},现价 {d.Market.Price:0.00}");
|
||||||
|
}));
|
||||||
|
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Give key drive (test)", () => Items.Give(ModHelper.SpawnItem(Items.KeyDrive)));
|
||||||
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Predict: window = tomorrow (test)", () => { foreach (var m in Session.Data.Predict.Markets) { m.FromDay = m.ToDay = StoreStation.GetDayCounter() + 1; } Log.Info("测试:所有盘口窗口改成明天"); });
|
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Predict: window = tomorrow (test)", () => { foreach (var m in Session.Data.Predict.Markets) { m.FromDay = m.ToDay = StoreStation.GetDayCounter() + 1; } Log.Info("测试:所有盘口窗口改成明天"); });
|
||||||
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Perp fund 0 (test)", () => { Session.Data.Perps.InsuranceFund = 0; Log.Info("测试:保险基金清零"); });
|
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Perp fund 0 (test)", () => { Session.Data.Perps.InsuranceFund = 0; Log.Info("测试:保险基金清零"); });
|
||||||
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "SPARK x0.3 (test)", () => { var st = Session.Data.Stable; st.Spark *= 0.3; Log.Info($"测试:SPARK 价格 {st.Spark:0.00}"); });
|
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "SPARK x0.3 (test)", () => { var st = Session.Data.Stable; st.Spark *= 0.3; Log.Info($"测试:SPARK 价格 {st.Spark:0.00}"); });
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ namespace Decentralized
|
|||||||
PredictGame.ClosePrice = d.Market.Price; PredictGame.CloseGas = d.Gas; PredictGame.ClosePush = d.Market.PlayerPush;
|
PredictGame.ClosePrice = d.Market.Price; PredictGame.CloseGas = d.Gas; PredictGame.ClosePush = d.Market.PlayerPush;
|
||||||
// 永续:用今天的标记价(当日均价)结算,要在今晚的价格更新之前
|
// 永续:用今天的标记价(当日均价)结算,要在今晚的价格更新之前
|
||||||
var perpEvents = d.Perps.Night(day, new Dictionary<string, double> { ["PSC"] = pscMark, ["SPARK"] = d.Stable.Spark }, d.Poinbase, Session.Price);
|
var perpEvents = d.Perps.Night(day, new Dictionary<string, double> { ["PSC"] = pscMark, ["SPARK"] = d.Stable.Spark }, d.Poinbase, Session.Price);
|
||||||
|
foreach (var pp in d.Perps.Positions) Log.Info($"永续夜间:{pp.Product} {(pp.Long ? "多" : "空")} 保证金 {pp.Margin:0.00},资金费率 {d.Perps.Rate(pp.Product) * 100:0.000}%,标记价 {(pp.Product == "PSC" ? pscMark : d.Stable.Spark):0.00}");
|
||||||
if (perpEvents.Any(e => e.Kind == "seize")) SeizeForDebt(d, day);
|
if (perpEvents.Any(e => e.Kind == "seize")) SeizeForDebt(d, day);
|
||||||
var stakeEvents = d.Staking.Night(day, d.Stable.CraRate, d.WalletAt);
|
var stakeEvents = d.Staking.Night(day, d.Stable.CraRate, d.WalletAt);
|
||||||
double crcFactor = d.Stable.Night(day, d.Rng, d.Staking.Earning);
|
double crcFactor = d.Stable.Night(day, d.Rng, d.Staking.Earning);
|
||||||
|
|||||||
Reference in new issue
Block a user