Trigger, Action 역할 재정의

This commit is contained in:
2018-10-01 02:02:30 +09:00
parent 5f8e4ae10c
commit d2c5c856ab
70 changed files with 372 additions and 262 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class None implements iAction{
use \sammo\DefaultAction;
static $id = 0;
static $name = '-';
static $info = null;
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 0;
static $type = [
SpecialityConst::DISABLED
];
}
@@ -0,0 +1,29 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_경작 implements iAction{
use \sammo\DefaultAction;
static $id = 1;
static $name = '경작';
static $info = '[내정] 농지 개간 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_INTEL
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '농업'){
if($varType == 'score') return $value * 1.1;
if($varType == 'cost') return $value * 0.8;
if($varType == 'success') return $value + 0.1;
}
return $value;
}
}
@@ -0,0 +1,30 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_귀모 implements iAction{
use \sammo\DefaultAction;
static $id = 31;
static $name = '귀모';
static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +20%p';
static $selectWeightType = SpecialityConst::WEIGHT_PERCENT;
static $selectWeight = 2.5;
static $type = [
SpecialityConst::STAT_LEADERSHIP,
SpecialityConst::STAT_POWER,
SpecialityConst::STAT_INTEL
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '계략'){
if($varType == 'success') return $value + 0.2;
}
return $value;
}
}
@@ -0,0 +1,29 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_발명 implements iAction{
use \sammo\DefaultAction;
static $id = 3;
static $name = '발명';
static $info = '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_INTEL
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '기술'){
if($varType == 'score') return $value * 1.1;
if($varType == 'cost') return $value * 0.8;
if($varType == 'success') return $value + 0.1;
}
return $value;
}
}
@@ -0,0 +1,29 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_상재 implements iAction{
use \sammo\DefaultAction;
static $id = 2;
static $name = '상재';
static $info = '[내정] 상업 투자 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_INTEL
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '상업'){
if($varType == 'score') return $value * 1.1;
if($varType == 'cost') return $value * 0.8;
if($varType == 'success') return $value + 0.1;
}
return $value;
}
}
@@ -0,0 +1,29 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_수비 implements iAction{
use \sammo\DefaultAction;
static $id = 11;
static $name = '수비';
static $info = '[내정] 수비 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_POWER
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '수비'){
if($varType == 'score') return $value * 1.1;
if($varType == 'cost') return $value * 0.8;
if($varType == 'success') return $value + 0.1;
}
return $value;
}
}
@@ -0,0 +1,29 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_통찰 implements iAction{
use \sammo\DefaultAction;
static $id = 20;
static $name = '인덕';
static $info = '[내정] 주민 선정·정착 장려 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_LEADERSHIP
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '민심' || $turnType == '인구'){
if($varType == 'score') return $value * 1.1;
if($varType == 'cost') return $value * 0.8;
if($varType == 'success') return $value + 0.1;
}
return $value;
}
}
@@ -0,0 +1,29 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_축성 implements iAction{
use \sammo\DefaultAction;
static $id = 10;
static $name = '축성';
static $info = '[내정] 기술 연구 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_POWER
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '성벽'){
if($varType == 'score') return $value * 1.1;
if($varType == 'cost') return $value * 0.8;
if($varType == 'success') return $value + 0.1;
}
return $value;
}
}
@@ -0,0 +1,29 @@
<?php
namespace sammo\ActionSpecialDomestic;
use \sammo\iAction;
use \sammo\General;
use \sammo\SpecialityConst;
class che_통찰 implements iAction{
use \sammo\DefaultAction;
static $id = 12;
static $name = '통찰';
static $info = '[내정] 치안 강화 : 기본 보정 +10%, 성공률 +10%p, 비용 -20%';
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
static $selectWeight = 1;
static $type = [
SpecialityConst::STAT_POWER
];
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '치안'){
if($varType == 'score') return $value * 1.1;
if($varType == 'cost') return $value * 0.8;
if($varType == 'success') return $value + 0.1;
}
return $value;
}
}