破碎地牢 v3.1.1(大量金币)中文版破碎地牢中文版(Shattered Pixel Dungeon)该游戏采用了像素风格,每一个关卡都是独一无二的,并且玩家的生命只有一次,因此这款游戏无论是从挑战难度上还是玩法模式上都非常丰富,游戏会随机生成敌人、关卡、物品和陷阱,而玩家将在每一轮的游戏体验中获得全新挑战,死亡即意味游戏结束。




const modal = document.getElementById(‘imageModal’);
const closeModal = document.getElementById(‘closeModal’);
const enlargedImg = document.getElementById(‘enlargedImg’);
const thumbnails = document.querySelectorAll(‘.img-thumbnail’);
thumbnails.forEach(thumbnail => {
thumbnail.addEventListener(‘click’, () => {
modal.classList.remove(‘hidden’);
enlargedImg.src = thumbnail.src;
enlargedImg.alt = thumbnail.alt;
document.body.style.overflow = ‘hidden’;
});
});
closeModal.addEventListener(‘click’, () => {
modal.classList.add(‘hidden’);
document.body.style.overflow = ‘auto’;
});
modal.addEventListener(‘click’, (e) => {
if (e.target === modal) {
modal.classList.add(‘hidden’);
document.body.style.overflow = ‘auto’;
}
});
document.addEventListener(‘keydown’, (e) => {
if (e.key === ‘Escape’ && !modal.classList.contains(‘hidden’)) {
modal.classList.add(‘hidden’);
document.body.style.overflow = ‘auto’;
}
});
