Skip to content

Commit 3fa7f7f

Browse files
authored
Create JJk.html
1 parent ca86bfe commit 3fa7f7f

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

JJk.html

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>JJK Mobile Game</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<style>
7+
body { background: #1a1a1a; color: #fff; font-family: sans-serif; text-align: center; }
8+
#game-box { border: 2px solid #7d2ae8; margin: 20px auto; padding: 20px; max-width: 90%; border-radius: 10px; }
9+
button { background: #7d2ae8; color: white; border: none; padding: 10px 20px; margin: 5px; border-radius: 5px; font-weight: bold; }
10+
#status { color: #ff4757; font-weight: bold; margin: 15px 0; }
11+
.hp-bar { background: #444; height: 20px; width: 100%; border-radius: 10px; margin-bottom: 10px; }
12+
#hp-fill { background: #2ed573; height: 100%; width: 100%; border-radius: 10px; transition: 0.5s; }
13+
</style>
14+
</head>
15+
<body>
16+
<h2>JUJUTSU KAISEN: CỬA TỬ</h2>
17+
<div id="game-box">
18+
<p>Đang đối đầu với: <strong>Nguyền Hồn Cấp Đặc Biệt</strong></p>
19+
<div class="hp-bar"><div id="hp-fill"></div></div>
20+
<p id="message">Bạn nhìn thấy một thực thể đáng sợ. Hãy chọn chiêu thức!</p>
21+
<div id="status"></div>
22+
<button onclick="attack('Black Flash')">Hắc Thiểm (70% trúng)</button>
23+
<button onclick="attack('Divergent Fist')">Kính Đấm (Chắc chắn trúng)</button>
24+
</div>
25+
26+
<script>
27+
let bossHP = 100;
28+
function attack(move) {
29+
let damage = 0;
30+
let msg = "";
31+
if(move === 'Black Flash') {
32+
if(Math.random() > 0.3) {
33+
damage = 35;
34+
msg = "KHOẢNH KHẮC CỦA TIA CHỚP ĐEN! Bạn gây " + damage + " sát thương!";
35+
} else {
36+
msg = "Hắc thiểm thất bại! Bạn bị phản đòn!";
37+
}
38+
} else {
39+
damage = 15;
40+
msg = "Bạn dùng Kính Đấm trúng đích! Gây " + damage + " sát thương.";
41+
}
42+
43+
bossHP -= damage;
44+
if(bossHP <= 0) {
45+
bossHP = 0;
46+
msg = "CHÚC MỪNG! Bạn đã thanh tẩy Nguyền hồn!";
47+
}
48+
49+
document.getElementById('hp-fill').style.width = bossHP + "%";
50+
document.getElementById('message').innerText = msg;
51+
if(bossHP <= 0) document.querySelector('#game-box').innerHTML += "<h3>VICTORY!</h3>";
52+
}
53+
</script>
54+
</body>
55+
</html>

0 commit comments

Comments
 (0)