Commit 82d46924 authored by hisuinohoshi's avatar hisuinohoshi

fix

修正:
- 循环打击会丢失伤害的BUG;
- 团队胜利无法正确储存中文名的BUG;
- 将主动技log显示时间移至打击log出现后;
parent 87c7bb99
......@@ -151,7 +151,7 @@
{
# 社团技能初始化(主动型/战斗技)
attr_extra_active_skills($pa,$pd,$active);
attr_extra_active_skills($pd,$pa,$active);
//attr_extra_active_skills($pd,$pa,$active);
# 社团技能初始化(被动型)(最好不要在这个阶段输出log,把log和成功触发的标记保存进对应角色里,到实际结算效果时再显示。)
if(!empty($pa['clbpara']['skill'])) attr_extra_passive_skills($pa,$pd,$active);
if(!empty($pd['clbpara']['skill'])) attr_extra_passive_skills($pd,$pa,$active);
......@@ -1952,7 +1952,7 @@
#「双响」效果判定
if(isset($pa['bskill_c5_double']))
{
unset($pa['bskill_c5_double']);
unset($pa['bskill_c5_double']);unset($pa['bskilllog']);
$log .= "<span class=\"yellow\">{$pa['nm']}引爆了预埋的另一组爆炸物!</span><br>";
$loop = 1;
}
......
......@@ -28,7 +28,7 @@
if($bsk_cost) $pa['rage'] -= $bsk_cost;
# 成功释放主动技,应用标记
$pa['bskill_'.$bsk] = 1;
$log .= "<span class=\"lime\">{$pa['nm']}{$pd['nm']}发动了技能「{$bsk_name}」!</span><br>";
$pa['bskilllog'] .= "<span class=\"lime\">{$pa['nm']}{$pd['nm']}发动了技能「{$bsk_name}」!</span><br>";
# 限次技每次使用时次数+1
if(get_skilltags($bsk,'limit'))
{
......@@ -55,7 +55,7 @@
shuffle($npc_skill);
foreach($npc_skill as $sk)
{
if(get_skilltags($sk,'battle') && !check_skill_unlock($sk,$pa) && !check_skill_cost($pa['bskill'],$pa))
if(get_skilltags($sk,'battle') && !check_skill_unlock($sk,$pa) && !check_skill_cost($sk,$pa))
{
$bsk = $sk;
$bsk_name = $cskills[$bsk]['name'];
......
......@@ -253,9 +253,6 @@
# 传参的时候只用考虑参数位置,不用管pa、pd具体是谁。
att_loop_flag:
$att_dmg = rev_attack($pa,$pd,$active);
# 检查是否循环打击流程:一些特殊技能可能需要此效果
$att_loop = check_loop_rev_attack($pa,$pd,$active);
if($att_loop) goto att_loop_flag;
# 存在暴毙标识:进攻方(pa)在进攻过程中未造成伤害就暴毙,可能是因为触发了武器直死。
if(isset($pa['gg_flag']))
......@@ -274,6 +271,13 @@
$att_result = rev_combat_result($pa,$pd,$active);
}
# 检查是否循环打击流程:一些特殊技能可能需要此效果
if($att_result)
{
$att_loop = check_loop_rev_attack($pa,$pd,$active);
if($att_loop) goto att_loop_flag;
}
# 反击流程判断:$att_result>0,且敌人非治疗姿态或重视躲藏才会触发反击。 TODO:为反击条件新建一个函数
if ($pd['hp']>0 && $att_result>0 && check_can_counter($pa,$pd,$active))
{
......@@ -529,6 +533,8 @@
$pa['wep_name'] = $pa['wep'];
$log .= "{$pa['nm']}使用{$pa['wep']}<span class=\"yellow\">{$attinfo[$pa['wep_kind']]}</span>{$pd['nm']}!<br>";
# 战斗技文本
if(isset($pa['bskilllog'])) $log.= $pa['bskilllog'];
# 命中次数大于0时 执行伤害判断
if ($pa['hitrate_times'] > 0)
......
......@@ -510,12 +510,12 @@ function gameover($time = 0, $mode = '', $winname = '') {
if(($winmode == 3 || $winmode == 7) && !empty($pdata['teamID']))
{
$team = $pdata['teamID']; $team_mates = Array($pdata['name']);
$tresult = $db->query("SELECT name FROM {$tablepre}players WHERE teamID='$team' AND type=0");
$tresult = $db->query("SELECT name,ip FROM {$tablepre}players WHERE teamID='$team' AND type=0");
if($db->num_rows($tresult) > 1)
{
while($tpdata = $db->fetch_array($tresult))
{
if(!in_array($tpdata['name'],$team_mates))
if(!in_array($tpdata['name'],$team_mates) && $tpdata['ip'] != $pdata['ip'])
{
$team_mates[] = $tpdata['name'];
//队伍获胜时 同队玩家也可以获得对应结局成就
......@@ -538,7 +538,7 @@ function gameover($time = 0, $mode = '', $winname = '') {
$pdata['getime'] = $time;
$pdata['hdmg'] = $hdamage;
$pdata['hdp'] = $hplayer;
$pdata['teamMate'] = !empty($team_mates) ? json_encode($team_mates) : '';
$pdata['teamMate'] = !empty($team_mates) ? implode("+",$team_mates) : '';
$pdata['teamIcon'] = !empty($team_mates) ? 1 : 0;
$db->query("INSERT INTO {$tablepre}winners (gid,nick,name,pass,type,endtime,gd,sNo,icon,club,hp,mhp,sp,msp,ss,mss,att,def,pls,lvl,`exp`,money,bid,inf,rage,pose,tactic,killnum,killnum2,state,wp,wk,wg,wc,wd,wf,teamID,teamPass,teamMate,teamIcon,wep,wepk,wepe,weps,arb,arbk,arbe,arbs,arh,arhk,arhe,arhs,ara,arak,arae,aras,arf,arfk,arfe,arfs,art,artk,arte,arts,itm0,itmk0,itme0,itms0,itm1,itmk1,itme1,itms1,itm2,itmk2,itme2,itms2,itm3,itmk3,itme3,itms3,itm4,itmk4,itme4,itms4,itm5,itmk5,itme5,itms5,itm6,itmk6,itme6,itms6,motto,wmode,vnum,gtime,gstime,getime,hdmg,hdp,hkill,hkp,wepsk,arbsk,arhsk,arask,arfsk,artsk,itmsk0,itmsk1,itmsk2,itmsk3,itmsk4,itmsk5,itmsk6) VALUES ('".$gamenum."','".$pdata['nick']."','".$pdata['name']."','".$pdata['pass']."','".$pdata['type']."','".$pdata['endtime']."','".$pdata['gd']."','".$pdata['sNo']."','".$pdata['icon']."','".$pdata['club']."','".$pdata['hp']."','".$pdata['mhp']."','".$pdata['sp']."','".$pdata['msp']."','".$pdata['ss']."','".$pdata['mss']."','".$pdata['att']."','".$pdata['def']."','".$pdata['pls']."','".$pdata['lvl']."','".$pdata['exp']."','".$pdata['money']."','".$pdata['bid']."','".$pdata['inf']."','".$pdata['rage']."','".$pdata['pose']."','".$pdata['tactic']."','".$pdata['killnum']."','".$pdata['killnum2']."','".$pdata['state']."','".$pdata['wp']."','".$pdata['wk']."','".$pdata['wg']."','".$pdata['wc']."','".$pdata['wd']."','".$pdata['wf']."','".$pdata['teamID']."','".$pdata['teamPass']."','".$pdata['teamMate']."','".$pdata['teamIcon']."','".$pdata['wep']."','".$pdata['wepk']."','".$pdata['wepe']."','".$pdata['weps']."','".$pdata['arb']."','".$pdata['arbk']."','".$pdata['arbe']."','".$pdata['arbs']."','".$pdata['arh']."','".$pdata['arhk']."','".$pdata['arhe']."','".$pdata['arhs']."','".$pdata['ara']."','".$pdata['arak']."','".$pdata['arae']."','".$pdata['aras']."','".$pdata['arf']."','".$pdata['arfk']."','".$pdata['arfe']."','".$pdata['arfs']."','".$pdata['art']."','".$pdata['artk']."','".$pdata['arte']."','".$pdata['arts']."','".$pdata['itm0']."','".$pdata['itmk0']."','".$pdata['itme0']."','".$pdata['itms0']."','".$pdata['itm1']."','".$pdata['itmk1']."','".$pdata['itme1']."','".$pdata['itms1']."','".$pdata['itm2']."','".$pdata['itmk2']."','".$pdata['itme2']."','".$pdata['itms2']."','".$pdata['itm3']."','".$pdata['itmk3']."','".$pdata['itme3']."','".$pdata['itms3']."','".$pdata['itm4']."','".$pdata['itmk4']."','".$pdata['itme4']."','".$pdata['itms4']."','".$pdata['itm5']."','".$pdata['itmk5']."','".$pdata['itme5']."','".$pdata['itms5']."','".$pdata['itm6']."','".$pdata['itmk6']."','".$pdata['itme6']."','".$pdata['itms6']."','".$pdata['motto']."','".$pdata['wmode']."','".$pdata['vnum']."','".$pdata['gtime']."','".$pdata['gstime']."','".$pdata['getime']."','".$pdata['hdmg']."','".$pdata['hdp']."','".$pdata['hkill']."','".$pdata['hkp']."','".$pdata['wepsk']."','".$pdata['arbsk']."','".$pdata['arhsk']."','".$pdata['arask']."','".$pdata['arfsk']."','".$pdata['artsk']."','".$pdata['itmsk0']."','".$pdata['itmsk1']."','".$pdata['itmsk2']."','".$pdata['itmsk3']."','".$pdata['itmsk4']."','".$pdata['itmsk5']."','".$pdata['itmsk6']."')");
}
......
......@@ -36,7 +36,7 @@ if($command == 'info') {
$wdata['teamID'] = '<span class="gold">【团队 - '.$wdata['teamID'].'】</span>';
$wdata['iconImg'] = 't_'.$wdata['teamIcon'].'.gif';
$wdata['nickinfo'] = '<span class="gold">团队胜利</span>';
$wdata['name'] = json_decode($wdata['teamMate'],true);
$wdata['name'] = explode("+",$wdata['teamMate']);
}
else
{
......
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