Commit 9a53bdc0 authored by satsuki8's avatar satsuki8

改进了水果刀对道具名的判定

parent f93bcbf4
......@@ -355,8 +355,8 @@
'DA' => Array('盾','掌','手套','朋友','匣子','鱼鳞','力场盾','鱼竿','手表','手环','镣铐','命数','战甲A'),
'DF' => Array('鞋','靴','爪','加护','轨迹','脚步','飞毯','马靴','草鞋','触手','尾巴','滑板','战甲F'),
'H' => Array('秘药','罐头','糊糊','杏仁豆腐','烤鱼面包','章鱼须','乌鸡肉','生海带','幸运饼干','长芽土豆','眼泪','趣味'),//补给
'V' => Array('指南','卷轴','手册','秘籍','乐谱','知识','共鸣','秘术','法典','广告','指引','教导'),//技能书
'M' => Array('羽毛','结晶','精华','甘露','魂','眼','心','血','魔核','宝珠','力量','勇气'),//强化药物
'V' => Array('指南','卷轴','手册','秘籍','乐谱','知识','共鸣','秘术','法典','广告','指引','教导','语录'),//技能书
'M' => Array('羽毛','结晶','精华','甘露','魂','眼','心','血','魔核','宝珠','力量','勇气','波纹'),//强化药物
'0' => Array('怪东西','???','竟然是它','■■■','数据削除'),//BUG词尾:没有找到类别的情况下会变成这个
);
......
......@@ -2240,8 +2240,6 @@ function itemuse($itmn,&$data=NULL) {
for($i = 1; $i <= 6; $i ++) {
//global ${'itm' . $i}, ${'itmk' . $i},${'itms' . $i},${'itme' . $i},$wk;
/* 括号;
去除括号; */
if (strpos(${'itmsk' . $i}, '🍎') !== false) {
if($wk >= 120){
$log .= "练过刀就是好啊。你娴熟地削着果皮。<br><span class=\"yellow\">{${'itm'.$i}}</span>变成了<span class=\"yellow\">★残骸★</span>!<br>咦为什么会出来这种东西?算了还是不要吐槽了。<br>";
......@@ -2253,11 +2251,17 @@ function itemuse($itmn,&$data=NULL) {
$wk++;
}else{
$log .= "想削皮吃<span class=\"yellow\">{${'itm'.$i}}</span>,没想到削完发现只剩下一堆果皮……<br>手太笨拙了啊。<br>";
if ((mb_substr(${'itm' . $i}, 0, 1) === '★') && (mb_substr(${'itm' . $i}, -1) === '★')){
${'itm' . $i} = mb_substr(${'itm' . $i}, 0, -1).'皮★';
}else{
${'itm' . $i} = ${'itm' . $i}.'皮';
$brackets_arr = Array('☆☆','★★','〖〗','【】','『』','「」','✦✦','☾☽','☼☼','■■');
$if_brackets = 0;
foreach ($brackets_arr as $brackets)
{
if ((mb_substr(${'itm' . $i}, 0, 1)).(mb_substr(${'itm' . $i}, -1)) === $brackets){
$if_brackets = 1;
${'itm' . $i} = mb_substr(${'itm' . $i}, 0, -1).'皮'.mb_substr(${'itm' . $i}, -1);
break;
}
}
if ($if_brackets == 0) ${'itm' . $i} = ${'itm' . $i}.'皮';
${'itmk' . $i} = 'TN';
${'itms' . $i} *= rand(2,4);
${'itmsk' . $i} = '';
......
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