Add 3 files
Browse files- README.md +7 -5
- index.html +677 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: gg
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,677 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="pt-br">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Dragon Ball MUGEN</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<style>
|
| 9 |
+
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');
|
| 10 |
+
|
| 11 |
+
body {
|
| 12 |
+
overflow: hidden;
|
| 13 |
+
font-family: 'Permanent Marker', cursive;
|
| 14 |
+
background-color: #111;
|
| 15 |
+
color: white;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
#game-container {
|
| 19 |
+
position: relative;
|
| 20 |
+
width: 800px;
|
| 21 |
+
height: 400px;
|
| 22 |
+
margin: 0 auto;
|
| 23 |
+
background-image: url('https://i.imgur.com/3ZQjY7a.jpg');
|
| 24 |
+
background-size: cover;
|
| 25 |
+
border: 4px solid #f5d742;
|
| 26 |
+
box-shadow: 0 0 20px #f5d742;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.character {
|
| 30 |
+
position: absolute;
|
| 31 |
+
width: 80px;
|
| 32 |
+
height: 120px;
|
| 33 |
+
bottom: 50px;
|
| 34 |
+
transition: transform 0.1s;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
#goku {
|
| 38 |
+
left: 100px;
|
| 39 |
+
background-image: url('https://i.imgur.com/J0q0Z7N.png');
|
| 40 |
+
background-size: contain;
|
| 41 |
+
background-repeat: no-repeat;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
#vegeta {
|
| 45 |
+
right: 100px;
|
| 46 |
+
background-image: url('https://i.imgur.com/5X9QZ7N.png');
|
| 47 |
+
background-size: contain;
|
| 48 |
+
background-repeat: no-repeat;
|
| 49 |
+
transform: scaleX(-1);
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
.health-bar {
|
| 53 |
+
height: 20px;
|
| 54 |
+
background-color: #333;
|
| 55 |
+
border: 2px solid #fff;
|
| 56 |
+
position: relative;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.health-fill {
|
| 60 |
+
height: 100%;
|
| 61 |
+
background-color: #ff0000;
|
| 62 |
+
transition: width 0.3s;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.ki-bar {
|
| 66 |
+
height: 10px;
|
| 67 |
+
background-color: #333;
|
| 68 |
+
border: 1px solid #fff;
|
| 69 |
+
position: relative;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.ki-fill {
|
| 73 |
+
height: 100%;
|
| 74 |
+
background-color: #00aaff;
|
| 75 |
+
transition: width 0.3s;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.attack-effect {
|
| 79 |
+
position: absolute;
|
| 80 |
+
width: 60px;
|
| 81 |
+
height: 40px;
|
| 82 |
+
background-image: url('https://i.imgur.com/8Q9QZ7N.png');
|
| 83 |
+
background-size: contain;
|
| 84 |
+
background-repeat: no-repeat;
|
| 85 |
+
opacity: 0;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.kamehameha {
|
| 89 |
+
position: absolute;
|
| 90 |
+
width: 300px;
|
| 91 |
+
height: 60px;
|
| 92 |
+
background-image: url('https://i.imgur.com/9Q9QZ7N.png');
|
| 93 |
+
background-size: contain;
|
| 94 |
+
background-repeat: no-repeat;
|
| 95 |
+
opacity: 0;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.power-up {
|
| 99 |
+
position: absolute;
|
| 100 |
+
width: 100px;
|
| 101 |
+
height: 100px;
|
| 102 |
+
background-image: url('https://i.imgur.com/7Q9QZ7N.png');
|
| 103 |
+
background-size: contain;
|
| 104 |
+
background-repeat: no-repeat;
|
| 105 |
+
opacity: 0;
|
| 106 |
+
animation: pulse 1s infinite;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
@keyframes pulse {
|
| 110 |
+
0% { transform: scale(1); }
|
| 111 |
+
50% { transform: scale(1.2); }
|
| 112 |
+
100% { transform: scale(1); }
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
#start-screen, #game-over {
|
| 116 |
+
position: absolute;
|
| 117 |
+
top: 0;
|
| 118 |
+
left: 0;
|
| 119 |
+
width: 100%;
|
| 120 |
+
height: 100%;
|
| 121 |
+
background-color: rgba(0,0,0,0.8);
|
| 122 |
+
display: flex;
|
| 123 |
+
flex-direction: column;
|
| 124 |
+
justify-content: center;
|
| 125 |
+
align-items: center;
|
| 126 |
+
z-index: 100;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
.title {
|
| 130 |
+
font-size: 4rem;
|
| 131 |
+
color: #f5d742;
|
| 132 |
+
text-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
|
| 133 |
+
margin-bottom: 2rem;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.btn {
|
| 137 |
+
padding: 1rem 2rem;
|
| 138 |
+
font-size: 1.5rem;
|
| 139 |
+
background-color: #f5d742;
|
| 140 |
+
color: #111;
|
| 141 |
+
border: none;
|
| 142 |
+
border-radius: 5px;
|
| 143 |
+
cursor: pointer;
|
| 144 |
+
transition: all 0.3s;
|
| 145 |
+
font-family: 'Permanent Marker', cursive;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.btn:hover {
|
| 149 |
+
background-color: #ff0000;
|
| 150 |
+
color: white;
|
| 151 |
+
transform: scale(1.1);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.combo-counter {
|
| 155 |
+
position: absolute;
|
| 156 |
+
font-size: 2rem;
|
| 157 |
+
color: #f5d742;
|
| 158 |
+
text-shadow: 0 0 5px #ff0000;
|
| 159 |
+
opacity: 0;
|
| 160 |
+
}
|
| 161 |
+
</style>
|
| 162 |
+
</head>
|
| 163 |
+
<body class="bg-black">
|
| 164 |
+
<div class="container mx-auto py-8">
|
| 165 |
+
<h1 class="text-4xl text-center text-yellow-400 font-bold mb-8">DRAGON BALL MUGEN</h1>
|
| 166 |
+
|
| 167 |
+
<div class="flex justify-between mb-4">
|
| 168 |
+
<div class="w-1/3">
|
| 169 |
+
<div class="text-xl text-red-500 mb-1">GOKU</div>
|
| 170 |
+
<div class="health-bar mb-1">
|
| 171 |
+
<div id="goku-health" class="health-fill" style="width: 100%"></div>
|
| 172 |
+
</div>
|
| 173 |
+
<div class="ki-bar">
|
| 174 |
+
<div id="goku-ki" class="ki-fill" style="width: 0%"></div>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
<div class="w-1/3 text-center text-yellow-400 text-xl">
|
| 179 |
+
<div id="timer">01:30</div>
|
| 180 |
+
<div id="round">Round 1</div>
|
| 181 |
+
</div>
|
| 182 |
+
|
| 183 |
+
<div class="w-1/3 text-right">
|
| 184 |
+
<div class="text-xl text-blue-400 mb-1">VEGETA</div>
|
| 185 |
+
<div class="health-bar mb-1">
|
| 186 |
+
<div id="vegeta-health" class="health-fill" style="width: 100%"></div>
|
| 187 |
+
</div>
|
| 188 |
+
<div class="ki-bar">
|
| 189 |
+
<div id="vegeta-ki" class="ki-fill" style="width: 0%"></div>
|
| 190 |
+
</div>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
|
| 194 |
+
<div id="game-container">
|
| 195 |
+
<div id="goku" class="character"></div>
|
| 196 |
+
<div id="vegeta" class="character"></div>
|
| 197 |
+
|
| 198 |
+
<div id="goku-punch" class="attack-effect"></div>
|
| 199 |
+
<div id="vegeta-punch" class="attack-effect"></div>
|
| 200 |
+
|
| 201 |
+
<div id="goku-kamehameha" class="kamehameha"></div>
|
| 202 |
+
<div id="vegeta-final-flash" class="kamehameha"></div>
|
| 203 |
+
|
| 204 |
+
<div id="power-up" class="power-up"></div>
|
| 205 |
+
|
| 206 |
+
<div id="combo-counter" class="combo-counter">COMBO x5!</div>
|
| 207 |
+
|
| 208 |
+
<div id="start-screen">
|
| 209 |
+
<h2 class="title">DRAGON BALL MUGEN</h2>
|
| 210 |
+
<button id="start-btn" class="btn">COMEÇAR!</button>
|
| 211 |
+
<div class="mt-4 text-yellow-400">
|
| 212 |
+
<p>Controles Goku: WASD para mover, J para soco, K para chute, L para Kamehameha</p>
|
| 213 |
+
<p>Controles Vegeta: Setas para mover, N para soco, M para chute, , para Final Flash</p>
|
| 214 |
+
</div>
|
| 215 |
+
</div>
|
| 216 |
+
|
| 217 |
+
<div id="game-over" style="display: none;">
|
| 218 |
+
<h2 id="winner-text" class="title">GOKU VENCEU!</h2>
|
| 219 |
+
<button id="restart-btn" class="btn">JOGAR NOVAMENTE</button>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<div class="mt-8 text-center text-gray-400">
|
| 224 |
+
<p>Jogo criado com HTML, CSS e JavaScript | Estilo MUGEN</p>
|
| 225 |
+
</div>
|
| 226 |
+
</div>
|
| 227 |
+
|
| 228 |
+
<script>
|
| 229 |
+
// Game state
|
| 230 |
+
const gameState = {
|
| 231 |
+
started: false,
|
| 232 |
+
timeLeft: 90, // 1:30 minutes
|
| 233 |
+
round: 1,
|
| 234 |
+
goku: {
|
| 235 |
+
health: 100,
|
| 236 |
+
ki: 0,
|
| 237 |
+
position: 100,
|
| 238 |
+
direction: 1,
|
| 239 |
+
attacking: false,
|
| 240 |
+
combo: 0,
|
| 241 |
+
lastAttackTime: 0
|
| 242 |
+
},
|
| 243 |
+
vegeta: {
|
| 244 |
+
health: 100,
|
| 245 |
+
ki: 0,
|
| 246 |
+
position: 700,
|
| 247 |
+
direction: -1,
|
| 248 |
+
attacking: false,
|
| 249 |
+
combo: 0,
|
| 250 |
+
lastAttackTime: 0
|
| 251 |
+
},
|
| 252 |
+
powerUp: {
|
| 253 |
+
active: false,
|
| 254 |
+
x: 0,
|
| 255 |
+
y: 0
|
| 256 |
+
}
|
| 257 |
+
};
|
| 258 |
+
|
| 259 |
+
// DOM elements
|
| 260 |
+
const gameContainer = document.getElementById('game-container');
|
| 261 |
+
const gokuElement = document.getElementById('goku');
|
| 262 |
+
const vegetaElement = document.getElementById('vegeta');
|
| 263 |
+
const gokuPunch = document.getElementById('goku-punch');
|
| 264 |
+
const vegetaPunch = document.getElementById('vegeta-punch');
|
| 265 |
+
const gokuKamehameha = document.getElementById('goku-kamehameha');
|
| 266 |
+
const vegetaFinalFlash = document.getElementById('vegeta-final-flash');
|
| 267 |
+
const powerUp = document.getElementById('power-up');
|
| 268 |
+
const comboCounter = document.getElementById('combo-counter');
|
| 269 |
+
|
| 270 |
+
const gokuHealth = document.getElementById('goku-health');
|
| 271 |
+
const vegetaHealth = document.getElementById('vegeta-health');
|
| 272 |
+
const gokuKi = document.getElementById('goku-ki');
|
| 273 |
+
const vegetaKi = document.getElementById('vegeta-ki');
|
| 274 |
+
|
| 275 |
+
const timerElement = document.getElementById('timer');
|
| 276 |
+
const roundElement = document.getElementById('round');
|
| 277 |
+
|
| 278 |
+
const startScreen = document.getElementById('start-screen');
|
| 279 |
+
const gameOverScreen = document.getElementById('game-over');
|
| 280 |
+
const winnerText = document.getElementById('winner-text');
|
| 281 |
+
|
| 282 |
+
const startBtn = document.getElementById('start-btn');
|
| 283 |
+
const restartBtn = document.getElementById('restart-btn');
|
| 284 |
+
|
| 285 |
+
// Event listeners
|
| 286 |
+
startBtn.addEventListener('click', startGame);
|
| 287 |
+
restartBtn.addEventListener('click', restartGame);
|
| 288 |
+
|
| 289 |
+
// Keyboard state
|
| 290 |
+
const keys = {
|
| 291 |
+
w: false,
|
| 292 |
+
a: false,
|
| 293 |
+
s: false,
|
| 294 |
+
d: false,
|
| 295 |
+
j: false,
|
| 296 |
+
k: false,
|
| 297 |
+
l: false,
|
| 298 |
+
|
| 299 |
+
ArrowUp: false,
|
| 300 |
+
ArrowLeft: false,
|
| 301 |
+
ArrowDown: false,
|
| 302 |
+
ArrowRight: false,
|
| 303 |
+
n: false,
|
| 304 |
+
m: false,
|
| 305 |
+
',': false
|
| 306 |
+
};
|
| 307 |
+
|
| 308 |
+
// Keyboard event listeners
|
| 309 |
+
document.addEventListener('keydown', (e) => {
|
| 310 |
+
if (keys.hasOwnProperty(e.key)) {
|
| 311 |
+
keys[e.key] = true;
|
| 312 |
+
}
|
| 313 |
+
});
|
| 314 |
+
|
| 315 |
+
document.addEventListener('keyup', (e) => {
|
| 316 |
+
if (keys.hasOwnProperty(e.key)) {
|
| 317 |
+
keys[e.key] = false;
|
| 318 |
+
}
|
| 319 |
+
});
|
| 320 |
+
|
| 321 |
+
// Start game function
|
| 322 |
+
function startGame() {
|
| 323 |
+
gameState.started = true;
|
| 324 |
+
startScreen.style.display = 'none';
|
| 325 |
+
|
| 326 |
+
// Start game loop
|
| 327 |
+
gameLoop();
|
| 328 |
+
|
| 329 |
+
// Start timer
|
| 330 |
+
const timer = setInterval(() => {
|
| 331 |
+
gameState.timeLeft--;
|
| 332 |
+
|
| 333 |
+
const minutes = Math.floor(gameState.timeLeft / 60);
|
| 334 |
+
const seconds = gameState.timeLeft % 60;
|
| 335 |
+
|
| 336 |
+
timerElement.textContent = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
| 337 |
+
|
| 338 |
+
if (gameState.timeLeft <= 0) {
|
| 339 |
+
clearInterval(timer);
|
| 340 |
+
endGame();
|
| 341 |
+
}
|
| 342 |
+
}, 1000);
|
| 343 |
+
|
| 344 |
+
// Spawn power ups randomly
|
| 345 |
+
setInterval(() => {
|
| 346 |
+
if (!gameState.powerUp.active && Math.random() > 0.7) {
|
| 347 |
+
spawnPowerUp();
|
| 348 |
+
}
|
| 349 |
+
}, 10000);
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
// Restart game function
|
| 353 |
+
function restartGame() {
|
| 354 |
+
// Reset game state
|
| 355 |
+
gameState.started = true;
|
| 356 |
+
gameState.timeLeft = 90;
|
| 357 |
+
gameState.round = 1;
|
| 358 |
+
|
| 359 |
+
gameState.goku = {
|
| 360 |
+
health: 100,
|
| 361 |
+
ki: 0,
|
| 362 |
+
position: 100,
|
| 363 |
+
direction: 1,
|
| 364 |
+
attacking: false,
|
| 365 |
+
combo: 0,
|
| 366 |
+
lastAttackTime: 0
|
| 367 |
+
};
|
| 368 |
+
|
| 369 |
+
gameState.vegeta = {
|
| 370 |
+
health: 100,
|
| 371 |
+
ki: 0,
|
| 372 |
+
position: 700,
|
| 373 |
+
direction: -1,
|
| 374 |
+
attacking: false,
|
| 375 |
+
combo: 0,
|
| 376 |
+
lastAttackTime: 0
|
| 377 |
+
};
|
| 378 |
+
|
| 379 |
+
gameState.powerUp.active = false;
|
| 380 |
+
|
| 381 |
+
// Update UI
|
| 382 |
+
gokuHealth.style.width = '100%';
|
| 383 |
+
vegetaHealth.style.width = '100%';
|
| 384 |
+
gokuKi.style.width = '0%';
|
| 385 |
+
vegetaKi.style.width = '0%';
|
| 386 |
+
|
| 387 |
+
timerElement.textContent = '01:30';
|
| 388 |
+
roundElement.textContent = 'Round 1';
|
| 389 |
+
|
| 390 |
+
gameOverScreen.style.display = 'none';
|
| 391 |
+
|
| 392 |
+
// Reset positions
|
| 393 |
+
gokuElement.style.left = '100px';
|
| 394 |
+
vegetaElement.style.left = '700px';
|
| 395 |
+
|
| 396 |
+
// Start game again
|
| 397 |
+
startGame();
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
// End game function
|
| 401 |
+
function endGame() {
|
| 402 |
+
gameState.started = false;
|
| 403 |
+
|
| 404 |
+
// Determine winner
|
| 405 |
+
if (gameState.goku.health > gameState.vegeta.health) {
|
| 406 |
+
winnerText.textContent = 'GOKU VENCEU!';
|
| 407 |
+
} else if (gameState.vegeta.health > gameState.goku.health) {
|
| 408 |
+
winnerText.textContent = 'VEGETA VENCEU!';
|
| 409 |
+
} else {
|
| 410 |
+
winnerText.textContent = 'EMPATE!';
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
gameOverScreen.style.display = 'flex';
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
// Spawn power up function
|
| 417 |
+
function spawnPowerUp() {
|
| 418 |
+
gameState.powerUp.active = true;
|
| 419 |
+
gameState.powerUp.x = Math.random() * 600 + 100;
|
| 420 |
+
gameState.powerUp.y = Math.random() * 200 + 100;
|
| 421 |
+
|
| 422 |
+
powerUp.style.left = `${gameState.powerUp.x}px`;
|
| 423 |
+
powerUp.style.top = `${gameState.powerUp.y}px`;
|
| 424 |
+
powerUp.style.opacity = '1';
|
| 425 |
+
|
| 426 |
+
// Power up disappears after 5 seconds
|
| 427 |
+
setTimeout(() => {
|
| 428 |
+
if (gameState.powerUp.active) {
|
| 429 |
+
powerUp.style.opacity = '0';
|
| 430 |
+
gameState.powerUp.active = false;
|
| 431 |
+
}
|
| 432 |
+
}, 5000);
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
// Check collision function
|
| 436 |
+
function checkCollision(x1, y1, w1, h1, x2, y2, w2, h2) {
|
| 437 |
+
return x1 < x2 + w2 && x1 + w1 > x2 && y1 < y2 + h2 && y1 + h1 > y2;
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
// Game loop
|
| 441 |
+
function gameLoop() {
|
| 442 |
+
if (!gameState.started) return;
|
| 443 |
+
|
| 444 |
+
// Update characters
|
| 445 |
+
updateCharacter('goku');
|
| 446 |
+
updateCharacter('vegeta');
|
| 447 |
+
|
| 448 |
+
// Check for power up collection
|
| 449 |
+
if (gameState.powerUp.active) {
|
| 450 |
+
const gokuRect = gokuElement.getBoundingClientRect();
|
| 451 |
+
const vegetaRect = vegetaElement.getBoundingClientRect();
|
| 452 |
+
const powerUpRect = powerUp.getBoundingClientRect();
|
| 453 |
+
|
| 454 |
+
if (checkCollision(
|
| 455 |
+
gokuRect.left, gokuRect.top, gokuRect.width, gokuRect.height,
|
| 456 |
+
powerUpRect.left, powerUpRect.top, powerUpRect.width, powerUpRect.height
|
| 457 |
+
)) {
|
| 458 |
+
gameState.goku.ki = Math.min(100, gameState.goku.ki + 30);
|
| 459 |
+
gokuKi.style.width = `${gameState.goku.ki}%`;
|
| 460 |
+
powerUp.style.opacity = '0';
|
| 461 |
+
gameState.powerUp.active = false;
|
| 462 |
+
showCombo('goku', 'POWER UP!');
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
if (checkCollision(
|
| 466 |
+
vegetaRect.left, vegetaRect.top, vegetaRect.width, vegetaRect.height,
|
| 467 |
+
powerUpRect.left, powerUpRect.top, powerUpRect.width, powerUpRect.height
|
| 468 |
+
)) {
|
| 469 |
+
gameState.vegeta.ki = Math.min(100, gameState.vegeta.ki + 30);
|
| 470 |
+
vegetaKi.style.width = `${gameState.vegeta.ki}%`;
|
| 471 |
+
powerUp.style.opacity = '0';
|
| 472 |
+
gameState.powerUp.active = false;
|
| 473 |
+
showCombo('vegeta', 'POWER UP!');
|
| 474 |
+
}
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
// Check for attacks
|
| 478 |
+
checkAttacks();
|
| 479 |
+
|
| 480 |
+
// Continue game loop
|
| 481 |
+
requestAnimationFrame(gameLoop);
|
| 482 |
+
}
|
| 483 |
+
|
| 484 |
+
// Update character function
|
| 485 |
+
function updateCharacter(character) {
|
| 486 |
+
const charState = gameState[character];
|
| 487 |
+
const charElement = character === 'goku' ? gokuElement : vegetaElement;
|
| 488 |
+
|
| 489 |
+
// Movement
|
| 490 |
+
if (character === 'goku') {
|
| 491 |
+
if (keys.a && charState.position > 0) {
|
| 492 |
+
charState.position -= 5;
|
| 493 |
+
charState.direction = -1;
|
| 494 |
+
charElement.style.transform = 'scaleX(-1)';
|
| 495 |
+
}
|
| 496 |
+
if (keys.d && charState.position < 720) {
|
| 497 |
+
charState.position += 5;
|
| 498 |
+
charState.direction = 1;
|
| 499 |
+
charElement.style.transform = 'scaleX(1)';
|
| 500 |
+
}
|
| 501 |
+
} else {
|
| 502 |
+
if (keys.ArrowLeft && charState.position > 0) {
|
| 503 |
+
charState.position -= 5;
|
| 504 |
+
charState.direction = -1;
|
| 505 |
+
charElement.style.transform = 'scaleX(-1)';
|
| 506 |
+
}
|
| 507 |
+
if (keys.ArrowRight && charState.position < 720) {
|
| 508 |
+
charState.position += 5;
|
| 509 |
+
charState.direction = 1;
|
| 510 |
+
charElement.style.transform = 'scaleX(1)';
|
| 511 |
+
}
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
// Update position
|
| 515 |
+
charElement.style.left = `${charState.position}px`;
|
| 516 |
+
|
| 517 |
+
// Regenerate ki
|
| 518 |
+
if (!charState.attacking) {
|
| 519 |
+
charState.ki = Math.min(100, charState.ki + 0.1);
|
| 520 |
+
if (character === 'goku') {
|
| 521 |
+
gokuKi.style.width = `${charState.ki}%`;
|
| 522 |
+
} else {
|
| 523 |
+
vegetaKi.style.width = `${charState.ki}%`;
|
| 524 |
+
}
|
| 525 |
+
}
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
// Check attacks function
|
| 529 |
+
function checkAttacks() {
|
| 530 |
+
const now = Date.now();
|
| 531 |
+
|
| 532 |
+
// Goku attacks
|
| 533 |
+
if (keys.j && now - gameState.goku.lastAttackTime > 500) {
|
| 534 |
+
performAttack('goku', 'punch', 10);
|
| 535 |
+
gameState.goku.lastAttackTime = now;
|
| 536 |
+
}
|
| 537 |
+
|
| 538 |
+
if (keys.k && now - gameState.goku.lastAttackTime > 500) {
|
| 539 |
+
performAttack('goku', 'kick', 15);
|
| 540 |
+
gameState.goku.lastAttackTime = now;
|
| 541 |
+
}
|
| 542 |
+
|
| 543 |
+
if (keys.l && gameState.goku.ki >= 50 && now - gameState.goku.lastAttackTime > 1000) {
|
| 544 |
+
performAttack('goku', 'kamehameha', 30);
|
| 545 |
+
gameState.goku.ki -= 50;
|
| 546 |
+
gokuKi.style.width = `${gameState.goku.ki}%`;
|
| 547 |
+
gameState.goku.lastAttackTime = now;
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
// Vegeta attacks
|
| 551 |
+
if (keys.n && now - gameState.vegeta.lastAttackTime > 500) {
|
| 552 |
+
performAttack('vegeta', 'punch', 10);
|
| 553 |
+
gameState.vegeta.lastAttackTime = now;
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
if (keys.m && now - gameState.vegeta.lastAttackTime > 500) {
|
| 557 |
+
performAttack('vegeta', 'kick', 15);
|
| 558 |
+
gameState.vegeta.lastAttackTime = now;
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
if (keys[','] && gameState.vegeta.ki >= 50 && now - gameState.vegeta.lastAttackTime > 1000) {
|
| 562 |
+
performAttack('vegeta', 'finalflash', 30);
|
| 563 |
+
gameState.vegeta.ki -= 50;
|
| 564 |
+
vegetaKi.style.width = `${gameState.vegeta.ki}%`;
|
| 565 |
+
gameState.vegeta.lastAttackTime = now;
|
| 566 |
+
}
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
// Perform attack function
|
| 570 |
+
function performAttack(character, attackType, damage) {
|
| 571 |
+
const charState = gameState[character];
|
| 572 |
+
const opponent = character === 'goku' ? 'vegeta' : 'goku';
|
| 573 |
+
const opponentElement = opponent === 'goku' ? gokuElement : vegetaElement;
|
| 574 |
+
|
| 575 |
+
charState.attacking = true;
|
| 576 |
+
|
| 577 |
+
// Show attack effect
|
| 578 |
+
if (attackType === 'punch' || attackType === 'kick') {
|
| 579 |
+
const attackElement = character === 'goku' ? gokuPunch : vegetaPunch;
|
| 580 |
+
|
| 581 |
+
attackElement.style.left = `${charState.position + (charState.direction === 1 ? 60 : -40)}px`;
|
| 582 |
+
attackElement.style.top = '180px';
|
| 583 |
+
attackElement.style.opacity = '1';
|
| 584 |
+
attackElement.style.transform = `scaleX(${charState.direction})`;
|
| 585 |
+
|
| 586 |
+
setTimeout(() => {
|
| 587 |
+
attackElement.style.opacity = '0';
|
| 588 |
+
charState.attacking = false;
|
| 589 |
+
}, 200);
|
| 590 |
+
} else if (attackType === 'kamehameha') {
|
| 591 |
+
const attackElement = character === 'goku' ? gokuKamehameha : vegetaFinalFlash;
|
| 592 |
+
|
| 593 |
+
attackElement.style.left = `${charState.position + (charState.direction === 1 ? 80 : -300)}px`;
|
| 594 |
+
attackElement.style.top = '150px';
|
| 595 |
+
attackElement.style.opacity = '1';
|
| 596 |
+
attackElement.style.transform = `scaleX(${charState.direction})`;
|
| 597 |
+
|
| 598 |
+
setTimeout(() => {
|
| 599 |
+
attackElement.style.opacity = '0';
|
| 600 |
+
charState.attacking = false;
|
| 601 |
+
}, 1000);
|
| 602 |
+
}
|
| 603 |
+
|
| 604 |
+
// Check if attack hits
|
| 605 |
+
setTimeout(() => {
|
| 606 |
+
const charRect = character === 'goku' ? gokuElement.getBoundingClientRect() : vegetaElement.getBoundingClientRect();
|
| 607 |
+
const opponentRect = opponentElement.getBoundingClientRect();
|
| 608 |
+
|
| 609 |
+
let attackWidth = 60;
|
| 610 |
+
let attackHeight = 40;
|
| 611 |
+
|
| 612 |
+
if (attackType === 'kamehameha' || attackType === 'finalflash') {
|
| 613 |
+
attackWidth = 300;
|
| 614 |
+
attackHeight = 60;
|
| 615 |
+
}
|
| 616 |
+
|
| 617 |
+
const attackX = charState.position + (charState.direction === 1 ? 80 : -attackWidth);
|
| 618 |
+
|
| 619 |
+
if (checkCollision(
|
| 620 |
+
attackX, 150, attackWidth, attackHeight,
|
| 621 |
+
gameState[opponent].position, 180, 80, 120
|
| 622 |
+
)) {
|
| 623 |
+
// Hit opponent
|
| 624 |
+
gameState[opponent].health = Math.max(0, gameState[opponent].health - damage);
|
| 625 |
+
|
| 626 |
+
if (character === 'goku') {
|
| 627 |
+
vegetaHealth.style.width = `${gameState.vegeta.health}%`;
|
| 628 |
+
} else {
|
| 629 |
+
gokuHealth.style.width = `${gameState.goku.health}%`;
|
| 630 |
+
}
|
| 631 |
+
|
| 632 |
+
// Combo counter
|
| 633 |
+
charState.combo++;
|
| 634 |
+
if (charState.combo > 1) {
|
| 635 |
+
showCombo(character, `COMBO x${charState.combo}!`);
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
// Knockback effect
|
| 639 |
+
opponentElement.style.transform = `translateX(${character === 'goku' ? '20px' : '-20px'}) scaleX(${gameState[opponent].direction})`;
|
| 640 |
+
setTimeout(() => {
|
| 641 |
+
opponentElement.style.transform = `scaleX(${gameState[opponent].direction})`;
|
| 642 |
+
}, 100);
|
| 643 |
+
|
| 644 |
+
// Check if opponent is defeated
|
| 645 |
+
if (gameState[opponent].health <= 0) {
|
| 646 |
+
endGame();
|
| 647 |
+
}
|
| 648 |
+
} else {
|
| 649 |
+
// Missed attack
|
| 650 |
+
charState.combo = 0;
|
| 651 |
+
}
|
| 652 |
+
}, attackType === 'punch' || attackType === 'kick' ? 100 : 300);
|
| 653 |
+
}
|
| 654 |
+
|
| 655 |
+
// Show combo function
|
| 656 |
+
function showCombo(character, text) {
|
| 657 |
+
comboCounter.textContent = text;
|
| 658 |
+
|
| 659 |
+
if (character === 'goku') {
|
| 660 |
+
comboCounter.style.left = `${gameState.goku.position - 50}px`;
|
| 661 |
+
comboCounter.style.top = '100px';
|
| 662 |
+
comboCounter.style.color = '#f5d742';
|
| 663 |
+
} else {
|
| 664 |
+
comboCounter.style.left = `${gameState.vegeta.position - 50}px`;
|
| 665 |
+
comboCounter.style.top = '100px';
|
| 666 |
+
comboCounter.style.color = '#00aaff';
|
| 667 |
+
}
|
| 668 |
+
|
| 669 |
+
comboCounter.style.opacity = '1';
|
| 670 |
+
|
| 671 |
+
setTimeout(() => {
|
| 672 |
+
comboCounter.style.opacity = '0';
|
| 673 |
+
}, 1000);
|
| 674 |
+
}
|
| 675 |
+
</script>
|
| 676 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Davi111/gg" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 677 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Crie um jogo mugen de dragonball
|