Trigger, Action 역할 재정의
This commit is contained in:
@@ -223,7 +223,7 @@ function getNationTypeClass(?string $type){
|
||||
$type = GameConst::$neutralNationType;
|
||||
}
|
||||
|
||||
static $basePath = __NAMESPACE__.'\\TriggerNationType\\';
|
||||
static $basePath = __NAMESPACE__.'\\ActionNationType\\';
|
||||
$classPath = ($basePath.$type);
|
||||
|
||||
if(class_exists($classPath)){
|
||||
@@ -243,7 +243,7 @@ function getPersonalityClass(?string $type){
|
||||
$type = GameConst::$neutralPersonality;
|
||||
}
|
||||
|
||||
static $basePath = __NAMESPACE__.'\\TriggerPersonality\\';
|
||||
static $basePath = __NAMESPACE__.'\\ActionPersonality\\';
|
||||
$classPath = ($basePath.$type);
|
||||
|
||||
if(class_exists($classPath)){
|
||||
@@ -263,7 +263,7 @@ function getGeneralSpecialDomesticClass(?string $type){
|
||||
$type = GameConst::$defaultSpecialDomestic;
|
||||
}
|
||||
|
||||
static $basePath = __NAMESPACE__.'\\TriggerSpecialDomestic\\';
|
||||
static $basePath = __NAMESPACE__.'\\ActionSpecialDomestic\\';
|
||||
$classPath = ($basePath.$type);
|
||||
|
||||
if(class_exists($classPath)){
|
||||
@@ -283,7 +283,7 @@ function getGeneralSpecialWarClass(?string $type){
|
||||
$type = GameConst::$defaultSpecialWar;
|
||||
}
|
||||
|
||||
static $basePath = __NAMESPACE__.'\\TriggerSpecialWar\\';
|
||||
static $basePath = __NAMESPACE__.'\\ActionSpecialWar\\';
|
||||
$classPath = ($basePath.$type);
|
||||
|
||||
if(class_exists($classPath)){
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_덕가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_덕가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '덕가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_도가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_도가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '도가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_도적 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_도적 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '도적';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_명가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_명가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '명가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_묵가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_묵가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '묵가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_법가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_법가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '법가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_병가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_병가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '병가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_불가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_불가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '불가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_오두미도 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_오두미도 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '오두미도';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_유가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_유가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '유가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_음양가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_음양가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '음양가';
|
||||
static $info = '';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_종횡가 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_종횡가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '종횡가';
|
||||
static $info = '';
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_중립 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '-';
|
||||
static $info = '';
|
||||
static $pros = '';
|
||||
static $cons = '';
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_태평도 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_태평도 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '태평도';
|
||||
static $info = '';
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
|
||||
class None implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = -1;
|
||||
static $name = '-';
|
||||
static $info = '';
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_대의 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_대의 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 1;
|
||||
static $name = '대의';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_안전 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_안전 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 9;
|
||||
static $name = '안전';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_대의 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_대의 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 0;
|
||||
static $name = '왕좌';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_유지 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_유지 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 8;
|
||||
static $name = '안전';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_은둔 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_은둔 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 10;
|
||||
static $name = '은둔';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_의협 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_의협 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 2;
|
||||
static $name = '의협';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_재간 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_재간 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 7;
|
||||
static $name = '재간';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_정복 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_정복 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 4;
|
||||
static $name = '정복';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_출세 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_출세 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 6;
|
||||
static $name = '출세';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_패권 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_패권 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 3;
|
||||
static $name = '패권';
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionPersonality;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
|
||||
class che_할거 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_할거 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 5;
|
||||
static $name = '할거';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class None implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class None implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 0;
|
||||
static $name = '-';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_경작 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_경작 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 1;
|
||||
static $name = '경작';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_귀모 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_귀모 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 31;
|
||||
static $name = '귀모';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_발명 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_발명 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 3;
|
||||
static $name = '발명';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_상재 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_상재 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 2;
|
||||
static $name = '상재';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_수비 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_수비 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 11;
|
||||
static $name = '수비';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_통찰 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_통찰 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 20;
|
||||
static $name = '인덕';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_축성 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_축성 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 10;
|
||||
static $name = '축성';
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialDomestic;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_통찰 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_통찰 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 12;
|
||||
static $name = '통찰';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialDomestic;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class None implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class None implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 0;
|
||||
static $name = '-';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_격노 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_격노 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 74;
|
||||
static $name = '격노';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_견고 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_견고 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 62;
|
||||
static $name = '견고';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_공성 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_공성 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 53;
|
||||
static $name = '공성';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_궁병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_궁병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 51;
|
||||
static $name = '궁병';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_귀병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_귀병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 40;
|
||||
static $name = '귀병';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_기병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_기병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 52;
|
||||
static $name = '기병';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_돌격 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_돌격 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 60;
|
||||
static $name = '돌격';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_무쌍 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_무쌍 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 61;
|
||||
static $name = '무쌍';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_신중 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_신중 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 45;
|
||||
static $name = '반계';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_보병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_보병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 50;
|
||||
static $name = '보병';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_신산 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_신산 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 41;
|
||||
static $name = '신산';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_신중 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_신중 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 44;
|
||||
static $name = '신중';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_위압 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_위압 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 63;
|
||||
static $name = '위압';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_의술 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_의술 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 73;
|
||||
static $name = '의술';
|
||||
@@ -19,7 +19,7 @@ class che_의술 implements iActionTrigger{
|
||||
SpecialityConst::STAT_INTEL
|
||||
];
|
||||
|
||||
public function onPreTurnExecute(General $general):array{
|
||||
public function getPreTurnExecuteTriggerList(General $general):array{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_저격 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_저격 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 70;
|
||||
static $name = '저격';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_집중 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_집중 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 43;
|
||||
static $name = '집중';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_징병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_징병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 72;
|
||||
static $name = '징병';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_척사 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_척사 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 75;
|
||||
static $name = '척사';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_필살 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_필살 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 71;
|
||||
static $name = '필살';
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_환술 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
class che_환술 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 42;
|
||||
static $name = '환술';
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
trait DefaultActionTrigger{
|
||||
public function onPreTurnExecute(General $general):array{
|
||||
trait DefaultAction{
|
||||
public function getPreTurnExecuteTriggerList(General $general):array{
|
||||
return [];
|
||||
}
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
namespace sammo;
|
||||
|
||||
class General implements iActionTrigger{
|
||||
class General implements iAction{
|
||||
use LazyVarUpdater;
|
||||
|
||||
/**
|
||||
* @var iActionTrigger $nationType
|
||||
* @var iActionTrigger $levelObj
|
||||
* @var iActionTrigger $specialDomesticObj
|
||||
* @var iAction $nationType
|
||||
* @var iAction $levelObj
|
||||
* @var iAction $specialDomesticObj
|
||||
*/
|
||||
|
||||
protected $raw = [];
|
||||
@@ -123,11 +123,11 @@ class General implements iActionTrigger{
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
public function getNationTypeObj():iActionTrigger{
|
||||
public function getNationTypeObj():iAction{
|
||||
return $this->nationType;
|
||||
}
|
||||
|
||||
public function getGeneralLevelObj():iActionTrigger{
|
||||
public function getGeneralLevelObj():iAction{
|
||||
return $this->levelObj;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class General implements iActionTrigger{
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function onPreTurnExecute(General $general):array{
|
||||
public function getPreTurnExecuteTriggerList(General $general):array{
|
||||
$chain = [];
|
||||
foreach(array_merge([
|
||||
$this->nationType,
|
||||
@@ -288,7 +288,7 @@ class General implements iActionTrigger{
|
||||
if(!$iObj){
|
||||
continue;
|
||||
}
|
||||
$chain[] = $iObj->onPreTurnExecute($general);
|
||||
$chain[] = $iObj->getPreTurnExecuteTriggerList($general);
|
||||
}
|
||||
return array_merge([], ...$chain);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
class GeneralTriggerCaller extends TriggerCaller{
|
||||
function checkValidTrigger(iObjectTrigger $trigger):bool{
|
||||
if($trigger instanceof iGeneralTrigger){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
abstract class TriggerCaller{
|
||||
|
||||
protected $triggerListByPriority = [];
|
||||
protected $sorted = false;
|
||||
|
||||
abstract function checkValidTrigger(iObjectTrigger $trigger):bool;
|
||||
|
||||
function __construct(?array $triggerList=null)
|
||||
{
|
||||
if(!$triggerList){
|
||||
return;
|
||||
}
|
||||
$this->merge($triggerList);
|
||||
}
|
||||
|
||||
function merge(array $triggerList){
|
||||
foreach($triggerList as $trigger){
|
||||
if(!checkValidTrigger($trigger)){
|
||||
throw new \InvalidArgumentException('Invalid Trigger Type');
|
||||
}
|
||||
/** @var iObjectTrigger $trigger */
|
||||
$priority = $trigger->getPriority();
|
||||
$uniqueID = $trigger->getUniqueID();
|
||||
if(!key_exists($priority, $this->triggerListByPriority)){
|
||||
$this->triggerListByPriority[$priority] = [];
|
||||
}
|
||||
|
||||
$subTriggerList = &$this->triggerListByPriority[$priority];
|
||||
|
||||
if(key_exists($uniqueID, $subTriggerList)){
|
||||
continue;
|
||||
}
|
||||
$subTriggerList[$uniqueID] = $trigger;
|
||||
}
|
||||
$this->sorted = false;
|
||||
}
|
||||
|
||||
function fire(?array $env = null, $arg = null):?array{
|
||||
if(!$this->sorted){
|
||||
krsort($this->triggerListByPriority);
|
||||
$this->sorted = true;
|
||||
}
|
||||
|
||||
foreach($this->triggerListByPriority as $subTriggerList){
|
||||
/** @var iObjectTrigger[] $subTriggerList */
|
||||
foreach($subTriggerList as $trigger){
|
||||
$env = $trigger->action($env, $arg);
|
||||
}
|
||||
}
|
||||
return $env;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class TriggerGeneralLevel implements iActionTrigger{
|
||||
use DefaultActionTrigger;
|
||||
class TriggerGeneralLevel implements iAction{
|
||||
use DefaultAction;
|
||||
|
||||
protected $generalLevel;
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
namespace sammo\TriggerNationType;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
|
||||
class che_중립 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $name = '-';
|
||||
static $info = '';
|
||||
static $pros = '';
|
||||
static $cons = '';
|
||||
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
namespace sammo\TriggerPersonality;
|
||||
use \sammo\iActionTrigger;
|
||||
|
||||
class None implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = -1;
|
||||
static $name = '-';
|
||||
static $info = '';
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class TurnExecutionHelper
|
||||
|
||||
public function preprocessCommand(){
|
||||
$general = $this->getGeneral();
|
||||
$general->onPreTurnExecute($general);
|
||||
$general->getPreTurnExecuteTriggerList($general);
|
||||
|
||||
if($general->getVar('injury') && !$general->hasActivatedSkill('pre.부상경감')){
|
||||
$general->increaseVarWithLimit('injury', -10, 0);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
class WarUnitTriggerCaller extends TriggerCaller{
|
||||
function checkValidTrigger(iObjectTrigger $trigger):bool{
|
||||
if($trigger instanceof iWarUnitTrigger){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
interface iActionTrigger{
|
||||
interface iAction{
|
||||
|
||||
const PRIORITY_BEGIN = 50000;
|
||||
const PRIORITY_PRE = 40000;
|
||||
@@ -10,7 +10,10 @@ interface iActionTrigger{
|
||||
const PRIORITY_FINAL = 10000;
|
||||
|
||||
//TODO: 능력치는?
|
||||
public function onPreTurnExecute(General $general):array;
|
||||
/**
|
||||
* @return iGeneralTrigger[]
|
||||
*/
|
||||
public function getPreTurnExecuteTriggerList(General $general):array;
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value):float;
|
||||
|
||||
public function onPreGeneralStatUpdate(General $general, string $statName, $value);
|
||||
@@ -18,7 +21,16 @@ interface iActionTrigger{
|
||||
public function onCalcStrategic(string $turnType, string $varType, $value);
|
||||
public function onCalcNationalIncome(string $type, int $amount):int;
|
||||
|
||||
/**
|
||||
* @return iWarUnitTrigger[]
|
||||
*/
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array;
|
||||
/**
|
||||
* @return iWarUnitTrigger[]
|
||||
*/
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):array;
|
||||
/**
|
||||
* @return iWarUnitTrigger[]
|
||||
*/
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):array;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
interface iGeneralTrigger extends iObjectTrigger{
|
||||
public function __construct(General $general);
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
interface iObjectTrigger{
|
||||
public function getPriority():int;
|
||||
public function action(?array $env=null, $arg=null):?array;
|
||||
public function getUniqueID():string;
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
interface iWarUnitTrigger extends iObjectTrigger{
|
||||
public function __construct(WarUnit $general);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user