leader->leadership, power->strength

This commit is contained in:
2019-10-04 18:07:42 +09:00
parent 2ff74a2b68
commit 4c3cc8547c
101 changed files with 770 additions and 769 deletions
@@ -15,7 +15,7 @@ class che_귀모 implements iAction{
static $selectWeight = 2.5;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_STRENGTH,
SpecialityConst::STAT_INTEL
];
@@ -14,7 +14,7 @@ class che_수비 implements iAction{
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_POWER
SpecialityConst::STAT_STRENGTH
];
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
@@ -14,7 +14,7 @@ class che_축성 implements iAction{
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_POWER
SpecialityConst::STAT_STRENGTH
];
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
@@ -14,7 +14,7 @@ class che_통찰 implements iAction{
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_POWER
SpecialityConst::STAT_STRENGTH
];
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
+1 -1
View File
@@ -19,7 +19,7 @@ class che_격노 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_STRENGTH,
SpecialityConst::STAT_INTEL
];
+1 -1
View File
@@ -19,7 +19,7 @@ class che_견고 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER
SpecialityConst::STAT_STRENGTH
];
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+1 -1
View File
@@ -18,7 +18,7 @@ class che_공성 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_SIEGE,
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_SIEGE,
SpecialityConst::STAT_STRENGTH | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_SIEGE,
SpecialityConst::STAT_INTEL | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_SIEGE,
];
+1 -1
View File
@@ -17,7 +17,7 @@ class che_궁병 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_ARCHER,
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_ARCHER
SpecialityConst::STAT_STRENGTH | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_ARCHER
];
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
+1 -1
View File
@@ -17,7 +17,7 @@ class che_기병 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_CAVALRY,
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_CAVALRY
SpecialityConst::STAT_STRENGTH | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_CAVALRY
];
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
+1 -1
View File
@@ -18,7 +18,7 @@ class che_돌격 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER
SpecialityConst::STAT_STRENGTH
];
public function onCalcStat(General $general, string $statName, $value, $aux=null){
+1 -1
View File
@@ -16,7 +16,7 @@ class che_무쌍 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER
SpecialityConst::STAT_STRENGTH
];
public function onCalcStat(General $general, string $statName, $value, $aux=null){
+1 -1
View File
@@ -17,7 +17,7 @@ class che_보병 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_FOOTMAN,
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_FOOTMAN
SpecialityConst::STAT_STRENGTH | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_FOOTMAN
];
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
+1 -1
View File
@@ -19,7 +19,7 @@ class che_위압 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER
SpecialityConst::STAT_STRENGTH
];
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
+1 -1
View File
@@ -22,7 +22,7 @@ class che_의술 implements iAction{
static $selectWeight = 2;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_STRENGTH,
SpecialityConst::STAT_INTEL
];
+1 -1
View File
@@ -19,7 +19,7 @@ class che_저격 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_STRENGTH,
SpecialityConst::STAT_INTEL
];
+1 -1
View File
@@ -16,7 +16,7 @@ class che_징병 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_STRENGTH,
SpecialityConst::STAT_INTEL
];
+1 -1
View File
@@ -16,7 +16,7 @@ class che_척사 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_STRENGTH,
SpecialityConst::STAT_INTEL
];
+1 -1
View File
@@ -16,7 +16,7 @@ class che_필살 implements iAction{
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_STRENGTH,
SpecialityConst::STAT_INTEL
];
+4 -3
View File
@@ -6,7 +6,7 @@ use \sammo\General;
class BaseStatItem extends BaseItem{
protected $statNick = '통솔';
protected $statType = 'leader';
protected $statType = 'leadership';
protected $statValue = 1;
protected $cost = 1000;
protected $rawName = '노기';
@@ -14,14 +14,15 @@ class BaseStatItem extends BaseItem{
protected $buyable = true;
protected const ITEM_TYPE = [
'명마'=>['통솔', 'leader'],
'무기'=>['무력', 'power'],
'명마'=>['통솔', 'leadership'],
'무기'=>['무력', 'strength'],
'서적'=>['지력', 'intel']
];
public function __construct(){
$nameTokens = explode('_', static::class);
$this->statValue = (int)$nameTokens[-1];
assert(is_numeric($this->statValue));
$this->rawName = $nameTokens[-2];
[$this->statNick, $this->statType] = static::ITEM_TYPE[$nameTokens[-3]];
+1 -1
View File
@@ -127,7 +127,7 @@ class che_강행 extends Command\GeneralCommand{
[$reqGold, $reqRice] = $this->getCost();
$general->increaseVarWithLimit('gold', -$reqGold, 0);
$general->increaseVar('experience', $exp);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
$general->applyDB($db);
+3 -3
View File
@@ -72,10 +72,10 @@ class che_견문 extends Command\GeneralCommand{
$exp += 60;
}
if($type & SightseeingMessage::IncLeadership){
$general->increaseVar('leader2', 2);
$general->increaseVar('leadership2', 2);
}
if($type & SightseeingMessage::IncPower){
$general->increaseVar('power2', 2);
if($type & SightseeingMessage::IncStrength){
$general->increaseVar('strength2', 2);
}
if($type & SightseeingMessage::IncIntel){
$general->increaseVar('intel2', 2);
@@ -161,8 +161,8 @@ class che_군량매매 extends Command\GeneralCommand{
$ded = $general->onCalcStat($general, 'dedication', $ded);
$incStat = Util::choiceRandomUsingWeight([
'leader2'=>$general->getLeadership(false, false, false, false),
'power2'=>$general->getPower(false, false, false, false),
'leadership2'=>$general->getLeadership(false, false, false, false),
'strength2'=>$general->getStrength(false, false, false, false),
'intel2'=>$general->getIntel(false, false, false, false)
]);
+1 -1
View File
@@ -91,7 +91,7 @@ class che_귀환 extends Command\GeneralCommand{
$general->increaseVar('experience', $exp);
$general->increaseVar('dedication', $ded);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
$general->applyDB($db);
+2 -2
View File
@@ -101,8 +101,8 @@ class che_단련 extends Command\GeneralCommand{
$general->addDex($general->getCrewTypeObj(), $score, false);
$incStat = Util::choiceRandomUsingWeight([
'leader2'=>$general->getLeadership(false, false, false, false),
'power2'=>$general->getPower(false, false, false, false),
'leadership2'=>$general->getLeadership(false, false, false, false),
'strength2'=>$general->getStrength(false, false, false, false),
'intel2'=>$general->getIntel(false, false, false, false)
]);
[$reqGold, $reqRice] = $this->getCost();
@@ -73,7 +73,7 @@ class che_물자조달 extends Command\GeneralCommand{
['쌀', 'rice']
]);
$score = $general->getLeadership() + $general->getPower() + $general->getIntel();
$score = $general->getLeadership() + $general->getStrength() + $general->getIntel();
$score *= getDomesticExpLevelBonus($general->getVar('explevel'));
$score *= Util::randRange(0.8, 1.2);
@@ -107,8 +107,8 @@ class che_물자조달 extends Command\GeneralCommand{
$ded = $general->onCalcStat($general, 'dedication', $ded);
$incStat = Util::choiceRandomUsingWeight([
'leader2'=>$general->getLeadership(false, false, false, false),
'power2'=>$general->getPower(false, false, false, false),
'leadership2'=>$general->getLeadership(false, false, false, false),
'strength2'=>$general->getStrength(false, false, false, false),
'intel2'=>$general->getIntel(false, false, false, false)
]);
@@ -93,7 +93,7 @@ class che_사기진작 extends Command\GeneralCommand{
$general->increaseVar('experience', $exp);
$general->increaseVar('dedication', $ded);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
tryUniqueItemLottery($general);
@@ -32,8 +32,8 @@ class che_상업투자 extends Command\GeneralCommand{
public function getCommandDetailTitle():string{
$name = $this->getName();
$statTypeBase = [
'leader'=>'통솔경험',
'power'=>'무력경험',
'leadership'=>'통솔경험',
'strength'=>'무력경험',
'intel'=>'지력경험',
];
$statType = $statTypeBase[static::$statKey];
@@ -100,10 +100,10 @@ class che_상업투자 extends Command\GeneralCommand{
if(static::$statKey == 'intel'){
$score = $general->getIntel(true, true, true, false);
}
else if(static::$statKey == 'power'){
$score = $general->getPower(true, true, true, false);
else if(static::$statKey == 'strength'){
$score = $general->getStrength(true, true, true, false);
}
else if(static::$statKey == 'leader'){
else if(static::$statKey == 'leadership'){
$score = $general->getLeadership(true, true, true, false);
}
else{
+1 -1
View File
@@ -12,7 +12,7 @@ use \sammo\{
class che_선동 extends che_화계{
static protected $actionName = '선동';
static protected $statType = 'leader';
static protected $statType = 'leadership';
static protected $injuryGeneral = true;
protected function affectDestCity(int $injuryCount){
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
class che_성벽보수 extends che_상업투자{
static protected $cityKey = 'wall';
static protected $statKey = 'power';
static protected $statKey = 'strength';
static protected $actionKey = '성벽';
static protected $actionName = '성벽 보수';
static protected $debuffFront = 0.25;
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
class che_수비강화 extends che_상업투자{
static protected $cityKey = 'def';
static protected $statKey = 'power';
static protected $statKey = 'strength';
static protected $actionKey = '수비';
static protected $actionName = '수비 강화';
static protected $debuffFront = 0.5;
+1 -1
View File
@@ -125,7 +125,7 @@ class che_이동 extends Command\GeneralCommand{
[$reqGold, $reqRice] = $this->getCost();
$general->increaseVarWithLimit('gold', -$reqGold, 0);
$general->increaseVar('experience', $exp);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
$general->applyDB($db);
+23 -23
View File
@@ -98,8 +98,8 @@ class che_인재탐색 extends Command\GeneralCommand{
$logger->pushGeneralActionLog("인재를 찾을 수 없었습니다. <1>$date</>");
$incStat = Util::choiceRandomUsingWeight([
'leader2'=>$general->getLeadership(false, false, false, false),
'power2'=>$general->getPower(false, false, false, false),
'leadership2'=>$general->getLeadership(false, false, false, false),
'strength2'=>$general->getStrength(false, false, false, false),
'intel2'=>$general->getIntel(false, false, false, false)
]);
[$reqGold, $reqRice] = $this->getCost();
@@ -148,45 +148,45 @@ class che_인재탐색 extends Command\GeneralCommand{
}
$avgGen = $db->queryFirstRow(
'SELECT max(leader+power+intel) as lpi, avg(dedication) as ded,avg(experience) as exp,
'SELECT max(leadership+strength+intel) as stat_sum, avg(dedication) as ded,avg(experience) as exp,
avg(dex0) as dex0, avg(dex10) as dex10, avg(dex20) as dex20, avg(dex30) as dex30, avg(dex40) as dex40
from general where nation=%i',
$nationID
);
if($pickType == '무'){
$leader = $subStat;
$power = $mainStat;
$leadership = $subStat;
$strength = $mainStat;
$intel = $otherStat;
}
else if($pickType == '지'){
$leader = $subStat;
$power = $otherStat;
$leadership = $subStat;
$strength = $otherStat;
$intel = $mainStat;
}
else{
$leader = $otherStat;
$power = $subStat;
$leadership = $otherStat;
$strength = $subStat;
$intel = $mainStat;
}
// 국내 최고능치 기준으로 랜덤성 스케일링
$maxLPI = $avgGen['lpi'];
$maxLPI = $avgGen['stat_sum'];
if($maxLPI > 210) {
$leader *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.6, 0.9);
$power *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.6, 0.9);
$leadership *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.6, 0.9);
$strength *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.6, 0.9);
$intel *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.6, 0.9);
} elseif($maxLPI > 180) {
$leader *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.75, 0.95);
$power *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.75, 0.95);
$intel *= $avgGen['lpi'] / GameConst::$defaultStatTotal * Util::randRange(0.75, 0.95);
$leadership *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.75, 0.95);
$strength *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.75, 0.95);
$intel *= $avgGen['stat_sum'] / GameConst::$defaultStatTotal * Util::randRange(0.75, 0.95);
} else {
$leader *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.9, 1);
$power *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.9, 1);
$leadership *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.9, 1);
$strength *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.9, 1);
$intel *= $maxLPI / GameConst::$defaultStatTotal * Util::randRange(0.9, 1);
}
$leader = Util::round($leader);
$power = Util::round($power);
$leadership = Util::round($leadership);
$strength = Util::round($strength);
$intel = Util::round($intel);
$isOurNation = $this->nation['scout'] == 0;
@@ -199,8 +199,8 @@ class che_인재탐색 extends Command\GeneralCommand{
null,
$isOurNation?$nationID:0,
$general->getCityID(),
$leader,
$power,
$leadership,
$strength,
$intel,
$isOurNation?1:0,
$age,
@@ -245,8 +245,8 @@ class che_인재탐색 extends Command\GeneralCommand{
$logger->pushGeneralHistoryLog("<Y>$npcName</>{$josaRa}는 <C>인재</>를 {$scoutType}");
$incStat = Util::choiceRandomUsingWeight([
'leader2'=>$general->getLeadership(false, false, false, false),
'power2'=>$general->getPower(false, false, false, false),
'leadership2'=>$general->getLeadership(false, false, false, false),
'strength2'=>$general->getStrength(false, false, false, false),
'intel2'=>$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('leader2', 3);
$general->increaseVar('leadership2', 3);
$general->setResultTurn($turnResult);
$general->checkStatChange();
tryUniqueItemLottery($general);
@@ -24,7 +24,7 @@ use \sammo\Constraint\ConstraintHelper;
class che_정착장려 extends Command\GeneralCommand{
static protected $cityKey = 'pop';
static protected $statKey = 'leader';
static protected $statKey = 'leadership';
static protected $actionKey = '인구';
static protected $actionName = '정착 장려';
@@ -74,7 +74,7 @@ class che_정착장려 extends Command\GeneralCommand{
protected function calcBaseScore():float{
$general = $this->generalObj;
if(static::$statKey == 'leader'){
if(static::$statKey == 'leadership'){
$score = $general->getLeadership(true, true, true, false);
}
else{
@@ -24,7 +24,7 @@ use \sammo\Constraint\ConstraintHelper;
class che_주민선정 extends Command\GeneralCommand{
static protected $cityKey = 'trust';
static protected $statKey = 'leader';
static protected $statKey = 'leadership';
static protected $actionKey = '민심';
static protected $actionName = '주민 선정';
@@ -74,7 +74,7 @@ class che_주민선정 extends Command\GeneralCommand{
protected function calcBaseScore():float{
$general = $this->generalObj;
if(static::$statKey == 'leader'){
if(static::$statKey == 'leadership'){
$score = $general->getLeadership(true, true, true, false);
}
else{
+1 -1
View File
@@ -140,7 +140,7 @@ class che_증여 extends Command\GeneralCommand{
$general->increaseVar('experience', $exp);
$general->increaseVar('dedication', $ded);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
+1 -1
View File
@@ -101,7 +101,7 @@ class che_집합 extends Command\GeneralCommand{
$general->increaseVar('experience', $exp);
$general->increaseVar('dedication', $ded);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
tryUniqueItemLottery($general);
+1 -1
View File
@@ -190,7 +190,7 @@ class che_징병 extends Command\GeneralCommand{
$general->increaseVar('dedication', $ded);
$general->increaseVarWithLimit('gold', -$reqGold, 0);
$general->increaseVarWithLimit('rice', -$reqRice, 0);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
tryUniqueItemLottery($general);
+1 -1
View File
@@ -175,7 +175,7 @@ class che_첩보 extends Command\GeneralCommand{
$general->increaseVarWithLimit('rice', -$reqRice, 0);
$general->increaseVar('experience', $exp);
$general->increaseVar('dedication', $ded);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
$general->applyDB($db);
@@ -3,7 +3,7 @@ namespace sammo\Command\General;
class che_치안강화 extends che_상업투자{
static protected $cityKey = 'secu';
static protected $statKey = 'power';
static protected $statKey = 'strength';
static protected $actionKey = '치안';
static protected $actionName = '치안 강화';
static protected $debuffFront = 1;
+1 -1
View File
@@ -12,7 +12,7 @@ use \sammo\{
class che_탈취 extends che_화계{
static protected $actionName = '탈취';
static protected $statType = 'power';
static protected $statType = 'strength';
static protected $injuryGeneral = false;
protected function affectDestCity(int $injuryCount){
+1 -1
View File
@@ -12,7 +12,7 @@ use \sammo\{
class che_파괴 extends che_화계{
static protected $actionName = '파괴';
static protected $statType = 'power';
static protected $statType = 'strength';
static protected $injuryGeneral = true;
protected function affectDestCity(int $injuryCount){
+1 -1
View File
@@ -121,7 +121,7 @@ class che_헌납 extends Command\GeneralCommand{
$general->increaseVar('experience', $exp);
$general->increaseVar('dedication', $ded);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
+7 -7
View File
@@ -49,11 +49,11 @@ class che_화계 extends Command\GeneralCommand{
$general = $this->generalObj;
$nation = $this->nation;
if($statType === 'leader'){
if($statType === 'leadership'){
$genScore = $general->getLeadership();
}
else if($statType === 'power'){
$genScore = $general->getPower();
else if($statType === 'strength'){
$genScore = $general->getStrength();
}
else if($statType === 'intel'){
$genScore = $general->getIntel();
@@ -80,11 +80,11 @@ class che_화계 extends Command\GeneralCommand{
continue;
}
if($statType === 'leader'){
if($statType === 'leadership'){
$genScore = $destGeneral->getLeadership();
}
else if($statType === 'power'){
$genScore = $destGeneral->getPower();
else if($statType === 'strength'){
$genScore = $destGeneral->getStrength();
}
else if($statType === 'intel'){
$genScore = $destGeneral->getIntel();
@@ -218,7 +218,7 @@ class che_화계 extends Command\GeneralCommand{
[$year, $month] = [$env['year'], $env['month']];
foreach($db->query(
'SELECT `no`,name,city,nation,level,leader,horse,power,weap,intel,book,item,last_turn,injury,special,special2 FROM general WHERE city = %i',
'SELECT `no`,name,city,nation,level,leadership,horse,strength,weap,intel,book,item,last_turn,injury,special,special2 FROM general WHERE city = %i',
$destCityID,
$destNationID
) as $rawDestCityGeneral){
+1 -1
View File
@@ -89,7 +89,7 @@ class che_훈련 extends Command\GeneralCommand{
$general->increaseVar('experience', $exp);
$general->increaseVar('dedication', $ded);
$general->increaseVar('leader2', 1);
$general->increaseVar('leadership2', 1);
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
tryUniqueItemLottery($general);
@@ -20,7 +20,7 @@ class ReqGeneralCrewMargin extends Constraint{
throw new \InvalidArgumentException("{$this->arg} is invalid crewtype");
}
foreach(['leader','power','intel','crew','crewtype','nation','level'] as $key){
foreach(['leadership','strength','intel','crew','crewtype','nation','level'] as $key){
if(!key_exists($key, $this->general)){
if(!$throwExeception){return false; }
throw new \InvalidArgumentException("require {$key} in general");
+1 -1
View File
@@ -96,7 +96,7 @@ class RaiseInvader extends \sammo\Event\Action{
$specAvg = $this->specAvg;
if($specAvg < 0){
$specAvg = $db->queryFirstField('SELECT avg(sum(`leader` + `power` + `intel`)) from general where npc < 9');
$specAvg = $db->queryFirstField('SELECT avg(sum(`leadership` + `strength` + `intel`)) from general where npc < 9');
$specAvg /= -1 * $this->specAvg;
}
+2 -2
View File
@@ -13,7 +13,7 @@ class RegNPC extends \sammo\Event\Action{
int $nationID,
$locatedCity,
int $leadership,
int $power,
int $strength,
int $intel,
int $birth = 160,
int $death = 300,
@@ -28,7 +28,7 @@ class RegNPC extends \sammo\Event\Action{
$nationID,
$locatedCity,
$leadership,
$power,
$strength,
$intel,
$birth,
$death,
+2 -2
View File
@@ -12,7 +12,7 @@ class RegNeutralNPC extends \sammo\Event\Action{
int $nationID,
$locatedCity,
int $leadership,
int $power,
int $strength,
int $intel,
int $birth = 160,
int $death = 300,
@@ -27,7 +27,7 @@ class RegNeutralNPC extends \sammo\Event\Action{
$nationID,
$locatedCity,
$leadership,
$power,
$strength,
$intel,
$birth,
$death,
+4 -4
View File
@@ -101,11 +101,11 @@ class GameUnitDetail implements iAction{
else if($this->armType == GameUnitConst::T_MISC){
$ratio = $general->getIntel(true, true, true) +
$general->getLeadership(true, true, true) +
$general->getPower(true, true, true);
$general->getStrength(true, true, true);
$ratio = $ratio*2/3 - 40;
}
else{
$ratio = $general->getPower(true, true, true)*2 - 40;
$ratio = $general->getStrength(true, true, true)*2 - 40;
}
if($ratio < 10){
$ratio = 10;
@@ -144,12 +144,12 @@ class GameUnitDetail implements iAction{
else if($this->armType == GameUnitConst::T_MISC){
$mainstat = $general->getIntel(false, true, true, false) +
$general->getLeadership(false, true, true, false) +
$general->getPower(false, true, true, false);
$general->getStrength(false, true, true, false);
$mainstat /= 3;
$coef = 0.4;
}
else{
$mainstat = $general->getPower(false, true, true, false);
$mainstat = $general->getStrength(false, true, true, false);
$coef = 0.5;
}
+11 -11
View File
@@ -200,7 +200,7 @@ class General implements iAction{
/**
* 장수의 스탯을 계산해옴
*
* @param string $statName 스탯값, leadership, power, intel 가능
* @param string $statName 스탯값, leadership, strength, intel 가능
* @param bool $withInjury 부상값 사용 여부
* @param bool $withItem 아이템 적용 여부
* @param bool $withStatAdjust 추가 능력치 보정 사용 여부
@@ -217,11 +217,11 @@ class General implements iAction{
}
if($withStatAdjust){
if($statName === 'power'){
if($statName === 'strength'){
$statValue *= Util::round($this->getStatValue('intel', $withInjury, $withItem, false, false) / 4);
}
else if($statName === 'intel'){
$statValue *= Util::round($this->getStatValue('power', $withInjury, $withItem, false, false) / 4);
$statValue *= Util::round($this->getStatValue('strength', $withInjury, $withItem, false, false) / 4);
}
}
@@ -252,11 +252,11 @@ class General implements iAction{
}
function getLeadership($withInjury = true, $withItem = true, $withStatAdjust = true, $useFloor = true):float{
return $this->getStatValue('leader', $withInjury, $withItem, $withStatAdjust, $useFloor);
return $this->getStatValue('leadership', $withInjury, $withItem, $withStatAdjust, $useFloor);
}
function getPower($withInjury = true, $withItem = true, $withStatAdjust = true, $useFloor = true):float{
return $this->getStatValue('power', $withInjury, $withItem, $withStatAdjust, $useFloor);
function getStrength($withInjury = true, $withItem = true, $withStatAdjust = true, $useFloor = true):float{
return $this->getStatValue('strength', $withInjury, $withItem, $withStatAdjust, $useFloor);
}
function getIntel($withInjury = true, $withItem = true, $withStatAdjust = true, $useFloor = true):float{
@@ -349,8 +349,8 @@ class General implements iAction{
$generalName = $this->getName();
$this->multiplyVarWithLimit('leader', 0.85, 10);
$this->multiplyVarWithLimit('power', 0.85, 10);
$this->multiplyVarWithLimit('leadership', 0.85, 10);
$this->multiplyVarWithLimit('strength', 0.85, 10);
$this->multiplyVarWithLimit('intel', 0.85, 10);
$this->setVar('injury', 0);
$this->multiplyVar('experience', 0.5);
@@ -398,8 +398,8 @@ class General implements iAction{
$limit = GameConst::$upgradeLimit;
$table = [
['통솔', 'leader'],
['무력', 'power'],
['통솔', 'leadership'],
['무력', 'strength'],
['지력', 'intel'],
];
@@ -616,7 +616,7 @@ class General implements iAction{
];
$fullColumn = [
'no', 'name', 'name2', 'picture', 'imgsvr', 'nation', 'nations', 'city', 'troop', 'injury', 'affinity',
'leader', 'leader2', 'power', 'power2', 'intel', 'intel2', 'weap', 'book', 'horse', 'item',
'leadership', 'leadership2', 'strength', 'strength2', 'intel', 'intel2', 'weap', 'book', 'horse', 'item',
'experience', 'dedication', 'level', 'gold', 'rice', 'crew', 'crewtype', 'train', 'atmos', 'turntime',
'makelimit', 'killturn', 'block', 'dedlevel', 'explevel', 'age', 'startage', 'belong',
'personal', 'special', 'special2', 'mode', 'npc', 'npc_org', 'deadyear', 'npcmsg',
+31 -31
View File
@@ -14,7 +14,7 @@ class GeneralAI{
protected $baseDevelCost;
protected $leadership;
protected $power;
protected $strength;
protected $intel;
protected $dipState;
@@ -67,7 +67,7 @@ class GeneralAI{
];
$this->leadership = $general->getLeadership(true, true, true, true);
$this->power = $general->getPower(true, true, true, true);
$this->strength = $general->getStrength(true, true, true, true);
$this->intel = $general->getIntel(true, true, true, true);
$this->calcGenType();
@@ -82,14 +82,14 @@ class GeneralAI{
protected function calcGenType(){
$leadership = $this->leadership;
$power = $this->power;
$intel = $this->intel;
$strength = Util::valueFit($this->strength, 1);
$intel = Util::valueFit($this->intel, 1);
//무장
if ($power >= $intel) {
if ($strength >= $intel) {
$genType = self::t무장;
if ($intel >= $power * 0.8) { //무지장
if(Util::randBool($intel / $power / 2)){
if ($intel >= $strength * 0.8) { //무지장
if(Util::randBool($intel / $strength / 2)){
$genType |= self::t지장;
}
@@ -97,8 +97,8 @@ class GeneralAI{
//지장
} else {
$genType = self::t지장;
if ($power >= $intel * 0.8 && Util::randBool(0.2)) { //지무장
if(Util::randBool($power / $intel / 2)){
if ($strength >= $intel * 0.8 && Util::randBool(0.2)) { //지무장
if(Util::randBool($strength / $intel / 2)){
$genType |= self::t무장;
}
}
@@ -172,7 +172,7 @@ class GeneralAI{
$genType = $this->genType;
$leadership = $this->leadership;
$power = $this->power;
$strength = $this->strength;
$intel = $this->intel;
$cityFull = false;
@@ -198,7 +198,7 @@ class GeneralAI{
if($develRate['secu'] < 0.99){
$commandObj = buildGeneralCommandClass('che_치안강화', $general, $env);
if($commandObj->isRunnable()){
$commandList['che_치안강화'] = $power / 3;
$commandList['che_치안강화'] = $strength / 3;
if(in_array($city['front'], [1,3])){
$commandList['che_치안강화'] /= 2;
}
@@ -207,13 +207,13 @@ class GeneralAI{
if($develRate['def'] < 0.99){
$commandObj = buildGeneralCommandClass('che_수비강화', $general, $env);
if($commandObj->isRunnable()){
$commandList['che_수비강화'] = $power / 3;
$commandList['che_수비강화'] = $strength / 3;
}
}
if($develRate['wall'] < 0.99){
$commandObj = buildGeneralCommandClass('che_성벽보수', $general, $env);
if($commandObj->isRunnable()){
$commandList['che_성벽보수'] = $power / 3;
$commandList['che_성벽보수'] = $strength / 3;
if(in_array($city['front'], [1,3])){
$commandList['che_성벽보수'] /= 2;
}
@@ -292,7 +292,7 @@ class GeneralAI{
$genType = $this->genType;
$leadership = $this->leadership;
$power = $this->power;
$strength = $this->strength;
$intel = $this->intel;
$tech = $nation['tech'];
@@ -557,7 +557,7 @@ class GeneralAI{
$npcCivilGenerals = [];
$npcWarGenerals = [];
foreach($db->query('SELECT `no`, nation, city, npc, `gold`, `rice`, leader, `power`, intel, killturn, crew, train, atmos, `level`, troop FROM general WHERE nation = %i', $nationID) as $rawNationGeneral) {
foreach($db->query('SELECT `no`, nation, city, npc, `gold`, `rice`, leadership, `strength`, intel, killturn, crew, train, atmos, `level`, troop FROM general WHERE nation = %i', $nationID) as $rawNationGeneral) {
$nationGeneral = (object)$rawNationGeneral;
$cityID = $nationGeneral->city;
@@ -580,7 +580,7 @@ class GeneralAI{
if($nationGeneral->npc<2 && $nationGeneral->killturn >= 5){
$userGenerals[] = $nationGeneral;
}
else if($nationGeneral->leader>=40 && $nationGeneral->killturn >= 5){
else if($nationGeneral->leadership>=40 && $nationGeneral->killturn >= 5){
$npcWarGenerals[] = $nationGeneral;
}
else{
@@ -656,7 +656,7 @@ class GeneralAI{
$isWarUser = null;
foreach($userGenerals as $compUser){
if($compUser['leader'] >= 50){
if($compUser['leadership'] >= 50){
$isWarUser = true;
break;
}
@@ -711,9 +711,9 @@ class GeneralAI{
$compNpcWar = Util::array_last($npcWarGenerals);
$compNpcCivil = Util::array_last($npcCivilGenerals);
$compUserRes = $compUser->$resName??0;
$compNpcWarRes = $compNpcWar->$resName*5??0;
$compNpcCivilRes = $compNpcCivil->$resName*10??0;
$compUserRes = $compUser?$compUser->$resName:0;
$compNpcWarRes = $compNpcWar?$compNpcWar->$resName*5:0;
$compNpcCivilRes = $compNpcCivil?$compNpcCivil->$resName*10:0;
[$compRes, $targetGeneral] = max(
[$compNpcCivilRes, $compNpcCivil],
@@ -945,7 +945,7 @@ class GeneralAI{
if(!$generalCity['front']){
continue;
}
if($generalCity['pop'] - 33000 > $nationGeneral->leader){
if($generalCity['pop'] - 33000 > $nationGeneral->leadership){
continue;
}
if($nationGeneral->troop != 0){
@@ -960,7 +960,7 @@ class GeneralAI{
$popTrial = 5;
for($popTrial = 0; $popTrial < 5; $popTrial++){
$targetCity = $nationCities[Util::choiceRandom($backupCitiesID)];
if($targetCity['pop'] < 33000 + $nationGeneral->leader){
if($targetCity['pop'] < 33000 + $nationGeneral->leadership){
continue;
}
if (Util::randBool($targetCity['pop'] / $targetCity['pop2'])) {
@@ -1054,7 +1054,7 @@ class GeneralAI{
case '거병_견문': //거병이나 견문
// 초반이면서 능력이 좋은놈 위주로 1.4%확률로 거병
$prop = Util::randF() * (GameConst::$defaultStatNPCMax + GameConst::$chiefStatMin) / 2;
$ratio = ($general->getVar('leader') + $general->getVar('power') + $general->getVar('intel')) / 3;
$ratio = ($general->getVar('leadership') + $general->getVar('strength') + $general->getVar('intel')) / 3;
if($env['startyear']+2 > $env['year'] && $prop < $ratio && Util::randBool(0.014) && $general->getVar('makelimit') == 0) {
//거병
$command = 'che_거병';
@@ -1133,7 +1133,7 @@ class GeneralAI{
$genType = $this->genType;
$leadership = $this->leadership;
$power = $this->power;
$strength = $this->strength;
$intel = $this->intel;
$startYear = $env['startyear'];
@@ -1384,7 +1384,7 @@ class GeneralAI{
return null;
}
$sumLeadershipInCity = $db->queryFirstField('SELECT sum(leader) FROM general WHERE nation = %i AND city = %i AND leader > 40', $nationID, $cityID);
$sumLeadershipInCity = $db->queryFirstField('SELECT sum(leadership) FROM general WHERE nation = %i AND city = %i AND leadership > 40', $nationID, $cityID);
if(
$city['pop'] > 30000 + $general->getLeadership(false) * 100 * 1.3 &&
Util::randBool(($city['pop'] - 30000) / $sumLeadershipInCity * 100)
@@ -1723,7 +1723,7 @@ class GeneralAI{
if(!$userChief){
$candUserChief = $db->queryFirstField(
'SELECT no FROM general WHERE nation = %i AND level = 1 AND killturn > %i AND npc < 2 AND belong >= %i ORDER BY leader DESC LIMIT 1',
'SELECT no FROM general WHERE nation = %i AND level = 1 AND killturn > %i AND npc < 2 AND belong >= %i ORDER BY leadership DESC LIMIT 1',
$nationID,
$minKillturn,
$maxBelong
@@ -1738,7 +1738,7 @@ class GeneralAI{
if(!key_exists(11, $chiefCandidate)){
$candChiefHead = $db->queryFirstField(
'SELECT no FROM general WHERE nation = %i AND level = 1 AND npc >= 2 AND belong >= %i ORDER BY leader DESC LIMIT 1',
'SELECT no FROM general WHERE nation = %i AND level = 1 AND npc >= 2 AND belong >= %i ORDER BY leadership DESC LIMIT 1',
$nationID,
$maxBelong
);
@@ -1750,8 +1750,8 @@ class GeneralAI{
if($minChiefLevel < 11){
//무장 수뇌 후보
$candChiefPower = $db->queryFirstColumn(
'SELECT no FROM general WHERE nation = %i AND power >= %i AND level = 1 AND belong >= %i ORDER BY power DESC LIMIT %i',
$candChiefStrength = $db->queryFirstColumn(
'SELECT no FROM general WHERE nation = %i AND strength >= %i AND level = 1 AND belong >= %i ORDER BY strength DESC LIMIT %i',
$nationID,
GameConst::$chiefStatMin,
$maxBelong, 12 - $minChiefLevel
@@ -1766,7 +1766,7 @@ class GeneralAI{
);
//무력, 지력이 모두 높은 장수를 고려하여..
$iterCandChiefPower = new \ArrayIterator($candChiefPower);
$iterCandChiefStrength = new \ArrayIterator($candChiefStrength);
$iterCandChiefIntel = new \ArrayIterator($candChiefIntel);
foreach(range(10, $minChiefLevel, -1) as $cheifLevel){
@@ -1775,7 +1775,7 @@ class GeneralAI{
}
/** @var \ArrayIterator $iterCurrentType */
$iterCurrentType = ($cheifLevel % 2 == 0)?$iterCandChiefPower:$iterCandChiefIntel;
$iterCurrentType = ($cheifLevel % 2 == 0)?$iterCandChiefStrength:$iterCandChiefIntel;
$candidate = $iterCurrentType->current();
while(key_exists($candidate, $promoted)){
+6 -6
View File
@@ -76,7 +76,7 @@ class Scenario{
list(
$affinity, $name, $picturePath, $nationName, $locatedCity,
$leadership, $power, $intel, $level, $birth, $death, $ego,
$leadership, $strength, $intel, $level, $birth, $death, $ego,
$char, $text
) = $rawGeneral;
@@ -99,7 +99,7 @@ class Scenario{
$nationID,
$locatedCity,
$leadership,
$power,
$strength,
$intel,
$level,
$birth,
@@ -117,7 +117,7 @@ class Scenario{
list(
$affinity, $name, $picturePath, $nationName, $locatedCity,
$leadership, $power, $intel, $level, $birth, $death, $ego,
$leadership, $strength, $intel, $level, $birth, $death, $ego,
$char, $text
) = $rawGeneral;
@@ -140,7 +140,7 @@ class Scenario{
$nationID,
$locatedCity,
$leadership,
$power,
$strength,
$intel,
$level,
$birth,
@@ -159,7 +159,7 @@ class Scenario{
list(
$affinity, $name, $picturePath, $nationName, $locatedCity,
$leadership, $power, $intel, $level, $birth, $death, $ego,
$leadership, $strength, $intel, $level, $birth, $death, $ego,
$char, $text
) = $rawGeneral;
@@ -182,7 +182,7 @@ class Scenario{
$nationID,
$locatedCity,
$leadership,
$power,
$strength,
$intel,
$level,
$birth,
+7 -7
View File
@@ -20,7 +20,7 @@ class NPC{
public $nationID;
public $locatedCity;
public $leadership;
public $power;
public $strength;
public $intel;
public $level;
public $birth;
@@ -63,7 +63,7 @@ class NPC{
int $nationID,
$locatedCity,
int $leadership,
int $power,
int $strength,
int $intel,
int $level = 0,
int $birth = 160,
@@ -78,7 +78,7 @@ class NPC{
$this->nationID = $nationID;
$this->locatedCity = $locatedCity;
$this->leadership = $leadership;
$this->power = $power;
$this->strength = $strength;
$this->intel = $intel;
$this->level = $level;
$this->birth = $birth;
@@ -90,8 +90,8 @@ class NPC{
$this->rice = GameConst::$defaultRice;
$general = [
'leader'=>$leadership,
'power'=>$power,
'leadership'=>$leadership,
'strength'=>$strength,
'intel'=>$intel
];
@@ -307,8 +307,8 @@ class NPC{
'picture'=>$picturePath,
'nation'=>$nationID,
'city'=>$city,
'leader'=>$this->leadership,
'power'=>$this->power,
'leadership'=>$this->leadership,
'strength'=>$this->strength,
'intel'=>$this->intel,
'experience'=>$experience,
'dedication'=>$dedication,
+1 -1
View File
@@ -145,7 +145,7 @@ class Nation{
//군주가 없는지 확인
$hasRuler = $db->queryFirstField('SELECT count(*) FROM general WHERE nation=%i AND level=12', $this->id);
if(!$hasRuler){
$newRuler = $db->queryFirstField('SELECT `no` FROM general WHERE nation=%i ORDER BY leader+power+intel DESC LIMIT 1', $this->id);
$newRuler = $db->queryFirstField('SELECT `no` FROM general WHERE nation=%i ORDER BY leadership+strength+intel DESC LIMIT 1', $this->id);
$db->update('general',['level'=>12], 'no=%i', $newRuler);
}
+24 -24
View File
@@ -7,7 +7,7 @@ class SpecialityConst{
const DISABLED = 0x1;
const STAT_LEADERSHIP = 0x2;
const STAT_POWER = 0x4;
const STAT_STRENGTH = 0x4;
const STAT_INTEL = 0x8;
const ARMY_FOOTMAN = 0x100;
@@ -33,13 +33,13 @@ class SpecialityConst{
'che_상재' => ['상재', 1, [self::STAT_INTEL]],
'che_발명' => ['발명', 1, [self::STAT_INTEL]],
'che_축성' => ['축성', 1, [self::STAT_POWER]],
'che_수비' => ['수비', 1, [self::STAT_POWER]],
'che_통찰' => ['통찰', 1, [self::STAT_POWER]],
'che_축성' => ['축성', 1, [self::STAT_STRENGTH]],
'che_수비' => ['수비', 1, [self::STAT_STRENGTH]],
'che_통찰' => ['통찰', 1, [self::STAT_STRENGTH]],
'che_인덕' => ['인덕', 1, [self::STAT_LEADERSHIP]],
'che_귀모' => ['귀모', -2.5, [self::STAT_LEADERSHIP, self::STAT_POWER, self::STAT_INTEL]],
'che_귀모' => ['귀모', -2.5, [self::STAT_LEADERSHIP, self::STAT_STRENGTH, self::STAT_INTEL]],
];
const WAR = [
@@ -53,33 +53,33 @@ class SpecialityConst{
'che_보병' => ['보병', 1, [
self::STAT_LEADERSHIP | self::REQ_DEXTERITY | self::ARMY_FOOTMAN,
self::STAT_POWER | self::REQ_DEXTERITY | self::ARMY_FOOTMAN
self::STAT_STRENGTH | self::REQ_DEXTERITY | self::ARMY_FOOTMAN
]],
'che_궁병' => ['궁병', 1, [
self::STAT_LEADERSHIP | self::REQ_DEXTERITY | self::ARMY_ARCHER,
self::STAT_POWER | self::REQ_DEXTERITY | self::ARMY_ARCHER
self::STAT_STRENGTH | self::REQ_DEXTERITY | self::ARMY_ARCHER
]],
'che_기병' => ['기병', 1, [
self::STAT_LEADERSHIP | self::REQ_DEXTERITY | self::ARMY_CAVALRY,
self::STAT_POWER | self::REQ_DEXTERITY | self::ARMY_CAVALRY
self::STAT_STRENGTH | self::REQ_DEXTERITY | self::ARMY_CAVALRY
]],
'che_공성' => ['공성', 1, [
self::STAT_LEADERSHIP | self::REQ_DEXTERITY | self::ARMY_SIEGE,
self::STAT_POWER | self::REQ_DEXTERITY | self::ARMY_SIEGE,
self::STAT_STRENGTH | self::REQ_DEXTERITY | self::ARMY_SIEGE,
self::STAT_INTEL | self::REQ_DEXTERITY | self::ARMY_SIEGE
]],
'che_돌격' => ['돌격', 1, [self::STAT_LEADERSHIP, self::STAT_POWER]],
'che_무쌍' => ['무쌍', 1, [self::STAT_LEADERSHIP, self::STAT_POWER]],
'che_견고' => ['견고', 1, [self::STAT_LEADERSHIP, self::STAT_POWER]],
'che_위압' => ['위압', 1, [self::STAT_LEADERSHIP, self::STAT_POWER]],
'che_돌격' => ['돌격', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH]],
'che_무쌍' => ['무쌍', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH]],
'che_견고' => ['견고', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH]],
'che_위압' => ['위압', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH]],
'che_저격' => ['저격', 1, [self::STAT_LEADERSHIP, self::STAT_POWER, self::STAT_INTEL]],
'che_필살' => ['필살', 1, [self::STAT_LEADERSHIP, self::STAT_POWER, self::STAT_INTEL]],
'che_징병' => ['징병', 1, [self::STAT_LEADERSHIP, self::STAT_POWER, self::STAT_INTEL]],
'che_의술' => ['의술', -2, [self::STAT_LEADERSHIP, self::STAT_POWER, self::STAT_INTEL]],
'che_격노' => ['격노', 1, [self::STAT_LEADERSHIP, self::STAT_POWER, self::STAT_INTEL]],
'che_척사' => ['척사', 1, [self::STAT_LEADERSHIP, self::STAT_POWER, self::STAT_INTEL]],
'che_저격' => ['저격', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH, self::STAT_INTEL]],
'che_필살' => ['필살', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH, self::STAT_INTEL]],
'che_징병' => ['징병', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH, self::STAT_INTEL]],
'che_의술' => ['의술', -2, [self::STAT_LEADERSHIP, self::STAT_STRENGTH, self::STAT_INTEL]],
'che_격노' => ['격노', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH, self::STAT_INTEL]],
'che_척사' => ['척사', 1, [self::STAT_LEADERSHIP, self::STAT_STRENGTH, self::STAT_INTEL]],
];
public static function getInvDomestic(string $name){
@@ -117,15 +117,15 @@ class SpecialityConst{
private static function calcCondGeneric(array $general) : int {
$myCond = 0;
$leader = $general['leader']??50;
$power = $general['power']??50;
$leadership = $general['leadership']??50;
$strength = $general['strength']??50;
$intel = $general['intel']??50;
if ($leader * 0.95 > $power && $leader * 0.95 > $intel) {
if ($leadership * 0.95 > $strength && $leadership * 0.95 > $intel) {
$myCond |= self::STAT_LEADERSHIP;
}
else if($power >= $intel){
$myCond |= self::STAT_POWER;
else if($strength >= $intel){
$myCond |= self::STAT_STRENGTH;
}
else {
$myCond |= self::STAT_INTEL;
@@ -7,7 +7,7 @@ class SightseeingMessage{
const IncExp = 0x1;
const IncHeavyExp = 0x2;
const IncLeadership = 0x10;
const IncPower = 0x20;
const IncStrength = 0x20;
const IncIntel = 0x40;
const IncGold = 0x100;
const IncRice = 0x200;
@@ -39,7 +39,7 @@ class SightseeingMessage{
'백성들에게 현인의 가르침을 설파했습니다.',
'어느 집의 도망친 가축을 되찾아 주었습니다.',
]], 2],
[[self::IncHeavyExp|self::IncPower,[
[[self::IncHeavyExp|self::IncStrength,[
'동네 장사와 힘겨루기를 하여 멋지게 이겼습니다.',
'어느 집의 무너진 울타리를 고쳐주었습니다.',
]], 2],
@@ -74,10 +74,10 @@ class SightseeingMessage{
[[self::IncHeavyExp|self::Wounded|self::HeavyWounded,[
'위기에 빠진 사람을 구하다가 죽을뻔 했습니다.',
]], 1],
[[self::IncHeavyExp|self::IncPower|self::IncGold,[
[[self::IncHeavyExp|self::IncStrength|self::IncGold,[
'산적과 싸워 금 <C>:goldAmount:</>을 빼앗았습니다.',
]], 1],
[[self::IncHeavyExp|self::IncPower|self::IncRice,[
[[self::IncHeavyExp|self::IncStrength|self::IncRice,[
'호랑이를 잡아 고기 <C>:riceAmount:</>을 얻었습니다.',
'곰을 잡아 고기 <C>:riceAmount:</>을 얻었습니다.',
]], 1],
+2 -2
View File
@@ -124,9 +124,9 @@ class WarUnitGeneral extends WarUnit{
if($this->crewType->armType == GameUnitConst::T_WIZARD) { // 귀병
$general->increaseVar('intel2', $value);
} elseif($this->crewType->armType == GameUnitConst::T_SIEGE) { // 차병
$general->increaseVar('leader2', $value);
$general->increaseVar('leadership2', $value);
} else {
$general->increaseVar('power2', $value);
$general->increaseVar('strength2', $value);
}
}