Merge pull request 'PHP8 버전 대응, 버그 수정' (#188) from php8 into devel
Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/188
This commit was merged in pull request #188.
This commit is contained in:
+15
-4
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
return [
|
||||
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`,
|
||||
// `'7.4'`, `null`.
|
||||
// `'7.4'`, `'8.0'`, `'8.1'`, `null`.
|
||||
// If this is set to `null`,
|
||||
// then Phan assumes the PHP version which is closest to the minor version
|
||||
// of the php executable used to execute Phan.
|
||||
@@ -15,9 +15,9 @@ return [
|
||||
// Note that the **only** effect of choosing `'5.6'` is to infer
|
||||
// that functions removed in php 7.0 exist.
|
||||
// (See `backward_compatibility_checks` for additional options)
|
||||
"target_php_version" => '7.3',
|
||||
'backward_compatibility_checks ' => false,
|
||||
'minimum_severity'=>\Phan\Issue::SEVERITY_NORMAL,
|
||||
"target_php_version" => '7.4',
|
||||
'backward_compatibility_checks ' => true,
|
||||
'minimum_severity'=>\Phan\Issue::SEVERITY_CRITICAL,
|
||||
|
||||
'file_list' => [
|
||||
'f_config/config.php',
|
||||
@@ -41,11 +41,13 @@ return [
|
||||
'hwe/b_dipcenter.php',
|
||||
'hwe/b_diplomacy.php',
|
||||
'hwe/b_genList.php',
|
||||
'hwe/b_inheritPoint.php',
|
||||
'hwe/b_myBossInfo.php',
|
||||
'hwe/b_myCityInfo.php',
|
||||
'hwe/b_myGenInfo.php',
|
||||
'hwe/b_myKingdomInfo.php',
|
||||
'hwe/b_myPage.php',
|
||||
'hwe/b_npc_control.php',
|
||||
'hwe/b_processing.php',
|
||||
'hwe/b_tournament.php',
|
||||
'hwe/b_troop.php',
|
||||
@@ -86,14 +88,18 @@ return [
|
||||
'hwe/j_diplomacy_respond_letter.php',
|
||||
'hwe/j_diplomacy_rollback_letter.php',
|
||||
'hwe/j_diplomacy_send_letter.php',
|
||||
'hwe/j_export_simulator_object.php',
|
||||
'hwe/j_general_log_old.php',
|
||||
'hwe/j_general_set_permission.php',
|
||||
'hwe/j_general_turn.php',
|
||||
'hwe/j_getChiefTurn.php',
|
||||
'hwe/j_get_basic_general_list.php',
|
||||
'hwe/j_get_city_list.php',
|
||||
'hwe/j_get_general_list.php',
|
||||
'hwe/j_get_nation_general_list.php',
|
||||
'hwe/j_get_reserved_command.php',
|
||||
'hwe/j_get_select_npc_token.php',
|
||||
'hwe/j_get_select_pool.php',
|
||||
'hwe/j_image_upload.php',
|
||||
'hwe/j_install.php',
|
||||
'hwe/j_install_db.php',
|
||||
@@ -107,15 +113,20 @@ return [
|
||||
'hwe/j_msg_get_recent.php',
|
||||
'hwe/j_msg_submit.php',
|
||||
'hwe/j_myBossInfo.php',
|
||||
'hwe/j_raise_event.php',
|
||||
'hwe/j_select_npc.php',
|
||||
'hwe/j_select_picked_general.php',
|
||||
'hwe/j_server_basic_info.php',
|
||||
'hwe/j_set_chief_command.php',
|
||||
'hwe/j_set_general_command.php',
|
||||
'hwe/j_set_my_setting.php',
|
||||
'hwe/j_set_npc_control.php',
|
||||
'hwe/j_simulate_battle.php',
|
||||
'hwe/j_troop.php',
|
||||
'hwe/j_vacation.php',
|
||||
'hwe/lib.php',
|
||||
'hwe/process_war.php',
|
||||
'hwe/select_general_from_pool.php',
|
||||
'hwe/select_npc.php',
|
||||
'hwe/t_board.php',
|
||||
'hwe/t_diplomacy.php',
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.3"
|
||||
"php": "7.4"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace kakao;
|
||||
|
||||
// @suppress PhanRedefineClass
|
||||
class KakaoKey{
|
||||
const REST_KEY = '_tK_REST_API_KEY_';
|
||||
const ADMIN_KEY = '_tK_ADMIN_KEY_';
|
||||
|
||||
@@ -28,7 +28,7 @@ $scenarioList = (function(){
|
||||
|
||||
|
||||
|
||||
if($scenarioIdx !== null || key_exists($scenarioIdx, $scenarioList)){
|
||||
if($scenarioIdx !== null && key_exists($scenarioIdx, $scenarioList)){
|
||||
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
|
||||
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
increaseRefresh("설문조사", 1);
|
||||
|
||||
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||
$isVoteAdmin |= $session->userGrade >= 5;
|
||||
$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5;
|
||||
|
||||
$me = $db->queryFirstRow('SELECT no,vote from general where owner=%i', $userID);
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ $session = Session::requireGameLogin()->setReadOnly();
|
||||
$userID = Session::getUserID();
|
||||
|
||||
$isVoteAdmin = in_array('vote', $session->acl[DB::prefix()]??[]);
|
||||
$isVoteAdmin |= $session->userGrade >= 5;
|
||||
$isVoteAdmin = $isVoteAdmin || $session->userGrade >= 5;
|
||||
|
||||
$db = DB::db();
|
||||
$gameStor = KVStorage::getStorage($db, 'game_env');
|
||||
|
||||
+1
-1
@@ -1006,7 +1006,7 @@ function increaseRefresh($type = "", $cnt = 1)
|
||||
$isunited = $gameStor->isunited;
|
||||
$opentime = $gameStor->opentime;
|
||||
|
||||
if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::DatetimeNow()) {
|
||||
if ($isunited != 2 && $generalID && $userGrade < 6 && $opentime <= TimeUtil::now()) {
|
||||
$db->update('general', [
|
||||
'lastrefresh' => $date,
|
||||
'con' => $db->sqleval('con + %i', $cnt),
|
||||
|
||||
@@ -694,7 +694,7 @@ function updateNationState()
|
||||
$lastAssemblerID += 1;
|
||||
$npcObj = new Scenario\GeneralBuilder(
|
||||
sprintf('부대장%4d', $lastAssemblerID),
|
||||
0,
|
||||
false,
|
||||
null,
|
||||
$nation['nation']
|
||||
);
|
||||
@@ -1052,7 +1052,7 @@ function checkEmperior()
|
||||
$generalLogger->flush();
|
||||
}
|
||||
|
||||
$gen = join(', ', array_column($rawGeneral, 'name'));
|
||||
$gen = join(', ', array_column($rawGeneralList, 'name'));
|
||||
|
||||
$stat = $db->queryFirstRow('SELECT max(nation_count) as nc, max(gen_count) as gc FROM statistic');
|
||||
$genCnt = $db->queryFirstField('SELECT count(*) FROM general');
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ $serverName = DB::prefix();
|
||||
$serverAcl = $session->acl[$serverName]??[];
|
||||
$allowReset = in_array('reset', $serverAcl);
|
||||
$allowFullReset = in_array('fullReset',$serverAcl);
|
||||
$allowReset |= $allowFullReset;
|
||||
$allowReset = $allowReset || $allowFullReset;
|
||||
|
||||
if($session->userGrade < 5 && !$allowReset){
|
||||
die('관리자 아님');
|
||||
|
||||
@@ -157,6 +157,7 @@ foreach ($customViewColumns as $column => $reqPermission) {
|
||||
$resultColumns[] = $column;
|
||||
}
|
||||
|
||||
$generalList = [];
|
||||
foreach ($rawGeneralList as $rawGeneral) {
|
||||
//General 생성?
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ $serverName = DB::prefix();
|
||||
$serverAcl = $session->acl[$serverName]??[];
|
||||
$allowReset = in_array('reset', $serverAcl);
|
||||
$allowFullReset = in_array('fullReset',$serverAcl);
|
||||
$allowReset |= $allowFullReset;
|
||||
$allowReset = $allowReset || $allowFullReset;
|
||||
|
||||
$reserve_open = Util::getPost('reserve_open');
|
||||
if($reserve_open && $reserve_open < date('Y-m-d H:i')){
|
||||
|
||||
@@ -9,7 +9,7 @@ $serverName = DB::prefix();
|
||||
$serverAcl = $session->acl[$serverName]??[];
|
||||
$allowReset = in_array('reset', $serverAcl);
|
||||
$allowFullReset = in_array('fullReset',$serverAcl);
|
||||
$allowReset |= $allowFullReset;
|
||||
$allowReset = $allowReset || $allowFullReset;
|
||||
|
||||
if($session->userGrade < 5 && !$allowReset){
|
||||
Json::die([
|
||||
|
||||
@@ -32,7 +32,7 @@ $lastMsgGet[] = TimeUtil::now();
|
||||
$session->lastMsgGet = Json::encode($lastMsgGet);
|
||||
|
||||
if($delayTime){
|
||||
sleep(0.2);
|
||||
usleep(200);
|
||||
}
|
||||
$session->setReadOnly();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class che_병가 extends \sammo\BaseNation{
|
||||
|
||||
public function onCalcNationalIncome(string $type, $amount):int{
|
||||
if($type == 'pop' && $amount > 0){
|
||||
return $amount * 0.8;
|
||||
return Util::toInt($amount * 0.8);
|
||||
}
|
||||
|
||||
return $amount;
|
||||
|
||||
@@ -39,7 +39,7 @@ class AutorunGeneralPolicy{
|
||||
|
||||
|
||||
|
||||
static public $default_priority = [
|
||||
static public array $default_priority = [
|
||||
'NPC사망대비',
|
||||
'귀환',
|
||||
'금쌀구매',
|
||||
@@ -89,6 +89,8 @@ class AutorunGeneralPolicy{
|
||||
public $can건국 = true;
|
||||
public $can선양 = false;
|
||||
|
||||
public array $priority;
|
||||
|
||||
function doNPCState(General $general){
|
||||
$npc = $general->getNPCType();
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
@@ -18,6 +18,7 @@ abstract class BaseCommand{
|
||||
static protected $actionName = 'CommandName';
|
||||
static public $reqArg = false;
|
||||
static protected $isLazyCalcReqTurn = false;
|
||||
public ?string $reason;
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
return $this->getName();
|
||||
@@ -32,8 +33,8 @@ abstract class BaseCommand{
|
||||
|
||||
/** @var \sammo\General */
|
||||
protected $destGeneralObj = null;
|
||||
protected $destCity = null;
|
||||
protected $destNation = null;
|
||||
protected ?array $destCity = null;
|
||||
protected ?array $destNation = null;
|
||||
|
||||
protected $cachedPermissionToReserve = false;
|
||||
protected $cachedMinConditionMet = false;
|
||||
@@ -48,6 +49,7 @@ abstract class BaseCommand{
|
||||
protected $fullConditionConstraints = null;
|
||||
protected $minConditionConstraints = null;
|
||||
protected $permissionConstraints = null;
|
||||
protected $reasonConstraint = null;
|
||||
|
||||
protected $logger;
|
||||
|
||||
|
||||
@@ -2,23 +2,17 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
tryUniqueItemLottery,
|
||||
printCitiesBasedOnDistance
|
||||
};
|
||||
use function \sammo\printCitiesBasedOnDistance;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -14,9 +14,7 @@ use \sammo\{
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
use function sammo\buildNationTypeClass;
|
||||
use function sammo\refreshNationStaticInfo;
|
||||
use function sammo\GetNationColors;
|
||||
use function sammo\getAllNationStaticInfo;
|
||||
|
||||
|
||||
|
||||
@@ -2,24 +2,19 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command,
|
||||
Json
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
use \sammo\Json;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
tryUniqueItemLottery,
|
||||
getAllNationStaticInfo
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -10,11 +10,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use \sammo\TextDecoration\SightseeingMessage;
|
||||
|
||||
@@ -12,11 +12,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery,
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\MustNotBeReachedException;
|
||||
|
||||
@@ -10,12 +10,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
getNationStaticInfo,
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
|
||||
@@ -11,7 +11,6 @@ use \sammo\{
|
||||
|
||||
use function sammo\{
|
||||
TechLimit,
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery,
|
||||
|
||||
@@ -10,11 +10,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
|
||||
@@ -11,9 +11,7 @@ use \sammo\{
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -12,15 +12,9 @@ use \sammo\{
|
||||
ScoutMessage
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
newColor
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
use function \sammo\newColor;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -13,14 +13,8 @@ use \sammo\{
|
||||
ScoutMessage
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -15,8 +15,6 @@ use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\getInvitationList;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -11,13 +11,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use \sammo\{
|
||||
DB, Util, JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst, GameUnitConst,
|
||||
LastTurn,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
|
||||
class che_모병 extends che_징병{
|
||||
class che_모병 extends che_징병
|
||||
{
|
||||
static protected $actionName = '모병';
|
||||
static protected $costOffset = 2;
|
||||
|
||||
@@ -25,8 +27,8 @@ class che_모병 extends che_징병{
|
||||
static::$defaultAtmos = GameConst::$defaultAtmosHigh;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
public function getCommandDetailTitle(): string
|
||||
{
|
||||
return "{$this->getName()}(통솔경험, 자금×2)";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,12 +11,8 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use function \sammo\getDomesticExpLevelBonus;
|
||||
use function \sammo\CriticalScoreEx;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -10,11 +10,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
|
||||
@@ -10,10 +10,7 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -11,13 +11,11 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery,
|
||||
updateMaxDomesticCritical
|
||||
};
|
||||
use function \sammo\getDomesticExpLevelBonus;
|
||||
use function \sammo\CriticalRatioDomestic;
|
||||
use function \sammo\CriticalScoreEx;
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\updateMaxDomesticCritical;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use \sammo\{
|
||||
DB, Util, JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst, GameUnitConst,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
|
||||
class che_선동 extends che_화계{
|
||||
static protected $actionName = '선동';
|
||||
|
||||
@@ -2,25 +2,20 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use function\sammo\getDomesticExpLevelBonus;
|
||||
use function\sammo\CriticalRatioDomestic;
|
||||
use function\sammo\CriticalScoreEx;
|
||||
use function\sammo\tryUniqueItemLottery;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -10,11 +10,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
|
||||
@@ -2,28 +2,21 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
Session,
|
||||
KVStorage,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command,
|
||||
ServConfig
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\Session;
|
||||
use \sammo\KVStorage;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
use \sammo\ServConfig;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
getDexCall,
|
||||
getTechCall,
|
||||
tryUniqueItemLottery,
|
||||
getTechAbil
|
||||
};
|
||||
use function \sammo\getDexCall;
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
@@ -107,7 +100,7 @@ class che_숙련전환 extends Command\GeneralCommand
|
||||
$this->srcArmTypeName = GameUnitConst::allType()[$this->srcArmType];
|
||||
$this->destArmType = $this->arg['destArmType'];
|
||||
$this->destArmTypeName = GameUnitConst::allType()[$this->destArmType];
|
||||
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$this->fullConditionConstraints = [
|
||||
|
||||
@@ -10,11 +10,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
|
||||
@@ -2,23 +2,17 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
tryUniqueItemLottery,
|
||||
printCitiesBasedOnDistance
|
||||
};
|
||||
use function \sammo\printCitiesBasedOnDistance;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,26 +2,18 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery,
|
||||
getAllNationStaticInfo,
|
||||
pickGeneralFromPool,
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\pickGeneralFromPool;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -12,12 +12,9 @@ use \sammo\{
|
||||
KVStorage
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery,
|
||||
getInvitationList,
|
||||
getNationStaticInfo,
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\getInvitationList;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -12,11 +12,7 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery,
|
||||
buildItemClass
|
||||
};
|
||||
use function \sammo\buildItemClass;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -12,13 +12,10 @@ use \sammo\{
|
||||
KVStorage
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
getColoredName,
|
||||
tryUniqueItemLottery,
|
||||
getInvitationList,
|
||||
getNationStaticInfo,
|
||||
};
|
||||
use function \sammo\getColoredName;
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\getInvitationList;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -11,10 +11,8 @@ use \sammo\{
|
||||
MustNotBeReachedException
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery, getTechCost
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\getTechCost;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -10,10 +10,7 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -11,13 +11,11 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery,
|
||||
updateMaxDomesticCritical
|
||||
};
|
||||
use function \sammo\getDomesticExpLevelBonus;
|
||||
use function \sammo\CriticalRatioDomestic;
|
||||
use function \sammo\CriticalScoreEx;
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\updateMaxDomesticCritical;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -11,13 +11,11 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery,
|
||||
updateMaxDomesticCritical
|
||||
};
|
||||
use function \sammo\getDomesticExpLevelBonus;
|
||||
use function \sammo\CriticalRatioDomestic;
|
||||
use function \sammo\CriticalScoreEx;
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\updateMaxDomesticCritical;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,25 +2,16 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command
|
||||
};
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -10,10 +10,7 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,27 +2,22 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
Session,
|
||||
KVStorage,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command,
|
||||
ServConfig
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\Session;
|
||||
use \sammo\KVStorage;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
use \sammo\ServConfig;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
getTechCall,
|
||||
tryUniqueItemLottery,
|
||||
getTechAbil
|
||||
};
|
||||
use function \sammo\getTechCall;
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\getTechAbil;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,25 +2,19 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command,
|
||||
Json
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
use \sammo\Json;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
tryUniqueItemLottery,
|
||||
searchDistance,
|
||||
printCitiesBasedOnDistance
|
||||
};
|
||||
use function \sammo\searchDistance;
|
||||
use function \sammo\printCitiesBasedOnDistance;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,30 +2,23 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
tryUniqueItemLottery,
|
||||
processWar
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
use function \sammo\processWar;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
|
||||
|
||||
|
||||
class che_출병 extends Command\GeneralCommand
|
||||
{
|
||||
static protected $actionName = '출병';
|
||||
|
||||
@@ -10,11 +10,6 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
|
||||
@@ -14,10 +14,7 @@ use \sammo\{
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\CityConst;
|
||||
use function sammo\buildNationTypeClass;
|
||||
use function sammo\refreshNationStaticInfo;
|
||||
use function sammo\GetNationColors;
|
||||
use function sammo\getAllNationStaticInfo;
|
||||
use function sammo\deleteNation;
|
||||
|
||||
|
||||
|
||||
@@ -2,24 +2,15 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command
|
||||
};
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,23 +2,18 @@
|
||||
|
||||
namespace sammo\Command\General;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
GameUnitConst,
|
||||
LastTurn,
|
||||
Command
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\Command;
|
||||
|
||||
|
||||
use function\sammo\{
|
||||
searchDistance,
|
||||
printCitiesBasedOnDistance
|
||||
};
|
||||
use function \sammo\searchDistance;
|
||||
use function \sammo\printCitiesBasedOnDistance;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -10,10 +10,7 @@ use \sammo\{
|
||||
Command
|
||||
};
|
||||
|
||||
|
||||
use function \sammo\{
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use function \sammo\tryUniqueItemLottery;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -15,14 +15,6 @@ use \sammo\{
|
||||
CityHelper
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Event\Action;
|
||||
|
||||
@@ -2,32 +2,23 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
MessageTarget,
|
||||
Message,
|
||||
CityConst,
|
||||
Json,
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\MessageTarget;
|
||||
use \sammo\Message;
|
||||
use \sammo\CityConst;
|
||||
use \sammo\Json;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo,
|
||||
GetNationColors,
|
||||
newColor,
|
||||
};
|
||||
use function \sammo\GetNationColors;
|
||||
use function \sammo\newColor;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,30 +2,20 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
Json,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
MessageTarget,
|
||||
Message,
|
||||
CityConst
|
||||
};
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo,
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\Json;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\MessageTarget;
|
||||
use \sammo\Message;
|
||||
use \sammo\CityConst;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,29 +2,21 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
Message,
|
||||
MessageTarget
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\Message;
|
||||
use \sammo\MessageTarget;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,27 +2,20 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
MessageTarget,
|
||||
Message
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\MessageTarget;
|
||||
use \sammo\Message;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\GetImageURL;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -14,9 +14,6 @@ use \sammo\{
|
||||
StringUtil
|
||||
};
|
||||
|
||||
use function \sammo\getDomesticExpLevelBonus;
|
||||
use function \sammo\CriticalRatioDomestic;
|
||||
use function \sammo\CriticalScoreEx;
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
|
||||
@@ -13,12 +13,7 @@ use \sammo\{
|
||||
TimeUtil
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
cutTurn
|
||||
};
|
||||
use function \sammo\cutTurn;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -14,14 +14,6 @@ use \sammo\{
|
||||
CityConst
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Event\Action;
|
||||
|
||||
@@ -16,12 +16,7 @@ use \sammo\MessageTarget;
|
||||
use \sammo\DiplomaticMessage;
|
||||
use \sammo\Message;
|
||||
|
||||
use function \sammo\getDomesticExpLevelBonus;
|
||||
use function \sammo\CriticalRatioDomestic;
|
||||
use function \sammo\CriticalScoreEx;
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
use function \sammo\GetImageUR;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,30 +2,23 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
MessageTarget,
|
||||
DiplomaticMessage,
|
||||
Message,
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\MessageTarget;
|
||||
use \sammo\DiplomaticMessage;
|
||||
use \sammo\Message;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\GetImageURL;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,30 +2,21 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
MessageTarget,
|
||||
DiplomaticMessage,
|
||||
Message,
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\MessageTarget;
|
||||
use \sammo\DiplomaticMessage;
|
||||
use \sammo\Message;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -14,14 +14,9 @@ use \sammo\{
|
||||
Message,
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
use function \sammo\GetImageURL;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,29 +2,22 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
Message,
|
||||
MessageTarget
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\Message;
|
||||
use \sammo\MessageTarget;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
use function \sammo\GetImageURL;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -14,13 +14,7 @@ use \sammo\{
|
||||
CityConst
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo
|
||||
};
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,25 +2,16 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
KVStorage
|
||||
};
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
tryUniqueItemLottery
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\KVStorage;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,29 +2,21 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
Message,
|
||||
MessageTarget
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\Message;
|
||||
use \sammo\MessageTarget;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
use \sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
@@ -18,14 +18,7 @@ use\sammo\{
|
||||
Message,
|
||||
};
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -14,14 +14,9 @@ use \sammo\{
|
||||
Message,
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
use function \sammo\GetImageURL;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -14,14 +14,6 @@ use \sammo\{
|
||||
CityConst
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Event\Action;
|
||||
|
||||
@@ -2,30 +2,19 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
MessageTarget,
|
||||
Message,
|
||||
CityConst
|
||||
};
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo
|
||||
};
|
||||
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\MessageTarget;
|
||||
use \sammo\Message;
|
||||
use \sammo\CityConst;
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Event\Action;
|
||||
|
||||
@@ -15,14 +15,6 @@ use \sammo\{
|
||||
CityInitialDetail
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Event\Action;
|
||||
|
||||
@@ -2,24 +2,16 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command
|
||||
};
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -13,15 +13,9 @@ use \sammo\{
|
||||
Message, MessageTarget
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
buildNationCommandClass,
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
getAllNationStaticInfo,
|
||||
getNationStaticInfo,
|
||||
GetImageURL
|
||||
};
|
||||
use function \sammo\buildNationCommandClass;
|
||||
use function \sammo\getAllNationStaticInfo;
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -13,13 +13,6 @@ use \sammo\{
|
||||
Message
|
||||
};
|
||||
|
||||
use function \sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Event\Action;
|
||||
|
||||
@@ -2,29 +2,21 @@
|
||||
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use\sammo\{
|
||||
DB,
|
||||
Util,
|
||||
JosaUtil,
|
||||
General,
|
||||
DummyGeneral,
|
||||
ActionLogger,
|
||||
GameConst,
|
||||
LastTurn,
|
||||
GameUnitConst,
|
||||
Command,
|
||||
MessageTarget,
|
||||
Message,
|
||||
CityConst
|
||||
};
|
||||
use \sammo\DB;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use \sammo\General;
|
||||
use \sammo\DummyGeneral;
|
||||
use \sammo\ActionLogger;
|
||||
use \sammo\GameConst;
|
||||
use \sammo\LastTurn;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\Command;
|
||||
use \sammo\MessageTarget;
|
||||
use \sammo\Message;
|
||||
use \sammo\CityConst;
|
||||
|
||||
use function\sammo\{
|
||||
getDomesticExpLevelBonus,
|
||||
CriticalRatioDomestic,
|
||||
CriticalScoreEx,
|
||||
GetImageURL,
|
||||
getNationStaticInfo
|
||||
};
|
||||
use function \sammo\getNationStaticInfo;
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
|
||||
@@ -9,6 +9,7 @@ class AllowDiplomacyStatus extends Constraint{
|
||||
|
||||
protected $nationID;
|
||||
protected $allowStatus = [];
|
||||
protected $errMsg = null;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
|
||||
@@ -154,27 +154,27 @@ abstract class Constraint{
|
||||
throw new \InvalidArgumentException('require arg');
|
||||
}
|
||||
|
||||
if(($valueType&static::REQ_STRING_ARG===static::REQ_STRING_ARG) && !is_string($this->arg)){
|
||||
if((($valueType&static::REQ_STRING_ARG)===static::REQ_STRING_ARG) && !is_string($this->arg)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException('require string arg');
|
||||
}
|
||||
|
||||
if(($valueType&static::REQ_BOOLEAN_ARG===static::REQ_BOOLEAN_ARG) && !is_bool($this->arg)){
|
||||
if((($valueType&static::REQ_BOOLEAN_ARG)===static::REQ_BOOLEAN_ARG) && !is_bool($this->arg)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException('require bool arg');
|
||||
}
|
||||
|
||||
if(($valueType&static::REQ_INT_ARG===static::REQ_INT_ARG) && !is_int($this->arg)){
|
||||
if((($valueType&static::REQ_INT_ARG)===static::REQ_INT_ARG) && !is_int($this->arg)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException('require int arg');
|
||||
}
|
||||
|
||||
if(($valueType&static::REQ_NUMERIC_ARG===static::REQ_NUMERIC_ARG) && !is_numeric($this->arg)){
|
||||
if((($valueType&static::REQ_NUMERIC_ARG)===static::REQ_NUMERIC_ARG) && !is_numeric($this->arg)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException('require numeric arg');
|
||||
}
|
||||
|
||||
if(($valueType&static::REQ_ARRAY_ARG===static::REQ_ARRAY_ARG) && !is_array($this->arg)){
|
||||
if((($valueType&static::REQ_ARRAY_ARG)===static::REQ_ARRAY_ARG) && !is_array($this->arg)){
|
||||
if(!$throwExeception){return false; }
|
||||
throw new \InvalidArgumentException('require array arg');
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ class RemainCityTrust extends Constraint{
|
||||
|
||||
protected $key;
|
||||
protected $maxKey;
|
||||
protected $maxVal;
|
||||
protected $keyNick;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
|
||||
@@ -12,6 +12,7 @@ class ReqCityCapacity extends Constraint{
|
||||
protected $maxKey;
|
||||
protected $keyNick;
|
||||
protected $reqVal;
|
||||
protected $isPercent;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
|
||||
@@ -10,6 +10,7 @@ class ReqCityTrust extends Constraint{
|
||||
protected $key;
|
||||
protected $maxKey;
|
||||
protected $keyNick;
|
||||
protected $reqVal;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
|
||||
@@ -17,6 +17,7 @@ class ReqCityValue extends Constraint{
|
||||
protected $reqVal;
|
||||
protected $comp;
|
||||
protected $errMsg;
|
||||
protected $isPercent;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
|
||||
@@ -17,6 +17,7 @@ class ReqDestCityValue extends Constraint{
|
||||
protected $reqVal;
|
||||
protected $comp;
|
||||
protected $errMsg;
|
||||
protected $isPercent;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
|
||||
@@ -17,6 +17,7 @@ class ReqDestNationValue extends Constraint{
|
||||
protected $reqVal;
|
||||
protected $comp;
|
||||
protected $errMsg;
|
||||
protected $isPercent;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
|
||||
@@ -38,7 +38,7 @@ class ReqGeneralCrewMargin extends Constraint{
|
||||
$reqCrewType = GameUnitConst::byID($this->arg);
|
||||
|
||||
//XXX: 왜 General -> obj -> General 변환을 하고 있나?
|
||||
$generalObj = new General($this->general, null, null, null, null, false);
|
||||
$generalObj = new General($this->general, null, null, null, null, null, false);
|
||||
|
||||
if($reqCrewType->id != $generalObj->getCrewTypeObj()->id){
|
||||
return true;
|
||||
|
||||
@@ -14,6 +14,7 @@ class ReqNationAuxValue extends Constraint
|
||||
const REQ_VALUES = Constraint::REQ_NATION | Constraint::REQ_ARRAY_ARG;
|
||||
|
||||
protected $key;
|
||||
protected $maxKey;
|
||||
protected $defaultValue;
|
||||
protected $reqVal;
|
||||
protected $comp;
|
||||
|
||||
@@ -17,6 +17,7 @@ class ReqNationValue extends Constraint{
|
||||
protected $reqVal;
|
||||
protected $comp;
|
||||
protected $errMsg;
|
||||
protected $isPercent;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
namespace sammo\Event\Action;
|
||||
|
||||
use function sammo\getNationStaticInfo;
|
||||
|
||||
use sammo\ActionLogger;
|
||||
use sammo\CityConst;
|
||||
use sammo\DB;
|
||||
|
||||
@@ -12,7 +12,6 @@ use sammo\Scenario\Nation;
|
||||
use sammo\UniqueConst;
|
||||
use sammo\Util;
|
||||
|
||||
use function sammo\getNationStaticInfo;
|
||||
use function sammo\refreshNationStaticInfo;
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,6 @@ use sammo\UniqueConst;
|
||||
use sammo\Util;
|
||||
|
||||
use function sammo\GetNationColors;
|
||||
use function sammo\getNationStaticInfo;
|
||||
use function sammo\pickGeneralFromPool;
|
||||
use function sammo\refreshNationStaticInfo;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class RegNPC extends \sammo\Event\Action{
|
||||
|
||||
$this->npc=(new \sammo\Scenario\GeneralBuilder(
|
||||
$name,
|
||||
0,
|
||||
false,
|
||||
$picturePath,
|
||||
$nationID
|
||||
))
|
||||
|
||||
@@ -23,7 +23,7 @@ class RegNeutralNPC extends \sammo\Event\Action{
|
||||
){
|
||||
$this->npc=(new \sammo\Scenario\GeneralBuilder(
|
||||
$name,
|
||||
0,
|
||||
false,
|
||||
$picturePath,
|
||||
$nationID
|
||||
))
|
||||
|
||||
@@ -98,7 +98,7 @@ class Logic extends \sammo\Event\Condition{
|
||||
foreach($this->conditions as $cond){
|
||||
$sub = self::_eval($cond, $env);
|
||||
$chain[] = $sub['chain'];
|
||||
$value ^= $sub['value'];
|
||||
$value = ($value != $sub['value']);
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user