전특 대 개편
This commit is contained in:
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\GeneralTrigger;
|
||||
use \sammo\GeneralTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_전투치료발동;
|
||||
use sammo\WarUnitTrigger\che_전투치료시도;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_의술_청낭서 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 23;
|
||||
protected $rawName = '청낭서';
|
||||
protected $name = '청낭서(의술)';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
protected $cost = 200;
|
||||
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, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\GeneralTrigger;
|
||||
use \sammo\GeneralTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_전투치료발동;
|
||||
use sammo\WarUnitTrigger\che_전투치료시도;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_의술_청낭서 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 23;
|
||||
protected $rawName = '청낭서';
|
||||
protected $name = '청낭서(의술)';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
|
||||
protected $cost = 200;
|
||||
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, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,35 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\GeneralTrigger;
|
||||
use \sammo\GeneralTriggerCaller;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_전투치료발동;
|
||||
use sammo\WarUnitTrigger\che_전투치료시도;
|
||||
|
||||
class che_의술_태평청령 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 24;
|
||||
protected $rawName = '태평청령';
|
||||
protected $name = '태평청령(의술)';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
protected $cost = 200;
|
||||
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, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\GeneralTrigger;
|
||||
use \sammo\GeneralTriggerCaller;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_전투치료발동;
|
||||
use sammo\WarUnitTrigger\che_전투치료시도;
|
||||
|
||||
class che_의술_태평청령 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 24;
|
||||
protected $rawName = '태평청령';
|
||||
protected $name = '태평청령(의술)';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
|
||||
protected $cost = 200;
|
||||
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, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
new che_전투치료발동($unit, BaseWarUnitTrigger::TYPE_ITEM)
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,28 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\WarUnitTrigger\che_저격시도;
|
||||
use \sammo\WarUnitTrigger\che_저격발동;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
|
||||
class che_저격_수극 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 2;
|
||||
protected $rawName = '수극';
|
||||
protected $name = '수극(저격)';
|
||||
protected $info = '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용';
|
||||
protected $cost = 1000;
|
||||
protected $consumable = true;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 1000;
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 0.2, 20, 40),
|
||||
new che_저격발동($unit)
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\WarUnitTrigger\che_저격시도;
|
||||
use \sammo\WarUnitTrigger\che_저격발동;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
|
||||
class che_저격_수극 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 2;
|
||||
protected $rawName = '수극';
|
||||
protected $name = '수극(저격)';
|
||||
protected $info = '[전투] 전투 개시 전 50% 확률로 저격 시도. 1회용';
|
||||
protected $cost = 1000;
|
||||
protected $consumable = true;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 1000;
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 0.5, 20, 40),
|
||||
new che_저격발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class event_전투특기_격노 extends \sammo\BaseItem{
|
||||
protected $id = 74;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(격노)';
|
||||
protected $info = '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
@@ -12,7 +12,7 @@ class event_전투특기_공성 extends \sammo\BaseItem{
|
||||
protected $id = 53;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(공성)';
|
||||
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%';
|
||||
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 차병 숙련을 가산';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -32,4 +32,18 @@ class event_전투특기_공성 extends \sammo\BaseItem{
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_CASTLE;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ class event_전투특기_궁병 extends \sammo\BaseItem{
|
||||
protected $id = 51;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(궁병)';
|
||||
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p';
|
||||
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 궁병 숙련을 가산';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -29,6 +29,16 @@ class event_전투특기_궁병 extends \sammo\BaseItem{
|
||||
if($statName === 'warAvoidRatio'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_ARCHER;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ class event_전투특기_귀병 extends \sammo\BaseItem{
|
||||
protected $id = 40;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(귀병)';
|
||||
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p';
|
||||
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 귀병 숙련을 가산';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -29,6 +29,16 @@ class event_전투특기_귀병 extends \sammo\BaseItem{
|
||||
if($statName === 'warMagicSuccessProb'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_WIZARD;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ class event_전투특기_기병 extends \sammo\BaseItem{
|
||||
protected $id = 52;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(기병)';
|
||||
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%';
|
||||
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 기병 숙련을 가산';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -31,4 +31,18 @@ class event_전투특기_기병 extends \sammo\BaseItem{
|
||||
}
|
||||
return [1.1, 1];
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_CAVALRY;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,14 @@ use \sammo\WarUnit;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
use \sammo\WarUnitTrigger\che_돌격지속;
|
||||
|
||||
class event_전투특기_돌격 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 60;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(돌격)';
|
||||
protected $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%';
|
||||
protected $info = '[전투] 공격 시 대등/유리한 병종에게는 퇴각 전까지 전투, 공격 시 페이즈 + 2, 공격 시 대미지 +5%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -21,21 +22,20 @@ class event_전투특기_돌격 extends \sammo\BaseItem{
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'initWarPhase'){
|
||||
return $value + 1;
|
||||
return $value + 2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
if($unit->isAttacker()){
|
||||
return [1.1, 1];
|
||||
return [1.05, 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)
|
||||
new che_돌격지속($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -4,13 +4,14 @@ use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\Util;
|
||||
|
||||
class event_전투특기_무쌍 extends \sammo\BaseItem{
|
||||
|
||||
protected $id = 61;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(무쌍)';
|
||||
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p';
|
||||
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p, <br>승리 수만큼 대미지 0.20%씩 추가 상승(최대40%)<br>승리 수만큼 피해 0.05%씩 감소(최대50%)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -24,6 +25,11 @@ class event_전투특기_무쌍 extends \sammo\BaseItem{
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
return [1.1, 1];
|
||||
$attackMultiplier = 1.1;
|
||||
$defenceMultiplier = 1;
|
||||
$killnum = $unit->getGeneral()->getRankVar('killnum');
|
||||
$attackMultiplier += Util::valueFit($killnum * 0.01 * 0.2, null, 0.4);
|
||||
$defenceMultiplier -= Util::valueFit($killnum * 0.01 * 0.05, null, 0.5);
|
||||
return [$attackMultiplier, $defenceMultiplier];
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ class event_전투특기_반계 extends \sammo\BaseItem{
|
||||
protected $id = 45;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(반계)';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +150%)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -23,15 +23,15 @@ class event_전투특기_반계 extends \sammo\BaseItem{
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessDamage' && $aux === '반목'){
|
||||
return $value + 0.4;
|
||||
return $value + 0.9;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM, false, '계략약화'),
|
||||
new che_반계시도($unit, che_반계시도::TYPE_ITEM),
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
|
||||
new che_반계시도($unit),
|
||||
new che_반계발동($unit)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class event_전투특기_보병 extends \sammo\BaseItem{
|
||||
protected $id = 50;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(보병)';
|
||||
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%';
|
||||
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 보병 숙련을 가산';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -32,4 +32,18 @@ class event_전투특기_보병 extends \sammo\BaseItem{
|
||||
}
|
||||
return [1, 0.8];
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_FOOTMAN;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ class event_전투특기_위압 extends \sammo\BaseItem{
|
||||
protected $id = 63;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(위압)';
|
||||
protected $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)';
|
||||
protected $info = '[전투] 첫 페이즈 위압 발동(적 공격, 회피 불가, 사기 5 감소)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
@@ -16,7 +16,7 @@ class event_전투특기_의술 extends \sammo\BaseItem{
|
||||
protected $id = 73;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(의술)';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
@@ -13,7 +13,7 @@ class event_전투특기_저격 extends \sammo\BaseItem{
|
||||
protected $id = 70;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(저격)';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 1/3 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -21,7 +21,7 @@ class event_전투특기_저격 extends \sammo\BaseItem{
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM, 1/3, 20, 60),
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM, 0.5, 10, 40),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ class event_전투특기_필살 extends \sammo\BaseItem{
|
||||
protected $id = 71;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(필살)';
|
||||
protected $info = '[전투] 필살 확률 +20%p, 필살 발동시 대상 회피 불가';
|
||||
protected $info = '[전투] 필살 확률 +25%p, 필살 발동시 대상 회피 불가';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -20,7 +20,7 @@ class event_전투특기_필살 extends \sammo\BaseItem{
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warCriticalRatio'){
|
||||
return $value + 0.2;
|
||||
return $value + 0.25;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_격노시도;
|
||||
use sammo\WarUnitTrigger\che_격노발동;
|
||||
|
||||
class che_격노 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 74;
|
||||
protected $name = '격노';
|
||||
protected $info = '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
];
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_격노시도($unit),
|
||||
new che_격노발동($unit)
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_격노시도;
|
||||
use sammo\WarUnitTrigger\che_격노발동;
|
||||
|
||||
class che_격노 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 74;
|
||||
protected $name = '격노';
|
||||
protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
];
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_격노시도($unit),
|
||||
new che_격노발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,40 +1,40 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitTrigger\che_부상무효;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
|
||||
class che_견고 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 62;
|
||||
protected $name = '견고';
|
||||
protected $info = '[전투] 상대 필살, 격노, 위압, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -5%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE),
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
||||
);
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '위압불가', '격노불가', '계략약화', '저격불가')
|
||||
);
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
return [1, 0.95];
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitTrigger\che_부상무효;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
|
||||
class che_견고 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 62;
|
||||
protected $name = '견고';
|
||||
protected $info = '[전투] 상대 필살, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE),
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '저격불가')
|
||||
);
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '계략약화', '저격불가')
|
||||
);
|
||||
}
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
return [1, 0.9];
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,50 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\WarUnitCity;
|
||||
|
||||
class che_공성 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 53;
|
||||
protected $name = '공성';
|
||||
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_SIEGE,
|
||||
];
|
||||
|
||||
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];
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\WarUnitCity;
|
||||
|
||||
class che_공성 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 53;
|
||||
protected $name = '공성';
|
||||
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 차병 숙련을 가산';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_SIEGE,
|
||||
];
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_CASTLE;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ class che_궁병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 51;
|
||||
protected $name = '궁병';
|
||||
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p';
|
||||
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 궁병 숙련을 가산';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
@@ -31,6 +31,16 @@ class che_궁병 extends \sammo\BaseSpecial{
|
||||
if($statName === 'warAvoidRatio'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_ARCHER;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,35 +1,45 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_귀병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 40;
|
||||
protected $name = '귀병';
|
||||
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_INTEL | SpecialityHelper::ARMY_WIZARD | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::STAT_NOT_STRENGTH
|
||||
];
|
||||
|
||||
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;
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_귀병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 40;
|
||||
protected $name = '귀병';
|
||||
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 귀병 숙련을 가산';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_INTEL | SpecialityHelper::ARMY_WIZARD | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::STAT_NOT_STRENGTH
|
||||
];
|
||||
|
||||
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;
|
||||
}
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_WIZARD;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,50 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_기병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 52;
|
||||
protected $name = '기병';
|
||||
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_CAVALRY | SpecialityHelper::STAT_NOT_INTEL,
|
||||
SpecialityHelper::STAT_STRENGTH | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_CAVALRY
|
||||
];
|
||||
|
||||
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];
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_기병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 52;
|
||||
protected $name = '기병';
|
||||
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 기병 숙련을 가산';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_CAVALRY | SpecialityHelper::STAT_NOT_INTEL,
|
||||
SpecialityHelper::STAT_STRENGTH | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_CAVALRY
|
||||
];
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_CAVALRY;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +1,42 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
|
||||
class che_돌격 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 60;
|
||||
protected $name = '돌격';
|
||||
protected $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
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)
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\BaseWarUnitTrigger;
|
||||
use \sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
use \sammo\WarUnitTrigger\che_돌격지속;
|
||||
|
||||
class che_돌격 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 60;
|
||||
protected $name = '돌격';
|
||||
protected $info = '[전투] 공격 시 대등/유리한 병종에게는 퇴각 전까지 전투, 공격 시 페이즈 + 2, 공격 시 대미지 +5%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'initWarPhase'){
|
||||
return $value + 2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
if($unit->isAttacker()){
|
||||
return [1.05, 1];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_돌격지속($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,36 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_무쌍 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 61;
|
||||
protected $name = '무쌍';
|
||||
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
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];
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\Util;
|
||||
|
||||
class che_무쌍 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 61;
|
||||
protected $name = '무쌍';
|
||||
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p, <br>승리 수만큼 대미지 0.20%씩 추가 상승(최대40%)<br>승리 수만큼 피해 0.05%씩 감소(최대50%)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
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{
|
||||
$attackMultiplier = 1.1;
|
||||
$defenceMultiplier = 1;
|
||||
$killnum = $unit->getGeneral()->getRankVar('killnum');
|
||||
$attackMultiplier += Util::valueFit($killnum * 0.01 * 0.2, null, 0.4);
|
||||
$defenceMultiplier -= Util::valueFit($killnum * 0.01 * 0.05, null, 0.5);
|
||||
return [$attackMultiplier, $defenceMultiplier];
|
||||
}
|
||||
}
|
||||
@@ -1,39 +1,39 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
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 che_반계 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 45;
|
||||
protected $name = '반계';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_INTEL,
|
||||
];
|
||||
|
||||
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)
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
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 che_반계 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 45;
|
||||
protected $name = '반계';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +150%)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_INTEL,
|
||||
];
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessDamage' && $aux === '반목'){
|
||||
return $value + 0.9;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
|
||||
new che_반계시도($unit),
|
||||
new che_반계발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,50 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_보병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 50;
|
||||
protected $name = '보병';
|
||||
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_FOOTMAN | SpecialityHelper::STAT_NOT_INTEL,
|
||||
SpecialityHelper::STAT_STRENGTH | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_FOOTMAN
|
||||
];
|
||||
|
||||
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];
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_보병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 50;
|
||||
protected $name = '보병';
|
||||
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 보병 숙련을 가산';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_FOOTMAN | SpecialityHelper::STAT_NOT_INTEL,
|
||||
SpecialityHelper::STAT_STRENGTH | SpecialityHelper::REQ_DEXTERITY | SpecialityHelper::ARMY_FOOTMAN
|
||||
];
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if(\sammo\Util::starts_with($statName, 'dex')){
|
||||
$myArmType = 'dex'.GameUnitConst::T_FOOTMAN;
|
||||
$opposeArmType = 'dex'.$aux['opposeType']->armType;;
|
||||
if($aux['isAttacker'] && $opposeArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
if(!$aux['isAttacker'] && $myArmType === $statName){
|
||||
return $value + $general->getVar($myArmType);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,29 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnitTrigger\che_위압시도;
|
||||
use \sammo\WarUnitTrigger\che_위압발동;
|
||||
|
||||
class che_위압 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 63;
|
||||
protected $name = '위압';
|
||||
protected $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
if($unit->getPhase() != 0){
|
||||
return null;
|
||||
}
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_위압시도($unit),
|
||||
new che_위압발동($unit)
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnitTrigger\che_위압시도;
|
||||
use \sammo\WarUnitTrigger\che_위압발동;
|
||||
|
||||
class che_위압 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 63;
|
||||
protected $name = '위압';
|
||||
protected $info = '[전투] 첫 페이즈 위압 발동(적 공격, 회피 불가, 사기 5 감소)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_STRENGTH
|
||||
];
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_위압시도($unit),
|
||||
new che_위압발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,41 +1,41 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
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 che_의술 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 73;
|
||||
protected $name = '의술';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_PERCENT;
|
||||
static $selectWeight = 2;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
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 che_의술 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 73;
|
||||
protected $name = '의술';
|
||||
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_PERCENT;
|
||||
static $selectWeight = 2;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnitTrigger\che_저격시도;
|
||||
use \sammo\WarUnitTrigger\che_저격발동;
|
||||
|
||||
class che_저격 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 70;
|
||||
protected $name = '저격';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 1/3 확률로 저격 발동, 성공 시 사기+10';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_NONE, 1/3, 20, 60),
|
||||
new che_저격발동($unit)
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use \sammo\WarUnitTrigger\che_저격시도;
|
||||
use \sammo\WarUnitTrigger\che_저격발동;
|
||||
|
||||
class che_저격 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 70;
|
||||
protected $name = '저격';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_NONE, 0.5, 10, 40),
|
||||
new che_저격발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,36 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_징병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 72;
|
||||
protected $name = '징병';
|
||||
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
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;
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_징병 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 72;
|
||||
protected $name = '징병';
|
||||
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
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 + $general->getVar('leadership') * 0.25;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,29 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_척사 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 75;
|
||||
protected $name = '척사';
|
||||
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
return [1.1, 0.9];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_척사 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 75;
|
||||
protected $name = '척사';
|
||||
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +15%, 아군 피해 -15%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
return [1.15, 0.85];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,36 @@
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_필살강화_회피불가;
|
||||
|
||||
class che_필살 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 71;
|
||||
protected $name = '필살';
|
||||
protected $info = '[전투] 필살 확률 +20%p, 필살 발동시 대상 회피 불가';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
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)
|
||||
);
|
||||
}
|
||||
<?php
|
||||
namespace sammo\ActionSpecialWar;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
use sammo\WarUnitTrigger\che_필살강화_회피불가;
|
||||
|
||||
class che_필살 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 71;
|
||||
protected $name = '필살';
|
||||
protected $info = '[전투] 필살 확률 +25%p, 필살 발동시 대상 회피 불가';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityHelper::STAT_LEADERSHIP,
|
||||
SpecialityHelper::STAT_STRENGTH,
|
||||
SpecialityHelper::STAT_INTEL
|
||||
];
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warCriticalRatio'){
|
||||
return $value + 0.25;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_필살강화_회피불가($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -247,9 +247,9 @@ class WarUnit{
|
||||
$warPower *= $this->getComputedAtmos();
|
||||
$warPower /= $oppose->getComputedTrain();
|
||||
|
||||
$genDexAtt = $this->getDex($this->getCrewType());
|
||||
$genDexAtt = $this->getDex($this->getCrewType(), true);
|
||||
|
||||
$oppDexDef = $oppose->getDex($this->getCrewType());
|
||||
$oppDexDef = $oppose->getDex($this->getCrewType(), false);
|
||||
|
||||
$warPower *= getDexLog($genDexAtt, $oppDexDef);
|
||||
|
||||
|
||||
+164
-164
@@ -1,165 +1,165 @@
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class WarUnitCity extends WarUnit{
|
||||
use LazyVarUpdater;
|
||||
|
||||
protected $hp;
|
||||
|
||||
protected $cityRate;
|
||||
|
||||
function __construct($raw, $rawNation, int $year, int $month, $cityRate){
|
||||
$general = new DummyGeneral(false);
|
||||
$general->setVar('city', $raw['city']);
|
||||
$general->setVar('nation', $raw['nation']);
|
||||
$general->initLogger($year, $month);
|
||||
$this->general = $general;
|
||||
$this->raw = $raw;
|
||||
$this->rawNation = $rawNation;
|
||||
|
||||
$this->isAttacker = false;
|
||||
$this->cityRate = $cityRate;
|
||||
|
||||
$this->logger = $general->getLogger();
|
||||
$this->crewType = GameUnitConst::byID(GameUnitConst::CREWTYPE_CASTLE);
|
||||
|
||||
$this->hp = $this->getCityVar('def') * 10;
|
||||
|
||||
//수비자 보정
|
||||
if($this->getCityVar('level') == 1){
|
||||
$this->trainBonus += 5;
|
||||
}
|
||||
else if($this->getCityVar('level') == 3){
|
||||
$this->trainBonus += 5;
|
||||
}
|
||||
}
|
||||
|
||||
function getName():string{
|
||||
return $this->getVar('name');
|
||||
}
|
||||
|
||||
function getCityVar(string $key){
|
||||
return $this->raw[$key];
|
||||
}
|
||||
|
||||
function getComputedAttack(){
|
||||
return ($this->raw['def'] + $this->raw['wall'] * 9) / 500 + 200;
|
||||
}
|
||||
|
||||
function getComputedDefence(){
|
||||
return ($this->raw['def'] + $this->raw['wall'] * 9) / 500 + 200;
|
||||
}
|
||||
|
||||
function increaseKilled(int $damage):int{
|
||||
$this->killed += $damage;
|
||||
$this->killedCurr += $damage;
|
||||
return $this->killed;
|
||||
}
|
||||
|
||||
function getComputedTrain(){
|
||||
return $this->cityRate + $this->trainBonus;
|
||||
}
|
||||
|
||||
function getComputedAtmos(){
|
||||
return $this->cityRate + $this->atmosBonus;
|
||||
}
|
||||
|
||||
function getHP():int{
|
||||
return $this->hp;
|
||||
}
|
||||
|
||||
function getDex(GameUnitDetail $crewType){
|
||||
return ($this->cityRate - 60) * 7200;
|
||||
}
|
||||
|
||||
function decreaseHP(int $damage):int{
|
||||
$damage = min($damage, $this->hp);
|
||||
$this->dead += $damage;
|
||||
$this->deadCurr += $damage;
|
||||
$this->hp -= $damage;
|
||||
$this->increaseVarWithLimit('wall', -$damage/20, 0);
|
||||
|
||||
return $this->hp;
|
||||
}
|
||||
|
||||
function continueWar(&$noRice):bool{
|
||||
//전투가 가능하면 true
|
||||
$noRice = false;
|
||||
if($this->getHP() <= 0){
|
||||
return false;
|
||||
}
|
||||
|
||||
//도시 성벽은 쌀이 소모된다고 항복하지 않음
|
||||
return true;
|
||||
}
|
||||
|
||||
function heavyDecreaseWealth(){
|
||||
$this->multiplyVar('agri', 0.5);
|
||||
$this->multiplyVar('comm', 0.5);
|
||||
$this->multiplyVar('secu', 0.5);
|
||||
}
|
||||
|
||||
function finishBattle(){
|
||||
if($this->isFinished){
|
||||
return;
|
||||
}
|
||||
$this->clearActivatedSkill();
|
||||
$this->isFinished = true;
|
||||
|
||||
$this->updateVar('def', Util::round($this->getHP() / 10));
|
||||
$this->updateVar('wall', Util::round($this->getVar('wall')));
|
||||
|
||||
//NOTE: 전투로 인한 사망자는 여기서 처리하지 않음
|
||||
|
||||
$decWealth = $this->getKilled() / 20;
|
||||
$this->increaseVarWithLimit('agri', -$decWealth, 0);
|
||||
$this->increaseVarWithLimit('comm', -$decWealth, 0);
|
||||
$this->increaseVarWithLimit('secu', -$decWealth, 0);
|
||||
}
|
||||
|
||||
function addConflict():bool{
|
||||
$conflict = Json::decode($this->getVar('conflict'));
|
||||
$oppose = $this->getOppose();
|
||||
|
||||
$nationID = $oppose->getNationVar('nation');
|
||||
$newConflict = false;
|
||||
|
||||
$dead = max(1, $this->dead);
|
||||
|
||||
if(!$conflict || $this->getHP() == 0){ // 선타, 막타 보너스
|
||||
$dead *= 1.05;
|
||||
}
|
||||
|
||||
if(!$conflict){
|
||||
$conflict = [$nationID => $dead];
|
||||
}
|
||||
else if(key_exists($nationID, $conflict)){
|
||||
$conflict[$nationID] += $dead;
|
||||
arsort($conflict);
|
||||
}
|
||||
else{
|
||||
$conflict[$nationID] = $dead;
|
||||
arsort($conflict);
|
||||
$newConflict = true;
|
||||
}
|
||||
|
||||
$this->updateVar('conflict', Json::encode($conflict));
|
||||
|
||||
return $newConflict;
|
||||
}
|
||||
|
||||
|
||||
function applyDB(\MeekroDB $db):bool{
|
||||
$updateVals = $this->getUpdatedValues();
|
||||
$this->getLogger()->rollback(); //수비 도시의 로그는 기록하지 않음
|
||||
|
||||
if(!$updateVals){
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->update('city', $updateVals, 'city=%i', $this->raw['city']);
|
||||
$this->flushUpdateValues();
|
||||
return $db->affectedRows() > 0;
|
||||
}
|
||||
|
||||
<?php
|
||||
namespace sammo;
|
||||
|
||||
class WarUnitCity extends WarUnit{
|
||||
use LazyVarUpdater;
|
||||
|
||||
protected $hp;
|
||||
|
||||
protected $cityRate;
|
||||
|
||||
function __construct($raw, $rawNation, int $year, int $month, $cityRate){
|
||||
$general = new DummyGeneral(false);
|
||||
$general->setVar('city', $raw['city']);
|
||||
$general->setVar('nation', $raw['nation']);
|
||||
$general->initLogger($year, $month);
|
||||
$this->general = $general;
|
||||
$this->raw = $raw;
|
||||
$this->rawNation = $rawNation;
|
||||
|
||||
$this->isAttacker = false;
|
||||
$this->cityRate = $cityRate;
|
||||
|
||||
$this->logger = $general->getLogger();
|
||||
$this->crewType = GameUnitConst::byID(GameUnitConst::CREWTYPE_CASTLE);
|
||||
|
||||
$this->hp = $this->getCityVar('def') * 10;
|
||||
|
||||
//수비자 보정
|
||||
if($this->getCityVar('level') == 1){
|
||||
$this->trainBonus += 5;
|
||||
}
|
||||
else if($this->getCityVar('level') == 3){
|
||||
$this->trainBonus += 5;
|
||||
}
|
||||
}
|
||||
|
||||
function getName():string{
|
||||
return $this->getVar('name');
|
||||
}
|
||||
|
||||
function getCityVar(string $key){
|
||||
return $this->raw[$key];
|
||||
}
|
||||
|
||||
function getComputedAttack(){
|
||||
return ($this->raw['def'] + $this->raw['wall'] * 9) / 500 + 200;
|
||||
}
|
||||
|
||||
function getComputedDefence(){
|
||||
return ($this->raw['def'] + $this->raw['wall'] * 9) / 500 + 200;
|
||||
}
|
||||
|
||||
function increaseKilled(int $damage):int{
|
||||
$this->killed += $damage;
|
||||
$this->killedCurr += $damage;
|
||||
return $this->killed;
|
||||
}
|
||||
|
||||
function getComputedTrain(){
|
||||
return $this->cityRate + $this->trainBonus;
|
||||
}
|
||||
|
||||
function getComputedAtmos(){
|
||||
return $this->cityRate + $this->atmosBonus;
|
||||
}
|
||||
|
||||
function getHP():int{
|
||||
return $this->hp;
|
||||
}
|
||||
|
||||
function getDex(GameUnitDetail $crewType){
|
||||
return ($this->cityRate - 60) * 7200;
|
||||
}
|
||||
|
||||
function decreaseHP(int $damage):int{
|
||||
$damage = min($damage, $this->hp);
|
||||
$this->dead += $damage;
|
||||
$this->deadCurr += $damage;
|
||||
$this->hp -= $damage;
|
||||
$this->increaseVarWithLimit('wall', -$damage/20, 0);
|
||||
|
||||
return $this->hp;
|
||||
}
|
||||
|
||||
function continueWar(&$noRice):bool{
|
||||
//전투가 가능하면 true
|
||||
$noRice = false;
|
||||
if($this->getHP() <= 0){
|
||||
return false;
|
||||
}
|
||||
|
||||
//도시 성벽은 쌀이 소모된다고 항복하지 않음
|
||||
return true;
|
||||
}
|
||||
|
||||
function heavyDecreaseWealth(){
|
||||
$this->multiplyVar('agri', 0.5);
|
||||
$this->multiplyVar('comm', 0.5);
|
||||
$this->multiplyVar('secu', 0.5);
|
||||
}
|
||||
|
||||
function finishBattle(){
|
||||
if($this->isFinished){
|
||||
return;
|
||||
}
|
||||
$this->clearActivatedSkill();
|
||||
$this->isFinished = true;
|
||||
|
||||
$this->updateVar('def', Util::round($this->getHP() / 10));
|
||||
$this->updateVar('wall', Util::round($this->getVar('wall')));
|
||||
|
||||
//NOTE: 전투로 인한 사망자는 여기서 처리하지 않음
|
||||
|
||||
$decWealth = $this->getKilled() / 20;
|
||||
$this->increaseVarWithLimit('agri', -$decWealth, 0);
|
||||
$this->increaseVarWithLimit('comm', -$decWealth, 0);
|
||||
$this->increaseVarWithLimit('secu', -$decWealth, 0);
|
||||
}
|
||||
|
||||
function addConflict():bool{
|
||||
$conflict = Json::decode($this->getVar('conflict'));
|
||||
$oppose = $this->getOppose();
|
||||
|
||||
$nationID = $oppose->getNationVar('nation');
|
||||
$newConflict = false;
|
||||
|
||||
$dead = max(1, $this->dead);
|
||||
|
||||
if(!$conflict || $this->getHP() == 0){ // 선타, 막타 보너스
|
||||
$dead *= 1.05;
|
||||
}
|
||||
|
||||
if(!$conflict){
|
||||
$conflict = [$nationID => $dead];
|
||||
}
|
||||
else if(key_exists($nationID, $conflict)){
|
||||
$conflict[$nationID] += $dead;
|
||||
arsort($conflict);
|
||||
}
|
||||
else{
|
||||
$conflict[$nationID] = $dead;
|
||||
arsort($conflict);
|
||||
$newConflict = true;
|
||||
}
|
||||
|
||||
$this->updateVar('conflict', Json::encode($conflict));
|
||||
|
||||
return $newConflict;
|
||||
}
|
||||
|
||||
|
||||
function applyDB(\MeekroDB $db):bool{
|
||||
$updateVals = $this->getUpdatedValues();
|
||||
$this->getLogger()->rollback(); //수비 도시의 로그는 기록하지 않음
|
||||
|
||||
if(!$updateVals){
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->update('city', $updateVals, 'city=%i', $this->raw['city']);
|
||||
$this->flushUpdateValues();
|
||||
return $db->affectedRows() > 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class WarUnitGeneral extends WarUnit{
|
||||
|
||||
function getMaxPhase():int{
|
||||
$phase = $this->getCrewType()->speed;
|
||||
$phase = $this->general->onCalcStat($this->general, 'initWarPhase', $phase);
|
||||
$phase = $this->general->onCalcStat($this->general, 'initWarPhase', $phase, ['isAttacker'=>$this->isAttacker]);
|
||||
return $phase + $this->bonusPhase;
|
||||
}
|
||||
|
||||
@@ -75,12 +75,16 @@ class WarUnitGeneral extends WarUnit{
|
||||
}
|
||||
|
||||
function getDex(GameUnitDetail $crewType){
|
||||
return $this->general->getDex($crewType);
|
||||
$rawDex = $this->general->getDex($crewType);
|
||||
return $this->general->onCalcStat($this->general, 'dex'.$crewType->armType, $rawDex, [
|
||||
'isAttacker'=>$this->isAttacker,
|
||||
'opposeType'=>$this->oppose->getCrewType()
|
||||
]);
|
||||
}
|
||||
|
||||
function getComputedTrain(){
|
||||
$train = $this->general->getVar('train');
|
||||
$train = $this->general->onCalcStat($this->general, 'bonusTrain', $train);
|
||||
$train = $this->general->onCalcStat($this->general, 'bonusTrain', $train, ['isAttacker'=>$this->isAttacker]);
|
||||
$train += $this->trainBonus;
|
||||
|
||||
return $train;
|
||||
@@ -88,7 +92,7 @@ class WarUnitGeneral extends WarUnit{
|
||||
|
||||
function getComputedAtmos(){
|
||||
$atmos = $this->general->getVar('atmos');
|
||||
$atmos = $this->general->onCalcStat($this->general, 'bonusAtmos', $atmos);
|
||||
$atmos = $this->general->onCalcStat($this->general, 'bonusAtmos', $atmos, ['isAttacker'=>$this->isAttacker]);
|
||||
$atmos += $this->atmosBonus;
|
||||
|
||||
return $atmos;
|
||||
|
||||
@@ -1,41 +1,38 @@
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
use sammo\Util;
|
||||
|
||||
class che_격노시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$oppose->hasActivatedSkill('필살') && !$oppose->hasActivatedSkill('회피')){
|
||||
return true;
|
||||
}
|
||||
if($self->hasActivatedSkill('격노불가')){
|
||||
return true;
|
||||
}
|
||||
|
||||
if($self->isAttacker()){
|
||||
if(Util::randBool(1/3)){
|
||||
$self->activateSkill('진노', '격노');
|
||||
$oppose->deactivateSkill('회피');
|
||||
}
|
||||
else if(Util::randBool(1/4)){
|
||||
$self->activateSkill('격노');
|
||||
$oppose->deactivateSkill('회피');
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(Util::randBool(1/2)){
|
||||
$self->activateSkill('격노');
|
||||
$oppose->deactivateSkill('회피');
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
use sammo\Util;
|
||||
|
||||
class che_격노시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$oppose->hasActivatedSkill('필살') && !$oppose->hasActivatedSkill('회피')){
|
||||
return true;
|
||||
}
|
||||
if($self->hasActivatedSkill('격노불가')){
|
||||
return true;
|
||||
}
|
||||
|
||||
if($oppose->hasActivatedSkill('필살')){
|
||||
$self->activateSkill('격노');
|
||||
$oppose->deactivateSkill('회피');
|
||||
if($self->isAttacker() && Util::randBool(1/3)){
|
||||
$self->activateSkill('진노');
|
||||
}
|
||||
}
|
||||
else if(Util::randBool(1/4)){
|
||||
$self->activateSkill('격노');
|
||||
$oppose->deactivateSkill('회피');
|
||||
if($self->isAttacker() && Util::randBool(1/3)){
|
||||
$self->activateSkill('진노');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
use sammo\ActionLogger;
|
||||
|
||||
class che_돌격지속 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 900;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
/** @var WarUnitGeneral $self */
|
||||
if($oppose instanceof WarUnitCity){
|
||||
return true;
|
||||
}
|
||||
if(!$self->isAttacker()){
|
||||
return true;
|
||||
}
|
||||
if($self->getPhase() < $self->getMaxPhase() - 1){
|
||||
return true;
|
||||
}
|
||||
$attackCoef = $self->getCrewType()->getAttackCoef($oppose->getCrewType());
|
||||
if($attackCoef < 1){
|
||||
return true;
|
||||
}
|
||||
$self->addBonusPhase(1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,27 @@
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
use sammo\ActionLogger;
|
||||
|
||||
class che_위압발동 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 700;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('위압')){
|
||||
return true;
|
||||
}
|
||||
|
||||
$oppose->getLogger()->pushGeneralBattleDetailLog('상대에게 <R>위압</>받았다!</>', ActionLogger::PLAIN);
|
||||
$self->getLogger()->pushGeneralBattleDetailLog('상대에게 <C>위압</>을 줬다!</>', ActionLogger::PLAIN);
|
||||
$oppose->setWarPowerMultiply(0);
|
||||
|
||||
return true;
|
||||
}
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
use sammo\ActionLogger;
|
||||
|
||||
class che_위압발동 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 700;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('위압')){
|
||||
return true;
|
||||
}
|
||||
|
||||
$oppose->getLogger()->pushGeneralBattleDetailLog('상대에게 <R>위압</>받았다!</>', ActionLogger::PLAIN);
|
||||
$self->getLogger()->pushGeneralBattleDetailLog('상대에게 <C>위압</>을 줬다!</>', ActionLogger::PLAIN);
|
||||
$oppose->setWarPowerMultiply(0);
|
||||
$oppose->increaseVarWithLimit('atmos', -5, 40);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +1,30 @@
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_위압시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_BEGIN + 100;
|
||||
|
||||
protected $woundMin;
|
||||
protected $woundMax;
|
||||
protected $ratio;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
if($self->getPhase() != 0){
|
||||
return true;
|
||||
}
|
||||
if($self->getHP() < 1000){
|
||||
return true;
|
||||
}
|
||||
if($self->getComputedAtmos() < 90){
|
||||
return true;
|
||||
}
|
||||
if($self->getComputedTrain() < 90){
|
||||
return true;
|
||||
}
|
||||
if($self->hasActivatedSkill('위압불가')){
|
||||
return true;
|
||||
}
|
||||
|
||||
$self->activateSkill('위압');
|
||||
return true;
|
||||
}
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_위압시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_BEGIN + 100;
|
||||
|
||||
protected $woundMin;
|
||||
protected $woundMax;
|
||||
protected $ratio;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
if($self->getPhase() !== 0 && $oppose->getPhase() !== 0){
|
||||
return true;
|
||||
}
|
||||
if($self->hasActivatedSkill('위압불가')){
|
||||
return true;
|
||||
}
|
||||
|
||||
$self->activateSkill('위압');
|
||||
$oppose->activateSkill('회피불가', '필살불가', '계략불가');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +1,35 @@
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
use sammo\ActionLogger;
|
||||
|
||||
class che_전투치료발동 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('치료')){
|
||||
return true;
|
||||
}
|
||||
|
||||
if($selfEnv['치료발동']??false){
|
||||
return true;
|
||||
}
|
||||
$selfEnv['치료발동'] = true;
|
||||
|
||||
$oppose->getLogger()->pushGeneralBattleDetailLog("상대가 <C>치료</>했다!", ActionLogger::PLAIN);
|
||||
$self->getLogger()->pushGeneralBattleDetailLog("<C>치료</>했다!", ActionLogger::PLAIN);
|
||||
|
||||
$oppose->multiplyWarPowerMultiply(1/1.5);
|
||||
|
||||
$this->processConsumableItem();
|
||||
|
||||
return true;
|
||||
}
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
use sammo\ActionLogger;
|
||||
|
||||
class che_전투치료발동 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('치료')){
|
||||
return true;
|
||||
}
|
||||
|
||||
if($selfEnv['치료발동']??false){
|
||||
return true;
|
||||
}
|
||||
$selfEnv['치료발동'] = true;
|
||||
|
||||
$oppose->getLogger()->pushGeneralBattleDetailLog("상대가 <C>치료</>했다!", ActionLogger::PLAIN);
|
||||
$self->getLogger()->pushGeneralBattleDetailLog("<C>치료</>했다!", ActionLogger::PLAIN);
|
||||
|
||||
$oppose->multiplyWarPowerMultiply(0.5);
|
||||
$self->getGeneral()->setVar('injury', 0);
|
||||
|
||||
$this->processConsumableItem();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_전투치료시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
if($self->hasActivatedSkill('치료')){
|
||||
return true;
|
||||
}
|
||||
if($self->hasActivatedSkill('치료불가')){
|
||||
return true;
|
||||
}
|
||||
if(!Util::randBool(1/5)){
|
||||
return true;
|
||||
}
|
||||
|
||||
$self->activateSkill('치료');
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
<?php
|
||||
namespace sammo\WarUnitTrigger;
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
use sammo\WarUnit;
|
||||
use sammo\GameUnitDetail;
|
||||
use sammo\Util;
|
||||
use sammo\ObjectTrigger;
|
||||
|
||||
class che_전투치료시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_PRE + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
if($self->hasActivatedSkill('치료')){
|
||||
return true;
|
||||
}
|
||||
if($self->hasActivatedSkill('치료불가')){
|
||||
return true;
|
||||
}
|
||||
if(!Util::randBool(0.4)){
|
||||
return true;
|
||||
}
|
||||
|
||||
$self->activateSkill('치료');
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user