전투 버그 수정 중

This commit is contained in:
2019-10-06 02:49:54 +09:00
parent 5df66ede36
commit 46acfe9470
18 changed files with 40 additions and 27 deletions
+3 -3
View File
@@ -85,10 +85,10 @@ class che_증여 extends Command\GeneralCommand{
ConstraintHelper::FriendlyDestGeneral()
];
if($this->arg['isGold']){
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralGold(1);
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralGold(GameConst::$generalMinimumGold);
}
else{
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralRice(1);
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralRice(GameConst::$generalMinimumRice);
}
}
@@ -121,7 +121,7 @@ class che_증여 extends Command\GeneralCommand{
$resName = $isGold?'금':'쌀';
$destGeneral = $this->destGeneralObj;
$amount = Util::valueFit($amount, 0, $general->getVar($resKey));
$amount = Util::valueFit($amount, 0, $general->getVar($resKey) - ($isGold?GameConst::$generalMinimumGold:GameConst::$generalMinimumRice));
$amountText = number_format($amount, 0);
$logger = $general->getLogger();
+2 -1
View File
@@ -128,7 +128,8 @@ class che_출병 extends Command\GeneralCommand{
$general->applyDB($db);
//TODO: 장기적으로 통합해야함
processWar($general, $general->getStaticNation(), $this->destCity);
$attackerNation = $db->queryFirstRow('SELECT nation, name, color, type, level, capital, tech from nation WHERE nation = %i', $attackerNationID);
processWar($general, $attackerNation, $this->destCity);
tryUniqueItemLottery($general);
$general->applyDB($db);
+2 -2
View File
@@ -65,10 +65,10 @@ class che_헌납 extends Command\GeneralCommand{
ConstraintHelper::SuppliedCity(),
];
if($this->arg['isGold']){
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralGold(1);
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralGold(GameConst::$generalMinimumGold);
}
else{
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralRice(1);
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralRice(GameConst::$generalMinimumRice);
}
}
+1 -1
View File
@@ -118,7 +118,7 @@ class che_몰수 extends Command\NationCommand{
$resName = $isGold?'금':'쌀';
$destGeneral = $this->destGeneralObj;
$amount = Util::valueFit($amount, 0, $general->getVar[$resKey]);
$amount = Util::valueFit($amount, 0, ($general->getVar[$resKey]- $isGold?GameConst::$generalMinimumGold:GameConst::$generalMinimumRice));
$amountText = number_format($amount, 0);
if($destGeneral->getVar('npc') >= 2 && Util::randBool(0.01)){
+2 -2
View File
@@ -83,7 +83,7 @@ class che_포상 extends Command\NationCommand{
$this->runnableConstraints[] = ConstraintHelper::ReqNationGold(1);
}
else{
$this->runnableConstraints[] = ConstraintHelper::ReqGeneralRice(1+GameConst::$baserice);
$this->runnableConstraints[] = ConstraintHelper::ReqNationRice(1+GameConst::$baserice);
}
}
@@ -119,7 +119,7 @@ class che_포상 extends Command\NationCommand{
$resName = $isGold?'금':'쌀';
$destGeneral = $this->destGeneralObj;
$amount = Util::valueFit($amount, 0, $nation[$resKey]);
$amount = Util::valueFit($amount, 0, $nation[$resKey] - ($isGold?GameConst::$basegold:GameConst::$baserice));
$amountText = number_format($amount, 0);
$logger = $general->getLogger();