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
@@ -7,18 +7,20 @@ namespace Decentralized.Domain
|
||||
/// <summary>二手显卡贩子的类型:老实人按真实价卖;中间商加价;骗子夹带假卡,按标称型号的价卖。</summary>
|
||||
public enum DealerKind { Honest, Middleman, Scammer }
|
||||
|
||||
/// <summary>贩子带来的一张卡:<see cref="MarkupPct"/> 是柜台上相对真实价值的加价百分比(骗子卖假卡时是正的,按标称型号报价再打九折)。</summary>
|
||||
/// <summary>贩子带来的一张卡。老实人不报价(按真实价值卖);其他贩子 <see cref="Quoted"/> 为真,按 <see cref="CardValue.Quote"/> 报价,
|
||||
/// <see cref="MarkupPct"/> 是加价百分比,玩家指出外观问题或假货迹象就按维度扣回去。</summary>
|
||||
public sealed class UsedCard
|
||||
{
|
||||
public string Model;
|
||||
public string FakeOf;
|
||||
public double Health;
|
||||
public int MarkupPct;
|
||||
public bool Quoted;
|
||||
}
|
||||
|
||||
public static class UsedDealers
|
||||
{
|
||||
public const double MiddlemanMarkup = 0.08, ScamDiscount = 0.90;
|
||||
public const double MiddlemanMarkup = 0.08, ScamDiscount = CardValue.ScamDiscount;
|
||||
public const double FakeShareMiddleman = 0.10, FakeShareScammer = 0.45;
|
||||
|
||||
/// <summary>今天来的贩子的类型:骗子越往后越多。</summary>
|
||||
@@ -49,13 +51,9 @@ namespace Decentralized.Domain
|
||||
var label = pool[rng.Range(0, pool.Length - 1)];
|
||||
var card = new UsedCard { Model = label, Health = 25 + rng.NextDouble() * 60 };
|
||||
var cheaper = Hardware.Specs.Values.Where(s => !s.Asic && s.Price * 2 <= Hardware.Specs[label].Price).Select(s => s.Model).ToArray();
|
||||
if (cheaper.Length > 0 && rng.Chance(share))
|
||||
{
|
||||
card.FakeOf = cheaper[rng.Range(0, cheaper.Length - 1)];
|
||||
var u = new Unit { Model = card.Model, FakeOf = card.FakeOf, Health = card.Health };
|
||||
card.MarkupPct = (int)Math.Round((CardValue.Of(label, card.Health) * ScamDiscount / CardValue.True(u) - 1) * 100);
|
||||
}
|
||||
else if (kind == DealerKind.Middleman) card.MarkupPct = (int)Math.Round(MiddlemanMarkup * 100);
|
||||
if (cheaper.Length > 0 && rng.Chance(share)) card.FakeOf = cheaper[rng.Range(0, cheaper.Length - 1)];
|
||||
card.Quoted = kind != DealerKind.Honest;
|
||||
card.MarkupPct = kind == DealerKind.Middleman ? (int)Math.Round(MiddlemanMarkup * 100) : 0;
|
||||
cards.Add(card);
|
||||
}
|
||||
return cards;
|
||||
|
||||
Reference in new issue
Block a user