Commit 1b6c03cd authored by hisuinohoshi's avatar hisuinohoshi

celebrate 1002?

parent 9d6d1215
...@@ -138,7 +138,7 @@ if($hp > 0){ ...@@ -138,7 +138,7 @@ if($hp > 0){
global $elements_info; global $elements_info;
include_once GAME_ROOT.'./include/game/elementmix.func.php'; include_once GAME_ROOT.'./include/game/elementmix.func.php';
$emax = get_emix_itme_max(); $emax = get_emix_itme_max();
foreach($elements_info as $e_key=>$e_info) ${'etaginfo'.$e_key} ="<span title=\"".print_elements_tags($e_key)."\">"; foreach($elements_info as $e_key=>$e_info) ${'etaginfo'.$e_key} ="<span tooltip=\"".print_elements_tags($e_key)."\">";
} }
$mode = $itemcmd; $mode = $itemcmd;
} }
......
<?php <?php
//暂时放在这里……
//是否允许销毁尸体(1:开启)
$allow_destory_corpse = 0;
//销毁尸体会导致rp上升最多多少点
$rpup_destory_corpse = 233;
//如果允许销毁尸体 以下哪些种类的尸体不可以被销毁
$no_destory_corpse_type = Array();
//基础反击率 //基础反击率
$counter_obbs = Array('N' => 60, 'P' => 65, 'K' => 65, 'G' => 50, 'C' => 35, 'D' => 0, 'F'=> 35, 'J'=> 20); $counter_obbs = Array('N' => 60, 'P' => 65, 'K' => 65, 'G' => 50, 'C' => 35, 'D' => 0, 'F'=> 35, 'J'=> 20);
//各种攻击方式的射程,射程大者可以反击射程小者,此外射程为0则代表不能反击任何系但也不能被任何系反击 //各种攻击方式的射程,射程大者可以反击射程小者,此外射程为0则代表不能反击任何系但也不能被任何系反击
...@@ -31,14 +39,25 @@ $def_kind = Array( ...@@ -31,14 +39,25 @@ $def_kind = Array(
$weather_attack_modifier = Array(10,10,0,-5,-10,-20,-15,0,0,7,20,-7,-20,-5,-10,-10,-10,10); $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); $weather_defend_modifier = Array(10,30,0,0,-3,-15,-10,0,-20,-30,-50,-5,-20,-3,-20,5,-30,30);
//姿态对攻击力的影响始终生效(1:只在作出先制攻击时生效)
$pose_attack_active = 0;
//姿态对攻击力的影响(单位:百分比加算) //姿态对攻击力的影响(单位:百分比加算)
$pose_attack_modifier = Array(0,100,0,-25,25,-50,50); $pose_attack_modifier = Array(0,100,0,-25,25,-50,50);
//姿态对防御力的影响始终生效(1:只在受到先制攻击伤害时生效)
$pose_defend_active = 0;
//姿态对防御力的影响(单位:百分比加算) //姿态对防御力的影响(单位:百分比加算)
$pose_defend_modifier = Array(0,25,0,-25,-50,-50,-466); $pose_defend_modifier = Array(0,25,0,-25,-50,-50,-466);
//应战策略对攻击力的影响始终生效(1:只在作出反击时生效)
$tactic_attack_active = 0;
//应战策略对攻击力的加成(单位:百分比加算) //应战策略对攻击力的加成(单位:百分比加算)
$tactic_attack_modifier = Array(0,20,-25,25,-50); $tactic_attack_modifier = Array(0,20,-25,25,-50);
//应战策略对防御力的影响始终生效(1:只在受反击伤害时生效)
$tactic_defend_active = 0;
//应战策略对防御力的加成(单位:百分比加算) //应战策略对防御力的加成(单位:百分比加算)
$tactic_defend_modifier = Array(0,-20,50,-25,0); $tactic_defend_modifier = Array(0,-20,50,-25,0);
//场景对攻击力的加成(单位:百分比加算) wtf //场景对攻击力的加成(单位:百分比加算) wtf
$pls_attack_modifier = Array( $pls_attack_modifier = Array(
// 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵 // 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵
......
...@@ -368,6 +368,7 @@ span[tooltip]:hover:before { ...@@ -368,6 +368,7 @@ span[tooltip]:hover:before {
content: attr(tooltip); content: attr(tooltip);
overflow-x:hidden;overflow-y:auto; padding: 3px; overflow-x:hidden;overflow-y:auto; padding: 3px;
font: bold 10pt "微软雅黑" serif; color: white; font: bold 10pt "微软雅黑" serif; color: white;
white-space:pre-line;
text-shadow:3px 3px 3px #3b3535; text-align: center; text-fill-color: white; -webkit-text-fill-color: white; 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); background-size: 0; background-clip: border-box; background-color: rgba(198, 114, 199, 0.8);
top: 20px; left: -5px; border-radius: 2px; top: 20px; left: -5px; border-radius: 2px;
......
...@@ -130,9 +130,13 @@ if(filemtime($vnmixfile) > filemtime($writefile) ||filemtime($mixfile) > filemti ...@@ -130,9 +130,13 @@ if(filemtime($vnmixfile) > filemtime($writefile) ||filemtime($mixfile) > filemti
for ($i=0; $i<=4; $i++) for ($i=0; $i<=4; $i++)
{ {
$mixhelpinfo .= "<td class=\"b3\" "; $mixhelpinfo .= "<td class=\"b3\" ";
if ($i==0) $mixhelpinfo .= "height=20px "; if ($i==0) $mixhelpinfo .= "height=20px";
if ($val['stuff'][$i]!='-') $mixhelpinfo .= "title=\"".get_item_place($val['stuff'][$i])."\" "; if ($val['stuff'][$i]!='-')
$mixhelpinfo .= "><span>{$val['stuff'][$i]}</span></td>"; {
$tooltipinfo = get_item_place($val['stuff'][$i]);
if(!empty($tooltipinfo)) $mixhelpinfo .= "><span tooltip=\"".$tooltipinfo."\" ";
}
$mixhelpinfo .= ">{$val['stuff'][$i]}</span></td>";
//修复加入悬浮提示后出现的问题。 //修复加入悬浮提示后出现的问题。
} }
// $mixhelpinfo .= "<td class=\"b3\">→</td> // $mixhelpinfo .= "<td class=\"b3\">→</td>
......
...@@ -3,6 +3,7 @@ if(!defined('IN_ADMIN')) { ...@@ -3,6 +3,7 @@ if(!defined('IN_ADMIN')) {
exit('Access Denied'); exit('Access Denied');
} }
require config('vnworld',$gamecfg); require config('vnworld',$gamecfg);
//require './include/game/itemplace.func.php';
if(!isset($vncmd)){$vncmd = 'none';} if(!isset($vncmd)){$vncmd = 'none';}
...@@ -19,6 +20,14 @@ if(file_exists($cache_file)) ...@@ -19,6 +20,14 @@ if(file_exists($cache_file))
{ {
foreach($vn_arr as $vn_type => $vn_info) foreach($vn_arr as $vn_type => $vn_info)
{ {
/*if($vn_type == 'stuff')
{
// 格式化素材来源
foreach($vn_info as $sid => $snm)
{
$temp_mixinfo[$vn_key][$vn_type][$sid] = "<span tooltip=\"".get_item_place($snm)."\">".$snm."</span>";
}
}*/
if($vn_type == 'result') if($vn_type == 'result')
{ {
$temp_mixinfo[$vn_key][$vn_type][1] = $temp_vniteminfo[$vn_info[1]]; $temp_mixinfo[$vn_key][$vn_type][1] = $temp_vniteminfo[$vn_info[1]];
...@@ -57,7 +66,7 @@ if(strpos($vncmd ,'del')===0) ...@@ -57,7 +66,7 @@ if(strpos($vncmd ,'del')===0)
} }
else else
{ {
$vname = $flag['name']; $vname = $flag['name']; $vresult = $flag['result'][0];
$result = $db->query("SELECT * FROM {$tablepre}users WHERE username='$vname'"); $result = $db->query("SELECT * FROM {$tablepre}users WHERE username='$vname'");
if(!$db->num_rows($result)) if(!$db->num_rows($result))
{ {
...@@ -67,6 +76,7 @@ if(strpos($vncmd ,'del')===0) ...@@ -67,6 +76,7 @@ if(strpos($vncmd ,'del')===0)
$vdata = $db->fetch_array($result); $vdata = $db->fetch_array($result);
post_back_vn_cache_file($vdata,$flag); post_back_vn_cache_file($vdata,$flag);
} }
adminlog('回退了配方',$vresult);
$cmd_info = "已回退配方{$vnid}!"; $cmd_info = "已回退配方{$vnid}!";
return; return;
} }
......
...@@ -42,6 +42,11 @@ function init_profile(){ ...@@ -42,6 +42,11 @@ function init_profile(){
global $nospk,$wepsk_words,$arbsk_words,$arhsk_words,$arask_words,$arfsk_words,$artsk_words,$itmsk0_words,$itmsk1_words,$itmsk2_words,$itmsk3_words,$itmsk4_words,$itmsk5_words,$itmsk6_words; global $nospk,$wepsk_words,$arbsk_words,$arhsk_words,$arask_words,$arfsk_words,$artsk_words,$itmsk0_words,$itmsk1_words,$itmsk2_words,$itmsk3_words,$itmsk4_words,$itmsk5_words,$itmsk6_words;
global $wepk_words,$arbk_words,$arhk_words,$arak_words,$arfk_words,$artk_words,$itmk0_words,$itmk1_words,$itmk2_words,$itmk3_words,$itmk4_words,$itmk5_words,$itmk6_words; global $wepk_words,$arbk_words,$arhk_words,$arak_words,$arfk_words,$artk_words,$itmk0_words,$itmk1_words,$itmk2_words,$itmk3_words,$itmk4_words,$itmk5_words,$itmk6_words;
global $wep,$arb,$arh,$ara,$arf,$art,$itm0,$itm1,$itm2,$itm3,$itm4,$itm5,$itm6; global $wep,$arb,$arh,$ara,$arf,$art,$itm0,$itm1,$itm2,$itm3,$itm4,$itm5,$itm6;
global $definfo,$atkinfo,$pdata;
include_once GAME_ROOT.'./include/game/revattr.func.php';
$atkinfo = get_base_att($pdata,$pdata,1,1);
$definfo = get_base_def($pdata,$pdata,1,1);
foreach (Array('wep','arb','arh','ara','arf','art','itm0','itm1','itm2','itm3','itm4','itm5','itm6') as $value) foreach (Array('wep','arb','arh','ara','arf','art','itm0','itm1','itm2','itm3','itm4','itm5','itm6') as $value)
{ {
......
...@@ -80,7 +80,7 @@ function findteam(&$w_pdata){ ...@@ -80,7 +80,7 @@ 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;
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; global $club,$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');
......
...@@ -813,7 +813,7 @@ function itemmix($mlist, $itemselect=-1) { ...@@ -813,7 +813,7 @@ function itemmix($mlist, $itemselect=-1) {
itemreduce('itm'.$val); itemreduce('itm'.$val);
} }
global $itm0,$itmk0,$itme0,$itms0,$itmsk0; global $itm0,$itmk0,$itme0,$itms0,$itmsk0,$now;
list($itm0,$itmk0,$itme0,$itms0,$itmsk0) = $minfo['result']; list($itm0,$itmk0,$itme0,$itms0,$itmsk0) = $minfo['result'];
$log .= "<span class=\"yellow\">$itmstr</span>合成了<span class=\"yellow\">{$minfo['result'][0]}</span><br>"; $log .= "<span class=\"yellow\">$itmstr</span>合成了<span class=\"yellow\">{$minfo['result'][0]}</span><br>";
...@@ -998,8 +998,8 @@ function itembuy($item,$shop,$bnum=1) { ...@@ -998,8 +998,8 @@ function itembuy($item,$shop,$bnum=1) {
function getcorpse($item){ function getcorpse($item){
global $db,$tablepre,$log,$mode; global $db,$tablepre,$log,$mode;
global $itm0,$itmk0,$itme0,$itms0,$itmsk0,$money,$pls,$action; global $itm0,$itmk0,$itme0,$itms0,$itmsk0,$money,$pls,$action,$rp,$name;
global $club; global $club,$allow_destory_corpse,$no_destory_corpse_type,$rpup_destory_corpse;
$corpseid = strpos($action,'corpse')===0 ? str_replace('corpse','',$action) : str_replace('pacorpse','',$action); $corpseid = strpos($action,'corpse')===0 ? str_replace('corpse','',$action) : str_replace('pacorpse','',$action);
if(!$corpseid || strpos($action,'corpse')===false){ if(!$corpseid || strpos($action,'corpse')===false){
$log .= '<span class="yellow">你没有遇到尸体,或已经离开现场!</span><br>'; $log .= '<span class="yellow">你没有遇到尸体,或已经离开现场!</span><br>';
...@@ -1030,7 +1030,25 @@ function getcorpse($item){ ...@@ -1030,7 +1030,25 @@ function getcorpse($item){
return; return;
} }
if($item == 'element_split') if($item == 'destory')
{
if(!$allow_destory_corpse || in_array($w_type,$no_destory_corpse_type))
{
$log.="你还想对这具可怜的尸体干什么?麻烦给死者一点基本的尊重!<br>";
$action = '';
$mode = 'command';
return;
}
$log.="你销毁了{$edata['name']}的尸体。<br>但这一切值得吗……?<br>";
include_once GAME_ROOT.'./include/game/dice.func.php';
$rp += diceroll($rpup_destory_corpse);
addnews($now,'cdestroy',$name,$edata['name']);
destory_corpse($edata);
$action = '';
$mode = 'command';
return;
}
elseif($item == 'element_split')
{ {
if($club != 20) if($club != 20)
{ {
......
...@@ -158,7 +158,7 @@ function get_item_place($which) ...@@ -158,7 +158,7 @@ function get_item_place($which)
{ {
if ($iarea==99) $result.="每禁"; else $result.="{$iarea}禁"; if ($iarea==99) $result.="每禁"; else $result.="{$iarea}禁";
if ($imap==99) $result.="全图随机"; else $result.="于{$plsinfo[$imap]}"; if ($imap==99) $result.="全图随机"; else $result.="于{$plsinfo[$imap]}";
$result.="刷新{$inum}&#13;"; $result.="刷新{$inum} \r";
} }
} }
$file = config('shopitem',$gamecfg); $file = config('shopitem',$gamecfg);
...@@ -169,19 +169,22 @@ function get_item_place($which) ...@@ -169,19 +169,22 @@ function get_item_place($which)
list($kind,$num,$price,$area,$item)=explode(',',$lst); list($kind,$num,$price,$area,$item)=explode(',',$lst);
if ($item==$which) if ($item==$which)
{ {
$result.="{$area}禁起在商店中出售({$price}元)&#13;"; $result.="{$area}禁起在商店中出售({$price}元) \r";
} }
} }
include_once config('mixitem',$gamecfg); include_once config('mixitem',$gamecfg);
global $mixinfo; global $mixinfo;
if(is_array($mixinfo))
{
foreach($mixinfo as $lst) foreach($mixinfo as $lst)
{ {
if ($lst['result'][0]==$which || $lst['result'][0]==$which.' ') if ($lst['result'][0]==$which || $lst['result'][0]==$which.' ')
{ {
$result.="通过合成获取&#13;"; $result.="通过合成获取 \r";
break; break;
} }
} }
}
$file=config('synitem',$gamecfg); $file=config('synitem',$gamecfg);
$synlist = openfile($file); $synlist = openfile($file);
foreach($synlist as $lst) foreach($synlist as $lst)
...@@ -190,7 +193,7 @@ function get_item_place($which) ...@@ -190,7 +193,7 @@ function get_item_place($which)
list($item,$kind)=explode(',',$lst); list($item,$kind)=explode(',',$lst);
if ($item==$which) if ($item==$which)
{ {
$result.="通过同调合成获取&#13;"; $result.="通过同调合成获取 \r";
break; break;
} }
} }
...@@ -202,7 +205,7 @@ function get_item_place($which) ...@@ -202,7 +205,7 @@ function get_item_place($which)
list($item,$kind)=explode(',',$lst); list($item,$kind)=explode(',',$lst);
if ($item==$which) if ($item==$which)
{ {
$result.="通过超量合成获取&#13;"; $result.="通过超量合成获取 \r";
break; break;
} }
} }
...@@ -214,7 +217,7 @@ function get_item_place($which) ...@@ -214,7 +217,7 @@ function get_item_place($which)
list($item,$kind)=explode(',',$lst); list($item,$kind)=explode(',',$lst);
if ($item==$which) if ($item==$which)
{ {
$result.="打开礼品盒时有概率获得&#13;"; $result.="打开礼品盒时有概率获得 \r";
break; break;
} }
} }
...@@ -226,11 +229,62 @@ function get_item_place($which) ...@@ -226,11 +229,62 @@ function get_item_place($which)
list($item,$kind)=explode(',',$lst); list($item,$kind)=explode(',',$lst);
if ($item==$which) if ($item==$which)
{ {
$result.="打开游戏王卡包时有概率获得&#13;"; $result.="打开游戏王卡包时有概率获得 \r";
break;
}
}
//打开福袋有几率获得
/*foreach(Array('00','O1','WC','WD','WF','WG','WK','WP','') as $rnm)
{
if(file_exists(config('random'.$rnm,$gamecfg)))
{
include_once config('random'.$rnm,$gamecfg);
foreach(Array('itmlow','itmmedium','itmhigh','antimeta') as $rlvl)
{
$item = explode("\r\n",$$rlvl);
foreach($item as $oi)
{
list($in) = explode(',',$oi);
if ($in==$which)
{
$result.="打开福袋时有概率获得 \r";
break; break;
} }
} }
if ($which=="悲叹之种") $result.="通过使用『灵魂宝石』强化物品失败获得&#13;"; }
}
}
//NPC掉落
include_once config('npc',$gamecfg);
include_once config('addnpc',$gamecfg);
include_once config('evonpc',$gamecfg);
$nownpclist = Array();
$nownpclist = $npcinfo+$anpcinfo;
foreach($enpcinfo as $ekey => $enpcs)
{
foreach($enpcs as $sname => $enpc)
{
$nownpclist[$ekey]['sub'][$sname] = $enpc;
}
}
foreach($nownpclist as $npcs)
{
foreach(array('wep','arb','arh','ara','arf','art','itm1','itm2','itm3','itm4','itm5','itm6') as $nipval)
{
if(!empty($npcs['sub']))
{
foreach($npcs['sub'] as $npc)
{
if (isset($npc[$nipval]) && $npc[$nipval]==$which)
{
$result.="击败NPC {$npc['name']}时获得 \r";
break;
}
}
}
}
}*/
if ($which=="悲叹之种") $result.="通过使用『灵魂宝石』强化物品失败获得 \r";
return $result; return $result;
} }
?> ?>
...@@ -393,8 +393,11 @@ ...@@ -393,8 +393,11 @@
} }
//获取pa的攻击力 //获取pa的攻击力
function get_base_att(&$pa,&$pd,$active) function get_base_att(&$pa,&$pd,$active,$tooltip=0)
{ {
if(!isset($pa['wep_kind'])) get_wep_kind($pa);
# 计算武器面板攻击:
//空手 武器伤害=2/3熟练度 //空手 武器伤害=2/3熟练度
if($pa['wep_kind'] == 'N') if($pa['wep_kind'] == 'N')
{ {
...@@ -415,57 +418,95 @@ ...@@ -415,57 +418,95 @@
{ {
$pa['wepe_t'] = $pa['wepe'] * 2; $pa['wepe_t'] = $pa['wepe'] * 2;
} }
//获取pa社团技能对攻击力的加成
# 获取pa社团技能对攻击力的加成
rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1); rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1);
//pa攻击力 # 汇总:
$base_att = $pa['att'] + $pa['wepe_t'] + $att1; $base_att = $pa['att'] + $pa['wepe_t'] + $att1;
global $log;
//$log.= "【DEBUG】{$pa['name']}的base_att是{$base_att},"; # 初始化tooltip
//计算攻击力修正 if($tooltip)
$base_att = get_base_att_modifier($pa,$pd,$active,$base_att); {
//$log.= "修正后是{$base_att}。<br>"; $tooltip = "<span tooltip=\" 基础攻击值:{$pa['att']}+{$pa['wepe_t']}";
if($att1>0) $tooltip .="+{$att1}";
$tooltip .= "\r";
}
# 计算攻击力修正
$base_att = get_base_att_modifier($pa,$pd,$active,$base_att,$tooltip);
return $base_att; return $base_att;
} }
//获取pa的攻击力修正 //获取pa的攻击力修正
function get_base_att_modifier(&$pa,&$pd,$active,$base_att) function get_base_att_modifier(&$pa,&$pd,$active,$base_att,$tooltip=0)
{ {
//计算天气、姿态、策略、地点对pa攻击力的修正 # 计算天气、姿态、策略、地点对pa攻击力的修正
global $weather,$weather_attack_modifier,$pose_attack_modifier,$tactic_attack_modifier,$pls_attack_modifier,$log; global $weather,$weather_attack_modifier,$pose_attack_modifier,$tactic_attack_modifier,$pls_attack_modifier,$log;
global $pose_attack_active,$tactic_attack_active;
$base_atk_per = 100; $base_atk_per = 100;
$base_atk_per += $weather_attack_modifier[$weather] ?: 0 ; //天气修正
$base_atk_per += $pose_attack_modifier[$pa['pose']] ?: 0 ; $wth_atk_per = $weather_attack_modifier[$weather] ?: 0 ;
$base_atk_per += $tactic_attack_modifier[$pa['tactic']] ?: 0; //地点修正
$base_atk_per += $pls_attack_modifier[$pa['pls']] ?: 0; $pls_atk_per = $pls_attack_modifier[$pa['pls']] ?: 0;
//姿态修正只在先制攻击阶段生效? //pa身上没有反击标记 代表这是一次先制攻击
if(!isset($pa['is_counter']) && $pose_attack_active) $pose_atk_per = $pose_attack_modifier[$pa['pose']] ?: 0 ;
//姿态修正始终生效
elseif(!$pose_attack_active) $pose_atk_per = $pose_attack_modifier[$pa['pose']] ?: 0 ;
//策略修正只在反击阶段生效? //pa身上没有反击标记 代表这是一次先制攻击
if(!empty($pa['is_counter']) && $tactic_attack_active) $tac_atk_per = $tactic_attack_modifier[$pa['tactic']] ?: 0;
//策略修正始终生效
elseif(!$tactic_attack_active) $tac_atk_per = $tactic_attack_modifier[$pa['tactic']] ?: 0;
//上述系数修正最低不低于1%
$base_atk_per += $wth_atk_per+$pls_atk_per+$pose_atk_per+$tac_atk_per;
$base_atk_per = $base_atk_per > 0 ? $base_atk_per : 1; $base_atk_per = $base_atk_per > 0 ? $base_atk_per : 1;
//$log.= "【DEBUG】{$pa['name']}的atk_per是{$base_atk_per},";
$base_att = round($base_att*($base_atk_per/100)); # 计算受伤状态对pa攻击力的修正
//$log.= "【DEBUG】{$pa['name']}修正后的base_att是{$base_att},"; $inf_atk_per = 100;
//计算pa受伤状态对攻击力的修正 if(!empty($pa['inf']))
{
global $inf_att_p; global $inf_att_p;
foreach ($inf_att_p as $inf_ky => $value) foreach ($inf_att_p as $inf_ky => $value)
{ {
if(strpos($pa['inf'], $inf_ky)!==false) $base_att *= $value; if(strpos($pa['inf'], $inf_ky)!==false) $inf_atk_per *= $value;
}
} }
//计算pa社团技能对攻击力的修正 # 计算社团技能对pa攻击力的修正
$club_atk_per = 100;
if(!empty($pa['club']) || !empty($pa['skills']))
{
rev_get_clubskill_bonus_p($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$attfac,$deffac); rev_get_clubskill_bonus_p($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$attfac,$deffac);
$base_att *= $attfac; $club_atk_per *= $attfac;
}
# 汇总
$base_att = round($base_att*($base_atk_per/100)*($inf_atk_per/100)*($club_atk_per/100));
$base_att = max(1,$base_att); $base_att = max(1,$base_att);
if($tooltip)
{
$tooltip .= "天气修正:{$wth_atk_per}%\r 地点修正:{$pls_atk_per}%\r 姿态修正:{$pose_atk_per}%\r 策略修正:{$tac_atk_per}%";
if($inf_atk_per <> 100) $tooltip .=" \r 异常状态修正:{$inf_atk_per}%";
if($club_atk_per <> 100) $tooltip .=" \r 称号技能修正:{$club_atk_per}%";
$tooltip .="\">".$base_att."</span>";
return $tooltip;
}
else
{
return $base_att; return $base_att;
} }
}
//获取pd的防御力与修正 //获取pd的防御力与修正
function get_base_def(&$pa,&$pd,$active) function get_base_def(&$pa,&$pd,$active,$tooltip=0)
{ {
global $specialrate,$log; global $specialrate,$log;
//pd基础防御力: if(!isset($pd['wep_kind'])) get_wep_kind($pd);
# pd基础防御力:
$base_def = $pd['def']; $base_def = $pd['def'];
//pd装备提供防御力: # pd装备提供防御力:
$equip_def = $pd['arbe']+$pd['arhe']+$pd['arae']+$pd['arfe']; $equip_def = $pd['arbe']+$pd['arhe']+$pd['arae']+$pd['arfe'];
//是否受pa冲击效果影响: # 是否受pa冲击效果影响:
if(in_array('N',$pa['ex_keys'])) if(isset($pa['ex_keys']) && in_array('N',$pa['ex_keys']))
{ {
$Ndice = diceroll(99); $Ndice = diceroll(99);
if($Ndice < $specialrate['N']) if($Ndice < $specialrate['N'])
...@@ -475,52 +516,82 @@ ...@@ -475,52 +516,82 @@
$pa['charge_flag'] = 1; $pa['charge_flag'] = 1;
} }
} }
//获取pd社团技能对防御力的加成 # 获取pd社团技能对防御力的加成
rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1); rev_get_clubskill_bonus($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$att1,$def1);
//pd防御力 # 汇总
$total_def = $base_def+$equip_def+$def1; $total_def = $base_def+$equip_def+$def1;
//$log.= "【DEBUG】{$pd['name']}的total_def是{$total_def},";
//计算防御力修正 # 初始化tooltip
$total_def = get_base_def_modifier($pa,$pd,$active,$total_def); if($tooltip)
//$log.= "修正后是{$total_def}。<br>"; {
$tooltip = "<span tooltip=\" 基础防御值:{$base_def}+{$equip_def}";
if($def1>0) $tooltip .="+{$def1}";
$tooltip .= "\r";
}
# 计算防御力修正
$total_def = get_base_def_modifier($pa,$pd,$active,$total_def,$tooltip);
return $total_def; return $total_def;
} }
//获取pd的防御力修正 //获取pd的防御力修正
function get_base_def_modifier(&$pa,&$pd,$active,$total_def) function get_base_def_modifier(&$pa,&$pd,$active,$total_def,$tooltip=0)
{ {
//计算天气、姿态、策略、地点对pd防御力的修正 # 计算天气、姿态、策略、地点对pd防御力的修正
global $weather,$weather_defend_modifier,$pose_defend_modifier,$tactic_defend_modifier,$pls_defend_modifier,$log; global $weather,$weather_defend_modifier,$pose_defend_modifier,$tactic_defend_modifier,$pls_defend_modifier,$log;
global $pose_defend_active,$tactic_defend_active;
$base_def_per = 100; $base_def_per = 100;
$base_def_per += $weather_defend_modifier[$weather] ?: 0 ; //天气修正
//$log.= "天气修正系数是{$base_def_per}。<br>"; $wth_def_per = $weather_defend_modifier[$weather] ?: 0 ;
$base_def_per += $pose_defend_modifier[$pd['pose']] ?: 0 ; //地点修正
//$log.= "姿势修正系数是{$base_def_per}。<br>"; $pls_def_per = $pls_defend_modifier[$pd['pls']] ?: 0;
$base_def_per += $tactic_defend_modifier[$pd['tactic']] ?: 0; //姿态修正只在受到先制攻击时生效? //pa身上没有反击标记 代表这是一次先制攻击
//$log.= "策略修正系数是{$base_def_per}。<br>"; if(!isset($pa['is_counter']) && $pose_defend_active) $pose_def_per = $pose_defend_modifier[$pd['pose']] ?: 0 ;
$base_def_per += $pls_defend_modifier[$pd['pls']] ?: 0; //姿态修正始终生效
//$log.= "地点修正系数是{$base_def_per}。<br>"; elseif(!$pose_defend_active) $pose_def_per = $pose_defend_modifier[$pd['pose']] ?: 0 ;
//策略修正只在反击阶段生效? //pa身上有反击标记 代表这是一次反击攻击
if(!empty($pa['is_counter']) && $tactic_defend_active) $tac_def_per = $tactic_defend_modifier[$pd['tactic']] ?: 0;
//策略修正始终生效
elseif(!$tactic_defend_active) $tac_def_per = $tactic_defend_modifier[$pd['tactic']] ?: 0;
//上述各项系数修正最低不低于1%
$base_def_per += $wth_def_per+$pls_def_per+$pose_def_per+$tac_def_per;
$base_def_per = $base_def_per > 0 ? $base_def_per : 1; $base_def_per = $base_def_per > 0 ? $base_def_per : 1;
//$log.= "最终修正后的系数是{$base_def_per}。<br>";
//0.01的是原来给倍率兜底不是给防御兜底的 什么天才设计
$total_def = round($total_def*($base_def_per/100));
//$log.= "上述修正后防御为{$total_def}。<br>";
//计算受伤状态对pd防御力的修正 # 计算受伤状态对pd防御力的修正
$inf_def_per = 100;
if(!empty($pd['inf']))
{
global $inf_def_p; global $inf_def_p;
foreach ($inf_def_p as $inf_ky => $value) foreach($inf_def_p as $inf_ky => $value)
{ {
if(strpos($pd['inf'], $inf_ky)!==false) $total_def *= $value; if(strpos($pd['inf'], $inf_ky)!==false) $inf_def_per *= $value;
}
} }
//计算社团技能对pd防御力的修正 # 计算社团技能对pd防御力的修正
$club_def_per = 100;
if(!empty($pd['club']) || !empty($pd['skills']))
{
rev_get_clubskill_bonus_p($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$attfac,$deffac); rev_get_clubskill_bonus_p($pa['club'],$pa['skills'],$pa,$pd['club'],$pa['skills'],$pd,$attfac,$deffac);
$total_def *= $deffac; $club_def_per *= $deffac;
//$log.= "社团技能修正后防御为{$total_def}。<br>"; }
# 汇总
$total_def = round($total_def*($base_def_per/100)*($inf_def_per/100)*($club_def_per/100));
$total_def = max(0.01,$total_def); $total_def = max(0.01,$total_def);
if($tooltip)
{
$tooltip .= "天气修正:{$wth_def_per}% \r 地点修正:{$pls_def_per}% \r 姿态修正:{$pose_def_per}% \r 策略修正:{$tac_def_per}%";
if($inf_def_per <> 100) $tooltip .=" \r 异常状态修正:{$inf_def_per}%";
if($club_def_per <> 100) $tooltip .=" \r 称号技能修正:{$club_def_per}%";
$tooltip .="\">".$total_def."</span>";
return $tooltip;
}
else
{
return $total_def; return $total_def;
} }
}
//计算原始伤害 //计算原始伤害
function get_original_dmg_rev(&$pa,&$pd,$active) function get_original_dmg_rev(&$pa,&$pd,$active)
...@@ -537,7 +608,6 @@ ...@@ -537,7 +608,6 @@
//计算伤害浮动: //计算伤害浮动:
$dmg_factor = (100 + rand ( - $dfluc, $dfluc )) / 100; $dmg_factor = (100 + rand ( - $dfluc, $dfluc )) / 100;
$damage = round ( $damage * $dmg_factor * rand ( 4, 10 ) / 10 ); $damage = round ( $damage * $dmg_factor * rand ( 4, 10 ) / 10 );
//echo "【DEBUG】伤害浮动为{$dmg_factor},原始伤害为{$damage}<br>";
//把计算得到的原始伤害保存在$pa['original_dmg']里 //把计算得到的原始伤害保存在$pa['original_dmg']里
$pa['original_dmg'] = $damage; $pa['original_dmg'] = $damage;
return $damage; return $damage;
......
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
$log .= npc_chat ($pd['type'],$pd['nm'], 'defend' ); $log .= npc_chat ($pd['type'],$pd['nm'], 'defend' );
# 反击打击实行 # 反击打击实行
# 因为这时候进攻方(造成伤害)的一方是pd,所以向第一个位置传入pd,向第二个位置(防守方)传入pa。 # 因为这时候进攻方(造成伤害)的一方是pd,所以向第一个位置传入pd,向第二个位置(防守方)传入pa。
$pd['is_counter'] = 1; //给pd一个反击标记,代表这是反击造成的伤害
$def_dmg = rev_attack($pd,$pa,1); $def_dmg = rev_attack($pd,$pa,1);
} }
else else
......
...@@ -91,7 +91,7 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') { ...@@ -91,7 +91,7 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
} elseif($news == 'revival') { } elseif($news == 'revival') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"lime\">{$a}因为及时按了BOMB键而原地满血复活了!</span><br>\n"; $newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"lime\">{$a}因为及时按了BOMB键而原地满血复活了!</span><br>\n";
} elseif($news == 'aurora_revival') { } elseif($news == 'aurora_revival') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"lime\">{$a}在奥罗拉的作用下原地复活了!</span></li>"; $newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"lime\">{$a}在奥罗拉的作用下原地复活了!</span><br>\n";
} elseif(strpos($news,'death') === 0) { } elseif(strpos($news,'death') === 0) {
if($news == 'death11') { if($news == 'death11') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>因滞留在<span class=\"red\">禁区【{$plsinfo[$c]}】</span>死亡"; $newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"yellow\">$a</span>因滞留在<span class=\"red\">禁区【{$plsinfo[$c]}】</span>死亡";
...@@ -302,6 +302,8 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') { ...@@ -302,6 +302,8 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"grey\">{$a}从安全箱中取出了道具{$b}。</span><br>\n"; $newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"grey\">{$a}从安全箱中取出了道具{$b}。</span><br>\n";
} elseif($news == 'loot_depot') { } elseif($news == 'loot_depot') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"grey\">{$a}{$b}生前存放在安全箱里的东西转移到了自己的名下。哇……真是世风日下,道德沦丧啊!</span><br>\n"; $newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"grey\">{$a}{$b}生前存放在安全箱里的东西转移到了自己的名下。哇……真是世风日下,道德沦丧啊!</span><br>\n";
} elseif($news == 'cdestroy') {
$newsinfo .= "<li>{$hour}{$min}{$sec}秒,<span class=\"red b\">{$a}{$b}的尸体销毁了</span><br>\n";
} else { } else {
$newsinfo .= "<li>$time,$news,$a,$b,$c,$d<br>\n"; $newsinfo .= "<li>$time,$news,$a,$b,$c,$d<br>\n";
} }
......
想要从尸体上拾取什么?<br><br> 想要从尸体上拾取什么?<br><br>
<input type="hidden" name="mode" value="corpse"> <input type="hidden" name="mode" value="corpse">
<!--{if $club==20}--> <!--{if $allow_destory_corpse && !in_array($w_type,$no_destory_corpse_type)}-->
<input type="radio" name="command" id="destory" value="destory" <!--{if !$w_money}-->checked<!--{/if}-->><a onclick=sl('destory'); href="javascript:void(0);" >销毁尸体</a><br>
<!--{elseif $club==20}-->
<input type="radio" name="command" id="element_split" value="element_split" <!--{if !$w_money}-->checked<!--{/if}-->><a onclick=sl('element_split'); href="javascript:void(0);" >提炼元素</a><br> <input type="radio" name="command" id="element_split" value="element_split" <!--{if !$w_money}-->checked<!--{/if}-->><a onclick=sl('element_split'); href="javascript:void(0);" >提炼元素</a><br>
<!--{/if}--> <!--{/if}-->
<!--{if $loot_depot_flag}--> <!--{if $loot_depot_flag}-->
<input type="radio" name="command" id="loot_depot" value="loot_depot"><a onclick=sl('loot_depot'); href="javascript:void(0);" >转移安全箱权限</a><br> <input type="radio" name="command" id="loot_depot" value="loot_depot"><a onclick=sl('loot_depot'); href="javascript:void(0);" >转移安全箱权限</a><br>
<!--{/if}--> <!--{/if}-->
<input type="radio" name="command" id="menu" value="menu" <!--{if !$w_money && $club!=20 }-->checked<!--{/if}-->><a onclick=sl('menu'); href="javascript:void(0);" >返回</a><br><br> <input type="radio" name="command" id="menu" value="menu" <!--{if !$w_money && $club!=20 && !$allow_destory_corpse}-->checked<!--{/if}-->><a onclick=sl('menu'); href="javascript:void(0);" >返回</a><br><br>
<!--{if $w_weps && $w_wepe}--> <!--{if $w_weps && $w_wepe}-->
<input type="radio" name="command" id="wep" value="wep"><a onclick=sl('wep'); href="javascript:void(0);" >$w_wep/$w_wepk_words/$w_wepe/$w_weps<!--{if $w_wepsk_words}-->/$w_wepsk_words<!--{/if}--></a><br> <input type="radio" name="command" id="wep" value="wep"><a onclick=sl('wep'); href="javascript:void(0);" >$w_wep/$w_wepk_words/$w_wepe/$w_weps<!--{if $w_wepsk_words}-->/$w_wepsk_words<!--{/if}--></a><br>
<!--{/if}--> <!--{/if}-->
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</tr> </tr>
<tr> <tr>
<td width="70" class="b2"><span>{lang att}</span></td> <td width="70" class="b2"><span>{lang att}</span></td>
<td width="80" class="b3"><span>$att + $wepe</span></td> <td width="80" class="b3"><span>$atkinfo</span></td>
<td class="b2"><span>{lang money}</span></td> <td class="b2"><span>{lang money}</span></td>
<td class="b3"><span>$money {lang moneyunit}</span></td> <td class="b3"><span>$money {lang moneyunit}</span></td>
<td class="b2"><span><!--{if $wd >= 100}-->{lang wd}{lang skill}<!--{else}--><span class="grey">{lang wd}{lang skill}</span><!--{/if}--></span></td> <td class="b2"><span><!--{if $wd >= 100}-->{lang wd}{lang skill}<!--{else}--><span class="grey">{lang wd}{lang skill}</span><!--{/if}--></span></td>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</tr> </tr>
<tr> <tr>
<td class="b2"><span>{lang def}</span></td> <td class="b2"><span>{lang def}</span></td>
<td class="b3"><span>$def + $ardef</span></td> <td class="b3"><span>$definfo</span></td>
<td class="b2"><span>{lang inf}</span></td> <td class="b2"><span>{lang inf}</span></td>
<td class="b3"> <td class="b3">
<span> <span>
......
...@@ -67,7 +67,7 @@ if(isset($exmode) && strpos($exmode,'ep')===0) ...@@ -67,7 +67,7 @@ if(isset($exmode) && strpos($exmode,'ep')===0)
$vlog = $flag; $vlog = $flag;
goto error_edit2; goto error_edit2;
} }
$edit_name = $flag['name']; $edit_name = $flag['name']; $edit_result = $flag['result'][0];
unset($flag); unset($flag);
//通过检查,打包。 //通过检查,打包。
$flag = filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4); $flag = filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrname,$vrk,$vre,$vrs,$vrsk0,$vrsk1,$vrsk2,$vrsk3,$vrsk4);
...@@ -102,6 +102,7 @@ if(isset($exmode) && strpos($exmode,'ep')===0) ...@@ -102,6 +102,7 @@ if(isset($exmode) && strpos($exmode,'ep')===0)
} }
else else
{ {
if($gmflag) vn_adminlog('编辑了配方',$edit_result);
$vlog .= '<span class="yellow">成功编辑了配方!</span><br>'; $vlog .= '<span class="yellow">成功编辑了配方!</span><br>';
$vdata['url'] = 'vnworld.php?vtips=1'; $vdata['url'] = 'vnworld.php?vtips=1';
} }
...@@ -133,7 +134,7 @@ elseif(isset($exmode) && strpos($exmode,'dp')===0) ...@@ -133,7 +134,7 @@ elseif(isset($exmode) && strpos($exmode,'dp')===0)
} }
else else
{ {
$edit_name = $flag['name']; $edit_name = $flag['name']; $edit_result = $flag['result'][0];
unset($flag); unset($flag);
if($edit_name !== $udata['username']) if($edit_name !== $udata['username'])
{ {
...@@ -157,6 +158,7 @@ elseif(isset($exmode) && strpos($exmode,'dp')===0) ...@@ -157,6 +158,7 @@ elseif(isset($exmode) && strpos($exmode,'dp')===0)
} }
else else
{ {
if($gmflag) vn_adminlog('删除了配方',$edit_result);
$vlog = '删除了配方。<br>'; $vlog = '删除了配方。<br>';
$vdata['url'] = 'vnworld.php?vtips=2'; $vdata['url'] = 'vnworld.php?vtips=2';
} }
...@@ -195,7 +197,7 @@ elseif(isset($exmode) && strpos($exmode,'cs')===0) ...@@ -195,7 +197,7 @@ elseif(isset($exmode) && strpos($exmode,'cs')===0)
} }
else else
{ {
$edit_name = $flag['name']; $edit_name = $flag['name']; $edit_result = $flag['result'][0];
unset($flag); unset($flag);
$result = $db->query("SELECT * FROM {$tablepre}users WHERE username='$edit_name'"); $result = $db->query("SELECT * FROM {$tablepre}users WHERE username='$edit_name'");
if(!$db->num_rows($result)) if(!$db->num_rows($result))
...@@ -212,6 +214,7 @@ elseif(isset($exmode) && strpos($exmode,'cs')===0) ...@@ -212,6 +214,7 @@ elseif(isset($exmode) && strpos($exmode,'cs')===0)
} }
else else
{ {
if($gmflag) vn_adminlog('改变了以下配方状态',$edit_result,$change_status);
$vlog = '成功变更了配方状态。<br>'; $vlog = '成功变更了配方状态。<br>';
$vdata['url'] = 'vnworld.php?vtips=3&vcs='.$change_status.''; $vdata['url'] = 'vnworld.php?vtips=3&vcs='.$change_status.'';
} }
...@@ -550,4 +553,14 @@ function filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrnam ...@@ -550,4 +553,14 @@ function filter_post_mixlist($vsname0,$vsname1,$vsname2,$vsname3,$vsname4,$vrnam
return $newarr; return $newarr;
} }
function vn_adminlog($op,$an1='',$an2='',$an3=''){
global $now,$cuser;
$alfile = GAME_ROOT.'./gamedata/adminlog.php';
if($op){
$aldata = "$now,$cuser,$op,$an1,$an2,$an3,\n";
writeover($alfile,$aldata,'ab+');
}
return;
}
?> ?>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
define('CURSCRIPT', 'vnworld'); define('CURSCRIPT', 'vnworld');
require './include/common.inc.php'; require './include/common.inc.php';
require './include/game/itemplace.func.php';
require config('vnworld',$gamecfg); require config('vnworld',$gamecfg);
/*** 登陆检测 ***/ /*** 登陆检测 ***/
...@@ -34,6 +35,12 @@ if($vnmode=='none') ...@@ -34,6 +35,12 @@ if($vnmode=='none')
$temp_carr = $carr; $temp_carr = $carr;
foreach($temp_carr as $cid => $cinfo) foreach($temp_carr as $cid => $cinfo)
{ {
// 格式化素材来源
foreach($cinfo['stuff'] as $sid => $snm)
{
$temp_carr[$cid]['stuff'][$sid] = "<span tooltip=\"".get_item_place($snm)."\">".$snm."</span>";
}
// 格式化属性
if(isset($cinfo['result'][4]) && is_array($cinfo['result'][4])) if(isset($cinfo['result'][4]) && is_array($cinfo['result'][4]))
{ {
foreach($cinfo['result'][4] as $sk) foreach($cinfo['result'][4] as $sk)
......
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