Cards: appearance follows wear, hash depends on fan and contacts, seller confrontation
Fan, contact and scratch levels are recomputed from health and a per-card seed, so a card looks older as it wears. Fan and contacts scale hashrate. Each inspection-tray detail now maps to exactly one dimension value. Quoting dealers price the card as if its condition were fine; the player points out fan, contacts, bracket, print or sticker in the tray to take the matching discount or expose a fake (a wrong accusation costs reputation like the vanilla confrontation). Unowned cards show a coarse grade and rated specs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
68265095a8
commit
f93dbc6eec
9 files changed
+279
-76
No files matched your search
@@ -36,7 +36,9 @@ namespace Decentralized
|
||||
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Used dealer visit (test)", () => Log.Guard("二手贩子(测试)", () =>
|
||||
{
|
||||
var m = PlayerStore.Instance.storeClientManager;
|
||||
m.AddNextClient(Create(DealerKind.Scammer, 40));
|
||||
var c = Create(DealerKind.Scammer, 40);
|
||||
PlayerStore.Instance.currentClientInstance = StoreClientInstance.CreateClientInstance(c); // 测试:直接换成这位贩子
|
||||
Place(DealerKind.Scammer, UsedDealers.Cards(DealerKind.Scammer, 40, Session.Data.Rng), Session.Data.Rng);
|
||||
Log.Info($"二手贩子(测试)已排入,队列 {m.clientStack.Count} 人");
|
||||
}));
|
||||
}
|
||||
@@ -85,22 +87,24 @@ namespace Decentralized
|
||||
};
|
||||
StoreClientFactionSetup.InitScav(client);
|
||||
client.mainDialogue.SetText(client.displayName, L.T("dealer.line1." + rng.Range(1, 3))).NextDialogue().SetText(client.displayName, L.T("dealer.line2." + rng.Range(1, 3)))
|
||||
.SetEndAction(() => Log.Guard("二手贩子上货", () =>
|
||||
.SetEndAction(() => Place(kind, cards, rng));
|
||||
client.AddBasicDialog();
|
||||
client.CompleteClientCreation();
|
||||
return client;
|
||||
}
|
||||
|
||||
private static void Place(DealerKind kind, List<UsedCard> cards, Rng rng) => Log.Guard("二手贩子上货", () =>
|
||||
{
|
||||
NegociationUIManager.Instance.OpenUI();
|
||||
var placed = new List<string>();
|
||||
foreach (var c in cards)
|
||||
{
|
||||
var item = Items.NewCard(c.Model, c.Health, c.FakeOf, rng);
|
||||
if (c.MarkupPct != 0) Items.SetQuote(item, (long)Math.Round(CardValue.True(Items.ToUnit(item)) * (1 + c.MarkupPct / 100.0)));
|
||||
if (c.Quoted) Items.SetQuote(item, c.MarkupPct);
|
||||
PlayerStore.Instance.AddDirectSellingItemToTable(item);
|
||||
placed.Add($"{c.Model}{(c.FakeOf != null ? "←" + c.FakeOf : "")} {c.Health:0}% {c.MarkupPct:+0;-0}% 柜台价 {item.unitValue}(真实 {CardValue.True(Items.ToUnit(item))})");
|
||||
placed.Add($"{c.Model}{(c.FakeOf != null ? "←" + c.FakeOf : "")} {c.Health:0}% {(c.Quoted ? c.MarkupPct + "%" : "不报价")} 柜台价 {item.unitValue}(真实 {CardValue.True(Items.ToUnit(item))})");
|
||||
}
|
||||
Log.Info($"二手贩子({kind}):{string.Join(",", placed)}");
|
||||
}));
|
||||
client.AddBasicDialog();
|
||||
client.CompleteClientCreation();
|
||||
return client;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user