forked from devsam/core
Compare commits
31
Commits
91e56644b4
...
1a3ef20a35
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a3ef20a35 | ||
|
|
fba966177d | ||
|
|
62c72dfdbe | ||
|
|
1ae1ff9b72 | ||
|
|
c1e12c2737 | ||
|
|
de09a66d6f | ||
|
|
3c2012da46 | ||
|
|
d55be54320 | ||
|
|
dcbefa1a96 | ||
|
|
be8f1fff96 | ||
|
|
6117dbdcc0 | ||
|
|
0a39ba1023 | ||
|
|
dae5f65baa | ||
|
|
080bb30103 | ||
|
|
9e647c7ce5 | ||
|
|
73606b0fb4 | ||
|
|
e62eb36cc2 | ||
|
|
6b81f744d4 | ||
|
|
1a9b3b78cb | ||
|
|
c3cbf956d0 | ||
|
|
91188c555d | ||
|
|
913028dd6c | ||
|
|
dfb3f6478d | ||
|
|
6afc6221d3 | ||
|
|
7b5a02487e | ||
|
|
533b79762e | ||
|
|
53b7dbfdd0 | ||
|
|
fd14c5403b | ||
|
|
dc476e73a1 | ||
|
|
e60150705e | ||
|
|
2869ba5c42 |
@@ -15,7 +15,7 @@ class che_척사_오악진형도 extends \sammo\BaseItem{
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
|
||||
return [1.15, 0.85];
|
||||
}
|
||||
return [1, 1];
|
||||
|
||||
@@ -17,7 +17,7 @@ class event_전투특기_척사 extends \sammo\BaseItem{
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
|
||||
return [1.2, 0.8];
|
||||
}
|
||||
return [1, 1];
|
||||
|
||||
@@ -21,7 +21,7 @@ class che_event_척사 extends \sammo\BaseSpecial{
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
|
||||
return [1.2, 0.8];
|
||||
}
|
||||
return [1, 1];
|
||||
|
||||
@@ -21,7 +21,7 @@ class che_척사 extends \sammo\BaseSpecial{
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
if($opposeCrewType->reqCities() || $opposeCrewType->reqRegions()){
|
||||
return [1.2, 0.8];
|
||||
}
|
||||
return [1, 1];
|
||||
|
||||
@@ -5,6 +5,7 @@ use \sammo\{
|
||||
Util, JosaUtil, DB,
|
||||
General, GameConst,
|
||||
ActionLogger,
|
||||
Json,
|
||||
LastTurn,
|
||||
NotInheritedMethodException,
|
||||
RandUtil
|
||||
@@ -118,6 +119,7 @@ abstract class BaseCommand{
|
||||
$nationID = $this->generalObj->getNationID();
|
||||
if($nationID == 0){
|
||||
$this->nation = $this->generalObj->getStaticNation();
|
||||
$this->nation['aux'] = [];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,7 +140,8 @@ abstract class BaseCommand{
|
||||
'gold'=>0,
|
||||
'rice'=>2000,
|
||||
'tech'=>0,
|
||||
'gennum'=>1
|
||||
'gennum'=>1,
|
||||
'aux'=>'{}',
|
||||
];
|
||||
|
||||
if($this->nation && $this->nation['nation'] === $nationID){
|
||||
@@ -170,6 +173,10 @@ abstract class BaseCommand{
|
||||
else{
|
||||
$this->nation = $nation;
|
||||
}
|
||||
|
||||
if(is_string($this->nation['aux'] ?? null)){
|
||||
$this->nation['aux'] = Json::decode($this->nation['aux']);
|
||||
}
|
||||
}
|
||||
|
||||
protected function setDestGeneral(General $destGeneralObj){
|
||||
@@ -312,12 +319,12 @@ abstract class BaseCommand{
|
||||
|
||||
$this->generalObj->unpackAux();
|
||||
$constraintInput = [
|
||||
'general'=>$this->generalObj->getRaw(),
|
||||
'general'=>$this->generalObj,
|
||||
'city'=>$this->city,
|
||||
'nation'=>$this->nation,
|
||||
'cmd_arg'=>$this->arg,
|
||||
|
||||
'destGeneral'=>$this->destGeneralObj?$this->destGeneralObj->getRaw():null,
|
||||
'destGeneral'=>$this->destGeneralObj??null,
|
||||
'destCity'=>$this->destCity,
|
||||
'destNation'=>$this->destNation,
|
||||
];
|
||||
@@ -346,12 +353,12 @@ abstract class BaseCommand{
|
||||
|
||||
$this->generalObj->unpackAux();
|
||||
$constraintInput = [
|
||||
'general'=>$this->generalObj->getRaw(),
|
||||
'general'=>$this->generalObj,
|
||||
'city'=>$this->city,
|
||||
'nation'=>$this->nation,
|
||||
'cmd_arg'=>$this->arg,
|
||||
|
||||
'destGeneral'=>$this->destGeneralObj?$this->destGeneralObj->getRaw():null,
|
||||
'destGeneral'=>$this->destGeneralObj??null,
|
||||
'destCity'=>$this->destCity,
|
||||
'destNation'=>$this->destNation,
|
||||
];
|
||||
@@ -384,12 +391,12 @@ abstract class BaseCommand{
|
||||
|
||||
$this->generalObj->unpackAux();
|
||||
$constraintInput = [
|
||||
'general'=>$this->generalObj->getRaw(),
|
||||
'general'=>$this->generalObj,
|
||||
'city'=>$this->city,
|
||||
'nation'=>$this->nation,
|
||||
'cmd_arg'=>$this->arg,
|
||||
|
||||
'destGeneral'=>$this->destGeneralObj?$this->destGeneralObj->getRaw():null,
|
||||
'destGeneral'=>$this->destGeneralObj??null,
|
||||
'destCity'=>$this->destCity,
|
||||
'destNation'=>$this->destNation,
|
||||
];
|
||||
|
||||
@@ -183,7 +183,7 @@ class che_건국 extends Command\GeneralCommand
|
||||
$general->addExperience($exp);
|
||||
$general->addDedication($ded);
|
||||
|
||||
$aux = Json::decode($this->nation['aux']) ?? [];
|
||||
$aux = $this->nation['aux'];
|
||||
$aux['can_국기변경'] = 1;
|
||||
|
||||
$db->update('city', [
|
||||
|
||||
@@ -194,7 +194,7 @@ class che_무작위건국 extends Command\GeneralCommand
|
||||
$general->addExperience($exp);
|
||||
$general->addDedication($ded);
|
||||
|
||||
$aux = Json::decode($this->nation['aux']) ?? [];
|
||||
$aux = $this->nation['aux'];
|
||||
$aux['can_국기변경'] = 1;
|
||||
$aux['can_무작위수도이전'] = 1;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ class che_징병 extends Command\GeneralCommand
|
||||
protected function init()
|
||||
{
|
||||
$this->setCity();
|
||||
$this->setNation(['tech']);
|
||||
$this->setNation(['tech', 'aux']);
|
||||
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::NotBeNeutral(),
|
||||
@@ -256,8 +256,11 @@ class che_징병 extends Command\GeneralCommand
|
||||
$ownCities = [];
|
||||
$ownRegions = [];
|
||||
|
||||
foreach (DB::db()->query('SELECT city, region from city where nation = %i', $general->getNationID()) as $city) {
|
||||
$ownCities[$city['city']] = 1;
|
||||
foreach (DB::db()->query('SELECT city, region, secu, level from city where nation = %i', $general->getNationID()) as $city) {
|
||||
$ownCities[$city['city']] = [
|
||||
'secu' => $city['secu'],
|
||||
'level' => $city['level'],
|
||||
];
|
||||
$ownRegions[$city['region']] = 1;
|
||||
}
|
||||
|
||||
@@ -273,23 +276,19 @@ class che_징병 extends Command\GeneralCommand
|
||||
'values' => [],
|
||||
];
|
||||
|
||||
$crewTypes = [];
|
||||
foreach (GameUnitConst::byType($armType) as $unit) {
|
||||
$crewObj = new \stdClass;
|
||||
|
||||
$crewObj->id = $unit->id;
|
||||
$crewObj->reqTech = $unit->reqTech;
|
||||
$crewObj->reqYear = $unit->reqYear;
|
||||
/** @var ?\sammo\GameUnitConstraints\ReqTech */
|
||||
$reqTechObj = $unit->reqConstraints['ReqTech'] ?? null;
|
||||
$crewObj->reqTech = $reqTechObj ? $reqTechObj->reqTech : 0;
|
||||
|
||||
/*
|
||||
if ($unit->reqTech == 0) {
|
||||
$crewObj->bgcolor = 'green';
|
||||
} else {
|
||||
$crewObj->bgcolor = 'limegreen';
|
||||
}
|
||||
*/
|
||||
/** @var ?\sammo\GameUnitConstraint\ReqMinRelYear */
|
||||
$reqMinRelYearObj = $unit->reqConstraints['reqMinRelYear'] ?? null;
|
||||
$crewObj->reqYear = $reqMinRelYearObj ? $reqMinRelYearObj->reqMinRelYear : 0;
|
||||
|
||||
$crewObj->notAvailable = !$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech);
|
||||
$crewObj->notAvailable = !$unit->isValid($general, $ownCities, $ownRegions, $relativeYear, $tech, $this->nation['aux']);
|
||||
|
||||
$crewObj->baseRice = $general->onCalcDomestic($this->getName(), 'rice', $unit->riceWithTech($tech), ['armType' => $unit->armType]);
|
||||
$crewObj->baseCost = $general->onCalcDomestic($this->getName(), 'cost', $unit->costWithTech($tech), ['armType' => $unit->armType]);
|
||||
|
||||
@@ -180,7 +180,7 @@ class cr_건국 extends Command\GeneralCommand
|
||||
$general->addExperience($exp);
|
||||
$general->addDedication($ded);
|
||||
|
||||
$aux = Json::decode($this->nation['aux']) ?? [];
|
||||
$aux = $this->nation['aux'];
|
||||
$aux['can_국기변경'] = 1;
|
||||
|
||||
$db->update('city', [
|
||||
|
||||
@@ -122,7 +122,7 @@ class che_국기변경 extends Command\NationCommand
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
$josaYiNation = JosaUtil::pick($nationName, '이');
|
||||
|
||||
$aux = Json::decode($this->nation['aux']);
|
||||
$aux = $this->nation['aux'];
|
||||
$aux["can_{$actionName}"] = 0;
|
||||
|
||||
$db->update('nation', [
|
||||
|
||||
@@ -140,7 +140,7 @@ class che_국호변경 extends Command\NationCommand
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
$josaYiNation = JosaUtil::pick($nationName, '이');
|
||||
|
||||
$aux = Json::decode($this->nation['aux']);
|
||||
$aux = $this->nation['aux'];
|
||||
$aux["can_{$actionName}"] = 0;
|
||||
|
||||
$db->update('nation', [
|
||||
|
||||
@@ -119,7 +119,7 @@ class che_무작위수도이전 extends Command\NationCommand
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
$josaYiNation = JosaUtil::pick($nationName, '이');
|
||||
|
||||
$aux = Json::decode($this->nation['aux']);
|
||||
$aux = $this->nation['aux'];
|
||||
$aux["can_무작위수도이전"] -= 1;
|
||||
|
||||
$db->update('city', [
|
||||
|
||||
@@ -13,12 +13,14 @@ use \sammo\{
|
||||
Message,
|
||||
CityConst,
|
||||
CityInitialDetail,
|
||||
Json,
|
||||
StaticEventHandler
|
||||
};
|
||||
|
||||
use \sammo\Constraint\Constraint;
|
||||
use \sammo\Constraint\ConstraintHelper;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use sammo\Event\Action;
|
||||
|
||||
class che_초토화 extends Command\NationCommand{
|
||||
@@ -52,7 +54,7 @@ class che_초토화 extends Command\NationCommand{
|
||||
$env = $this->env;
|
||||
|
||||
$this->setCity();
|
||||
$this->setNation(['surlimit', 'gold', 'rice', 'capital']);
|
||||
$this->setNation(['surlimit', 'gold', 'rice', 'capital', 'aux']);
|
||||
|
||||
$this->minConditionConstraints=[
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
@@ -157,6 +159,11 @@ class che_초토화 extends Command\NationCommand{
|
||||
$josaYiNation = JosaUtil::pick($nationName, '이');
|
||||
|
||||
$amount = $this->calcReturnAmount($destCity);
|
||||
$aux = $this->nation['aux'];
|
||||
|
||||
if($destCity['level'] >= 8){
|
||||
$aux[NationAuxKey::did_특성초토화->value] = $aux[NationAuxKey::did_특성초토화->value] ?? 0 + 1;
|
||||
}
|
||||
|
||||
$db->update('general', [
|
||||
'experience'=>$db->sqleval('experience * 0.9')
|
||||
@@ -184,6 +191,7 @@ class che_초토화 extends Command\NationCommand{
|
||||
'gold' => $db->sqleval('gold + %i', $amount),
|
||||
'rice' => $db->sqleval('rice + %i', $amount),
|
||||
'surlimit' => $db->sqleval('surlimit + %i', $this->getPostReqTurn()),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
\sammo\refreshNationStaticInfo();
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_극병연구 extends Command\NationCommand{
|
||||
static protected $actionName = '극병 연구';
|
||||
static protected $auxType = NationAuxKey::can_극병사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 23;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [100000, 100000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_대검병연구 extends Command\NationCommand{
|
||||
static protected $actionName = '대검병 연구';
|
||||
static protected $auxType = NationAuxKey::can_대검병사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 11;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [50000, 50000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_무희연구 extends Command\NationCommand{
|
||||
static protected $actionName = '무희 연구';
|
||||
static protected $auxType = NationAuxKey::can_무희사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 23;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [100000, 100000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_산저병연구 extends Command\NationCommand{
|
||||
static protected $actionName = '산저병 연구';
|
||||
static protected $auxType = NationAuxKey::can_산저병사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 11;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [50000, 50000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_상병연구 extends Command\NationCommand{
|
||||
static protected $actionName = '상병 연구';
|
||||
static protected $auxType = NationAuxKey::can_상병사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 23;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [100000, 100000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_원융노병연구 extends Command\NationCommand{
|
||||
static protected $actionName = '원융노병 연구';
|
||||
static protected $auxType = NationAuxKey::can_원융노병사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 23;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [100000, 100000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_음귀병연구 extends Command\NationCommand{
|
||||
static protected $actionName = '음귀병 연구';
|
||||
static protected $auxType = NationAuxKey::can_음귀병사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 11;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [50000, 50000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_화륜차연구 extends Command\NationCommand{
|
||||
static protected $actionName = '화륜차 연구';
|
||||
static protected $auxType = NationAuxKey::can_화륜차사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 23;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [100000, 100000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
namespace sammo\Command\Nation;
|
||||
|
||||
use \sammo\Command;
|
||||
use sammo\Constraint\ConstraintHelper;
|
||||
use sammo\DB;
|
||||
use sammo\Enums\InheritanceKey;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use \sammo\Util;
|
||||
use \sammo\JosaUtil;
|
||||
use sammo\Json;
|
||||
use sammo\LastTurn;
|
||||
use sammo\StaticEventHandler;
|
||||
use sammo\GameConst;
|
||||
|
||||
class event_화시병연구 extends Command\NationCommand{
|
||||
static protected $actionName = '화시병 연구';
|
||||
static protected $auxType = NationAuxKey::can_화시병사용;
|
||||
|
||||
protected function argTest():bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function init(){
|
||||
$this->setCity();
|
||||
$this->setNation(['gold','rice','aux']);
|
||||
$this->fullConditionConstraints=[];
|
||||
|
||||
$name = static::$actionName;
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$this->minConditionConstraints = [
|
||||
ConstraintHelper::OccupiedCity(),
|
||||
ConstraintHelper::BeChief(),
|
||||
ConstraintHelper::ReqNationAuxValue(static::$auxType->value, 0, "<", 1, "{$name}가 이미 완료되었습니다."),
|
||||
ConstraintHelper::ReqNationGold(GameConst::$basegold + $reqGold),
|
||||
ConstraintHelper::ReqNationRice(GameConst::$baserice + $reqRice),
|
||||
];
|
||||
|
||||
$this->fullConditionConstraints = $this->minConditionConstraints;
|
||||
}
|
||||
|
||||
public function getCommandDetailTitle():string{
|
||||
$name = $this->getName();
|
||||
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
$reqTurn = $this->getPreReqTurn()+1;
|
||||
|
||||
$reqGoldD5 = number_format($reqGold / 10000);
|
||||
$reqRiceD5 = number_format($reqRice / 10000);
|
||||
|
||||
return "{$name}/{$reqTurn}턴(금/쌀 {$reqGoldD5}만)";
|
||||
}
|
||||
|
||||
public function getPreReqTurn():int{
|
||||
return 11;
|
||||
}
|
||||
|
||||
public function getPostReqTurn():int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getCost():array{
|
||||
return [50000, 50000];
|
||||
}
|
||||
|
||||
public function run(\Sammo\RandUtil $rng):bool{
|
||||
if(!$this->hasFullConditionMet()){
|
||||
throw new \RuntimeException('불가능한 커맨드를 강제로 실행 시도');
|
||||
}
|
||||
|
||||
$db = DB::db();
|
||||
$general = $this->generalObj;
|
||||
$nationID = $general->getNationID();
|
||||
|
||||
$actionName = static::$actionName;
|
||||
|
||||
$aux = $this->nation['aux'];
|
||||
$aux[static::$auxType->value] = 1;
|
||||
[$reqGold, $reqRice] = $this->getCost();
|
||||
|
||||
$logger = $general->getLogger();
|
||||
|
||||
$general->addExperience(5 * ($this->getPreReqTurn() + 1));
|
||||
$general->addDedication(5 * ($this->getPreReqTurn() + 1));
|
||||
|
||||
$generalName = $general->getName();
|
||||
$josaYi = JosaUtil::pick($generalName, '이');
|
||||
|
||||
$db->update('nation', [
|
||||
'gold' => $db->sqleval('gold - %i', $reqGold),
|
||||
'rice' => $db->sqleval('rice - %i', $reqRice),
|
||||
'aux' => Json::encode($aux),
|
||||
], 'nation=%i', $nationID);
|
||||
|
||||
$logger->pushGeneralActionLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushGeneralHistoryLog("<M>{$actionName}</> 완료");
|
||||
$logger->pushNationalHistoryLog("<Y>{$generalName}</>{$josaYi} <M>{$actionName}</> 완료");
|
||||
|
||||
$general->increaseInheritancePoint(InheritanceKey::active_action, 1);
|
||||
StaticEventHandler::handleEvent($this->generalObj, $this->destGeneralObj, $this::class, $this->env, $this->arg ?? []);
|
||||
$this->setResultTurn(new LastTurn($this->getName(), $this->arg, 0));
|
||||
$general->applyDB($db);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,10 @@ use \sammo\GameUnitConst;
|
||||
use \sammo\DB;
|
||||
use \sammo\KVStorage;
|
||||
use \sammo\CityConst;
|
||||
use sammo\Json;
|
||||
|
||||
class AvailableRecruitCrewType extends Constraint{
|
||||
const REQ_VALUES = Constraint::REQ_NATION|Constraint::REQ_INT_ARG;
|
||||
const REQ_VALUES = Constraint::REQ_GENERAL|Constraint::REQ_NATION|Constraint::REQ_INT_ARG;
|
||||
|
||||
public function checkInputValues(bool $throwExeception=true):bool{
|
||||
if(!parent::checkInputValues($throwExeception) && !$throwExeception){
|
||||
@@ -47,13 +48,22 @@ class AvailableRecruitCrewType extends Constraint{
|
||||
|
||||
$ownCities = [];
|
||||
$ownRegions = [];
|
||||
foreach($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i', $nationID) as $ownCity){
|
||||
$ownCities[$ownCity] = 1;
|
||||
$ownRegions[CityConst::byId($ownCity)->region] = 1;
|
||||
foreach($db->query('SELECT city, region, secu, level FROM city WHERE nation = %i', $nationID) as $ownCity){
|
||||
$ownCityID = $ownCity['city'];
|
||||
$ownCities[$ownCityID] = [
|
||||
'secu'=>$ownCity['secu'],
|
||||
'level'=>$ownCity['level'],
|
||||
];
|
||||
$ownRegions[CityConst::byId($ownCityID)->region] = 1;
|
||||
}
|
||||
|
||||
$nationAux = $this->nation['aux'] ?? null;
|
||||
if($nationAux === null){
|
||||
$nationAux = Json::decode($db->queryFirstField('SELECT aux FROM nation WHERE id = %i', $nationID) ?? "{}");
|
||||
}
|
||||
|
||||
$crewType = GameUnitConst::byID($this->arg);
|
||||
if($crewType->isValid($ownCities, $ownRegions, $year - $startyear, $tech)){
|
||||
if($crewType->isValid($this->generalObj, $ownCities, $ownRegions, $year - $startyear, $tech, $nationAux)){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace sammo\Constraint;
|
||||
|
||||
use sammo\General;
|
||||
|
||||
abstract class Constraint
|
||||
{
|
||||
private function __construct()
|
||||
@@ -24,6 +26,8 @@ abstract class Constraint
|
||||
|
||||
const REQ_VALUES = 0;
|
||||
|
||||
/** @var ?General */
|
||||
protected $generalObj = null;
|
||||
protected $general = null;
|
||||
protected $city = null;
|
||||
protected $nation = null;
|
||||
@@ -33,6 +37,8 @@ abstract class Constraint
|
||||
|
||||
protected $cmd_arg = null;
|
||||
|
||||
/** @var ?General */
|
||||
protected $destGeneralObj = null;
|
||||
protected $destGeneral = null;
|
||||
protected $destCity = null;
|
||||
protected $destNation = null;
|
||||
@@ -48,9 +54,10 @@ abstract class Constraint
|
||||
return static::REQ_VALUES;
|
||||
}
|
||||
|
||||
public function setGeneral(array $general)
|
||||
public function setGeneral(General $general)
|
||||
{
|
||||
$this->general = $general;
|
||||
$this->generalObj = $general;
|
||||
$this->general = $general->getRaw();
|
||||
$this->tested = false;
|
||||
$this->reason = null;
|
||||
}
|
||||
@@ -85,9 +92,10 @@ abstract class Constraint
|
||||
$this->reason = null;
|
||||
}
|
||||
|
||||
public function setDestGeneral(array $general)
|
||||
public function setDestGeneral(General $general)
|
||||
{
|
||||
$this->destGeneral = $general;
|
||||
$this->destGeneralObj = $general;
|
||||
$this->destGeneral = $general->getRaw();
|
||||
$this->tested = false;
|
||||
$this->reason = null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\Enums;
|
||||
|
||||
// Nation['aux'] 에서 지정될 수 있는 키
|
||||
|
||||
enum NationAuxKey: string
|
||||
{
|
||||
case can_국기변경 = 'can_국기변경';
|
||||
case can_국호변경 = 'can_국호변경';
|
||||
case did_특성초토화 = 'did_특성초토화';
|
||||
|
||||
|
||||
// 이벤트
|
||||
case can_무작위수도이전 = 'can_무작위수도이전';
|
||||
|
||||
case can_대검병사용 = 'can_대검병사용';
|
||||
case can_극병사용 = 'can_극병사용';
|
||||
case can_화시병사용 = 'can_화시병사용';
|
||||
case can_원융노병사용 = 'can_원융노병사용';
|
||||
case can_산저병사용 = 'can_산저병사용';
|
||||
case can_상병사용 = 'can_상병사용';
|
||||
case can_음귀병사용 = 'can_음귀병사용';
|
||||
case can_무희사용 = 'can_무희사용';
|
||||
case can_화륜차사용 = 'can_화륜차사용';
|
||||
}
|
||||
+56
-124
@@ -1,6 +1,13 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
use sammo\GameUnitConstraint\Impossible;
|
||||
use sammo\GameUnitConstraint\ReqTech;
|
||||
use sammo\GameUnitConstraint\ReqCities;
|
||||
use sammo\GameUnitConstraint\ReqRegions;
|
||||
use sammo\GameUnitConstraint\ReqMinRelYear;
|
||||
|
||||
|
||||
class GameUnitConstBase{
|
||||
protected function __construct(){
|
||||
|
||||
@@ -21,8 +28,6 @@ class GameUnitConstBase{
|
||||
|
||||
protected static $constID = [];
|
||||
protected static $constName = [];
|
||||
protected static $constCity = [];
|
||||
protected static $constRegion = [];
|
||||
protected static $constType = [];
|
||||
|
||||
protected static $typeData = [
|
||||
@@ -33,12 +38,13 @@ class GameUnitConstBase{
|
||||
self::T_SIEGE => '차병',
|
||||
];
|
||||
|
||||
protected static $_buildData = [
|
||||
protected static function getBuildData(): array {
|
||||
return [
|
||||
[
|
||||
1000, self::T_CASTLE, '성벽',
|
||||
100, 100, 7, 0, 0, 99, 9,
|
||||
999999, null, null, 999999,
|
||||
[],//성벽은 공격할 수 없다.
|
||||
[new Impossible()],
|
||||
[], // 성벽은 공격할 수 없다.
|
||||
[self::T_FOOTMAN=>1.2],
|
||||
['성벽입니다.','생성할 수 없습니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
@@ -47,7 +53,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1100, self::T_FOOTMAN, '보병',
|
||||
100, 150, 7, 10, 0, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 보병입니다.','보병은 방어특화이며,','상대가 회피하기 어렵습니다.'],
|
||||
@@ -56,7 +62,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1101, self::T_FOOTMAN, '청주병',
|
||||
100, 200, 7, 10, 0, 10, 11,
|
||||
1000, null, ['중원'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('중원')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['저렴하고 튼튼합니다.'],
|
||||
@@ -65,7 +71,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1102, self::T_FOOTMAN, '수병',
|
||||
150, 150, 7, 10, 0, 11, 10,
|
||||
1000, null, ['오월'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('오월')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['저렴하고 강력합니다.'],
|
||||
@@ -74,7 +80,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1103, self::T_FOOTMAN, '자객병',
|
||||
100, 150, 8, 20, 0, 10, 10,
|
||||
2000, ['저'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('저')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['은밀하고 날쌥니다.'],
|
||||
@@ -83,7 +89,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1104, self::T_FOOTMAN, '근위병',
|
||||
150, 200, 7, 10, 0, 12, 12,
|
||||
3000, ['낙양'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('낙양')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['최강의 보병입니다.'],
|
||||
@@ -92,7 +98,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1105, self::T_FOOTMAN, '등갑병',
|
||||
100, 225, 7, 5, 0, 13, 10,
|
||||
1000, null, ['남중'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('남중')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['등갑을 두른 보병입니다.'],
|
||||
@@ -101,7 +107,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1106, self::T_FOOTMAN, '백이병',
|
||||
175, 175, 7, 5, 0, 13, 11,
|
||||
3000, ['성도'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_ARCHER=>1.1, self::T_CAVALRY=>0.9, self::T_SIEGE=>1.1],
|
||||
[self::T_ARCHER=>0.9, self::T_CAVALRY=>1.1, self::T_SIEGE=>0.9],
|
||||
['정예 보병입니다. 불리한 싸움도 버텨냅니다.'],
|
||||
@@ -111,7 +117,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1200, self::T_ARCHER, '궁병',
|
||||
100, 100, 7, 10, 0, 10, 10,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 궁병입니다.','궁병은 선제사격을 하는 병종입니다.'],
|
||||
@@ -120,7 +126,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1201, self::T_ARCHER, '궁기병',
|
||||
100, 100, 8, 20, 0, 11, 12,
|
||||
1000, null, ['동이'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('동이')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.9, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.1, self::T_SIEGE=>0.8],
|
||||
['말을 타고 잘 피합니다. 특히 다른 궁병보다 보병에게 조금 더 강합니다.'],
|
||||
@@ -129,7 +135,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1202, self::T_ARCHER, '연노병',
|
||||
150, 100, 8, 10, 0, 12, 11,
|
||||
1000, null, ['서촉'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('서촉')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['화살을 연사합니다.'],
|
||||
@@ -138,7 +144,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1203, self::T_ARCHER, '강궁병',
|
||||
150, 150, 7, 10, 0, 13, 13,
|
||||
3000, ['양양'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('양양')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['강건한 궁병입니다.'],
|
||||
@@ -147,7 +153,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1204, self::T_ARCHER, '석궁병',
|
||||
200, 100, 7, 10, 0, 13, 13,
|
||||
3000, ['건업'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('건업')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['강력한 화살을 쏩니다.'],
|
||||
@@ -157,7 +163,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1300, self::T_CAVALRY, '기병',
|
||||
150, 100, 7, 5, 0, 11, 11,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 기병입니다.','기병은 공격특화입니다.'],
|
||||
@@ -166,7 +172,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1301, self::T_CAVALRY, '백마병',
|
||||
200, 100, 7, 5, 0, 12, 13,
|
||||
1000, null, ['하북'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('하북')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['백마의 위용을 보여줍니다.'],
|
||||
@@ -175,7 +181,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1302, self::T_CAVALRY, '중장기병',
|
||||
150, 150, 7, 5, 0, 13, 12,
|
||||
1000, null, ['서북'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('서북')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['갑주를 두른 기병입니다.'],
|
||||
@@ -184,7 +190,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1303, self::T_CAVALRY, '돌격기병',
|
||||
200, 100, 8, 5, 0, 13, 11,
|
||||
2000, ['흉노'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('흉노')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['저돌적으로 공격합니다.'],
|
||||
@@ -193,7 +199,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1304, self::T_CAVALRY, '철기병',
|
||||
100, 250, 7, 5, 0, 11, 13,
|
||||
2000, ['강'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('강')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['철갑을 두른 기병입니다.'],
|
||||
@@ -202,7 +208,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1305, self::T_CAVALRY, '수렵기병',
|
||||
150, 100, 8, 15, 0, 12, 12,
|
||||
2000, ['산월'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('산월')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['날쎄고 빠른 기병입니다.'],
|
||||
@@ -211,7 +217,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1306, self::T_CAVALRY, '맹수병',
|
||||
250, 175, 6, 0, 0, 16, 16,
|
||||
2000, ['남만'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('남만')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['어느 누구보다 강력합니다.'],
|
||||
@@ -220,7 +226,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1307, self::T_CAVALRY, '호표기병',
|
||||
200, 150, 7, 5, 0, 14, 14,
|
||||
3000, ['허창'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('허창')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['정예 기병입니다.'],
|
||||
@@ -230,7 +236,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1400, self::T_WIZARD, '귀병',
|
||||
80, 80, 7, 5, 0.5, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['계략을 사용하는 병종입니다.'],
|
||||
@@ -239,7 +245,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1401, self::T_WIZARD, '신귀병',
|
||||
80, 80, 7, 20, 0.6, 10, 10,
|
||||
1000, null, ['초'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('초')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['신출귀몰한 귀병입니다.'],
|
||||
@@ -248,7 +254,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1402, self::T_WIZARD, '백귀병',
|
||||
80, 130, 7, 5, 0.6, 9, 11,
|
||||
2000, ['오환'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('오환')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['저렴하고 튼튼합니다.'],
|
||||
@@ -257,7 +263,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1403, self::T_WIZARD, '흑귀병',
|
||||
130, 80, 7, 5, 0.6, 11, 9,
|
||||
2000, ['왜'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('왜')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['저렴하고 강력합니다.'],
|
||||
@@ -266,7 +272,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1404, self::T_WIZARD, '악귀병',
|
||||
130, 130, 7, 0, 0.6, 12, 12,
|
||||
3000, ['장안'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('장안')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['백병전에도 능숙합니다.'],
|
||||
@@ -275,7 +281,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1405, self::T_WIZARD, '남귀병',
|
||||
60, 60, 7, 10, 0.8, 8, 8,
|
||||
1000, null, null, 0,
|
||||
[new ReqTech(1000)],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['전투를 포기하고 계략에 몰두합니다.'],
|
||||
@@ -284,7 +290,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1406, self::T_WIZARD, '황귀병',
|
||||
110, 110, 7, 0, 0.8, 13, 10,
|
||||
3000, ['낙양'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('낙양')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['고도로 훈련된 귀병입니다.'],
|
||||
@@ -293,7 +299,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1407, self::T_WIZARD, '천귀병',
|
||||
80, 130, 7, 15, 0.6, 11, 12,
|
||||
3000, ['성도'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['갑주를 두른 귀병입니다.'],
|
||||
@@ -302,7 +308,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1408, self::T_WIZARD, '마귀병',
|
||||
130, 80, 7, 15, 0.6, 12, 11,
|
||||
3000, ['업'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('업')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['날카로운 무기를 가진 귀병입니다.'],
|
||||
@@ -312,7 +318,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1500, self::T_SIEGE, '정란',
|
||||
100, 100, 6, 0, 0, 14, 5,
|
||||
0, null, null, 3,
|
||||
[new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
|
||||
['높은 구조물 위에서 공격합니다. 첫 공격은 성벽을 향합니다.'],
|
||||
@@ -321,7 +327,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1501, self::T_SIEGE, '충차',
|
||||
150, 100, 6, 0, 0, 18, 5,
|
||||
1000, null, null, 3,
|
||||
[new ReqTech(1000), new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>2.4],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
|
||||
['엄청난 위력으로 성벽을 부수어버립니다.'],
|
||||
@@ -330,7 +336,7 @@ class GameUnitConstBase{
|
||||
[
|
||||
1502, self::T_SIEGE, '벽력거',
|
||||
150, 100, 6, 5, 0, 20, 5,
|
||||
3000, ['업'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('업')],
|
||||
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
|
||||
['상대에게 돌덩이를 날립니다. 첫 공격은 성벽을 향합니다.'],
|
||||
@@ -339,13 +345,15 @@ class GameUnitConstBase{
|
||||
[
|
||||
1503, self::T_SIEGE, '목우',
|
||||
50, 200, 5, 0, 0, 15, 5,
|
||||
3000, ['성도'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, self::T_CASTLE=>1.8],
|
||||
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, 1106=>1],
|
||||
['상대를 저지하는 특수병기입니다.'],
|
||||
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public static function addGameUnit(GameUnitDetail $unitType){
|
||||
static::_generate();
|
||||
@@ -357,22 +365,6 @@ class GameUnitConstBase{
|
||||
static::$constType[$unitType->armType] = [];
|
||||
}
|
||||
static::$constType[$unitType->armType][] = $unitType;
|
||||
|
||||
foreach($unitType->reqCities as $reqCity){
|
||||
if(!key_exists($reqCity, static::$constCity)){
|
||||
static::$constCity[$reqCity] = [];
|
||||
}
|
||||
static::$constCity[$reqCity][] = $unitType;
|
||||
}
|
||||
|
||||
if($unitType->reqRegions){
|
||||
foreach($unitType->reqRegions as $reqRegion){
|
||||
if(!key_exists($reqRegion, static::$constRegion)){
|
||||
static::$constRegion[$reqRegion] = [];
|
||||
}
|
||||
static::$constRegion[$reqRegion][] = $unitType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -400,22 +392,6 @@ class GameUnitConstBase{
|
||||
return static::$constName[$name]??null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \sammo\GameUnitDetail[]
|
||||
*/
|
||||
public static function byCity(int $city): array{
|
||||
static::_generate();
|
||||
return static::$constCity[$city]??[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \sammo\GameUnitDetail[]
|
||||
*/
|
||||
public static function byRegion(int $region): array{
|
||||
static::_generate();
|
||||
return static::$constRegion[$region]??[];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return \sammo\GameUnitDetail[]
|
||||
@@ -435,17 +411,17 @@ class GameUnitConstBase{
|
||||
|
||||
protected static function _generate(){
|
||||
|
||||
if(static::$constID || static::$constName || static::$constCity || static::$constRegion || static::$constType){
|
||||
if(static::$constID || static::$constName || static::$constType){
|
||||
return;
|
||||
}
|
||||
|
||||
$constID = [];
|
||||
$constName = [];
|
||||
$constCity = [];
|
||||
$constRegion = [];
|
||||
$constType = [];
|
||||
|
||||
foreach(static::$_buildData as $rawUnit){
|
||||
$buildData = static::getBuildData();
|
||||
|
||||
foreach($buildData as $rawUnit){
|
||||
[
|
||||
$id,
|
||||
$armType,
|
||||
@@ -457,10 +433,7 @@ class GameUnitConstBase{
|
||||
$magicCoef,
|
||||
$cost,
|
||||
$rice,
|
||||
$reqTech,
|
||||
$reqCities,
|
||||
$reqRegions,
|
||||
$reqYear,
|
||||
$reqConstraints,
|
||||
$attackCoef,
|
||||
$defenceCoef,
|
||||
$info,
|
||||
@@ -469,26 +442,9 @@ class GameUnitConstBase{
|
||||
$iActionList,
|
||||
] = $rawUnit;
|
||||
|
||||
if($reqYear > 0){
|
||||
$info[] = "{$reqYear}년 경과 후 사용 가능";
|
||||
}
|
||||
|
||||
if($reqTech > 0){
|
||||
$info[] = "기술력 {$reqTech} 이상 필요";
|
||||
}
|
||||
|
||||
if($reqCities !== null){
|
||||
$reqCities = array_map(function($reqCity) use (&$info){
|
||||
$info[] = "{$reqCity} 소유시 가능";
|
||||
return CityConst::byName($reqCity)->id;
|
||||
}, $reqCities);
|
||||
}
|
||||
|
||||
if($reqRegions !== null){
|
||||
$reqRegions = array_map(function($reqRegion) use (&$info){
|
||||
$info[] = "{$reqRegion} 지역 소유시 가능";
|
||||
return CityConst::$regionMap[$reqRegion];
|
||||
}, $reqRegions);
|
||||
foreach($reqConstraints as $constraint){
|
||||
/** @var \sammo\GameUnitConstraint\BaseGameUnitConstraint $constraint */
|
||||
$info[] = $constraint->getInfo();
|
||||
}
|
||||
|
||||
$unit = new GameUnitDetail(
|
||||
@@ -502,16 +458,13 @@ class GameUnitConstBase{
|
||||
$magicCoef,
|
||||
$cost,
|
||||
$rice,
|
||||
$reqTech,
|
||||
$reqCities,
|
||||
$reqRegions,
|
||||
$reqYear,
|
||||
$reqConstraints,
|
||||
$attackCoef,
|
||||
$defenceCoef,
|
||||
$info,
|
||||
$initSkillTrigger,
|
||||
$phaseSkillTrigger,
|
||||
$iActionList,
|
||||
$iActionList
|
||||
);
|
||||
|
||||
$constID[$id] = $unit;
|
||||
@@ -521,31 +474,10 @@ class GameUnitConstBase{
|
||||
}
|
||||
$constType[$armType][$id] = $unit;
|
||||
|
||||
if($unit->reqCities){
|
||||
foreach($unit->reqCities as $reqCity){
|
||||
if(!key_exists($reqCity, $constCity)){
|
||||
$constCity[$reqCity] = [];
|
||||
}
|
||||
$constCity[$reqCity][$id] = $unit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($unit->reqRegions){
|
||||
foreach($unit->reqRegions as $reqRegion){
|
||||
if(!key_exists($reqRegion, $constRegion)){
|
||||
$constRegion[$reqRegion] = [];
|
||||
}
|
||||
$constRegion[$reqRegion][$id] = $unit;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static::$constID = $constID;
|
||||
static::$constName = $constName;
|
||||
static::$constCity = $constCity;
|
||||
static::$constRegion = $constRegion;
|
||||
static::$constType = $constType;
|
||||
|
||||
static::_generateOptional();
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\General;
|
||||
|
||||
abstract class BaseGameUnitConstraint {
|
||||
public abstract function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool;
|
||||
|
||||
public abstract function getInfo(): string;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\General;
|
||||
|
||||
class Impossible extends BaseGameUnitConstraint {
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
return "불가능";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\General;
|
||||
|
||||
class ReqChief extends BaseGameUnitConstraint
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
if($general->getVar('officer_level') >= 5){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
return "군주 및 수뇌부만 가능";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\CityConst;
|
||||
use sammo\General;
|
||||
|
||||
class ReqCities extends BaseGameUnitConstraint
|
||||
{
|
||||
|
||||
public readonly array $reqCities;
|
||||
public function __construct(...$reqCities)
|
||||
{
|
||||
$dstReqCities = [];
|
||||
if (count($reqCities) == 0) {
|
||||
$this->reqCities = [];
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($reqCities as $city) {
|
||||
$dstReqCities[CityConst::byName($city)->id] = $city;
|
||||
}
|
||||
$this->reqCities = $dstReqCities;
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
foreach ($this->reqCities as $cityID => $cityName) {
|
||||
if (key_exists($cityID, $ownCities)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
$cityNameText = implode(', ', $this->reqCities);
|
||||
return "{$cityNameText} 소유시 가능";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\CityConst;
|
||||
use sammo\General;
|
||||
|
||||
use function sammo\getCityLevelList;
|
||||
|
||||
class ReqCitiesWithCityLevel extends BaseGameUnitConstraint
|
||||
{
|
||||
|
||||
public readonly array $reqCities;
|
||||
public function __construct(
|
||||
public readonly int $reqCityLevel,
|
||||
...$reqCities)
|
||||
{
|
||||
$dstReqCities = [];
|
||||
if (count($reqCities) == 0) {
|
||||
$this->reqCities = [];
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($reqCities as $city) {
|
||||
$dstReqCities[CityConst::byName($city)->id] = $city;
|
||||
}
|
||||
$this->reqCities = $dstReqCities;
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
foreach ($this->reqCities as $cityID => $cityName) {
|
||||
if (!key_exists($cityID, $ownCities)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if($ownCities[$cityID]['level'] >= $this->reqCityLevel) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
$cityLevelText = getCityLevelList()[$this->reqCityLevel];
|
||||
$cityNameText = implode(', ', $this->reqCities);
|
||||
return "{$cityNameText} {$cityLevelText}성 소유시 가능";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\General;
|
||||
|
||||
use function sammo\getCityLevelList;
|
||||
|
||||
class ReqHighLevelCities extends BaseGameUnitConstraint
|
||||
{
|
||||
|
||||
public readonly array $reqCities;
|
||||
public function __construct(
|
||||
public readonly int $reqCityLevel,
|
||||
public readonly int $reqCityCount
|
||||
) {}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
$cnt = 0;
|
||||
foreach ($ownCities as $cityItem) {
|
||||
if ($cityItem['level'] >= $this->reqCityLevel) {
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
if($cnt >= $this->reqCityCount) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
$cityLevelText = getCityLevelList()[$this->reqCityLevel];
|
||||
return "{$cityLevelText}성 {$this->reqCityCount}개 이상 소유시 가능";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\General;
|
||||
|
||||
class ReqMinRelYear extends BaseGameUnitConstraint {
|
||||
|
||||
public function __construct(public readonly int $reqMinRelYear)
|
||||
{
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
return $relativeYear >= $this->reqMinRelYear;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
return "{$this->reqMinRelYear}년 경과 후 사용 가능";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\CityConst;
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use sammo\General;
|
||||
|
||||
class ReqNationAux extends BaseGameUnitConstraint
|
||||
{
|
||||
|
||||
const AVAILABLE_CMP = [
|
||||
'==' => true,
|
||||
'!=' => true,
|
||||
'<' => true,
|
||||
'>' => true,
|
||||
'<=' => true,
|
||||
'>=' => true,
|
||||
];
|
||||
|
||||
public function __construct(
|
||||
public readonly NationAuxKey $reqNationAuxKey,
|
||||
public readonly string $cmp,
|
||||
public readonly int|float $value
|
||||
) {
|
||||
if (!array_key_exists($cmp, self::AVAILABLE_CMP)) {
|
||||
throw new \InvalidArgumentException('올바르지 않은 비교연산자입니다');
|
||||
}
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
|
||||
$lhs = $nationAux[$this->reqNationAuxKey->value] ?? 0;
|
||||
$rhs = $this->value;
|
||||
|
||||
$value = false;
|
||||
switch ($this->cmp) {
|
||||
case '==':
|
||||
$value = ($lhs == $rhs);
|
||||
break;
|
||||
case '!=':
|
||||
$value = ($lhs != $rhs);
|
||||
break;
|
||||
case '<=':
|
||||
$value = ($lhs <= $rhs);
|
||||
break;
|
||||
case '>=':
|
||||
$value = ($lhs >= $rhs);
|
||||
break;
|
||||
case '<':
|
||||
$value = ($lhs < $rhs);
|
||||
break;
|
||||
case '>':
|
||||
$value = ($lhs > $rhs);
|
||||
break;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
//Enum별 특수한 경우
|
||||
switch ($this->reqNationAuxKey) {
|
||||
case NationAuxKey::can_대검병사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "대검병 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_극병사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "극병 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_화시병사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "화시병 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_원융노병사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "원융노병 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_산저병사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "산저병 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_상병사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "상병 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_음귀병사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "음귀병 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_무희사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "무희 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::can_화륜차사용:
|
||||
if ($this->cmp == "==" && $this->value == 1) return "화륜차 연구 시 가능";
|
||||
break;
|
||||
case NationAuxKey::did_특성초토화:
|
||||
if ($this->cmp == ">=" && $this->value == 1) return "특성 초토화 시 가능";
|
||||
break;
|
||||
}
|
||||
|
||||
//범용
|
||||
switch ($this->cmp) {
|
||||
case '==': {
|
||||
if ($this->value == 0) {
|
||||
return "{$this->reqNationAuxKey->value} 없을 때";
|
||||
}
|
||||
if ($this->value == 1) {
|
||||
return "{$this->reqNationAuxKey->value} 있을 때";
|
||||
}
|
||||
return "{$this->reqNationAuxKey->value} = {$this->value} 일 때";
|
||||
};
|
||||
case '!=': {
|
||||
if ($this->value == 0) {
|
||||
return "{$this->reqNationAuxKey->value} 없을 때";
|
||||
}
|
||||
if ($this->value == 1) {
|
||||
return "{$this->reqNationAuxKey->value} 있을 때";
|
||||
}
|
||||
return "{$this->reqNationAuxKey->value} != {$this->value} 일 때";
|
||||
};
|
||||
default:
|
||||
return "{$this->reqNationAuxKey->value} {$this->cmp} {$this->value} 일 때";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\General;
|
||||
|
||||
class ReqNotChief extends BaseGameUnitConstraint
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
if($general->getVar('officer_level') < 5){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
return "군주 및 수뇌부는 불가";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\CityConst;
|
||||
use sammo\General;
|
||||
|
||||
class ReqRegions extends BaseGameUnitConstraint
|
||||
{
|
||||
|
||||
public readonly array $reqRegions;
|
||||
public function __construct(...$reqRegions)
|
||||
{
|
||||
$dstReqRegions = [];
|
||||
if (count($reqRegions) == 0) {
|
||||
$this->reqRegions = [];
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($reqRegions as $region) {
|
||||
$dstReqRegions[CityConst::$regionMap[$region]] = $region;
|
||||
}
|
||||
|
||||
$this->reqRegions = $dstReqRegions;
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
foreach ($this->reqRegions as $regionID => $regionText) {
|
||||
if (key_exists($regionID, $ownRegions)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
$regionNameText = implode(', ', $this->reqRegions);
|
||||
return "{$regionNameText} 지역 소유시 가능";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\GameUnitConstraint;
|
||||
|
||||
use sammo\General;
|
||||
use sammo\KVStorage;
|
||||
|
||||
class ReqTech extends BaseGameUnitConstraint {
|
||||
|
||||
public function __construct(public readonly int $reqTech)
|
||||
{
|
||||
}
|
||||
|
||||
public function test(General $general, array $ownCities, array $ownRegions, int $relativeYear, int $tech, array $nationAux): bool
|
||||
{
|
||||
if ($tech < $this->reqTech) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
return "기술력 {$this->reqTech} 이상 필요";
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace sammo;
|
||||
|
||||
use sammo\GameUnitConstraint\BaseGameUnitConstraint;
|
||||
|
||||
class GameUnitDetail implements iAction
|
||||
{
|
||||
use DefaultAction;
|
||||
@@ -16,17 +18,14 @@ class GameUnitDetail implements iAction
|
||||
public $magicCoef;
|
||||
public $cost;
|
||||
public $rice;
|
||||
public $reqTech;
|
||||
public $reqCities;
|
||||
public $reqRegions;
|
||||
public $reqYear;
|
||||
public $attackCoef;
|
||||
public $defenceCoef;
|
||||
public $info;
|
||||
public $initSkillTrigger;
|
||||
public $phaseSkillTrigger;
|
||||
/** @var iAction[]|null iActionList */
|
||||
public $iActionList;
|
||||
public array $reqConstraints;
|
||||
|
||||
|
||||
public function __construct(
|
||||
int $id,
|
||||
@@ -39,13 +38,10 @@ class GameUnitDetail implements iAction
|
||||
float $magicCoef,
|
||||
int $cost,
|
||||
int $rice,
|
||||
int $reqTech,
|
||||
?array $reqCities,
|
||||
?array $reqRegions,
|
||||
int $reqYear,
|
||||
array $reqConstraints,
|
||||
array $attackCoef,
|
||||
array $defenceCoef,
|
||||
array $info,
|
||||
public readonly array $info,
|
||||
?array $initSkillTrigger,
|
||||
?array $phaseSkillTrigger,
|
||||
?array $iActionList,
|
||||
@@ -60,13 +56,18 @@ class GameUnitDetail implements iAction
|
||||
$this->magicCoef = $magicCoef;
|
||||
$this->cost = $cost;
|
||||
$this->rice = $rice;
|
||||
$this->reqTech = $reqTech;
|
||||
$this->reqCities = $reqCities;
|
||||
$this->reqRegions = $reqRegions;
|
||||
$this->reqYear = $reqYear;
|
||||
$this->reqConstraints = [];
|
||||
foreach($reqConstraints as $constraint){
|
||||
$className = Util::getClassNameFromObj($constraint);
|
||||
if(!key_exists($className, $this->reqConstraints)){
|
||||
$this->reqConstraints[$className] = $constraint;
|
||||
}
|
||||
else{
|
||||
$this->reqConstraints[] = $constraint;
|
||||
}
|
||||
}
|
||||
$this->attackCoef = $attackCoef;
|
||||
$this->defenceCoef = $defenceCoef;
|
||||
$this->info = $info;
|
||||
$this->initSkillTrigger = $initSkillTrigger;
|
||||
$this->phaseSkillTrigger = $phaseSkillTrigger;
|
||||
$this->iActionList = [];
|
||||
@@ -79,6 +80,33 @@ class GameUnitDetail implements iAction
|
||||
}
|
||||
}
|
||||
|
||||
public function reqTech(): int {
|
||||
$reqTechObj = $this->reqConstraints['ReqTech'] ?? null;
|
||||
|
||||
if($reqTechObj === null){
|
||||
return 0;
|
||||
}
|
||||
return $reqTechObj->reqTech;
|
||||
}
|
||||
|
||||
public function reqRegions(): ?array {
|
||||
$reqRegionsObj = $this->reqConstraints['ReqRegions'] ?? null;
|
||||
|
||||
if($reqRegionsObj === null){
|
||||
return null;
|
||||
}
|
||||
return $reqRegionsObj->reqRegions;
|
||||
}
|
||||
|
||||
public function reqCities(): ?array {
|
||||
$reqCitiesObj = $this->reqConstraints['ReqCities'] ?? null;
|
||||
|
||||
if($reqCitiesObj === null){
|
||||
return null;
|
||||
}
|
||||
return $reqCitiesObj->reqCities;
|
||||
}
|
||||
|
||||
public function getInfo(): string
|
||||
{
|
||||
return join("\n<br>", $this->info);
|
||||
@@ -193,41 +221,13 @@ class GameUnitDetail implements iAction
|
||||
return $defaultWar;
|
||||
}
|
||||
|
||||
public function isValid($ownCities, $ownRegions, $relativeYear, $tech)
|
||||
public function isValid(General $general, $ownCities, $ownRegions, $relativeYear, $tech, $nationAux)
|
||||
{
|
||||
//음수 없음
|
||||
$relativeYear = max(0, $relativeYear);
|
||||
|
||||
if ($relativeYear < $this->reqYear) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($tech < $this->reqTech) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->reqCities !== null) {
|
||||
$valid = false;
|
||||
foreach ($this->reqCities as $reqCity) {
|
||||
if (\key_exists($reqCity, $ownCities)) {
|
||||
$valid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$valid) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->reqRegions !== null) {
|
||||
$valid = false;
|
||||
foreach ($this->reqRegions as $reqRegion) {
|
||||
if (\key_exists($reqRegion, $ownRegions)) {
|
||||
$valid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$valid) {
|
||||
foreach($this->reqConstraints as $constraint){
|
||||
if(!$constraint->test($general, $ownCities, $ownRegions, $relativeYear, $tech, $nationAux)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-6
@@ -2558,8 +2558,11 @@ class GeneralAI
|
||||
$cities = [];
|
||||
$regions = [];
|
||||
|
||||
foreach ($db->queryAllLists('SELECT city, region FROM city WHERE nation = %i', $nationID) as [$cityID, $regionID]) {
|
||||
$cities[$cityID] = true;
|
||||
foreach ($db->queryAllLists('SELECT city, region, secu, level FROM city WHERE nation = %i', $nationID) as [$cityID, $regionID, $secu, $level]) {
|
||||
$cities[$cityID] = [
|
||||
'secu' => $secu,
|
||||
'level' => $level,
|
||||
];
|
||||
$regions[$regionID] = true;
|
||||
}
|
||||
$relYear = Util::valueFit($env['year'] - $env['startyear'], 0);
|
||||
@@ -2567,7 +2570,7 @@ class GeneralAI
|
||||
|
||||
$types = [];
|
||||
foreach (GameUnitConst::byType($armType) as $crewtype) {
|
||||
if ($crewtype->isValid($cities, $regions, $relYear, $tech)) {
|
||||
if ($crewtype->isValid($general, $cities, $regions, $relYear, $tech, $this->nation['aux'])) {
|
||||
$score = $crewtype->pickScore($tech);
|
||||
$types[$crewtype->id] = $score;
|
||||
}
|
||||
@@ -2581,15 +2584,19 @@ class GeneralAI
|
||||
|
||||
if ($this->generalPolicy->can고급병종) {
|
||||
$currCrewType = $general->getCrewTypeObj();
|
||||
if ($currCrewType->isValid($cities, $regions, $relYear, $tech)) {
|
||||
if ($currCrewType->reqTech >= 2000) {
|
||||
if ($currCrewType->isValid($general, $cities, $regions, $relYear, $tech, $this->nation['aux'])) {
|
||||
$reqTechObj = $currCrewType->reqConstraints['ReqTech'] ?? null;
|
||||
if($reqTechObj){
|
||||
$reqTech = $reqTechObj->reqTech;
|
||||
if ($reqTech >= 2000) {
|
||||
$type = $currCrewType->id;
|
||||
} else if ($currCrewType->armType != $armType && $currCrewType->reqTech >= 1000) {
|
||||
} else if ($currCrewType->armType != $armType && $reqTech >= 1000) {
|
||||
//굳이 뽑은 이유가 있겠지
|
||||
$type = $currCrewType->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//XXX: 훈련, 사기진작 금액을 하드코딩으로 계산중
|
||||
$gold = $general->getVar('gold');
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
{
|
||||
"title":"【공백지】 다병종",
|
||||
"startYear":180,
|
||||
"map":{
|
||||
"mapName":"miniche",
|
||||
"unitSet":"event_more_crewtype"
|
||||
},
|
||||
"history":[
|
||||
],
|
||||
"const": {
|
||||
"joinRuinedNPCProp":0,
|
||||
"npcBanMessageProb":1,
|
||||
"availableSpecialWar":[
|
||||
"che_귀병", "che_신산", "che_환술", "che_집중", "che_신중", "che_반계",
|
||||
"che_보병", "che_궁병", "che_기병", "che_공성",
|
||||
"che_돌격", "che_무쌍", "che_위압",
|
||||
"che_저격", "che_필살", "che_징병", "che_의술", "che_격노", "che_척사"
|
||||
],
|
||||
"availableChiefCommand":{
|
||||
"휴식" : [
|
||||
"휴식"
|
||||
],
|
||||
"인사" : [
|
||||
"che_발령",
|
||||
"che_포상",
|
||||
"che_몰수",
|
||||
"che_부대탈퇴지시"
|
||||
],
|
||||
"외교" : [
|
||||
"che_물자원조",
|
||||
"che_불가침제의",
|
||||
"che_선전포고",
|
||||
"che_종전제의",
|
||||
"che_불가침파기제의"
|
||||
],
|
||||
"특수" : [
|
||||
"che_초토화",
|
||||
"che_천도",
|
||||
"che_증축",
|
||||
"che_감축"
|
||||
],
|
||||
"전략" : [
|
||||
"che_필사즉생",
|
||||
"che_백성동원",
|
||||
"che_수몰",
|
||||
"che_허보",
|
||||
"che_의병모집",
|
||||
"che_이호경식",
|
||||
"che_급습",
|
||||
"che_피장파장"
|
||||
],
|
||||
"기타" : [
|
||||
"che_국기변경",
|
||||
"che_국호변경"
|
||||
],
|
||||
"연구": [
|
||||
"event_대검병연구",
|
||||
"event_극병연구",
|
||||
"event_화시병연구",
|
||||
"event_원융노병연구",
|
||||
"event_산저병연구",
|
||||
"event_음귀병연구",
|
||||
"event_무희연구",
|
||||
"event_상병연구",
|
||||
"event_화륜차연구"
|
||||
]
|
||||
},
|
||||
"allItems":{
|
||||
"horse":{
|
||||
"che_명마_01_노기":0, "che_명마_02_조랑":0, "che_명마_03_노새":0,
|
||||
"che_명마_04_나귀":0, "che_명마_05_갈색마":0, "che_명마_06_흑색마":0,
|
||||
|
||||
"che_명마_07_백마" : 2, "che_명마_07_기주마" : 2, "che_명마_07_오환마" : 2, "che_명마_07_백상" : 2,
|
||||
"che_명마_08_양주마" : 2, "che_명마_08_흉노마" : 2, "che_명마_09_과하마" : 2, "che_명마_09_의남백마" : 2,
|
||||
"che_명마_10_대완마" : 2, "che_명마_10_옥추마" : 2, "che_명마_11_서량마" : 2, "che_명마_11_화종마" : 2,
|
||||
"che_명마_12_사륜거" : 2, "che_명마_12_옥란백용구": 2, "che_명마_13_절영" : 2, "che_명마_13_적로" : 2,
|
||||
"che_명마_14_적란마" : 2, "che_명마_14_조황비전" : 2, "che_명마_15_한혈마" : 2, "che_명마_15_적토마" : 2
|
||||
},
|
||||
"weapon":{
|
||||
"che_무기_01_단도":0, "che_무기_02_단궁":0, "che_무기_03_단극":0,
|
||||
"che_무기_04_목검":0, "che_무기_05_죽창":0, "che_무기_06_소부":0,
|
||||
|
||||
"che_무기_07_동추":2, "che_무기_07_철편":2, "che_무기_07_철쇄":2, "che_무기_07_맥궁":2,
|
||||
"che_무기_08_유성추":2, "che_무기_08_철질여골":2, "che_무기_09_쌍철극":2, "che_무기_09_동호비궁":2,
|
||||
"che_무기_10_삼첨도":2, "che_무기_10_대부":2, "che_무기_11_고정도":2, "che_무기_11_이광궁":2,
|
||||
"che_무기_12_철척사모":2, "che_무기_12_칠성검":2, "che_무기_13_사모":2, "che_무기_13_양유기궁":2,
|
||||
"che_무기_14_언월도":2, "che_무기_14_방천화극":2, "che_무기_15_청홍검":2, "che_무기_15_의천검":2
|
||||
},
|
||||
"book":{
|
||||
"che_서적_01_효경전":0, "che_서적_02_회남자":0, "che_서적_03_변도론":0,
|
||||
"che_서적_04_건상역주":0, "che_서적_05_여씨춘추":0, "che_서적_06_사민월령":0,
|
||||
|
||||
"che_서적_07_위료자":2, "che_서적_07_사마법":2, "che_서적_07_한서":2, "che_서적_07_논어":2,
|
||||
"che_서적_08_전론":2, "che_서적_08_사기":2, "che_서적_09_장자":2, "che_서적_09_역경":2,
|
||||
"che_서적_10_시경":2, "che_서적_10_구국론":2, "che_서적_11_상군서":2, "che_서적_11_춘추전":2,
|
||||
"che_서적_12_산해경":2, "che_서적_12_맹덕신서":2, "che_서적_13_관자":2, "che_서적_13_병법24편":2,
|
||||
"che_서적_14_한비자":2, "che_서적_14_오자병법":2, "che_서적_15_노자":2, "che_서적_15_손자병법":2
|
||||
},
|
||||
"item":{
|
||||
"che_치료_환약":0, "che_저격_수극":0, "che_사기_탁주":0,
|
||||
"che_훈련_청주":0, "che_계략_이추":0, "che_계략_향낭":0,
|
||||
|
||||
"event_전투특기_격노":0, "event_전투특기_공성":0, "event_전투특기_궁병":0,
|
||||
"event_전투특기_귀병":0, "event_전투특기_기병":0, "event_전투특기_돌격":0, "event_전투특기_무쌍":0,
|
||||
"event_전투특기_반계":0, "event_전투특기_보병":0, "event_전투특기_신산":0, "event_전투특기_신중":0,
|
||||
"event_전투특기_위압":0, "event_전투특기_의술":0, "event_전투특기_저격":0, "event_전투특기_집중":0,
|
||||
"event_전투특기_징병":0, "event_전투특기_척사":0, "event_전투특기_필살":0, "event_전투특기_환술":0
|
||||
}
|
||||
}
|
||||
},
|
||||
"events":[
|
||||
[
|
||||
"month", 1000,
|
||||
["or", ["Date", "==", null, 12], ["Date", "==", null, 6]],
|
||||
["CreateManyNPC", 10, 10],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"month", 1000,
|
||||
["Date", "==", 181, 1],
|
||||
["ChangeCity", "occupied", {
|
||||
"trade":100
|
||||
}],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"month", 1000,
|
||||
["Date", "==", 181, 7],
|
||||
["ChangeCity", "occupied", {
|
||||
"trade":100
|
||||
}],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"month", 1000,
|
||||
["Date", "==", 182, 1],
|
||||
["ChangeCity", "occupied", {
|
||||
"trade":100
|
||||
}],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"month", 1000,
|
||||
["Date", "==", 182, 7],
|
||||
["ChangeCity", "occupied", {
|
||||
"trade":100
|
||||
}],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"destroy_nation", 1000,
|
||||
["and",
|
||||
["Date", ">=", 183, 1],
|
||||
["RemainNation", "==", 1]
|
||||
],
|
||||
["BlockScoutAction"],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"month", 1000,
|
||||
["Date", "==", 181, 1],
|
||||
["RaiseNPCNation"],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"month", 999,
|
||||
["Date", "==", 181, 1],
|
||||
["OpenNationBetting", 4, 5000],
|
||||
["OpenNationBetting", 1, 2000],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
"month", 999,
|
||||
["and",
|
||||
["Date", ">=", 183, 1],
|
||||
["RemainNation", "<=", 8]
|
||||
],
|
||||
["OpenNationBetting", 1, 1000],
|
||||
["DeleteEvent"]
|
||||
]
|
||||
]
|
||||
}
|
||||
+15
-10
@@ -1,16 +1,20 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
use sammo\GameUnitConstraint\ReqMinRelYear;
|
||||
use sammo\GameUnitConstraint\ReqTech;
|
||||
|
||||
class GameUnitConst extends GameUnitConstBase
|
||||
{
|
||||
const DEFAULT_CREWTYPE = 1100;
|
||||
|
||||
protected static $_buildData = [
|
||||
protected static function getBuildData(): array {
|
||||
return [
|
||||
[
|
||||
1000, self::T_CASTLE, '성벽',
|
||||
100, 100, 7, 0, 0, 99, 9,
|
||||
999999, null, null, 999999,
|
||||
[],//성벽은 공격할 수 없다.
|
||||
[],
|
||||
[], // 성벽은 공격할 수 없다.
|
||||
[self::T_FOOTMAN=>1.2],
|
||||
['성벽입니다.','생성할 수 없습니다.'],
|
||||
null, null, null
|
||||
@@ -19,7 +23,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1100, self::T_FOOTMAN, '보병',
|
||||
100, 150, 7, 10, 0, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 보병입니다.','보병은 방어특화이며,','상대가 회피하기 어렵습니다.'],
|
||||
@@ -29,7 +33,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1200, self::T_ARCHER, '궁병',
|
||||
100, 100, 7, 20, 0, 10, 10,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 궁병입니다.','궁병은 회피특화입니다.'],
|
||||
@@ -39,7 +43,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1300, self::T_CAVALRY, '기병',
|
||||
150, 100, 7, 5, 0, 11, 11,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 기병입니다.','기병은 공격특화입니다.'],
|
||||
@@ -49,7 +53,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1400, self::T_WIZARD, '귀병',
|
||||
80, 80, 7, 5, 0.5, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['계략을 사용하는 병종입니다.'],
|
||||
@@ -58,7 +62,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1405, self::T_WIZARD, '남귀병',
|
||||
60, 60, 7, 10, 0.8, 8, 8,
|
||||
1000, null, null, 0,
|
||||
[],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['전투를 포기하고 계략에 몰두합니다.'],
|
||||
@@ -68,7 +72,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1500, self::T_SIEGE, '정란',
|
||||
100, 100, 6, 0, 0, 15, 5,
|
||||
0, null, null, 3,
|
||||
[new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>1.8],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
|
||||
['높은 구조물 위에서 공격합니다.'],
|
||||
@@ -77,11 +81,12 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1501, self::T_SIEGE, '충차',
|
||||
150, 100, 6, 0, 0, 20, 5,
|
||||
1000, null, null, 3,
|
||||
[new ReqTech(1000), new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>2.4],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
|
||||
['엄청난 위력으로 성벽을 부수어버립니다.'],
|
||||
['che_성벽부상무효'], null, null
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,21 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
use sammo\GameUnitConstraint\Impossible;
|
||||
use sammo\GameUnitConstraint\ReqCities;
|
||||
use sammo\GameUnitConstraint\ReqMinRelYear;
|
||||
use sammo\GameUnitConstraint\ReqRegions;
|
||||
use sammo\GameUnitConstraint\ReqTech;
|
||||
|
||||
class GameUnitConst extends GameUnitConstBase
|
||||
{
|
||||
protected static $_buildData = [
|
||||
protected static function getBuildData(): array {
|
||||
return [
|
||||
[
|
||||
1000, self::T_CASTLE, '성벽',
|
||||
100, 100, 7, 0, 0, 99, 9,
|
||||
999999, null, null, 999999,
|
||||
[],//성벽은 공격할 수 없다.
|
||||
[new Impossible()],
|
||||
[], // 성벽은 공격할 수 없다.
|
||||
[self::T_FOOTMAN=>1.2],
|
||||
['성벽입니다.','생성할 수 없습니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
@@ -17,7 +24,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1100, self::T_FOOTMAN, '보병',
|
||||
100, 150, 7, 10, 0, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 보병입니다.','보병은 방어특화이며,','상대가 회피하기 어렵습니다.'],
|
||||
@@ -26,7 +33,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1101, self::T_FOOTMAN, '청주병',
|
||||
100, 200, 7, 10, 0, 10, 11,
|
||||
1000, null, ['중원'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('중원')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['저렴하고 튼튼합니다.'],
|
||||
@@ -35,7 +42,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1102, self::T_FOOTMAN, '수병',
|
||||
150, 150, 7, 10, 0, 11, 10,
|
||||
1000, null, ['오월'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('오월')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['저렴하고 강력합니다.'],
|
||||
@@ -44,7 +51,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1103, self::T_FOOTMAN, '자객병',
|
||||
100, 150, 8, 20, 0, 10, 10,
|
||||
2000, ['저'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('저')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['은밀하고 날쌥니다.'],
|
||||
@@ -53,7 +60,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1104, self::T_FOOTMAN, '근위병',
|
||||
150, 200, 7, 10, 0, 12, 12,
|
||||
3000, ['낙양'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('낙양')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['최강의 보병입니다.'],
|
||||
@@ -62,7 +69,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1105, self::T_FOOTMAN, '등갑병',
|
||||
100, 225, 7, 5, 0, 13, 10,
|
||||
1000, null, ['남중'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('남중')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['등갑을 두른 보병입니다.'],
|
||||
@@ -71,7 +78,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1106, self::T_FOOTMAN, '백이병',
|
||||
175, 175, 7, 5, 0, 13, 11,
|
||||
3000, ['성도'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_ARCHER=>1.1, self::T_CAVALRY=>0.9, self::T_SIEGE=>1.1],
|
||||
[self::T_ARCHER=>0.9, self::T_CAVALRY=>1.1, self::T_SIEGE=>0.9],
|
||||
['정예 보병입니다. 불리한 싸움도 버텨냅니다.'],
|
||||
@@ -81,7 +88,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1200, self::T_ARCHER, '궁병',
|
||||
100, 100, 7, 10, 0, 10, 10,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 궁병입니다.','궁병은 선제사격을 하는 병종입니다.'],
|
||||
@@ -90,7 +97,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1201, self::T_ARCHER, '궁기병',
|
||||
100, 100, 8, 20, 0, 11, 12,
|
||||
1000, null, ['동이'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('동이')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.9, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.1, self::T_SIEGE=>0.8],
|
||||
['말을 타고 잘 피합니다. 특히 다른 궁병보다 보병에게 조금 더 강합니다.'],
|
||||
@@ -99,7 +106,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1202, self::T_ARCHER, '연노병',
|
||||
150, 100, 8, 10, 0, 12, 11,
|
||||
1000, null, ['서촉'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('서촉')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['화살을 연사합니다.'],
|
||||
@@ -108,7 +115,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1203, self::T_ARCHER, '강궁병',
|
||||
150, 150, 7, 10, 0, 13, 13,
|
||||
3000, ['양양'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('양양')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['강건한 궁병입니다.'],
|
||||
@@ -117,7 +124,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1204, self::T_ARCHER, '석궁병',
|
||||
200, 100, 7, 10, 0, 13, 13,
|
||||
3000, ['건업'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('건업')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['강력한 화살을 쏩니다.'],
|
||||
@@ -127,7 +134,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1300, self::T_CAVALRY, '기병',
|
||||
150, 100, 7, 5, 0, 11, 11,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 기병입니다.','기병은 공격특화입니다.'],
|
||||
@@ -136,7 +143,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1301, self::T_CAVALRY, '백마병',
|
||||
200, 100, 7, 5, 0, 12, 13,
|
||||
1000, null, ['하북'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('하북')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['백마의 위용을 보여줍니다.'],
|
||||
@@ -145,7 +152,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1302, self::T_CAVALRY, '중장기병',
|
||||
150, 150, 7, 5, 0, 13, 12,
|
||||
1000, null, ['서북'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('서북')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['갑주를 두른 기병입니다.'],
|
||||
@@ -154,7 +161,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1303, self::T_CAVALRY, '돌격기병',
|
||||
200, 100, 8, 5, 0, 13, 11,
|
||||
2000, ['흉노'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('흉노')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['저돌적으로 공격합니다.'],
|
||||
@@ -163,7 +170,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1304, self::T_CAVALRY, '철기병',
|
||||
100, 200, 7, 5, 0, 11, 13,
|
||||
2000, ['강'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('강')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['철갑을 두른 기병입니다.'],
|
||||
@@ -172,7 +179,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1305, self::T_CAVALRY, '수렵기병',
|
||||
150, 100, 8, 15, 0, 12, 12,
|
||||
2000, ['산월'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('산월')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['날쎄고 빠른 기병입니다.'],
|
||||
@@ -181,7 +188,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1306, self::T_CAVALRY, '맹수병',
|
||||
250, 175, 6, 0, 0, 16, 16,
|
||||
2000, ['남만'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('남만')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['어느 누구보다 강력합니다.'],
|
||||
@@ -190,7 +197,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1307, self::T_CAVALRY, '호표기병',
|
||||
200, 150, 7, 5, 0, 14, 14,
|
||||
3000, ['허창'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('허창')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['정예 기병입니다.'],
|
||||
@@ -200,7 +207,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1400, self::T_WIZARD, '귀병',
|
||||
80, 80, 7, 5, 0.5, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['계략을 사용하는 병종입니다.'],
|
||||
@@ -209,7 +216,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1401, self::T_WIZARD, '신귀병',
|
||||
80, 80, 7, 20, 0.6, 10, 10,
|
||||
1000, null, ['초'], 0,
|
||||
[new ReqTech(1000), new ReqRegions('초')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['신출귀몰한 귀병입니다.'],
|
||||
@@ -218,7 +225,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1402, self::T_WIZARD, '백귀병',
|
||||
80, 130, 7, 5, 0.6, 9, 11,
|
||||
2000, ['오환'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('오환')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['저렴하고 튼튼합니다.'],
|
||||
@@ -227,7 +234,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1403, self::T_WIZARD, '흑귀병',
|
||||
130, 80, 7, 5, 0.6, 11, 9,
|
||||
2000, ['왜'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('왜')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['저렴하고 강력합니다.'],
|
||||
@@ -236,7 +243,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1404, self::T_WIZARD, '악귀병',
|
||||
130, 130, 7, 0, 0.6, 12, 12,
|
||||
3000, ['장안'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('장안')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['백병전에도 능숙합니다.'],
|
||||
@@ -245,7 +252,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1405, self::T_WIZARD, '남귀병',
|
||||
60, 60, 7, 10, 0.8, 8, 8,
|
||||
1000, null, null, 0,
|
||||
[new ReqTech(1000)],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['전투를 포기하고 계략에 몰두합니다.'],
|
||||
@@ -254,7 +261,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1406, self::T_WIZARD, '황귀병',
|
||||
110, 110, 7, 0, 0.8, 13, 10,
|
||||
3000, ['낙양'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('낙양')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['고도로 훈련된 귀병입니다.'],
|
||||
@@ -263,7 +270,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1407, self::T_WIZARD, '천귀병',
|
||||
80, 130, 7, 15, 0.6, 11, 12,
|
||||
3000, ['성도'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['갑주를 두른 귀병입니다.'],
|
||||
@@ -272,7 +279,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1408, self::T_WIZARD, '마귀병',
|
||||
130, 80, 7, 15, 0.6, 12, 11,
|
||||
3000, ['업'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('업')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['날카로운 무기를 가진 귀병입니다.'],
|
||||
@@ -282,7 +289,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1500, self::T_SIEGE, '정란',
|
||||
100, 100, 6, 0, 0, 14, 5,
|
||||
0, null, null, 3,
|
||||
[new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.2, 1106=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
|
||||
['높은 구조물 위에서 공격합니다. 첫 공격은 성벽을 향합니다.'],
|
||||
@@ -291,7 +298,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1502, self::T_SIEGE, '벽력거',
|
||||
150, 100, 6, 5, 0, 20, 5,
|
||||
3000, ['업'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('업')],
|
||||
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.2, 1106=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067],
|
||||
['상대에게 돌덩이를 날립니다. 첫 공격은 성벽을 향합니다.'],
|
||||
@@ -300,11 +307,12 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1503, self::T_SIEGE, '목우',
|
||||
50, 200, 5, 0, 0, 15, 5,
|
||||
3000, ['성도'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, self::T_CASTLE=>1.2],
|
||||
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, 1106=>1],
|
||||
['상대를 저지하는 특수병기입니다.'],
|
||||
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
+32
-23
@@ -2,15 +2,23 @@
|
||||
|
||||
namespace sammo;
|
||||
|
||||
use sammo\GameUnitConstraint\Impossible;
|
||||
use sammo\GameUnitConstraint\ReqCities;
|
||||
use sammo\GameUnitConstraint\ReqMinRelYear;
|
||||
use sammo\GameUnitConstraint\ReqRegions;
|
||||
use sammo\GameUnitConstraint\ReqTech;
|
||||
|
||||
class GameUnitConst extends GameUnitConstBase
|
||||
{
|
||||
const DEFAULT_CREWTYPE = 1100;
|
||||
|
||||
protected static $_buildData = [
|
||||
protected static function getBuildData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
1000, self::T_CASTLE, '성벽',
|
||||
100, 100, 7, 0, 0, 99, 9,
|
||||
999999, null, null, 999999,
|
||||
[new Impossible()],
|
||||
[], //성벽은 공격할 수 없다.
|
||||
[self::T_FOOTMAN => 1.2],
|
||||
['성벽입니다.', '생성할 수 없습니다.'],
|
||||
@@ -20,7 +28,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1100, self::T_FOOTMAN, '보병',
|
||||
100, 150, 7, 10, 0, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_ARCHER => 1.2, self::T_CAVALRY => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_ARCHER => 0.8, self::T_CAVALRY => 1.2, self::T_SIEGE => 0.8],
|
||||
['표준적인 보병입니다.', '보병은 방어특화이며,', '상대가 회피하기 어렵습니다.'],
|
||||
@@ -29,7 +37,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1200, self::T_ARCHER, '궁병',
|
||||
100, 100, 7, 10, 0, 10, 10,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_CAVALRY => 1.2, self::T_FOOTMAN => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_CAVALRY => 0.8, self::T_FOOTMAN => 1.2, self::T_SIEGE => 0.8],
|
||||
['표준적인 궁병입니다.', '궁병은 선제사격을 하는 병종입니다.'],
|
||||
@@ -38,7 +46,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1300, self::T_CAVALRY, '기병',
|
||||
150, 100, 7, 5, 0, 11, 11,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_FOOTMAN => 1.2, self::T_ARCHER => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_FOOTMAN => 0.8, self::T_ARCHER => 1.2, self::T_SIEGE => 0.8],
|
||||
['표준적인 기병입니다.', '기병은 공격특화입니다.'],
|
||||
@@ -47,7 +55,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1104, self::T_FOOTMAN, '근위병',
|
||||
150, 200, 7, 10, 0, 12, 12,
|
||||
2000, ['낙양'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('낙양')],
|
||||
[self::T_ARCHER => 1.2, self::T_CAVALRY => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_ARCHER => 0.8, self::T_CAVALRY => 1.2, self::T_SIEGE => 0.8],
|
||||
['최강의 보병입니다.'],
|
||||
@@ -56,7 +64,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1106, self::T_FOOTMAN, '백이병',
|
||||
175, 175, 7, 5, 0, 13, 11,
|
||||
2000, ['성도'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('성도')],
|
||||
[self::T_ARCHER => 1.1, self::T_CAVALRY => 0.9, self::T_SIEGE => 1.1],
|
||||
[self::T_ARCHER => 0.9, self::T_CAVALRY => 1.1, self::T_SIEGE => 0.9],
|
||||
['정예 보병입니다. 불리한 싸움도 버텨냅니다.'],
|
||||
@@ -65,7 +73,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
97201, self::T_ARCHER, '화랑',
|
||||
175, 150, 8, 15, 0.05, 13, 13,
|
||||
2000, ['한', '서라벌'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('한', '서라벌')],
|
||||
[self::T_CAVALRY => 1.2, self::T_FOOTMAN => 0.9, self::T_SIEGE => 1.2],
|
||||
[self::T_CAVALRY => 0.8, self::T_FOOTMAN => 1.1, self::T_SIEGE => 0.8],
|
||||
['특수한 궁병입니다.'],
|
||||
@@ -74,7 +82,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1204, self::T_ARCHER, '석궁병',
|
||||
200, 125, 7, 10, 0, 13, 13,
|
||||
2000, ['건업'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('건업')],
|
||||
[self::T_CAVALRY => 1.2, self::T_FOOTMAN => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_CAVALRY => 0.8, self::T_FOOTMAN => 1.2, self::T_SIEGE => 0.8],
|
||||
['강력한 화살을 쏩니다.'],
|
||||
@@ -83,7 +91,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1303, self::T_CAVALRY, '돌격기병',
|
||||
200, 125, 8, 10, 0, 13, 12,
|
||||
2000, ['서량', '안정'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('서량', '안정')],
|
||||
[self::T_FOOTMAN => 1.2, self::T_ARCHER => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_FOOTMAN => 0.8, self::T_ARCHER => 1.2, self::T_SIEGE => 0.8],
|
||||
['저돌적으로 공격합니다.'],
|
||||
@@ -92,7 +100,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1307, self::T_CAVALRY, '호표기병',
|
||||
200, 150, 7, 5, 0, 14, 14,
|
||||
2000, ['허창'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('허창')],
|
||||
[self::T_FOOTMAN => 1.2, self::T_ARCHER => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_FOOTMAN => 0.8, self::T_ARCHER => 1.2, self::T_SIEGE => 0.8],
|
||||
['정예 기병입니다.'],
|
||||
@@ -101,7 +109,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1306, self::T_CAVALRY, '맹수병',
|
||||
250, 175, 6, 0, 0, 16, 16,
|
||||
2000, ['운남'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('운남')],
|
||||
[self::T_FOOTMAN => 1.2, self::T_ARCHER => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_FOOTMAN => 0.8, self::T_ARCHER => 1.2, self::T_SIEGE => 0.8],
|
||||
['어느 누구보다 강력합니다.'],
|
||||
@@ -110,7 +118,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1400, self::T_WIZARD, '귀병',
|
||||
80, 80, 7, 5, 0.5, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_SIEGE => 1.2],
|
||||
[self::T_SIEGE => 0.8],
|
||||
['계략을 사용하는 병종입니다.'],
|
||||
@@ -119,7 +127,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1405, self::T_WIZARD, '남귀병',
|
||||
60, 60, 7, 10, 0.8, 8, 8,
|
||||
1000, null, null, 0,
|
||||
[new ReqTech(1000)],
|
||||
[self::T_SIEGE => 1.2],
|
||||
[self::T_SIEGE => 0.8],
|
||||
['전투를 포기하고 계략에 몰두합니다.'],
|
||||
@@ -128,7 +136,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1404, self::T_WIZARD, '악귀병',
|
||||
130, 130, 7, 0, 0.6, 12, 12,
|
||||
2000, ['장안'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('장안')],
|
||||
[self::T_SIEGE => 1.2],
|
||||
[self::T_SIEGE => 0.8],
|
||||
['백병전에도 능숙합니다.'],
|
||||
@@ -137,7 +145,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1407, self::T_WIZARD, '천귀병',
|
||||
90, 130, 7, 15, 0.6, 11, 12,
|
||||
2000, ['성도'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('성도')],
|
||||
[self::T_SIEGE => 1.2],
|
||||
[self::T_SIEGE => 0.8],
|
||||
['갑주를 두른 귀병입니다.'],
|
||||
@@ -146,7 +154,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1500, self::T_SIEGE, '정란',
|
||||
100, 100, 6, 0, 0, 14, 5,
|
||||
0, null, null, 3,
|
||||
[new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN => 1.25, self::T_ARCHER => 1.25, self::T_CAVALRY => 1.25, self::T_WIZARD => 1.25, self::T_CASTLE => 1.8, 1106 => 1.112],
|
||||
[self::T_FOOTMAN => 1.2, self::T_ARCHER => 1.2, self::T_CAVALRY => 1.2, self::T_WIZARD => 1.2],
|
||||
['높은 구조물 위에서 공격합니다.'],
|
||||
@@ -155,7 +163,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1501, self::T_SIEGE, '충차',
|
||||
150, 100, 6, 0, 0, 20, 5,
|
||||
1000, null, null, 3,
|
||||
[new ReqTech(1000), new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN => 0.8, self::T_ARCHER => 0.8, self::T_CAVALRY => 0.8, self::T_WIZARD => 0.8, self::T_CASTLE => 2.4],
|
||||
[self::T_FOOTMAN => 1.2, self::T_ARCHER => 1.2, self::T_CAVALRY => 1.2, self::T_WIZARD => 1.2],
|
||||
['엄청난 위력으로 성벽을 부수어버립니다.'],
|
||||
@@ -164,7 +172,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1502, self::T_SIEGE, '벽력거',
|
||||
135, 100, 6, 5, 0, 20, 5,
|
||||
2000, ['업'], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('업')],
|
||||
[self::T_FOOTMAN => 1.25, self::T_ARCHER => 1.25, self::T_CAVALRY => 1.25, self::T_WIZARD => 1.25, self::T_CASTLE => 1.8, 1106 => 1.112],
|
||||
[self::T_FOOTMAN => 0.833, self::T_ARCHER => 0.833, self::T_CAVALRY => 0.833, self::T_WIZARD => 0.833, 1106 => 0.909],
|
||||
['상대에게 돌덩이를 날립니다.'],
|
||||
@@ -173,7 +181,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
97101, self::T_FOOTMAN, '중장보병',
|
||||
150, 175, 7, 10, 0, 12, 12,
|
||||
3000, null, null, 0,
|
||||
[new ReqTech(3000)],
|
||||
[self::T_ARCHER => 1.2, self::T_CAVALRY => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_ARCHER => 0.8, self::T_CAVALRY => 1.2, self::T_SIEGE => 0.8],
|
||||
['전천후 보병입니다.'],
|
||||
@@ -182,7 +190,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1202, self::T_ARCHER, '연노병',
|
||||
150, 175, 8, 10, 0, 12, 12,
|
||||
3000, null, null, 0,
|
||||
[new ReqTech(3000)],
|
||||
[self::T_CAVALRY => 1.2, self::T_FOOTMAN => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_CAVALRY => 0.8, self::T_FOOTMAN => 1.2, self::T_SIEGE => 0.8],
|
||||
['화살을 연사합니다.'],
|
||||
@@ -191,7 +199,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1304, self::T_CAVALRY, '철기병',
|
||||
175, 175, 7, 5, 0, 13, 13,
|
||||
3000, null, null, 0,
|
||||
[new ReqTech(3000)],
|
||||
[self::T_FOOTMAN => 1.2, self::T_ARCHER => 0.8, self::T_SIEGE => 1.2],
|
||||
[self::T_FOOTMAN => 0.8, self::T_ARCHER => 1.2, self::T_SIEGE => 0.8],
|
||||
['철갑을 두른 기병입니다.'],
|
||||
@@ -200,11 +208,12 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1401, self::T_WIZARD, '신귀병',
|
||||
100, 100, 7, 20, 0.6, 12, 12,
|
||||
3000, null, null, 0,
|
||||
[new ReqTech(3000)],
|
||||
[self::T_SIEGE => 1.2],
|
||||
[self::T_SIEGE => 0.8],
|
||||
['신출귀몰한 귀병입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,451 @@
|
||||
<?php
|
||||
|
||||
namespace sammo;
|
||||
|
||||
use sammo\Enums\NationAuxKey;
|
||||
use sammo\GameUnitConstraint\Impossible;
|
||||
use sammo\GameUnitConstraint\ReqChief;
|
||||
use sammo\GameUnitConstraint\ReqCities;
|
||||
use sammo\GameUnitConstraint\ReqCitiesWithCityLevel;
|
||||
use sammo\GameUnitConstraint\ReqHighLevelCities;
|
||||
use sammo\GameUnitConstraint\ReqMinRelYear;
|
||||
use sammo\GameUnitConstraint\ReqNotChief;
|
||||
use sammo\GameUnitConstraint\ReqRegions;
|
||||
use sammo\GameUnitConstraint\ReqTech;
|
||||
use sammo\GameUnitConstraint\ReqNationAux;
|
||||
|
||||
class GameUnitConst extends GameUnitConstBase
|
||||
{
|
||||
protected static function getBuildData(): array {
|
||||
return [
|
||||
[
|
||||
1000, self::T_CASTLE, '성벽',
|
||||
100, 100, 7, 0, 0, 99, 9,
|
||||
[new Impossible()],
|
||||
[], // 성벽은 공격할 수 없다.
|
||||
[self::T_FOOTMAN=>1.2],
|
||||
['성벽입니다.','생성할 수 없습니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
|
||||
[
|
||||
1100, self::T_FOOTMAN, '보병',
|
||||
100, 150, 7, 10, 0, 9, 9,
|
||||
[],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 보병입니다.','보병은 방어특화이며,','상대가 회피하기 어렵습니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
1101, self::T_FOOTMAN, '청주병',
|
||||
100, 200, 7, 10, 0, 10, 11,
|
||||
[new ReqTech(1000), new ReqRegions('중원')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['저렴하고 튼튼합니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
1102, self::T_FOOTMAN, '수병',
|
||||
150, 150, 7, 10, 0, 11, 10,
|
||||
[new ReqTech(1000), new ReqRegions('오월')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['저렴하고 강력합니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
1103, self::T_FOOTMAN, '자객병',
|
||||
100, 150, 8, 20, 0, 10, 10,
|
||||
[new ReqTech(2000), new ReqCities('저')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['은밀하고 날쌥니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
1104, self::T_FOOTMAN, '근위병',
|
||||
150, 200, 7, 10, 0, 12, 12,
|
||||
[new ReqTech(3000), new ReqCities('낙양')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['최강의 보병입니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
1105, self::T_FOOTMAN, '등갑병',
|
||||
100, 225, 7, 5, 0, 13, 10,
|
||||
[new ReqTech(1000), new ReqRegions('남중')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['등갑을 두른 보병입니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
1106, self::T_FOOTMAN, '백이병',
|
||||
175, 175, 7, 5, 0, 13, 11,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_ARCHER=>1.1, self::T_CAVALRY=>0.9, self::T_SIEGE=>1.1],
|
||||
[self::T_ARCHER=>0.9, self::T_CAVALRY=>1.1, self::T_SIEGE=>0.9],
|
||||
['정예 보병입니다. 불리한 싸움도 버텨냅니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
91100, self::T_FOOTMAN, '대검병',
|
||||
150, 225, 7, 10, 0, 13, 13,
|
||||
[new ReqTech(4000), new ReqCitiesWithCityLevel(8, '완'), new ReqNationAux(NationAuxKey::can_대검병사용, '==', 1)],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['대형 검을 사용합니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
91101, self::T_FOOTMAN, '강습병',
|
||||
175, 200, 7, 10, 0, 13, 13,
|
||||
[new ReqTech(4000), new ReqCitiesWithCityLevel(8, '북평')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['철퇴를 사용합니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
[
|
||||
91102, self::T_FOOTMAN, '극병',
|
||||
250, 150, 7, 0, 0, 18, 18,
|
||||
[new ReqTech(5000), new ReqCitiesWithCityLevel(8, '저'), new ReqNationAux(NationAuxKey::can_극병사용, '==', 1)],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8],
|
||||
['긴 극을 사용합니다.'],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
|
||||
[
|
||||
1200, self::T_ARCHER, '궁병',
|
||||
100, 100, 7, 10, 0, 10, 10,
|
||||
[],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 궁병입니다.','궁병은 선제사격을 하는 병종입니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
[
|
||||
1201, self::T_ARCHER, '궁기병',
|
||||
100, 100, 8, 20, 0, 11, 12,
|
||||
[new ReqTech(1000), new ReqRegions('동이')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.9, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.1, self::T_SIEGE=>0.8],
|
||||
['말을 타고 잘 피합니다. 특히 다른 궁병보다 보병에게 조금 더 강합니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
[
|
||||
1202, self::T_ARCHER, '연노병',
|
||||
150, 100, 8, 10, 0, 12, 11,
|
||||
[new ReqTech(1000), new ReqRegions('서촉')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['화살을 연사합니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
[
|
||||
1203, self::T_ARCHER, '강궁병',
|
||||
150, 150, 7, 10, 0, 13, 13,
|
||||
[new ReqTech(3000), new ReqCities('양양')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['강건한 궁병입니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
[
|
||||
1204, self::T_ARCHER, '석궁병',
|
||||
200, 100, 7, 10, 0, 13, 13,
|
||||
[new ReqTech(3000), new ReqCities('건업')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['강력한 화살을 쏩니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
[
|
||||
91200, self::T_ARCHER, '화랑',
|
||||
150, 150, 8, 25, 0, 14, 14,
|
||||
[new ReqTech(4000), new ReqCitiesWithCityLevel(8, '위례')],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['궁술 실력이 뛰어납니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
[
|
||||
91201, self::T_ARCHER, '화시병',
|
||||
225, 100, 7, 10, 0, 14, 14,
|
||||
[new ReqTech(4000), new ReqCitiesWithCityLevel(8, '장사'), new ReqNationAux(NationAuxKey::can_화시병사용, '==', 1)],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['불이 붙은 화살을 날립니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
[
|
||||
91202, self::T_ARCHER, '원융노병',
|
||||
250, 100, 7, 10, 0, 20, 19,
|
||||
[new ReqTech(5000), new ReqCitiesWithCityLevel(8, '흉노'), new ReqNationAux(NationAuxKey::can_원융노병사용, '==', 1)],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2, self::T_SIEGE=>0.8],
|
||||
['먼 거리에서 적을 제압합니다.'],
|
||||
null, ['che_선제사격시도', 'che_선제사격발동'], null
|
||||
],
|
||||
|
||||
[
|
||||
1300, self::T_CAVALRY, '기병',
|
||||
150, 100, 7, 5, 0, 11, 11,
|
||||
[],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['표준적인 기병입니다.','기병은 공격특화입니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
1301, self::T_CAVALRY, '백마병',
|
||||
200, 100, 7, 5, 0, 12, 13,
|
||||
[new ReqTech(1000), new ReqRegions('하북')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['백마의 위용을 보여줍니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
1302, self::T_CAVALRY, '중장기병',
|
||||
150, 150, 7, 5, 0, 13, 12,
|
||||
[new ReqTech(1000), new ReqRegions('서북')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['갑주를 두른 기병입니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
1303, self::T_CAVALRY, '돌격기병',
|
||||
200, 100, 8, 5, 0, 13, 11,
|
||||
[new ReqTech(2000), new ReqCities('흉노')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['저돌적으로 공격합니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
1304, self::T_CAVALRY, '철기병',
|
||||
100, 250, 7, 5, 0, 11, 13,
|
||||
[new ReqTech(2000), new ReqCities('강')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['철갑을 두른 기병입니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
1305, self::T_CAVALRY, '수렵기병',
|
||||
150, 100, 8, 15, 0, 12, 12,
|
||||
[new ReqTech(2000), new ReqCities('산월')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['날쎄고 빠른 기병입니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
1306, self::T_CAVALRY, '맹수병',
|
||||
250, 175, 6, 0, 0, 16, 16,
|
||||
[new ReqTech(2000), new ReqCities('남만')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['어느 누구보다 강력합니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
1307, self::T_CAVALRY, '호표기병',
|
||||
200, 150, 7, 5, 0, 14, 14,
|
||||
[new ReqTech(3000), new ReqCities('허창')],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['정예 기병입니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
91300, self::T_CAVALRY, '양마기병',
|
||||
200, 175, 7, 5, 0, 15, 15,
|
||||
[new ReqTech(4000), new ReqCitiesWithCityLevel(8, '한중')],
|
||||
[self::T_FOOTMAN=>1.1, self::T_ARCHER=>0.9, self::T_SIEGE=>1.1],
|
||||
[self::T_FOOTMAN=>0.9, self::T_ARCHER=>1.1, self::T_SIEGE=>0.9],
|
||||
['험준한 지형에서 뛰어납니다.', '불리한 싸움도 버텨냅니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
91301, self::T_CAVALRY, '산저병',
|
||||
225, 150, 7, 5, 0, 15, 15,
|
||||
[new ReqTech(4000), new ReqCitiesWithCityLevel(8, '수춘'), new ReqNationAux(NationAuxKey::can_산저병사용, '==', 1)],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['무식할 정도로 전장을 누빕니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
[
|
||||
91302, self::T_CAVALRY, '상병',
|
||||
225, 250, 5, 0, 0, 24, 24,
|
||||
[new ReqTech(5000), new ReqCitiesWithCityLevel(8, '남만'), new ReqNationAux(NationAuxKey::can_상병사용, '==', 1)],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8],
|
||||
['거대한 코끼리와 함께합니다.'],
|
||||
null, ['che_기병병종전투'], null
|
||||
],
|
||||
|
||||
[
|
||||
1400, self::T_WIZARD, '귀병',
|
||||
80, 80, 7, 5, 0.5, 9, 9,
|
||||
[],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['계략을 사용하는 병종입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1401, self::T_WIZARD, '신귀병',
|
||||
80, 80, 7, 20, 0.6, 10, 10,
|
||||
[new ReqTech(1000), new ReqRegions('초')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['신출귀몰한 귀병입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1402, self::T_WIZARD, '백귀병',
|
||||
80, 130, 7, 5, 0.6, 9, 11,
|
||||
[new ReqTech(2000), new ReqCities('오환')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['저렴하고 튼튼합니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1403, self::T_WIZARD, '흑귀병',
|
||||
130, 80, 7, 5, 0.6, 11, 9,
|
||||
[new ReqTech(2000), new ReqCities('왜')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['저렴하고 강력합니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1404, self::T_WIZARD, '악귀병',
|
||||
130, 130, 7, 0, 0.6, 12, 12,
|
||||
[new ReqTech(3000), new ReqCities('장안')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['백병전에도 능숙합니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1405, self::T_WIZARD, '남귀병',
|
||||
60, 60, 7, 10, 0.8, 8, 8,
|
||||
[new ReqTech(1000)],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['전투를 포기하고 계략에 몰두합니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1406, self::T_WIZARD, '황귀병',
|
||||
110, 110, 7, 0, 0.8, 13, 10,
|
||||
[new ReqTech(3000), new ReqCities('낙양')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['고도로 훈련된 귀병입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1407, self::T_WIZARD, '천귀병',
|
||||
80, 130, 7, 15, 0.6, 11, 12,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['갑주를 두른 귀병입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
1408, self::T_WIZARD, '마귀병',
|
||||
130, 80, 7, 15, 0.6, 12, 11,
|
||||
[new ReqTech(3000), new ReqCities('업')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['날카로운 무기를 가진 귀병입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
91400, self::T_WIZARD, '음귀병',
|
||||
110, 110, 7, 15, 0.7, 13, 11,
|
||||
[new ReqTech(4000), new ReqCitiesWithCityLevel(8, '강릉'), new ReqNationAux(NationAuxKey::can_음귀병사용, '==', 1)],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['악기를 연주하여 적을 혼란시킵니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
91401, self::T_WIZARD, '향귀병',
|
||||
100, 120, 8, 5, 0.6, 12, 12,
|
||||
[new ReqTech(4000), new ReqHighLevelCities(8, 4), new ReqNotChief()],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['독특한 향을 피웁니다.'],
|
||||
null, null, null
|
||||
],
|
||||
[
|
||||
91402, self::T_WIZARD, '무희',
|
||||
180, 80, 7, 10, 0.6, 18, 17,
|
||||
[new ReqTech(5000), new ReqCitiesWithCityLevel(8, '왜'), new ReqNationAux(NationAuxKey::can_무희사용, '==', 1)],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
['검무를 추는 귀병입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
|
||||
[
|
||||
1500, self::T_SIEGE, '정란',
|
||||
100, 100, 6, 0, 0, 14, 5,
|
||||
[new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112, 91300=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067, 91300=>1.112],
|
||||
['높은 구조물 위에서 공격합니다. 첫 공격은 성벽을 향합니다.'],
|
||||
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], ['che_성벽선제']
|
||||
],
|
||||
[
|
||||
1501, self::T_SIEGE, '충차',
|
||||
150, 100, 6, 0, 0, 18, 5,
|
||||
[new ReqTech(1000), new ReqMinRelYear(3)],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>2.4, 1106=>1.112, 91300=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067, 91300=>1.067],
|
||||
['엄청난 위력으로 성벽을 부수어버립니다.'],
|
||||
['che_성벽부상무효'], null, null
|
||||
],
|
||||
[
|
||||
1502, self::T_SIEGE, '벽력거',
|
||||
150, 100, 6, 5, 0, 20, 5,
|
||||
[new ReqTech(3000), new ReqCities('업')],
|
||||
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.8, 1106=>1.112, 91300=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067, 91300=>1.112],
|
||||
['상대에게 돌덩이를 날립니다. 첫 공격은 성벽을 향합니다.'],
|
||||
['che_성벽부상무효'], ['che_선제사격시도', 'che_선제사격발동'], ['che_성벽선제']
|
||||
],
|
||||
[
|
||||
1503, self::T_SIEGE, '목우',
|
||||
50, 200, 5, 0, 0, 15, 5,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1, self::T_CASTLE=>1.8],
|
||||
[self::T_FOOTMAN=>1, self::T_ARCHER=>1, self::T_CAVALRY=>1, self::T_WIZARD=>1],
|
||||
['상대를 저지하는 특수병기입니다.'],
|
||||
['che_성벽부상무효'], ['che_저지시도', 'che_저지발동'], null
|
||||
],
|
||||
[
|
||||
91500, self::T_SIEGE, '화륜차',
|
||||
300, 0, 5, 0, 0, 40, 5,
|
||||
[new ReqTech(5000), new ReqNationAux(NationAuxKey::did_특성초토화, '>=', 1), new ReqChief(), new ReqNationAux(NationAuxKey::can_화륜차사용, '==', 1)],
|
||||
[self::T_FOOTMAN=>1.25, self::T_ARCHER=>1.25, self::T_CAVALRY=>1.25, self::T_WIZARD=>1.25, self::T_CASTLE=>1.25, 1106=>1.112, 91300=>1.112],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2, 1106=>1.067, 91300=>1.067],
|
||||
['불타는 바퀴로 적진을 붕괴시킵니다.'],
|
||||
['che_성벽부상무효'], null, null
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,12 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
use sammo\GameUnitConstraint\Impossible;
|
||||
use sammo\GameUnitConstraint\ReqTech;
|
||||
use sammo\GameUnitConstraint\ReqCities;
|
||||
use sammo\GameUnitConstraint\ReqRegions;
|
||||
use sammo\GameUnitConstraint\ReqMinRelYear;
|
||||
|
||||
class GameUnitConst extends GameUnitConstBase
|
||||
{
|
||||
const DEFAULT_CREWTYPE = 217100;
|
||||
@@ -13,21 +19,22 @@ class GameUnitConst extends GameUnitConstBase
|
||||
self::T_SIEGE => '차병',
|
||||
];
|
||||
|
||||
protected static $_buildData = [
|
||||
protected static function getBuildData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
1000, self::T_CASTLE, '성벽',
|
||||
100, 100, 7, 0, 0, 99, 9,
|
||||
999999, null, null, 999999,
|
||||
[],//성벽은 공격할 수 없다.
|
||||
[new Impossible()],
|
||||
[], //성벽은 공격할 수 없다.
|
||||
[self::T_FOOTMAN=>1.2],
|
||||
['성벽입니다.','생성할 수 없습니다.'],
|
||||
null, null, null
|
||||
],
|
||||
|
||||
[
|
||||
217100, self::T_FOOTMAN, '보병',
|
||||
100, 150, 7, 10, 0, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["표준적인 보병입니다. 보병은 방어특화입니다."],
|
||||
@@ -36,7 +43,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217101, self::T_FOOTMAN, '마물병',
|
||||
110, 160, 7, 10, 0, 9, 10,
|
||||
0, null, ["호넷 마인령","케이브리스 마인령"], 0,
|
||||
[new ReqRegions('호넷 마인령', '케이브리스 마인령')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["마군 지역 기본병종입니다. 조금더 강하지만 쌀을 많이 소비합니다."],
|
||||
@@ -45,7 +52,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217102, self::T_FOOTMAN, '중장보병',
|
||||
100, 250, 7, 5, 0, 13, 10,
|
||||
1000, null, ["헬만 동부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('헬만 동부')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["헬만 특유의 견고한 보병입니다."],
|
||||
@@ -54,7 +61,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217103, self::T_FOOTMAN, '흑의 군 보병',
|
||||
150, 150, 7, 10, 0, 12, 11,
|
||||
1000, null, ["리자스 남부","리자스 북부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('리자스 남부', '리자스 북부')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["흑의 군 전통의 체계적인 훈련으로 공격력을 보완했습니다."],
|
||||
@@ -63,7 +70,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217104, self::T_FOOTMAN, '용병',
|
||||
125, 175, 7, 10, 0, 12, 11,
|
||||
1000, null, ["자유도시 동부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('자유도시 동부')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["일반 보병보다 비싸지만 받은 만큼은 일해줍니다."],
|
||||
@@ -72,7 +79,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217105, self::T_FOOTMAN, '사메라이',
|
||||
175, 150, 7, 0, 0, 11, 10,
|
||||
1000, null, ["제스 남부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('제스 남부')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["검으로 난무를 가하는 몬스터 보병입니다."],
|
||||
@@ -81,7 +88,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217106, self::T_FOOTMAN, '템플나이트병',
|
||||
75, 275, 7, 0, 0, 11, 12,
|
||||
1000, null, ["AL교"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('AL교')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["공격을 포기하고 오직 방어에만 집중합니다."],
|
||||
@@ -90,7 +97,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217107, self::T_FOOTMAN, '메이드병',
|
||||
150, 150, 7, 20, 0, 13, 11,
|
||||
2000, ["메이드의 묘지"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('메이드의 묘지')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["켓셀링크 휘하의 날렵한 전투메이드입니다."],
|
||||
@@ -99,7 +106,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217108, self::T_FOOTMAN, '요괴병',
|
||||
150, 150, 8, 0, 0, 11, 13,
|
||||
2000, ["오슈"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('오슈')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["단단한 육체를 믿고 적진을 돌파합니다."],
|
||||
@@ -108,7 +115,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217109, self::T_FOOTMAN, '리자스 친위병',
|
||||
150, 200, 7, 10, 0, 12, 12,
|
||||
3000, ["리자스성"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('리자스성')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["여왕을 수호하는 리자스 최강의 보병 정예보병입니다."],
|
||||
@@ -117,7 +124,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217110, self::T_FOOTMAN, '케이브리스 마물병',
|
||||
200, 150, 7, 5, 0, 13, 14,
|
||||
3000, ["케이브리스의 성"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('케이브리스의 성')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["케이브리스 직속의 마물 정예 전투보병입니다."],
|
||||
@@ -126,17 +133,16 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217111, self::T_FOOTMAN, '투신',
|
||||
200, 300, 7, 5, 0, 28, 23,
|
||||
5000, ["투신도시"], null, 0,
|
||||
[new ReqTech(5000), new ReqCities('투신도시')],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["성마교단 유적에서 발굴된 사상 최강의 보병입니다."],
|
||||
null, ['che_방어력증가5p'], null
|
||||
],
|
||||
|
||||
[
|
||||
217200, self::T_ARCHER, '궁병',
|
||||
100, 100, 7, 20, 0, 10, 10,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["표준적인 궁병입니다. 궁병은 회피특화입니다."],
|
||||
@@ -145,7 +151,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217201, self::T_ARCHER, '투척마물병',
|
||||
150, 100, 7, 10, 0, 11, 12,
|
||||
1000, null, ["호넷 마인령"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('호넷 마인령')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["날렵함을 포기하고 도끼를 투척합니다."],
|
||||
@@ -154,7 +160,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217202, self::T_ARCHER, '백의 군 궁병',
|
||||
100, 100, 8, 30, 0, 11, 11,
|
||||
1000, null, ["리자스 남부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('리자스 남부')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["전략을 활용하여 치고 빠지기에 능합니다."],
|
||||
@@ -163,7 +169,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217203, self::T_ARCHER, '벌레술사병',
|
||||
100, 150, 7, 20, 0, 12, 12,
|
||||
2000, ["호박성"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('호박성')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["벌레들을 부려 몸을 보호하는 궁병입니다."],
|
||||
@@ -172,7 +178,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217204, self::T_ARCHER, '저격암살병',
|
||||
225, 75, 5, 10, 0, 14, 11,
|
||||
2000, ["블라디보스토크"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('블라디보스토크')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["독을 바른 탄환으로 적의 목숨을 앗아갑니다."],
|
||||
@@ -181,7 +187,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217205, self::T_ARCHER, '호루스병',
|
||||
150, 100, 8, 20, 0, 11, 12,
|
||||
2000, ["거대전함"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('거대전함')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["민첩하게 파고드는 호루스족 궁병입니다."],
|
||||
@@ -190,7 +196,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217206, self::T_ARCHER, '튤립병',
|
||||
200, 100, 7, 20, 0, 13, 13,
|
||||
3000, ["커스텀"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('커스텀')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["최첨단병기 튤립으로 적을 폭격합니다."],
|
||||
@@ -199,7 +205,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217207, self::T_ARCHER, '아이스플레임 궁병',
|
||||
150, 150, 7, 20, 0, 13, 13,
|
||||
3000, ["라그나로크 아크"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('라그나로크 아크')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["혁명을 성공으로 이끈 정예 게릴라 궁병입니다."],
|
||||
@@ -208,7 +214,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217208, self::T_ARCHER, '카라 궁병',
|
||||
225, 225, 7, 30, 0, 25, 25,
|
||||
5000, ["펜실 카우"], null, 0,
|
||||
[new ReqTech(5000), new ReqCities('펜실 카우')],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_CAVALRY=>1.2, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_CAVALRY=>0.8, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["선조의 힘을 이어받은 최강의 카라 정예 궁병입니다."],
|
||||
@@ -218,7 +224,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217300, self::T_CAVALRY, '기동병',
|
||||
150, 100, 7, 5, 0, 11, 11,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["표준적인 기동병입니다. 기동병은 공격특화입니다."],
|
||||
@@ -227,7 +233,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217301, self::T_CAVALRY, '하치온나',
|
||||
175, 100, 7, 15, 0, 12, 12,
|
||||
1000, null, ["자유도시 서부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('자유도시 서부')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["작은 몸으로 회피하며 따끔한 일격을 먹이는 몬스터 기동병입니다."],
|
||||
@@ -236,7 +242,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217302, self::T_CAVALRY, '적의 군 기동병',
|
||||
200, 100, 7, 5, 0, 12, 13,
|
||||
1000, null, ["리자스 북부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('리자스 북부')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["리자스군의 자랑인 기동부대입니다."],
|
||||
@@ -245,7 +251,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217303, self::T_CAVALRY, '안드로이드 기동병',
|
||||
175, 150, 7, 10, 0, 13, 12,
|
||||
2000, ["악의 탑"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('악의 탑')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["파이아르가 개발한 최첨단 안드로이드 기동병입니다."],
|
||||
@@ -254,7 +260,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217304, self::T_CAVALRY, '파란쵸 기동병',
|
||||
200, 100, 8, 5, 0, 13, 11,
|
||||
2000, ["파란쵸 왕국"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('파란쵸 왕국')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["적진을 일점돌파하는 파란쵸왕국의 돌격 기동병입니다. "],
|
||||
@@ -263,7 +269,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217305, self::T_CAVALRY, '비행마물병',
|
||||
150, 100, 8, 15, 0, 12, 12,
|
||||
2000, ["죽음의 대지"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('죽음의 대지')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["비행마물에 올라탄 기동마물병입니다."],
|
||||
@@ -272,7 +278,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217306, self::T_CAVALRY, '마물조련사병',
|
||||
250, 200, 6, 0, 0, 16, 16,
|
||||
3000, ["랑그바우"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('랑그바우')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["무시무시한 몬스터에 올라타서 싸우는 극강의 기동병입니다."],
|
||||
@@ -281,7 +287,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217307, self::T_CAVALRY, '기마병',
|
||||
200, 150, 7, 5, 0, 14, 14,
|
||||
3000, ["오와리"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('오와리')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["JAPAN 특유의 기마에 올라타 적을 짓밟는 기동병입니다."],
|
||||
@@ -290,7 +296,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217308, self::T_CAVALRY, '엔젤나이트',
|
||||
300, 200, 7, 5, 0, 25, 25,
|
||||
5000, ["떨어진 궁도"], null, 0,
|
||||
[new ReqTech(5000), new ReqCities('떨어진 궁도')],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8, self::T_SIEGE=>1.2, 217502=>1],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2, self::T_SIEGE=>0.8, 217502=>1],
|
||||
["신의 명령으로 파멸을 내리기 위해 강림했습니다."],
|
||||
@@ -300,7 +306,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217400, self::T_WIZARD, '마법병',
|
||||
80, 80, 7, 5, 0.6, 9, 9,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["마법을 사용하는 병종입니다."],
|
||||
@@ -309,7 +315,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217401, self::T_WIZARD, '마물 마법병',
|
||||
90, 90, 7, 0, 0.6, 11, 9,
|
||||
0, null, ["호넷 마인령","케이브리스 마인령"], 0,
|
||||
[new ReqRegions('호넷 마인령', '케이브리스 마인령')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["마군 지역 기본병종입니다. 조금더 강하지만 금을 많이 소비합니다."],
|
||||
@@ -318,7 +324,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217402, self::T_WIZARD, '카라 마법병',
|
||||
80, 80, 7, 20, 0.6, 10, 10,
|
||||
1000, null, ["카라의 숲"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('카라의 숲')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["신속히 움직이며 카라의 저주로 적을 공격합니다."],
|
||||
@@ -327,7 +333,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217403, self::T_WIZARD, '제스 마법병',
|
||||
100, 100, 7, 0, 0.6, 10, 10,
|
||||
1000, null, ["제스 북부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('제스 북부')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["마법국가 제스의 전통있는 마법병입니다."],
|
||||
@@ -336,7 +342,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217404, self::T_WIZARD, '무녀',
|
||||
80, 80, 8, 10, 0.6, 10, 10,
|
||||
1000, null, ["JAPAN"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('JAPAN')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["신마법과 함께 신통한 춤으로 활력을 불어넣는 마법병입니다."],
|
||||
@@ -345,7 +351,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217405, self::T_WIZARD, '프로즌',
|
||||
90, 70, 7, 10, 0.8, 10, 10,
|
||||
1000, null, ["헬만 서부"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('헬만 서부')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["백병전에 불리한 연약한 몸으로 마법 사용에 집중하는 몬스터입니다."],
|
||||
@@ -354,7 +360,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217406, self::T_WIZARD, '마소한 마법병',
|
||||
70, 90, 7, 10, 0.8, 11, 10,
|
||||
1000, null, ["케이브리스 마인령"], 0,
|
||||
[new ReqTech(1000), new ReqRegions('케이브리스 마인령')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["로브를 여러겹 둘러입은 마물마법병입니다. 직접 전투보단 마법에 집중합니다."],
|
||||
@@ -363,7 +369,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217407, self::T_WIZARD, '신관병',
|
||||
80, 130, 7, 5, 0.6, 9, 11,
|
||||
2000, ["카이즈"], null, 0,
|
||||
[new ReqTech(2000), new ReqCities('카이즈')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["AL교의 전투신관입니다. 몸을 보호하는 성스러운 마법을 사용합니다."],
|
||||
@@ -372,7 +378,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217408, self::T_WIZARD, '중장마법병',
|
||||
80, 130, 7, 15, 0.6, 11, 12,
|
||||
3000, ["로제스그라드"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('로제스그라드')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["두터운 로브를 입고 불길한 주문을 읊습니다."],
|
||||
@@ -381,7 +387,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217409, self::T_WIZARD, '악마병',
|
||||
130, 80, 7, 15, 0.6, 11, 12,
|
||||
3000, ["올드제스"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('올드제스')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["고대 제스 왕가의 계약에 따라 소환된 흑마법병입니다."],
|
||||
@@ -390,7 +396,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217410, self::T_WIZARD, '호넷 마물병',
|
||||
130, 130, 7, 0, 0.6, 12, 12,
|
||||
3000, ["구 마왕성"], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('구 마왕성')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["호넷 직속의 최강 마물 마법병입니다."],
|
||||
@@ -399,17 +405,16 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217411, self::T_WIZARD, 'Z가디언',
|
||||
180, 180, 7, 0, 0.7, 28, 20,
|
||||
5000, ["라그나로크 아크"], null, 0,
|
||||
[new ReqTech(5000), new ReqCities('라그나로크 아크')],
|
||||
[self::T_SIEGE=>1.2],
|
||||
[self::T_SIEGE=>0.8],
|
||||
["제스의 기술력이 집약된 최고의 마법병기입니다."],
|
||||
null, null, null
|
||||
],
|
||||
|
||||
[
|
||||
217500, self::T_SIEGE, '정란',
|
||||
150, 150, 6, 0, 0, 15, 5,
|
||||
0, null, null, 3,
|
||||
[new ReqMinRelYear(3)],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>1.8],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
|
||||
["높은 구조물 위에서 공격합니다."],
|
||||
@@ -418,7 +423,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217501, self::T_SIEGE, '충차',
|
||||
150, 100, 6, 0, 0, 20, 5,
|
||||
1000, null, null, 3,
|
||||
[new ReqTech(1000), new ReqMinRelYear(3)],
|
||||
[ self::T_FOOTMAN=>0.8, self::T_ARCHER=>0.8, self::T_CAVALRY=>0.8, self::T_WIZARD=>0.8, self::T_CASTLE=>2.4],
|
||||
[ self::T_FOOTMAN=>1.2, self::T_ARCHER=>1.2, self::T_CAVALRY=>1.2, self::T_WIZARD=>1.2],
|
||||
["엄청난 위력으로 성벽을 부수어버립니다."],
|
||||
@@ -427,13 +432,12 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
217502, self::T_SIEGE, '튤립3호',
|
||||
275, 300, 6, 0, 0, 35, 15,
|
||||
5000, ["커스텀"], null, 0,
|
||||
[ ],
|
||||
[ ],
|
||||
[new ReqTech(5000), new ReqCities('커스텀')],
|
||||
[],
|
||||
[],
|
||||
["파괴적인 위력과 정말 파괴적인 비용을 자랑하는 전차입니다. "],
|
||||
['che_성벽부상무효'], null, null
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,24 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
use sammo\GameUnitConstraint\Impossible;
|
||||
use sammo\GameUnitConstraint\ReqTech;
|
||||
use sammo\GameUnitConstraint\ReqCities;
|
||||
use sammo\GameUnitConstraint\ReqRegions;
|
||||
use sammo\GameUnitConstraint\ReqMinRelYear;
|
||||
|
||||
class GameUnitConst extends GameUnitConstBase
|
||||
{
|
||||
const DEFAULT_CREWTYPE = 1500;
|
||||
|
||||
protected static $_buildData = [
|
||||
protected static function getBuildData(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
1000, self::T_CASTLE, '성벽',
|
||||
100, 100, 7, 0, 0, 99, 9,
|
||||
999999, null, null, 999999,
|
||||
[],//성벽은 공격할 수 없다.
|
||||
[new Impossible()],
|
||||
[], //성벽은 공격할 수 없다.
|
||||
[self::T_FOOTMAN=>1.2],
|
||||
['성벽입니다.','생성할 수 없습니다.'],
|
||||
null, null, null
|
||||
@@ -18,37 +26,34 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1100, self::T_FOOTMAN, '보병',
|
||||
100, 150, 7, 10, 0, 18, 18,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_ARCHER=>1.2, self::T_CAVALRY=>0.8],
|
||||
[self::T_ARCHER=>0.8, self::T_CAVALRY=>1.2],
|
||||
['표준적인 보병입니다.','보병은 방어특화이며,','상대가 회피하기 어렵습니다.'],
|
||||
null, null, null
|
||||
],
|
||||
|
||||
[
|
||||
1200, self::T_ARCHER, '궁병',
|
||||
100, 100, 7, 20, 0, 20, 20,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_CAVALRY=>1.2, self::T_FOOTMAN=>0.8],
|
||||
[self::T_CAVALRY=>0.8, self::T_FOOTMAN=>1.2],
|
||||
['표준적인 궁병입니다.','궁병은 회피특화입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
|
||||
[
|
||||
1300, self::T_CAVALRY, '기병',
|
||||
150, 100, 7, 5, 0, 22, 22,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_FOOTMAN=>1.2, self::T_ARCHER=>0.8],
|
||||
[self::T_FOOTMAN=>0.8, self::T_ARCHER=>1.2],
|
||||
['표준적인 기병입니다.','기병은 공격특화입니다.'],
|
||||
null, null, null
|
||||
],
|
||||
|
||||
[
|
||||
1400, self::T_WIZARD, '귀병',
|
||||
80, 80, 7, 5, 0.5, 18, 18,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
['계략을 사용하는 병종입니다.'],
|
||||
@@ -57,17 +62,16 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1405, self::T_WIZARD, '남귀병',
|
||||
60, 60, 7, 10, 0.8, 16, 16,
|
||||
1000, null, null, 0,
|
||||
[new ReqTech(1000)],
|
||||
[],
|
||||
[],
|
||||
['전투를 포기하고 계략에 몰두합니다.'],
|
||||
null, null, null
|
||||
],
|
||||
|
||||
[
|
||||
1500, self::T_SIEGE, '정란',
|
||||
100, 100, 6, 0, 0, 7, 3,
|
||||
0, null, null, 0,
|
||||
[],
|
||||
[self::T_CASTLE=>1.8],
|
||||
[],
|
||||
['높은 구조물 위에서 공격합니다.'],
|
||||
@@ -76,7 +80,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1501, self::T_SIEGE, '충차',
|
||||
150, 100, 6, 0, 0, 10, 3,
|
||||
1000, null, null, 3,
|
||||
[new ReqTech(1000), new ReqMinRelYear(3)],
|
||||
[self::T_CASTLE=>2.4],
|
||||
[],
|
||||
['엄청난 위력으로 성벽을 부수어버립니다.'],
|
||||
@@ -85,7 +89,7 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1502, self::T_SIEGE, '벽력거',
|
||||
200, 100, 6, 0, 0, 20, 4,
|
||||
3000, ['업'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('업')],
|
||||
[self::T_CASTLE=>1.8],
|
||||
[],
|
||||
['상대에게 돌덩이를 날립니다.'],
|
||||
@@ -94,11 +98,12 @@ class GameUnitConst extends GameUnitConstBase
|
||||
[
|
||||
1503, self::T_SIEGE, '목우',
|
||||
50, 200, 5, 0, 0, 15, 3,
|
||||
3000, ['성도'], null, 0,
|
||||
[new ReqTech(3000), new ReqCities('성도')],
|
||||
[],
|
||||
[],
|
||||
['상대를 저지하는 특수병기입니다.'],
|
||||
['che_성벽부상무효'], null, null
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -31,29 +31,6 @@
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
|
||||
.compensatePositive {
|
||||
color: $cyan;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.compensateNegative {
|
||||
color: $red;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.compensateNeutral{
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.commandImpossible {
|
||||
color: $red;
|
||||
text-decoration: line-through $red;
|
||||
}
|
||||
|
||||
.t_date {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,10 @@ defineExpose({
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
@import "@scss/common/variables.scss";
|
||||
@import "@scss/common/bootswatch_custom_variables.scss";
|
||||
|
||||
.commandItem {
|
||||
border: gray 1px solid;
|
||||
border-radius: 0.5em;
|
||||
@@ -219,4 +222,28 @@ defineExpose({
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.compensatePositive {
|
||||
color: $cyan;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.compensateNegative {
|
||||
color: $red;
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.compensateNeutral{
|
||||
display: inline-block;
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.commandImpossible {
|
||||
color: $red;
|
||||
text-decoration: line-through $red;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
@@ -176,10 +176,7 @@ export type GameUnitType = {
|
||||
magicCoef: number;
|
||||
cost: number;
|
||||
rice: number;
|
||||
reqTech: number;
|
||||
reqCities: CityID[] | null;
|
||||
reqRegions: MapRegionID[] | null;
|
||||
reqYear: number;
|
||||
reqConstraints: Record<string, unknown>[];
|
||||
attackCoef: Record<CrewTypeID | ArmTypeID, number> | null | [];
|
||||
defenceCoef: Record<CrewTypeID | ArmTypeID, number> | null | [];
|
||||
info: string | string[];
|
||||
|
||||
@@ -40,7 +40,7 @@ if($userInfo['delete_after']){
|
||||
]);
|
||||
}
|
||||
|
||||
$penaltyList = JSON::decode($userInfo['penalty']??'{}');
|
||||
$penaltyList = Json::decode($userInfo['penalty']??'{}');
|
||||
foreach($penaltyList as $penaltyKey=>$penaltyValue){
|
||||
if($penaltyValue['expire'] ?? 0 > TimeUtil::now()){
|
||||
Json::die([
|
||||
|
||||
Reference in New Issue
Block a user