Stage 3: block reward 100, random halving pass-through, RZ800 14kJ, low-tier fakes, tier-mismatch always spotted
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9dd900b16
commit
7255befa01
9 files changed
+80
-31
No files matched your search
@@ -283,7 +283,7 @@ namespace Decentralized
|
||||
var cur = Items.GetClaim(item) ?? Claim.Truth(u);
|
||||
if (row == CardLabels.RowSpec)
|
||||
{
|
||||
var models = Hardware.Specs.Values.Where(s => !s.Asic).Select(s => s.Model).ToList();
|
||||
var models = Hardware.Specs.Values.Where(s => !s.Asic && !s.Scrap).Select(s => s.Model).ToList();
|
||||
Items.EditClaim(item, row, 0, models[(models.IndexOf(cur.Model) + 1) % models.Count]);
|
||||
}
|
||||
else Items.EditClaim(item, row, row == CardLabels.RowSeal ? (cur.Get(row) == 0 ? 2 : 0) : row == CardLabels.RowBracket ? (cur.Get(row) + 1) % 2 : (cur.Get(row) + 1) % 3);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Decentralized
|
||||
dir.Add(Terminal, CreateTerminal);
|
||||
dir.Add(Rig, CreateRig);
|
||||
dir.Add(Guide, CreateGuide);
|
||||
foreach (var spec in Hardware.Specs.Values.Where(s => !s.Asic))
|
||||
foreach (var spec in Hardware.Specs.Values.Where(s => !s.Asic && !s.Scrap))
|
||||
{
|
||||
var s = spec;
|
||||
dir.Add(GpuId(s.Model), () => CreateGpu(s));
|
||||
@@ -123,14 +123,12 @@ namespace Decentralized
|
||||
|
||||
private static object checkedClient;
|
||||
private static readonly HashSet<int> checkedItems = new HashSet<int>();
|
||||
public const double CustomerSpotChance = 0.50;
|
||||
public const int RepLossMax = 25;
|
||||
|
||||
/// <summary>被顾客看穿时的信誉损失:骗的价差每满一周房租扣 1 点,最少 1,最多 25。</summary>
|
||||
public static int RepLoss(long gap) => (int)Math.Max(1, Math.Min(RepLossMax, Math.Round(gap / (double)Math.Max(1, PlayerStore.Instance.rentValue))));
|
||||
public static int RepLoss(long gap) => (int)Math.Max(1, Math.Min(Tuning.RepLossMax, Math.Round(gap / (double)Math.Max(1, PlayerStore.Instance.rentValue))));
|
||||
|
||||
/// <summary>
|
||||
/// 自己的卡摆给想买的顾客:说法里隐瞒的每一项,顾客有 50% 的概率看出来;看出来就拆穿这一项(价格回到真实情况),
|
||||
/// 自己的卡摆给想买的顾客:说法里隐瞒的每一项,顾客有 50% 的概率看出来(型号档次不符的必看出来,供电口和风扇数一眼可见);看出来就拆穿这一项(价格回到真实情况),
|
||||
/// 并且掉一点信誉。每位顾客对每张卡只看一次。说法比实际更差(把好卡说差了)顾客不会去指。
|
||||
/// </summary>
|
||||
public static void OfferForTest(GameItem item) { checkedItems.Clear(); OnOffered(item, true); }
|
||||
@@ -152,7 +150,7 @@ namespace Decentralized
|
||||
var rng = Session.Data.Rng;
|
||||
int found = 0;
|
||||
foreach (int r in CardLabels.Rows)
|
||||
if ((lies & r) != 0 && rng.Chance(CustomerSpotChance))
|
||||
if ((lies & r) != 0 && rng.Chance(r == CardLabels.RowSpec && claim.Value.Tier != Claim.Truth(u).Tier ? Tuning.CustomerSpotTierMismatch : Tuning.CustomerSpotChance))
|
||||
{
|
||||
found |= r;
|
||||
if (r != CardLabels.RowSpec && CardLabels.IsEvidence(r, claim.Value, Claim.Truth(u))) found |= CardLabels.RowSpec | CardLabels.RowBuild;
|
||||
|
||||
@@ -122,10 +122,11 @@ namespace Decentralized
|
||||
|
||||
double rewardBefore = d.Network.Reward;
|
||||
d.Network.Night(day, d.Market.Price, hash);
|
||||
if (d.Network.Reward < rewardBefore) d.Market.OnHalving(d.Rng);
|
||||
if (d.Network.Reward < rewardBefore) News.Show("pd_news_halving_" + day, L.T("news.halving.title"), L.T("news.halving.desc"), 2);
|
||||
double crcFactor = d.Stable.Night(day, d.Rng, 0);
|
||||
if (crcFactor < 1) d.Hot.Balances[Assets.CRC] = d.Hot.Get(Assets.CRC) * crcFactor;
|
||||
d.Market.UpdateSupply(day, d.Network.Reward);
|
||||
d.Market.UpdateSupply(day);
|
||||
if (Tuning.HalvingDays - day % Tuning.HalvingDays == 3) News.Show("pd_news_prehalving_" + day, L.T("news.prehalving.title"), L.T("news.prehalving.desc"), 3);
|
||||
d.Market.Night(events, d.Rng, day, Session.Price);
|
||||
report.Price = d.Market.Price;
|
||||
|
||||
Reference in new issue
Block a user