微件:Test:修订间差异
无编辑摘要 标签:(旧)WikiEditor |
无编辑摘要 标签:(旧)WikiEditor |
||
| 第100行: | 第100行: | ||
/* ===== 11 张剧情票 ===== */ | /* ===== 11 张剧情票 ===== */ | ||
const TICKETS = [ | const TICKETS = [ | ||
{left:2,data:0,mascot:'',bubble:'你好。', | {left:2,data:0,mascot:'',bubble:'你好。',onScan:'扫描完成:未检测到异常。',onRedeem:'点击兑奖区彩票会作废的哦(0',rewards:{12:'DATA'}}, | ||
{left:1,data:1,mascot:'(^▽^)ノ',bubble:'第一张,只中了 DATA。', | {left:1,data:1,mascot:'(^▽^)ノ',bubble:'第一张,只中了 DATA。',onScan:'扫描结果:DATA ×1',onRedeem:'点击兑奖区彩票会作废的哦(00000',rewards:{1:'连',3:'着',16:'四',19:'个'}}, | ||
{left:2,data:2,mascot:'(ノ◕ヮ◕)ノ',bubble:'连着刮出了四个字!', | {left:2,data:2,mascot:'(ノ◕ヮ◕)ノ',bubble:'连着刮出了四个字!',onScan:'检测到异常排列,追加彩票。',onRedeem:'点击兑奖区彩票会作废的哦(00000',rewards:{1:'1',2:'2',3:'3',4:'4',5:'5',6:'6',7:'7',8:'8',9:'9',10:'10',11:'11',12:'12',13:'13',14:'14',15:'15',16:'16',17:'17',18:'18',19:'19',20:'20',21:'21',22:'22',23:'23',24:'24',25:'25',26:'26',27:'27',28:'28',29:'29',30:'30'}}, | ||
{left:2,data:4,mascot:'(^▽^)',bubble:'中了刮刮乐!DATA 2MB', | {left:2,data:4,mascot:'(^▽^)',bubble:'中了刮刮乐!DATA 2MB',onScan:'扫描完成:DATA 2MB',onRedeem:'点击兑奖区彩票会作废的哦(000000000',rewards:{8:'DATA',14:'🎟'}}, | ||
{left:2,data:5,mascot:'(・_・)',bubble:'什么都没有。', | {left:2,data:5,mascot:'(・_・)',bubble:'什么都没有。',onScan:'扫描完成:空。',onRedeem:'这里点击兑奖区彩票会作废的哦(000000000',rewards:{22:'DATA'}}, | ||
{left:1,data:5,mascot:'(;゚Д゚)',bubble:'好像哪里不对。', | {left:1,data:5,mascot:'(;゚Д゚)',bubble:'好像哪里不对。',onScan:'扫描警告:结构异常。',onRedeem:'……点击兑奖区彩票会作废的哦(000000000',rewards:{}}, | ||
{left:0,data:5,mascot:'',bubble:'什么都没有。', | {left:0,data:5,mascot:'',bubble:'什么都没有。',onScan:'扫描完成:无有效数据。',onRedeem:'点击兑奖区彩票会作废的哦(000000000',rewards:{6:'🎟'}}, | ||
{left:0,data:7,mascot:'...',bubble:'▒▓░▒▓▒▓', | {left:0,data:7,mascot:'...',bubble:'▒▓░▒▓▒▓',onScan:'▒▓░▒▓▒▓▒▓▒▓',onRedeem:'▒▓░▒▓▒▓',rewards:{3:'DATA',18:'DATA'}}, | ||
{left:1,data:'—',mascot:'',bubble:'哦 嗯 嘿 哈', | {left:1,data:'—',mascot:'',bubble:'哦 嗯 嘿 哈',onScan:'扫描结果:DATA 溢出。',rewards:Object.fromEntries([...Array(30).keys()].map(i=>[i,'DATA']))}, | ||
{left:0,data:'—',mascot:'',bubble:'你是谁?',lock:true,onScan:'扫描失败。',rewards:{}}, | |||
{left:0,data:'—',mascot:'',bubble:'你是谁?',lock:true,rewards:{}}, | {left:'▒▓░▒▓▒▓',data:'▒▓░▒▓▒▓',mascot:'平安喜乐',bubble:'你知道的太多了。',onScan:'权限越界。',final:true,rewards:{}} | ||
{left:'▒▓░▒▓▒▓',data:'▒▓░▒▓▒▓',mascot:'平安喜乐',bubble:'你知道的太多了。',final:true,rewards:{}} | |||
]; | ]; | ||
let idx = 0; | let idx = 0; | ||
let revealed = 0; | let revealed = 0; | ||
let scanned = false; | |||
function build(){ | function build(){ | ||
| 第121行: | 第121行: | ||
grid.innerHTML = ''; | grid.innerHTML = ''; | ||
revealed = 0; | revealed = 0; | ||
scanned = false; | |||
leftEl.textContent = t.left; | leftEl.textContent = t.left; | ||
| 第126行: | 第127行: | ||
mascot.textContent = t.mascot || ''; | mascot.textContent = t.mascot || ''; | ||
bubble.textContent = t.bubble || ''; | bubble.textContent = t.bubble || ''; | ||
scan.textContent = '扫描结果'; | |||
scan.classList.remove('active'); | scan.classList.remove('active'); | ||
| 第156行: | 第159行: | ||
scan.onclick = () => { | scan.onclick = () => { | ||
if(!scan.classList.contains('active')) return; | if(!scan.classList.contains('active')) return; | ||
const t = TICKETS[idx]; | |||
if( | /* 第一次:扫描 */ | ||
if(!scanned){ | |||
scanned = true; | |||
if(t.onScan) bubble.textContent = t.onScan; | |||
scan.textContent = '再来一张'; | |||
if(t.final){ | |||
document.body.style.filter = 'invert(1)'; | |||
setTimeout(() => { | |||
location.href = '/index.php?title=六世恶言之一'; | |||
}, 1200); | |||
} | |||
return; | return; | ||
} | } | ||
/* 第二次:下一张 */ | |||
idx++; | idx++; | ||
build(); | if(idx < TICKETS.length) build(); | ||
}; | }; | ||
redeem.onclick = () => { | redeem.onclick = () => { | ||
const t = TICKETS[idx]; | const t = TICKETS[idx]; | ||
if(t. | if(t.onRedeem){ | ||
bubble.textContent = t. | bubble.textContent = t.onRedeem; | ||
} | } | ||
}; | }; | ||
| 第181行: | 第193行: | ||
}; | }; | ||
/* | /* 测试快捷:Shift + D */ | ||
document.addEventListener('keydown', e => { | document.addEventListener('keydown', e => { | ||
if(e.shiftKey && e.key.toLowerCase() === 'd'){ | if(e.shiftKey && e.key.toLowerCase() === 'd'){ | ||
2026年2月2日 (一) 19:35的版本
<button class="ggl-start-btn">来一张彩票…
…不,三张吧</button>
刮出数字即能获得对应额度的data
当“平”“安”“喜”“乐”四个字连城一条线时,可再获得一张刮刮卡
看不懂也没关系!bot会告诉你结果!
剩余彩票:— 张 可提现 DATA:—
<img class="ggl-bg"
src="
">
<button class="ggl-redeem-hit" id="ggl-redeem-hit"></button>
<button id="ggl-scan">扫描结果</button>
<style> .ggl-root{width:375px;margin:auto;font-family:sans-serif;position:relative} .ggl-mask{position:absolute;inset:0;background:#000d;z-index:99;display:flex;align-items:center;justify-content:center} .ggl-start-btn{padding:12px 20px;font-size:16px}
.ggl-top{text-align:center;font-size:14px;margin-bottom:6px}
.ggl-frame{padding:10px;border:3px solid #ff00aa;box-shadow:0 0 12px #ff00aa88}
.ggl-ticket{position:relative;aspect-ratio:1075/1911} .ggl-bg{width:100%;display:block}
.ggl-scratch-area{position:absolute;left:10%;top:35%;width:80%;height:53%} .ggl-grid{display:grid;width:100%;height:100%;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(6,1fr);gap:6px}
.ggl-cell{position:relative;overflow:hidden} .ggl-cell img,.ggl-cover{position:absolute;inset:0;width:100%;height:100%} .ggl-cover{
background:url("
") center/cover;
cursor:pointer
} .ggl-reward{
position:absolute;inset:0; display:flex;align-items:center;justify-content:center; font-size:12px;font-weight:bold;pointer-events:none
}
.ggl-mascot{position:absolute;left:6%;top:107%;font-size:20px;color:#000} .ggl-bubble{position:absolute;left:6%;top:103%;width:60%;background:#fff;padding:6px;font-size:13px}
.ggl-controls{position:absolute;right:6%;top:103%}
- ggl-scan{opacity:.3}
- ggl-scan.active{opacity:1}
.ggl-redeem-hit{
position:absolute;bottom:1%;left:2%; width:48%;height:10%; background:transparent;border:none;cursor:pointer
} </style>
<script> (function(){
const grid = document.querySelector('.ggl-grid'); const bubble = document.querySelector('.ggl-bubble'); const mascot = document.querySelector('.ggl-mascot'); const scan = document.getElementById('ggl-scan'); const leftEl = document.getElementById('ggl-left'); const dataEl = document.getElementById('ggl-data'); const mask = document.getElementById('ggl-mask'); const redeem = document.getElementById('ggl-redeem-hit');
const OPEN = 'https://wm.gaoice.run/images/thumb/4/4a/%E5%88%AE%E5%BC%80%E5%90%8E.jpg/180px-%E5%88%AE%E5%BC%80%E5%90%8E.jpg';
/* ===== 11 张剧情票 ===== */ const TICKETS = [
{left:2,data:0,mascot:,bubble:'你好。',onScan:'扫描完成:未检测到异常。',onRedeem:'点击兑奖区彩票会作废的哦(0',rewards:{12:'DATA'}},
{left:1,data:1,mascot:'(^▽^)ノ',bubble:'第一张,只中了 DATA。',onScan:'扫描结果:DATA ×1',onRedeem:'点击兑奖区彩票会作废的哦(00000',rewards:{1:'连',3:'着',16:'四',19:'个'}},
{left:2,data:2,mascot:'(ノ◕ヮ◕)ノ',bubble:'连着刮出了四个字!',onScan:'检测到异常排列,追加彩票。',onRedeem:'点击兑奖区彩票会作废的哦(00000',rewards:{1:'1',2:'2',3:'3',4:'4',5:'5',6:'6',7:'7',8:'8',9:'9',10:'10',11:'11',12:'12',13:'13',14:'14',15:'15',16:'16',17:'17',18:'18',19:'19',20:'20',21:'21',22:'22',23:'23',24:'24',25:'25',26:'26',27:'27',28:'28',29:'29',30:'30'}},
{left:2,data:4,mascot:'(^▽^)',bubble:'中了刮刮乐!DATA 2MB',onScan:'扫描完成:DATA 2MB',onRedeem:'点击兑奖区彩票会作废的哦(000000000',rewards:{8:'DATA',14:'🎟'}},
{left:2,data:5,mascot:'(・_・)',bubble:'什么都没有。',onScan:'扫描完成:空。',onRedeem:'这里点击兑奖区彩票会作废的哦(000000000',rewards:{22:'DATA'}},
{left:1,data:5,mascot:'(;゚Д゚)',bubble:'好像哪里不对。',onScan:'扫描警告:结构异常。',onRedeem:'……点击兑奖区彩票会作废的哦(000000000',rewards:{}},
{left:0,data:5,mascot:,bubble:'什么都没有。',onScan:'扫描完成:无有效数据。',onRedeem:'点击兑奖区彩票会作废的哦(000000000',rewards:{6:'🎟'}},
{left:0,data:7,mascot:'...',bubble:'▒▓░▒▓▒▓',onScan:'▒▓░▒▓▒▓▒▓▒▓',onRedeem:'▒▓░▒▓▒▓',rewards:{3:'DATA',18:'DATA'}},
{left:1,data:'—',mascot:,bubble:'哦 嗯 嘿 哈',onScan:'扫描结果:DATA 溢出。',rewards:Object.fromEntries([...Array(30).keys()].map(i=>[i,'DATA']))},
{left:0,data:'—',mascot:,bubble:'你是谁?',lock:true,onScan:'扫描失败。',rewards:{}},
{left:'▒▓░▒▓▒▓',data:'▒▓░▒▓▒▓',mascot:'平安喜乐',bubble:'你知道的太多了。',onScan:'权限越界。',final:true,rewards:{}}
];
let idx = 0; let revealed = 0; let scanned = false;
function build(){
const t = TICKETS[idx]; grid.innerHTML = ; revealed = 0; scanned = false;
leftEl.textContent = t.left; dataEl.textContent = t.data; mascot.textContent = t.mascot || ; bubble.textContent = t.bubble || ;
scan.textContent = '扫描结果';
scan.classList.remove('active');
for(let i=0;i<30;i++){
const c = document.createElement('div');
c.className = 'ggl-cell';
c.innerHTML = `
<img src="${OPEN}">
`;
const cover = c.querySelector('.ggl-cover');
if(!t.lock){
cover.onclick = () => {
if(c.dataset.done) return;
c.dataset.done = 1;
cover.style.display = 'none';
if(++revealed === 30){
scan.classList.add('active');
}
};
}
grid.appendChild(c);
}
if(t.lock) scan.classList.add('active');
}
scan.onclick = () => {
if(!scan.classList.contains('active')) return;
const t = TICKETS[idx];
/* 第一次:扫描 */
if(!scanned){
scanned = true;
if(t.onScan) bubble.textContent = t.onScan;
scan.textContent = '再来一张';
if(t.final){
document.body.style.filter = 'invert(1)';
setTimeout(() => {
location.href = '/index.php?title=六世恶言之一';
}, 1200);
}
return;
}
/* 第二次:下一张 */ idx++; if(idx < TICKETS.length) build();
};
redeem.onclick = () => {
const t = TICKETS[idx];
if(t.onRedeem){
bubble.textContent = t.onRedeem;
}
};
mask.onclick = () => {
mask.remove(); build();
};
/* 测试快捷:Shift + D */ document.addEventListener('keydown', e => {
if(e.shiftKey && e.key.toLowerCase() === 'd'){
grid.querySelectorAll('.ggl-cover').forEach(c => c.style.display = 'none');
revealed = 30;
scan.classList.add('active');
}
});
})(); </script>
