Commit 1ca5785c authored by hisuinohoshi's avatar hisuinohoshi

rev combat phase 3.18

战斗系统革新 阶段3.18:

- 怒气技能系统:
移植回「拆弹专家」社团的怒气技能;
- 战斗界面初始化流程变更,以使未来能够在战斗界面即时查看敌人技能组与更多信息;
- 在战斗流程中新增了循环打击流程;
parent 6b292bc0
...@@ -600,10 +600,14 @@ if($hp > 0){ ...@@ -600,10 +600,14 @@ if($hp > 0){
{ {
if(strpos($command,'upgskill_')!==false) if(strpos($command,'upgskill_')!==false)
{ {
# 升级技能 if(isset($cskills[$sk]['num_input'])){
$nums = isset(${$command.'_nums'}) ? (int)${$command.'_nums'} : 1; $nums = isset(${$command.'_nums'}) ? (int)${$command.'_nums'} : 1;
upgclbskills($sk,$nums); upgclbskills($sk,$nums);
}elseif(isset($upgpara) && isset($cskills[$sk]['choice']) && in_array($upgpara,$cskills[$sk]['choice'])){
upgclbskills($sk,1,$upgpara);
}else{
upgclbskills($sk);
}
} }
elseif(strpos($command,'actskill_')!==false) elseif(strpos($command,'actskill_')!==false)
{ {
......
...@@ -101,8 +101,8 @@ if((strpos($action,'corpse')===0 || strpos($action,'pacorpse')===0) && $gamestat ...@@ -101,8 +101,8 @@ if((strpos($action,'corpse')===0 || strpos($action,'pacorpse')===0) && $gamestat
include_once GAME_ROOT.'./include/game/battle.func.php'; include_once GAME_ROOT.'./include/game/battle.func.php';
findcorpse($edata); findcorpse($edata);
extract($edata,EXTR_PREFIX_ALL,'w'); extract($edata,EXTR_PREFIX_ALL,'w');
init_battle(1); init_battle_rev($pdata,$edata,1);
$main = 'battle'; $main = 'battle_rev';
} }
} }
} }
...@@ -127,8 +127,8 @@ elseif((strpos($action,'neut')===0)){ ...@@ -127,8 +127,8 @@ elseif((strpos($action,'neut')===0)){
include_once GAME_ROOT.'./include/game/revbattle.func.php'; include_once GAME_ROOT.'./include/game/revbattle.func.php';
findneut($edata,1); findneut($edata,1);
extract($edata,EXTR_PREFIX_ALL,'w'); extract($edata,EXTR_PREFIX_ALL,'w');
init_battle(1); init_battle_rev($pdata,$edata,1);
$main = 'battle'; $main = 'battle_rev';
} }
} }
} }
......
...@@ -10,8 +10,7 @@ $club_skillslist = Array ...@@ -10,8 +10,7 @@ $club_skillslist = Array
2 => Array('s_hp','s_ad','f_heal','c2_butcher','c2_intuit','c2_raiding','c2_master','c2_annihil'), #'见敌必斩', 2 => Array('s_hp','s_ad','f_heal','c2_butcher','c2_intuit','c2_raiding','c2_master','c2_annihil'), #'见敌必斩',
3 => Array('s_hp','s_ad','f_heal','c3_pitchpow','c3_enchant','c3_potential','c3_hawkeye','c3_offset','c3_numerous'), #'灌篮高手', 3 => Array('s_hp','s_ad','f_heal','c3_pitchpow','c3_enchant','c3_potential','c3_hawkeye','c3_offset','c3_numerous'), #'灌篮高手',
4 => Array('s_hp','s_ad','f_heal','c4_stable','c4_break','c4_aiming','c4_loot','c4_roar','c4_sniper','c4_headshot'), #'狙击鹰眼', 4 => Array('s_hp','s_ad','f_heal','c4_stable','c4_break','c4_aiming','c4_loot','c4_roar','c4_sniper','c4_headshot'), #'狙击鹰眼',
5 => Array('s_hp','s_ad','f_heal'), 5 => Array('s_hp','s_ad','f_heal','c5_sneak','c5_caution','c5_review','c5_focus','c5_higheg','c5_double'), #'拆弹专家',
//5 => Array('s_hp','s_ad','f_heal','c5_sneak','c5_caution','c5_review','c5_focus','c5_higheg','c5_double'), #'拆弹专家',
6 => Array('s_hp','s_ad','f_heal'), #'宛如疾风', 6 => Array('s_hp','s_ad','f_heal'), #'宛如疾风',
7 => Array('s_hp','s_ad','f_heal'), #'锡安成员', 7 => Array('s_hp','s_ad','f_heal'), #'锡安成员',
8 => Array('s_hp','s_ad','f_heal'), #'黑衣组织', 8 => Array('s_hp','s_ad','f_heal'), #'黑衣组织',
...@@ -147,7 +146,9 @@ $cskills = Array ...@@ -147,7 +146,9 @@ $cskills = Array
'trans' => 40, //效&防转化率 'trans' => 40, //效&防转化率
'maxtrans' => 2000, //转化上限 'maxtrans' => 2000, //转化上限
), ),
'lockdesc' => '武器不适用,持<span class="yellow">殴系武器</span>时生效', 'lockdesc' => Array(
'wepk+wep_kind' => '武器不适用,持<span class="yellow">殴系武器</span>时生效',
),
'unlock' => Array( 'unlock' => Array(
'wepk+wep_kind' => "[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'", 'wepk+wep_kind' => "[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'",
), ),
...@@ -174,7 +175,9 @@ $cskills = Array ...@@ -174,7 +175,9 @@ $cskills = Array
'stuntime' => Array(1,1,2), //晕眩时间(单位:秒) 'stuntime' => Array(1,1,2), //晕眩时间(单位:秒)
'rate' => 25, //触发率 'rate' => 25, //触发率
), ),
'lockdesc' => '武器不适用,持<span class="yellow">殴系武器</span>时可发动', 'lockdesc' => Array(
'wepk+wep_kind' => '武器不适用,持<span class="yellow">殴系武器</span>时生效',
),
'unlock' => Array( 'unlock' => Array(
'wepk+wep_kind' => "[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'", 'wepk+wep_kind' => "[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'",
), ),
...@@ -243,9 +246,8 @@ $cskills = Array ...@@ -243,9 +246,8 @@ $cskills = Array
# 这是一个使用固定模板的技能 在这里进行编辑不会有任何效果……等等,还是有点效果的……编辑下面提供的内容是会有效果的 # 这是一个使用固定模板的技能 在这里进行编辑不会有任何效果……等等,还是有点效果的……编辑下面提供的内容是会有效果的
'name' => '百战', 'name' => '百战',
'tags' => Array('passive'), 'tags' => Array('passive'),
'vars' => Array( 'log' => "切换了「百战」的防御类型。",
'defkind' => Array('P','K','C','G','F','D','I','U','q','W','E'), //可选择的单系防御类型 'choice' => Array('P','K','C','G','F','D','I','U','q','W','E'), //可选择的单系防御类型
),
'svars' => Array( 'svars' => Array(
'choice' => '', //初始默认选择的单项防御 'choice' => '', //初始默认选择的单项防御
), ),
...@@ -266,7 +268,9 @@ $cskills = Array ...@@ -266,7 +268,9 @@ $cskills = Array
'wepimpr' => 0.5, //武器损耗率 'wepimpr' => 0.5, //武器损耗率
), ),
'pvars' => Array('lvl'), 'pvars' => Array('lvl'),
'lockdesc' => '武器不适用,持<span class="yellow">斩系武器</span>时可发动', 'lockdesc' => Array(
'wepk+wep_kind' => '武器不适用,持<span class="yellow">斩系武器</span>时可发动',
),
'unlock' => Array( 'unlock' => Array(
'wepk+wep_kind' => "[:wepk:] == 'WK' || [:wepk:] == 'WGK' || [:wepk:] == 'WKP' || [:wepk:] == 'WKF' || [:wepk:] == 'WFK' || [:wep_kind:] == 'K'", 'wepk+wep_kind' => "[:wepk:] == 'WK' || [:wepk:] == 'WGK' || [:wepk:] == 'WKP' || [:wepk:] == 'WKF' || [:wepk:] == 'WFK' || [:wep_kind:] == 'K'",
), ),
...@@ -411,7 +415,9 @@ $cskills = Array ...@@ -411,7 +415,9 @@ $cskills = Array
'vars' => Array( 'vars' => Array(
'countergain' => Array(0,20,40,60,80,100,125), 'countergain' => Array(0,20,40,60,80,100,125),
), ),
'lockdesc' => '武器不适用,持<span class="yellow">投系武器</span>时生效', 'lockdesc' => Array(
'wepk+wep_kind' => '武器不适用,持<span class="yellow">投系武器</span>时生效',
),
'unlock' => Array( 'unlock' => Array(
'wepk+wep_kind' => "[:wepk:] == 'WC' || [:wepk:] == 'WCF' || [:wepk:] == 'WCP' || [:wep_kind:] == 'C'", 'wepk+wep_kind' => "[:wepk:] == 'WC' || [:wepk:] == 'WCF' || [:wepk:] == 'WCP' || [:wep_kind:] == 'C'",
), ),
...@@ -582,7 +588,9 @@ $cskills = Array ...@@ -582,7 +588,9 @@ $cskills = Array
'accgain' => Array(0,2,4,6,8,10,12), //命中增益 'accgain' => Array(0,2,4,6,8,10,12), //命中增益
'rbgain' => Array(0,2,4,6,8,10,12), //连击命中惩罚降低 'rbgain' => Array(0,2,4,6,8,10,12), //连击命中惩罚降低
), ),
'lockdesc' => '武器不适用,持<span class="yellow">射系武器</span>或<span class="yellow">重型枪械</span>时生效', 'lockdesc' => Array(
'wepk+wep_kind' => '武器不适用,持<span class="yellow">射系武器</span>或<span class="yellow">重型枪械</span>时生效',
),
'unlock' => Array( 'unlock' => Array(
'wepk+wep_kind' => "[:wepk:] == 'WG' || [:wepk:] == 'WJ' || [:wepk:] == 'WGK' || [:wepk:] == 'WDG' || [:wep_kind:] == 'G' || [:wep_kind:] == 'J'", 'wepk+wep_kind' => "[:wepk:] == 'WG' || [:wepk:] == 'WJ' || [:wepk:] == 'WGK' || [:wepk:] == 'WDG' || [:wep_kind:] == 'G' || [:wep_kind:] == 'J'",
), ),
...@@ -613,7 +621,9 @@ $cskills = Array ...@@ -613,7 +621,9 @@ $cskills = Array
'inftfix' => Array(0,1,2,4), //额外耐久削减 'inftfix' => Array(0,1,2,4), //额外耐久削减
'infdmgr' => Array(0,10,20,30), //每处致伤提高最终伤害 'infdmgr' => Array(0,10,20,30), //每处致伤提高最终伤害
), ),
'lockdesc' => '武器不适用,持<span class="yellow">射系武器</span>或<span class="yellow">重型枪械</span>时生效', 'lockdesc' => Array(
'wepk+wep_kind' => '武器不适用,持<span class="yellow">射系武器</span>或<span class="yellow">重型枪械</span>时生效',
),
'unlock' => Array( 'unlock' => Array(
'wepk+wep_kind' => "[:wepk:] == 'WG' || [:wepk:] == 'WJ' || [:wepk:] == 'WGK' || [:wepk:] == 'WDG' || [:wep_kind:] == 'G' || [:wep_kind:] == 'J'", 'wepk+wep_kind' => "[:wepk:] == 'WG' || [:wepk:] == 'WJ' || [:wepk:] == 'WGK' || [:wepk:] == 'WDG' || [:wep_kind:] == 'G' || [:wep_kind:] == 'J'",
), ),
...@@ -774,7 +784,7 @@ $cskills = Array ...@@ -774,7 +784,7 @@ $cskills = Array
( (
'name' => '反思', 'name' => '反思',
'tags' => Array('passive'), 'tags' => Array('passive'),
'desc' => '使用爆系武器时,<br>即使攻击没有命中,也可以获得[:expgain:]点经验值', 'desc' => "使用爆系武器时,<br>即使攻击没有命中,也可以获得[:expgain:]点固定经验值",
'vars' => Array( 'vars' => Array(
'expgain' => 1, 'expgain' => 1,
), ),
...@@ -789,7 +799,9 @@ $cskills = Array ...@@ -789,7 +799,9 @@ $cskills = Array
( (
'name' => '专注', 'name' => '专注',
'tags' => Array('passive'), 'tags' => Array('passive'),
'desc' => '你可随意于下列三个状态间切换:', 'desc' => "你可随意于下列三个状态间切换:",
'log' => "切换了「专注」的状态。",
'choice' => Array(0,1,2), //无效果/重视遇敌/重视探物
'svars' => Array( 'svars' => Array(
'choice' => 0, 'choice' => 0,
), ),
...@@ -808,9 +820,9 @@ $cskills = Array ...@@ -808,9 +820,9 @@ $cskills = Array
( (
'name' => '高能', 'name' => '高能',
'tags' => Array('battle'), 'tags' => Array('battle'),
'desc' => '本次攻击中爆炸属性伤害无视一切加成减成<br> 'desc' => '本次攻击中爆炸属性伤害无视一切增益减益效果,<br>
使用爆系武器方可发动,消耗<span class="yellow">[:ragecost:]</span>点怒气。', 使用爆系武器方可发动,消耗<span class="yellow">[:ragecost:]</span>点怒气。',
'bdesc' => '本次攻击中爆炸属性伤害无视一切加成减成;消耗<span class="red">[:ragecost:]</span>怒气', 'bdesc' => '本次攻击中爆炸属性伤害无视一切增益减益效果;消耗<span class="red">[:ragecost:]</span>怒气',
'vars' => Array( 'vars' => Array(
'ragecost' => 40, 'ragecost' => 40,
), ),
...@@ -841,7 +853,7 @@ $cskills = Array ...@@ -841,7 +853,7 @@ $cskills = Array
'skillpara|c5_double-active_t', 'skillpara|c5_double-active_t',
), ),
'lockdesc' => Array( 'lockdesc' => Array(
'skillpara|c5_double-active_t' => '已无法发动该技能', 'skillpara|c5_double-active_t' => '次数耗尽,已无法发动该技能',
'lvl' => '19级时解锁', 'lvl' => '19级时解锁',
'wepk+wep_kind' => '武器不适用,持<span class="yellow">爆系武器</span>时生效', 'wepk+wep_kind' => '武器不适用,持<span class="yellow">爆系武器</span>时生效',
), ),
......
...@@ -292,119 +292,20 @@ function init_battle($ismeet = 0){ ...@@ -292,119 +292,20 @@ function init_battle($ismeet = 0){
return; return;
} }
function init_rev_battle($ismeet = 0) function init_battle_rev($pa,$pd,$ismeet=0)
{ {
global $fog,$hpinfo,$spinfo,$rageinfo,$wepeinfo,$typeinfo,$sexinfo,$infinfo; global $sdata,$tdata,$battle_title,$hpcolor;
$ui_data = Array('hpstate','spstate','ragestate','wepestate','wepk_words','wep_words','infdata','iconImg','iconImgB','sNoinfo'); include_once GAME_ROOT.'./include/init.func.php';
$init_data = update_db_player_structure(); //初始化头像显示
foreach(Array('w_','s_') as $p) init_icon_states($pa,$ismeet); init_icon_states($pd,$ismeet);
{ //初始化状态显示
foreach ($init_data as $i) init_hp_states($pa,$ismeet); init_hp_states($pd,$ismeet);
{ //初始化武器信息
global ${$p.$i}; init_wep_states($pa,$ismeet); init_wep_states($pd,$ismeet);
} //初始化异常状态信息
foreach($ui_data as $u) init_inf_states($pa,$ismeet); init_inf_states($pd,$ismeet);
{ //传参
global ${$p.$u}; $sdata = $pa; $tdata = $pd;
}
//更新血量、体力、怒气显示
if(${$p.'hp'} <= 0)
{
${$p.'hpstate'} = "<span class=\"red\">$hpinfo[3]</span>";
${$p.'spstate'} = "<span class=\"red\">$spinfo[3]</span>";
${$p.'ragestate'} = "<span class=\"red\">$rageinfo[3]</span>";
}
else
{
if(${$p.'hp'} < ${$p.'mhp'}*0.2) {
${$p.'hpstate'} = "<span class=\"red\">$hpinfo[2]</span>";
} elseif(${$p.'hp'} < ${$p.'mhp'}*0.5) {
${$p.'hpstate'} = "<span class=\"yellow\">$hpinfo[1]</span>";
} else {
${$p.'hpstate'} = "<span class=\"clan\">$hpinfo[0]</span>";
}
if(${$p.'sp'} < ${$p.'msp'}*0.2) {
${$p.'spstate'} = "$spinfo[2]";
} elseif(${$p.'sp'} < ${$p.'msp'}*0.5) {
${$p.'spstate'} = "$spinfo[1]";
} else {
${$p.'spstate'} = "$spinfo[0]";
}
if(${$p.'rage'} >= 100) {
${$p.'ragestate'} = "<span class=\"red\">$rageinfo[2]</span>";
} elseif(${$p.'rage'} >= 30) {
${$p.'ragestate'} = "<span class=\"yellow\">$rageinfo[1]</span>";
} else {
${$p.'ragestate'} = "$rageinfo[0]";
}
}
//更新武器效果情报
switch(${$p.'wepe'})
{
case ${$p.'wepe'}>= 400:
${$p.'wepestate'} = "$wepeinfo[3]";
break;
case ${$p.'wepe'}>= 200:
${$p.'wepestate'} = "$wepeinfo[2]";
break;
case ${$p.'wepe'}>= 60:
${$p.'wepestate'} = "$wepeinfo[1]";
break;
default :
${$p.'wepestate'} = "$wepeinfo[0]";
}
//更新武器名、武器类别情报
${$p.'wep_words'} = parse_info_desc(${$p.'wep'},'m');
${$p.'wepk_words'} = parse_info_desc(${$p.'wepk'},'k');
//更新编号情报
${$p.'sNoinfo'} = $typeinfo[${$p.'type'}]."(".$sexinfo[${$p.'gd'}].${$p.'sNo'}."号)";
//更新头像情报
$itype = ${$p.'type'} > 0 ? 'n' : ${$p.'gd'};
$iname = $itype.'_'.${$p.'icon'};
if(file_exists('img/'.$iname.'a.gif'))
{
${$p.'iconImgB'}= $iname.'a.gif';
}
else
{
${$p.'iconImg'} = $iname.'.gif';
unset(${$p.'iconImgB'});
}
//更新受伤状态
if(${$p.'inf'})
{
${$p.'infdata'} = '';
foreach ($infinfo as $inf_ky => $inf_nm)
{
if(strpos(${$p.'inf'},$inf_ky) !== false) ${$p.'infdata'} .= $inf_nm;
}
}
else
{
${$p.'infdata'} = '';
}
}
if($fog && !$ismeet)
{
//雾天显示???
$w_wep_words = '???';
$w_wepk_words = '???';
$w_sNoinfo = '???';
$w_iconImg = 'question.gif';
$w_iconImgB = '';
$w_name = '???';
$w_wep = '???';
$w_infdata = '???';
$w_pose = -1;
$w_tactic = -1;
$w_lvl = '?';
$w_hpstate = '???';
$w_spstate = '???';
$w_ragestate = '???';
$w_wepestate = '???';
$w_wepk = '';
}
return;
} }
function init_bgm($force_update=0) function init_bgm($force_update=0)
...@@ -412,6 +313,7 @@ function init_bgm($force_update=0) ...@@ -412,6 +313,7 @@ function init_bgm($force_update=0)
global $pls,$command,$clbpara,$gamecfg,$bgmname; global $pls,$command,$clbpara,$gamecfg,$bgmname;
global $default_volume,$event_bgm,$pls_bgm,$parea_bgm,$regular_bgm,$bgmbook,$bgmlist; global $default_volume,$event_bgm,$pls_bgm,$parea_bgm,$regular_bgm,$bgmbook,$bgmlist;
//include config('audio',$gamecfg); //include config('audio',$gamecfg);
$clbpara = get_clbpara($clbpara);
# 初始化 # 初始化
$event_flag = 0; $event_flag = 0;
...@@ -551,6 +453,7 @@ function init_mapdata(){ ...@@ -551,6 +453,7 @@ function init_mapdata(){
function init_clubskillsdata($sk,$data) function init_clubskillsdata($sk,$data)
{ {
global $cskills;
$sk_dir = 'skill_'.$sk; $sk_dir = 'skill_'.$sk;
# 本地存在对应的技能模板,返回模板 # 本地存在对应的技能模板,返回模板
if(file_exists(GAME_ROOT."./templates/default/".$sk_dir.".htm")) if(file_exists(GAME_ROOT."./templates/default/".$sk_dir.".htm"))
...@@ -558,10 +461,10 @@ function init_clubskillsdata($sk,$data) ...@@ -558,10 +461,10 @@ function init_clubskillsdata($sk,$data)
return Array($sk_dir); return Array($sk_dir);
} }
# 本地不存在模板,按照预设信息生成一个 # 本地不存在模板,按照预设信息生成一个
else elseif(array_key_exists($sk,$cskills))
{ {
//include_once GAME_ROOT.'./include/game/revclubskills.func.php'; return $sk;
global $cskills; /*global $cskills;
# 要检查的技能没有登记过 视为无效技能 # 要检查的技能没有登记过 视为无效技能
if(!array_key_exists($sk,$cskills)) return 0; if(!array_key_exists($sk,$cskills)) return 0;
if(!empty($data)) $data['clbpara'] = get_clbpara($data['clbpara']); if(!empty($data)) $data['clbpara'] = get_clbpara($data['clbpara']);
...@@ -638,13 +541,7 @@ EOT; ...@@ -638,13 +541,7 @@ EOT;
<table class="skilltable"> <table class="skilltable">
<tr> <tr>
EOT; EOT;
$sk_temp .= "<td valign=\"center\" align=\"center\"><span class=\"yellow\">{$unlock_flag}</span></td>"; $sk_temp .= "<td valign=\"center\" align=\"center\"><span class=\"yellow\">{$unlock_flag}</span></td>";
/*$sk_temp .= <<<EOT
</tr>
</table>
</div>
</div>
EOT;*/
$sk_temp .= " $sk_temp .= "
</tr> </tr>
</table> </table>
...@@ -655,7 +552,7 @@ EOT;*/ ...@@ -655,7 +552,7 @@ EOT;*/
//$htm_sk_dir = GAME_ROOT.TPLDIR.'/'.$sk_dir.'.htm'; //$htm_sk_dir = GAME_ROOT.TPLDIR.'/'.$sk_dir.'.htm';
//writeover($htm_sk_dir,$sk_temp); //writeover($htm_sk_dir,$sk_temp);
//return $sk_dir; //return $sk_dir;
return $sk_temp; return $sk_temp;*/
} }
return 0; return 0;
} }
......
...@@ -1807,8 +1807,6 @@ function check_misc_achievement_rev(&$pa) ...@@ -1807,8 +1807,6 @@ function check_misc_achievement_rev(&$pa)
// 旧版成就参数兼容 // 旧版成就参数兼容
$is_player = $pa['type'] ? 0 : 1; $is_player = $pa['type'] ? 0 : 1;
$nn = $pa['name']; $nn = $pa['name'];
// 判断是否为活跃玩家:暂时只要IP不一样就算活跃玩家
$is_tplayer = $pa['ip'] == $pd['ip'] ? 0 : 1;
# 防呆:只会检查玩家成就完成情况 # 防呆:只会检查玩家成就完成情况
if ($is_player) if ($is_player)
......
...@@ -78,13 +78,14 @@ function findteam(&$w_pdata){ ...@@ -78,13 +78,14 @@ function findteam(&$w_pdata){
} }
function findcorpse(&$w_pdata){ function findcorpse(&$w_pdata){
global $log,$mode,$main,$battle_title,$cmd,$iteminfo,$itemspkinfo; global $log,$mode,$main,$battle_title,$cmd,$iteminfo,$itemspkinfo,$pdata;
global $w_type,$w_name,$w_gd,$w_sNo,$w_icon,$w_hp,$w_mhp,$w_wep,$w_wepk,$w_wepe,$w_lvl,$w_pose,$w_tactic,$w_inf,$w_rp;//,$itmsk0; global $w_type,$w_name,$w_gd,$w_sNo,$w_icon,$w_hp,$w_mhp,$w_wep,$w_wepk,$w_wepe,$w_lvl,$w_pose,$w_tactic,$w_inf,$w_rp;//,$itmsk0;
global $club,$clbpara,$allow_destory_corpse,$no_destory_corpse_type; global $club,$clbpara,$allow_destory_corpse,$no_destory_corpse_type;
$battle_title = '发现尸体'; $battle_title = '发现尸体';
extract($w_pdata,EXTR_PREFIX_ALL,'w'); extract($w_pdata,EXTR_PREFIX_ALL,'w');
init_battle(1); //init_battle(1);
init_battle_rev($pdata,$w_pdata,1);
if (CURSCRIPT == 'botservice') if (CURSCRIPT == 'botservice')
{ {
...@@ -110,7 +111,7 @@ function findcorpse(&$w_pdata){ ...@@ -110,7 +111,7 @@ function findcorpse(&$w_pdata){
} }
else else
{ {
$main = 'battle'; $main = 'battle_rev';
$log .= '你发现了<span class="red">'.$w_name.'</span>的尸体!<br>'; $log .= '你发现了<span class="red">'.$w_name.'</span>的尸体!<br>';
// 初始化尸体tooltip // 初始化尸体tooltip
...@@ -160,7 +161,6 @@ function findcorpse(&$w_pdata){ ...@@ -160,7 +161,6 @@ function findcorpse(&$w_pdata){
if(in_array($w_type,$can_lootdepot_type)) $loot_depot_flag = depot_getlist($w_name,$w_type) ? 1 : 0; if(in_array($w_type,$can_lootdepot_type)) $loot_depot_flag = depot_getlist($w_name,$w_type) ? 1 : 0;
// 初始化抡尸数据 // 初始化抡尸数据
global $pdata;
$cstick_flag = 0; $cstick_flag = 0;
if(!check_skill_unlock('tl_cstick',$pdata) && !check_skill_cost('tl_cstick',$pdata)) $cstick_flag = in_array($w_type,get_skillvars('tl_cstick','notype')) ? 0 : 1; if(!check_skill_unlock('tl_cstick',$pdata) && !check_skill_cost('tl_cstick',$pdata)) $cstick_flag = in_array($w_type,get_skillvars('tl_cstick','notype')) ? 0 : 1;
......
...@@ -64,6 +64,7 @@ function itemuse($itmn) { ...@@ -64,6 +64,7 @@ function itemuse($itmn) {
$noeqp = ''; $noeqp = '';
} }
global ${$eqp}, ${$eqp.'k'}, ${$eqp.'e'}, ${$eqp.'s'}, ${$eqp.'sk'}; global ${$eqp}, ${$eqp.'k'}, ${$eqp.'e'}, ${$eqp.'s'}, ${$eqp.'sk'};
global $artk;
if((($artk=='XX')||($artk=='XY'))&&($eqp == 'art')){ if((($artk=='XX')||($artk=='XY'))&&($eqp == 'art')){
$log .= '你的饰品不能替换!<br>'; $log .= '你的饰品不能替换!<br>';
$mode = 'command'; $mode = 'command';
......
This diff is collapsed.
...@@ -1242,7 +1242,6 @@ ...@@ -1242,7 +1242,6 @@
$pd['ex_def_flag'] = 0; $pd['ex_def_flag'] = 0;
$log .= "{$pa['nm']}的攻击无视了{$pd['nm']}的属性伤害减半效果!<br>"; $log .= "{$pa['nm']}的攻击无视了{$pd['nm']}的属性伤害减半效果!<br>";
} }
return; return;
} }
...@@ -1267,64 +1266,77 @@ ...@@ -1267,64 +1266,77 @@
foreach($pa['ex_attack_keys'] as $ex) foreach($pa['ex_attack_keys'] as $ex)
{ {
$dmginf = ''; $pa['ex_dmgpsh_log'] = '';$pa['ex_dmginf_log'] = ''; $pa['ex_dmgdef_log'] = '';
//计算单个属性的基础属性伤害: 基础伤害 + 效果↔伤害系数修正 + 熟练↔伤害系数修正 //计算单个属性的基础属性伤害: 基础伤害 + 效果↔伤害系数修正 + 熟练↔伤害系数修正
$ex_dmg = $ex_base_dmg[$ex] + $pa['wepe']/$ex_wep_dmg[$ex] + $pa['wep_skill']/$ex_skill_dmg[$ex]; $ex_dmg = $ex_base_dmg[$ex] + $pa['wepe']/$ex_wep_dmg[$ex] + $pa['wep_skill']/$ex_skill_dmg[$ex];
//计算社团技能对单个属性基础伤害的系数补正
$ex_dmg *= get_clbskill_ex_base_dmg_r($pa,$pd,$active,$ex);
//计算社团技能对单个属性基础伤害的补正
$ex_dmg += get_clbskill_ex_base_dmg_fix($pa,$pd,$active,$ex);
//计算单个属性能造成的基础伤害上限 //计算单个属性能造成的基础伤害上限
if($ex_max_dmg[$ex]>0 && $ex_dmg>$ex_max_dmg[$ex]) $ex_dmg = $ex_max_dmg[$ex]; if($ex_max_dmg[$ex]>0 && $ex_dmg>$ex_max_dmg[$ex]) $ex_dmg = $ex_max_dmg[$ex];
//计算得意武器类型对单个属性伤害的系数修正
//计算得意武器类型修正
if(isset($ex_good_wep[$ex]) && $ex_good_wep[$ex] == $pa['wep_kind']) $ex_dmg *= 2; if(isset($ex_good_wep[$ex]) && $ex_good_wep[$ex] == $pa['wep_kind']) $ex_dmg *= 2;
//计算已经进入的异常状态对属性攻击伤害的影响
if(isset($ex_inf[$ex]) && strpos($pd['inf'],$ex_inf[$ex])!==false && isset($ex_inf_punish[$ex]))
{
$ex_dmg *= $ex_inf_punish[$ex];
$log .= "由于{$pd['nm']}已经{$exdmginf[$ex_inf[$ex]]}{$exdmgname[$ex]}的伤害";
$log .= $ex_inf_punish[$ex]>1 ? "增加了!" : "减少了!";
}
//计算属性伤害浮动 //计算属性伤害浮动
$ex_dmg = round($ex_dmg * rand(100-$ex_dmg_fluc[$ex],100+$ex_dmg_fluc[$ex])/100); $ex_dmg = round($ex_dmg * rand(100-$ex_dmg_fluc[$ex],100+$ex_dmg_fluc[$ex])/100);
//计算单个属性的属性伤害变化:
//计算属性伤害是否被防御 $ex_dmg = get_ex_base_dmg_p($pa,$pd,$active,$ex,$ex_dmg);
$log.=$exdmgname[$ex]; //计算是否能够施加属性异常
if(!empty($pd['ex_def_flag']) && ($pd['ex_def_flag'] == 1 || (is_array($pd['ex_def_flag']) && in_array($ex,$pd['ex_def_flag'])))) if(empty($pd['ex_def_flag']) && isset($ex_inf[$ex]) && strpos($pd['inf'],$ex_inf[$ex])===false)
{ {
$ex_dmg = round($ex_dmg*0.5); $dice = diceroll(99);
$log .="被防御效果抵消了!仅"; //获取属性施加异常的基础概率 + 熟练度修正
} $e_htr = $ex_inf_r[$ex] + $pa['wep_skill']*$ex_skill_inf_r[$ex];
else //获取属性施加异常率的基础上限
{ $e_htr = min($e_htr,$ex_max_inf_r[$ex]);
//计算是否施加属性异常 //获取属性施加异常概率的社团修正
if (isset($ex_inf[$ex]) && strpos($pd['inf'],$ex_inf[$ex])===false) if(isset($ex_good_club[$ex]) && $ex_good_club[$ex] == $pd['club']) $e_htr += 20;
//施加异常
if ($dice < $e_htr)
{ {
$dice = diceroll(99); $pa['ex_dmginf_log'] = $ex_inf[$ex];
//获取属性施加异常的基础概率 + 熟练度修正 $pd['inf'] .= $pa['ex_dmginf_log'];
$e_htr = $ex_inf_r[$ex] + $pa['wep_skill']*$ex_skill_inf_r[$ex]; addnews($now,'inf',$pa['name'],$pd['name'],$pa['ex_dmginf_log']);
//获取属性施加异常率的基础上限
$e_htr = min($e_htr,$ex_max_inf_r[$ex]);
//获取属性施加异常概率的社团修正
if(isset($ex_good_club[$ex]) && $ex_good_club[$ex] == $pd['club']) $e_htr += 20;
//施加异常
if ($dice < $e_htr)
{
$dmginf = $ex_inf[$ex];
$pd['inf'] .= $dmginf;
addnews($now,'inf',$pa['name'],$pd['name'],$dmginf);
}
} }
} }
//整理后统一输出文本
if(!empty($pa['ex_dmgpsh_log'])) $log .= $pa['ex_dmgpsh_log']; //由于对方已经xx xx伤害提升/降低
$log .= $exdmgname[$ex]; //xx
if(!empty($pa['ex_dmgdef_log'])) $log .= "被防御效果抵消了!仅";
$log .= "造成了<span class=\"red\">{$ex_dmg}</span>点伤害!"; $log .= "造成了<span class=\"red\">{$ex_dmg}</span>点伤害!";
if(!empty($dmginf)) $log .= "并造成{$pd['name']}{$exdmginf[$dmginf]}了!"; if(!empty($pa['ex_dmginf_log'])) $log .= "并使{$pd['name']}{$exdmginf[$pa['ex_dmginf_log']]}了!";
$log .= "<br>"; $log .= "<br>";
$total_ex_dmg[] = $ex_dmg; $total_ex_dmg[] = $ex_dmg;
} }
return $total_ex_dmg; return $total_ex_dmg;
} }
//计算单个属性伤害系数变化
function get_ex_base_dmg_p(&$pa,&$pd,$active,$ex,$ex_dmg)
{
global $ex_good_wep,$ex_inf,$ex_inf_punish,$log;
# 「高能」效果判定:
if(isset($pa['bskill_c5_higheg']) && $ex == 'd')
{
$log.="<span class='yellow'>「高能」使{$pa['nm']}造成的爆炸伤害不受影响!</span><br>";
return $ex_dmg;
}
//计算社团技能对单个属性伤害的系数补正
$ex_dmg *= get_clbskill_ex_base_dmg_r($pa,$pd,$active,$ex);
//计算社团技能对单个属性伤害的补正
$ex_dmg += get_clbskill_ex_base_dmg_fix($pa,$pd,$active,$ex);
//计算已经进入的异常状态对属性攻击伤害的影响
if(isset($ex_inf[$ex]) && strpos($pd['inf'],$ex_inf[$ex])!==false && isset($ex_inf_punish[$ex]))
{
$ex_dmg *= $ex_inf_punish[$ex];
$pa['ex_dmgpsh_log'] .= "由于{$pd['nm']}已经{$exdmginf[$ex_inf[$ex]]}{$exdmgname[$ex]}的伤害";
$pa['ex_dmgpsh_log'] .= $ex_inf_punish[$ex]>1 ? "增加了!" : "减少了!";
}
//计算属性伤害是否被防御
if(!empty($pd['ex_def_flag']) && ($pd['ex_def_flag'] == 1 || (is_array($pd['ex_def_flag']) && in_array($ex,$pd['ex_def_flag']))))
{
$ex_dmg = round($ex_dmg*0.5);
$pa['ex_dmgdef_log'] = 1;
}
return $ex_dmg;
}
//计算属性总伤害加成 //计算属性总伤害加成
function get_ex_dmg_p(&$pa,&$pd,$active) function get_ex_dmg_p(&$pa,&$pd,$active)
{ {
...@@ -1633,10 +1645,44 @@ ...@@ -1633,10 +1645,44 @@
# 受到眩晕效果 # 受到眩晕效果
} }
// 获取pa在探索时的遇敌率(遇敌率越低道具发现率越高)
function calc_meetman_rate(&$pa)
{
global $gamestate;
# 基础遇敌率
$enemyrate = 40;
# 连斗阶段遇敌率+20
if($gamestate == 40){$enemyrate += 20;}
# 死斗阶段遇敌率+40
elseif($gamestate == 50){$enemyrate += 40;}
# 姿态修正
if($pa['pose'] == 3) {$enemyrate -= 20;}
elseif($pa['pose'] ==4){$enemyrate += 10;}
# 社团技能修正(新)
# 「专注」效果判定
if(!empty($pa['clbpara']['skill']) && !check_skill_unlock('c5_focus',$pa))
{
# 探人模式遇敌率提升
if(get_skillpara('c5_focus','choice',$pa['clbpara']) == 1)
{
$sk_var = get_skillvars('c5_focus','meetgain');
$enemyrate += $sk_var;
}
# 探物模式遇敌率降低
elseif(get_skillpara('c5_focus','choice',$pa['clbpara']) == 2)
{
$sk_var = get_skillvars('c5_focus','itmgain');
$enemyrate -= $sk_var;
}
}
return $enemyrate;
}
// 获取pd面对pa时的躲避率 // 获取pd面对pa时的躲避率
function get_hide_r_rev(&$pa,&$pd,$mode=0) function get_hide_r_rev(&$pa,&$pd,$mode=0)
{ {
global $weather_hide_r,$pls_hide_modifier,$pose_hide_modifier,$tactic_hide_modifier; global $weather,$weather_hide_r,$pls_hide_modifier,$pose_hide_modifier,$tactic_hide_modifier;
# 获取基础躲避率 # 获取基础躲避率
$hide_r = 0; $hide_r = 0;
...@@ -1650,7 +1696,7 @@ ...@@ -1650,7 +1696,7 @@
# 计算pd策略对于躲避率的修正: # 计算pd策略对于躲避率的修正:
$tac_r = $tactic_hide_modifier[$pd['tactic']] ?: 0; $tac_r = $tactic_hide_modifier[$pd['tactic']] ?: 0;
# 基础汇总: # 基础汇总:
$hide_r += $wth_ar + $pose_r + $tac_r; $hide_r += $wth_r + $pose_r + $tac_r;
include_once GAME_ROOT.'./include/game/clubskills.func.php'; include_once GAME_ROOT.'./include/game/clubskills.func.php';
# 计算社团技能对躲避率的系数修正(旧): # 计算社团技能对躲避率的系数修正(旧):
...@@ -1866,4 +1912,19 @@ ...@@ -1866,4 +1912,19 @@
if(isset($pd['clbpara']['battle_turns'])) unset($pd['clbpara']['battle_turns']); if(isset($pd['clbpara']['battle_turns'])) unset($pd['clbpara']['battle_turns']);
return; return;
} }
//检查是否循环打击流程
function check_loop_rev_attack(&$pa,&$pd,$active)
{
global $log;
$loop = 0;
#「双响」效果判定
if(isset($pa['bskill_c5_double']))
{
unset($pa['bskill_c5_double']);
$log .= "<span class=\"yellow\">{$pa['nm']}引爆了预埋的另一组爆炸物!</span><br>";
$loop = 1;
}
return $loop;
}
?> ?>
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# 技能判定(主动型) # 技能判定(主动型)
function attr_extra_active_skills(&$pa,&$pd,$active,$sk='') function attr_extra_active_skills(&$pa,&$pd,$active,$sk='')
{ {
global $log,$cskills; global $log,$cskills,$now;
# 检查主动技合法性 # 检查主动技合法性
if(isset($pa['bskill'])) if(isset($pa['bskill']))
{ {
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
# 成功释放主动技,应用标记 # 成功释放主动技,应用标记
$pa['bskill_'.$bsk] = 1; $pa['bskill_'.$bsk] = 1;
$log .= "<span class=\"lime\">{$pa['nm']}{$pd['nm']}发动了技能「{$bsk_name}」!</span><br>"; $log .= "<span class=\"lime\">{$pa['nm']}{$pd['nm']}发动了技能「{$bsk_name}」!</span><br>";
# 限次技每次使用时次数+1
if(get_skilltags($bsk,'limit'))
{
set_skillpara($bsk,'active_t',get_skillpara($bsk,'active_t',$pa['clbpara'])+1,$pa['clbpara']);
}
# 检查是否需要addnews # 检查是否需要addnews
addnews($now,'bsk_'.$bsk,$pa['name'],$pd['name']); addnews($now,'bsk_'.$bsk,$pa['name'],$pd['name']);
# 检查是否需要进行logsave # 检查是否需要进行logsave
......
...@@ -4,114 +4,41 @@ ...@@ -4,114 +4,41 @@
exit('Access Denied'); exit('Access Denied');
} }
//战斗中切换武器
function change_wep_in_battle($s=2)
{
global $log,$nosta;
global $wep,$wepk,$wepe,$weps,$wepsk;
global $wep2,$wep2k,$wep2e,$wep2s,$wep2sk;
# 初始化主武器名
$eqp = 'wep';
# 初始化副武器名
$seqp = 'wep'.$s;
$seqpk = $seqp.'k';
$seqpe = $seqp.'e';
$seqps = $seqp.'s';
$seqpsk = $seqp.'sk';
# 保存副武器数据
$swep=${$seqp}; $swepk=${$seqpk};
$swepe=${$seqpe}; $sweps=${$seqps}; $swepsk=${$seqpsk};
# 主武器为空、副武器不为空的情况下,直接替换为副武器
if(($wepk == 'WN' || !$weps) && ($swepk != 'WN'))
{
${$eqp} = $swep; ${$seqp} = '拳头';
${$eqp.'k'} = $swepk; ${$seqpk} = 'WN';
${$eqp.'e'} = $swepe; ${$seqpe} = 0;
${$eqp.'s'} = $sweps; ${$seqps} = $nosta;
${$eqp.'sk'} = $swepsk; ${$seqpsk} = '';
$log.="你将{$wep}拿在了手上。<br>";
}
# 主武器不为空的情况下,副武器替换为主武器
elseif($wepk != 'WN')
{
${$seqp} = ${$eqp}; ${$eqp} = $swep;
${$seqpk} = ${$eqp.'k'}; ${$eqp.'k'} = $swepk;
${$seqpe} = ${$eqp.'e'}; ${$eqp.'e'} = $swepe;
${$seqps} = ${$eqp.'s'}; ${$eqp.'s'} = $sweps;
${$seqpsk} = ${$eqp.'sk'}; ${$eqp.'sk'} = $swepsk;
$log.="你将{$wep2}收了起来";
if($wepk != 'WN') $log .=",将{$wep}拿在了手上";
$log.="。<br>";
}
else
{
$log.="你没有装备副武器!去给自己找一个吧!<br>";
}
return;
}
//战斗中逃跑
function escape_from_enemy(&$pa,&$pd)
{
global $action,$clbpara,$chase_escape_obbs,$log;
//include_once GAME_ROOT.'./include/game/dice.func.php';
# 在受追击/鏖战状态下逃跑有概率失败
if(strpos($action,'pchase')===0 || strpos($action,'dfight')===0)
{
$escape_dice = diceroll(99);
if($escape_dice < $chase_escape_obbs)
{
$log .= "你尝试逃跑,但是敌人在你身后紧追不舍!<br>";
$pa['fail_escape'] = 1;
return 0;
}
}
$log .= "你逃跑了。";
$action = '';
unset($clbpara['battle_turns']);
return 1;
}
//发现敌人 //发现敌人
function findenemy_rev($edata) function findenemy_rev($edata)
{ {
global $db,$tablepre; global $db,$tablepre,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo,$nosta,$cskills;
global $fog,$pid,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo,$nosta,$cskills; global $fog,$pdata;
//获取并保存当前玩家数据
$sdata = current_player_save();
//格式化双方clbpara //格式化双方clbpara
$sdata['clbpara'] = get_clbpara($sdata['clbpara']); $edata['clbpara'] = get_clbpara($edata['clbpara']); $edata['clbpara'] = get_clbpara($edata['clbpara']);
//格式化对战双方数据
$init_data = update_db_player_structure(); //初始化战场标题
foreach(Array('w_','s_') as $p) $battle_title = init_battle_title($pdata,$edata);
{ //初始化遇敌log
foreach ($init_data as $i) global ${$p.$i}; $log .= init_battle_log($pdata,$edata);
} //检查是否为追击状态
extract($edata,EXTR_PREFIX_ALL,'w'); extract($sdata,EXTR_PREFIX_ALL,'s'); $ismeet = strpos($pdata['action'],'chase')!==false || strpos($pdata['action'],'dfight')!==false ? 1 : 0;
//初始化界面与log //初始化战斗界面
$battle_title = init_battle_title($sdata,$edata); init_battle_rev($pdata,$edata,$ismeet);
$log .= init_battle_log($sdata,$edata);
if(strpos($sdata['action'],'chase')!==false || strpos($sdata['action'],'dfight')!==false) init_rev_battle(1);
else init_rev_battle();
//检查是敌对或中立单位 //检查是敌对或中立单位
$neut_flag = $edata['pose'] == 7 ? 1 : 0; $neut_flag = $edata['pose'] == 7 ? 1 : 0;
//初始化玩家战斗技列表 //初始化玩家战斗技列表
if(!empty($sdata['clbpara']['skill'])) if(!empty($pdata['clbpara']['skill']))
{ {
$battle_skills = Array(); $battle_skills = Array();
$sk_nums = 0; $sk_nums = 0;
foreach($sdata['clbpara']['skill'] as $sk) foreach($pdata['clbpara']['skill'] as $sk)
{ {
//遍历玩家技能,寻找带有战斗技标签的技能 //遍历玩家技能,寻找带有战斗技标签的技能
if(get_skilltags($sk,'battle')) if(get_skilltags($sk,'battle'))
{ {
$sk_desc = ''; $sk_desc = '';
//先检查技能是否满足解锁条件 //先检查技能是否满足解锁条件
$unlock = check_skill_unlock($sk,$sdata); $unlock = check_skill_unlock($sk,$pdata);
if($unlock) if($unlock)
{ {
if(get_skilltags($sk,'unlock_battle_hidden')) continue; if(get_skilltags($sk,'unlock_battle_hidden')) continue;
...@@ -120,11 +47,11 @@ ...@@ -120,11 +47,11 @@
//再检查技能是否满足激活条件 //再检查技能是否满足激活条件
else else
{ {
$unlock = check_skill_cost($sk,$sdata); $unlock = check_skill_cost($sk,$pdata);
if($unlock) $sk_desc .= $unlock; if($unlock) $sk_desc .= $unlock;
} }
//技能可以使用,输出介绍文本 //技能可以使用,输出介绍文本
if(empty($sk_desc)) $sk_desc = parse_skilldesc($sk,$sdata,1); if(empty($sk_desc)) $sk_desc = parse_skilldesc($sk,$pdata,1);
//存入可使用战斗技队列,顺序:是否可使用、技能名、技能介绍文本 //存入可使用战斗技队列,顺序:是否可使用、技能名、技能介绍文本
$battle_skills[$sk_nums] = Array($unlock,$sk,$sk_desc); $battle_skills[$sk_nums] = Array($unlock,$sk,$sk_desc);
$sk_nums++; $sk_nums++;
...@@ -133,10 +60,10 @@ ...@@ -133,10 +60,10 @@
} }
//初始化玩家攻击方式信息 //初始化玩家攻击方式信息
$w1 = substr($s_wepk,1,1); $w1 = substr($pdata['wepk'],1,1);
$w2 = substr($s_wepk,2,1); $w2 = substr($pdata['wepk'],2,1);
if ($w2=='0'||$w2=='1') $w2=''; if ($w2=='0'||$w2=='1') $w2='';
if (($w1 == 'G'||$w1=='J')&&($s_weps==$nosta)) $w1 = 'P'; if (($w1 == 'G'||$w1=='J')&&($pdata['weps']==$nosta)) $w1 = 'P';
include template('battlecmd_rev'); include template('battlecmd_rev');
$cmd = ob_get_contents(); $cmd = ob_get_contents();
...@@ -148,31 +75,21 @@ ...@@ -148,31 +75,21 @@
//发现中立NPC $kind 0=中立单位 1=友军 //发现中立NPC $kind 0=中立单位 1=友军
function findneut(&$edata,$kind=0) function findneut(&$edata,$kind=0)
{ {
global $db,$tablepre; global $db,$tablepre,$pdata;
global $fog,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo; global $fog,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo;
$battle_title = $kind ? '发现朋友' : '发现敌人?'; $battle_title = $kind ? '发现朋友' : '发现敌人?';
//获取并保存当前玩家数据
$sdata = current_player_save();
//格式化双方clbpara //格式化双方clbpara
$sdata['clbpara'] = get_clbpara($sdata['clbpara']); $edata['clbpara'] = get_clbpara($edata['clbpara']); $pdata['clbpara'] = get_clbpara($pdata['clbpara']); $edata['clbpara'] = get_clbpara($edata['clbpara']);
//格式化双方数据 init_battle_rev($pdata,$edata,1);
$init_data = update_db_player_structure();
foreach(Array('w_','s_','') as $p)
{
foreach ($init_data as $i) global ${$p.$i};
}
extract($edata,EXTR_PREFIX_ALL,'w'); extract($sdata,EXTR_PREFIX_ALL,'s');
init_rev_battle(1);
$log .= "你发现了<span class=\"yellow\">$w_name</span>!<br>"; $log .= "你发现了<span class=\"yellow\">{$edata['name']}</span>!<br>";
if(!$kind) $log .= "对方看起来没有敌意。<br>"; if(!$kind) $log .= "对方看起来没有敌意。<br>";
//TODO:把这一段挪到一个独立函数里 //TODO:把这一段挪到一个独立函数里
if($edata['clbpara']['post'] == $sdata['pid']) if($edata['clbpara']['post'] == $pdata['pid'])
{ {
$log.="对方一看见你,便猛地朝你扑了过来!<br> $log.="对方一看见你,便猛地朝你扑了过来!<br>
<br><span class='sienna'>“老板!有你的快递喔!”</span><br> <br><span class='sienna'>“老板!有你的快递喔!”</span><br>
...@@ -253,4 +170,74 @@ ...@@ -253,4 +170,74 @@
} }
return $battle_log; return $battle_log;
} }
//战斗中逃跑
function escape_from_enemy(&$pa,&$pd)
{
global $action,$clbpara,$chase_escape_obbs,$log;
//include_once GAME_ROOT.'./include/game/dice.func.php';
# 在受追击/鏖战状态下逃跑有概率失败
if(strpos($action,'pchase')===0 || strpos($action,'dfight')===0)
{
$escape_dice = diceroll(99);
if($escape_dice < $chase_escape_obbs)
{
$log .= "你尝试逃跑,但是敌人在你身后紧追不舍!<br>";
$pa['fail_escape'] = 1;
return 0;
}
}
$log .= "你逃跑了。";
$action = '';
unset($clbpara['battle_turns']);
return 1;
}
//战斗中切换武器
function change_wep_in_battle($s=2)
{
global $log,$nosta;
global $wep,$wepk,$wepe,$weps,$wepsk;
global $wep2,$wep2k,$wep2e,$wep2s,$wep2sk;
# 初始化主武器名
$eqp = 'wep';
# 初始化副武器名
$seqp = 'wep'.$s;
$seqpk = $seqp.'k';
$seqpe = $seqp.'e';
$seqps = $seqp.'s';
$seqpsk = $seqp.'sk';
# 保存副武器数据
$swep=${$seqp}; $swepk=${$seqpk};
$swepe=${$seqpe}; $sweps=${$seqps}; $swepsk=${$seqpsk};
# 主武器为空、副武器不为空的情况下,直接替换为副武器
if(($wepk == 'WN' || !$weps) && ($swepk != 'WN'))
{
${$eqp} = $swep; ${$seqp} = '拳头';
${$eqp.'k'} = $swepk; ${$seqpk} = 'WN';
${$eqp.'e'} = $swepe; ${$seqpe} = 0;
${$eqp.'s'} = $sweps; ${$seqps} = $nosta;
${$eqp.'sk'} = $swepsk; ${$seqpsk} = '';
$log.="你将{$wep}拿在了手上。<br>";
}
# 主武器不为空的情况下,副武器替换为主武器
elseif($wepk != 'WN')
{
${$seqp} = ${$eqp}; ${$eqp} = $swep;
${$seqpk} = ${$eqp.'k'}; ${$eqp.'k'} = $swepk;
${$seqpe} = ${$eqp.'e'}; ${$eqp.'e'} = $swepe;
${$seqps} = ${$eqp.'s'}; ${$eqp.'s'} = $sweps;
${$seqpsk} = ${$eqp.'sk'}; ${$eqp.'sk'} = $swepsk;
$log.="你将{$wep2}收了起来";
if($wepk != 'WN') $log .=",将{$wep}拿在了手上";
$log.="。<br>";
}
else
{
$log.="你没有装备副武器!去给自己找一个吧!<br>";
}
return;
}
?> ?>
\ No newline at end of file
...@@ -92,13 +92,13 @@ ...@@ -92,13 +92,13 @@
}*/ }*/
# 升级指定技能 $sk:技能名;$nums:升级次数 # 升级指定技能 $sk:技能名;$nums:升级次数
function upgclbskills($sk,$nums=1) function upgclbskills($sk,$nums=1,$choice=NULL)
{ {
global $log,$club,$clbpara,$skillpoint,$gamecfg,$now; global $log,$club,$clbpara,$skillpoint,$gamecfg,$now;
global $cskills; global $cskills;
# 合法性检查 # 合法性检查
$flag = check_can_upgclbskills($sk,$nums); $flag = check_can_upgclbskills($sk,$nums,$choice);
if(!$flag) return; if(!$flag) return;
# 获取技能信息 # 获取技能信息
...@@ -160,15 +160,20 @@ ...@@ -160,15 +160,20 @@
$clog = str_replace("[:{$snm}:]",$svars*$nums,$clog); $clog = str_replace("[:{$snm}:]",$svars*$nums,$clog);
} }
} }
# 检查技能是否是要切换状态
if(isset($choice))
{
$clbpara['skillpara'][$sk]['choice'] = $choice;
}
# 扣除技能点 # 扣除技能点
if(!empty($cost)) $skillpoint -= $cost; if(!empty($cost)) $skillpoint -= $cost;
$log .= $clog; $log .= $clog;
# 存在复选框的技能,升级后重载技能页面 # 存在复选框的技能,升级后重载技能页面
if(isset($cskill['num_input'])) //if(isset($cskill['num_input']))
{ //{
global $opendialog; global $opendialog;
$opendialog = 'skillpage'; $opendialog = 'skillpage';
} //}
return; return;
} }
...@@ -261,10 +266,10 @@ ...@@ -261,10 +266,10 @@
} }
# 升级技能时的合法性检查 # 升级技能时的合法性检查
function check_can_upgclbskills($sk,$nums) function check_can_upgclbskills($sk,$nums,$choice=NULL)
{ {
global $log,$gamecfg; global $log,$gamecfg;
global $club,$clbpara,$skillpoint; global $pdata,$club,$clbpara,$skillpoint;
global $cskills,$cskills_blist,$cskills_wlist; global $cskills,$cskills_blist,$cskills_wlist;
if($nums <= 0) if($nums <= 0)
{ {
...@@ -277,11 +282,16 @@ ...@@ -277,11 +282,16 @@
return 0; return 0;
} }
# 只有特定技能可以一次性升复数级 # 只有特定技能可以一次性升复数级
if($nums != 1 && !isset($cskills[$sk]['num_input'])) if($nums!=1 && !isset($cskills[$sk]['num_input']))
{ {
$log.="该技能每次只能提升1级。"; $log.="该技能每次只能提升1级。";
return; return;
} }
if(isset($choice) && !isset($cskills[$sk]['choice']))
{
$log.="该技能无法变更状态。";
return;
}
if(array_key_exists($sk,$cskills_wlist) && !in_array($club,$cskills_wlist[$sk])) if(array_key_exists($sk,$cskills_wlist) && !in_array($club,$cskills_wlist[$sk]))
{ {
$log.="你不能升级此技能。<br>"; $log.="你不能升级此技能。<br>";
...@@ -293,7 +303,7 @@ ...@@ -293,7 +303,7 @@
return 0; return 0;
} }
# 检查冷却技能是否解锁 # 检查冷却技能是否解锁
if(check_skill_unlock($sk)) if(check_skill_unlock($sk,$pdata))
{ {
$cskill = $cskills[$sk]; $cskill = $cskills[$sk];
if(is_array($unlock_flag)) if(is_array($unlock_flag))
...@@ -308,10 +318,10 @@ ...@@ -308,10 +318,10 @@
} }
# 技能是否解锁,返回为0时解锁,否则返回对应的未满足条件 $sk:技能名;$data:角色数据 # 技能是否解锁,返回为0时解锁,否则返回对应的未满足条件 $sk:技能名;$data:角色数据
function check_skill_unlock($sk,$data=NULL) function check_skill_unlock($sk,$data)
{ {
global $cskills,$now; global $cskills,$now;
if(empty($data)) $data = current_player_save(); //if(empty($data)) $data = current_player_save();
$data['clbpara'] = get_clbpara($data['clbpara']); $data['clbpara'] = get_clbpara($data['clbpara']);
if(empty($data['clbpara']['skill']) || !in_array($sk,$data['clbpara']['skill'])) if(empty($data['clbpara']['skill']) || !in_array($sk,$data['clbpara']['skill']))
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
//include_once GAME_ROOT.'./include/game/dice.func.php'; //include_once GAME_ROOT.'./include/game/dice.func.php';
# 「百战」技能判定 /*# 「百战」技能判定
function skill_c1_veteran_act($choice) function skill_c1_veteran_act($choice)
{ {
global $log,$pdata,$cskills,$club,$clbpara,$itemspkinfo; global $log,$pdata,$cskills,$club,$clbpara,$itemspkinfo;
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
$log .= "「百战」技能未解锁!<br>"; $log .= "「百战」技能未解锁!<br>";
} }
return; return;
} }*/
# 「穿杨」与「咆哮」解锁 # 「穿杨」与「咆哮」解锁
function skill_c4_unlock($csk) function skill_c4_unlock($csk)
......
...@@ -113,34 +113,22 @@ ...@@ -113,34 +113,22 @@
{ {
global $db,$tablepre,$log,$mode,$main,$cmd,$battle_title; global $db,$tablepre,$log,$mode,$main,$cmd,$battle_title;
# actvie=0但没有传入pd时,读取当前玩家数据。
# pa无论怎样都会有的,因为玩家主动发现还要过一遍findenemy()
if(!isset($pd) && !$active) $pd = current_player_save();
# 格式化双方clbpara:最后保存角色数据的时候会自动转写clbpara,所以想改什么直接改就行了 # 格式化双方clbpara:最后保存角色数据的时候会自动转写clbpara,所以想改什么直接改就行了
$pa['clbpara'] = get_clbpara($pa['clbpara']); $pd['clbpara'] = get_clbpara($pd['clbpara']); $pa['clbpara'] = get_clbpara($pa['clbpara']); $pd['clbpara'] = get_clbpara($pd['clbpara']);
# 是否显示战斗界面 # 是否显示战斗界面
if($log_print) if($log_print)
{ {
// 格式化交战双方信息
// 主视角(战斗界面下方那一栏)前缀是$s_;敌对视角前缀是$w_;
// 为什么要这么搞……?都是为了兼容 NPC vs NPC 的战斗场景……
$init_data = update_db_player_structure();
foreach(Array('w_','s_') as $p)
{
foreach ($init_data as $i) global ${$p.$i};
}
if($active) if($active)
{ // 先制攻击,主视角是pa,给pa一个s_前缀;敌对视角是pd,给pd一个w_前缀; {
extract($pa,EXTR_PREFIX_ALL,'s');extract($pd,EXTR_PREFIX_ALL,'w'); init_battle_rev($pa,$pd,1);
$battle_title = '战斗发生';
} }
else else
{ //被先制攻击,主视角是pd,敌对视角是pa {
extract($pd,EXTR_PREFIX_ALL,'s');extract($pa,EXTR_PREFIX_ALL,'w'); init_battle_rev($pd,$pa,1);
$battle_title = '遭遇突袭';
} }
init_rev_battle(1);
$battle_title = '战斗发生';
$main = 'battle_rev'; $main = 'battle_rev';
} }
...@@ -263,7 +251,11 @@ ...@@ -263,7 +251,11 @@
# 打击流程 # 打击流程
# 这里的第一个参数指的是进攻方(造成伤害的一方);第二个参数指的是防守方(承受伤害的一方)。active已经没用了。 # 这里的第一个参数指的是进攻方(造成伤害的一方);第二个参数指的是防守方(承受伤害的一方)。active已经没用了。
# 传参的时候只用考虑参数位置,不用管pa、pd具体是谁。 # 传参的时候只用考虑参数位置,不用管pa、pd具体是谁。
att_loop_flag:
$att_dmg = rev_attack($pa,$pd,$active); $att_dmg = rev_attack($pa,$pd,$active);
# 检查是否循环打击流程:一些特殊技能可能需要此效果
$att_loop = check_loop_rev_attack($pa,$pd,$active);
if($att_loop) goto att_loop_flag;
# 存在暴毙标识:进攻方(pa)在进攻过程中未造成伤害就暴毙,可能是因为触发了武器直死。 # 存在暴毙标识:进攻方(pa)在进攻过程中未造成伤害就暴毙,可能是因为触发了武器直死。
if(isset($pa['gg_flag'])) if(isset($pa['gg_flag']))
...@@ -417,30 +409,25 @@ ...@@ -417,30 +409,25 @@
if ($active) if ($active)
{ {
//pa是玩家/主视角NPC的情况下 把edata($w_*)发给$pd 把sdata($s_*) 发给$pa //pa是玩家/主视角NPC的情况下 把edata($w_*)发给$pd 把sdata($s_*) 发给$pa
$edata=$pd; $sdata=$pa; init_battle_rev($pa,$pd,1);
player_save($pa); player_save($pd); player_save($pa); player_save($pd);
$edata = $pd; if(!$pa['type']) $sname = $pa['name'];
} }
else else
{ {
//pd是玩家/主视角NPC的情况下 把edata($w_*)发给$pa 把sdata($s_*) 发给$pd //pd是玩家/主视角NPC的情况下 把edata($w_*)发给$pa 把sdata($s_*) 发给$pd
$edata=$pa; $sdata=$pd; init_battle_rev($pd,$pa,1);
player_save($pa); player_save($pd); player_save($pa); player_save($pd);
$edata = $pa; if(!$pd['type']) $sname = $pd['name'];
} }
# 刷新玩家状态 $main = 'battle_rev';
if(!$sdata['type']) player_load($sdata);
# 主视角不是玩家,可能是玩家召唤的NPC帮手。将身上的印记传给玩家。
elseif($sdata['type'] && $active) $action = $sdata['action'];
# 刷新界面显示 蛋疼度+233 if(isset($sname))
$init_data = update_db_player_structure();
foreach(Array('w_','s_','') as $p)
{ {
foreach ($init_data as $i) global ${$p.$i}; $pdata = fetch_playerdata_by_name($sname);
extract($pdata,EXTR_REFS);
} }
extract($sdata,EXTR_PREFIX_ALL,'s'); extract($edata,EXTR_PREFIX_ALL,'w');
init_rev_battle (1);
$main = 'battle_rev';
# 根据玩家身上的标记($action) 判断接下来要跳转的页面 # 根据玩家身上的标记($action) 判断接下来要跳转的页面
if(substr($action,0,6)=='corpse') if(substr($action,0,6)=='corpse')
...@@ -702,16 +689,16 @@ ...@@ -702,16 +689,16 @@
attack_finish_events($pa,$pd,$active); attack_finish_events($pa,$pd,$active);
//防守方(pd)受到伤害后的事件(防具耐久下降、受伤) //防守方(pd)受到伤害后的事件(防具耐久下降、受伤)
get_hurt_events($pa,$pd,$active); get_hurt_events($pa,$pd,$active);
//经验结算
expup_rev($pa,$pd,$active);
//怒气结算
rgup_rev($pa,$pd,$active);
} }
else else
{ {
$damage = 0; $damage = 0;
$log .= "但是没有击中!<br>"; $log .= "但是没有击中!<br>";
} }
//经验结算
expup_rev($pa,$pd,$active);
//怒气结算
rgup_rev($pa,$pd,$active);
//计算武器损耗 //计算武器损耗
if(!empty($pa['wep_imp_times'])) weapon_loss($pa,$pa['wep_imp_times']); if(!empty($pa['wep_imp_times'])) weapon_loss($pa,$pa['wep_imp_times']);
//发出声音 //发出声音
...@@ -773,51 +760,6 @@ ...@@ -773,51 +760,6 @@
if(!$revival_flag) if(!$revival_flag)
{ {
final_kill_events($pa,$pd,$active,$lastword); final_kill_events($pa,$pd,$active,$lastword);
/*global $now,$alivenum,$deathnum;
$pd['hp'] = 0;
$pd['endtime'] = $pd['deathtime'] = $now;
# 初始化遗言
if (!$pd['type'])
{
//死者是玩家,增加击杀数并保存系统状况。
$pa['killnum'] ++;
$alivenum --;
if(!empty($lastword)) $log .= "<span class='evergreen'>你用尽最后的力气喊道:“".$lastword."”</span><br>";
}
else
{
//死者是NPC,加载NPC遗言
$log .= npc_chat_rev ($pd,$pa, 'death' );
}
$deathnum ++;
# 初始化killmsg
if(!$pa['type'])
{
global $db,$tablepre;
$pname = $pa['name'];
$result = $db->query("SELECT killmsg FROM {$tablepre}users WHERE username = '$pname'");
$killmsg = $db->result($result,0);
if(!empty($killmsg)) $log .= "<span class=\"evergreen\">{$pa['nm']}对{$pd['nm']}说:“{$killmsg}”</span><br>";
}
else
{
$log .= npc_chat_rev ($pa,$pd,'kill');
}
# 杀人rp结算
get_killer_rp($pa,$pd,$active);
# 执行死亡事件(灵魂绑定等)
check_death_events($pa,$pd,$active);
# 检查成就 大补丁:击杀者是玩家时才会检查成就
if(!$pa['type'])
{
include_once GAME_ROOT.'./include/game/achievement.func.php';
check_battle_achievement_rev($pa,$pd);
}
# 保存游戏进行状态
include_once GAME_ROOT.'./include/system.func.php';
save_gameinfo();*/
} }
else else
{ {
...@@ -1087,14 +1029,17 @@ ...@@ -1087,14 +1029,17 @@
# 战斗怒气结算 # 战斗怒气结算
function rgup_rev(&$pa,&$pd,$active) function rgup_rev(&$pa,&$pd,$active)
{ {
# 计算pa(攻击方)因攻击行为获得的怒气 # 攻击命中的情况下,计算pa(攻击方)因攻击行为获得的怒气
# pa(攻击方)拥有重击辅助属性,每次攻击额外获得1~2点怒气 if($pa['hitrate_times'] > 0)
if(!empty($pa['ex_keys']) && in_array('c',$pa['ex_keys']))
{ {
$pa_rgup = rand(1,2); # pa(攻击方)拥有重击辅助属性,每次攻击额外获得1~2点怒气
$pa['rage'] = min(255,$pa['rage']+$pa_rgup); if(!empty($pa['ex_keys']) && in_array('c',$pa['ex_keys']))
{
$pa_rgup = rand(1,2);
$pa['rage'] = min(255,$pa['rage']+$pa_rgup);
}
} }
# 计算pd(防守方)因挨打获得的怒气 # 无论攻击是否命中,计算pd(防守方)因挨打获得的怒气
$rgup = round(($pa['lvl'] - $pd['lvl'])/3); $rgup = round(($pa['lvl'] - $pd['lvl'])/3);
# 单次获得怒气上限:15 # 单次获得怒气上限:15
$rgup = min(15,max(1,$rgup)); $rgup = min(15,max(1,$rgup));
...@@ -1108,9 +1053,19 @@ ...@@ -1108,9 +1053,19 @@
function expup_rev(&$pa,&$pd,$active) function expup_rev(&$pa,&$pd,$active)
{ {
global $log,$baseexp; global $log,$baseexp;
$expup = round ( ($pd['lvl'] - $pa['lvl']) / 3 ); # 攻击命中的情况下,计算获得经验
$expup = $expup > 0 ? $expup : 1; if($pa['hitrate_times'] > 0)
$pa['exp'] += $expup; {
$expup = round ( ($pd['lvl'] - $pa['lvl']) / 3 );
$expup = $expup > 0 ? $expup : 1;
}
# 攻击未命中,也许有其他渠道获得经验
else
{
#「反思」技能效果
if(isset($pa['skill_c5_review'])) $expup = 1;
}
if(!empty($expup)) $pa['exp'] += $expup;
//$log .= "$isplayer 的经验值增加 $expup 点<br>"; //$log .= "$isplayer 的经验值增加 $expup 点<br>";
//升到下级所需的exp 直接在这里套公式计算 不用global了 //升到下级所需的exp 直接在这里套公式计算 不用global了
......
...@@ -6,7 +6,7 @@ if(!defined('IN_GAME')) { ...@@ -6,7 +6,7 @@ if(!defined('IN_GAME')) {
function move($moveto = 99) { function move($moveto = 99) {
global $lvl,$log,$pls,$pgroup,$plsinfo,$hplsinfo,$inf,$hp,$mhp,$sp,$def,$club,$arealist,$areanum,$hack,$areainfo,$gamestate,$pose,$weather; global $lvl,$log,$pls,$pgroup,$plsinfo,$hplsinfo,$inf,$hp,$mhp,$sp,$def,$club,$arealist,$areanum,$hack,$areainfo,$gamestate,$pose,$weather;
global $gamestate,$gamecfg; global $gamestate,$gamecfg,$pdata;
$plsnum = sizeof($plsinfo); $plsnum = sizeof($plsinfo);
...@@ -181,26 +181,20 @@ function move($moveto = 99) { ...@@ -181,26 +181,20 @@ function move($moveto = 99) {
// if (CURSCRIPT !== 'botservice') $log.="<span id=\"HsUipfcGhU\"></span>"; //刷新页面标记 // if (CURSCRIPT !== 'botservice') $log.="<span id=\"HsUipfcGhU\"></span>"; //刷新页面标记
// return; // return;
//} //}
$enemyrate = 40; /*$enemyrate = 40;
if($gamestate == 40){$enemyrate += 20;} if($gamestate == 40){$enemyrate += 20;}
elseif($gamestate == 50){$enemyrate += 40;} elseif($gamestate == 50){$enemyrate += 40;}
if($pose==3){$enemyrate -= 20;} if($pose==3){$enemyrate -= 20;}
elseif($pose==4){$enemyrate += 10;} elseif($pose==4){$enemyrate += 10;}*/
include_once GAME_ROOT.'./include/game/revattr.func.php';
$enemyrate = calc_meetman_rate($pdata);
//echo "enemyrate = {$enemyrate}%";
discover($enemyrate); discover($enemyrate);
/*
$enemyrate = 70;
if($gamestate == 40){$enemyrate += 10;}
elseif($gamestate == 50){$enemyrate += 15;}
if($pose==3){$enemyrate -= 20;}
elseif($pose==4){$enemyrate += 10;}
discover($enemyrate);
*/
return; return;
} }
function search(){ function search(){
global $lvl,$log,$pls,$pgroup,$arealist,$areanum,$hack,$plsinfo,$hplsinfo,$club,$sp,$gamestate,$pose,$weather,$hp,$mhp,$def,$inf; global $pdata,$lvl,$log,$pls,$pgroup,$arealist,$areanum,$hack,$plsinfo,$hplsinfo,$club,$sp,$gamestate,$pose,$weather,$hp,$mhp,$def,$inf;
if(!isset($plsinfo[$pls]) && isset($hplsinfo[$pgroup])) if(!isset($plsinfo[$pls]) && isset($hplsinfo[$pgroup]))
...@@ -364,23 +358,21 @@ function search(){ ...@@ -364,23 +358,21 @@ function search(){
return; return;
} }
}*/ }*/
$enemyrate = 40; /*$enemyrate = 40;
if($gamestate == 40){$enemyrate += 20;} if($gamestate == 40){$enemyrate += 20;}
elseif($gamestate == 50){$enemyrate += 30;} elseif($gamestate == 50){$enemyrate += 30;}
if($pose==3){$enemyrate -= 20;} if($pose==3){$enemyrate -= 20;}
elseif($pose==4){$enemyrate += 10;} elseif($pose==4){$enemyrate += 10;}*/
include_once GAME_ROOT.'./include/game/revattr.func.php';
$enemyrate = calc_meetman_rate($pdata);
//echo "enemyrate = {$enemyrate}%";
discover($enemyrate); discover($enemyrate);
// $log .= '遇敌率'.$enemyrate.'%<br>';
// if(($gamestate>=40)&&($pose!=3)) {
// discover(75);
// } else {
// discover(30);
// }
return; return;
} }
function discover($schmode = 0) { function discover($schmode = 0) {
global $pdata;
global $art,$pls,$now,$log,$mode,$command,$cmd,$event_obbs,$weather,$pls,$club,$pose,$tactic,$inf,$item_obbs,$enemy_obbs,$trap_min_obbs,$trap_max_obbs,$bid,$db,$tablepre,$gamestate,$corpseprotect,$action,$skills,$rp,$aidata; global $art,$pls,$now,$log,$mode,$command,$cmd,$event_obbs,$weather,$pls,$club,$pose,$tactic,$inf,$item_obbs,$enemy_obbs,$trap_min_obbs,$trap_max_obbs,$bid,$db,$tablepre,$gamestate,$corpseprotect,$action,$skills,$rp,$aidata;
global $clbpara,$gamecfg; global $clbpara,$gamecfg;
$event_dice = rand(0,99); $event_dice = rand(0,99);
...@@ -397,7 +389,6 @@ function discover($schmode = 0) { ...@@ -397,7 +389,6 @@ function discover($schmode = 0) {
} }
# 判定移动、探索、事件后的BGM变化 # 判定移动、探索、事件后的BGM变化
//include_once config('audio',$gamecfg);
global $pls_bgm; global $pls_bgm;
if(array_key_exists($pls,$pls_bgm)) if(array_key_exists($pls,$pls_bgm))
{ {
...@@ -417,47 +408,45 @@ function discover($schmode = 0) { ...@@ -417,47 +408,45 @@ function discover($schmode = 0) {
//触发了AI追击事件 //触发了AI追击事件
$edata = $aidata; $edata = $aidata;
goto battle_flag; goto battle_flag;
/*include_once GAME_ROOT.'./include/game/attr.func.php';
$active_r = get_active_r($weather,$pls,$pose,$tactic,$club,$inf,$aidata['pose']);
include_once GAME_ROOT.'./include/game/clubskills.func.php';
$active_r *= get_clubskill_bonus_active($club,$skills,$aidata['club'],$aidata['skills']);
if ($active_r>96) $active_r=96;
$bid = $aidata['pid'];
$active_dice = rand(0,99);
if($active_dice < $active_r) {
$action = 'enemy'.$aidata['pid'];
include_once GAME_ROOT.'./include/game/battle.func.php';
findenemy($aidata);
return;
} else {
include_once GAME_ROOT.'./include/game/combat.func.php';
combat(0);
return;
}*/
} }
$trap_dice=rand(0,99);//随机数,开始判断是否踩陷阱 $trap_dice=diceroll(99);
if($trap_dice < $trap_max_obbs){ //踩陷阱概率最大值 // 计算陷阱“发现率”
if($trap_dice < $trap_max_obbs)
{
//echo "进入踩陷阱判定<br>"; //echo "进入踩陷阱判定<br>";
$trapresult = $db->query("SELECT * FROM {$tablepre}maptrap WHERE pls = '$pls' ORDER BY itmk DESC"); $trapresult = $db->query("SELECT * FROM {$tablepre}maptrap WHERE pls = '$pls' ORDER BY itmk DESC");
// $traplist = Array();
// while($trap0 = $db->fetch_array($result)){
// $traplist[$trap0['tid']] = $trap0;
// if($trap0['itmk'] == 'TOc'){
// $xtrap = true;
// $xtrapid = $
// }
// }
$xtrp = $db->fetch_array($trapresult);
$xtrpflag = false;
//echo $xtrp['itm'];
if($xtrp['itmk'] == 'TOc'){
$xtrpflag = true;
}
$trpnum = $db->num_rows($trapresult); $trpnum = $db->num_rows($trapresult);
if($trpnum){//看地图上有没有陷阱 //看地图上有没有陷阱
//echo "踩陷阱概率:{$real_trap_obbs}%"; if($trpnum)
if($xtrpflag){ {
include_once GAME_ROOT.'./include/game/itemmain.func.php';
$fstrp = $db->fetch_array($trapresult);
//奇迹雷
$xtrpflag = $fstrp['itmk'] == 'TOc' ? true : false;
//计算 或不计算陷阱“触发率”:
$real_trap_obbs = $xtrpflag ? 100 : calc_real_trap_obbs($pdata,$trpnum);
//echo "realtrapobbs = {$real_trap_obbs}<br>";
if($trap_dice < $real_trap_obbs)
{
if(!$xtrpflag)
{
$itemno = rand(0,$trpnum-1);
$db->data_seek($trapresult,$itemno);
$fstrp = $db->fetch_array($trapresult);
}
global $itm0,$itmk0,$itme0,$itms0,$itmsk0;
$itm0=$fstrp['itm'];
$itmk0=$fstrp['itmk'];
$itme0=$fstrp['itme'];
$itms0=$fstrp['itms'];
$itmsk0=$fstrp['itmsk'];
$tid = $fstrp['tid'];
$db->query("DELETE FROM {$tablepre}maptrap WHERE tid='$tid'");
itemfind();
return;
}
/*if($xtrpflag){
global $itm0,$itmk0,$itme0,$itms0,$itmsk0; global $itm0,$itmk0,$itme0,$itms0,$itmsk0;
$itm0=$xtrp['itm']; $itm0=$xtrp['itm'];
$itmk0=$xtrp['itmk']; $itmk0=$xtrp['itmk'];
...@@ -466,7 +455,7 @@ function discover($schmode = 0) { ...@@ -466,7 +455,7 @@ function discover($schmode = 0) {
$itmsk0=$xtrp['itmsk']; $itmsk0=$xtrp['itmsk'];
$tid = $xtrp['tid']; $tid = $xtrp['tid'];
$db->query("DELETE FROM {$tablepre}maptrap WHERE tid='$tid'"); $db->query("DELETE FROM {$tablepre}maptrap WHERE tid='$tid'");
include_once GAME_ROOT.'./include/game/itemmain.func.php';
itemfind(); itemfind();
return; return;
}else{ }else{
...@@ -499,41 +488,15 @@ function discover($schmode = 0) { ...@@ -499,41 +488,15 @@ function discover($schmode = 0) {
return; return;
} }
} }
} }*/
} }
} }
// $trap_dice = rand(0,99);
// if($pose==1){$trap_dice-=5;}
// elseif($pose==3){$trap_dice-=8;}//攻击和探索姿势略容易踩陷阱
// if($gamestate >= 40){$trap_dice-=5;}//连斗以后略容易踩陷阱
// if($trap_dice < $trap_obbs){
// $result = $db->query("SELECT * FROM {$tablepre}{$pls}mapitem WHERE itmk = 'TO'");
// $trpnum = $db->num_rows($result);
// if($trpnum){
// $itemno = rand(0,$trpnum-1);
// $db->data_seek($result,$itemno);
// $mi=$db->fetch_array($result);
// global $itm0,$itmk0,$itme0,$itms0,$itmsk0;
// $itm0=$mi['itm'];
// $itmk0=$mi['itmk'];
// $itme0=$mi['itme'];
// $itms0=$mi['itms'];
// $itmsk0=$mi['itmsk'];
// $iid=$mi['iid'];
// $db->query("DELETE FROM {$tablepre}{$pls}mapitem WHERE iid='$iid'");
// if($itms0){
// include_once GAME_ROOT.'./include/game/itemmain.func.php';
// itemfind();
// return;
// }
// }
// }
include_once GAME_ROOT.'./include/game/attr.func.php'; include_once GAME_ROOT.'./include/game/attr.func.php';
$mode_dice = rand(0,99); $mode_dice = rand(0,99);
if($mode_dice < $schmode) if($mode_dice < $schmode)
{ {
//echo "进入遇敌判定<br>"; //echo "进入遇敌判定<br>";
global $pdata,$pid,$corpse_obbs,$teamID,$fog,$bid,$gamestate; global $pid,$corpse_obbs,$teamID,$fog,$bid,$gamestate;
global $clbstatusa,$clbstatusb,$clbstatusc,$clbstatusd,$clbstatuse; global $clbstatusa,$clbstatusb,$clbstatusc,$clbstatusd,$clbstatuse;
$result = $db->query("SELECT * FROM {$tablepre}players WHERE pls='$pls' AND pid!='$pid'"); $result = $db->query("SELECT * FROM {$tablepre}players WHERE pls='$pls' AND pid!='$pid'");
...@@ -632,12 +595,10 @@ function discover($schmode = 0) { ...@@ -632,12 +595,10 @@ function discover($schmode = 0) {
//if ($active_r>96) $active_r=96; //if ($active_r>96) $active_r=96;
//include_once GAME_ROOT.'./include/game/dice.func.php'; //include_once GAME_ROOT.'./include/game/dice.func.php';
include_once GAME_ROOT.'./include/game/revbattle.func.php'; include_once GAME_ROOT.'./include/game/revbattle.func.php';
//获取并保存当前玩家数据
$sdata = current_player_save();
//刷新敌人时效性状态 //刷新敌人时效性状态
if(!empty($edata['clbpara']['lasttimes'])) check_skilllasttimes($edata); if(!empty($edata['clbpara']['lasttimes'])) check_skilllasttimes($edata);
//计算先攻概率 //计算先攻概率
$active_r = get_active_r_rev($sdata,$edata); $active_r = get_active_r_rev($pdata,$edata);
$bid = $edata['pid']; $bid = $edata['pid'];
$active_dice = diceroll(99); $active_dice = diceroll(99);
//先制 //先制
...@@ -662,7 +623,7 @@ function discover($schmode = 0) { ...@@ -662,7 +623,7 @@ function discover($schmode = 0) {
#include_once GAME_ROOT.'./include/game/combat.func.php'; #include_once GAME_ROOT.'./include/game/combat.func.php';
#combat(0); #combat(0);
include_once GAME_ROOT.'./include/game/revcombat.func.php'; include_once GAME_ROOT.'./include/game/revcombat.func.php';
rev_combat_prepare($edata,$sdata,0); rev_combat_prepare($edata,$pdata,0);
return; return;
} }
} }
......
<?php
if(!defined('IN_GAME')) {
exit('Access Denied');
}
function init_icon_states(&$pa,$ismeet=0)
{
global $sexinfo,$fog;
//雾天显示???
if($fog && !$ismeet)
{
$pa['sNoinfo'] = '???';
$pa['iconImg'] = 'question.gif';
$pa['iconImgB'] = '';
return;
}
//更新编号情报
$pa['sNoinfo'] = "(".$sexinfo[$pa['gd']].$pa['sNo']."号)";
//更新头像情报
$itype = $pa['type'] > 0 ? 'n' : $pa['gd'];
$iname = $itype.'_'.$pa['icon'];
if(file_exists('img/'.$iname.'a.gif'))
{
$pa['iconImgB']= $iname.'a.gif';
}
else
{
$pa['iconImg'] = $iname.'.gif';
unset($pa['iconImgB']);
}
}
function init_hp_states(&$pa,$ismeet=0)
{
global $fog,$hpinfo,$spinfo,$rageinfo;
if($fog && !$ismeet)
{
$pa['hpstate'] = '???';
$pa['spstate'] = '???';
$pa['ragestate'] = '???';
$pa['name'] = '';
return;
}
if($pa['hp'] <= 0)
{
$pa['hpstate'] = "<span class=\"red\">$hpinfo[3]</span>";
$pa['spstate'] = "<span class=\"red\">$spinfo[3]</span>";
$pa['ragestate'] = "<span class=\"red\">$rageinfo[3]</span>";
}
else
{
if($pa['hp'] < $pa['mhp']*0.2)
{
$pa['hpstate'] = "<span class=\"red\">$hpinfo[2]</span>";
}
elseif($pa['hp'] < $pa['mhp']*0.5)
{
$pa['hpstate'] = "<span class=\"yellow\">$hpinfo[1]</span>";
}
else
{
$pa['hpstate'] = "<span class=\"clan\">$hpinfo[0]</span>";
}
if($pa['sp'] < $pa['msp']*0.2)
{
$pa['spstate'] = $spinfo[2];
}
elseif($pa['sp'] < $pa['msp']*0.5)
{
$pa['spstate'] = $spinfo[1];
}
else
{
$pa['spstate'] = $spinfo[0];
}
if($pa['rage'] >= 100)
{
$pa['ragestate'] = "<span class=\"red\">$rageinfo[2]</span>";
}
elseif($pa['rage'] >= 30)
{
$pa['ragestate'] = "<span class=\"yellow\">$rageinfo[1]</span>";
}
else
{
$pa['ragestate'] = $rageinfo[0];
}
}
}
function init_wep_states(&$pa,$ismeet=0)
{
global $wepeinfo,$fog;
if($fog && !$ismeet)
{
$pa['wep_words'] = '???';
$pa['wepk_words'] = '???';
return;
}
if($pa['wepe'] >= 400)
{
$pa['wepestate'] = $wepeinfo[3];
}
elseif($pa['wepe'] >= 200)
{
$pa['wepestate'] = $wepeinfo[2];
}
elseif($pa['wepe'] >= 60)
{
$pa['wepestate'] = $wepeinfo[1];
}
else
{
$pa['wepestate'] = $wepeinfo[0];
}
//更新武器名、武器类别情报
$pa['wep_words'] = parse_info_desc($pa['wep'],'m');
$pa['wepk_words'] = parse_info_desc($pa['wepk'],'k');
}
function init_inf_states(&$pa,$ismeet=0)
{
global $infinfo,$fog;
if($fog && !$ismeet)
{
$pa['infdata'] = '???';
return;
}
//更新受伤状态
if($pa['inf'])
{
$pa['infdata'] = '';
foreach ($infinfo as $inf_ky => $inf_nm)
{
if(strpos($pa['inf'],$inf_ky) !== false) $pa['infdata'] .= $inf_nm;
}
}
else
{
$pa['infdata'] = '无';
}
}
?>
<!--{loop $plsinfo $places $info}--> <!--{loop $plsinfo $places $info}-->
<!--{if (CURSCRIPT == 'game' && $s_pls==$places)}--> <!--{if (CURSCRIPT == 'game' && $sdata['pls']==$places)}-->
<!--{eval $bgurl = "img/location/".$places.".jpg"}--> <!--{eval $bgurl = "img/location/".$places.".jpg"}-->
<style> <style>
body {background-image: url("$bgurl");background-position: center;} body {background-image: url("$bgurl");background-position: center;}
...@@ -10,48 +10,48 @@ ...@@ -10,48 +10,48 @@
<tr> <tr>
<td class="b8" valign="top" rowspan=2> <td class="b8" valign="top" rowspan=2>
<div style="position:relative;width:140px;height:340px;"> <div style="position:relative;width:140px;height:340px;">
<!--{if $w_iconImgB}--> <!--{if !empty($tdata['iconImgB'])}-->
<IMG src="img/$w_iconImgB" style="border:0;height:340px;position:absolute;left:0px;top:0px;<!--{if $w_hp==0}-->filter: grayscale(100%)<!--{/if}-->" /> <IMG src="img/$tdata['iconImgB']" style="border:0;height:340px;position:absolute;left:0px;top:0px;<!--{if $tdata['hp']==0}-->filter: grayscale(100%)<!--{/if}-->" />
<!--{else}--> <!--{else}-->
<IMG src="img/$w_iconImg" style="border:0;height:80px;<!--{if $w_hp==0}-->filter: grayscale(100%)<!--{/if}-->" /> <IMG src="img/$tdata['iconImg']" style="border:0;height:80px;<!--{if $tdata['hp']==0}-->filter: grayscale(100%)<!--{/if}-->" />
<!--{/if}--> <!--{/if}-->
</div> </div>
</td> </td>
<td colspan=2 width=580px> <td colspan=2 width=580px>
<table border="0" cellspacing="0" height=75px width=580px cellpadding="0" width="100%" valign="middle"> <table border="0" cellspacing="0" height=75px width=580px cellpadding="0" width="100%" valign="middle">
<tr> <tr>
<td class="b1" colspan=2 height=20px><span>Lv. $w_lvl</span></td> <td class="b1" colspan=2 height=20px><span>Lv. $tdata['lvl']</span></td>
<td class="b1" colspan=2><span>$w_name</span></td> <td class="b1" colspan=2><span>$tdata['name']</span></td>
<td class="b1" colspan=2><span>$w_sNoinfo</span><!--{if $s_club==19}--><span class="lime">报应点数:<span id="anum">$w_rp</span></span><!--{/if}--></td> <td class="b1" colspan=2><span>{$typeinfo[$tdata['type']]}{$tdata['sNoinfo']}</span><!--{if $sdata['club']==19}--><span class="lime">报应点数:<span id="anum">$tdata['rp']</span></span><!--{/if}--></td>
</tr> </tr>
<tr> <tr>
<td class="b2" width=70px height=20px><span>{lang rage}</span></td> <td class="b2" width=70px height=20px><span>{lang rage}</span></td>
<td class="b3" width=95px><span>$w_ragestate</span></td> <td class="b3" width=95px><span>$tdata['ragestate']</span></td>
<td class="b2" width=70px><span>{lang sp}</span></td> <td class="b2" width=70px><span>{lang sp}</span></td>
<td class="b3" width=105px><span>$w_spstate</span></td> <td class="b3" width=105px><span>$tdata['spstate']</span></td>
<td class="b2" width=70px><span>{lang hp}</span></td> <td class="b2" width=70px><span>{lang hp}</span></td>
<td class="b3" width=170px><span>$w_hpstate</span></td> <td class="b3" width=170px><span>$tdata['hpstate']</span></td>
</tr> </tr>
<tr> <tr>
<td class="b2" height=20px><span>{lang wep}{lang effect}</span></td> <td class="b2" height=20px><span>{lang wep}{lang effect}</span></td>
<td class="b3"><span>$w_wepestate</span></td> <td class="b3"><span>$tdata['wepestate']</span></td>
<td class="b2"><span>{lang wep}{lang kind1}</span></td> <td class="b2"><span>{lang wep}{lang kind1}</span></td>
<td class="b3"><span><!--{if $w_wepk != ''}-->$w_wepk_words<!--{else}-->???<!--{/if}--></span></td> <td class="b3"><span><!--{if $tdata['wepk'] != ''}-->$tdata['wepk_words']<!--{else}-->???<!--{/if}--></span></td>
<td class="b2"><span>{lang wep}</span></td> <td class="b2"><span>{lang wep}</span></td>
<td class="b3"><span>$w_wep_words</span></td> <td class="b3"><span>$tdata['wep_words']</span></td>
</tr> </tr>
<tr> <tr>
<td class="b2" height=20px><span>{lang tactic}</span></td> <td class="b2" height=20px><span>{lang tactic}</span></td>
<td class="b3"><span><!--{if $w_tactic >= 0}-->$tacinfo[$w_tactic]<!--{else}-->???<!--{/if}--></span></td> <td class="b3"><span><!--{if $tdata['tactic'] >= 0}-->$tacinfo[$tdata['tactic']]<!--{else}-->???<!--{/if}--></span></td>
<td class="b2"><span>{lang pose}</span></td> <td class="b2"><span>{lang pose}</span></td>
<td class="b3"><span><!--{if $w_pose >= 0}-->$poseinfo[$w_pose]<!--{else}-->???<!--{/if}--></span></td> <td class="b3"><span><!--{if $tdata['pose'] >= 0}-->$poseinfo[$tdata['pose']]<!--{else}-->???<!--{/if}--></span></td>
<td height="20px" class="b2"><span>{lang inf}</span></td> <td height="20px" class="b2"><span>{lang inf}</span></td>
<td class="b3"><span><!--{if $w_infdata}-->$w_infdata<!--{else}--><!--{/if}--></span></td> <td class="b3"><span>$tdata['infdata']</span></td>
</tr> </tr>
<tr> <tr>
<!--{if isset($s_clbpara['battle_turns'])}--> <!--{if isset($sdata['clbpara']['battle_turns'])}-->
<td class="b2" height=20px><span>战斗回合</span></td> <td class="b2" height=20px><span>战斗回合</span></td>
<td class="b3"><span>$s_clbpara['battle_turns']</span></td> <td class="b3"><span>{$sdata['clbpara']['battle_turns']}</span></td>
<!--{else}--> <!--{else}-->
<td height=20px></td> <td height=20px></td>
<td></td> <td></td>
...@@ -72,10 +72,10 @@ ...@@ -72,10 +72,10 @@
</TD> </TD>
<td class="b8" width=140px rowspan="2" valign="bottom"> <td class="b8" width=140px rowspan="2" valign="bottom">
<div style="position:relative;width:140px;height:350px;"> <div style="position:relative;width:140px;height:350px;">
<!--{if $iconImgB}--> <!--{if !empty($sdata['iconImgB'])}-->
<IMG src="img/$iconImgB" style="border:0;height:340px;position:absolute;left:0px;bottom:-10px;<!--{if $hp==0}-->filter: grayscale(100%)<!--{/if}-->" /> <IMG src="img/$sdata['iconImgB']" style="border:0;height:340px;position:absolute;left:0px;bottom:-10px;<!--{if $sdata['hp']==0}-->filter: grayscale(100%)<!--{/if}-->" />
<!--{else}--> <!--{else}-->
<IMG src="img/$iconImg" style="border:0;height:80px;position:absolute;left:0;bottom:0;<!--{if $hp==0}-->filter: grayscale(100%)<!--{/if}-->" /> <IMG src="img/$sdata['iconImg']" style="border:0;height:80px;position:absolute;left:0;bottom:0;<!--{if $sdata['hp']==0}-->filter: grayscale(100%)<!--{/if}-->" />
<!--{/if}--> <!--{/if}-->
</div> </div>
</td> </td>
...@@ -84,45 +84,33 @@ ...@@ -84,45 +84,33 @@
<td colspan=2 width=580px> <td colspan=2 width=580px>
<table border="0" width=580px height=80px cellspacing="0" cellpadding="0" valign="middle"> <table border="0" width=580px height=80px cellspacing="0" cellpadding="0" valign="middle">
<tr> <tr>
<td class="b1" colspan=2 height=20px><span>$typeinfo[$s_type]({$sexinfo[$s_gd]}{$s_sNo}号)</span></td> <td class="b1" colspan=2 height=20px><span>$typeinfo[$sdata['type']]({$sexinfo[$sdata['gd']]}{$sdata['sNo']}号)</span></td>
<td class="b1" colspan=2><span>$s_name</span></td> <td class="b1" colspan=2><span>$sdata['name']</span></td>
<td class="b1" colspan=2><span>Lv. $s_lvl</span></td> <td class="b1" colspan=2><span>Lv. $sdata['lvl']</span></td>
</tr> </tr>
<tr> <tr>
<td class="b2" width=70px height=20px><span>{lang hp}</span></td> <td class="b2" width=70px height=20px><span>{lang hp}</span></td>
<td class="b3" width=170px><span><span class="$hpcolor">$s_hp / $s_mhp</span></span></td> <td class="b3" width=170px><span><span class="$hpcolor">$sdata['hp'] / $sdata['mhp']</span></span></td>
<td class="b2" width=70px><span>{lang sp}</span></td> <td class="b2" width=70px><span>{lang sp}</span></td>
<td class="b3" width=105px><span>$s_sp / $s_msp</span></td> <td class="b3" width=105px><span>$sdata['sp'] / $sdata['msp']</span></td>
<td class="b2" width=70px><span>{lang rage}</span></td> <td class="b2" width=70px><span>{lang rage}</span></td>
<td class="b3" width=95px><span><!--{if $s_rage >=30}--><span class="yellow">$s_rage</span><!--{else}-->$s_rage<!--{/if}--></span></td> <td class="b3" width=95px><span><!--{if $sdata['rage'] >=30}--><span class="yellow">$sdata['rage']</span><!--{else}-->$sdata['rage']<!--{/if}--></span></td>
</tr> </tr>
<tr> <tr>
<td class="b2" height=20px><span>{lang wep}</span></td> <td class="b2" height=20px><span>{lang wep}</span></td>
<td class="b3"><span>$s_wep_words</span></td> <td class="b3"><span>$sdata['wep_words']</span></td>
<td class="b2"><span>{lang wep}{lang kind1}</span></td> <td class="b2"><span>{lang wep}{lang kind1}</span></td>
<td class="b3"><span>$s_wepk_words</span></td> <td class="b3"><span>$sdata['wepk_words']</span></td>
<td class="b2"><span>{lang wep}{lang effect}</span></td> <td class="b2"><span>{lang wep}{lang effect}</span></td>
<td class="b3"><span>$s_wepe</span></td> <td class="b3"><span>$sdata['wepe']</span></td>
</tr> </tr>
<tr> <tr>
<td class="b2" height=20px><span>{lang inf}</span></td> <td class="b2" height=20px><span>{lang inf}</span></td>
<td class="b3"> <td class="b3"><span>$sdata['infdata']</span></td>
<span>
<!--{if $inf}-->
<!--{loop $infinfo $key $val}-->
<!--{if strpos($s_inf,$key)!==false}-->
$val
<!--{/if}-->
<!--{/loop}-->
<!--{else}-->
<!--{/if}-->
</span>
</td>
<td class="b2"><span>{lang pose}</span></td> <td class="b2"><span>{lang pose}</span></td>
<td class="b3"><span>$poseinfo[$s_pose]</span></td> <td class="b3"><span>$poseinfo[$sdata['pose']]</span></td>
<td class="b2"><span>{lang tactic}</span></td> <td class="b2"><span>{lang tactic}</span></td>
<td class="b3"><span>$tacinfo[$s_tactic]</span></td> <td class="b3"><span>$tacinfo[$sdata['tactic']]</span></td>
</tr> </tr>
</table> </table>
</td> </td>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<!--{/if}--> <!--{/if}-->
<td width=100px> <td width=100px>
<!-- 切换副武器 --> <!-- 切换副武器 -->
<!--{if $s_wep2s}--> <!--{if $pdata['wep2s']}-->
<input type="button" class="cmdbutton" style="width:95" value="切换" onclick="$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;"> <input type="button" class="cmdbutton" style="width:95" value="切换" onclick="$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;">
<!--{/if}--> <!--{/if}-->
</td> </td>
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
当前选择是:<span class="yellow b"><!--{if !empty($nchoice)}-->$itemspkinfo[$nchoice]<!--{else}--><!--{/if}--></span> 当前选择是:<span class="yellow b"><!--{if !empty($nchoice)}-->$itemspkinfo[$nchoice]<!--{else}--><!--{/if}--></span>
&nbsp; &nbsp;
变更选择为: 变更选择为:
<select name="c1_veteran_choice" id="c1_veteran_choice" onchange="$('mode').value='revskpts';$('command').value='actskill_c1_veteran';postCmd('gamecmd','command.php');this.disabled=true;"> <select name="upgpara" id="upgpara" onchange="$('mode').value='revskpts';$('command').value='upgskill_c1_veteran';postCmd('gamecmd','command.php');this.disabled=true;">
<!--{if empty($nchoice)}--> <!--{if empty($nchoice)}-->
<option value="" selected><br /> <option value="" selected><br />
<!--{/if}--> <!--{/if}-->
<!--{loop $cskills['c1_veteran']['vars']['defkind'] $key}--> <!--{loop $cskills['c1_veteran']['choice'] $key}-->
<!--{if $key != $nchoice}--> <!--{if $key != $nchoice}-->
<option value="$key">$itemspkinfo[$key]<br /> <option value="$key">$itemspkinfo[$key]<br />
<!--{else}--> <!--{else}-->
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<table class="skilltable"> <table class="skilltable">
<tr> <tr>
<td valign="center" align="center"> <td valign="center" align="center">
<span class="yellow b">18级时解锁</span> <span class="yellow">18级时解锁</span>
</td> </td>
</tr> </tr>
</table> </table>
......
<!--{eval $skid = 'c5_focus'; $cskill = $cskills[$skid];}-->
<!--{if isset($cskill['maxlvl'])}-->
<!--{eval $now_clvl = get_skilllvl($skid,$uidata); $max_lvl_flag = $now_clvl >= $cskill['maxlvl'] ? 1 : 0;}-->
<!--{/if}-->
<tr>
<td class="b1" width="40">
<span>{$cskill['name']}</span>
</td>
<td>
<!--{eval $unlock_skid_flag = check_skill_unlock('c5_focus',$uidata);}-->
<!--{eval $para = get_clbpara($uidata['clbpara']); $nchoice = $para['skillpara']['c5_focus']['choice'];}-->
<!--{if $unlock_skid_flag}-->
<div style="position:relative; height:100%; width:100%;" onmouseover="skill_unacquired_mouseover.call(this,event)" onmouseout="skill_unacquired_mouseout.call(this,event)">
<div class="skill_unacquired">
<!--{/if}-->
<table class="skilltable">
<tr>
<td class="skilldesc_left b3">
<span class="skilldesc">
<!--{eval $cdesc = parse_skilldesc($skid,$uidata);}-->
{$cdesc}
<span style="text-align:left; display:inline-block;">
<table>
<tr><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--{if $nchoice==1}--><span ><!--{/if}-->(1) 遇敌率提高15% <!--{if $nchoice==1}--></span><!--{/if}-->
</td><td>
<!--{if $nchoice==1}--><span class="lime">[当前选择]</span><!--{else}--><input type="button" style="width:46px" onclick="$('mode').value='revskpts';$('command').value='upgskill_{$skid}';$('subcmd').name='upgpara';$('subcmd').value='1';postCmd('gamecmd','command.php');this.disabled=true;" value="选择"><!--{/if}-->
</td></tr>
<tr><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--{if $nchoice==0}--><span ><!--{/if}-->(2) 无效果 <!--{if $nchoice==0}--></span><!--{/if}-->
</td><td>
<!--{if $nchoice==0}--><span class="lime">[当前选择]</span><!--{else}--><input type="button" style="width:46px" onclick="$('mode').value='revskpts';$('command').value='upgskill_{$skid}';$('subcmd').name='upgpara';$('subcmd').value='0';postCmd('gamecmd','command.php');this.disabled=true;" value="选择"><!--{/if}-->
</td></tr>
<tr><td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--{if $nchoice==2}--><span ><!--{/if}-->(3) 物品发现率提高15% <!--{if $nchoice==2}--></span><!--{/if}-->
</td><td>
<!--{if $nchoice==2}--><span class="lime">[当前选择]</span><!--{else}--><input type="button" style="width:46px" onclick="$('mode').value='revskpts';$('command').value='upgskill_{$skid}';$('subcmd').name='upgpara';$('subcmd').value='2';postCmd('gamecmd','command.php');this.disabled=true;" value="选择"><!--{/if}-->
</td></tr>
</table>
</span>
</span>
</td>
<td class="skilldesc_right b3">
</td>
</tr>
</table>
<!--{if $unlock_skid_flag}-->
</div>
<div class="skill_unacquired_hint">
<table class="skilltable">
<tr>
<td valign="center" align="center">
<!--{eval $skid_lockdesc = $cskill['lockdesc'][$unlock_skid_flag];}-->
<span class="yellow">$skid_lockdesc</span>
</td>
</tr>
</table>
</div>
</div>
<!--{/if}-->
</td>
</tr>
\ No newline at end of file
<!-- 注意:大部分技能可以直接通过编辑配置文件完成 -->
<!-- 可能的、需要新建模板的情况:你的技能需要在面板内执行比较复杂的、单靠配置文件无法实现的操作 -->
<!--{eval $cskill = $cskills[$skid];}-->
<!--{if isset($cskill['maxlvl'])}-->
<!--{eval $now_clvl = get_skilllvl($skid,$uidata); $max_lvl_flag = $now_clvl >= $cskill['maxlvl'] ? 1 : 0;}-->
<!--{/if}-->
<tr>
<td class="b1" width="40">
<span>{$cskill['name']}</span>
</td>
<td>
<!-- ↓↓↓ 存在解锁条件的技能才需要有这一部分 ↓↓↓ -->
<!--{eval $unlock_flag = check_skill_unlock($skid,$uidata);}-->
<!--{if $unlock_flag}-->
<div style="position:relative; height:100%; width:100%;" onmouseover="skill_unacquired_mouseover.call(this,event)" onmouseout="skill_unacquired_mouseout.call(this,event)">
<div class="skill_unacquired">
<!--{/if}-->
<!-- ↑↑↑ 存在解锁条件的技能才需要有这一部分 ↑↑↑ -->
<table class="skilltable">
<tr>
<td class="skilldesc_left b3">
<span class="skilldesc">
<!--{eval $cdesc = parse_skilldesc($skid,$uidata);}-->
{$cdesc}
</span>
</td>
<td class="skilldesc_right b3">
<!--{if !empty($cskill['num_input']) && empty($max_lvl_flag)}-->
<input type="number" name="upgskill_{$skid}_nums" style="width:40px" value="1">
<!--{/if}-->
<!--{if !empty($cskill['input']) && empty($max_lvl_flag)}-->
<input type="button" onclick="$('mode').value='revskpts';$('command').value='upgskill_{$skid}';postCmd('gamecmd','command.php');this.disabled=true;" value="{$cskill['input']}">
<!--{/if}-->
</td>
</tr>
</table>
<!-- ↓↓↓ 存在解锁条件的技能才需要有这一部分 ↓↓↓ -->
<!--{if $unlock_flag}-->
</div>
<div class="skill_unacquired_hint">
<table class="skilltable">
<tr>
<td valign="center" align="center">
<span class="yellow">
<!-- 未满足解锁条件时显示的文本,自己填或使用下面的方式 -->
<!--{eval $skid_lockdesc = $cskill['lockdesc'][$unlock_flag];}-->
<!--{if is_array($unlock_flag)}-->
<!--{eval $unlock_cd = $unlock_flag[1]; $unlock_flag = $unlock_flag[0]; $unlock_flag = str_replace("[:cd:]","$unlock_cd",$unlock_flag);}-->
<!--{/if}-->
<!--{eval $unlock_flag = is_array($cskill['lockdesc']) ? $cskill['lockdesc'][$unlock_flag] : $cskill['lockdesc']; $unlock_flag = isset($unlock_cd) ? str_replace("[:cd:]","$unlock_cd",$unlock_flag) : $unlock_flag;}-->
<span class="yellow">$skid_lockdesc</span>
</span>
</td>
</tr>
</table>
</div>
</div>
<!--{/if}-->
<!-- ↑↑↑ 存在解锁条件的技能才需要有这一部分 ↑↑↑ -->
</td>
</tr>
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!--{if is_array($skdata)}--> <!--{if is_array($skdata)}-->
<!--{eval include template($skdata[0]);}--> <!--{eval include template($skdata[0]);}-->
<!--{elseif !empty($skdata)}--> <!--{elseif !empty($skdata)}-->
$skdata <!--{eval $skid = $skdata;include template('skill_temp');}-->
<!--{/if}--> <!--{/if}-->
<!--{/loop}--> <!--{/loop}-->
</table> </table>
......
...@@ -124,9 +124,8 @@ if($mode == 'enter') { ...@@ -124,9 +124,8 @@ if($mode == 'enter') {
//$itm[6] = '银白盒子'; $itmk[6] = 'p'; $itme[6] = 1; $itms[6] = 1; $itmsk[6] = 'ps'; //$itm[6] = '银白盒子'; $itmk[6] = 'p'; $itme[6] = 1; $itms[6] = 1; $itmsk[6] = 'ps';
$itm[5] = '秋刀鱼罐头'; $itmk[5] = 'HB'; $itme[5] = 70; $itms[5] = 15; $itm[5] = '秋刀鱼罐头'; $itmk[5] = 'HB'; $itme[5] = 70; $itms[5] = 15;
//$itm[5] = 'GRAND OPENING 「开门大吉」'; $itmk[5] = 'p000'; $itme[5] = 1; $itms[5] = 1; //$itm[5] = 'GRAND OPENING 「开门大吉」'; $itmk[5] = 'p000'; $itme[5] = 1; $itms[5] = 1;
$dice = rand(1,2); $dice = rand(1,5); $dice_name = $clubinfo[$dice];
if($dice == 1){$itm[5] = '「铁拳无敌 社团卡」'; $itmk[5] = 'ZB'; $itme[5] = 1; $itms[5] = 1;} $itm[5] = '「'.$dice_name.' 社团卡」'; $itmk[5] = 'ZB'; $itme[5] = $dice; $itms[5] = 1;
else{$itm[5] = '「见敌必斩 社团卡」'; $itmk[5] = 'ZB'; $itme[5] = 2; $itms[5] = 1;}
if ($wingames <=1){ if ($wingames <=1){
$itm[6] = '银白盒子'; $itmk[6] = 'ps'; $itme[6] = 1; $itms[6] = 1; $itmsk[6] = ''; $itm[6] = '银白盒子'; $itmk[6] = 'ps'; $itme[6] = 1; $itms[6] = 1; $itmsk[6] = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment