Commit 0d67f709 authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #22 from hikawiier/waaagh

rev combat phase 1~2.33




…………也许,所谓「过去」就是那样的东西吧……
parents cfd8b1ec 4d4c0c2f
......@@ -405,23 +405,48 @@ if($hp > 0){
} elseif($mode == 'combat') {
include_once GAME_ROOT.'./include/game/combat.func.php';
combat(1,$command);
include_once GAME_ROOT.'./include/game/revcombat.func.php';
combat(1,$command);
} elseif($mode == 'revcombat'){
//NPC vs NPC:
if($command == 'enter' && (strpos($action,'corpse')===0 || strpos($action,'pacorpse')===0))
global $action;
if(strpos($action,'enemy')===0)
{
$cid = strpos($action,'corpse')===0 ? str_replace('corpse','',$action) : str_replace('pacorpse','',$action);
if($cid)
{
global $db,$tablepre;
$result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='$cid' AND hp=0");
if($db->num_rows($result)>0)
{
$edata = $db->fetch_array($result);
extract($edata,EXTR_PREFIX_ALL,'w');
include_once GAME_ROOT.'./include/game/battle.func.php';
findcorpse($edata);
}
}
$enemyid = str_replace('enemy','',$action);
}
if(!$enemyid || (strpos($action,'enemy')===false))
{
$log .= "<span class=\"yellow b\">你没有遇到敌人,或已经离开战场!</span>{$enemyid}<br>";
goto back_flag;
}
$result = $db->query ( "SELECT * FROM {$tablepre}players WHERE pid='$enemyid'" );
if (! $db->num_rows ( $result )) {
$log .= "对方不存在!<br>";
goto back_flag;
}
$edata = $db->fetch_array($result);
if ($edata ['pls'] != $pls)
{
$log .= "<span class=\"yellow b\">" . $edata ['name'] . "</span>已经离开了<span class=\"yellow b\">$plsinfo[$pls]</span>。<br>";
}
elseif ($edata ['hp'] <= 0)
{
$log .= "<span class=\"red b\">" . $edata ['name'] . "</span>已经死亡,不能被攻击。<br>";
include_once GAME_ROOT . './include/game/battle.func.php';
$action = 'corpse'.$edata['pid'];
findcorpse($edata);
}
elseif ($command == 'back')
{
$log .= "你逃跑了。";
$action = '';
back_flag:
$mode = 'command';
}
else
{
include_once GAME_ROOT . './include/game/revcombat.func.php';
rev_combat_prepare($pdata,$edata,1,$command,$message);
}
} elseif($mode == 'rest') {
include_once GAME_ROOT.'./include/state.func.php';
......
......@@ -108,7 +108,7 @@ elseif((strpos($action,'neut')===0)){
$result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='$nid' AND hp>0");
if($db->num_rows($result)>0){
$edata = $db->fetch_array($result);
include_once GAME_ROOT.'./include/game/revcombat.func.php';
include_once GAME_ROOT.'./include/game/revbattle.func.php';
findneut($edata,1);
extract($edata,EXTR_PREFIX_ALL,'w');
init_battle(1);
......
......@@ -17,18 +17,62 @@ $dmg_fluc = Array('N' => 15, 'P' => 15, 'K' => 40, 'G' => 20, 'C' => 5, 'D' => 2
//熟练度对伤害的影响,每点熟练度增加的伤害
$skill_dmg = Array('N' => 0.6, 'P' => 0.6, 'K' => 0.65, 'G' => 0.6, 'C' => 0.4, 'D' => 0.75, 'F'=> 0.4, 'J'=>0.7);
//$skill_dmg = Array('N' => 0.5, 'P' => 0.5, 'K' => 0.5, 'G' => 0.6, 'C' => 0.3, 'D' => 0.4, 'F'=> 1.2);
//各攻击方式对应的防御属性
$def_kind = Array(
'P' => 'P',
'K' => 'K',
'G' => 'G', 'J' => 'G',
'C' => 'C',
'D' => 'D',
'F' => 'F',
);
//天气对攻击力的影响(单位:百分比加算)
$weather_attack_modifier = Array(10,10,0,-5,-10,-20,-15,0,0,7,20,-7,-20,-5,-10,-10,-10,10);
//天气对防御力的影响(单位:百分比加算)
$weather_defend_modifier = Array(10,30,0,0,-3,-15,-10,0,-20,-30,-50,-5,-20,-3,-20,5,-30,30);
//姿态对攻击力的影响(单位:百分比加算)
$pose_attack_modifier = Array(0,100,0,-25,25,-50,50);
//姿态对防御力的影响(单位:百分比加算)
$pose_defend_modifier = Array(0,25,0,-25,-50,-50,-466);
//应战策略对攻击力的加成(单位:百分比加算)
$tactic_attack_modifier = Array(0,20,-25,25,-50);
//应战策略对防御力的加成(单位:百分比加算)
$tactic_defend_modifier = Array(0,-20,50,-25,0);
//场景对攻击力的加成(单位:百分比加算) wtf
$pls_attack_modifier = Array(
// 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵
10, 0, 0, -5, 0, 5, 5, -5, -5, 5, 0, -15, -5, 0, -10, 0, 0, 5, -5, -15, -5, 0, 0, 0, 0, 0, 10, -10, 5, 0, 0, 0, -20, 0, 15
// 0, 0, 0, 0, 0, 0, 10, 0, 0, -10, 0, 0, 0, 0, -10, 0, 0, 0, 10, 0, 0, 0
);
//场景对防御力的加成(单位:百分比加算)
$pls_defend_modifier = Array(
// 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵
0, -10, 0, 0, -10, 0, 0, 0, 0, 0, -10, 5, 0, -10, 0, 0, 5, 0, 0, 0, 0, 0, -10, -10, -10, 0, 0, 0, 5, 5, 5, 0, 0, -5, 0
// 0, -10, 10, 0, 0, 0, 0, 0, 0, 0, 0, -10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0
);
//各种攻击方式可能导致受伤的部位
$infatt = Array('N' => 'bhaf', 'P' => 'bhaf', 'K' =>'bhaf', 'G' =>'bhaf', 'C'=> 'bhaf', 'D' => 'bhaf', 'F'=> 'bhaf', 'J'=> 'bhaf');
//各种攻击方式可能导致受伤的部位
$infatt_rev = Array('N' => Array('b','h','a','f'), 'P' => Array('b','h','a','f'), 'K' => Array('b','h','a','f'), 'G' => Array('b','h','a','f'), 'C'=> Array('b','h','a','f'), 'D' => Array('b','h','a','f'), 'F'=> Array('b','h','a','f'), 'J'=> Array('b','h','a','f'),);
//各种攻击方式的致伤率
$infobbs = Array('N' => 5, 'P' => 15, 'K' => 55, 'G' => 20, 'C' => 10, 'D' => 45, 'F' => 30, 'J'=> 100);
//$infobbs = Array('N' => 5, 'P' => 15, 'K' => 30, 'G' => 30, 'C' => 15, 'D' => 40, 'F' => 30);
//各种攻击方式的武器损伤概率
$wepimprate = Array('N' => -1, 'P' => 12, 'K' => 30, 'G' => -1, 'C' => -1, 'D' => -1, 'F' => -1, 'J'=> -1);
//特殊效果发生的概率,这里指属性,跟武器系别无关
$specialrate = Array('N' => 40, 'n' => 30, 'B' => 95 ,'b' => 95);
$specialrate = Array('N' => 40, 'n' => 30, 'y' => 30, 'B' => 95 ,'b' => 95);
//属性攻击登录
$ex_attack = Array('p', 'u', 'i', 'd', 'e','w','f','k');
//各属性攻击对应的防御属性
$ex_def_kind = Array(
'p' => 'q',
'u' => 'U', 'f' => 'U',
'i' => 'I', 'k' => 'I',
'e' => 'E',
'w' => 'W',
'd' => 'D',
);
//各种属性攻击的得意武器( 伤害2倍)
$ex_good_wep = Array('p' => 'K','u' => 'G','i'=> 'C','d' => 'D', 'e' => 'P', 'w' => 'D');
//各种属性攻击的得意社团(致伤命中率+20)
......
......@@ -50,7 +50,7 @@ $clubinfo = Array(
98=>'换装迷宫',
99=>'决死结界'
);
$wthinfo = Array('晴天','大晴','多云','小雨','暴雨','台风','雷雨','下雪','起雾','浓雾','<span class="yellow">瘴气</span>','<span class="red">龙卷风</span>','<span class="clan">暴风雪</span>','<span class="blue">冰雹</span>','<span class="linen">离子暴</span>','<span class="green">辐射尘</span>','<span class="purple">臭氧洞</span>');
$wthinfo = Array('晴天','大晴','多云','小雨','暴雨','台风','雷雨','下雪','起雾','浓雾','<span class="yellow">瘴气</span>','<span class="red">龙卷风</span>','<span class="clan">暴风雪</span>','<span class="blue">冰雹</span>','<span class="linen">离子暴</span>','<span class="green">辐射尘</span>','<span class="purple">臭氧洞</span>','<span class="gold">极光</span>');
$sexinfo = Array(0=> '未定', 'm' => '男生', 'f' => '女生');
$raceinfo = Array(0=> '人类', 1=> '兽人', 2=> '妖精', 3=> '龙', 4=> '鱼人', 5=> 'AI');
$hpinfo = Array('并无大碍','伤痕累累','生命危险','已经死亡');
......@@ -1144,6 +1144,7 @@ $itemspkinfo_tooltip = Array
'w' => Array('title' => "攻击对手时,将产生额外的音波属性伤害。也有可能让对手陷入混乱异常状态。",),
'X' => Array('title' => "可能会一击必杀。",),
'x' => Array('title' => "人类,可以挑战神么?",),
'y' => Array('title' => "攻击对手时,一定几率无效属性抹消类与属性防御类属性,并增加让对手陷入异常状态的概率。",),
'Z' => Array('title' => "该物品可以使用特定物品进行强化。",),
'z' => Array('title' => "那么,这个有什么用呢……?",),
'-' => Array('title' => "战斗时无效双方的防具效果。",),
......@@ -1196,6 +1197,7 @@ $itemspkinfo = Array(
'w' => '音波',
'X' => '直死', //NPC专用
'x' => '奇迹',
'y' => '破格', //属穿
'Z' => '菁英',
'z' => '天然',
'-' => '精神抽取',
......
......@@ -91,6 +91,7 @@ table.admin td.tdtitle {
.clit {color: #feea23; font:18pt "微软雅黑" serif; }
.yellow{color:#ffff00; font: bold 10pt "微软雅黑" serif;line-height:16px}
.gold{color:rgb(255,215,0);font: bold 10pt "微软雅黑" serif;line-height:16px}
.clan{color: #00ffff;font: bold 10pt "微软雅黑" serif;line-height:16px}
.blue{color: #0060ff;font: bold 10pt "微软雅黑" serif;line-height:16px}
.red{color: #ff0000;font: bold 10pt "微软雅黑" serif;line-height:16px}
......@@ -370,7 +371,7 @@ span[tooltip]:hover:before {
text-shadow:3px 3px 3px #3b3535; text-align: center; text-fill-color: white; -webkit-text-fill-color: white;
background-size: 0; background-clip: border-box; background-color: rgba(198, 114, 199, 0.8);
top: 20px; left: -5px; border-radius: 2px;
width: 160px; max-width: 160px; z-index: 3; position: absolute;
width: 160px; max-width: 160px; z-index: 3; position: absolute; z-index: 5;
}
/*==========下拉菜单样式==========*/
......
img/n_63.gif

6.95 KB | W: | H:

img/n_63.gif

6.95 KB | W: | H:

img/n_63.gif
img/n_63.gif
img/n_63.gif
img/n_63.gif
  • 2-up
  • Swipe
  • Onion skin
img/n_64.gif

5.66 KB | W: | H:

img/n_64.gif

5.7 KB | W: | H:

img/n_64.gif
img/n_64.gif
img/n_64.gif
img/n_64.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -359,27 +359,120 @@ function init_battle($ismeet = 0){
return;
}
//function get_pstate($pid){//玩家状态储存在内存表里,读取之前先判断是否存在
// global $db,$tablepre,$now;
// $result=$db->query("SELECT * FROM {$tablepre}pstate WHERE pid = '$pid'");
// if($db->num_rows($result)){
// $psdata = $db->fetch_array($result);
// }else{
// $psdata = false;
// }
// return $psdata;
//}
//function set_pstate($psdata){//玩家状态储存在内存表里,若存在则更新记录,否则创建记录
// global $db,$tablepre;
// $pid = $psdata['pid'];
// $result=$db->query("SELECT * FROM {$tablepre}pstate WHERE pid = '$pid'");
// if($db->num_rows($result)){
// return $db->array_update("{$tablepre}pstate",$psdata," pid = '$pid'");
// }else{
// return $db->array_insert("{$tablepre}pstate",$psdata);
// }
//}
function init_rev_battle($ismeet = 0)
{
global $fog,$hpinfo,$spinfo,$rageinfo,$wepeinfo,$typeinfo,$sexinfo,$infinfo;
$ui_data = Array('hpstate','spstate','ragestate','wepestate','wepk_words','wep_words','infdata','iconImg','iconImgB','sNoinfo');
$init_data = update_db_player_structure();
foreach(Array('w_','s_') as $p)
{
foreach ($init_data as $i)
{
global ${$p.$i};
}
foreach($ui_data as $u)
{
global ${$p.$u};
}
//更新血量、体力、怒气显示
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_itm_desc(${$p.'wep'},'m');
${$p.'wepk_words'} = parse_itm_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 get_remaincdtime($pid){
$psdata = get_pstate($pid);
......@@ -393,8 +486,24 @@ function get_remaincdtime($pid){
}
}
//用于将当前玩家数据保存至数据库
function current_player_save(){
global $db,$tablepre;
$pdata = Array();
$data = update_db_player_structure();
foreach($data as $key)
{
global $$key;
$pdata[$key]= $$key;
}
$pdata = player_format_with_db_structure($pdata);
$db->array_update("{$tablepre}players",$pdata,"pid='$pid'");
return $pdata;
}
//用于将指定player数据存回数据库
function player_save($data){
global $db,$tablepre;
$ndata = Array();
if(isset($data['pid'])){
$pid = $data['pid'];
$ndata = player_format_with_db_structure($data);
......@@ -403,6 +512,7 @@ function player_save($data){
}
return;
}
//用于刷新当前玩家数据
function player_load($data)
{
$ndata = player_format_with_db_structure($data);
......
......@@ -17,9 +17,14 @@ $tacinfo = Array('通常','','重视防御','重视反击','重视躲避',);
function get_find_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf = ''){
$_FIND = Array
(
'weather' => array(10,20,0,-2,-3,-10,-7,5,-10,-20,0,-7,-5,-30,-5,-20,0),
'weather' => array(10,20,0,-2,-3,-10,-7,5,-10,-20,0,-7,-5,-30,-5,-20,0,20),
//'weather' => array(10,20,0,-2,-3,-7,-10,-5,10,0,0,-7,-5,-30),
'pls' => array(10,0,0,10,-10,10,0,10,-10,0,10,0,0,-10,0,-10,-10,-10,0,10,0,10),
//'pls' => array(10,0,0,10,-10,10,0,10,-10,0,10,0,0,-10,0,-10,-10,-10,0,10,0,10),
'pls' => Array(
// 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵
20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 20
// 10, 0, 0, 10, -10, 10, 0, 10, -10, 0, 10, 0, 0, -10, 0, -10, -10, -10, 0, 10, 0, 10
),
'pose' => array(0,0,0,25,-10,-25,85),
'tactic' => array(),
);
......@@ -52,7 +57,7 @@ function get_active_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
global $active_obbs,$inf_active_p;
$_ACTIVE = Array
(
'weather' => array(10,20,0,-5,-10,-20,-15,0,-7,-10,-10,-5,0,-5,-20,-5,0),
'weather' => array(10,20,0,-5,-10,-20,-15,0,-7,-10,-10,-5,0,-5,-20,-5,0,20),
//'weather' => array(20,10,0,-3,-5,-5,-7,10,-10,-10,-10,-5,0,-5),
'pls' => array(),
'pose' => array(0,0,0,0,25,-25,5),
......@@ -72,6 +77,9 @@ function get_active_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
//echo 'active:'.$active_r.' ';
return $active_r;
}
# 下面的部分在新版战斗流程中已弃用 #
//命中率修正
function get_hitrate($wkind = 'N',$skill = 0,$club = 0,$inf = ''){
global $hitrate_obbs,$hitrate_max_obbs,$hitrate_r,$weather,$inf_htr_p;
......@@ -106,7 +114,7 @@ function get_attack_p($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
global $inf_att_p;
$_ATTACK = Array
(
'weather' => array(10,10,0,-5,-10,-20,-15,0,0,7,20,-7,-20,-5,-10,-10,-10),
'weather' => array(10,10,0,-5,-10,-20,-15,0,0,7,20,-7,-20,-5,-10,-10,-10,10),
'pls' => array(0,0,0,0,0,0,10,0,0,-10,0,0,0,0,-10,0,0,0,10,0,0,0),
'pose' => array(0,100,0,-25,25,-50,50),
'tactic' => array(0,20,-25,25,-50),
......@@ -131,7 +139,7 @@ function get_defend_p($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
global $inf_def_p;
$_DEFEND = Array
(
'weather' => array(10,30,0,0,-3,-15,-10,0,-20,-30,-50,-5,-20,-3,-20,5,-30),
'weather' => array(10,30,0,0,-3,-15,-10,0,-20,-30,-50,-5,-20,-3,-20,5,-30,30),
'pls' => array(0,-10,10,0,0,0,0,0,0,0,0,-10,10,0,0,0,0,0,0,0,10,0),
'pose' => array(0,25,0,-25,-50,-50,-466),
'tactic' => array(0,-20,50,-25,0),
......
......@@ -79,7 +79,7 @@ function findteam(&$w_pdata){
function findcorpse(&$w_pdata){
global $log,$mode,$main,$battle_title,$cmd,$iteminfo,$itemspkinfo;
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;//,$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;
$battle_title = '发现尸体';
......@@ -114,7 +114,7 @@ function findcorpse(&$w_pdata){
$log .= '你发现了<span class="red">'.$w_name.'</span>的尸体!<br>';
foreach (Array('wep','arb','arh','ara','arf','art','itm0','itm1','itm2','itm3','itm4','itm5','itm6') as $w_value)
{
${$w_value} = parse_itm_desc(${$w_value},'m');
if(isset(${$w_value})) ${$w_value} = parse_itm_desc(${$w_value},'m');
}
foreach (Array('w_wepk','w_arbk','w_arhk','w_arak','w_arfk','w_artk','w_itmk0','w_itmk1','w_itmk2','w_itmk3','w_itmk4','w_itmk5','w_itmk6') as $w_k_value) {
if(${$w_k_value}){
......
......@@ -3,6 +3,8 @@ if (! defined ( 'IN_GAME' )) {
exit ( 'Access Denied' );
}
include_once GAME_ROOT.'./include/game/dice.func.php';
function getskills(&$arr)
{
$arr=Array(
......@@ -777,6 +779,248 @@ function upgradeclubskills($cmd)
}
}
#适配新版战斗函数的社团技能判定函数:
function rev_get_clubskill_bonus_hitrate($aclub,$askl,$pa,$bclub,$bskl,$pd)
{
//命中率系数
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$r=1;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==3 && $pa['wep_kind']=="K") //见敌必斩称号
{
$r*=(1+$clskl[3][${'a'.$i}][1]/100);
}
if ($alearn['learn'.$i]==5 && ($pa['wep_kind']=="G" || $pa['wep_kind']=="J")) //狙击鹰眼称号
{
$r*=(1+$clskl[5][${'a'.$i}][1]/100);
}
if ($blearn['learn'.$i]==12) //宛如疾风称号
{
$r*=(1-$clskl[12][${'b'.$i}][1]/100);
}
}
return $r;
}
function rev_get_clubskill_bonus_imfrate($aclub,$askl,$pa,$bclub,$bskl,$pd)
{
//防具损坏率系数
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$r=1;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==6 && ($pa['wep_kind']=="G" || $pa['wep_kind']=="J")) //狙击鹰眼称号
{
$r*=(1+$clskl[6][${'a'.$i}][1]/100);
}
}
return $r;
}
function rev_get_clubskill_bonus_imftime($aclub,$askl,$pa,$bclub,$bskl,$pd)
{
//防具损坏效果系数
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$r=1;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==6 && ($pa['wep_kind']=="G" || $pa['wep_kind']=="J")) //狙击鹰眼称号
{
$r+=$clskl[6][${'a'.$i}][2];
}
}
return $r;
}
function rev_get_clubskill_bonus_imprate($aclub,$askl,$pa,$bclub,$bskl,$pd)
{
//武器损坏率系数
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$r=1;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==4 && $pa['wep_kind']=="K") //见敌必斩称号
{
$r*=(1-$clskl[4][${'a'.$i}][1]/100);
}
}
return $r;
}
function rev_get_clubskill_bonus($aclub,$askl,$pa,$bclub,$bskl,$pd,&$att,&$def)
{
//攻击防御力加成
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$att=0; $def=0;
for ($i=1; $i<=2; $i++)
{
if ($blearn['learn'.$i]==1 && $pd['wep_kind']=="P") //铁拳无敌称号
{
$dup=$clskl[1][${'b'.$i}][1]/100*$pd['wepe'];
if ($dup>2000) $dup=2000;
$def+=$dup;
}
}
}
function rev_get_clubskill_bonus_p($aclub,$askl,$pa,$bclub,$bskl,$pd,&$att,&$def)
{
//攻击防御加成系数
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$att=1; $def=1;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==2 && $pa['wep_kind']=="P") //铁拳无敌称号
{
$att*=(1+$clskl[2][${'a'.$i}][1]/100);
if (rand(0,99)<$clskl[2][${'a'.$i}][2]) $def*=(1-$clskl[2][${'a'.$i}][3]/100);
}
if ($alearn['learn'.$i]==8 && $pa['wep_kind']=="C") //灌篮高手称号
{
$att*=(1+$clskl[8][${'a'.$i}][1]/100);
}
if ($alearn['learn'.$i]==6 && ($pa['wep_kind']=="G" || $pa['wep_kind']=="J")) //狙击鹰眼称号
{
if (rand(0,99)<$clskl[6][${'a'.$i}][3]) $att*=(1+$clskl[6][${'a'.$i}][4]/100);
}
}
}
function rev_get_clubskill_bonus_fluc($aclub,$askl,$pa,$bclub,$bskl,$pd)
{
//伤害浮动值
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$r=0;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==8 && $pa['wep_kind']=="C") //灌篮高手称号
{
$r+=$clskl[8][${'a'.$i}][2];
}
}
return $r;
}
function rev_get_clubskill_bonus_counter($aclub,$askl,$pa,$bclub,$bskl,$pd)
{
//反击率加成
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$r=1;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==7 && $pa['wep_kind']=='C') //灌篮高手称号
{
$r*=(1+$clskl[7][${'a'.$i}][1]/100);
}
if ($alearn['learn'.$i]==11) //宛如疾风称号
{
$r*=(1+$clskl[11][${'a'.$i}][3]/100);
}
if ($blearn['learn'.$i]==13 && $pd['wep_kind']=='F') //超能力者称号
{
$r*=(1-$clskl[13][${'b'.$i}][2]/100);
}
}
return $r;
}
function rev_get_clubskill_bonus_dmg_rate($aclub,$askl,$pa,$bclub,$bskl,$pd)
{
//最终伤害加成/减成,a为攻击方,b为防御方
getskills2($clskl);
getlearnt($alearn,$aclub,$askl);
getlearnt($blearn,$bclub,$bskl);
$a1=((int)($askl/10))%10; $a2=$askl%10;
$b1=((int)($bskl/10))%10; $b2=$bskl%10;
$ar=100;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==14) //攻击方有晶莹技能,伤害大幅下降
{
$ar-=$clskl[14][${'a'.$i}][1];
}
}
$br=100;
for ($i=1; $i<=2; $i++)
{
if ($blearn['learn'.$i]==14) //防御方有晶莹技能,伤害下降
{
$br-=$clskl[14][${'b'.$i}][2];
}
}
$r = round($ar*$br)/10000*100; //高端的算法往往以低调的姿态示人
return $r;
}
function rev_get_clubskill_bonus_dmg_val($club,$skl,$pa,$pd)
{
//最终伤害增加值
getskills2($clskl);
getlearnt($learn,$club,$skl);
$a1=((int)($skl/10))%10; $a2=$skl%10;
$rate = 0;
for ($i=1; $i<=2; $i++)
{
if ($learn['learn'.$i]==15) //攻击方有剔透技能,得到概率
{
$rate=$clskl[15][${'a'.$i}][1];
}
}
$rate -= round($pa['rp']/20);
if($rate < 0){$rate = 0;}
$rpdmg = $pd['rp'] - $pa['rp'];
$dice = diceroll(99);
if($rpdmg > 0 && $dice < $rate){
return $rpdmg;
}
return 0;
}
function rev_get_clubskill_rp_dec($clb,$skl)
{
//RP增长率下降
getskills2($clskl);
getlearnt($alearn,$clb,$skl);
$a1=((int)($skl/10))%10; $a2=$skl%10;
$r=0;
for ($i=1; $i<=2; $i++)
{
if ($alearn['learn'.$i]==14) $r=$clskl[14][${'a'.$i}][3]; //晶莹剔透1
}
//echo $r;
return $r;
}
#### 原社团技能函数:
function get_clubskill_bonus_p($aclub,$askl,$prefix1,$bclub,$bskl,$prefix2,&$att,&$def)
{
//攻击防御加成系数
......
......@@ -12,6 +12,7 @@ function combat($active = 1, $wep_kind = '') {
global $w_wep, $w_wepk, $w_wepe, $w_weps, $w_arb, $w_arbk, $w_arbe, $w_arbs, $w_arh, $w_arhk, $w_arhe, $w_arhs, $w_ara, $w_arak, $w_arae, $w_aras, $w_arf, $w_arfk, $w_arfe, $w_arfs, $w_art, $w_artk, $w_arte, $w_arts, $w_itm0, $w_itmk0, $w_itme0, $w_itms0, $w_itm1, $w_itmk1, $w_itme1, $w_itms1, $w_itm2, $w_itmk2, $w_itme2, $w_itms2, $w_itm3, $w_itmk3, $w_itme3, $w_itms3, $w_itm4, $w_itmk4, $w_itme4, $w_itms4, $w_itm5, $w_itmk5, $w_itme5, $w_itms5,$w_itm6, $w_itmk6, $w_itme6, $w_itms6, $w_wepsk, $w_arbsk, $w_arhsk, $w_arask, $w_arfsk, $w_artsk, $w_itmsk0, $w_itmsk1, $w_itmsk2, $w_itmsk3, $w_itmsk4, $w_itmsk5, $w_itmsk6;
global $infinfo, $w_combat_inf;
global $rp,$w_rp,$action,$w_action,$achievement,$w_achievement,$skills,$w_skills,$skillpoint,$w_skillpoint;
global $clubpara,$w_clubpara;
$battle_title = '战斗发生';
......@@ -176,9 +177,10 @@ function combat($active = 1, $wep_kind = '') {
} else {
$log .= "<span class=\"red\">你攻击范围不足,不能反击,逃跑了!</span><br>";
}
} elseif($hp > 0) {
} else {
$log .= "<span class=\"red\">你逃跑了!</span><br>";
}
}
if($hp == 0 && !$w_action){$w_action = 'pacorpse'.$pid;}
......@@ -207,7 +209,18 @@ function combat($active = 1, $wep_kind = '') {
//include_once GAME_ROOT.'./include/game/achievement.func.php';
//check_battle_achievement($w_achievement,$w_type,$name);
}
if($revival_flag)
{
$w_log .= "<span class=\"yellow\">$name</span><span class=\"red\">被你杀死了!</span><br>";
if($revival_flag == 99)
{
$w_log .= "<span class=\"lime\">但由于及时按下了BOMB键,{$name}原地满血复活了!</span><br>";
}
elseif($revival_flag == 17)
{
$w_log .= "<span class=\"lime\">但是,空气中弥漫着的奥罗拉让{$name}重新站了起来!</span><br>";
}
}
logsave ( $w_pid, $now, $w_log ,'b');
}
......@@ -223,80 +236,93 @@ function combat($active = 1, $wep_kind = '') {
//$bid = $w_pid;
if ($w_hp <= 0 && $w_club != 99) {
$w_bid = $pid;
$w_hp = 0;
if ($w_type==0){$killnum ++;};
include_once GAME_ROOT . './include/state.func.php';
$killmsg = kill ( $wep_kind, $w_name, $w_type, $w_pid, $wep_temp );
check_kill_events($pid,$w_pid);
$log .= npc_chat ( $w_type,$w_name, 'death' );
include_once GAME_ROOT.'./include/game/achievement.func.php';
check_battle_achievement($name,$w_type,$w_name,$wep_temp);
$log .= "<span class=\"red\">{$w_name}被你杀死了!</span><br>";
//$rp = $rp + 20 ;
if(!$w_type){
if($w_rp < 80){
$rpup = 80;
}else{$rpup = $w_rp;}
}
else{$rpup = 20;}
if($club == 19){
$rpdec = 30;
$rpdec += get_clubskill_rp_dec($club,$skills);
$rp += round($rpup*(100-$rpdec)/100);
}
else{
$rp += $rpup;
if ($w_hp <= 0)
{
//二形态最优先判断
if ($w_club == 99 && $w_type)
{
$log .= npc_chat ( $w_type,$w_name, 'death' );
include_once GAME_ROOT . './include/system.func.php';
$npcdata = evonpc ($w_type,$w_name);
$log .= '<span class="yellow">'.$w_name.'却没死去,反而爆发出真正的实力!</span><br>';
if($npcdata){
addnews($now , 'evonpc',$w_name, $npcdata['name'], $name);
foreach($npcdata as $key => $val){
${'w_'.$key} = $val;
}
}
}
if($killmsg){$log .= "<span class=\"yellow\">你对{$w_name}说:“{$killmsg}”</span><br>";}
include_once GAME_ROOT . './include/game/battle.func.php';
$result = $db->query ( "SELECT * FROM {$tablepre}players WHERE pid='$w_pid'" );
$cdata = $db->fetch_array ( $result );
$action = 'corpse'.$edata['pid'];
findcorpse ( $cdata );
return;
} else {
if($w_hp <= 0){//有第二阶段
if ($w_type)
else
{
$w_bid = $pid;
$w_hp = 0;
$log .= "<span class=\"red\">{$w_name}被你杀死了!</span><br>";
//进行复活判定
include_once GAME_ROOT . './include/state.func.php';
$killmsg = kill ( $wep_kind, $w_name, $w_type, $w_pid, $wep_temp ,$revival_flag);
if($revival_flag)
{
$log .= npc_chat ( $w_type,$w_name, 'death' );
include_once GAME_ROOT . './include/system.func.php';
$npcdata = evonpc ($w_type,$w_name);
$log .= '<span class="yellow">'.$w_name.'却没死去,反而爆发出真正的实力!</span><br>';
if($npcdata){
addnews($now , 'evonpc',$w_name, $npcdata['name'], $name);
foreach($npcdata as $key => $val){
${'w_'.$key} = $val;
}
if($revival_flag == 99)
{
$log .= '<span class="yellow">'.$w_name.'由于其及时按了BOMB键而原地满血复活了!</span><br>';
}
elseif($revival_flag == 17)
{
$log .= '<span class="yellow">但是,空气中弥漫着的奥罗拉让敌人重新站了起来!</span><br>';
}
}
//没有复活 继续击杀判定
else
{
include_once GAME_ROOT . './include/state.func.php';
$killmsg = kill ( $wep_kind, $w_name, $w_type, $w_pid, $wep_temp );
$log .= '<span class="yellow">'.$w_name.'由于其及时按了BOMB键而原地满血复活了!</span><br>';
if ($w_type==0){$killnum ++;};
$log .= npc_chat ( $w_type,$w_name, 'death' );
include_once GAME_ROOT.'./include/game/achievement.func.php';
check_battle_achievement($name,$w_type,$w_name,$wep_temp);
if(!$w_type){
if($w_rp < 80){
$rpup = 80;
}else{$rpup = $w_rp;}
}
else{$rpup = 20;}
if($club == 19){
$rpdec = 30;
$rpdec += get_clubskill_rp_dec($club,$skills);
$rp += round($rpup*(100-$rpdec)/100);
}
else{
$rp += $rpup;
}
if($killmsg){$log .= "<span class=\"yellow\">你对{$w_name}说:“{$killmsg}”</span><br>";}
include_once GAME_ROOT . './include/game/battle.func.php';
$result = $db->query ( "SELECT * FROM {$tablepre}players WHERE pid='$w_pid'" );
$cdata = $db->fetch_array ( $result );
$action = 'corpse'.$edata['pid'];
findcorpse ( $cdata );
return;
}
}
$main = 'battle';
init_battle ( 1 );
if (CURSCRIPT !== 'botservice')
{
include template('battleresult');
//$cmd = '<br><br><input type="hidden" name="mode" value="command"><input type="radio" name="command" id="back" value="back" checked><a onclick=sl("back"); href="javascript:void(0);" >确定</a><br>';
$cmd = ob_get_contents();
ob_clean();
//$bid = $hp <= 0 ? $bid : 0;
}
$action = '';
return;
}
}
//再注销一次复活标记
if($revival_flag) unset($revival_flag);
$main = 'battle';
init_battle ( 1 );
if (CURSCRIPT !== 'botservice')
{
include template('battleresult');
//$cmd = '<br><br><input type="hidden" name="mode" value="command"><input type="radio" name="command" id="back" value="back" checked><a onclick=sl("back"); href="javascript:void(0);" >确定</a><br>';
$cmd = ob_get_contents();
ob_clean();
//$bid = $hp <= 0 ? $bid : 0;
}
$action = '';
return;
}
function attack($wep_kind = 'N', $active = 0) {
......@@ -1297,7 +1323,6 @@ function defend($w_wep_kind = 'N', $active = 0) {
$attack = $w_att + $watt;
$defend = checkdef($def , $arbe + $arhe + $arae + $arfe,$w_att_key);
$damage = get_original_dmg ( 'w_', '', $attack, $defend, $w_wep_skill, $w_wep_kind );
if ($w_wep_kind == 'F') {
......@@ -1390,8 +1415,10 @@ function defend($w_wep_kind = 'N', $active = 0) {
include_once GAME_ROOT . './include/state.func.php';
$killmsg = death ( $w_wep_kind, $w_name, $w_type, $w_wep_temp );
$log .= npc_chat ( $w_type,$w_name, 'kill' );
if ($tmp_club==99)
if($hp>0)
{
$log .= '<span class="yellow">由于你及时按了BOMB键,你原地满血复活了!</span><br>';
}
}
} else {
$damage = 0;
......@@ -1427,6 +1454,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
$att_pow *= $attfac;
$def_pow *= $deffac;
if($def_pow <= 0){$def_pow = 0.01;}
echo "【DEBUG】原始伤害计算阶段:PA的基础攻击为{$att_pow},PD的基础防御为{$def_pow},";
$damage = ($att_pow / $def_pow) * $ws * $skill_dmg [$wp_kind];
$dfluc = $dmg_fluc [$wp_kind];
......@@ -1435,6 +1463,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
$dmg_factor = (100 + rand ( - $dfluc, $dfluc )) / 100;
$damage = round ( $damage * $dmg_factor * rand ( 4, 10 ) / 10 );
echo "【DEBUG】伤害浮动为{$dmg_factor},原始伤害为{$damage}<br>";
return $damage;
}
......
......@@ -19,7 +19,7 @@
global ${'element'.$e_key};
if(${'element'.$e_key})
{
$log.="<span title=\"".print_elements_tags($e_key)."\">";
$log.="<span tooltip=\"".print_elements_tags($e_key)."\">";
$log.="◆ {$e_info}{${'element'.$e_key}} 份;";
$log.="</span><br>";
}
......
......@@ -61,7 +61,7 @@ function poison($itmn = 0) {
function wthchange($itm,$itmsk){
global $now,$log,$weather, $wthinfo, $name,$nick;
$weathertd = $weather;
if($weather >= 14 && $weather <= 16){
if($weather >= 14 && $weather <= 17){
addnews ( $now, 'wthfail', $nick.' '.$name, $weather, $itm );
$log .= "你使用了{$itm}。<br /><span class=\"red\">但是恶劣的天气并未发生任何变化!</span><br />";
}else{
......@@ -69,6 +69,7 @@ function wthchange($itm,$itmsk){
elseif($itmsk==98){$weather = rand ( 10, 13 );}//随机恶劣天气
elseif($itmsk==97){$weather = rand ( 0, 9 );}//随机一般天气
elseif($itmsk==96){$weather = rand ( 8, 9 );}//随机起雾天气
elseif($itmsk==95){$weather = 17;}//极光天气
elseif(!empty($itmsk) && is_numeric($itmsk)){
if($itmsk >=0 && $itmsk < count($wthinfo)){
$weather = $itmsk;
......
......@@ -1106,7 +1106,126 @@ function getcorpse($item){
return;
}
//武器损耗&消耗计算:force_imp:强制扣除武器效果;check_sk:是否在武器毁坏时重新检查属性数组$pa['ex_keys']
function weapon_loss(&$pa,$hurtvalue,$force_imp=0,$check_sk=0)
{
global $log,$wepimprate,$nosta;
if($hurtvalue>0 && $pa['wep_kind'] != 'N')
{
$wep_loss_flag = 0;
//获取武器损耗类型
$wep_imp = $wepimprate[$pa['wep_kind']];
//损耗型武器
if($wep_imp > 0 || $force_imp)
{
if($pa['weps'] == $nosta || $force_imp)
{
$pa['wepe'] = max(0,$pa['wepe']-$hurtvalue);
if(!$pa['type']) $log.= "<span class='grey'>{$pa['nm']}{$pa['wep']}的攻击力下降了{$hurtvalue}。</span><br>";
}
else
{
$pa['weps'] = max(0,$pa['weps']-$hurtvalue);
if(!$pa['type']) $log.= "<span class='grey'>{$pa['nm']}{$pa['wep']}的耐久度下降了{$hurtvalue}。</span><br>";
}
if(empty($pa['weps']) || empty($pa['wepe']))
{
$log .= "{$pa['nm']}的<span class=\"red\">{$pa['wep']}</span>使用过度,已经损坏,无法再装备了!<br>";
$wep_loss_flag = 1;
}
}
//消耗型武器
else
{
if($pa['weps'] != $nosta)
{
$pa['weps'] = max(0,$pa['weps']-$hurtvalue);
if($pa['wep_kind'] == 'C' || $pa['wep_kind'] == 'D' || $pa['wep_kind'] == 'F')
{
if(!$pa['type']) $log .= "<span class='grey'>{$pa['nm']}用掉了{$hurtvalue}{$pa['wep']}。</span><br>";
if(empty($pa['weps']))
{
$log .= "{$pa['nm']}的<span class=\"red\">{$pa['wep']}</span>用光了!<br>";
$wep_loss_flag = 1;
}
}
elseif($pa['wep_kind'] == 'G' || $pa['wep_kind'] == 'J')
{
if(!$pa['type']) $log .= "<span class='grey'>{$pa['nm']}{$pa['wep']}的弹药数减少了{$hurtvalue}。</span><br>";
if(empty($pa['weps']))
{
$log .= "{$pa['nm']}的<span class=\"red\">{$pa['wep']}</span>弹药用光了!<br>";
$pa['weps'] = $nosta;
}
}
}
}
if($wep_loss_flag)
{
//剔除武器属性
if($check_sk && !empty($pa['wepsk'])) unset_ex_from_array($pa,get_itmsk_array($pa['wepsk']));
$pa['wep'] = '拳头'; $pa['wep_kind'] = 'N'; $pa['wepk'] = 'WN';
$pa['wepe'] = 0; $pa['weps'] = $nosta; $pa['wepsk'] = '';
return -1;
}
}
return;
}
//扣除指定装备的耐久。check_sk:是否在武器毁坏时重新检查属性数组$pa['ex_keys']
function armor_hurt(&$pa,$which,$hurtvalue,$check_sk=0)
{
global $log,$nosta;
if(!empty($pa[$which.'s']))
{
//无限耐久的防具可以抵挡1次任意点损耗
if ($pa[$which.'s'] == $nosta)
{
$pa[$which.'s'] = $hurtvalue;
}
//扣除耐久
$x = min($pa[$which.'s'], $hurtvalue);
$pa[$which.'s'] = $pa[$which.'s']-$x;
if(!$pa['type']) $log .= "<span class=\"grey\">{$pa['nm']}的".$pa[$which]."的耐久度下降了{$x}!</span><br>";
//耐久为0 装备损坏
if($pa[$which.'s'] <= 0)
{
$log .= "{$pa['nm']}的<span class=\"red\">".$pa[$which]."</span>受损过重,无法再装备了!<br>";
//剔除防具属性
if($check_sk && !empty($pa[$which.'sk'])) unset_ex_from_array($pa,get_itmsk_array($pa[$which.'sk']));
if($which == 'arb')
{
$pa[$which] = '内衣'; $pa[$which.'k'] = 'DN';
$pa[$which.'e'] = 0; $pa[$which.'s'] = $nosta; $pa[$which.'sk'] = '';
}
else
{
$pa[$which] = $pa[$which.'k'] = $pa[$which.'sk'] = '';
$pa[$which.'e'] = $pa[$which.'s'] = 0;
}
return -1;
}
}
return 0;
}
//从属性数组中剔除指定属性
function unset_ex_from_array(&$pa,$exarr)
{
if(!empty($pa['ex_keys']) && !empty($exarr))
{
foreach($exarr as $ex)
{
if(in_array($ex,$pa['ex_keys'])) unset($pa['ex_keys'][array_search($ex,$pa['ex_keys'])]);
}
}
return;
}
?>
This diff is collapsed.
This diff is collapsed.
<?php
if(!defined('IN_GAME')) {
exit('Access Denied');
}
//发现敌人
function findenemy_rev($edata)
{
global $db,$tablepre;
global $fog,$pid,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo,$nosta;
$battle_title = '发现敌人';
//获取并保存当前玩家数据
$sdata = current_player_save();
//格式化双方clbpara
$sdata['clbpara'] = get_clbpara($sdata['clbpara']); $edata['clbpara'] = get_clbpara($edata['clbpara']);
//格式化对战双方数据
$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();
$log .= "你发现了敌人<span class=\"red\">{$w_name}</span>!<br>对方好像完全没有注意到你!<br>";
//初始化玩家攻击方式信息
$w1 = substr($s_wepk,1,1);
$w2 = substr($s_wepk,2,1);
if ($w2=='0'||$w2=='1') $w2='';
if (($w1 == 'G'||$w1=='J')&&($s_weps==$nosta)) $w1 = 'P';
include template('battlecmd_rev');
$cmd = ob_get_contents();
ob_clean();
$main = 'battle_rev';
return;
}
//发现中立NPC $kind 0=中立单位 1=友军
function findneut(&$edata,$kind=0)
{
global $db,$tablepre;
global $fog,$log,$mode,$main,$cmd,$battle_title,$attinfo,$skillinfo;
$battle_title = $kind ? '发现朋友' : '发现敌人?';
//获取并保存当前玩家数据
$sdata = current_player_save();
//格式化双方clbpara
$sdata['clbpara'] = get_clbpara($sdata['clbpara']); $edata['clbpara'] = get_clbpara($edata['clbpara']);
//格式化双方数据
$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>";
if(!$kind) $log .= "对方看起来没有敌意。<br>";
//TODO:把这一段挪到一个独立函数里
if($edata['clbpara']['post'] == $sdata['pid'])
{
$log.="对方一看见你,便猛地朝你扑了过来!<br>
<br><span class='sienna'>“老板!有你的快递喔!”</span><br>
<br>你被这突然袭击吓了一跳!<br>
但对方只是从身上摸出了一个包裹样的东西扔给了你。然后又急匆匆地转身离开了。<br>
<br>……这是在搞啥……?<br><br>";
$action='';
global $itm0,$itmk0,$itme0,$itms0,$itmsk0;
$iid=$edata['clbpara']['postid'];
$itm0=$edata['itm'.$iid];$itmk0=$edata['itmk'.$iid];$itmsk0=$edata['itmsk'.$iid];
$itme0=$edata['itme'.$iid];$itms0=$edata['itms'.$iid];
//发一条news 表示快递已送达
$sponsorid = $edata['clbpara']['sponsor'];
$result = $db->query("SELECT * FROM {$tablepre}gambling WHERE uid = '$sponsorid'");
$sordata = $db->fetch_array($result);
addnews($now,'gpost_success',$sordata['uname'],$itm0,$name);
//再见了~快递员!
unset($edata['clbpara']['post']);unset($edata['clbpara']['postid']);unset($edata['clbpara']['sponsor']);
destory_corpse($edata);
//解除快递锁
$db->query("UPDATE {$tablepre}gambling SET bnid=0 WHERE uid='$sponsorid'");
}
include template('findneut');
$cmd = ob_get_contents();
ob_clean();
$main = 'battle_rev';
return;
}
?>
\ No newline at end of file
This diff is collapsed.
......@@ -592,7 +592,7 @@ function discover($schmode = 0) {
{
$bid = $edata['pid'];
$action = 'neut'.$edata['pid'];
include_once GAME_ROOT.'./include/game/revcombat.func.php';
include_once GAME_ROOT.'./include/game/revbattle.func.php';
findneut($edata,1);
return;
}
......@@ -609,8 +609,10 @@ function discover($schmode = 0) {
if($active_dice < $active_r)
{
$action = 'enemy'.$edata['pid'];
include_once GAME_ROOT.'./include/game/battle.func.php';
findenemy($edata);
//include_once GAME_ROOT.'./include/game/battle.func.php';
//findenemy($edata);
include_once GAME_ROOT.'./include/game/revbattle.func.php';
findenemy_rev($edata);
return;
}
//挨打
......@@ -623,8 +625,10 @@ function discover($schmode = 0) {
echo "passive_w_type={$edata['type']}\n";
echo "passive_w_sNo={$edata['sNo']}\n";
}
include_once GAME_ROOT.'./include/game/combat.func.php';
combat(0);
//include_once GAME_ROOT.'./include/game/combat.func.php';
//combat(0);
include_once GAME_ROOT.'./include/game/revcombat.func.php';
rev_combat_prepare($edata,NULL,0);
return;
}
}
......
......@@ -657,14 +657,32 @@ function get_itmsk_strlen($sk_value,$max_length=5)
return $ret;
}
//将clbpara转为数组
function get_clbpara($para)
{
return json_decode($para,true);
if(!is_array($para)) return json_decode($para,true);
else return $para;
}
function set_clbpara($para)
//获取clbpara中指定键
function get_single_clbpara($para,$key)
{
if(!is_array($para)) $para = get_clbpara($para);
if(isset($para[$key])) return $para[$key];
return;
}
//删除clbpara中指定键
function del_single_clbpara($para,$key)
{
if(!is_array($para)) $para = get_clbpara($para);
if(isset($para[$key])) unset($para[$key]);
return $para;
}
//修改clbpara中指定键
function set_clbpara($para,$key,$value)
{
return json_encode($para);
if(!is_array($para)) $para = get_clbpara($para);
if(isset($para[$key])) $para[$key] = $value;
return $para;
}
function mgzdecode($data)
......
......@@ -90,6 +90,8 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"red\">本局游戏被GM中止</span><br>\n";
} elseif($news == 'revival') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"lime\">{$a}因为及时按了BOMB键而原地满血复活了!</span><br>\n";
} elseif($news == 'aurora_revival') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"lime\">{$a}在奥罗拉的作用下原地复活了!</span></li>";
} elseif(strpos($news,'death') === 0) {
if($news == 'death11') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>因滞留在<span class=\"red\">禁区【{$plsinfo[$c]}】</span>死亡";
......@@ -108,7 +110,7 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
} elseif($news == 'death18') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>因<span class=\"red\">烧伤发作</span>死亡";
} elseif($news == 'death20') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>被<span class=\"yellow\">$c</span><span class=\"red\">$nowep</span>击飞";
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>被<span class=\"yellow\">$c</span><span class=\"red\">$nowep</span>击飞";
} elseif($news == 'death21') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>被<span class=\"yellow\">$c</span>使用{$d}殴打致死";
} elseif($news == 'death22') {
......@@ -119,8 +121,10 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>被<span class=\"yellow\">$c</span>投掷{$d}致死";
} elseif($news == 'death25') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>被<span class=\"yellow\">$c</span>埋设{$d}伏击炸死";
} elseif($news == 'death29') {
} elseif($news == 'death29') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>被<span class=\"yellow\">$c</span>发动{$d}以灵力杀死";
} elseif($news == 'death39') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>在与<span class=\"yellow\">$c</span>的战斗中因<span class=\"red\">武器反噬</span>意外身亡";
} elseif($news == 'death26') {
if($c) {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>因食用了<span class=\"yellow\">$c</span>下毒的{$d}被毒死";
......
......@@ -6,6 +6,7 @@ if (! defined ( 'IN_GAME' )) {
function death($death, $kname = '', $ktype = 0, $annex = '') {
global $now, $db, $tablepre, $alivenum, $deathnum, $name, $state, $deathtime, $type, $lvl, $bid, $killmsginfo, $typeinfo, $hp, $mhp, $wp, $wk, $wg, $wc, $wd, $wf, $sp, $msp, $club, $pls , $nick;
global $weather;
if (! $death) {
return;
}
......@@ -94,23 +95,25 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
$knname = isset($knick) ? $knick.' '.$kname : $kname;
addnews ( $now, 'death' . $state, $name, $type, $knname, $annex, $lastword );
//$alivenum = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}players WHERE hp>0 AND type=0"), 0);
if ($type==0 && $club==99 && ($death=="N" || $death=="P" || $death=="K" || $death=="G" || $death=="C" || $death=="D" || $death=="F" || $death=="J" || $death=="trap"))
$revival_flag = false;
if (!$revival_flag && $type==0 && $club==99 && ($death=="N" || $death=="P" || $death=="K" || $death=="G" || $death=="C" || $death=="D" || $death=="F" || $death=="J" || $death=="trap"))
{
addnews($now,'revival',$name); //玩家春哥附体称号的处理
$hp=$mhp; $sp=$msp;
$club=17; $state=0;
$alivenum++;
}
//PORT
//死亡时灵魂绑定的道具也会消失
global $wep,$arb,$arh,$ara,$arf,$art,$itm1,$itm2,$itm3,$itm4,$itm5,$itm6;
global $weps,$arbs,$arhs,$aras,$arfs,$arts,$itms1,$itms2,$itms3,$itms4,$itms5,$itms6;
global $wepe,$arbe,$arhe,$arae,$arfe,$arte,$itme1,$itme2,$itme3,$itme4,$itme5,$itme6;
global $wepk,$arbk,$arhk,$arak,$arfk,$artk,$itmk1,$itmk2,$itmk3,$itmk4,$itmk5,$itmk6;
global $wepsk,$arbsk,$arhsk,$arask,$arfsk,$artsk,$itmsk1,$itmsk2,$itmsk3,$itmsk4,$itmsk5,$itmsk6;
global $log;
if(!$revival_flag)
{
//死亡时灵魂绑定的道具也会消失 嗨呀 死了没复活才会消失
global $wep,$arb,$arh,$ara,$arf,$art,$itm1,$itm2,$itm3,$itm4,$itm5,$itm6;
global $weps,$arbs,$arhs,$aras,$arfs,$arts,$itms1,$itms2,$itms3,$itms4,$itms5,$itms6;
global $wepe,$arbe,$arhe,$arae,$arfe,$arte,$itme1,$itme2,$itme3,$itme4,$itme5,$itme6;
global $wepk,$arbk,$arhk,$arak,$arfk,$artk,$itmk1,$itmk2,$itmk3,$itmk4,$itmk5,$itmk6;
global $wepsk,$arbsk,$arhsk,$arask,$arfsk,$artsk,$itmsk1,$itmsk2,$itmsk3,$itmsk4,$itmsk5,$itmsk6;
global $log;
for($i = 1;$i <= 6;$i++){
if(strpos(${'itmsk'.$i},'v')!==false){
$log .= "伴随着你的死亡,<span class=\"yellow\">${'itm'.$i}</span>也化作灰烬消散了。<br>";
......@@ -149,17 +152,17 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
$arts=$arte = 0;
}
}
$alivenum --;
$deathnum ++;
$alivenum --;
$deathnum ++;
}
save_gameinfo ();
return $killmsg;
}
function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '') {
function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '', &$revival_flag=0) {
global $now, $db, $tablepre, $alivenum, $deathnum, $name, $w_state, $type, $pid, $typeinfo, $pls, $lwinfo, $w_achievement;
global $weather;
if (! $death || ! $dname) {
return;
......@@ -199,11 +202,6 @@ function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '') {
if ($dtype) {
if($dtype == 15){//静流AI
global $gamevars;
$gamevars['sanmadead'] = 1;
save_gameinfo();
}
$lwname = $typeinfo [$dtype] . ' ' . $dname;
if (is_array ( $lwinfo [$dtype] )) {
$lastword = $lwinfo [$dtype] [$dname];
......@@ -225,30 +223,48 @@ function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '') {
$result = $db->query("SELECT * FROM {$tablepre}players WHERE pid=$dpid" );
$res=$db->fetch_array($result);
$revivaled=false;
if ($res['type']==0 && $res['club']==99 && ($death=="N" || $death=="P" || $death=="K" || $death=="G" || $death=="C" ||$death=="D" || $death=="F" || $death=="J" || $death=="trap"))
//依次判定复活效果
if (!$revival_flag && $weather == 17)
{
include_once GAME_ROOT.'./include/game/dice.func.php';
$aurora_rate = $dtype ? 1 : 10; //NPC概率1% 玩家概率10%
$aurora_dice = diceroll(100);
if($aurora_dice<=$aurora_rate)
{
//奥罗拉复活效果
addnews($now,'aurora_revival',$res['name']);
$res['hp'] += min($res['mhp'],max($aurora_dice,1)); $res['sp'] += min($res['msp'],max($aurora_dice,1));
$res['state']=0;
$alivenum++;
$revival_flag = 17;
}
}
if (!$revival_flag && $res['type']==0 && $res['club']==99 && ($death=="N" || $death=="P" || $death=="K" || $death=="G" || $death=="C" ||$death=="D" || $death=="F" || $death=="J" || $death=="trap"))
{
addnews($now,'revival',$res['name']); //玩家春哥附体称号的处理
$db->query ( "UPDATE {$tablepre}players SET hp=mhp WHERE pid=$dpid" );
$res['hp'] = $res['mhp']; $res['sp'] = $res['msp'];
$res['club'] = 17; $res['state'] = 0;
/*$db->query ( "UPDATE {$tablepre}players SET hp=mhp WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET sp=msp WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET club=17 WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET state=0 WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET state=0 WHERE pid=$dpid" );*/
$alivenum++;
$revivaled=true;
$revivaled = 99;
}
if (!$revivaled) $db->query ( "UPDATE {$tablepre}players SET hp='0',endtime='$now',deathtime='$now',bid='$pid',state='$w_state' WHERE pid=$dpid" );
// if($dtype == 1 || $dtype == 9){
// global $rdown,$bdown;
// if($dtype == 1){
// $rdown = 1;
// storyputchat($now,'rdown');
// }elseif($dtype == 9){
// $bdown = 1;
// storyputchat($now,'bdown');
// }
// }
save_gameinfo ();
if (!$revivaled)
{
if($dtype == 15){//静流AI
global $gamevars;
$gamevars['sanmadead'] = 1;
save_gameinfo();
}
//$db->query ( "UPDATE {$tablepre}players SET hp='0',endtime='$now',deathtime='$now',bid='$pid',state='$w_state' WHERE pid=$dpid" );
}
player_save($res);
save_gameinfo();
return $killmsg;
}
......@@ -538,32 +554,4 @@ function rest($command) {
return;
}
//登记一些特殊的死亡事件
function check_kill_events($kid,$eid)
{
global $db,$tablepre,$log,$now;
$result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='$eid'");
$edata = $db->fetch_array($result);
if(!is_array($edata['clbpara'])) $edata['clbpara']=get_clbpara($edata['clbpara']);
if($edata['clbpara']['post'])
{
//发一条news 表示快递被劫走了
$log.="<span class='sienna'>某样东西从{$edata['name']}身上掉了出来……</span><br>";
$iid = $edata['clbpara']['postid'];
$sponsorid = $edata['clbpara']['sponsor'];
$result = $db->query("SELECT * FROM {$tablepre}gambling WHERE uid = '$sponsorid'");
$sordata = $db->fetch_array($result);
addnews($now,'gpost_failed',$sordata['uname'],$edata['itm'.$iid]);
//消除快递相关参数
unset($edata['clbpara']['post']);unset($edata['clbpara']['postid']);unset($edata['clbpara']['sponsor']);
//解除快递锁
$db->query("UPDATE {$tablepre}gambling SET bnid=0 WHERE uid='$sponsorid'");
player_save($edata);
}
return;
}
?>
<!--{if (CURSCRIPT == 'game' && $pls=='0')}-->
<style>
body {background-image: url("../../img/location/0.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='1')}-->
<style>
body {background-image: url("../../img/location/1.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='2')}-->
<!--{loop $plsinfo $places $info}-->
<!--{if (CURSCRIPT == 'game' && $pls==$places)}-->
<!--{eval $bgurl = "img/location/".$places.".jpg"}-->
<style>
body {background-image: url("../../img/location/2.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='3')}-->
<style>
body {background-image: url("../../img/location/3.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='4')}-->
<style>
body {background-image: url("../../img/location/4.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='5')}-->
<style>
body {background-image: url("../../img/location/5.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='6')}-->
<style>
body {background-image: url("../../img/location/6.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='7')}-->
<style>
body {background-image: url("../../img/location/7.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='8')}-->
<style>
body {background-image: url("../../img/location/8.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='9')}-->
<style>
body {background-image: url("../../img/location/9.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='10')}-->
<style>
body {background-image: url("../../img/location/10.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='11')}-->
<style>
body {background-image: url("../../img/location/11.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='12')}-->
<style>
body {background-image: url("../../img/location/12.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='13')}-->
<style>
body {background-image: url("../../img/location/13.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='14')}-->
<style>
body {background-image: url("../../img/location/14.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='15')}-->
<style>
body {background-image: url("../../img/location/15.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='16')}-->
<style>
body {background-image: url("../../img/location/16.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='17')}-->
<style>
body {background-image: url("../../img/location/17.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='18')}-->
<style>
body {background-image: url("../../img/location/18.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='19')}-->
<style>
body {background-image: url("../../img/location/19.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='20')}-->
<style>
body {background-image: url("../../img/location/20.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='21')}-->
<style>
body {background-image: url("../../img/location/21.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='22')}-->
<style>
body {background-image: url("../../img/location/22.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='23')}-->
<style>
body {background-image: url("../../img/location/23.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='24')}-->
<style>
body {background-image: url("../../img/location/24.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='25')}-->
<style>
body {background-image: url("../../img/location/25.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='26')}-->
<style>
body {background-image: url("../../img/location/26.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='27')}-->
<style>
body {background-image: url("../../img/location/27.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='28')}-->
<style>
body {background-image: url("../../img/location/28.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='29')}-->
<style>
body {background-image: url("../../img/location/29.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='30')}-->
<style>
body {background-image: url("../../img/location/30.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='31')}-->
<style>
body {background-image: url("../../img/location/31.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='32')}-->
<style>
body {background-image: url("../../img/location/32.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='33')}-->
<style>
body {background-image: url("../../img/location/33.jpg");background-position: center;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='34')}-->
<style>
body {background-image: url("../../img/location/34.jpg");background-position: center;}
body {background-image: url("$bgurl");background-position: center;}
</style>
<!--{/if}-->
<!--{/if}-->
<!--{/loop}-->
<TABLE border="0" width=720px height=430px align="center" cellspacing="0" cellpadding="0" class="battle">
<tr>
<td class="b8" valign="top" rowspan=2>
......
This diff is collapsed.
现在想要做什么?<br><br>
向对手大喊:<br><input size="30" type="text" name="message" maxlength="60"><br><br>
<input type="hidden" name="mode" value="revcombat">
<input type="hidden" id="command" name="command" value="back">
<input type="button" class="cmdbutton" style="width:100" name="w1" value="{$attinfo[$w1]}" onclick="$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;"><br>
<!--{if $w2}-->
<input type="button" class="cmdbutton" style="width:100" name="w2" value="{$attinfo[$w2]}" onclick="$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;"><br>
<!--{/if}-->
<br><input type="button" class="cmdbutton" name="back" value="逃跑" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<input type="hidden" name="mode" value="revcombat">
<input type="hidden" name="command" value="enter">
<input type="button" class="cmdbutton" name="submit" value="确定" onclick="postCmd('gamecmd','command.php');this.disabled=true;">
\ No newline at end of file
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