processWar 입출력 부근을 General Object로 변경
This commit is contained in:
@@ -128,7 +128,7 @@ class che_출병 extends Command\GeneralCommand{
|
||||
$general->applyDB($db);
|
||||
|
||||
//TODO: 장기적으로 통합해야함
|
||||
processWar($general->getRaw(), $this->destCity);
|
||||
processWar($general, $general->getStaticNation(), $this->destCity);
|
||||
|
||||
tryUniqueItemLottery($general);
|
||||
$general->applyDB($db);
|
||||
|
||||
@@ -524,6 +524,8 @@ class General implements iAction{
|
||||
return $caller;
|
||||
}
|
||||
|
||||
//TODO:createGeneralObjListFromDB로, 조건으로 select query나 generalIDList가 들어가는 녀석이 필요할 수 있음
|
||||
|
||||
static public function createGeneralObjFromDB(int $generalID, ?array $column=null, int $constructMode=2):self{
|
||||
$db = DB::db();
|
||||
if($constructMode > 0){
|
||||
|
||||
@@ -88,7 +88,7 @@ class WarUnitCity extends WarUnit{
|
||||
return true;
|
||||
}
|
||||
|
||||
function heavyDecreseWealth(){
|
||||
function heavyDecreaseWealth(){
|
||||
$this->multiplyVar('agri', 0.5);
|
||||
$this->multiplyVar('comm', 0.5);
|
||||
$this->multiplyVar('secu', 0.5);
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace sammo;
|
||||
class WarUnitGeneral extends WarUnit{
|
||||
protected $bonusPhase = 0;
|
||||
|
||||
function __construct(General $general, array $rawNation, bool $isAttacker, int $year, int $month){
|
||||
function __construct(General $general, array $rawNation, bool $isAttacker){
|
||||
$this->general = $general;
|
||||
$this->raw = $general->getRaw();
|
||||
$this->rawNation = $rawNation; //read-only
|
||||
|
||||
Reference in New Issue
Block a user