Black market: anonymous hash merchant names with type tag
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
96d8b7cf3b
commit
4422bd99ab
5 files changed
+26
-11
No files matched your search
@@ -87,8 +87,6 @@ namespace Decentralized.Domain
|
||||
|
||||
public static double HoneypotChance(int secRep) => Math.Min(Tuning.BmHoneypotMax, Tuning.BmHoneypotBase + Math.Max(0, secRep) * Tuning.BmHoneypotPerSecRep);
|
||||
|
||||
private static readonly string[] NameA = { "rat", "grey", "static", "null", "dust", "iron", "pale", "wire", "salt", "ghost" };
|
||||
private static readonly string[] NameB = { "king", "mule", "broker", "hand", "cat", "fox", "tooth", "lamp", "nine", "dealer" };
|
||||
|
||||
public bool Closed(int day) => day <= ClosedUntil;
|
||||
|
||||
@@ -166,14 +164,18 @@ namespace Decentralized.Domain
|
||||
}
|
||||
|
||||
/// <summary>每周重新生成商家、货架和论坛情报(与现货同一天刷新):从 6 种类型里抽 BmMerchantCount 家,另有概率出现一家大宗商家。</summary>
|
||||
public void RefreshOrders(int day, int rep, Rng rng, Func<string, long> value)
|
||||
public void RefreshOrders(int day, int rep, Rng rng, Func<string, long> value, bool allTypes = false)
|
||||
{
|
||||
Sellers.Clear(); Catalog.Clear(); Forum.Clear();
|
||||
var types = Core.OrderBy(_ => rng.NextDouble()).Take(Tuning.BmCoreMerchants).ToList();
|
||||
types.AddRange(Others.OrderBy(_ => rng.NextDouble()).Take(Tuning.BmMerchantCount - Tuning.BmCoreMerchants));
|
||||
if (allTypes) { types = ((MerchantType[])Enum.GetValues(typeof(MerchantType))).ToList(); types.Add(MerchantType.Personal); }
|
||||
else
|
||||
{
|
||||
if (rng.Chance(Tuning.BmBulkChance)) types.Add(MerchantType.Bulk);
|
||||
if (rng.Chance(Tuning.BmEliteChance)) types.Add(MerchantType.Elite);
|
||||
for (int i = 0; i < Tuning.BmPersonalCount; i++) types.Add(MerchantType.Personal);
|
||||
}
|
||||
foreach (var t in types)
|
||||
{
|
||||
bool personal = t == MerchantType.Personal;
|
||||
@@ -184,7 +186,7 @@ namespace Decentralized.Domain
|
||||
double hi = t == MerchantType.Elite ? Tuning.BmFactorEliteMax : t == MerchantType.GpuNew ? Tuning.BmFactorNewMax : t == MerchantType.GpuUsed ? Tuning.BmFactorUsedMax : t == MerchantType.Bulk ? Tuning.BmFactorBulkMax : Tuning.BmFactorMax;
|
||||
var s = new BmSeller
|
||||
{
|
||||
Name = NameA[rng.Range(0, NameA.Length - 1)] + "_" + NameB[rng.Range(0, NameB.Length - 1)] + rng.Range(1, 99),
|
||||
Name = rng.NextUInt().ToString("x8").Substring(0, 6),
|
||||
Scam = scam, Type = t, Factor = personal ? 1.0 : F(rng, lo, hi),
|
||||
Trades = fresh ? rng.Range(0, 12) : rng.Range(25, 220),
|
||||
Rating = scam && !fresh ? rng.Range(94, 99) : fresh ? rng.Range(70, 100) : rng.Range(90, 99),
|
||||
|
||||
Reference in new issue
Block a user