이중특기 테스트
This commit is contained in:
@@ -78,6 +78,7 @@ function processGoldIncome() {
|
||||
// 실지급률
|
||||
$ratio = $realoutcome / $originoutcome;
|
||||
}
|
||||
$nation['gold'] = Util::valueFit($nation['gold'], GameConst::$basegold);
|
||||
$adminLog[] = StringUtil::padStringAlignRight((string)$nation['name'],12," ")
|
||||
." // 세금 : ".StringUtil::padStringAlignRight((string)$income,6," ")
|
||||
." // 세출 : ".StringUtil::padStringAlignRight((string)$originoutcome,6," ")
|
||||
@@ -355,6 +356,7 @@ function processRiceIncome() {
|
||||
// 실지급률
|
||||
$ratio = $realoutcome / $originoutcome;
|
||||
}
|
||||
$nation['rice'] = Util::valueFit($nation['rice'], GameConst::$baserice);
|
||||
$adminLog[] = StringUtil::padStringAlignRight($nation['name'],12," ")
|
||||
." // 세곡 : ".StringUtil::padStringAlignRight((string)$income,6," ")
|
||||
." // 세출 : ".StringUtil::padStringAlignRight((string)$originoutcome,6," ")
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ if ($genius) {
|
||||
'dex5'=>0
|
||||
]);
|
||||
} else {
|
||||
$specage2 = Util::valueFit(Util::round((GameConst::$retirementYear - $age)/4 - $relYear / 2), 3) + $age;
|
||||
$specage2 = Util::valueFit(Util::round((GameConst::$retirementYear - $age)/6 - $relYear / 2), 3) + $age;
|
||||
$special2 = GameConst::$defaultSpecialWar;
|
||||
}
|
||||
//내특
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_격노시도;
|
||||
use sammo\WarUnitTrigger\che_격노발동;
|
||||
|
||||
class event_전투특기_격노 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 74;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(격노)';
|
||||
protected $info = '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_격노시도($unit),
|
||||
new che_격노발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\WarUnitCity;
|
||||
|
||||
class event_전투특기_공성 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 53;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(공성)';
|
||||
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_SIEGE) return $value * 0.9;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
if($unit->getOppose() instanceof WarUnitCity){
|
||||
return [2, 1];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
|
||||
use \sammo\GameUnitConst;
|
||||
|
||||
class event_전투특기_궁병 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 51;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(궁병)';
|
||||
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_ARCHER) return $value * 0.9;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warAvoidRatio'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_귀병 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 40;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(귀병)';
|
||||
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_WIZARD) return $value * 0.9;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessProb'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_기병 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 52;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(기병)';
|
||||
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_CAVALRY) return $value * 0.9;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
if($unit->isAttacker()){
|
||||
return [1.2, 1];
|
||||
}
|
||||
return [1.1, 1];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
|
||||
class event_전투특기_돌격 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 60;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(돌격)';
|
||||
protected $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'initWarPhase'){
|
||||
return $value + 1;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
if($unit->isAttacker()){
|
||||
return [1.1, 1];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
(new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '회피불가'))->setPriority(BaseWarUnitTrigger::PRIORITY_BEGIN + 200)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_무쌍 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 61;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(무쌍)';
|
||||
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warCriticalRatio' && $aux['isAttacker']??false){
|
||||
return $value += 0.1;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
return [1.1, 1];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTrigger\WarActivateSkills;
|
||||
use \sammo\WarUnitTrigger\che_반계시도;
|
||||
use \sammo\WarUnitTrigger\che_반계발동;
|
||||
|
||||
class event_전투특기_반계 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 45;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(반계)';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessDamage' && $aux === '반목'){
|
||||
return $value + 0.4;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
|
||||
new che_반계시도($unit),
|
||||
new che_반계발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_보병 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 50;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(보병)';
|
||||
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
if($varType == 'cost' && $aux['armType'] == GameUnitConst::T_FOOTMAN) return $value * 0.9;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
if($unit->isAttacker()){
|
||||
return [1, 0.9];
|
||||
}
|
||||
return [1, 0.8];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_신산 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 41;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(신산)';
|
||||
protected $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p<br>[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if($turnType == '계략'){
|
||||
if($varType == 'success') return $value + 0.1;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
if($statName === 'warMagicSuccessProb'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_신중 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 44;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(신중)';
|
||||
protected $info = '[전투] 계략 성공 확률 100%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessProb'){
|
||||
return $value + 1;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnitTrigger\che_위압시도;
|
||||
use \sammo\WarUnitTrigger\che_위압발동;
|
||||
|
||||
class event_전투특기_위압 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 63;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(위압)';
|
||||
protected $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
if($unit->getPhase() != 0){
|
||||
return null;
|
||||
}
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_위압시도($unit),
|
||||
new che_위압발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use sammo\BaseGeneralTrigger;
|
||||
use sammo\SpecialityHelper;
|
||||
use \sammo\General;
|
||||
use \sammo\GeneralTrigger;
|
||||
use \sammo\GeneralTriggerCaller;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_전투치료발동;
|
||||
use sammo\WarUnitTrigger\che_전투치료시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class event_전투특기_의술 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 73;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(의술)';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||
return new GeneralTriggerCaller(
|
||||
new GeneralTrigger\che_도시치료($general)
|
||||
);
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(\sammo\WarUnit $unit): ?WarUnitTriggerCaller
|
||||
{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_전투치료시도($unit),
|
||||
new che_전투치료발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnitTrigger\che_저격시도;
|
||||
use \sammo\WarUnitTrigger\che_저격발동;
|
||||
|
||||
class event_전투특기_저격 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 70;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(저격)';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 1/3 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_NONE, 1/3, 20, 60),
|
||||
new che_저격발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_집중 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 43;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(집중)';
|
||||
protected $info = '[전투] 계략 성공 시 대미지 +50%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessDamage'){
|
||||
return $value * 1.5;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_징병 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 72;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(징병)';
|
||||
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value, $aux=null):float{
|
||||
if(in_array($turnType, ['징병', '모병'])){
|
||||
if($varType == 'cost') return $value * 0.5;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'leadership'){
|
||||
return $value *= 1.15;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_척사 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 75;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(척사)';
|
||||
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
return [1.1, 0.9];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_필살강화_회피불가;
|
||||
|
||||
class event_전투특기_필살 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 71;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(필살)';
|
||||
protected $info = '[전투] 필살 확률 +20%p, 필살 발동시 대상 회피 불가';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warCriticalRatio'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_필살강화_회피불가($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class event_전투특기_환술 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 42;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(환술)';
|
||||
protected $info = '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessProb'){
|
||||
return $value + 0.1;
|
||||
}
|
||||
if($statName === 'warMagicSuccessDamage'){
|
||||
return $value * 1.3;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -255,7 +255,7 @@ class che_인재탐색 extends Command\GeneralCommand
|
||||
$newNPC->setExpDed($avgGen['exp'], $avgGen['ded']);
|
||||
$newNPC->setSpecYear(
|
||||
Util::round((GameConst::$retirementYear - $age) / 12) + $age,
|
||||
Util::round((GameConst::$retirementYear - $age) / 3) + $age
|
||||
Util::round((GameConst::$retirementYear - $age) / 6) + $age
|
||||
);
|
||||
$newNPC->setDex(
|
||||
$dexVal[0],
|
||||
|
||||
@@ -12,7 +12,8 @@ class ChangeCity extends \sammo\Event\Action{
|
||||
'secu'=>true,
|
||||
'trust'=>true,
|
||||
'def'=>true,
|
||||
'wall'=>true
|
||||
'wall'=>true,
|
||||
'trade'=>true,
|
||||
];
|
||||
const REGEXP_PERCENT = '/^(\d+(\.\d+)?)%$/';// 123.5% [1]=float
|
||||
const REGEXP_MATH = '/^([\+\-\/\*])(\d+(\.\d+)?)$/'; //+30 [1]=기호, [2]=float
|
||||
@@ -53,6 +54,15 @@ class ChangeCity extends \sammo\Event\Action{
|
||||
$queries['trust'] = $this->genSQLTrust($value);
|
||||
continue;
|
||||
}
|
||||
if($key == 'trade'){
|
||||
if($value === null){
|
||||
$queries['trade'] = null;
|
||||
}
|
||||
else{
|
||||
$queries['trade'] = Util::valueFit((float)$value, 95, 105);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$queries[$key] = $this->genSQLGeneric($key, $value);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class CreateManyNPC extends \sammo\Event\Action{
|
||||
$newNPC->setExpDed(0, 0);
|
||||
$newNPC->setSpecYear(
|
||||
Util::round((GameConst::$retirementYear - $age) / 12) + $age,
|
||||
Util::round((GameConst::$retirementYear - $age) / 3) + $age
|
||||
Util::round((GameConst::$retirementYear - $age) / 6) + $age
|
||||
);
|
||||
|
||||
$newNPC->build($env);
|
||||
|
||||
@@ -123,7 +123,13 @@ class NPC{
|
||||
$this->charDomestic = SpecialityHelper::getDomesticClassByName($char);
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
$this->charWar = SpecialityHelper::getWarClassByName($char);
|
||||
try{
|
||||
$this->charWar = SpecialityHelper::getWarClassByName($char);
|
||||
}
|
||||
catch (\Exception $e){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"total":150,
|
||||
"min":10,
|
||||
"max":75,
|
||||
"npcTotal":155,
|
||||
"npcMax":75,
|
||||
"npcTotal":148,
|
||||
"npcMax":73,
|
||||
"npcMin":10,
|
||||
"chiefMin":65
|
||||
},
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"title":"【공백지】 천지비급",
|
||||
"startYear":180,
|
||||
"map":{
|
||||
"mapName":"miniche_b"
|
||||
},
|
||||
"history":[
|
||||
],
|
||||
"const": {
|
||||
"expandCityPopIncreaseAmount": 80000,
|
||||
"expandCityDevelIncreaseAmount": 1350,
|
||||
"expandCityWallIncreaseAmount": 1600,
|
||||
"defaultMaxGeneral":300,
|
||||
"joinRuinedNPCProp":0,
|
||||
"availableSpecialWar":[
|
||||
"che_귀병", "che_신산", "che_환술", "che_집중", "che_신중", "che_반계",
|
||||
"che_보병", "che_궁병", "che_기병", "che_공성",
|
||||
"che_돌격", "che_무쌍", "che_위압",
|
||||
"che_저격", "che_필살", "che_징병", "che_의술", "che_격노", "che_척사"
|
||||
],
|
||||
"allItems":{
|
||||
"horse":{
|
||||
"che_명마_01_노기":0, "che_명마_02_조랑":0, "che_명마_03_노새":0,
|
||||
"che_명마_04_나귀":0, "che_명마_05_갈색마":0, "che_명마_06_흑색마":0,
|
||||
|
||||
"che_명마_07_백마":2, "che_명마_07_기주마":2,
|
||||
"che_명마_08_양주마":2, "che_명마_09_과하마":2,
|
||||
"che_명마_10_대완마":2, "che_명마_11_서량마":2,
|
||||
"che_명마_12_사륜거":2, "che_명마_13_절영":1, "che_명마_13_적로":1,
|
||||
"che_명마_14_적란마":1, "che_명마_14_조황비전":1, "che_명마_15_한혈마":1, "che_명마_15_적토마":1
|
||||
},
|
||||
"weapon":{
|
||||
"che_무기_01_단도":0, "che_무기_02_단궁":0, "che_무기_03_단극":0,
|
||||
"che_무기_04_목검":0, "che_무기_05_죽창":0, "che_무기_06_소부":0,
|
||||
|
||||
"che_무기_07_동추":1, "che_무기_07_철편":1, "che_무기_07_철쇄":1, "che_무기_07_맥궁":1,
|
||||
"che_무기_08_유성추":1, "che_무기_08_철질여골":1, "che_무기_09_쌍철극":1, "che_무기_09_동호비궁":1,
|
||||
"che_무기_10_삼첨도":1, "che_무기_10_대부":1, "che_무기_11_고정도":1, "che_무기_11_이광궁":1,
|
||||
"che_무기_12_철척사모":1, "che_무기_12_칠성검":1, "che_무기_13_사모":1, "che_무기_13_양유기궁":1,
|
||||
"che_무기_14_언월도":1, "che_무기_14_방천화극":1, "che_무기_15_청홍검":1, "che_무기_15_의천검":1
|
||||
},
|
||||
"book":{
|
||||
"che_서적_01_효경전":0, "che_서적_02_회남자":0, "che_서적_03_변도론":0,
|
||||
"che_서적_04_건상역주":0, "che_서적_05_여씨춘추":0, "che_서적_06_사민월령":0,
|
||||
|
||||
"che_서적_07_위료자":1, "che_서적_07_사마법":1, "che_서적_07_한서":1, "che_서적_07_논어":1,
|
||||
"che_서적_08_전론":1, "che_서적_08_사기":1, "che_서적_09_장자":1, "che_서적_09_역경":1,
|
||||
"che_서적_10_시경":1, "che_서적_10_구국론":1, "che_서적_11_상군서":1, "che_서적_11_춘추전":1,
|
||||
"che_서적_12_산해경":1, "che_서적_12_맹덕신서":1, "che_서적_13_관자":1, "che_서적_13_병법24편":1,
|
||||
"che_서적_14_한비자":1, "che_서적_14_오자병법":1, "che_서적_15_노자":1, "che_서적_15_손자병법":1
|
||||
},
|
||||
"item":{
|
||||
"che_치료_환약":0, "che_저격_수극":0, "che_사기_탁주":0,
|
||||
"che_훈련_청주":0, "che_계략_이추":0, "che_계략_향낭":0,
|
||||
|
||||
"event_전투특기_격노":0, "event_전투특기_공성":0, "event_전투특기_궁병":0,
|
||||
"event_전투특기_귀병":0, "event_전투특기_기병":0, "event_전투특기_돌격":0, "event_전투특기_무쌍":0,
|
||||
"event_전투특기_반계":0, "event_전투특기_보병":0, "event_전투특기_신산":0, "event_전투특기_신중":0,
|
||||
"event_전투특기_위압":0, "event_전투특기_의술":0, "event_전투특기_저격":0, "event_전투특기_집중":0,
|
||||
"event_전투특기_징병":0, "event_전투특기_척사":0, "event_전투특기_필살":0, "event_전투특기_환술":0
|
||||
}
|
||||
}
|
||||
},
|
||||
"initialEvents":[
|
||||
[
|
||||
true,
|
||||
["CreateManyNPC", 250]
|
||||
]
|
||||
],
|
||||
"events":[
|
||||
[
|
||||
["Date", "==", null, 12],
|
||||
["CreateManyNPC", 10],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
["Date", "==", 182, 1],
|
||||
["ChangeCity", "occupied", {
|
||||
"trade":100
|
||||
}],
|
||||
["DeleteEvent"]
|
||||
],
|
||||
[
|
||||
["Date", "==", 182, 7],
|
||||
["ChangeCity", "occupied", {
|
||||
"trade":100
|
||||
}],
|
||||
["DeleteEvent"]
|
||||
]
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user