1
This commit is contained in:
parent
fdbce326c5
commit
1d15f0ec93
@ -310,7 +310,7 @@ class Chip extends BaseModel
|
||||
foreach ($chipIdsArr as $val){
|
||||
$chip = self::getChipByIdx($val);
|
||||
$lucky = FormulaService::getChipLuckyValue($chip['chip_grade']);
|
||||
$MaxStrength+=FormulaService::Hero_Chip_NFT_Maximum_Physical_Strength($chip['chip_grade'],$lucky)*FormulaService::Hero_Chip_PSA_Value($chip['chip_grade'])*FormulaService::Hero_Chip_GAC_PS_Value($chip['chip_grade']);
|
||||
$MaxStrength+=FormulaService::Hero_Chip_NFT_Maximum_Physical_Strength($chip['chip_grade'],$lucky)*FormulaService::Hero_Chip_PSA_Value($chip)*FormulaService::Hero_Chip_GAC_PS_Value($chip['chip_grade']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -318,7 +318,7 @@ class Chip extends BaseModel
|
||||
foreach ($chipIdsArr as $val){
|
||||
$chip = self::getChipByIdx($val);
|
||||
$lucky = FormulaService::getChipLuckyValue($chip['chip_grade']);
|
||||
$MaxStrength+=FormulaService::Hero_Chip_NFT_Maximum_Physical_Strength($chip['chip_grade'],$lucky)*FormulaService::Weapon_Chip_DA_Value($chip['chip_grade'])*FormulaService::Weapon_Chip_GAC_PS_Value($chip['chip_grade']);
|
||||
$MaxStrength+=FormulaService::Hero_Chip_NFT_Maximum_Physical_Strength($chip['chip_grade'],$lucky)*FormulaService::Weapon_Chip_DA_Value($chip)*FormulaService::Weapon_Chip_GAC_PS_Value($chip['chip_grade']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -209,6 +209,7 @@ class Gun extends BaseModel {
|
||||
'chip_ids' => $row['chip_ids'],
|
||||
'chip_strength_sum' => strval(Chip::getChipMaxStrength($row['chip_ids'],2)), //计算ceg上限所需参数
|
||||
'offer_reward_state' => 0,
|
||||
'labour' => $row['labour'],
|
||||
);
|
||||
$dto['durability_max'] = strval(round(FormulaService::Weapon_NFT_Maximum_Durability($dto['quality'],$dto['lucky']),3));
|
||||
$dto['pvp_ceg_uplimit'] = strval( round(FormulaService::getWeaponPvpDailyCegUpLimit($dto),2) );
|
||||
|
@ -219,6 +219,7 @@ class Hero extends BaseModel {
|
||||
'skill_common' => $skill_common,
|
||||
'skill_points' => $row['skill_points'],
|
||||
'offer_reward_state' => 0,
|
||||
'labour' => $row['labour'],
|
||||
);
|
||||
$dto['hero_tili_max'] = strval(round(FormulaService::Hero_NFT_Maximum_Physical_Strength($dto['quality'],$dto['lucky']),3));
|
||||
$dto['pvp_ceg_uplimit'] =strval( round(FormulaService::getHeroPvpDailyCegUpLimit($dto),2) );
|
||||
|
@ -8,6 +8,9 @@ require_once('mt/FormulaPvp.php');
|
||||
require_once('mt/HeroQuality.php');
|
||||
require_once('mt/GunQuality.php');
|
||||
|
||||
use models\Chip;
|
||||
use models\Gun;
|
||||
use models\Hero;
|
||||
use mt;
|
||||
|
||||
class FormulaService extends BaseService {
|
||||
@ -368,7 +371,7 @@ class FormulaService extends BaseService {
|
||||
//每天英雄NFT获得CEG上限值
|
||||
public static function Hero_Max_CEG($heroDb){
|
||||
//Hero_Max_CEG=((SIGN(英雄NFT阶数=1)*Hero_NFT_Maximum_Physical_Strength+SIGN(英雄NFT阶数>1)*Hero_Fixed_Physical_Strength)*Hero_PSA_Value*GAC_PS_Value+Hero_Chip_NFT_Maximum_Physical_Strength*Hero_Chip_PSA_Value*Hero_Chip_GAC_PS_Value)*10*CEG_Discount_Rate
|
||||
return ((($heroDb['quality']==1?1:0)*self::Hero_NFT_Maximum_Physical_Strength($heroDb['quality'],$heroDb['lucky'])+($heroDb['quality']>1?1:0)*$heroDb['hero_tili'])*self::Hero_PSA_Value($heroDb['quality'])*self::GAC_PS_Value($heroDb['quality'])+$heroDb['chip_strength_sum'])*10*self::CEG_Discount_Rate();
|
||||
return ((($heroDb['quality']==1?1:0)*self::Hero_NFT_Maximum_Physical_Strength($heroDb['quality'],$heroDb['lucky'])+($heroDb['quality']>1?1:0)*$heroDb['hero_tili'])*self::Hero_PSA_Value($heroDb)*self::GAC_PS_Value($heroDb['quality'])+$heroDb['chip_strength_sum'])*10*self::CEG_Discount_Rate();
|
||||
}
|
||||
|
||||
//英雄PVP收益上限
|
||||
@ -401,7 +404,7 @@ class FormulaService extends BaseService {
|
||||
//每天枪械NFT获得CEG上限值
|
||||
public static function Weapon_Max_CEG($weaponDb){
|
||||
//Weapon_Max_CEG=((SIGN(武器NFT阶数=1)*Weapon_NFT_Maximum_Durability+SIGN(武器NFT阶数>1)*Weapon_Fixed_Durability)*Weapon_DA_Value*GAC_D_Value+Weapon_NFT_Maximum_Durability*Weapon_Chip_DA_Value*Weapon_Chip_GAC_PS_Value)*10*CEG_Discount_Rate
|
||||
return ((($weaponDb['quality']==1?1:0)*self::Weapon_NFT_Maximum_Durability($weaponDb['quality'],$weaponDb['lucky'])+($weaponDb['quality']>1?1:0)*$weaponDb['durability'])*self::Weapon_DA_Value($weaponDb['quality'])*self::GAC_D_Value($weaponDb['quality'])+$weaponDb['chip_strength_sum'])*10*self::CEG_Discount_Rate();
|
||||
return ((($weaponDb['quality']==1?1:0)*self::Weapon_NFT_Maximum_Durability($weaponDb['quality'],$weaponDb['lucky'])+($weaponDb['quality']>1?1:0)*$weaponDb['durability'])*self::Weapon_DA_Value($weaponDb)*self::GAC_D_Value($weaponDb['quality'])+$weaponDb['chip_strength_sum'])*10*self::CEG_Discount_Rate();
|
||||
|
||||
}
|
||||
|
||||
@ -491,23 +494,27 @@ class FormulaService extends BaseService {
|
||||
}
|
||||
|
||||
//英雄劳力值
|
||||
public static function Hero_Labor_Value(){
|
||||
return 1;
|
||||
public static function Hero_Labor_Value($heroDb){
|
||||
// return 1;
|
||||
return $heroDb['labour'];
|
||||
}
|
||||
|
||||
//武器劳力值
|
||||
public static function Weapon_Labor_Value(){
|
||||
return 1;
|
||||
public static function Weapon_Labor_Value($weaponDb){
|
||||
// return 1;
|
||||
return $weaponDb['labour'];
|
||||
}
|
||||
|
||||
//英雄芯片劳力值
|
||||
public static function Hero_Chip_Labor_Value(){
|
||||
return 1;
|
||||
public static function Hero_Chip_Labor_Value($chip){
|
||||
// return 1;
|
||||
return $chip['labour'];
|
||||
}
|
||||
|
||||
//武器芯片劳力值
|
||||
public static function Weapon_Chip_Labor_Value(){
|
||||
return 1;
|
||||
public static function Weapon_Chip_Labor_Value($chip){
|
||||
// return 1;
|
||||
return $chip['labour'];
|
||||
}
|
||||
|
||||
//芯片升星累计成本
|
||||
@ -552,16 +559,16 @@ class FormulaService extends BaseService {
|
||||
}
|
||||
|
||||
//每日英雄芯片体力值衰减百分比
|
||||
public static function Hero_Chip_PSA_Value($grand){
|
||||
public static function Hero_Chip_PSA_Value($chip){
|
||||
//Hero_Chip_PSA_Value=MAX(0,ROUND((Chip_Payback_Period-Chip_Attenuation_Parameter* Hero_Chip_Labor_Value)/((1-Chip_Attenuation_Parameter /2)* Chip_Payback_Period ^2)/ROUND(1+0.04*英雄芯片星数,3),4))*(1+0.1*ROUND(SIN(Hero_Chip_Labor_Value),2))
|
||||
$num = max(0,round((self::Chip_Payback_Period($grand)-self::Chip_Attenuation_Parameter($grand)*self::Hero_Chip_Labor_Value())/((1-self::Chip_Attenuation_Parameter($grand)/2)*pow(self::Chip_Payback_Period($grand),2))/round(1+0.04*$grand,3),4))*(1+0.1*round(sin(self::Hero_Chip_Labor_Value()),2));
|
||||
$num = max(0,round((self::Chip_Payback_Period($chip['chip_grade'])-self::Chip_Attenuation_Parameter($chip['chip_grade'])*self::Hero_Chip_Labor_Value($chip))/((1-self::Chip_Attenuation_Parameter($chip['chip_grade'])/2)*pow(self::Chip_Payback_Period($chip['chip_grade']),2))/round(1+0.04*$chip['chip_grade'],3),4))*(1+0.1*round(sin(self::Hero_Chip_Labor_Value($chip)),2));
|
||||
return round($num,5);
|
||||
}
|
||||
|
||||
//每日枪械芯片体力值衰减百分比
|
||||
public static function Weapon_Chip_DA_Value($grand){
|
||||
public static function Weapon_Chip_DA_Value($chip){
|
||||
//Weapon_Chip_DA_Value=MAX(0,ROUND((Chip_Payback_Period-Chip_Attenuation_Parameter*Weapon_Chip_Labor_Value)/((1-Chip_Attenuation_Parameter/2)* Chip_Payback_Period^2)/ROUND(1+0.04*武器芯片星数,3),4))*(1+0.1*ROUND(SIN(Weapon_Chip_Labor_Value),2))
|
||||
$num = max(0,round((self::Chip_Payback_Period($grand)-self::Chip_Attenuation_Parameter($grand)*self::Weapon_Chip_Labor_Value())/((1-self::Chip_Attenuation_Parameter($grand)/2)*pow(self::Chip_Payback_Period($grand),2))/round(1+0.04*$grand,3),4))*(1+0.1*round(sin(self::Weapon_Chip_Labor_Value()),2));
|
||||
$num = max(0,round((self::Chip_Payback_Period($chip['chip_grade'])-self::Chip_Attenuation_Parameter($chip['chip_grade'])*self::Weapon_Chip_Labor_Value($chip))/((1-self::Chip_Attenuation_Parameter($chip['chip_grade'])/2)*pow(self::Chip_Payback_Period($chip['chip_grade']),2))/round(1+0.04*$chip['chip_grade'],3),4))*(1+0.1*round(sin(self::Weapon_Chip_Labor_Value($chip)),2));
|
||||
return round($num,5);
|
||||
}
|
||||
|
||||
@ -690,15 +697,15 @@ class FormulaService extends BaseService {
|
||||
}
|
||||
|
||||
//每日英雄体力值衰减百分比
|
||||
public static function Hero_PSA_Value($quality){
|
||||
public static function Hero_PSA_Value($heroDb){
|
||||
//MAX(0,ROUND((Hero_Payback_Period-Hero_Attenuation_Parameter* Hero_Labor_Value)/((1-Hero_Attenuation_Parameter/2)* Hero_Payback_Period^2)/ROUND(1.1714+0.0286*英雄阶数,3),4))*(1+0.1*ROUND(SIN(Hero_Labor_Value),2))
|
||||
return max(0,round((self::Hero_Payback_Period($quality)-self::Hero_Attenuation_Parameter($quality)*self::Hero_Labor_Value())/((1-self::Hero_Attenuation_Parameter($quality)/2)*pow(self::Hero_Payback_Period($quality),2))/round(1.1714+0.0286*$quality,3),4))*(1+0.1*round(sin(self::Hero_Labor_Value()),2));
|
||||
return max(0,round((self::Hero_Payback_Period($heroDb['quality'])-self::Hero_Attenuation_Parameter($heroDb['quality'])*self::Hero_Labor_Value($heroDb))/((1-self::Hero_Attenuation_Parameter($heroDb['quality'])/2)*pow(self::Hero_Payback_Period($heroDb['quality']),2))/round(1.1714+0.0286*$heroDb['quality'],3),4))*(1+0.1*round(sin(self::Hero_Labor_Value($heroDb)),2));
|
||||
}
|
||||
|
||||
//每日武器耐久度衰减百分比
|
||||
public static function Weapon_DA_Value($quality){
|
||||
public static function Weapon_DA_Value($weaponDb){
|
||||
//MAX(0,ROUND((Weapon_Payback_Period-Weapon_Attenuation_Parameter* Weapon_Labor_Value)/((1-Weapon_Attenuation_Parameter/2)* Weapon_Payback_Period ^2)/ROUND(1.1714+0.0286*武器阶数,3),4))*(1+0.1*ROUND(SIN(Weapon_Labor_Value),2))
|
||||
return max(0,round((self::Weapon_Payback_Period($quality)-self::Weapon_Attenuation_Parameter($quality)*self::Weapon_Labor_Value())/((1-self::Weapon_Attenuation_Parameter($quality)/2)*pow(self::Weapon_Payback_Period($quality),2))/round(1.1714+0.0286*$quality,3),4))*(1+0.1*round(sin(self::Weapon_Labor_Value()),2));
|
||||
return max(0,round((self::Weapon_Payback_Period($weaponDb['quality'])-self::Weapon_Attenuation_Parameter($weaponDb['quality'])*self::Weapon_Labor_Value($weaponDb))/((1-self::Weapon_Attenuation_Parameter($weaponDb['quality'])/2)*pow(self::Weapon_Payback_Period($weaponDb['quality']),2))/round(1.1714+0.0286*$weaponDb['quality'],3),4))*(1+0.1*round(sin(self::Weapon_Labor_Value($weaponDb)),2));
|
||||
}
|
||||
|
||||
//英雄回本周期(参数单位:天)
|
||||
|
Loading…
x
Reference in New Issue
Block a user