trigger 타입에서 $tunType을 한글로 변경. 성격 추가. 계략 성공 확률을 onCalcDomestic으로 통합.

This commit is contained in:
2018-09-13 01:43:32 +09:00
parent 1efef1fdcd
commit d981265f12
37 changed files with 366 additions and 52 deletions
+11
View File
@@ -0,0 +1,11 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
class None implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = -1;
static $name = '-';
static $info = '';
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_대의 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 1;
static $name = '대의';
static $info = '명성 +10%, 훈련 -5';
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'experience'){
return $value * 1.1;
}
if($statName == 'bonusTrain'){
return $value - 5;
}
return $value;
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_안전 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 9;
static $name = '안전';
static $info = '사기 -5, 징·모병 비용 -20%';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost'){
return $value * 0.8;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'bonusAtmos'){
return $value - 5;
}
return $value;
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_대의 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 0;
static $name = '왕좌';
static $info = '명성 +10%, 사기 -5';
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'experience'){
return $value * 1.1;
}
if($statName == 'bonusAtmos'){
return $value - 5;
}
return $value;
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_유지 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 8;
static $name = '안전';
static $info = '훈련 -5, 징·모병 비용 -20%';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost'){
return $value * 0.8;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'bonusTrain'){
return $value - 5;
}
return $value;
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_대의 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 0;
static $name = '왕좌';
static $info = '명성 +10%, 사기 -5';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if($turnType == '단련'){
if($varType == 'succ'){
return $value + 0.1;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'bonusAtmos'){
return $value - 5;
}
if($statName == 'bonusTrain'){
return $value - 5;
}
if($statName == 'experience'){
return $value * 0.9;
}
if($statName == 'dedication'){
return $value * 0.9;
}
return $value;
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_의협 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 2;
static $name = '의협';
static $info = '사기 +5, 징·모병 비용 +20%';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost'){
return $value * 1.2;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'bonusAtmos'){
return $value + 5;
}
return $value;
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_재간 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 7;
static $name = '재간';
static $info = '명성 -10%, 징·모병 비용 -20%';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost'){
return $value * 0.8;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'experience'){
return $value * 0.9;
}
return $value;
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_정복 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 4;
static $name = '정복';
static $info = '명성 -10%, 사기 +5';
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'experience'){
return $value * 0.9;
}
if($statName == 'bonusAtmos'){
return $value + 5;
}
return $value;
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_출세 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 6;
static $name = '출세';
static $info = '명성 +10%, 징·모병 비용 +20%';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost'){
return $value * 1.2;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'experience'){
return $value * 1.1;
}
return $value;
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_패권 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 3;
static $name = '패권';
static $info = '훈련 +5, 징·모병 비용 +20%';
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
if(in_array($turnType, ['징병', '모병'])){
if($varType == 'cost'){
return $value * 1.2;
}
}
return $value;
}
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'bonusTrain'){
return $value + 5;
}
return $value;
}
}
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace sammo\TriggerCharacter;
use \sammo\iActionTrigger;
use \sammo\General;
class che_할거 implements iActionTrigger{
use \sammo\DefaultActionTrigger;
static $id = 5;
static $name = '할거';
static $info = '명성 -10%, 훈련 +5';
public function onPreGeneralStatUpdate(General $general, string $statName, $value){
if($statName == 'experience'){
return $value * 0.9;
}
if($statName == 'bonusTrain'){
return $value + 5;
}
return $value;
}
}