선포 기준 변경2
This commit is contained in:
+1
-33
@@ -1585,7 +1585,7 @@ class GeneralAI
|
|||||||
$trialProp += ($devRate['pop'] + $devRate['all']) / 2;
|
$trialProp += ($devRate['pop'] + $devRate['all']) / 2;
|
||||||
|
|
||||||
$trialProp /= 3;
|
$trialProp /= 3;
|
||||||
$trialProp = $trialProp**3;
|
$trialProp = $trialProp**8;
|
||||||
|
|
||||||
if(!Util::randBool($trialProp)){
|
if(!Util::randBool($trialProp)){
|
||||||
return null;
|
return null;
|
||||||
@@ -3252,38 +3252,6 @@ class GeneralAI
|
|||||||
return $this->devRate;
|
return $this->devRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function findWarTarget(): ?int
|
|
||||||
{
|
|
||||||
$nation = $this->nation;
|
|
||||||
$nationID = $nation['nation'];
|
|
||||||
|
|
||||||
if($this->frontCities){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$devRate = $this->calcNationDevelopedRate();
|
|
||||||
if (($devRate['pop'] + $devRate['all']) / 2 < 0.8) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$nations = [];
|
|
||||||
foreach(getAllNationStaticInfo() as $destNation){
|
|
||||||
if($destNation['level'] == 0){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$destNationID = $destNation['nation'];
|
|
||||||
$destNationPower = $destNation['power'];
|
|
||||||
if (!isNeighbor($nationID, $destNationID)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$nations[$destNationID] = 1 / sqrt($destNationPower + 1);
|
|
||||||
}
|
|
||||||
if (!$nations) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return Util::choiceRandomUsingWeight($nations);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function chooseNonLordPromotion(){
|
protected function chooseNonLordPromotion(){
|
||||||
//빈자리는 아무나 채움
|
//빈자리는 아무나 채움
|
||||||
$db = DB::db();
|
$db = DB::db();
|
||||||
|
|||||||
Reference in New Issue
Block a user