<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invoker Game - Trening Kombosów</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
color: #fff;
margin: 0;
padding: 20px;
min-height: 100vh;
}
.container {
max-width: 1000px;
margin: 0 auto;
text-align: center;
}
h1 {
text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
margin-bottom: 20px;
font-size: 2.5em;
}
.subtitle {
margin-bottom: 30px;
font-style: italic;
opacity: 0.8;
}
.game-container {
display: flex;
flex-direction: column;
gap: 20px;
}
.elements {
display: flex;
justify-content: center;
gap: 15px;
margin-bottom: 20px;
}
.element {
width: 80px;
height: 80px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 40px;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
.element:hover {
transform: scale(1.1);
box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
}
.quas {
background: linear-gradient(45deg, #4a90e2, #5ca9ff);
border: 3px solid #87cefa;
}
.wex {
background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
border: 3px solid #ff69b4;
}
.exort {
background: linear-gradient(45deg, #f9d423, #f8a51a);
border: 3px solid #ffd700;
}
.invoke {
background: linear-gradient(45deg, #9c27b0, #e14eca);
border: 3px solid #da70d6;
font-size: 30px;
}
.sequence {
background: rgba(0, 0, 0, 0.5);
padding: 15px;
border-radius: 10px;
min-height: 60px;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
margin-bottom: 20px;
border: 2px solid #87cefa;
}
.sequence-item {
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: bold;
}
.combo-buttons {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
margin-bottom: 20px;
}
.combo-btn {
background: rgba(255, 255, 255, 0.2);
border: 2px solid #87cefa;
color: white;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s;
min-width: 120px;
}
.combo-btn:hover {
background: rgba(255, 255, 255, 0.4);
transform: translateY(-2px);
}
.status {
background: rgba(0, 0, 0, 0.5);
padding: 15px;
border-radius: 10px;
margin-bottom: 20px;
border: 2px solid #87cefa;
}
.stats {
display: flex;
justify-content: space-around;
margin-top: 20px;
flex-wrap: wrap;
}
.stat-box {
background: rgba(0, 0, 0, 0.5);
padding: 15px;
border-radius: 10px;
min-width: 120px;
margin: 10px;
border: 2px solid #87cefa;
}
.stat-value {
font-size: 1.5em;
font-weight: bold;
color: #87cefa;
}
.target {
width: 120px;
height: 120px;
margin: 20px auto;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
border: 3px dashed #87cefa;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
transition: all 0.5s ease;
}
.success {
background: rgba(0, 255, 0, 0.3) !important;
border-color: #00ff00 !important;
transform: scale(1.1);
}
.fail {
background: rgba(255, 0, 0, 0.3) !important;
border-color: #ff0000 !important;
transform: scale(0.9);
}
.instructions {
background: rgba(0, 0, 0, 0.5);
padding: 15px;
border-radius: 10px;
margin-top: 20px;
border: 2px solid #87cefa;
text-align: left;
}
.instructions h3 {
margin-top: 0;
color: #87cefa;
}
.instructions ul {
padding-left: 20px;
}
.instructions li {
margin: 8px 0;
}
@media (max-width: 768px) {
.elements {
gap: 10px;
}
.element {
width: 60px;
height: 60px;
font-size: 30px;
}
.sequence-item {
width: 40px;
height: 40px;
font-size: 18px;
}
h1 {
font-size: 2em;
}
}
</style>
</head>
<body>
<div class="container">
<h1>Invoker Game</h1>
<p class="subtitle">Ćwicz kombosy jak prawdziwy profesjonalista!</p>
<div class="game-container">
<div class="elements">
<div class="element quas" onclick="addElement('quas')">Q</div>
<div class="element wex" onclick="addElement('wex')">W</div>
<div class="element exort" onclick="addElement('exort')">E</div>
<div class="element invoke" onclick="invoke()">INVOKE</div>
</div>
<div class="sequence" id="sequence">
<!-- Sekwencja będzie dodawana tutaj -->
</div>
<div class="status" id="status">
Wybierz elementy i użyj Invoke, aby stworzyć umiejętność!
</div>
<div class="target" id="target">
TARGET
</div>
<div class="combo-buttons">
<button class="combo-btn" onclick="loadCombo('tornado')">Tornado</button>
<button class="combo-btn" onclick="loadCombo('emp')">EMP</button>
<button class="combo-btn" onclick="loadCombo('meteor')">Meteor</button>
<button class="combo-btn" onclick="loadCombo('sunstrike')">Sun Strike</button>
<button class="combo-btn" onclick="loadCombo('blast')">Deafening Blast</button>
<button class="combo-btn" onclick="clearSequence()">Wyczyść</button>
</div>
<div class="stats">
<div class="stat-box">
<div>Poprawne</div>
<div class="stat-value" id="correct">0</div>
</div>
<div class="stat-box">
<div>Błędne</div>
<div class="stat-value" id="incorrect">0</div>
</div>
<div class="stat-box">
<div>Czas</div>
<div class="stat-value" id="time">0.00</div>
</div>
</div>
<div class="instructions">
<h3>Instrukcja:</h3>
<ul>
<li>Klikaj Q, W, E aby wybrać elementy</li>
<li>Kliknij INVOKE aby stworzyć umiejętność</li>
<li>Użyj przycisków z kombosami do ćwiczenia</li>
<li>Wyczyść sekwencję aby zacząć od nowa</li>
</ul>
</div>
</div>
</div>
<script>
// Dane o kombosach Invokera
const combos = {
tornado: ['quas', 'wex', 'wex', 'invoke'],
emp: ['wex', 'wex', 'wex', 'invoke'],
meteor: ['exort', 'wex', 'wex', 'invoke'],
sunstrike: ['quas', 'quas', 'quas', 'invoke'],
blast: ['quas', 'wex', 'exort', 'invoke']
};
// Dane o elementach
const elementNames = {
quas: 'Q',
wex: 'W',
exort: 'E',
invoke: 'INVOKE'
};
// Kolory elementów
const elementColors = {
quas: 'linear-gradient(45deg, #4a90e2, #5ca9ff)',
wex: 'linear-gradient(45deg, #ff6b6b, #ff8e8e)',
exort: 'linear-gradient(45deg, #f9d423, #f8a51a)',
invoke: 'linear-gradient(45deg, #9c27b0, #e14eca)'
};
// Stan gry
let currentSequence = [];
let correctCount = 0;
let incorrectCount = 0;
let startTime = null;
let timerInterval = null;
// Inicjalizacja
function init() {
updateStats();
document.getElementById('status').textContent = 'Wybierz elementy i użyj Invoke, aby stworzyć umiejętność!';
}
// Dodaj element do sekwencji
function addElement(element) {
if (currentSequence.length >= 3 && currentSequence[currentSequence.length - 1] !== 'invoke') {
return; // Nie można dodać więcej niż 3 elementów przed invoke
}
if (element === 'invoke' && currentSequence.length < 3) {
document.getElementById('status').textContent = 'Potrzebujesz 3 elementów przed Invoke!';
flashStatus('fail');
return;
}
currentSequence.push(element);
renderSequence();
if (element !== 'invoke') {
document.getElementById('status').textContent = `Wybrano: ${elementNames[element]}`;
}
// Rozpocznij czas przy pierwszym elemencie
if (currentSequence.length === 1 && startTime === null) {
startTime = new Date().getTime();
startTimer();
}
}
// Invoke - sprawdź kombos
function invoke() {
if (currentSequence.length < 4 || currentSequence[currentSequence.length - 1] !== 'invoke') {
document.getElementById('status').textContent = 'Nieprawidłowa sekwencja!';
flashStatus('fail');
return;
}
// Sprawdź kombos
const elements = currentSequence.slice(0, 3);
const comboFound = checkCombo(elements);
if (comboFound) {
document.getElementById('status').textContent = `Pomyślnie utworzono: ${comboFound.toUpperCase()}!`;
flashStatus('success');
document.getElementById('target').className = 'target success';
setTimeout(() => {
document.getElementById('target').className = 'target';
}, 1000);
correctCount++;
endTimer();
} else {
document.getElementById('status').textContent = 'Nieznana kombinacja!';
flashStatus('fail');
incorrectCount++;
}
updateStats();
clearSequence();
}
// Sprawdź czy kombinacja pasuje do znanego kombo
function checkCombo(elements) {
for (const [comboName, comboSequence] of Object.entries(combos)) {
// Sprawdź czy pierwsze 3 elementy pasują
if (elements[0] === comboSequence[0] &&
elements[1] === comboSequence[1] &&
elements[2] === comboSequence[2]) {
return comboName;
}
}
return null;
}
// Renderuj sekwencję
function renderSequence() {
const sequenceElement = document.getElementById('sequence');
sequenceElement.innerHTML = '';
currentSequence.forEach(element => {
const item = document.createElement('div');
item.className = `sequence-item ${element}`;
item.style.background = elementColors[element];
item.textContent = elementNames[element];
sequenceElement.appendChild(item);
});
}
// Wyczyść sekwencję
function clearSequence() {
currentSequence = [];
renderSequence();
document.getElementById('status').textContent = 'Sekwencja wyczyszczona!';
flashStatus('success');
// Zatrzymaj timer jeśli był uruchomiony
if (timerInterval) {
clearInterval(timerInterval);
timerInterval = null;
}
startTime = null;
document.getElementById('time').textContent = '0.00';
}
// Załaduj gotowy combo do ćwiczenia
function loadCombo(comboName) {
clearSequence();
const combo = combos[comboName];
if (combo) {
document.getElementById('status').textContent = `Ćwiczysz: ${comboName.toUpperCase()}`;
flashStatus('success');
// Dodaj elementy z opóźnieniem dla efektu
combo.forEach((element, index) => {
setTimeout(() => {
currentSequence.push(element);
renderSequence();
}, index * 500);
});
}
}
// Aktualizuj statystyki
function updateStats() {
document.getElementById('correct').textContent = correctCount;
document.getElementById('incorrect').textContent = incorrectCount;
}
// Uruchom timer
function startTimer() {
if (timerInterval) clearInterval(timerInterval);
timerInterval = setInterval(() => {
if (startTime) {
const elapsed = (new Date().getTime() - startTime) / 1000;
document.getElementById('time').textContent = elapsed.toFixed(2);
}
}, 100);
}
// Zakończ timer
function endTimer() {
if (timerInterval) {
clearInterval(timerInterval);
timerInterval = null;
}
}
// Podświetl status
function flashStatus(type) {
const status = document.getElementById('status');
status.className = type;
setTimeout(() => {
status.className = 'status';
}, 1000);
}
// Inicjalizacja gry
window.onload = init;
</script>
</body>
</html>
Jak używać tej gry:
-
Zapisz kod - Skopiuj cały kod HTML i zapisz jako plik invoker_game.html
-
Otwórz w przeglądarce - Kliknij dwukrotnie na plik lub otwórz go w przeglądarce
-
Zasady gry:
- Klikaj przyciski Q, W, E aby wybrać elementy
- Kliknij INVOKE aby stworzyć umiejętność
- Spróbuj utworzyć prawidłowe kombosy (Tornado, EMP, Meteor, itp.)
- Użyj przycisków z kombosami do ćwiczenia
-
Funkcje:
- Statystyki poprawnych i błędnych prób
- Pomiar czasu wykonania kombosów
- Wizualne efekty sukcesu/porażki
- Gotowe kombosy do ćwiczenia
Ta gra pozwala na ćwiczenie kombosów Invokera bezpośrednio w przeglądarce, bez potrzeby uruchamiania Dota 2!