-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
268 lines (229 loc) · 13 KB
/
Copy pathindex.html
File metadata and controls
268 lines (229 loc) · 13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- iOS PWA Meta & Icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="CATS BATTLE">
<link rel="apple-touch-icon" href="/metadata/ios/192.png">
<link rel="apple-touch-icon" sizes="152x152" href="/metadata/ios/152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/metadata/ios/180.png">
<link rel="apple-touch-icon" sizes="167x167" href="/metadata/ios/167.png">
<title>Cats Battle BETA</title>
</head>
<body>
<!-- Overlay de rotation pour mobile paysage -->
<div id="rotate-overlay">
<div>📱 Veuillez tourner votre appareil en mode portrait.</div>
</div>
<!-- Conteneur principal du jeu -->
<div id="game-container">
<!-- Audio Player -->
<audio id="bgm" loop>
<source src="/audio/ost1.mp3" type="audio/mpeg">
</audio>
<!-- Loading Screen -->
<div id="loading-screen">
<div id="loading-text">Chargement en cours...</div>
<button id="btn-start">Click to Start</button>
</div>
<!-- Detourage Overlay (Hidden initially) -->
<div id="detourage-overlay" style="display: none;">
<div class="spinner"></div>
<div id="detourage-text">Détourage en cours...<br><span
style="font-size:8px;color:#aaa;margin-top:10px;display:block;">(peut être long au 1er usage)</span></div>
</div>
<!-- UI Layer (Hidden initially) -->
<div id="ui-layer" style="display: none;">
<!-- Player Profile -->
<div id="player-profile" title="Changer de nom">
<div class="pp-icon">🐱</div>
<div id="player-name">Dresseur</div>
</div>
<!-- Point Counter -->
<div id="point-counter"
style="position: absolute; top: 15px; right: 15px; background: #fff; color: #333; padding: 8px 12px; border: 4px solid #000; border-radius: 8px; font-family: 'Press Start 2P', monospace; font-size: 14px; box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 8px; z-index: 100; cursor: pointer;"
title="Ouvrir la boutique">
<img src="/sprites/UI/cash.png" alt="Points" style="height: 20px; image-rendering: pixelated;" />
<span id="point-amount">0</span>
</div>
<!-- Shop Dialog -->
<dialog id="shop-dialog" class="retro-box"
style="padding: 20px; width: 85%; max-width: 450px; text-align: center; z-index: 200;">
<h2 style="margin-top: 0; color: #ffcc00; text-shadow: 1px 1px 0 #000;">Boutique</h2>
<p style="font-size: 10px; color: #555;">Dépensez vos points pour des objets utilisables en combat.</p>
<div id="shop-items" style="display: flex; flex-direction: column; gap: 15px; margin: 20px 0;">
<div class="shop-item" data-id="heal" data-price="50"
style="display: flex; justify-content: space-between; align-items: center; padding: 10px; background: rgba(0,0,0,0.1); border-radius: 8px; border: 2px solid #333;">
<div style="display: flex; align-items: center; gap: 10px;">
<img src="/items/Heal.png" alt="Soin"
style="width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.3));" />
<div style="text-align: left;">
<div style="font-weight: bold; font-size: 12px;">Soin</div>
<div style="font-size: 10px; color: #444; margin-top: 4px;">50 points</div>
</div>
</div>
<button class="retro-button btn-buy" style="padding: 8px 12px; font-size: 10px;">Acheter</button>
</div>
<div class="shop-item" data-id="revive" data-price="200"
style="display: flex; justify-content: space-between; align-items: center; padding: 10px; background: rgba(0,0,0,0.1); border-radius: 8px; border: 2px solid #333;">
<div style="display: flex; align-items: center; gap: 10px;">
<img src="/items/revive_potion.png" alt="Potion"
style="width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.3));" />
<div style="text-align: left;">
<div style="font-weight: bold; font-size: 12px;">Potion spéciale</div>
<div style="font-size: 10px; color: #444; margin-top: 4px;">200 points</div>
</div>
</div>
<button class="retro-button btn-buy" style="padding: 8px 12px; font-size: 10px;">Acheter</button>
</div>
</div>
<button id="btn-close-shop" class="retro-button" style="padding: 10px 20px;">Fermer</button>
</dialog>
<!-- Lower Background -->
<div id="home-bg-lower"></div>
<!-- Logo Area -->
<div id="logo-container">
<div class="logo-ellipse"></div>
<div class="logo-wrapper">
<img src="/sprites/logo_nobg.png" alt="Cat Battle Logo" id="main-logo" />
<div class="logo-shine"></div>
</div>
</div>
<!-- Center Menu -->
<div id="center-menu">
<button id="btn-play" class="action-btn">CAMPAGNE</button>
<button id="btn-random" class="action-btn">ALEATOIRE</button>
<button id="btn-cat-list" class="action-btn">Liste Chats</button>
<button id="btn-inventory" class="action-btn">Objets</button>
</div>
<!-- Drawer Menu -->
<div id="bottom-drawer">
<button id="btn-stats" class="drawer-btn"><img src="/sprites/UI/History.png" alt="Historique"
class="drawer-icon" /><span class="drawer-label">Historique</span></button>
<button id="btn-settings" class="drawer-btn"><img src="/sprites/UI/Settings.png" alt="Audio"
class="drawer-icon" /><span class="drawer-label">Audio</span></button>
</div>
</div>
<!-- Cat List Scene (Hidden initially) -->
<div id="scene-cat-list" class="scene" style="display: none;">
<button id="btn-back-cat-list" class="btn-back">🠔 Retour</button>
<div class="scene-title">Vos Chats</div>
<div class="scene-content"
style="flex-direction: column; justify-content: flex-start; padding-top: 50px; overflow-y: auto;">
<p id="cat-list-empty-msg">Aucun chat</p>
<div id="cat-list-items" style="display: none; width: 100%; max-width: 400px; padding-bottom: 80px;"></div>
<div id="cat-list-max-reached"
style="display: none; text-align: center; padding: 20px; background: #ff4444; border: 4px solid #000; border-radius: 12px; color: white; font-weight: bold; width: 80%; max-width: 300px; margin-top: 20px;">
Nombre maximum de chats atteint (5/5)</div>
</div>
<button id="btn-adopt" class="action-btn" style="position: absolute; bottom: 20px;">Adopter</button>
</div>
<!-- Adopt Cat Scene (Hidden initially) -->
<div id="scene-adopt" class="scene" style="display: none;">
<div class="scene-title">Adopter un Chat</div>
<div class="scene-content"
style="flex-direction: column; justify-content: flex-start; padding-top: 30px; padding-bottom: 30px; overflow-y: auto; overflow-x: hidden; width: 100%;">
<form id="form-adopt" class="retro-box"
style="padding: 15px; width: 95%; max-width: 500px; box-sizing: border-box; text-align: left; color: #000; font-size: 12px; line-height: 2; margin: 0 auto; overflow-x: hidden;">
<label for="adopt-name">Nom :</label>
<input type="text" id="adopt-name" class="retro-input" required maxlength="12"
style="width: 100%; box-sizing: border-box; margin-bottom: 15px;">
<div class="form-group">
<label for="adopt-type-slider">Type :</label>
<input type="range" id="adopt-type-slider" min="0" max="2" step="1" value="1" style="width: 100%;">
<div id="adopt-type-display"
style="text-align: center; margin-top: 10px; font-weight: bold; transition: color 0.3s; color: #ffcc00; margin-bottom: 8px;">
Base</div>
<div id="adopt-type-description"
style="font-size: 10px; color: #444; min-height: 34px; text-align: center; margin-bottom: 12px; padding: 0 6px;">
Équilibré : bon compromis entre vie, défense, attaque et vitesse.</div>
</div>
<label>Sprite (ou 📷 pour une photo détourée) :</label>
<div id="adopt-sprite-grid"
style="display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 8px;"></div>
<input type="file" id="adopt-photo" accept="image/*" hidden>
<div id="adopt-photo-status" style="font-size: 9px; color: #666; margin-bottom: 12px; display: none;"></div>
<label>Objets :</label>
<div id="adopt-items-list"
style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px;">
<!-- Items draggables générés par JS -->
</div>
<div id="adopt-items-help" style="text-align: center; font-size: 11px; color: #666; margin-bottom: 15px;">
🎒 Cliquez sur un objet ci-dessus pour l'équiper (0/2)
</div>
<div id="adopt-equipped-items"
style="display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; min-height: 50px;">
<!-- Objets équipés affichés ici -->
</div>
<div style="display: flex; justify-content: space-between;">
<button type="button" id="btn-cancel-adopt" class="retro-button"
style="font-size: 10px; padding: 10px;">Annuler</button>
<button type="submit" id="btn-submit-adopt" class="retro-button"
style="font-size: 10px; padding: 10px; background-color: #44ff44;">Ajouter</button>
</div>
</form>
</div>
</div>
<!-- Sound Settings Dialog -->
<dialog id="sound-dialog">
<p>Parametres Audio</p>
<div class="slider-container">
<label for="music-volume">Musique :</label>
<input type="range" id="music-volume" min="0" max="1" step="0.1" value="0.5">
</div>
<div class="slider-container">
<label for="sfx-volume">Effets :</label>
<input type="range" id="sfx-volume" min="0" max="1" step="0.1" value="0.5">
</div>
<button id="btn-close-sound">Fermer</button>
</dialog>
<!-- Dialog Box for "À implémenter" -->
<dialog id="impl-dialog">
<p>⚠️ Cette fonctionnalité reste à implémenter.</p>
<button id="btn-close-dialog">Fermer</button>
</dialog>
<!-- Inventory Dialog -->
<dialog id="inventory-dialog" class="retro-box"
style="padding: 20px; width: 80%; max-width: 400px; text-align: center;">
<h2 style="margin-top: 0;">Objets utilisables</h2>
<div id="inventory-list"
style="min-height: 100px; margin: 20px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,0.1); border-radius: 8px;">
<p style="color: #666; font-style: italic;">Votre inventaire est vide.</p>
</div>
<button id="btn-close-inventory" class="retro-button" style="padding: 10px 20px;">Fermer</button>
</dialog>
<!-- Use Item Dialog -->
<dialog id="use-item-dialog" class="retro-box"
style="padding: 20px; width: 85%; max-width: 450px; text-align: center; z-index: 250;">
<h2 style="margin-top: 0; color: #ffcc00; text-shadow: 1px 1px 0 #000;">Utiliser sur quel chat ?</h2>
<div id="use-item-list" style="display: flex; flex-direction: column; gap: 10px; margin: 20px 0;">
</div>
<button id="btn-close-use-item" class="retro-button" style="padding: 10px 20px;">Annuler</button>
</dialog>
<!-- Delete Confirmation Dialog -->
<dialog id="confirm-delete-dialog" style="text-align: center;">
<p style="margin-bottom: 20px;">Voulez-vous vraiment relâcher ce chat ?</p>
<div style="display: flex; justify-content: space-around;">
<button id="btn-cancel-delete" class="retro-button"
style="background-color: #ccc; font-size: 10px; padding: 10px 20px;">Non</button>
<button id="btn-confirm-delete" class="retro-button"
style="background-color: #ff4444; color: white; font-size: 10px; padding: 10px 20px;">Oui</button>
</div>
</dialog>
<!-- Notification Dialog -->
<dialog id="notification-dialog" class="retro-box"
style="padding: 20px; width: 80%; max-width: 300px; text-align: center; z-index: 300;">
<p id="notification-text" style="font-weight: bold; margin-bottom: 20px;"></p>
<button id="btn-close-notification" class="retro-button" style="padding: 10px 20px;">OK</button>
</dialog>
</div>
<script type="module" src="/src/main.js"></script>
</body>
</html>