This commit is contained in:
aozhiwei 2022-09-18 09:02:25 +08:00
parent 10c3495a92
commit 282f9ff8ba

View File

@ -32,46 +32,6 @@ use models\Hero;
use models\Gun;
use services\FormulaService;
/*
$onlineNum = 0;
{
//pve
$instanceLevel = 0;
$heroQuality = 0;
$instanceRank = 0;
$bossReward = 0;
$todayPveBattleTimes = 0;
$todayPveGetFragmentNum = 0;
$heroFragment = array(
0 => array(
1001 => 10 + 1, //当前时间段 + 上一时间段剩余
1002 => 10 + 1, //当前时间段 + 上一时间段剩余
9999 => 3 + 1, //当前时间段 + 上一时间段剩余, 特殊碎片,指定合成
),
1 => array(
),
);
$gunFragment = array(
0 => array(
2001 => 10 + 1, //当前时间段 + 上一时间段剩余
2002 => 10 + 1, //当前时间段 + 上一时间段剩余
9998 => 3 + 1, //当前时间段 + 上一时间段剩余, 特殊碎片,指定合成
),
1 => array(
),
);
$dropRate = max(1.15 - ($heroQuality - $instanceLevel) * 0.25, 0);
$dropMul = 0.8 - ($instancRank - 1) * 0.25 + $bossReward * 0.2;
$instackRankRate = 0.8; //0.8 0.55 0.3;
$heroProbability = min($heroFragment[$now].total / $onlineNum * $dropRate * ($instanceRankRate + $bossReward*0.2) * pow(2, $todayPveBattleTimes - $todayPveGetFragmentNum -1), 1);
$gunProbability = min($gunFragment[$now].total / $onlineNum * $dropRate * ($instanceRankRate + $bossReward*0.2) * pow(2, $todayPveBattleTimes - $todayPveGetFragmentNum -1), 1);
$emptyProbability = max(1 - $heroProbability - $gunProbability, 0);
//对3者取权重
//对堕落的碎片做随机
*/
class BattleDataService extends BaseService {
private $seasonDb = array();
@ -580,13 +540,29 @@ class BattleDataService extends BaseService {
{
$pveShouYi = 0;
$heroQuality = $this->heroDto['quality'];
$instanceRank = 1;
$instanceLevel = $this->pveGeminiMeta['gemini_lv'];
$bossReward = 0;
$gun1Ceg = 0;
$gun2Ceg = 0;
$heroRewardCeg = $pveShouYi *
max(1.15 - ($heroQuality) * 0.25, 0)
max(1.15 - ($heroQuality - $instanceLevel) * 0.25, 0) *
(0.8 - ($instanceRank - 1) * 0.25 + $bossReward * 0.2) *
1/10
;
$gun1RewardCeg = $gun1Ceg *
max(1.15 - ($heroQuality - $instanceLevel) * 0.25, 0) *
(0.8 - ($instanceRank - 1) * 0.25 + $bossReward * 0.2) *
1/10
;
$gun2RewardCeg = $gun2Ceg *
max(1.15 - ($heroQuality - $instanceLevel) * 0.25, 0) *
(0.8 - ($instanceRank - 1) * 0.25 + $bossReward * 0.2) *
1/10
;
}
private function getOnlineNumber()
{
return max(1, 0);