유니크 아이템에 효과 추가
This commit is contained in:
@@ -6,4 +6,17 @@ use \sammo\General;
|
||||
class che_명마_07_기주마 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 공격 시 페이즈 +1";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'initWarPhase'){
|
||||
return $value + 1;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,26 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_퇴각부상무효;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_명마_07_백마 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 퇴각 시 부상 없음";
|
||||
}
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_퇴각부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,27 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_퇴각부상무효;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_명마_12_사륜거 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 퇴각 시 부상 없음";
|
||||
}
|
||||
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_퇴각부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,9 +2,26 @@
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_저격발동;
|
||||
use sammo\WarUnitTrigger\che_저격시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_무기_02_단궁 extends \sammo\BaseStatItem{
|
||||
protected $cost = 3000;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 2000;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 새로운 상대와 전투 시 1% 확률로 저격 발동, 성공 시 사기+10";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 102, 0.01, 10, 30),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,25 @@
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_저격발동;
|
||||
use sammo\WarUnitTrigger\che_저격시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_무기_07_맥궁 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 107, 0.2, 20, 40),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,25 @@
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_저격발동;
|
||||
use sammo\WarUnitTrigger\che_저격시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_무기_09_동호비궁 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 109, 0.15, 20, 40),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,25 @@
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_저격발동;
|
||||
use sammo\WarUnitTrigger\che_저격시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_무기_11_이광궁 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 새로운 상대와 전투 시 10% 확률로 저격 발동, 성공 시 사기+10";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 111, 0.10, 20, 40),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,25 @@
|
||||
namespace sammo\ActionItem;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_저격발동;
|
||||
use sammo\WarUnitTrigger\che_저격시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_무기_13_양유기궁 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 새로운 상대와 전투 시 10% 확률로 저격 발동, 성공 시 사기+10";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 113, 0.05, 20, 40),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,17 @@ class che_서적_01_효경전 extends \sammo\BaseStatItem{
|
||||
protected $cost = 1000;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 1000;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 시도 확률 +1%p";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.01;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,17 @@ class che_서적_02_회남자 extends \sammo\BaseStatItem{
|
||||
protected $cost = 3000;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 2000;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 시도 확률 +1%p";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.01;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,17 @@ class che_서적_03_변도론 extends \sammo\BaseStatItem{
|
||||
protected $cost = 6000;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 3000;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 시도 확률 +2%p";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.02;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,17 @@ class che_서적_04_건상역주 extends \sammo\BaseStatItem{
|
||||
protected $cost = 10000;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 4000;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 시도 확률 +2%p";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.02;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,17 @@ class che_서적_05_여씨춘추 extends \sammo\BaseStatItem{
|
||||
protected $cost = 15000;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 5000;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 시도 확률 +3%p";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.03;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -7,4 +7,17 @@ class che_서적_06_사민월령 extends \sammo\BaseStatItem{
|
||||
protected $cost = 21000;
|
||||
protected $buyable = true;
|
||||
protected $reqSecu = 6000;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 시도 확률 +3%p";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.03;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,26 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_서적_07_논어 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 상대의 계략 성공 확률 -10%p";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM, false, '계략약화')
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,28 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_반계발동;
|
||||
use sammo\WarUnitTrigger\che_반계시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_서적_07_사마법 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.2),
|
||||
new che_반계발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -6,4 +6,17 @@ use \sammo\General;
|
||||
class che_서적_07_위료자 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 시도 확률 +20%p";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicTrialProb'){
|
||||
return $value + 0.2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -6,4 +6,17 @@ use \sammo\General;
|
||||
class che_서적_08_전론 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 계략 성공 시 대미지 +20%";
|
||||
}
|
||||
|
||||
public function onCalcStat(General $general, string $statName, $value, $aux=null){
|
||||
if($statName === 'warMagicSuccessDamage'){
|
||||
return $value * 1.2;
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,26 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\WarActivateSkills;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_서적_11_춘추전 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 상대의 계략 성공 확률 -10%p";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM, false, '계략약화')
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,28 @@
|
||||
<?php
|
||||
namespace sammo\ActionItem;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use \sammo\iAction;
|
||||
use \sammo\General;
|
||||
use sammo\WarUnit;
|
||||
use sammo\WarUnitTrigger\che_반계발동;
|
||||
use sammo\WarUnitTrigger\che_반계시도;
|
||||
use sammo\WarUnitTriggerCaller;
|
||||
|
||||
class che_서적_12_산해경 extends \sammo\BaseStatItem{
|
||||
protected $cost = 200;
|
||||
protected $buyable = false;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 상대의 계략을 20% 확률로 되돌림";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_반계시도($unit, BaseWarUnitTrigger::TYPE_ITEM, 0.2),
|
||||
new che_반계발동($unit)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ abstract class BaseWarUnitTrigger extends ObjectTrigger{
|
||||
const TYPE_NONE = 0;
|
||||
const TYPE_ITEM = 1;
|
||||
const TYPE_CONSUMABLE_ITEM = 1 | 2;
|
||||
const TYPE_DEDUP_TYPE_BASE = 1024;
|
||||
|
||||
protected $raiseType = self::TYPE_NONE;
|
||||
|
||||
|
||||
@@ -270,6 +270,9 @@ class WarUnitGeneral extends WarUnit{
|
||||
if($this->hasActivatedSkillOnLog('부상무효')){
|
||||
return false;
|
||||
}
|
||||
if($this->hasActivatedSkillOnLog('퇴각부상무효')){
|
||||
return false;
|
||||
}
|
||||
if(!Util::randBool(0.05)){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -10,13 +10,19 @@ use sammo\ObjectTrigger;
|
||||
|
||||
class che_반계시도 extends BaseWarUnitTrigger{
|
||||
protected $priority = ObjectTrigger::PRIORITY_BODY + 300;
|
||||
protected $prob;
|
||||
|
||||
public function __construct(WarUnit $unit, int $raiseType = 0, float $prob = 0.4){
|
||||
$this->object = $unit;
|
||||
$this->prob = $prob;
|
||||
}
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$oppose->hasActivatedSkill('계략')){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!Util::randBool(0.4)){
|
||||
if(!Util::randBool($this->prob)){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?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 + 300;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
$self->activateSkill('퇴각부상무효');
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user