优化平台币显示样式不显示小数点,优化中大奖计算
This commit is contained in:
@@ -162,8 +162,8 @@ class PlayStartLogic
|
||||
$rollNumber = (int) ($chosen['grid_number'] ?? 0);
|
||||
$realEv = (float) ($chosen['real_ev'] ?? 0);
|
||||
$isTierT5 = (string) ($chosen['tier'] ?? '') === 'T5';
|
||||
// 玩家始终增加:(100 + real_ev) * ante(费用已在开始前扣除;免费抽奖同样按该口径结算)
|
||||
$rewardWinCoin = (self::UNIT_COST + $realEv) * $ante;
|
||||
// 摇色子中奖:按 dice_reward_config.real_ev 直接结算(已乘 ante);不再叠加票价 100
|
||||
$rewardWinCoin = $realEv * $ante;
|
||||
|
||||
// 豹子判定:5/30 必豹子;10/15/20/25 按 DiceRewardConfig 中 BIGWIN 该点数的 weight 判定(0-10000,10000=100%)
|
||||
// 杀分档位:不触发豹子,5/30 已在上方抽取时排除,10/15/20/25 仅生成非豹子组合
|
||||
@@ -197,7 +197,7 @@ class PlayStartLogic
|
||||
$rollArray = $this->getSuperWinRollArray($rollNumber);
|
||||
$isWin = 1;
|
||||
$bigWinEv = $bigWinRealEv > 0 ? $bigWinRealEv : self::SUPER_WIN_BONUS;
|
||||
$superWinCoin = (self::UNIT_COST + $bigWinEv) * $ante;
|
||||
$superWinCoin = $bigWinEv * $ante;
|
||||
// 中 BIGWIN 豹子:不走原奖励流程,不记录原奖励,不触发 T5 再来一次,仅发放豹子奖金
|
||||
$rewardWinCoin = 0;
|
||||
$realEv = 0;
|
||||
@@ -322,8 +322,8 @@ class PlayStartLogic
|
||||
$p->save();
|
||||
|
||||
// 彩金池累计盈利累加在 name=default 彩金池上:
|
||||
// 付费:每局按“当前中奖金额(含 BIGWIN) - 抽奖费用(ante*100)”
|
||||
// 免费券:取消票价成本 100,只计入中奖金额
|
||||
// 付费:每局按「本局赢取平台币 win_coin - 抽奖费用 paid_amount(ante*100)」
|
||||
// 免费券:paid_amount=0,只计入 win_coin
|
||||
$perPlayProfit = ($ticketType === self::LOTTERY_TYPE_PAID) ? ($winCoin - (float) $paidAmount) : $winCoin;
|
||||
$addProfit = $perPlayProfit;
|
||||
try {
|
||||
@@ -574,8 +574,8 @@ class PlayStartLogic
|
||||
$targetIndex = (int) ($chosen['end_index'] ?? 0);
|
||||
$rollNumber = (int) ($chosen['grid_number'] ?? 0);
|
||||
$realEv = (float) ($chosen['real_ev'] ?? 0);
|
||||
// 玩家始终增加:(100 + real_ev) * ante
|
||||
$rewardWinCoin = (self::UNIT_COST + $realEv) * $ante;
|
||||
// 摇色子中奖:按 real_ev 直接结算(与正式抽奖 run() 一致)
|
||||
$rewardWinCoin = $realEv * $ante;
|
||||
|
||||
$superWinCoin = 0;
|
||||
$isWin = 0;
|
||||
@@ -605,7 +605,7 @@ class PlayStartLogic
|
||||
$rollArray = $this->getSuperWinRollArray($rollNumber);
|
||||
$isWin = 1;
|
||||
$bigWinEv = $bigWinRealEv > 0 ? $bigWinRealEv : self::SUPER_WIN_BONUS;
|
||||
$superWinCoin = (self::UNIT_COST + $bigWinEv) * $ante;
|
||||
$superWinCoin = $bigWinEv * $ante;
|
||||
$rewardWinCoin = 0;
|
||||
// 中豹子时不走原奖励流程
|
||||
$realEv = 0.0;
|
||||
|
||||
@@ -38,6 +38,7 @@ class DicePlayRecordTestController extends BaseController
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$where = $request->more([
|
||||
['reward_config_record_id', ''],
|
||||
['lottery_type', ''],
|
||||
['direction', ''],
|
||||
['is_win', ''],
|
||||
|
||||
@@ -22,6 +22,8 @@ class DicePlayRecordTestLogic extends BaseLogic
|
||||
public function __construct()
|
||||
{
|
||||
$this->model = new DicePlayRecordTest();
|
||||
// 默认按 id 倒序,保证列表默认显示最新记录
|
||||
$this->setOrderField('id')->setOrderType('DESC');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -156,4 +156,12 @@ class DicePlayRecordTest extends BaseModel
|
||||
$query->where('roll_number', '=', $value);
|
||||
}
|
||||
}
|
||||
|
||||
/** 关联 dice_reward_config_record.id(权重测试记录) */
|
||||
public function searchRewardConfigRecordIdAttr($query, $value)
|
||||
{
|
||||
if ($value !== '' && $value !== null) {
|
||||
$query->where('reward_config_record_id', '=', $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user