VAL2를 VAL_max로 변경
This commit is contained in:
@@ -337,12 +337,12 @@ class CityConstBase{
|
||||
'city'=>$city->id,
|
||||
'name'=>$city->name,
|
||||
'level'=>$city->level,
|
||||
'pop2'=>$city->population,
|
||||
'agri2'=>$city->agriculture,
|
||||
'comm2'=>$city->commerce,
|
||||
'secu2'=>$city->security,
|
||||
'def2'=>$city->defence,
|
||||
'wall2'=>$city->wall,
|
||||
'pop_max'=>$city->population,
|
||||
'agri_max'=>$city->agriculture,
|
||||
'comm_max'=>$city->commerce,
|
||||
'secu_max'=>$city->security,
|
||||
'def_max'=>$city->defence,
|
||||
'wall_max'=>$city->wall,
|
||||
'region'=>$city->region
|
||||
] + $initValue + static::$buildInitCommon;
|
||||
}, array_values(static::$constID));
|
||||
|
||||
@@ -149,7 +149,7 @@ class che_강행 extends Command\GeneralCommand{
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$general->increaseVarWithLimit('gold', -$reqGold, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
$general->applyDB($db);
|
||||
|
||||
@@ -77,13 +77,13 @@ class che_견문 extends Command\GeneralCommand{
|
||||
$exp += 60;
|
||||
}
|
||||
if($type & SightseeingMessage::IncLeadership){
|
||||
$general->increaseVar('leadership2', 2);
|
||||
$general->increaseVar('leadership_max', 2);
|
||||
}
|
||||
if($type & SightseeingMessage::IncStrength){
|
||||
$general->increaseVar('strength2', 2);
|
||||
$general->increaseVar('strength_max', 2);
|
||||
}
|
||||
if($type & SightseeingMessage::IncIntel){
|
||||
$general->increaseVar('intel2', 2);
|
||||
$general->increaseVar('intel_max', 2);
|
||||
}
|
||||
if($type & SightseeingMessage::IncGold){
|
||||
$general->increaseVar('gold', 300);
|
||||
|
||||
@@ -158,9 +158,9 @@ class che_군량매매 extends Command\GeneralCommand{
|
||||
$ded = $general->onCalcStat($general, 'dedication', $ded);
|
||||
|
||||
$incStat = Util::choiceRandomUsingWeight([
|
||||
'leadership2'=>$general->getLeadership(false, false, false, false),
|
||||
'strength2'=>$general->getStrength(false, false, false, false),
|
||||
'intel2'=>$general->getIntel(false, false, false, false)
|
||||
'leadership_max'=>$general->getLeadership(false, false, false, false),
|
||||
'strength_max'=>$general->getStrength(false, false, false, false),
|
||||
'intel_max'=>$general->getIntel(false, false, false, false)
|
||||
]);
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
|
||||
@@ -102,7 +102,7 @@ class che_귀환 extends Command\GeneralCommand{
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
$general->applyDB($db);
|
||||
|
||||
@@ -126,7 +126,7 @@ class che_기술연구 extends che_상업투자{
|
||||
$general->increaseVarWithLimit('gold', -$this->reqGold, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar(static::$statKey.'2', 1);
|
||||
$general->increaseVar(static::$statKey.'_max', 1);
|
||||
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
|
||||
@@ -116,9 +116,9 @@ class che_단련 extends Command\GeneralCommand{
|
||||
$general->addDex($general->getCrewTypeObj(), $score, false);
|
||||
|
||||
$incStat = Util::choiceRandomUsingWeight([
|
||||
'leadership2'=>$general->getLeadership(false, false, false, false),
|
||||
'strength2'=>$general->getStrength(false, false, false, false),
|
||||
'intel2'=>$general->getIntel(false, false, false, false)
|
||||
'leadership_max'=>$general->getLeadership(false, false, false, false),
|
||||
'strength_max'=>$general->getStrength(false, false, false, false),
|
||||
'intel_max'=>$general->getIntel(false, false, false, false)
|
||||
]);
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ class che_등용 extends Command\GeneralCommand{
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->increaseVarWithLimit('gold', -$reqGold, 0);
|
||||
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
|
||||
@@ -111,9 +111,9 @@ class che_물자조달 extends Command\GeneralCommand{
|
||||
$ded = $general->onCalcStat($general, 'dedication', $ded);
|
||||
|
||||
$incStat = Util::choiceRandomUsingWeight([
|
||||
'leadership2'=>$general->getLeadership(false, false, false, false),
|
||||
'strength2'=>$general->getStrength(false, false, false, false),
|
||||
'intel2'=>$general->getIntel(false, false, false, false)
|
||||
'leadership_max'=>$general->getLeadership(false, false, false, false),
|
||||
'strength_max'=>$general->getStrength(false, false, false, false),
|
||||
'intel_max'=>$general->getIntel(false, false, false, false)
|
||||
]);
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
|
||||
@@ -100,7 +100,7 @@ class che_사기진작 extends Command\GeneralCommand{
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -190,7 +190,7 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
static::$cityKey => Util::valueFit(
|
||||
$this->city[static::$cityKey] + $score,
|
||||
0,
|
||||
$this->city[static::$cityKey.'2']
|
||||
$this->city[static::$cityKey.'_max']
|
||||
)
|
||||
];
|
||||
$db->update('city', $cityUpdated, 'city=%i', $general->getVar('city'));
|
||||
@@ -198,7 +198,7 @@ class che_상업투자 extends Command\GeneralCommand{
|
||||
$general->increaseVarWithLimit('gold', -$this->reqGold, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar(static::$statKey.'2', 1);
|
||||
$general->increaseVar(static::$statKey.'_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -147,7 +147,7 @@ class che_이동 extends Command\GeneralCommand{
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$general->increaseVarWithLimit('gold', -$reqGold, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
$general->applyDB($db);
|
||||
|
||||
@@ -129,9 +129,9 @@ class che_인재탐색 extends Command\GeneralCommand{
|
||||
$logger->pushGeneralActionLog("인재를 찾을 수 없었습니다. <1>$date</>");
|
||||
|
||||
$incStat = Util::choiceRandomUsingWeight([
|
||||
'leadership2'=>$general->getLeadership(false, false, false, false),
|
||||
'strength2'=>$general->getStrength(false, false, false, false),
|
||||
'intel2'=>$general->getIntel(false, false, false, false)
|
||||
'leadership_max'=>$general->getLeadership(false, false, false, false),
|
||||
'strength_max'=>$general->getStrength(false, false, false, false),
|
||||
'intel_max'=>$general->getIntel(false, false, false, false)
|
||||
]);
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
@@ -290,9 +290,9 @@ class che_인재탐색 extends Command\GeneralCommand{
|
||||
$logger->pushGeneralHistoryLog("<Y>$npcName</>{$josaRa}는 <C>인재</>를 {$scoutType}");
|
||||
|
||||
$incStat = Util::choiceRandomUsingWeight([
|
||||
'leadership2'=>$general->getLeadership(false, false, false, false),
|
||||
'strength2'=>$general->getStrength(false, false, false, false),
|
||||
'intel2'=>$general->getIntel(false, false, false, false)
|
||||
'leadership_max'=>$general->getLeadership(false, false, false, false),
|
||||
'strength_max'=>$general->getStrength(false, false, false, false),
|
||||
'intel_max'=>$general->getIntel(false, false, false, false)
|
||||
]);
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ class che_전투태세 extends Command\GeneralCommand{
|
||||
|
||||
$general->addDex($general->getCrewTypeObj(), $crew / 100 * 3, false);
|
||||
|
||||
$general->increaseVar('leadership2', 3);
|
||||
$general->increaseVar('leadership_max', 3);
|
||||
$general->setResultTurn($turnResult);
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -175,7 +175,7 @@ class che_정착장려 extends Command\GeneralCommand{
|
||||
static::$cityKey => Util::valueFit(
|
||||
$this->city[static::$cityKey] + $score,
|
||||
0,
|
||||
$this->city[static::$cityKey.'2']
|
||||
$this->city[static::$cityKey.'_max']
|
||||
)
|
||||
];
|
||||
$db->update('city', $cityUpdated, 'city=%i', $general->getVar('city'));
|
||||
@@ -183,7 +183,7 @@ class che_정착장려 extends Command\GeneralCommand{
|
||||
$general->increaseVarWithLimit('rice', -$this->reqRice, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar(static::$statKey.'2', 1);
|
||||
$general->increaseVar(static::$statKey.'_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -181,7 +181,7 @@ class che_주민선정 extends Command\GeneralCommand{
|
||||
$general->increaseVarWithLimit('rice', -$this->reqRice, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar(static::$statKey.'2', 1);
|
||||
$general->increaseVar(static::$statKey.'_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -153,7 +153,7 @@ class che_증여 extends Command\GeneralCommand{
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
|
||||
@@ -106,7 +106,7 @@ class che_집합 extends Command\GeneralCommand{
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -207,7 +207,7 @@ class che_징병 extends Command\GeneralCommand{
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVarWithLimit('gold', -$reqGold, 0);
|
||||
$general->increaseVarWithLimit('rice', -$reqRice, 0);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -195,7 +195,7 @@ class che_첩보 extends Command\GeneralCommand{
|
||||
$general->increaseVarWithLimit('rice', -$reqRice, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
$general->applyDB($db);
|
||||
|
||||
@@ -133,7 +133,7 @@ class che_헌납 extends Command\GeneralCommand{
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
|
||||
@@ -98,7 +98,7 @@ class che_화계 extends Command\GeneralCommand{
|
||||
|
||||
$prob = $maxGenScore / GameConst::$sabotageProbCoefByStat;
|
||||
|
||||
$prob += $destCity['secu'] / $destCity['secu2'] / 5; //최대 20%p
|
||||
$prob += $destCity['secu'] / $destCity['secu_max'] / 5; //최대 20%p
|
||||
$prob += $destCity['supply'] ? 0.1 : 0;
|
||||
return $prob;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ class che_화계 extends Command\GeneralCommand{
|
||||
$general->increaseVarWithLimit('rice', -$reqRice, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar($statType.'2', 1);
|
||||
$general->increaseVar($statType.'_max', 1);
|
||||
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
@@ -310,7 +310,7 @@ class che_화계 extends Command\GeneralCommand{
|
||||
$general->increaseVarWithLimit('rice', -$reqRice, 0);
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar($statType.'2', 1);
|
||||
$general->increaseVar($statType.'_max', 1);
|
||||
$general->increaseVar('firenum', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
|
||||
@@ -104,7 +104,7 @@ class che_훈련 extends Command\GeneralCommand{
|
||||
|
||||
$general->increaseVar('experience', $exp);
|
||||
$general->increaseVar('dedication', $ded);
|
||||
$general->increaseVar('leadership2', 1);
|
||||
$general->increaseVar('leadership_max', 1);
|
||||
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
|
||||
$general->checkStatChange();
|
||||
tryUniqueItemLottery($general);
|
||||
|
||||
@@ -148,8 +148,8 @@ class che_백성동원 extends Command\NationCommand{
|
||||
}
|
||||
|
||||
$db->update('city', [
|
||||
'def' => $db->sqleval('GREATEST(def2 * 0.8, def)'),
|
||||
'wall' => $db->sqleval('GREATEST(wall2 * 0.8, wall)'),
|
||||
'def' => $db->sqleval('GREATEST(def_max * 0.8, def)'),
|
||||
'wall' => $db->sqleval('GREATEST(wall_max * 0.8, wall)'),
|
||||
], 'city=%i', $destCityID);
|
||||
|
||||
$josaYiNation = JosaUtil::pick($nationName, '이');
|
||||
|
||||
@@ -17,7 +17,7 @@ class RemainCityCapacity extends Constraint{
|
||||
}
|
||||
|
||||
[$this->key, $this->keyNick] = $this->arg;
|
||||
$this->maxKey = $this->key.'2';
|
||||
$this->maxKey = $this->key.'_max';
|
||||
|
||||
if(!key_exists($this->key, $this->city)){
|
||||
if(!$throwExeception){return false; }
|
||||
|
||||
@@ -20,7 +20,7 @@ class ReqCityCapacity extends Constraint{
|
||||
|
||||
[$this->key, $this->keyNick, $this->reqVal] = $this->arg;
|
||||
|
||||
$this->maxKey = $this->key.'2';
|
||||
$this->maxKey = $this->key.'_max';
|
||||
|
||||
if(!key_exists($this->key, $this->city)){
|
||||
if(!$throwExeception){return false; }
|
||||
|
||||
@@ -38,7 +38,7 @@ class ReqDestNationValue extends Constraint{
|
||||
|
||||
$this->comp = $comp;
|
||||
|
||||
$this->maxKey = $this->key.'2';
|
||||
$this->maxKey = $this->key.'_max';
|
||||
|
||||
if(!key_exists($this->key, $this->destNation)){
|
||||
if(!$throwExeception){return false; }
|
||||
|
||||
@@ -38,7 +38,7 @@ class ReqGeneralValue extends Constraint{
|
||||
|
||||
$this->comp = $comp;
|
||||
|
||||
$this->maxKey = $this->key.'2';
|
||||
$this->maxKey = $this->key.'_max';
|
||||
|
||||
if(!key_exists($this->key, $this->general)){
|
||||
if(!$throwExeception){return false; }
|
||||
|
||||
@@ -38,7 +38,7 @@ class ReqNationValue extends Constraint{
|
||||
|
||||
$this->comp = $comp;
|
||||
|
||||
$this->maxKey = $this->key.'2';
|
||||
$this->maxKey = $this->key.'_max';
|
||||
|
||||
if(!key_exists($this->key, $this->nation)){
|
||||
if(!$throwExeception){return false; }
|
||||
|
||||
@@ -92,7 +92,7 @@ class ChangeCity extends \sammo\Event\Action{
|
||||
}
|
||||
|
||||
private function genSQLGeneric($key, $value){
|
||||
$keyMax = $key.'2'; //comm, comm2
|
||||
$keyMax = $key.'_max'; //comm, comm_max
|
||||
|
||||
if(is_float($value)){
|
||||
if($value < 0){
|
||||
|
||||
@@ -478,7 +478,7 @@ class General implements iAction{
|
||||
$result = false;
|
||||
|
||||
foreach($table as [$statNickName, $statName]){
|
||||
$statExpName = $statName.'2';
|
||||
$statExpName = $statName.'_max';
|
||||
|
||||
if($this->getVar($statExpName) < 0){
|
||||
$logger->pushGeneralActionLog("<R>{$statNickName}</>이 <C>1</> 떨어졌습니다!", ActionLogger::PLAIN);
|
||||
@@ -673,7 +673,7 @@ class General implements iAction{
|
||||
];
|
||||
$fullColumn = [
|
||||
'no', 'name', 'name2', 'picture', 'imgsvr', 'nation', 'city', 'troop', 'injury', 'affinity',
|
||||
'leadership', 'leadership2', 'strength', 'strength2', 'intel', 'intel2', 'weapon', 'book', 'horse', 'item',
|
||||
'leadership', 'leadership_max', 'strength', 'strength_max', 'intel', 'intel_max', 'weapon', 'book', 'horse', 'item',
|
||||
'experience', 'dedication', 'level', 'gold', 'rice', 'crew', 'crewtype', 'train', 'atmos', 'turntime',
|
||||
'makelimit', 'killturn', 'block', 'dedlevel', 'explevel', 'age', 'startage', 'belong',
|
||||
'personal', 'special', 'special2', 'defence_train', 'tnmt', 'npc', 'npc_org', 'deadyear', 'npcmsg',
|
||||
|
||||
+10
-10
@@ -186,12 +186,12 @@ class GeneralAI{
|
||||
|
||||
$develRate = [
|
||||
'trust'=>$city['trust'],
|
||||
'pop'=>$city['pop']/$city['pop2'],
|
||||
'agri'=>$city['agri']/$city['agri2'],
|
||||
'comm'=>$city['comm']/$city['comm2'],
|
||||
'secu'=>$city['secu']/$city['secu2'],
|
||||
'def'=>$city['def']/$city['def2'],
|
||||
'wall'=>$city['wall']/$city['wall2'],
|
||||
'pop'=>$city['pop']/$city['pop_max'],
|
||||
'agri'=>$city['agri']/$city['agri_max'],
|
||||
'comm'=>$city['comm']/$city['comm_max'],
|
||||
'secu'=>$city['secu']/$city['secu_max'],
|
||||
'def'=>$city['def']/$city['def_max'],
|
||||
'wall'=>$city['wall']/$city['wall_max'],
|
||||
];
|
||||
|
||||
// 우선 선정
|
||||
@@ -535,7 +535,7 @@ class GeneralAI{
|
||||
$dev =
|
||||
($nationCity['agri'] + $nationCity['comm'] + $nationCity['secu'] + $nationCity['def'] + $nationCity['wall'])/
|
||||
($nationCity['agri'] + $nationCity['comm'] + $nationCity['secu'] + $nationCity['def'] + $nationCity['wall']);
|
||||
$dev += $nationCity['pop'] / $nationCity['pop2'];
|
||||
$dev += $nationCity['pop'] / $nationCity['pop_max'];
|
||||
$dev /= 50;
|
||||
|
||||
$nationCity['dev'] = $dev;
|
||||
@@ -978,7 +978,7 @@ class GeneralAI{
|
||||
if($targetCity['pop'] < 33000 + $nationGeneral->leadership){
|
||||
continue;
|
||||
}
|
||||
if (Util::randBool($targetCity['pop'] / $targetCity['pop2'])) {
|
||||
if (Util::randBool($targetCity['pop'] / $targetCity['pop_max'])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1316,7 +1316,7 @@ class GeneralAI{
|
||||
$developTurn = $this->chooseDevelopTurn($cityFull);
|
||||
|
||||
if($cityFull && Util::randBool(0.2)){
|
||||
$moveRawCities = $db->query('SELECT city,front,(pop/10+agri+comm+secu+def+wall)/(pop2/10+agri2+comm2+secu2+def2+wall2)*100 as dev, officer3 FROM city WHERE nation=%i', $nationID);
|
||||
$moveRawCities = $db->query('SELECT city,front,(pop/10+agri+comm+secu+def+wall)/(pop_max/10+agri_max+comm_max+secu_max+def_max+wall_max)*100 as dev, officer3 FROM city WHERE nation=%i', $nationID);
|
||||
|
||||
$moveCities = [];
|
||||
foreach($moveRawCities as $moveCity){
|
||||
@@ -1671,7 +1671,7 @@ class GeneralAI{
|
||||
$nationID = $this->nation['nation'];
|
||||
|
||||
$this->devRate = $db->queryFirstRow(
|
||||
'SELECT sum(pop)/sum(pop2) as pop_p,(sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(agri2)+sum(comm2)+sum(secu2)+sum(def2)+sum(wall2)) as all_p from city where nation=%i',
|
||||
'SELECT sum(pop)/sum(pop_max) as pop_p,(sum(agri)+sum(comm)+sum(secu)+sum(def)+sum(wall))/(sum(agri_max)+sum(comm_max)+sum(secu_max)+sum(def_max)+sum(wall_max)) as all_p from city where nation=%i',
|
||||
$nationID
|
||||
);
|
||||
return $this->devRate;
|
||||
|
||||
@@ -122,11 +122,11 @@ class WarUnitGeneral extends WarUnit{
|
||||
function addStatExp(int $value = 1){
|
||||
$general = $this->general;
|
||||
if($this->crewType->armType == GameUnitConst::T_WIZARD) { // 귀병
|
||||
$general->increaseVar('intel2', $value);
|
||||
$general->increaseVar('intel_max', $value);
|
||||
} elseif($this->crewType->armType == GameUnitConst::T_SIEGE) { // 차병
|
||||
$general->increaseVar('leadership2', $value);
|
||||
$general->increaseVar('leadership_max', $value);
|
||||
} else {
|
||||
$general->increaseVar('strength2', $value);
|
||||
$general->increaseVar('strength_max', $value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user