버그 수정, 턴 입력 form 준비

This commit is contained in:
2019-06-16 21:07:08 +09:00
parent 5d42730e9a
commit 3ebb30795c
10 changed files with 2595 additions and 2477 deletions
+10 -1
View File
@@ -335,5 +335,14 @@ abstract class BaseCommand{
abstract public function run():bool;
public function getJSFiles():array {
return [];
}
public function getCSSFiles():array {
return [];
}
public function getForm():string{
throw new \sammo\MustNotBeReachedException();
return '';
}
}
+1 -1
View File
@@ -143,7 +143,7 @@ class che_등용 extends Command\GeneralCommand{
$general->setResultTurn(new LastTurn(static::getName(), $this->arg));
$general->checkStatChange();
$general->applyDB($db);
$destGeneral->applyDB($db);
$this->destGeneralObj->applyDB($db);
return true;
}
@@ -79,7 +79,7 @@ class che_모반시도 extends Command\GeneralCommand{
$nationName = $this->nation['name'];
$logger = $general->getLogger();
$lordLogger = $destGeneral->getLogger();
$lordLogger = $this->destGeneralObj->getLogger();
$general->setVar('level', 12);
$lordGeneral->setVar('level', 1);
+1 -1
View File
@@ -38,7 +38,7 @@ class che_선동 extends che_화계{
$destCity['secu'] -= $secuAmount;
$destCity['trust'] -= $trustAmount;
$db->update('city', [
DB::db()->update('city', [
'state'=>32,
'secu'=>$destCity['secu'],
'trust'=>$destCity['trust']
+2
View File
@@ -26,8 +26,10 @@ class che_탈취 extends che_화계{
$destCityName = $destCity['name'];
$destCityID = $destCity['city'];
$destNationID = $destCity['nation'];
$commandName = $this->getName();
$db = DB::db();
// 탈취 최대 400 * 8
$gold = Util::randRangeInt(GameConst::$sabotageDamageMin, GameConst::$sabotageDamageMax) * $destCity['level'];
+1 -1
View File
@@ -37,7 +37,7 @@ class che_파괴 extends che_화계{
$destCity['def'] -= $defAmount;
$destCity['wall'] -= $wallAmount;
$db->update('city', [
DB::db()->update('city', [
'state'=>32,
'def'=>$destCity['def'],
'wall'=>$destCity['wall']
+5 -5
View File
@@ -97,8 +97,8 @@ class che_화계 extends Command\GeneralCommand{
$prob = $maxGenScore / GameConst::$sabotageProbCoefByStat;
$prob += $city['secu'] / $city['secu2'] / 5; //최대 20%p
$prob += $city['supply'] ? 0.1 : 0;
$prob += $destCity['secu'] / $destCity['secu2'] / 5; //최대 20%p
$prob += $destCity['supply'] ? 0.1 : 0;
return $prob;
}
@@ -169,7 +169,7 @@ class che_화계 extends Command\GeneralCommand{
$destCity['agri'] -= $agriAmount;
$destCity['comm'] -= $commAmount;
$db->update('city', [
DB::db()->update('city', [
'state'=>32,
'agri'=>$destCity['agri'],
'comm'=>$destCity['comm']
@@ -222,7 +222,7 @@ class che_화계 extends Command\GeneralCommand{
$destCityID,
$destNationID
) as $rawDestCityGeneral){
$destCityGeneralList[] = new General($rawDestGeneral, $destCity, $year, $month, true);
$destCityGeneralList[] = new General($rawDestCityGeneral, $destCity, $year, $month, true);
//계략에 성공할 경우 logger를 사용해야 하므로 해야하므로, 미리 초기화한다.
//실패하면 날리는거지 뭐~
};
@@ -264,7 +264,7 @@ class che_화계 extends Command\GeneralCommand{
$itemObj = $general->getItem();
if($itemObj->isValidTurnItem('GeneralCommand', '계략') && $itemObj::$consumable){
$itemName = $itemObj->$name;
$itemName = $itemObj->name;
$josaUl = JosaUtil::pick($itemName, '을');
$logger->pushGeneralActionLog("<C>{$itemName}</>{$josaUl} 사용!", ActionLogger::PLAIN);
$general->deleteItem();