Commit f11177bd authored by Nemo Ma's avatar Nemo Ma

Fix Exploit regarding Jewel Enhancement

Fix Exploit: When the item name is longer than 30 chars, the Jewel Enhancement level could not be written, leading to infinite enhancements - an Easter egg is implemented to change the item's name to stop this.
Fix(?) Oversight: sing infinite stamina items as material will not consume the item.
Add: Glitch text effects to use for club21's lore material.
parent 895576e0
......@@ -146,6 +146,65 @@ table.infotable th {
.tclan{color:rgb(30, 150, 255); font: bold 10pt "微软雅黑" serif;line-height:16px}
.tmagenta{color:rgb(221, 30, 255); font: bold 10pt "微软雅黑" serif;line-height:16px}
.torange{color:rgb(255, 128, 0); font: bold 10pt "微软雅黑" serif;line-height:16px}
.glitch1 {
font-weight: bold;
text-transform: uppercase;
position: relative;
text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
0.025em 0.04em 0 #fffc00;
animation: glitch1 725ms infinite;
}
.glitch1 span {
position: absolute;
top: 0;
left: 0;
}
.glitch1 span:first-child {
animation: glitch1 500ms infinite;
clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
transform: translate(-0.04em, -0.03em);
opacity: 0.75;
}
.glitch1 span:last-child {
animation: glitch1 375ms infinite;
clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
transform: translate(0.04em, 0.03em);
opacity: 0.75;
}
@keyframes glitch1 {
0% {
text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
0.025em 0.04em 0 #fffc00;
}
15% {
text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
0.025em 0.04em 0 #fffc00;
}
16% {
text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
-0.05em -0.05em 0 #fffc00;
}
49% {
text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
-0.05em -0.05em 0 #fffc00;
}
50% {
text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
0 -0.04em 0 #fffc00;
}
99% {
text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
0 -0.04em 0 #fffc00;
}
100% {
text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff,
-0.04em -0.025em 0 #fffc00;
}
}
@keyframes blueflicker {
0%, 18%, 22%, 25%, 53%, 57%, 100% {
......
......@@ -519,6 +519,16 @@ function qianghua($itmn = 0) {
}
addnews ( $now, 'newwep2',$name, $baoshi, $o_itm , $nick);
if ($flag){
# Detect item names that's too long - if so, trigger this easter egg and fix the item name to prevent exploit.
if(mb_strlen($o_itm,'utf-8')>=30){
$log .= "<span class=\"yellow\">突然,有另一把声音插了进来!</span><br>";
$log .= "<span class=\"glitch1\">“我是大魔王昆顿,你们这些中二入脑的英雄们都喜欢将自己的装备名字取得很长,我很生气!<br>就让我毁灭你的中二吧!”</span><br>";
#搞事!
$itm = "★破灭的中二之魂★";
$log .= "<span class=\"yellow\">『你的全身被恐怖感缠绕,只能眼睁睁地看着大魔王将你的中二之魂打成了碎片!<br>但惊异的是,它的性能竟然毫无变化。』</span><br>";
$log .= "<span class=\"glitch1\">“毕竟老夫也不是什么恶魔嘛——那么我的气消了,凯莉你继续吧。”</span><br>";
}
$log .= "<span class=\"yellow\">『一道神圣的闪光照耀在你的眼睛上,当你恢复视力时,发现你的装备闪耀着彩虹般的光芒』</span><br>";
$nzitmlv = $zitmlv +1;
......
......@@ -1119,7 +1119,14 @@ function itemreduce($item,$mode=0){ //只限合成使用!!
# 素材类道具作合成素材时只消耗耐久
if(preg_match('/^(Y|B|C|X|TN|GB|H|P|V|M)/',$itmk))
{
$itms--;
# Added one additional check to deal with infinite stamina item - destroy it when used in mix.
if($itms = '∞'){
$itms = 0;
$log .= "<span class=\"red\">$itm</span>消失了。<br>";
$itm = $itmk = $itmsk = '';
$itme = $itms = 0;
}else{
$itms--;}
}
# 带有工具属性的道具作合成素材时,不会消耗
elseif(in_array('🧰',get_itmsk_array($itmsk)))
......
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