污点按币种记脏枚数、只在 Web3 钱包里;Poinbase 只收干净的币;删除出金审查;永续操纵只记罪证;泄露记罪证;剧情替换;存档迁移到数据版本 5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f0a6051591
commit
34b70023c9
37 files changed
+744
-647
No files matched your search
@@ -59,7 +59,7 @@ namespace Decentralized.Domain
|
||||
/// 否则在 PSC、CRT、CRA 里随机,污点比例在 OtcTaintMin–OtcTaintMax 之间。市值 = 房租 × 区间;现金价 = 市值 × 折扣,折扣按污点比例从 OtcCutClean 线性降到 OtcCutDirty。
|
||||
/// crackdown:镇压期间便衣更多。
|
||||
/// </summary>
|
||||
public static OtcOffer MakeSell(ICollection<MarketEvent> active, bool poneroOpen, Func<string, double> price, double rent, Rng rng)
|
||||
public static OtcOffer MakeSell(ICollection<MarketEvent> active, bool poneroOpen, Func<string, double> price, double rent, Rng rng, double stingMult = 1)
|
||||
{
|
||||
if (rent <= 0) return null;
|
||||
string asset = null; double ratio;
|
||||
@@ -75,7 +75,7 @@ namespace Decentralized.Domain
|
||||
return new OtcOffer
|
||||
{
|
||||
Side = OtcSide.Sell, Asset = asset, Qty = value / p, Value = value, TaintRatio = ratio, Cash = (int)Math.Round(value * cut),
|
||||
Sting = rng.Chance(Tuning.OtcSting + (crackdown ? Tuning.OtcStingCrackdown : 0)),
|
||||
Sting = rng.Chance(Math.Min(1, (Tuning.OtcSting + (crackdown ? Tuning.OtcStingCrackdown : 0)) * stingMult)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -101,12 +101,11 @@ namespace Decentralized.Domain
|
||||
return new OtcOffer { Side = o.Side, Asset = o.Asset, Qty = o.Qty * f, Value = o.Value * f, TaintRatio = o.TaintRatio, Cash = (int)Math.Round(o.Cash * f), Sting = o.Sting };
|
||||
}
|
||||
|
||||
/// <summary>收下卖币客户的币:币进钱包,成本是付出的现金;污点 = 市值 × 污点比例(带上限)。返回超出钱包价值、没加进去的污点。</summary>
|
||||
public static double Receive(Wallet w, OtcOffer o, Func<string, double> price)
|
||||
/// <summary>收下卖币客户的币:币进钱包,其中 数量 × 污点比例 枚是脏的;成本是付出的现金。</summary>
|
||||
public static void Receive(Wallet w, OtcOffer o)
|
||||
{
|
||||
w.Add(o.Asset, o.Qty);
|
||||
w.AddDirty(o.Asset, o.Qty, o.Qty * o.TaintRatio);
|
||||
w.Basis += o.Cash;
|
||||
return o.TaintRatio > 0 ? w.AddTaintCapped(o.Value * o.TaintRatio, price) : 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user