forked from devsam/core
기술연구 추가
This commit is contained in:
@@ -8,7 +8,7 @@ use \sammo\{
|
||||
getGeneralLeadership,getGeneralPower,getGeneralIntel,
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic, CriticalScore,
|
||||
checkAbilityEx
|
||||
uniqueItemEx
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
@@ -46,6 +46,7 @@ class che_상업투자 extends BaseCommand{
|
||||
}
|
||||
|
||||
protected function calcBaseScore():float{
|
||||
$trust = Util::valueFit($this->city['trust'], 50);
|
||||
$general = $this->generalObj;
|
||||
|
||||
if(static::$statKey == 'intel'){
|
||||
@@ -80,9 +81,12 @@ class che_상업투자 extends BaseCommand{
|
||||
|
||||
$trust = Util::valueFit($this->city['trust'], 50);
|
||||
|
||||
$score = $this->calcBaseScore();
|
||||
$score = Util::valueFit($this->calcBaseScore(), 1);
|
||||
|
||||
['succ'=>$successRatio, 'fail'=>$failRatio] = CriticalRatioDomestic($general->getRaw(), static::$statKey);
|
||||
if($trust < 80){
|
||||
$successRatio *= $trust / 80;
|
||||
}
|
||||
$successRatio = $general->onCalcDomestic(static::$cityKey, 'succ', $successRatio);
|
||||
$failRatio = $general->onCalcDomestic(static::$cityKey, 'fail', $failRatio);
|
||||
|
||||
@@ -128,6 +132,7 @@ class che_상업투자 extends BaseCommand{
|
||||
$this->city[static::$cityKey.'2']
|
||||
)
|
||||
];
|
||||
$db->update('city', $cityUpdated, 'city=%i', $general->getVar('city'));
|
||||
|
||||
$general->increaseVarWithLimit('gold', -$this->reqGold, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
|
||||
Reference in New Issue
Block a user