전특 대 개편

This commit is contained in:
2020-07-15 02:33:21 +09:00
parent 7c95a483df
commit dc000cecf1
45 changed files with 1637 additions and 1422 deletions
+17 -1
View File
@@ -439,7 +439,7 @@ var nation = <?=Json::encode($nation)?>;
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
</div> </div>
<div class="input-group mb-1"> <div class="input-group mb-3">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text">귀병숙련</span> <span class="input-group-text">귀병숙련</span>
</div> </div>
@@ -460,11 +460,27 @@ var nation = <?=Json::encode($nation)?>;
<span class="input-group-text">수비여부</span> <span class="input-group-text">수비여부</span>
</div> </div>
<select class="custom-select form_defence_train only_defender"> <select class="custom-select form_defence_train only_defender">
<option value="90">훈사 90</option>
<option value="80">훈사 80</option> <option value="80">훈사 80</option>
<option value="60">훈사 60</option> <option value="60">훈사 60</option>
<option value="40">훈사 40</option>
<option value="999">안함</option> <option value="999">안함</option>
</select> </select>
</div> </div>
<div class="input-group mb-1">
<div class="input-group-prepend">
<span class="input-group-text">전투 수</span>
</div>
<input type="number" class="form-control form_warnum" value="0" step="1">
<div class="input-group-prepend">
<span class="input-group-text">승리 수</span>
</div>
<input type="number" class="form-control form_killnum" value="0" step="1">
<div class="input-group-prepend">
<span class="input-group-text">사살 수</span>
</div>
<input type="number" class="form-control form_killcrew" value="0" step="1">
</div>
</div> </div>
</div> </div>
+16 -2
View File
@@ -32,11 +32,16 @@ $reqColumns = [
'leadership', 'horse', 'strength', 'weapon', 'intel', 'book', 'item', 'leadership', 'horse', 'strength', 'weapon', 'intel', 'book', 'item',
'rice', 'personal', 'special2', 'rice', 'personal', 'special2',
'crew', 'crewtype', 'crew', 'crewtype',
'atmos', 'train', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5', 'defence_train' 'atmos', 'train', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5', 'defence_train',
];
$reqRankColumns = [
'warnum', 'killnum', 'killcrew'
]; ];
$dummyItems = [ $dummyItems = [
'officer_level'=>1, 'officer_level'=>1,
'horse'=>'None',
'weapon'=>'None', 'weapon'=>'None',
'book'=>'None', 'book'=>'None',
'item'=>'None', 'item'=>'None',
@@ -50,7 +55,10 @@ $dummyItems = [
'dex3'=>0, 'dex3'=>0,
'dex4'=>0, 'dex4'=>0,
'dex5'=>0, 'dex5'=>0,
'defence_train'=>80 'defence_train'=>80,
'warnum'=>0,
'killnum'=>0,
'killcrew'=>0,
]; ];
$rawDestGeneral = $db->queryFirstRow('SELECT %l FROM general WHERE no=%i', Util::formatListOfBackticks($reqColumns), $destGeneralID); $rawDestGeneral = $db->queryFirstRow('SELECT %l FROM general WHERE no=%i', Util::formatListOfBackticks($reqColumns), $destGeneralID);
@@ -60,6 +68,12 @@ if($nationID == 0 || $rawDestGeneral['nation'] != $nationID){
$rawDestGeneral[$key] = $val; $rawDestGeneral[$key] = $val;
} }
} }
else{
$rawRankValue = $db->queryAllLists('SELECT `type`, `value` FROM rank_data WHERE general_id = %i AND `type` IN %ls', $destGeneralID, $reqRankColumns);
foreach($rawRankValue as [$rankType, $rankValue]){
$rawDestGeneral[$rankType] = $rankValue;
}
}
foreach(['dex1', 'dex2', 'dex3', 'dex4', 'dex5'] as $dexKey){ foreach(['dex1', 'dex2', 'dex3', 'dex4', 'dex5'] as $dexKey){
$dex = $rawDestGeneral[$dexKey]; $dex = $rawDestGeneral[$dexKey];
+18 -4
View File
@@ -87,12 +87,13 @@ $generalCheck = [
'no', 'name', 'nation', 'turntime', 'personal', 'special2', 'crew', 'crewtype', 'atmos', 'train', 'no', 'name', 'nation', 'turntime', 'personal', 'special2', 'crew', 'crewtype', 'atmos', 'train',
'intel', 'intel_exp', 'book', 'strength', 'strength_exp', 'weapon', 'injury', 'leadership', 'leadership_exp', 'horse', 'item', 'intel', 'intel_exp', 'book', 'strength', 'strength_exp', 'weapon', 'injury', 'leadership', 'leadership_exp', 'horse', 'item',
'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5', 'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5',
'recent_war' 'recent_war', 'warnum', 'killnum', 'killcrew',
], ],
'integer'=>[ 'integer'=>[
'no', 'nation', 'crew', 'crewtype', 'atmos', 'train', 'no', 'nation', 'crew', 'crewtype', 'atmos', 'train',
'intel', 'intel_exp', 'strength', 'strength_exp', 'injury', 'leadership', 'leadership_exp', 'intel', 'intel_exp', 'strength', 'strength_exp', 'injury', 'leadership', 'leadership_exp',
'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5', 'explevel', 'experience', 'dedication', 'officer_level', 'officer_city', 'gold', 'rice', 'dex1', 'dex2', 'dex3', 'dex4', 'dex5',
'warnum', 'killnum', 'killcrew',
], ],
'min'=>[ 'min'=>[
['no', 1], ['no', 1],
@@ -109,6 +110,9 @@ $generalCheck = [
['dex3', 0], ['dex3', 0],
['dex4', 0], ['dex4', 0],
['dex5', 0], ['dex5', 0],
['warnum', 0],
['killnum', 0],
['killcrew', 0],
], ],
'between'=>[ 'between'=>[
['train', [40, GameConst::$maxTrainByWar]], ['train', [40, GameConst::$maxTrainByWar]],
@@ -148,7 +152,8 @@ foreach($rawDefenderList as $idx=>$rawDefenderGeneral){
'reason'=>"[수비자{$idx}]".$v->errorStr() 'reason'=>"[수비자{$idx}]".$v->errorStr()
]); ]);
} }
$defenderList[] = new General($rawDefenderGeneral, null, $rawDefenderCity, $rawAttackerNation, $year, $month, true);
$defenderList[] = new General($rawDefenderGeneral, extractRankVar($rawDefenderGeneral), $rawDefenderCity, $rawAttackerNation, $year, $month, true);
} }
@@ -273,6 +278,15 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
$startYear = $gameStor->startyear; $startYear = $gameStor->startyear;
$cityRate = Util::round(($year - $startYear) / 1.5) + 60; $cityRate = Util::round(($year - $startYear) / 1.5) + 60;
function extractRankVar(array $rawVal):array{
$rankVars = [];
foreach($rawVal as $rawKey=>$rawVal){
if(key_exists($rawKey, General::RANK_COLUMN)){
$rankVars[$rawKey] = $rawVal;
}
}
return $rankVars;
}
function simulateBattle( function simulateBattle(
$rawAttacker, $rawAttackerCity, $rawAttackerNation, $rawAttacker, $rawAttackerCity, $rawAttackerNation,
@@ -280,7 +294,7 @@ function simulateBattle(
$startYear, $year, $month, $cityRate $startYear, $year, $month, $cityRate
){ ){
$attacker = new WarUnitGeneral( $attacker = new WarUnitGeneral(
new General($rawAttacker, null, $rawAttackerCity, $rawAttackerNation, $year, $month), new General($rawAttacker, extractRankVar($rawAttacker), $rawAttackerCity, $rawAttackerNation, $year, $month),
$rawAttackerNation, $rawAttackerNation,
true true
); );
@@ -312,7 +326,7 @@ function simulateBattle(
return null; return null;
} }
$defenderObj = new General($iterDefender->current(), null, $rawDefenderCity, $rawDefenderNation, $year, $month); $defenderObj = new General($iterDefender->current(), extractRankVar($iterDefender->current()), $rawDefenderCity, $rawDefenderNation, $year, $month);
if(extractBattleOrder($defenderObj) <= 0){ if(extractBattleOrder($defenderObj) <= 0){
return null; return null;
} }
+10
View File
@@ -207,6 +207,10 @@ jQuery(function($) {
setVal('.form_dex5', data.dex5); setVal('.form_dex5', data.dex5);
setVal('.form_defence_train', data.defence_train); setVal('.form_defence_train', data.defence_train);
setVal('.form_warnum', data.warnum);
setVal('.form_killnum', data.killnum);
setVal('.form_killcrew', data.killcrew);
if (!setGeneralNo($general, data.no)) { if (!setGeneralNo($general, data.no)) {
setGeneralNo($general, generateNewGeneralNo()); setGeneralNo($general, generateNewGeneralNo());
} }
@@ -252,7 +256,13 @@ jQuery(function($) {
dex3: getInt('.form_dex3'), dex3: getInt('.form_dex3'),
dex4: getInt('.form_dex4'), dex4: getInt('.form_dex4'),
dex5: getInt('.form_dex5'), dex5: getInt('.form_dex5'),
defence_train: getInt('.form_defence_train'), defence_train: getInt('.form_defence_train'),
warnum: getInt('.form_warnum'),
killnum: getInt('.form_killnum'),
killcrew: getInt('.form_killcrew'),
}; };
} }
@@ -14,7 +14,7 @@ class che_의술_청낭서 extends \sammo\BaseItem{
protected $id = 23; protected $id = 23;
protected $rawName = '청낭서'; protected $rawName = '청낭서';
protected $name = '청낭서(의술)'; protected $name = '청낭서(의술)';
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'; protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
protected $cost = 200; protected $cost = 200;
protected $consumable = false; protected $consumable = false;
@@ -14,7 +14,7 @@ class che_의술_태평청령 extends \sammo\BaseItem{
protected $id = 24; protected $id = 24;
protected $rawName = '태평청령'; protected $rawName = '태평청령';
protected $name = '태평청령(의술)'; protected $name = '태평청령(의술)';
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'; protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
protected $cost = 200; protected $cost = 200;
protected $consumable = false; protected $consumable = false;
+2 -2
View File
@@ -13,7 +13,7 @@ class che_저격_수극 extends \sammo\BaseItem{
protected $id = 2; protected $id = 2;
protected $rawName = '수극'; protected $rawName = '수극';
protected $name = '수극(저격)'; protected $name = '수극(저격)';
protected $info = '[전투] 전투 개시 전 20% 확률로 저격 시도. 1회용'; protected $info = '[전투] 전투 개시 전 50% 확률로 저격 시도. 1회용';
protected $cost = 1000; protected $cost = 1000;
protected $consumable = true; protected $consumable = true;
protected $buyable = true; protected $buyable = true;
@@ -21,7 +21,7 @@ class che_저격_수극 extends \sammo\BaseItem{
public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattleInitSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_저격시도($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 0.2, 20, 40), new che_저격시도($unit, BaseWarUnitTrigger::TYPE_CONSUMABLE_ITEM, 0.5, 20, 40),
new che_저격발동($unit) new che_저격발동($unit)
); );
} }
@@ -13,7 +13,7 @@ class event_전투특기_격노 extends \sammo\BaseItem{
protected $id = 74; protected $id = 74;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(격노)'; protected $name = '비급(격노)';
protected $info = '[전투] 상대방 필살 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)'; protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -12,7 +12,7 @@ class event_전투특기_공성 extends \sammo\BaseItem{
protected $id = 53; protected $id = 53;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(공성)'; protected $name = '비급(공성)';
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%'; protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 차병 숙련을 가산';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -32,4 +32,18 @@ class event_전투특기_공성 extends \sammo\BaseItem{
} }
return [1, 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;
}
} }
@@ -11,7 +11,7 @@ class event_전투특기_궁병 extends \sammo\BaseItem{
protected $id = 51; protected $id = 51;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(궁병)'; protected $name = '비급(궁병)';
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p'; protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 궁병 숙련을 가산';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -29,6 +29,16 @@ class event_전투특기_궁병 extends \sammo\BaseItem{
if($statName === 'warAvoidRatio'){ if($statName === 'warAvoidRatio'){
return $value + 0.2; 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; return $value;
} }
} }
@@ -11,7 +11,7 @@ class event_전투특기_귀병 extends \sammo\BaseItem{
protected $id = 40; protected $id = 40;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(귀병)'; protected $name = '비급(귀병)';
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p'; protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 귀병 숙련을 가산';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -29,6 +29,16 @@ class event_전투특기_귀병 extends \sammo\BaseItem{
if($statName === 'warMagicSuccessProb'){ if($statName === 'warMagicSuccessProb'){
return $value + 0.2; 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; return $value;
} }
} }
@@ -11,7 +11,7 @@ class event_전투특기_기병 extends \sammo\BaseItem{
protected $id = 52; protected $id = 52;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(기병)'; protected $name = '비급(기병)';
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%'; protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 기병 숙련을 가산';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -31,4 +31,18 @@ class event_전투특기_기병 extends \sammo\BaseItem{
} }
return [1.1, 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;
}
} }
@@ -7,13 +7,14 @@ use \sammo\WarUnit;
use \sammo\BaseWarUnitTrigger; use \sammo\BaseWarUnitTrigger;
use \sammo\WarUnitTriggerCaller; use \sammo\WarUnitTriggerCaller;
use sammo\WarUnitTrigger\WarActivateSkills; use sammo\WarUnitTrigger\WarActivateSkills;
use \sammo\WarUnitTrigger\che_돌격지속;
class event_전투특기_돌격 extends \sammo\BaseItem{ class event_전투특기_돌격 extends \sammo\BaseItem{
protected $id = 60; protected $id = 60;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(돌격)'; protected $name = '비급(돌격)';
protected $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%'; protected $info = '[전투] 공격 시 대등/유리한 병종에게는 퇴각 전까지 전투, 공격 시 페이즈 + 2, 공격 시 대미지 +5%';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -21,21 +22,20 @@ class event_전투특기_돌격 extends \sammo\BaseItem{
public function onCalcStat(General $general, string $statName, $value, $aux=null){ public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'initWarPhase'){ if($statName === 'initWarPhase'){
return $value + 1; return $value + 2;
} }
return $value; return $value;
} }
public function getWarPowerMultiplier(WarUnit $unit):array{ public function getWarPowerMultiplier(WarUnit $unit):array{
if($unit->isAttacker()){ if($unit->isAttacker()){
return [1.1, 1]; return [1.05, 1];
} }
return [1, 1]; return [1, 1];
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new 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\General;
use \sammo\SpecialityHelper; use \sammo\SpecialityHelper;
use \sammo\WarUnit; use \sammo\WarUnit;
use \sammo\Util;
class event_전투특기_무쌍 extends \sammo\BaseItem{ class event_전투특기_무쌍 extends \sammo\BaseItem{
protected $id = 61; protected $id = 61;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(무쌍)'; protected $name = '비급(무쌍)';
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p'; protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p, <br>승리 수만큼 대미지 0.20%씩 추가 상승(최대40%)<br>승리 수만큼 피해 0.05%씩 감소(최대50%)';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -24,6 +25,11 @@ class event_전투특기_무쌍 extends \sammo\BaseItem{
} }
public function getWarPowerMultiplier(WarUnit $unit):array{ 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 $id = 45;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(반계)'; protected $name = '비급(반계)';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)'; protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +150%)';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -23,15 +23,15 @@ class event_전투특기_반계 extends \sammo\BaseItem{
public function onCalcStat(General $general, string $statName, $value, $aux=null){ public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warMagicSuccessDamage' && $aux === '반목'){ if($statName === 'warMagicSuccessDamage' && $aux === '반목'){
return $value + 0.4; return $value + 0.9;
} }
return $value; return $value;
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_ITEM, false, '계략약화'), new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '계략약화'),
new che_반계시도($unit, che_반계시도::TYPE_ITEM), new che_반계시도($unit),
new che_반계발동($unit) new che_반계발동($unit)
); );
} }
@@ -11,7 +11,7 @@ class event_전투특기_보병 extends \sammo\BaseItem{
protected $id = 50; protected $id = 50;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(보병)'; protected $name = '비급(보병)';
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%'; protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 보병 숙련을 가산';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -32,4 +32,18 @@ class event_전투특기_보병 extends \sammo\BaseItem{
} }
return [1, 0.8]; 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 $id = 63;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(위압)'; protected $name = '비급(위압)';
protected $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)'; protected $info = '[전투] 첫 페이즈 위압 발동(적 공격, 회피 불가, 사기 5 감소)';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -16,7 +16,7 @@ class event_전투특기_의술 extends \sammo\BaseItem{
protected $id = 73; protected $id = 73;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(의술)'; protected $name = '비급(의술)';
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'; protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -13,7 +13,7 @@ class event_전투특기_저격 extends \sammo\BaseItem{
protected $id = 70; protected $id = 70;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(저격)'; protected $name = '비급(저격)';
protected $info = '[전투] 새로운 상대와 전투 시 1/3 확률로 저격 발동, 성공 시 사기+10'; protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -21,7 +21,7 @@ class event_전투특기_저격 extends \sammo\BaseItem{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new 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) new che_저격발동($unit, che_저격발동::TYPE_ITEM)
); );
} }
@@ -12,7 +12,7 @@ class event_전투특기_필살 extends \sammo\BaseItem{
protected $id = 71; protected $id = 71;
protected $rawName = '비급'; protected $rawName = '비급';
protected $name = '비급(필살)'; protected $name = '비급(필살)';
protected $info = '[전투] 필살 확률 +20%p, 필살 발동시 대상 회피 불가'; protected $info = '[전투] 필살 확률 +25%p, 필살 발동시 대상 회피 불가';
protected $cost = 100; protected $cost = 100;
protected $buyable = true; protected $buyable = true;
protected $consumable = false; protected $consumable = false;
@@ -20,7 +20,7 @@ class event_전투특기_필살 extends \sammo\BaseItem{
public function onCalcStat(General $general, string $statName, $value, $aux=null){ public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warCriticalRatio'){ if($statName === 'warCriticalRatio'){
return $value + 0.2; return $value + 0.25;
} }
return $value; return $value;
} }
+1 -1
View File
@@ -12,7 +12,7 @@ class che_격노 extends \sammo\BaseSpecial{
protected $id = 74; protected $id = 74;
protected $name = '격노'; protected $name = '격노';
protected $info = '[전투] 상대방 필살 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)'; protected $info = '[전투] 상대방 필살 시 격노(필살) 발동, 회피 시도시 25% 확률로 격노 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
+3 -3
View File
@@ -13,7 +13,7 @@ class che_견고 extends \sammo\BaseSpecial{
protected $id = 62; protected $id = 62;
protected $name = '견고'; protected $name = '견고';
protected $info = '[전투] 상대 필살, 격노, 위압, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -5%'; protected $info = '[전투] 상대 필살, 저격 불가, 상대 계략 시도시 성공 확률 -10%p, 부상 없음, 아군 피해 -10%';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -30,11 +30,11 @@ class che_견고 extends \sammo\BaseSpecial{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '위압불가', '격노불가', '계략약화', '저격불가') new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '필살불가', '계략약화', '저격불가')
); );
} }
public function getWarPowerMultiplier(WarUnit $unit):array{ public function getWarPowerMultiplier(WarUnit $unit):array{
return [1, 0.95]; return [1, 0.9];
} }
} }
+15 -1
View File
@@ -11,7 +11,7 @@ class che_공성 extends \sammo\BaseSpecial{
protected $id = 53; protected $id = 53;
protected $name = '공성'; protected $name = '공성';
protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%'; protected $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 차병 숙련을 가산';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -33,4 +33,18 @@ class che_공성 extends \sammo\BaseSpecial{
} }
return [1, 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;
}
} }
+11 -1
View File
@@ -10,7 +10,7 @@ class che_궁병 extends \sammo\BaseSpecial{
protected $id = 51; protected $id = 51;
protected $name = '궁병'; protected $name = '궁병';
protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p'; protected $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 궁병 숙련을 가산';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -31,6 +31,16 @@ class che_궁병 extends \sammo\BaseSpecial{
if($statName === 'warAvoidRatio'){ if($statName === 'warAvoidRatio'){
return $value + 0.2; 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; return $value;
} }
} }
+11 -1
View File
@@ -10,7 +10,7 @@ class che_귀병 extends \sammo\BaseSpecial{
protected $id = 40; protected $id = 40;
protected $name = '귀병'; protected $name = '귀병';
protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p'; protected $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 귀병 숙련을 가산';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -30,6 +30,16 @@ class che_귀병 extends \sammo\BaseSpecial{
if($statName === 'warMagicSuccessProb'){ if($statName === 'warMagicSuccessProb'){
return $value + 0.2; 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; return $value;
} }
} }
+15 -1
View File
@@ -10,7 +10,7 @@ class che_기병 extends \sammo\BaseSpecial{
protected $id = 52; protected $id = 52;
protected $name = '기병'; protected $name = '기병';
protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%'; protected $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 기병 숙련을 가산';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -33,4 +33,18 @@ class che_기병 extends \sammo\BaseSpecial{
} }
return [1.1, 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;
}
} }
+5 -5
View File
@@ -7,12 +7,13 @@ use \sammo\WarUnit;
use \sammo\BaseWarUnitTrigger; use \sammo\BaseWarUnitTrigger;
use \sammo\WarUnitTriggerCaller; use \sammo\WarUnitTriggerCaller;
use sammo\WarUnitTrigger\WarActivateSkills; use sammo\WarUnitTrigger\WarActivateSkills;
use \sammo\WarUnitTrigger\che_돌격지속;
class che_돌격 extends \sammo\BaseSpecial{ class che_돌격 extends \sammo\BaseSpecial{
protected $id = 60; protected $id = 60;
protected $name = '돌격'; protected $name = '돌격';
protected $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%'; protected $info = '[전투] 공격 시 대등/유리한 병종에게는 퇴각 전까지 전투, 공격 시 페이즈 + 2, 공격 시 대미지 +5%';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -22,21 +23,20 @@ class che_돌격 extends \sammo\BaseSpecial{
public function onCalcStat(General $general, string $statName, $value, $aux=null){ public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'initWarPhase'){ if($statName === 'initWarPhase'){
return $value + 1; return $value + 2;
} }
return $value; return $value;
} }
public function getWarPowerMultiplier(WarUnit $unit):array{ public function getWarPowerMultiplier(WarUnit $unit):array{
if($unit->isAttacker()){ if($unit->isAttacker()){
return [1.1, 1]; return [1.05, 1];
} }
return [1, 1]; return [1, 1];
} }
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
(new WarActivateSkills($unit, BaseWarUnitTrigger::TYPE_NONE, false, '회피불가'))->setPriority(BaseWarUnitTrigger::PRIORITY_BEGIN + 200) new che_돌격지속($unit)
); );
} }
} }
+8 -2
View File
@@ -4,12 +4,13 @@ use \sammo\iAction;
use \sammo\General; use \sammo\General;
use \sammo\SpecialityHelper; use \sammo\SpecialityHelper;
use \sammo\WarUnit; use \sammo\WarUnit;
use \sammo\Util;
class che_무쌍 extends \sammo\BaseSpecial{ class che_무쌍 extends \sammo\BaseSpecial{
protected $id = 61; protected $id = 61;
protected $name = '무쌍'; protected $name = '무쌍';
protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p'; protected $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p, <br>승리 수만큼 대미지 0.20%씩 추가 상승(최대40%)<br>승리 수만큼 피해 0.05%씩 감소(최대50%)';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -25,6 +26,11 @@ class che_무쌍 extends \sammo\BaseSpecial{
} }
public function getWarPowerMultiplier(WarUnit $unit):array{ 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];
} }
} }
+2 -2
View File
@@ -14,7 +14,7 @@ class che_반계 extends \sammo\BaseSpecial{
protected $id = 45; protected $id = 45;
protected $name = '반계'; protected $name = '반계';
protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)'; protected $info = '[전투] 상대의 계략 성공 확률 -10%p, 상대의 계략을 40% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +150%)';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -24,7 +24,7 @@ class che_반계 extends \sammo\BaseSpecial{
public function onCalcStat(General $general, string $statName, $value, $aux=null){ public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warMagicSuccessDamage' && $aux === '반목'){ if($statName === 'warMagicSuccessDamage' && $aux === '반목'){
return $value + 0.4; return $value + 0.9;
} }
return $value; return $value;
} }
+15 -1
View File
@@ -10,7 +10,7 @@ class che_보병 extends \sammo\BaseSpecial{
protected $id = 50; protected $id = 50;
protected $name = '보병'; protected $name = '보병';
protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%'; protected $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%,<br>공격시 상대 병종에/수비시 자신 병종 숙련에 보병 숙련을 가산';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -33,4 +33,18 @@ class che_보병 extends \sammo\BaseSpecial{
} }
return [1, 0.8]; 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 -4
View File
@@ -12,7 +12,7 @@ class che_위압 extends \sammo\BaseSpecial{
protected $id = 63; protected $id = 63;
protected $name = '위압'; protected $name = '위압';
protected $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)'; protected $info = '[전투] 첫 페이즈 위압 발동(적 공격, 회피 불가, 사기 5 감소)';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -21,9 +21,6 @@ class che_위압 extends \sammo\BaseSpecial{
]; ];
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
if($unit->getPhase() != 0){
return null;
}
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_위압시도($unit), new che_위압시도($unit),
new che_위압발동($unit) new che_위압발동($unit)
+1 -1
View File
@@ -15,7 +15,7 @@ class che_의술 extends \sammo\BaseSpecial{
protected $id = 73; protected $id = 73;
protected $name = '의술'; protected $name = '의술';
protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)'; protected $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 40% 확률로 치료 발동(아군 피해 1/3 감소, 부상 회복)';
static $selectWeightType = SpecialityHelper::WEIGHT_PERCENT; static $selectWeightType = SpecialityHelper::WEIGHT_PERCENT;
static $selectWeight = 2; static $selectWeight = 2;
+2 -2
View File
@@ -12,7 +12,7 @@ class che_저격 extends \sammo\BaseSpecial{
protected $id = 70; protected $id = 70;
protected $name = '저격'; protected $name = '저격';
protected $info = '[전투] 새로운 상대와 전투 시 1/3 확률로 저격 발동, 성공 시 사기+10'; protected $info = '[전투] 새로운 상대와 전투 시 50% 확률로 저격 발동, 성공 시 사기+10';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -24,7 +24,7 @@ class che_저격 extends \sammo\BaseSpecial{
public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{ public function getBattlePhaseSkillTriggerList(WarUnit $unit):?WarUnitTriggerCaller{
return new WarUnitTriggerCaller( return new WarUnitTriggerCaller(
new che_저격시도($unit, che_저격시도::TYPE_NONE, 1/3, 20, 60), new che_저격시도($unit, che_저격시도::TYPE_NONE, 0.5, 10, 40),
new che_저격발동($unit) new che_저격발동($unit)
); );
} }
+2 -2
View File
@@ -9,7 +9,7 @@ class che_징병 extends \sammo\BaseSpecial{
protected $id = 72; protected $id = 72;
protected $name = '징병'; protected $name = '징병';
protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%'; protected $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +25%';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -29,7 +29,7 @@ class che_징병 extends \sammo\BaseSpecial{
public function onCalcStat(General $general, string $statName, $value, $aux=null){ public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'leadership'){ if($statName === 'leadership'){
return $value *= 1.15; return $value + $general->getVar('leadership') * 0.25;
} }
return $value; return $value;
} }
+2 -2
View File
@@ -9,7 +9,7 @@ class che_척사 extends \sammo\BaseSpecial{
protected $id = 75; protected $id = 75;
protected $name = '척사'; protected $name = '척사';
protected $info = '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%'; protected $info = '[전투] 지역·도시 병종 상대로 대미지 +15%, 아군 피해 -15%';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -22,7 +22,7 @@ class che_척사 extends \sammo\BaseSpecial{
public function getWarPowerMultiplier(WarUnit $unit):array{ public function getWarPowerMultiplier(WarUnit $unit):array{
$opposeCrewType = $unit->getOppose()->getCrewType(); $opposeCrewType = $unit->getOppose()->getCrewType();
if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){ if($opposeCrewType->reqCities || $opposeCrewType->reqRegions){
return [1.1, 0.9]; return [1.15, 0.85];
} }
return [1, 1]; return [1, 1];
} }
+2 -2
View File
@@ -11,7 +11,7 @@ class che_필살 extends \sammo\BaseSpecial{
protected $id = 71; protected $id = 71;
protected $name = '필살'; protected $name = '필살';
protected $info = '[전투] 필살 확률 +20%p, 필살 발동시 대상 회피 불가'; protected $info = '[전투] 필살 확률 +25%p, 필살 발동시 대상 회피 불가';
static $selectWeightType = SpecialityHelper::WEIGHT_NORM; static $selectWeightType = SpecialityHelper::WEIGHT_NORM;
static $selectWeight = 1; static $selectWeight = 1;
@@ -23,7 +23,7 @@ class che_필살 extends \sammo\BaseSpecial{
public function onCalcStat(General $general, string $statName, $value, $aux=null){ public function onCalcStat(General $general, string $statName, $value, $aux=null){
if($statName === 'warCriticalRatio'){ if($statName === 'warCriticalRatio'){
return $value + 0.2; return $value + 0.25;
} }
return $value; return $value;
} }
+2 -2
View File
@@ -247,9 +247,9 @@ class WarUnit{
$warPower *= $this->getComputedAtmos(); $warPower *= $this->getComputedAtmos();
$warPower /= $oppose->getComputedTrain(); $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); $warPower *= getDexLog($genDexAtt, $oppDexDef);
+8 -4
View File
@@ -62,7 +62,7 @@ class WarUnitGeneral extends WarUnit{
function getMaxPhase():int{ function getMaxPhase():int{
$phase = $this->getCrewType()->speed; $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; return $phase + $this->bonusPhase;
} }
@@ -75,12 +75,16 @@ class WarUnitGeneral extends WarUnit{
} }
function getDex(GameUnitDetail $crewType){ 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(){ function getComputedTrain(){
$train = $this->general->getVar('train'); $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; $train += $this->trainBonus;
return $train; return $train;
@@ -88,7 +92,7 @@ class WarUnitGeneral extends WarUnit{
function getComputedAtmos(){ function getComputedAtmos(){
$atmos = $this->general->getVar('atmos'); $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; $atmos += $this->atmosBonus;
return $atmos; return $atmos;
+10 -13
View File
@@ -19,23 +19,20 @@ class che_격노시도 extends BaseWarUnitTrigger{
return true; return true;
} }
if($self->isAttacker()){ if($oppose->hasActivatedSkill('필살')){
if(Util::randBool(1/3)){ $self->activateSkill('격노');
$self->activateSkill('진노', '격노'); $oppose->deactivateSkill('회피');
$oppose->deactivateSkill('회피'); if($self->isAttacker() && Util::randBool(1/3)){
} $self->activateSkill('진노');
else if(Util::randBool(1/4)){
$self->activateSkill('격노');
$oppose->deactivateSkill('회피');
} }
} }
else{ else if(Util::randBool(1/4)){
if(Util::randBool(1/2)){ $self->activateSkill('격노');
$self->activateSkill('격노'); $oppose->deactivateSkill('회피');
$oppose->deactivateSkill('회피'); if($self->isAttacker() && Util::randBool(1/3)){
$self->activateSkill('진노');
} }
} }
return true; 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;
}
}
@@ -20,6 +20,7 @@ class che_위압발동 extends BaseWarUnitTrigger{
$oppose->getLogger()->pushGeneralBattleDetailLog('상대에게 <R>위압</>받았다!</>', ActionLogger::PLAIN); $oppose->getLogger()->pushGeneralBattleDetailLog('상대에게 <R>위압</>받았다!</>', ActionLogger::PLAIN);
$self->getLogger()->pushGeneralBattleDetailLog('상대에게 <C>위압</>을 줬다!</>', ActionLogger::PLAIN); $self->getLogger()->pushGeneralBattleDetailLog('상대에게 <C>위압</>을 줬다!</>', ActionLogger::PLAIN);
$oppose->setWarPowerMultiply(0); $oppose->setWarPowerMultiply(0);
$oppose->increaseVarWithLimit('atmos', -5, 40);
return true; return true;
} }
+2 -10
View File
@@ -16,16 +16,7 @@ class che_위압시도 extends BaseWarUnitTrigger{
protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{ protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{
assert($self instanceof WarUnitGeneral, 'General만 발동 가능'); assert($self instanceof WarUnitGeneral, 'General만 발동 가능');
if($self->getPhase() != 0){ if($self->getPhase() !== 0 && $oppose->getPhase() !== 0){
return true;
}
if($self->getHP() < 1000){
return true;
}
if($self->getComputedAtmos() < 90){
return true;
}
if($self->getComputedTrain() < 90){
return true; return true;
} }
if($self->hasActivatedSkill('위압불가')){ if($self->hasActivatedSkill('위압불가')){
@@ -33,6 +24,7 @@ class che_위압시도 extends BaseWarUnitTrigger{
} }
$self->activateSkill('위압'); $self->activateSkill('위압');
$oppose->activateSkill('회피불가', '필살불가', '계략불가');
return true; return true;
} }
} }
@@ -25,7 +25,8 @@ class che_전투치료발동 extends BaseWarUnitTrigger{
$oppose->getLogger()->pushGeneralBattleDetailLog("상대가 <C>치료</>했다!", ActionLogger::PLAIN); $oppose->getLogger()->pushGeneralBattleDetailLog("상대가 <C>치료</>했다!", ActionLogger::PLAIN);
$self->getLogger()->pushGeneralBattleDetailLog("<C>치료</>했다!", ActionLogger::PLAIN); $self->getLogger()->pushGeneralBattleDetailLog("<C>치료</>했다!", ActionLogger::PLAIN);
$oppose->multiplyWarPowerMultiply(1/1.5); $oppose->multiplyWarPowerMultiply(0.5);
$self->getGeneral()->setVar('injury', 0);
$this->processConsumableItem(); $this->processConsumableItem();
@@ -19,7 +19,7 @@ class che_전투치료시도 extends BaseWarUnitTrigger{
if($self->hasActivatedSkill('치료불가')){ if($self->hasActivatedSkill('치료불가')){
return true; return true;
} }
if(!Util::randBool(1/5)){ if(!Util::randBool(0.4)){
return true; return true;
} }