forked from devsam/core
game: 저격 버프, 견고 효과 중 저격,필살 너프
- 저격 성공시 증가하는 사기량 증가 - 전특만, 몇몇 유니크 제외 - 저격이 성벽에도 발동 - 사기 상승만 추가, 성벽 너프 없음 - 견고 효과 변경 - 필살 무효 -> 필살 확률 20% 감소 - 저격 무효 -> 저격은 받지만 부상 무효
This commit is contained in:
@@ -14,12 +14,12 @@ class che_무기_09_동호비궁 extends \sammo\BaseStatItem{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+10";
|
||||
$this->info .= "<br>[전투] 새로운 상대와 전투 시 20% 확률로 저격 발동, 성공 시 사기+20";
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 109, 0.2, 20, 40),
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 109, 0.2, 20, 40, 20),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class che_무기_11_이광궁 extends \sammo\BaseStatItem{
|
||||
|
||||
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 + che_저격시도::TYPE_DEDUP_TYPE_BASE * 111, 0.10, 20, 40, 10),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class che_무기_13_양유기궁 extends \sammo\BaseStatItem{
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 113, 0.1, 20, 40),
|
||||
new che_저격시도($unit, che_저격시도::TYPE_ITEM + che_저격시도::TYPE_DEDUP_TYPE_BASE * 113, 0.1, 20, 40, 10),
|
||||
new che_저격발동($unit, che_저격발동::TYPE_ITEM)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class che_저격_매화수전 extends \sammo\BaseItem{
|
||||
protected $id = 70;
|
||||
protected $rawName = '매화수전';
|
||||
protected $name = '매화수전(저격)';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class che_저격_비도 extends \sammo\BaseItem{
|
||||
protected $id = 70;
|
||||
protected $rawName = '비도';
|
||||
protected $name = '비도(저격)';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
|
||||
protected $cost = 200;
|
||||
protected $consumable = false;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class event_전투특기_저격 extends \sammo\BaseItem{
|
||||
protected $id = 70;
|
||||
protected $rawName = '비급';
|
||||
protected $name = '비급(저격)';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
|
||||
protected $cost = 100;
|
||||
protected $buyable = true;
|
||||
protected $consumable = false;
|
||||
|
||||
@@ -13,7 +13,7 @@ class che_event_견고 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 62;
|
||||
protected $name = '견고';
|
||||
protected $info = '[전투] 상대 필살, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
|
||||
protected $info = '[전투] 상대 필살 확률 -20%p, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
@@ -25,6 +25,7 @@ class che_event_견고 extends \sammo\BaseSpecial{
|
||||
{
|
||||
$debuff = [
|
||||
'warMagicSuccessProb' => 0.1,
|
||||
'warCriticalRatio' => 0.20,
|
||||
][$statName] ?? 0;
|
||||
return $value - $debuff;
|
||||
}
|
||||
@@ -32,13 +33,12 @@ class che_event_견고 extends \sammo\BaseSpecial{
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*402, false, '저격불가')
|
||||
);
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE*402, false, '필살불가', '저격불가')
|
||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class che_event_저격 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 70;
|
||||
protected $name = '저격';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -16,7 +16,7 @@ class che_견고 extends \sammo\BaseSpecial
|
||||
|
||||
protected $id = 62;
|
||||
protected $name = '견고';
|
||||
protected $info = '[전투] 상대 필살, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
|
||||
protected $info = '[전투] 상대 필살 확률 -20%p, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
@@ -28,6 +28,7 @@ class che_견고 extends \sammo\BaseSpecial
|
||||
{
|
||||
$debuff = [
|
||||
'warMagicSuccessProb' => 0.1,
|
||||
'warCriticalRatio' => 0.20,
|
||||
][$statName] ?? 0;
|
||||
return $value - $debuff;
|
||||
}
|
||||
@@ -35,15 +36,14 @@ class che_견고 extends \sammo\BaseSpecial
|
||||
public function getBattleInitSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
|
||||
{
|
||||
return new WarUnitTriggerCaller(
|
||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404),
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404, false, '저격불가')
|
||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404),
|
||||
);
|
||||
}
|
||||
|
||||
public function getBattlePhaseSkillTriggerList(WarUnit $unit): ?WarUnitTriggerCaller
|
||||
{
|
||||
return new WarUnitTriggerCaller(
|
||||
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404, false, '필살불가', '저격불가')
|
||||
new che_부상무효($unit, BaseWarUnitTrigger::TYPE_NONE + BaseWarUnitTrigger::TYPE_DEDUP_TYPE_BASE * 404),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class che_저격 extends \sammo\BaseSpecial{
|
||||
|
||||
protected $id = 70;
|
||||
protected $name = '저격';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
|
||||
protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+20';
|
||||
|
||||
static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
|
||||
@@ -12,7 +12,6 @@ class che_부상무효 extends BaseWarUnitTrigger{
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
$oppose->activateSkill('저격불가');
|
||||
$self->activateSkill('부상무효');
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace sammo\WarUnitTrigger;
|
||||
|
||||
use sammo\BaseWarUnitTrigger;
|
||||
use sammo\WarUnitGeneral;
|
||||
use sammo\WarUnitCity;
|
||||
@@ -10,31 +12,42 @@ use sammo\ObjectTrigger;
|
||||
use sammo\ActionLogger;
|
||||
use sammo\GameConst;
|
||||
|
||||
class che_저격발동 extends BaseWarUnitTrigger{
|
||||
class che_저격발동 extends BaseWarUnitTrigger
|
||||
{
|
||||
protected $priority = ObjectTrigger::PRIORITY_POST + 100;
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
if(!$self->hasActivatedSkill('저격')){
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv): bool
|
||||
{
|
||||
if (!$self->hasActivatedSkill('저격')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if($selfEnv['저격발동']??false){
|
||||
if ($selfEnv['저격발동'] ?? false) {
|
||||
return true;
|
||||
}
|
||||
$selfEnv['저격발동'] = true;
|
||||
|
||||
$general = $self->getGeneral();
|
||||
|
||||
$self->getLogger()->pushGeneralActionLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
|
||||
$self->getLogger()->pushGeneralBattleDetailLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
|
||||
$oppose->getLogger()->pushGeneralActionLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
|
||||
$oppose->getLogger()->pushGeneralBattleDetailLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
|
||||
if ($oppose instanceof WarUnitGeneral) {
|
||||
$self->getLogger()->pushGeneralActionLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
|
||||
$self->getLogger()->pushGeneralBattleDetailLog("상대를 <C>저격</>했다!", ActionLogger::PLAIN);
|
||||
$oppose->getLogger()->pushGeneralActionLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
|
||||
$oppose->getLogger()->pushGeneralBattleDetailLog("상대에게 <R>저격</>당했다!", ActionLogger::PLAIN);
|
||||
}
|
||||
else{
|
||||
$self->getLogger()->pushGeneralActionLog("성벽 수비대장을 <C>저격</>했다!", ActionLogger::PLAIN);
|
||||
$self->getLogger()->pushGeneralBattleDetailLog("성벽 수비대장을 <C>저격</>했다!", ActionLogger::PLAIN);
|
||||
}
|
||||
|
||||
$general->increaseVarWithLimit('atmos', 10, 0, GameConst::$maxAtmosByWar);
|
||||
$oppose->getGeneral()->increaseVarWithLimit('injury', Util::randRangeInt($selfEnv['woundMin'], $selfEnv['woundMax']), null, 80);
|
||||
$general->increaseVarWithLimit('atmos', $selfEnv['addAtmos'], 0, GameConst::$maxAtmosByWar);
|
||||
|
||||
if (!$oppose->hasActivatedSkill('부상무효') && $oppose instanceof WarUnitGeneral) {
|
||||
$oppose->getGeneral()->increaseVarWithLimit('injury', Util::randRangeInt($selfEnv['woundMin'], $selfEnv['woundMax']), null, 80);
|
||||
}
|
||||
|
||||
$this->processConsumableItem();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,20 +14,19 @@ class che_저격시도 extends BaseWarUnitTrigger{
|
||||
protected $woundMin;
|
||||
protected $woundMax;
|
||||
protected $ratio;
|
||||
protected $addAtmos;
|
||||
|
||||
public function __construct(WarUnit $unit, int $raiseType, float $ratio, float $woundMin, float $woundMax){
|
||||
public function __construct(WarUnit $unit, int $raiseType, float $ratio, float $woundMin, float $woundMax, int $addAtmos = 20){
|
||||
$this->object = $unit;
|
||||
$this->raiseType = $raiseType;
|
||||
$this->ratio = $ratio;
|
||||
$this->woundMin = $woundMin;
|
||||
$this->woundMax = $woundMax;
|
||||
$this->addAtmos = $addAtmos;
|
||||
}
|
||||
|
||||
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
|
||||
assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
|
||||
if(!$oppose instanceof WarUnitGeneral){
|
||||
return true;
|
||||
}
|
||||
if($self->getPhase() !== 0 && $oppose->getPhase() !== 0){
|
||||
return true;
|
||||
}
|
||||
@@ -44,6 +43,7 @@ class che_저격시도 extends BaseWarUnitTrigger{
|
||||
$self->activateSkill('저격');
|
||||
$selfEnv['woundMin'] = $this->woundMin;
|
||||
$selfEnv['woundMax'] = $this->woundMax;
|
||||
$selfEnv['addAtmos'] = $this->addAtmos;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user