game: 전투 특기 반영 유니크 도구 추가
This commit is contained in:
@@ -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 che_격노_구정신단경 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '구정신단경';
|
||||
protected $name = '구정신단경(격노)';
|
||||
protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가), 격노마다 대미지 20% 추가 중첩';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$activatedCnt = $unit->hasActivatedSkillOnLog('격노');
|
||||
return [1 + 0.2*$activatedCnt, 1];
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_격노시도($unit, che_격노시도::TYPE_ITEM),
|
||||
new che_격노발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\GameUnitConst;
|
||||
use \sammo\WarUnit;
|
||||
use \sammo\WarUnitCity;
|
||||
|
||||
class che_공성_묵자 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '묵자';
|
||||
protected $name = '묵자(공성)';
|
||||
protected $info = '[전투] 성벽 공격 시 대미지 +50%';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
if($unit->getOppose() instanceof WarUnitCity){
|
||||
return [1.5, 1];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class che_반계_백우선 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '백우선';
|
||||
protected $name = '백우선(반계)';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 20% 확률로 되돌림';
|
||||
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 30% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%), 소모 군량 +10%';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
@@ -26,9 +26,19 @@ class che_반계_백우선 extends \sammo\BaseItem{
|
||||
return $value - $debuff;
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName == 'killRice'){
|
||||
return $value * 1.1;
|
||||
}
|
||||
if($statName === 'warMagicSuccessDamage' && $aux === '반목'){
|
||||
return $value + 0.4;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301, 0.2),
|
||||
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM +BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*301, 0.3),
|
||||
new che_반계발동($unit)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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 che_위압_조목삭 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '조목삭';
|
||||
protected $name = '조목삭(위압)';
|
||||
protected $info = '[전투] 첫 페이즈 위압 발동(적 공격, 회피 불가, 사기 5 감소)';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_위압시도($unit),
|
||||
new che_위압발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use \sammo\General;
|
||||
|
||||
class che_집중_전국책 extends \sammo\BaseItem
|
||||
{
|
||||
protected $rawName = '전국책';
|
||||
protected $name = '전국책(집중)';
|
||||
protected $info = '[전투] 계략 성공 시 대미지 +50%, 공격 시 페이즈 -1';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux = null)
|
||||
{
|
||||
if ($statName === 'initWarPhase') {
|
||||
return $value - 1;
|
||||
}
|
||||
if ($statName === 'warMagicSuccessDamage') {
|
||||
return $value * 1.5;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_징병_낙주 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '낙주';
|
||||
protected $name = '낙주(징병)';
|
||||
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%';
|
||||
protected $cost = 200;
|
||||
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 + $general->getVar('leadership') * 0.25;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityHelper;
|
||||
use \sammo\WarUnit;
|
||||
|
||||
class che_척사_오약진형도 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '오약진형도';
|
||||
protected $name = '오약진형도(척사)';
|
||||
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +15%, 아군 피해 -15%';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function getWarPowerMultiplier(WarUnit $unit):array{
|
||||
$opposeCrewType = $unit->getOppose()->getCrewType();
|
||||
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
|
||||
return [1.15, 0.85];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use \sammo\General;
|
||||
|
||||
class che_환술_논어집해 extends \sammo\BaseItem
|
||||
{
|
||||
protected $rawName = '논어집해';
|
||||
protected $name = '논어집해(환술)';
|
||||
protected $info = '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%, 공격 시 페이즈 -1';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux = null)
|
||||
{
|
||||
if ($statName === 'initWarPhase') {
|
||||
return $value - 1;
|
||||
}
|
||||
if ($statName === 'warMagicSuccessProb') {
|
||||
return $value + 0.1;
|
||||
}
|
||||
if ($statName === 'warMagicSuccessDamage') {
|
||||
return $value * 1.3;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ class event_전투특기_격노 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(격노)';
|
||||
protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가), 격노마다 대미지 20% 추가 중첩';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
@@ -9,7 +9,7 @@ class event_전투특기_징병 extends \sammo\BaseItem{
|
||||
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(징병)';
|
||||
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%';
|
||||
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
@@ -25,7 +25,7 @@ class event_전투특기_징병 extends \sammo\BaseItem{
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'leadership'){
|
||||
return $value *= 1.15;
|
||||
return $value + $general->getVar('leadership') * 0.25;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user