iAction,name,info, buildiActionCache, mode, myInfo
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\GeneralTrigger;
|
||||
use function sammo\isConsumable;
|
||||
use function sammo\getItemInfo;
|
||||
use function sammo\getItemCost;
|
||||
|
||||
//XXX:임시용!
|
||||
class che_Dummy extends \sammo\BaseItem{
|
||||
|
||||
protected $_id;
|
||||
protected $_name;
|
||||
protected $_info;
|
||||
protected $_cost;
|
||||
protected $_consumable = false;
|
||||
|
||||
function getID(){
|
||||
return $this->_id;
|
||||
}
|
||||
function getName(){
|
||||
return $this->_name;
|
||||
}
|
||||
function getInfo(){
|
||||
return $this->_info;
|
||||
}
|
||||
function getCost(){
|
||||
return $this->_cost;
|
||||
}
|
||||
function isConsumable(){
|
||||
return $this->_consumable;
|
||||
}
|
||||
|
||||
public function __construct(string $itemCode)
|
||||
{
|
||||
$this->_id = $itemCode;
|
||||
[$this->_name, $this->_info] = getItemInfo($itemCode);
|
||||
$this->_cost = getItemCost($itemCode);
|
||||
$this->_consumable = isConsumable($itemCode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace sammo\ActionNationType;
|
||||
use \sammo\iAction;
|
||||
|
||||
class None implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
protected $name = '-';
|
||||
protected $info = '';
|
||||
static $pros = '';
|
||||
static $cons = '';
|
||||
}
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_덕가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '덕가';
|
||||
static $info = '';
|
||||
protected $name = '덕가';
|
||||
protected $info = '';
|
||||
static $pros = '치안↑ 인구↑ 민심↑';
|
||||
static $cons = '쌀수입↓ 수성↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_도가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '도가';
|
||||
static $info = '';
|
||||
protected $name = '도가';
|
||||
protected $info = '';
|
||||
static $pros = '인구↑';
|
||||
static $cons = '기술↓ 치안↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_도적 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '도적';
|
||||
static $info = '';
|
||||
protected $name = '도적';
|
||||
protected $info = '';
|
||||
static $pros = '계략↑';
|
||||
static $cons = '금수입↓ 치안↓ 민심↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_명가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '명가';
|
||||
static $info = '';
|
||||
protected $name = '명가';
|
||||
protected $info = '';
|
||||
static $pros = '기술↑ 인구↑';
|
||||
static $cons = '쌀수입↓ 수성↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_묵가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '묵가';
|
||||
static $info = '';
|
||||
protected $name = '묵가';
|
||||
protected $info = '';
|
||||
static $pros = '수성↑';
|
||||
static $cons = '기술↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_법가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '법가';
|
||||
static $info = '';
|
||||
protected $name = '법가';
|
||||
protected $info = '';
|
||||
static $pros = '금수입↑ 치안↑';
|
||||
static $cons = '인구↓ 민심↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_병가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '병가';
|
||||
static $info = '';
|
||||
protected $name = '병가';
|
||||
protected $info = '';
|
||||
static $pros = '기술↑ 수성↑';
|
||||
static $cons = '인구↓ 민심↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_불가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '불가';
|
||||
static $info = '';
|
||||
protected $name = '불가';
|
||||
protected $info = '';
|
||||
static $pros = '민심↑ 수성↑';
|
||||
static $cons = '금수입↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_오두미도 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '오두미도';
|
||||
static $info = '';
|
||||
protected $name = '오두미도';
|
||||
protected $info = '';
|
||||
static $pros = '쌀수입↑ 인구↑';
|
||||
static $cons = '기술↓ 수성↓ 내정↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_유가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '유가';
|
||||
static $info = '';
|
||||
protected $name = '유가';
|
||||
protected $info = '';
|
||||
static $pros = '내정↑ 민심↑';
|
||||
static $cons = '쌀수입↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_음양가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '음양가';
|
||||
static $info = '';
|
||||
protected $name = '음양가';
|
||||
protected $info = '';
|
||||
static $pros = '내정↑ 인구↑';
|
||||
static $cons = '기술↓ 전략↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_종횡가 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '종횡가';
|
||||
static $info = '';
|
||||
protected $name = '종횡가';
|
||||
protected $info = '';
|
||||
static $pros = '전략↑ 수성↑';
|
||||
static $cons = '금수입↓ 내정↓';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_중립 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '-';
|
||||
static $info = '';
|
||||
protected $name = '-';
|
||||
protected $info = '';
|
||||
static $pros = '';
|
||||
static $cons = '';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use \sammo\General;
|
||||
class che_태평도 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $name = '태평도';
|
||||
static $info = '';
|
||||
protected $name = '태평도';
|
||||
protected $info = '';
|
||||
static $pros = '인구↑ 민심↑';
|
||||
static $cons = '기술↓ 수성↓';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use \sammo\iAction;
|
||||
class None implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = -1;
|
||||
static $name = '-';
|
||||
static $info = '';
|
||||
protected $id = -1;
|
||||
protected $name = '-';
|
||||
protected $info = '';
|
||||
}
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_대의 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 1;
|
||||
static $name = '대의';
|
||||
static $info = '명성 +10%, 훈련 -5';
|
||||
protected $id = 1;
|
||||
protected $name = '대의';
|
||||
protected $info = '명성 +10%, 훈련 -5';
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName == 'experience'){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_안전 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 9;
|
||||
static $name = '안전';
|
||||
static $info = '사기 -5, 징·모병 비용 -20%';
|
||||
protected $id = 9;
|
||||
protected $name = '안전';
|
||||
protected $info = '사기 -5, 징·모병 비용 -20%';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_왕좌 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 0;
|
||||
static $name = '왕좌';
|
||||
static $info = '명성 +10%, 사기 -5';
|
||||
protected $id = 0;
|
||||
protected $name = '왕좌';
|
||||
protected $info = '명성 +10%, 사기 -5';
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName == 'experience'){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_유지 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 8;
|
||||
static $name = '안전';
|
||||
static $info = '훈련 -5, 징·모병 비용 -20%';
|
||||
protected $id = 8;
|
||||
protected $name = '안전';
|
||||
protected $info = '훈련 -5, 징·모병 비용 -20%';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_은둔 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 10;
|
||||
static $name = '은둔';
|
||||
static $info = '명성 -10%, 계급 -10%, 사기 -5, 훈련 -5, 단련 성공률 +10%';
|
||||
protected $id = 10;
|
||||
protected $name = '은둔';
|
||||
protected $info = '명성 -10%, 계급 -10%, 사기 -5, 훈련 -5, 단련 성공률 +10%';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if($turnType == '단련'){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_의협 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 2;
|
||||
static $name = '의협';
|
||||
static $info = '사기 +5, 징·모병 비용 +20%';
|
||||
protected $id = 2;
|
||||
protected $name = '의협';
|
||||
protected $info = '사기 +5, 징·모병 비용 +20%';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_재간 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 7;
|
||||
static $name = '재간';
|
||||
static $info = '명성 -10%, 징·모병 비용 -20%';
|
||||
protected $id = 7;
|
||||
protected $name = '재간';
|
||||
protected $info = '명성 -10%, 징·모병 비용 -20%';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_정복 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 4;
|
||||
static $name = '정복';
|
||||
static $info = '명성 -10%, 사기 +5';
|
||||
protected $id = 4;
|
||||
protected $name = '정복';
|
||||
protected $info = '명성 -10%, 사기 +5';
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName == 'experience'){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_출세 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 6;
|
||||
static $name = '출세';
|
||||
static $info = '명성 +10%, 징·모병 비용 +20%';
|
||||
protected $id = 6;
|
||||
protected $name = '출세';
|
||||
protected $info = '명성 +10%, 징·모병 비용 +20%';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_패권 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 3;
|
||||
static $name = '패권';
|
||||
static $info = '훈련 +5, 징·모병 비용 +20%';
|
||||
protected $id = 3;
|
||||
protected $name = '패권';
|
||||
protected $info = '훈련 +5, 징·모병 비용 +20%';
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
|
||||
@@ -6,9 +6,9 @@ use \sammo\General;
|
||||
class che_할거 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 5;
|
||||
static $name = '할거';
|
||||
static $info = '명성 -10%, 훈련 +5';
|
||||
protected $id = 5;
|
||||
protected $name = '할거';
|
||||
protected $info = '명성 -10%, 훈련 +5';
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName == 'experience'){
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class None implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 0;
|
||||
static $name = '-';
|
||||
static $info = null;
|
||||
protected $id = 0;
|
||||
protected $name = '-';
|
||||
protected $info = null;
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 0;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_거상 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 999;
|
||||
static $name = '거상';
|
||||
static $info = '<비활성화>';
|
||||
protected $id = 999;
|
||||
protected $name = '거상';
|
||||
protected $info = '<비활성화>';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 0;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_경작 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 1;
|
||||
static $name = '경작';
|
||||
static $info = '[내정] 농지 개간 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
protected $id = 1;
|
||||
protected $name = '경작';
|
||||
protected $info = '[내정] 농지 개간 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_귀모 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 31;
|
||||
static $name = '귀모';
|
||||
static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
|
||||
protected $id = 31;
|
||||
protected $name = '귀모';
|
||||
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_PERCENT;
|
||||
static $selectWeight = 2.5;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_발명 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 3;
|
||||
static $name = '발명';
|
||||
static $info = '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
protected $id = 3;
|
||||
protected $name = '발명';
|
||||
protected $info = '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_상재 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 2;
|
||||
static $name = '상재';
|
||||
static $info = '[내정] 상업 투자 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
protected $id = 2;
|
||||
protected $name = '상재';
|
||||
protected $info = '[내정] 상업 투자 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_수비 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 11;
|
||||
static $name = '수비';
|
||||
static $info = '[내정] 수비 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
protected $id = 11;
|
||||
protected $name = '수비';
|
||||
protected $info = '[내정] 수비 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_인덕 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 20;
|
||||
static $name = '인덕';
|
||||
static $info = '[내정] 주민 선정·정착 장려 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
protected $id = 20;
|
||||
protected $name = '인덕';
|
||||
protected $info = '[내정] 주민 선정·정착 장려 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_축성 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 10;
|
||||
static $name = '축성';
|
||||
static $info = '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
protected $id = 10;
|
||||
protected $name = '축성';
|
||||
protected $info = '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class che_통찰 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 12;
|
||||
static $name = '통찰';
|
||||
static $info = '[내정] 치안 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
protected $id = 12;
|
||||
protected $name = '통찰';
|
||||
protected $info = '[내정] 치안 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -7,9 +7,9 @@ use \sammo\SpecialityConst;
|
||||
class None implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 0;
|
||||
static $name = '-';
|
||||
static $info = null;
|
||||
protected $id = 0;
|
||||
protected $name = '-';
|
||||
protected $info = null;
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 0;
|
||||
|
||||
@@ -11,9 +11,9 @@ use sammo\WarUnitTrigger\che_격노발동;
|
||||
class che_격노 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 74;
|
||||
static $name = '격노';
|
||||
static $info = '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
protected $id = 74;
|
||||
protected $name = '격노';
|
||||
protected $info = '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -11,9 +11,9 @@ use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
class che_견고 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 62;
|
||||
static $name = '견고';
|
||||
static $info = '[전투] 상대 필살 불가, 상대 계략 시도시 성공 확률 -10%p';
|
||||
protected $id = 62;
|
||||
protected $name = '견고';
|
||||
protected $info = '[전투] 상대 필살 불가, 상대 계략 시도시 성공 확률 -10%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -10,9 +10,9 @@ use \sammo\WarUnitCity;
|
||||
class che_공성 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 53;
|
||||
static $name = '공성';
|
||||
static $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%';
|
||||
protected $id = 53;
|
||||
protected $name = '공성';
|
||||
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -9,9 +9,9 @@ use \sammo\GameUnitConst;
|
||||
class che_궁병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 51;
|
||||
static $name = '궁병';
|
||||
static $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p';
|
||||
protected $id = 51;
|
||||
protected $name = '궁병';
|
||||
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -9,9 +9,9 @@ use \sammo\WarUnit;
|
||||
class che_귀병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 40;
|
||||
static $name = '귀병';
|
||||
static $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p';
|
||||
protected $id = 40;
|
||||
protected $name = '귀병';
|
||||
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -9,9 +9,9 @@ use \sammo\WarUnit;
|
||||
class che_기병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 52;
|
||||
static $name = '기병';
|
||||
static $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%';
|
||||
protected $id = 52;
|
||||
protected $name = '기병';
|
||||
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -10,9 +10,9 @@ use \sammo\WarUnitTriggerCaller;
|
||||
class che_돌격 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 60;
|
||||
static $name = '돌격';
|
||||
static $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%';
|
||||
protected $id = 60;
|
||||
protected $name = '돌격';
|
||||
protected $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_무쌍 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 61;
|
||||
static $name = '무쌍';
|
||||
static $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p';
|
||||
protected $id = 61;
|
||||
protected $name = '무쌍';
|
||||
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -13,9 +13,9 @@ use \sammo\WarUnitTrigger\che_반계발동;
|
||||
class che_반계 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 45;
|
||||
static $name = '반계';
|
||||
static $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)';
|
||||
protected $id = 45;
|
||||
protected $name = '반계';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -9,9 +9,9 @@ use \sammo\WarUnit;
|
||||
class che_보병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 50;
|
||||
static $name = '보병';
|
||||
static $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%';
|
||||
protected $id = 50;
|
||||
protected $name = '보병';
|
||||
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_신산 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 41;
|
||||
static $name = '신산';
|
||||
static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p<br>[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p';
|
||||
protected $id = 41;
|
||||
protected $name = '신산';
|
||||
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p<br>[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_신중 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 44;
|
||||
static $name = '신중';
|
||||
static $info = '[전투] 계략 성공 확률 100%';
|
||||
protected $id = 44;
|
||||
protected $name = '신중';
|
||||
protected $info = '[전투] 계략 성공 확률 100%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -11,9 +11,9 @@ use \sammo\WarUnitTrigger\che_위압발동;
|
||||
class che_위압 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 63;
|
||||
static $name = '위압';
|
||||
static $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)';
|
||||
protected $id = 63;
|
||||
protected $name = '위압';
|
||||
protected $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -14,9 +14,9 @@ use sammo\WarUnitTriggerCaller;
|
||||
class che_의술 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 73;
|
||||
static $name = '의술';
|
||||
static $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
protected $id = 73;
|
||||
protected $name = '의술';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_PERCENT;
|
||||
static $selectWeight = 2;
|
||||
|
||||
@@ -11,9 +11,9 @@ use \sammo\WarUnitTrigger\che_저격발동;
|
||||
class che_저격 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 70;
|
||||
static $name = '저격';
|
||||
static $info = '[전투] 전투 개시 시 1/3 확률로 저격 발동';
|
||||
protected $id = 70;
|
||||
protected $name = '저격';
|
||||
protected $info = '[전투] 전투 개시 시 1/3 확률로 저격 발동';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_집중 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 43;
|
||||
static $name = '집중';
|
||||
static $info = '[전투] 계략 성공 시 대미지 +50%';
|
||||
protected $id = 43;
|
||||
protected $name = '집중';
|
||||
protected $info = '[전투] 계략 성공 시 대미지 +50%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_징병 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 72;
|
||||
static $name = '징병';
|
||||
static $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%';
|
||||
protected $id = 72;
|
||||
protected $name = '징병';
|
||||
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_척사 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 75;
|
||||
static $name = '척사';
|
||||
static $info = '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%';
|
||||
protected $id = 75;
|
||||
protected $name = '척사';
|
||||
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_필살 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 71;
|
||||
static $name = '필살';
|
||||
static $info = '[전투] 필살 확률 +20%p';
|
||||
protected $id = 71;
|
||||
protected $name = '필살';
|
||||
protected $info = '[전투] 필살 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -8,9 +8,9 @@ use \sammo\WarUnit;
|
||||
class che_환술 implements iAction{
|
||||
use \sammo\DefaultAction;
|
||||
|
||||
static $id = 42;
|
||||
static $name = '환술';
|
||||
static $info = '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%';
|
||||
protected $id = 42;
|
||||
protected $name = '환술';
|
||||
protected $info = '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_PERCENT;
|
||||
static $selectWeight = 5;
|
||||
|
||||
@@ -18,12 +18,7 @@ class BaseItem implements iAction{
|
||||
function getID(){
|
||||
return $this->id;
|
||||
}
|
||||
function getName(){
|
||||
return $this->name;
|
||||
}
|
||||
function getInfo(){
|
||||
return $this->info;
|
||||
}
|
||||
|
||||
function getCost(){
|
||||
return $this->cost;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
namespace sammo;
|
||||
|
||||
trait DefaultAction{
|
||||
|
||||
public function getName():string{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getInfo():string{
|
||||
return $this->info;
|
||||
}
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -290,4 +290,20 @@ class GameConstBase
|
||||
]
|
||||
];
|
||||
public static $retirementYear = 80;
|
||||
|
||||
public static $randGenFirstName = [
|
||||
'가', '간', '감', '강', '고', '공', '공손', '곽', '관', '괴', '교', '금', '노', '뇌', '능', '도', '동', '두',
|
||||
'등', '마', '맹', '문', '미', '반', '방', '부', '비', '사', '사마', '서', '설', '성', '소', '손', '송', '순',
|
||||
'신', '심', '악', '안', '양', '엄', '여', '염', '오', '왕', '요', '우', '원', '위', '유', '육', '윤', '이',
|
||||
'장', '저', '전', '정', '제갈', '조', '종', '주', '진', '채', '태사', '하', '하후', '학', '한', '향', '허',
|
||||
'호', '화', '황', '공손', '손', '왕', '유', '장', '조'
|
||||
];
|
||||
public static $randGenMiddleName = [''];
|
||||
public static $randGenLastName = [
|
||||
'가', '간', '강', '거', '건', '검', '견', '경', '공', '광', '권', '규', '녕', '단', '대', '도', '등', '람',
|
||||
'량', '례', '로', '료', '모', '민', '박', '범', '보', '비', '사', '상', '색', '서', '소', '속', '송', '수',
|
||||
'순', '습', '승', '양', '연', '영', '온', '옹', '완', '우', '웅', '월', '위', '유', '윤', '융', '이', '익',
|
||||
'임', '정', '제', '조', '주', '준', '지', '찬', '책', '충', '탁', '택', '통', '패', '평', '포', '합', '해',
|
||||
'혁', '현', '화', '환', '회', '횡', '후', '훈', '휴', '흠', '흥'
|
||||
];
|
||||
}
|
||||
|
||||
+29
-18
@@ -62,20 +62,13 @@ class General implements iAction{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$nationTypeClass = getNationTypeClass($staticNation['type']);
|
||||
$this->nationType = new $nationTypeClass;
|
||||
$this->nationType = buildNationTypeClass($staticNation['type']);
|
||||
$this->levelObj = new TriggerGeneralLevel($this->raw, $staticNation['level'], $city);
|
||||
|
||||
$specialDomesticClass = getGeneralSpecialDomesticClass($raw['special']);
|
||||
$this->specialDomesticObj = new $specialDomesticClass;
|
||||
$this->specialDomesticObj = buildGeneralSpecialDomesticClass($raw['special']);
|
||||
$this->specialWarObj = buildGeneralSpecialWarClass($raw['special2']);
|
||||
|
||||
$specialWarClass = getGeneralSpecialWarClass($raw['special2']);
|
||||
$this->specialWarObj = new $specialWarClass;
|
||||
|
||||
$personalityClass = getPersonalityClass($raw['personal']);
|
||||
$this->personalityObj = new $personalityClass;
|
||||
$this->personalityObj = buildPersonalityClass($raw['personal']);
|
||||
|
||||
$this->itemObjs['horse'] = buildItemClass($raw['horse']);
|
||||
$this->itemObjs['weapon'] = buildItemClass($raw['weapon']);
|
||||
@@ -93,19 +86,31 @@ class General implements iAction{
|
||||
);
|
||||
}
|
||||
|
||||
function deleteItem(){
|
||||
$this->setVar('item', 0);
|
||||
$this->itemObjs['item'] = new ActionItem\che_Dummy(0);
|
||||
function deleteItem(string $itemKey='item'){
|
||||
$this->setVar($itemKey, 0);
|
||||
$this->itemObjs[$itemKey] = new ActionItem\None();
|
||||
}
|
||||
|
||||
function getItem():BaseItem{
|
||||
return $this->itemObjs['item'];
|
||||
function getItem(string $itemKey='item'):BaseItem{
|
||||
return $this->itemObjs[$itemKey];
|
||||
}
|
||||
|
||||
function getItems():array{
|
||||
return $this->itemObjs;
|
||||
}
|
||||
|
||||
function getPersonality():iAction{
|
||||
return $this->personalityObj;
|
||||
}
|
||||
|
||||
function getSpecialDomestic():iAction{
|
||||
return $this->specialDomesticObj;
|
||||
}
|
||||
|
||||
function getSpecialWar():iAction{
|
||||
return $this->specialWarObj;
|
||||
}
|
||||
|
||||
function getLastTurn():LastTurn{
|
||||
return $this->lastTurn;
|
||||
}
|
||||
@@ -157,6 +162,11 @@ class General implements iAction{
|
||||
return $this->raw['name'];
|
||||
}
|
||||
|
||||
function getInfo():string{
|
||||
//iAction용 info로는 적절하지 않음
|
||||
return '';
|
||||
}
|
||||
|
||||
function getID():int{
|
||||
return $this->raw['no'];
|
||||
}
|
||||
@@ -619,9 +629,10 @@ class General implements iAction{
|
||||
'leadership', 'leadership2', 'strength', 'strength2', 'intel', 'intel2', 'weapon', 'book', 'horse', 'item',
|
||||
'experience', 'dedication', 'level', 'gold', 'rice', 'crew', 'crewtype', 'train', 'atmos', 'turntime',
|
||||
'makelimit', 'killturn', 'block', 'dedlevel', 'explevel', 'age', 'startage', 'belong',
|
||||
'personal', 'special', 'special2', 'mode', 'tnmt', 'npc', 'npc_org', 'deadyear', 'npcmsg',
|
||||
'personal', 'special', 'special2', 'defence_train', 'tnmt', 'npc', 'npc_org', 'deadyear', 'npcmsg',
|
||||
'dex0', 'dex10', 'dex20', 'dex30', 'dex40',
|
||||
'warnum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar', 'last_turn', 'myset'
|
||||
'warnum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar', 'last_turn', 'myset',
|
||||
'specage', 'specage2', 'con', 'connect'
|
||||
];
|
||||
|
||||
if($column === null){
|
||||
|
||||
@@ -1202,8 +1202,8 @@ class GeneralAI{
|
||||
|
||||
$techCost = getTechCost($nation['tech']);
|
||||
|
||||
if($general->getVar('mode') < 2) {
|
||||
$general->setVar('mode', 2);
|
||||
if($general->getVar('defence_train') < 80) {
|
||||
$general->setVar('defence_train', 80);
|
||||
}
|
||||
|
||||
if($general->getVar('level') == 12){
|
||||
|
||||
@@ -13,6 +13,10 @@ trait LazyVarUpdater{
|
||||
return $this->raw[$key];
|
||||
}
|
||||
|
||||
function getVars(string ...$keys){
|
||||
return array_map([$this, 'getVar'], $keys);
|
||||
}
|
||||
|
||||
function touchVar(string $key):bool{
|
||||
if(key_exists($key, $this->raw)){
|
||||
return false;
|
||||
|
||||
@@ -39,6 +39,10 @@ class TriggerGeneralLevel implements iAction{
|
||||
$this->lbonus = calcLeadershipBonus($this->generalLevel, $nationLevel);
|
||||
}
|
||||
|
||||
public function getLbonus():int{
|
||||
return $this->lbonus;
|
||||
}
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if($turnType == '농업' || $turnType == '상업'){
|
||||
if(in_array($this->generalLevel, [12, 11, 9, 7, 5, 3])){
|
||||
|
||||
@@ -173,7 +173,7 @@ class TurnExecutionHelper
|
||||
$general->setVar('killturn', ($general->getVar('deadyear') - $gameStor->year) * 12);
|
||||
$general->setVar('npc', $general->getVar('npc_org'));
|
||||
$general->setVar('owner', 1);
|
||||
$general->setVar('mode', 2);
|
||||
$general->setVar('defence_train', 80);
|
||||
$general->setVar('name2', null);
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
namespace sammo;
|
||||
|
||||
interface iAction{
|
||||
|
||||
public function getName():string;
|
||||
public function getInfo():string;
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller;
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user