forked from devsam/core
전투 특기 클래스 추가,
This commit is contained in:
@@ -29,7 +29,7 @@ $startYear = $gameStor->getValue('startyear');
|
||||
<?=WebUtil::printJS('../e_lib/download2.js')?>
|
||||
<?=WebUtil::printJS('js/common.js')?>
|
||||
<script>
|
||||
var defaultSpecial = <?=GameConst::$defaultSpecial?>;
|
||||
var defaultSpecialDomestic = <?=GameConst::$defaultSpecialDomestic?>;
|
||||
</script>
|
||||
<?=WebUtil::printJS('js/battle_simulator.js')?>
|
||||
</head>
|
||||
|
||||
+11
-13
@@ -847,7 +847,7 @@ function generalInfo($no) {
|
||||
else { $general['age'] = "<font color=red>{$general['age']} 세</font>"; }
|
||||
|
||||
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
||||
$special = $general['special'] == GameConst::$defaultSpecial ? "{$general['specage']}세" : "<font color=limegreen>".displaySpecialDomesticInfo($general['special'])."</font>";
|
||||
$special = $general['special'] == GameConst::$defaultSpecialDomestic ? "{$general['specage']}세" : "<font color=limegreen>".displaySpecialDomesticInfo($general['special'])."</font>";
|
||||
$special2 = $general['special2'] == 0 ? "{$general['specage2']}세" : "<font color=limegreen>".displaySpecialWarInfo($general['special2'])."</font>";
|
||||
|
||||
switch($general['personal']) {
|
||||
@@ -1743,7 +1743,7 @@ function addAge() {
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||
|
||||
if($admin['year'] >= $admin['startyear']+3) {
|
||||
foreach($db->query('SELECT no,name,nation,leader,power,intel from general where specage<=age and special=%s', GameConst::$defaultSpecial) as $general){
|
||||
foreach($db->query('SELECT no,name,nation,leader,power,intel from general where specage<=age and special=%s', GameConst::$defaultSpecialDomestic) as $general){
|
||||
$special = getSpecial($general['leader'], $general['power'], $general['intel']);
|
||||
$specialClass = getGeneralSpecialDomesticClass($special);
|
||||
$specialText = $specialClass::$name;
|
||||
@@ -1756,20 +1756,18 @@ function addAge() {
|
||||
pushGenLog($general, "<C>●</>특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!");
|
||||
}
|
||||
|
||||
$query = "select no,name,nation,leader,power,intel,npc,dex0,dex10,dex20,dex30,dex40 from general where specage2<=age and special2='0'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
foreach($db->query('SELECT no,name,nation,leader,power,intel,npc,dex0,dex10,dex20,dex30,dex40 from general where spec2age<=age and special2=%s', GameConst::$defaultSpecialWar) as $general){
|
||||
$special2 = getSpecial2($general['leader'], $general['power'], $general['intel'], 0, $general['dex0'], $general['dex10'], $general['dex20'], $general['dex30'], $general['dex40']);
|
||||
$specialClass = getGeneralSpecialWarClass($special2);
|
||||
$specialText = $specialClass::$name;
|
||||
|
||||
$query = "update general set special2='$special2' where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('general', [
|
||||
'special2'=>$special2
|
||||
], 'no=%i',$general['no']);
|
||||
|
||||
$josaUl = JosaUtil::pick($special2, '을');
|
||||
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】{$josaUl} 습득");
|
||||
pushGenLog($general, "<C>●</>특기 【<b><L>".getGenSpecial($special2)."</></b>】{$josaUl} 익혔습니다!");
|
||||
$josaUl = JosaUtil::pick($specialText, '을');
|
||||
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>{$specialText}</></b>】{$josaUl} 습득");
|
||||
pushGenLog($general, "<C>●</>특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-13
@@ -847,7 +847,7 @@ function generalInfo($no) {
|
||||
else { $general['age'] = "<font color=red>{$general['age']} 세</font>"; }
|
||||
|
||||
$general['connect'] = Util::round($general['connect'] / 10) * 10;
|
||||
$special = $general['special'] == GameConst::$defaultSpecial ? "{$general['specage']}세" : "<font color=limegreen>".displaySpecialDomesticInfo($general['special'])."</font>";
|
||||
$special = $general['special'] == GameConst::$defaultSpecialDomestic ? "{$general['specage']}세" : "<font color=limegreen>".displaySpecialDomesticInfo($general['special'])."</font>";
|
||||
$special2 = $general['special2'] == 0 ? "{$general['specage2']}세" : "<font color=limegreen>".displaySpecialWarInfo($general['special2'])."</font>";
|
||||
|
||||
switch($general['personal']) {
|
||||
@@ -1522,7 +1522,7 @@ function addAge() {
|
||||
$admin = $gameStor->getValues(['startyear', 'year', 'month']);
|
||||
|
||||
if($admin['year'] >= $admin['startyear']+3) {
|
||||
foreach($db->query('SELECT no,name,nation,leader,power,intel from general where specage<=age and special=%s', GameConst::$defaultSpecial) as $general){
|
||||
foreach($db->query('SELECT no,name,nation,leader,power,intel from general where specage<=age and special=%s', GameConst::$defaultSpecialDomestic) as $general){
|
||||
$special = getSpecial($general['leader'], $general['power'], $general['intel']);
|
||||
$specialClass = getGeneralSpecialDomesticClass($special);
|
||||
$specialText = $specialClass::$name;
|
||||
@@ -1535,20 +1535,18 @@ function addAge() {
|
||||
pushGenLog($general, "<C>●</>특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!");
|
||||
}
|
||||
|
||||
$query = "select no,name,nation,leader,power,intel,npc,dex0,dex10,dex20,dex30,dex40 from general where specage2<=age and special2='0'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$gencount = MYDB_num_rows($result);
|
||||
|
||||
for($i=0; $i < $gencount; $i++) {
|
||||
$general = MYDB_fetch_array($result);
|
||||
foreach($db->query('SELECT no,name,nation,leader,power,intel,npc,dex0,dex10,dex20,dex30,dex40 from general where spec2age<=age and special2=%s', GameConst::$defaultSpecialWar) as $general){
|
||||
$special2 = getSpecial2($general['leader'], $general['power'], $general['intel'], 0, $general['dex0'], $general['dex10'], $general['dex20'], $general['dex30'], $general['dex40']);
|
||||
$specialClass = getGeneralSpecialWarClass($special2);
|
||||
$specialText = $specialClass::$name;
|
||||
|
||||
$query = "update general set special2='$special2' where no='{$general['no']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$db->update('general', [
|
||||
'special2'=>$special2
|
||||
], 'no=%i',$general['no']);
|
||||
|
||||
$josaUl = JosaUtil::pick($special2, '을');
|
||||
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>".getGenSpecial($special2)."</></b>】{$josaUl} 습득");
|
||||
pushGenLog($general, "<C>●</>특기 【<b><L>".getGenSpecial($special2)."</></b>】{$josaUl} 익혔습니다!");
|
||||
$josaUl = JosaUtil::pick($specialText, '을');
|
||||
pushGeneralHistory($general, "<C>●</>{$admin['year']}년 {$admin['month']}월:특기 【<b><C>{$specialText}</></b>】{$josaUl} 습득");
|
||||
pushGenLog($general, "<C>●</>특기 【<b><L>{$specialText}</></b>】{$josaUl} 익혔습니다!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
-1
@@ -260,7 +260,7 @@ function getPersonalityClass(?string $type){
|
||||
|
||||
function getGeneralSpecialDomesticClass(?string $type){
|
||||
if($type === null){
|
||||
$type = GameConst::$defaultSpecial;
|
||||
$type = GameConst::$defaultSpecialDomestic;
|
||||
}
|
||||
|
||||
static $basePath = __NAMESPACE__.'\\TriggerSpecialDomestic\\';
|
||||
@@ -278,6 +278,26 @@ function getGeneralSpecialDomesticClass(?string $type){
|
||||
new \InvalidArgumentException("{$type}은 올바른 내정 특기가 아님");
|
||||
}
|
||||
|
||||
function getGeneralSpecialWarClass(?string $type){
|
||||
if($type === null){
|
||||
$type = GameConst::$defaultSpecialWar;
|
||||
}
|
||||
|
||||
static $basePath = __NAMESPACE__.'\\TriggerSpecialWar\\';
|
||||
$classPath = ($basePath.$type);
|
||||
|
||||
if(class_exists($classPath)){
|
||||
return $classPath;
|
||||
}
|
||||
|
||||
$classPath = ($basePath.'che_'.$type);
|
||||
if(class_exists($classPath)){
|
||||
return $classPath;
|
||||
}
|
||||
|
||||
new \InvalidArgumentException("{$type}은 올바른 전투 특기가 아님");
|
||||
}
|
||||
|
||||
function getLevel($level, $nlevel=8) {
|
||||
if($level >= 0 && $level <= 4) { $nlevel = 0; }
|
||||
$code = $nlevel * 100 + $level;
|
||||
|
||||
@@ -66,6 +66,7 @@ function getCityLevelList():array{
|
||||
|
||||
//TODO: 클래스로 이동
|
||||
function getSpecial($leader, $power, $intel) {
|
||||
throw new \sammo\NotImplementedException();
|
||||
//통장
|
||||
if($leader*0.9 > $power && $leader*0.9 > $intel) {
|
||||
$type = array('che_인덕', 'che_귀모');
|
||||
@@ -106,6 +107,7 @@ function getSpecial($leader, $power, $intel) {
|
||||
// 70 저격, 필살, 징병, 의술, 격노, 척사 = 6 공통전투
|
||||
|
||||
function getSpecial2($leader, $power, $intel, $nodex=1, $dex0=0, $dex10=0, $dex20=0, $dex30=0, $dex40=0) {
|
||||
throw new \sammo\NotImplementedException();
|
||||
$special2 = 70;
|
||||
// 숙련 10,000: 25%, 40,000: 50%, 100,000: 79%, 160,000: 100%
|
||||
$dex = sqrt($dex0 + $dex10 + $dex20 + $dex30 + $dex40);
|
||||
|
||||
@@ -76,14 +76,15 @@ function displayCharInfo(?int $type):string{
|
||||
]);
|
||||
}
|
||||
|
||||
function displaySpecialWarInfo(?int $type):string{
|
||||
$info = getSpecialInfo($type);
|
||||
$text = getGenSpecial($type);
|
||||
function displaySpecialWarInfo(?string $type):string{
|
||||
$class = getGeneralSpecialWarClass($type);
|
||||
$info = $class::$info;
|
||||
$name = $class::$name;
|
||||
|
||||
$templates = new \League\Plates\Engine(__dir__.'/templates');
|
||||
|
||||
return $templates->render('tooltip', [
|
||||
'text'=>$text,
|
||||
'text'=>$name,
|
||||
'info'=>$info,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ $candidates = [];
|
||||
$weight = [];
|
||||
foreach($db->query('SELECT `no`, `name`, leader, power, intel, imgsvr, picture, special, special2 FROM general WHERE npc=2') as $general){
|
||||
$general['special'] = (getGeneralSpecialDomesticClass($general['special']))::$name;
|
||||
$general['special2'] = \sammo\SpecialityConst::WAR[$general['special2']][0]??'-';
|
||||
$general['special2'] = (getGeneralSpecialWarClass($general['special2']))::$name;
|
||||
$candidates[$general['no']] = $general + ['keepCnt'=>KEEP_CNT];
|
||||
$allStat = $general['leader'] + $general['power'] + $general['intel'];
|
||||
$weight[$general['no']] = pow($allStat, 1.5);
|
||||
|
||||
+1
-1
@@ -166,7 +166,7 @@ if ($genius) {
|
||||
}
|
||||
//내특
|
||||
$specage = Util::round((80 - $age)/12) + $age;
|
||||
$special = GameConst::$defaultSpecial;
|
||||
$special = GameConst::$defaultSpecialDomestic;
|
||||
|
||||
$admin = $gameStor->getValues(['scenario', 'turnterm', 'show_img_level']);
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ jQuery(function($){
|
||||
nation: (generalData.no)<=1 ? 1 : 2,
|
||||
city: (generalData.no)<=1 ? 1 : 3,
|
||||
turntime:'2018-08-26 12:00',
|
||||
special:defaultSpecial,
|
||||
special:defaultSpecialDomestic,
|
||||
leader2:0,
|
||||
power2:0,
|
||||
intel2:0,
|
||||
|
||||
@@ -101,12 +101,24 @@ class GameConstBase
|
||||
];
|
||||
/** @var array 기본 국가 성향 */
|
||||
public static $neutralNationType = 'che_중립';
|
||||
|
||||
/** @var array 기본 내정 특기 */
|
||||
public static $defaultSpecialDomestic = 'None';
|
||||
/** @var array 선택 가능한 장수 내정 특기 */
|
||||
public static $availableSpecialDomestic = [
|
||||
'che_경작', 'che_상재', 'che_발명', 'che_축성', 'che_수비', 'che_통찰', 'che_인덕', 'che_귀모',
|
||||
];
|
||||
/** @var array 기본 특기(공용) */
|
||||
public static $defaultSpecial = 'None';
|
||||
|
||||
/** @var array 기본 전투 특기 */
|
||||
public static $defaultSpecialWar = 'None';
|
||||
/** @var array 선택 가능한 장수 내정 특기 */
|
||||
public static $availableSpecialWar = [
|
||||
'che_귀병', 'che_신산', 'che_환술', 'che_집중', 'che_신중', 'che_반계',
|
||||
'che_보병', 'che_궁병', 'che_기병', 'che_공성',
|
||||
'che_돌격', 'che_무쌍', 'che_견고', 'che_위압',
|
||||
'che_저격', 'che_필살', 'che_징병', 'che_의술', 'che_격노', 'che_척사',
|
||||
];
|
||||
|
||||
|
||||
/** @var array 기본 성향(공용) */
|
||||
public static $neutralPersonality = 'None';
|
||||
|
||||
@@ -52,6 +52,8 @@ class General implements iActionTrigger{
|
||||
$specialDomesticClass = getGeneralSpecialDomesticClass($raw['special']);
|
||||
$this->specialDomesticObj = new $specialDomesticClass;
|
||||
|
||||
$specialWarClass = getGeneralSpecialWarClass($raw['special']);
|
||||
$this->specialWarObj = new $specialWarClass;
|
||||
//TODO: $specialWarClass 설정
|
||||
|
||||
$personalityClass = getPersonalityClass($raw['personal']);
|
||||
|
||||
@@ -62,7 +62,7 @@ class NPC{
|
||||
'intel'=>$intel
|
||||
];
|
||||
|
||||
$this->charDomestic = \sammo\GameConst::$defaultSpecial;
|
||||
$this->charDomestic = \sammo\GameConst::$defaultSpecialDomestic;
|
||||
|
||||
if($char === '랜덤전특'){
|
||||
$this->charWar = \sammo\SpecialityConst::pickSpecialWar($general);
|
||||
@@ -159,7 +159,7 @@ class NPC{
|
||||
|
||||
if($isFictionMode){
|
||||
$charWar = 0;
|
||||
$charDomestic = GameConst::$defaultSpecial;
|
||||
$charDomestic = GameConst::$defaultSpecialDomestic;
|
||||
}
|
||||
|
||||
$name = 'ⓝ'.$this->name;
|
||||
|
||||
@@ -21,7 +21,7 @@ class che_귀모 implements iActionTrigger{
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
|
||||
if($turnType == '계략'){
|
||||
if($varType == 'success') return $value + 0.1;
|
||||
if($varType == 'success') return $value + 0.2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_격노 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 74;
|
||||
static $name = '격노';
|
||||
static $info = '[전투] 상대방 필살 및 회피 시도시 일정 확률로 격노(필살) 발동, 공격 시 일정 확률로 진노(1페이즈 추가)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER,
|
||||
SpecialityConst::STAT_INTEL
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_견고 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 62;
|
||||
static $name = '견고';
|
||||
static $info = '[전투] 상대 필살 불가, 상대 계략 시도시 성공 확률 -10%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_공성 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 53;
|
||||
static $name = '공성';
|
||||
static $info = '[군사] 차병 계통 징·모병비 -10%<br>[전투] 성벽 공격 시 대미지 +100%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_SIEGE,
|
||||
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_SIEGE,
|
||||
SpecialityConst::STAT_INTEL | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_SIEGE,
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_궁병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 51;
|
||||
static $name = '궁병';
|
||||
static $info = '[군사] 궁병 계통 징·모병비 -10%<br>[전투] 회피 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_ARCHER,
|
||||
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_ARCHER
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_귀병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 40;
|
||||
static $name = '귀병';
|
||||
static $info = '[군사] 귀병 계통 징·모병비 -10%<br>[전투] 계략 성공 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_INTEL | SpecialityConst::ARMY_WIZARD | SpecialityConst::REQ_DEXTERITY
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_기병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 52;
|
||||
static $name = '기병';
|
||||
static $info = '[군사] 기병 계통 징·모병비 -10%<br>[전투] 수비 시 대미지 +10%, 공격 시 대미지 +20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_CAVALRY,
|
||||
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_CAVALRY
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_돌격 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 60;
|
||||
static $name = '돌격';
|
||||
static $info = '[전투] 상대 회피 불가, 공격 시 전투 페이즈 +1, 공격 시 대미지 +10%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_무쌍 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 61;
|
||||
static $name = '무쌍';
|
||||
static $info = '[전투] 대미지 +10%, 공격 시 필살 확률 +10%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_신중 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 45;
|
||||
static $name = '반계';
|
||||
static $info = '[전투] 상대의 계략을 30% 확률로 되돌림, 반목 성공시 대미지 추가(+60% → +100%)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_INTEL,
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_보병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 50;
|
||||
static $name = '보병';
|
||||
static $info = '[군사] 보병 계통 징·모병비 -10%<br>[전투] 공격 시 아군 피해 -10%, 수비 시 아군 피해 -20%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_FOOTMAN,
|
||||
SpecialityConst::STAT_POWER | SpecialityConst::REQ_DEXTERITY | SpecialityConst::ARMY_FOOTMAN
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_신산 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 41;
|
||||
static $name = '신산';
|
||||
static $info = '[계략] 화계·탈취·파괴·선동 : 성공률 +10%p<br>[전투] 계략 시도 확률 +20%p, 계략 성공 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_INTEL,
|
||||
];
|
||||
|
||||
public function onCalcDomestic(string $turnType, string $varType, float $value):float{
|
||||
if($turnType == '계략'){
|
||||
if($varType == 'success') return $value + 0.1;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_신중 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 44;
|
||||
static $name = '신중';
|
||||
static $info = '[전투] 계략 성공 확률 100%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_INTEL,
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_위압 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 63;
|
||||
static $name = '위압';
|
||||
static $info = '[전투] 훈련/사기≥90, 병력≥1,000 일 때 첫 페이즈 위압 발동(적 공격 불가)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_의술 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 73;
|
||||
static $name = '의술';
|
||||
static $info = '[군사] 매 턴마다 자신(100%)과 소속 도시 장수(적 포함 50%) 부상 회복<br>[전투] 페이즈마다 20% 확률로 치료 발동(아군 피해 1/3 감소)';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_PERCENT;
|
||||
static $selectWeight = 2;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER,
|
||||
SpecialityConst::STAT_INTEL
|
||||
];
|
||||
|
||||
public function onPreTurnExecute(General $general):array{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_저격 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 70;
|
||||
static $name = '저격';
|
||||
static $info = '[전투] 전투 개시 시 1/3 확률로 저격 발동';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER,
|
||||
SpecialityConst::STAT_INTEL
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_집중 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 43;
|
||||
static $name = '집중';
|
||||
static $info = '[전투] 계략 성공 시 대미지 +50%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_INTEL,
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_징병 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 72;
|
||||
static $name = '징병';
|
||||
static $info = '[군사] 징·모병비 -50%, 통솔 순수 능력치 보정 +15%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER,
|
||||
SpecialityConst::STAT_INTEL
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_척사 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 75;
|
||||
static $name = '척사';
|
||||
static $info = '[전투] 지역·도시 병종 상대로 대미지 +10%, 아군 피해 -10%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER,
|
||||
SpecialityConst::STAT_INTEL
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_필살 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 71;
|
||||
static $name = '필살';
|
||||
static $info = '[전투] 필살 확률 +20%p';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_NORM;
|
||||
static $selectWeight = 1;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_LEADERSHIP,
|
||||
SpecialityConst::STAT_POWER,
|
||||
SpecialityConst::STAT_INTEL
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace sammo\TriggerSpecialWar;
|
||||
use \sammo\iActionTrigger;
|
||||
use \sammo\General;
|
||||
use \sammo\SpecialityConst;
|
||||
|
||||
class che_환술 implements iActionTrigger{
|
||||
use \sammo\DefaultActionTrigger;
|
||||
|
||||
static $id = 42;
|
||||
static $name = '환술';
|
||||
static $info = '[전투] 계략 성공 확률 +10%p, 계략 성공 시 대미지 +30%';
|
||||
|
||||
static $selectWeightType = SpecialityConst::WEIGHT_PERCENT;
|
||||
static $selectWeight = 5;
|
||||
static $type = [
|
||||
SpecialityConst::STAT_INTEL,
|
||||
];
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class WarUnit{
|
||||
}
|
||||
|
||||
function getSpecialDomestic():string{
|
||||
return GameConst::$defaultSpecial;
|
||||
return GameConst::$defaultSpecialDomestic;
|
||||
}
|
||||
|
||||
function getSpecialWar():int{
|
||||
|
||||
Reference in New Issue
Block a user