صاروخ ليمو - LEMO Rocket
by ChromeFlame24606 lines20.9 KB
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>صاروخ ليمو - LEMO Rocket</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
user-select: none;
-webkit-user-select: none;
touch-action: none;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html, body {
width: 100%;
height: 100%;
overflow: hidden;
background: #111;
color: #fff;
}
#game-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
image-rendering: pixelated;
image-rendering: crisp-edges;
z-index: 1;
}
.px-btn {
background: #2b2d42;
color: #fff;
border: 3px solid #ffd60a;
box-shadow: 4px 4px 0px #000;
padding: 8px 14px;
font-size: 15px;
font-weight: bold;
cursor: pointer;
transition: transform 0.05s;
text-align: center;
}
.px-btn:active {
transform: translate(2px, 2px);
box-shadow: 2px 2px 0px #000;
}
.px-btn.green { background: #2a9d8f; }
.px-btn.red { background: #e63946; }
.px-btn.gold { background: #e9c46a; color: #111; }
.px-btn.disabled { opacity: 0.5; pointer-events: none; }
.px-panel {
background: rgba(20, 22, 34, 0.94);
border: 4px solid #ffd60a;
box-shadow: 6px 6px 0px #000;
padding: 14px;
max-width: 520px;
width: 94%;
max-height: 86vh;
overflow-y: auto;
}
#ui-layer {
position: fixed;
inset: 0;
z-index: 10;
pointer-events: none;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.interactive { pointer-events: auto; }
/* HUD */
#hud {
display: none;
padding: 10px;
width: 100%;
height: 100%;
position: relative;
}
.hud-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 8px;
flex-wrap: wrap;
}
.hud-box {
background: rgba(0, 0, 0, 0.72);
border: 2px solid #ffd60a;
box-shadow: 3px 3px 0 #000;
padding: 6px 10px;
font-size: 13px;
font-weight: bold;
}
.fuel-bar-wrap {
width: 120px;
height: 14px;
background: #333;
border: 2px solid #fff;
margin-top: 4px;
}
#fuel-bar {
width: 100%;
height: 100%;
background: #06d6a0;
}
#target-indicator {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
display: flex;
flex-direction: column;
align-items: center;
z-index: 15;
}
#arrow-icon {
width: 0;
height: 0;
border-left: 14px solid transparent;
border-right: 14px solid transparent;
border-bottom: 26px solid #ff2a2a;
filter: drop-shadow(2px 2px 0 #000);
}
#dist-label {
background: rgba(0,0,0,0.8);
border: 2px solid #ff2a2a;
color: #fff;
font-size: 12px;
font-weight: bold;
padding: 2px 6px;
margin-top: 4px;
}
#combo-banner {
position: absolute;
top: 22%;
left: 50%;
transform: translateX(-50%);
background: #e63946;
border: 3px solid #ffd60a;
box-shadow: 4px 4px 0 #000;
padding: 8px 16px;
font-size: 18px;
font-weight: bold;
display: none;
z-index: 20;
}
#touch-hint {
position: absolute;
bottom: 42px;
left: 50%;
transform: translateX(-50%);
background: rgba(0,0,0,0.65);
border: 2px solid #ffd6a0;
padding: 4px 10px;
font-size: 12px;
text-align: center;
}
/* Screens / Modals */
.overlay-screen {
position: fixed;
inset: 0;
background: rgba(10, 12, 20, 0.82);
z-index: 30;
display: flex;
align-items: center;
justify-content: center;
padding: 12px;
}
.hidden { display: none !important; }
.title-logo {
font-size: 28px;
color: #ffd60a;
text-shadow: 3px 3px 0 #e63946, 5px 5px 0 #000;
text-align: center;
margin-bottom: 6px;
}
.sub-stats {
display: flex;
justify-content: space-around;
background: #1b1e2e;
border: 2px solid #ffd60a;
padding: 8px;
margin-bottom: 12px;
font-size: 13px;
font-weight: bold;
}
.menu-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-top: 10px;
}
.badge {
display: inline-block;
background: #e63946;
color: #fff;
padding: 2px 6px;
font-size: 11px;
border: 1px solid #ffd60a;
margin: 2px;
}
.stage-card-box {
background: #1b1e2e;
border: 2px solid #4cc9f0;
padding: 10px;
margin: 10px 0;
font-size: 13px;
line-height: 1.6;
}
/* Shop & Upgrades */
.grid-3 {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin-top: 10px;
}
.skin-card {
background: #1b1e2e;
border: 2px solid #888;
padding: 6px;
text-align: center;
cursor: pointer;
}
.skin-card.selected { border-color: #06d6a0; background: #1d3538; }
.skin-card.owned { border-color: #ffd60a; }
.skin-thumb {
width: 64px;
height: 64px;
image-rendering: pixelated;
border: 2px solid #000;
background: #111;
margin: 0 auto 4px;
display: block;
}
.upg-row {
display: flex;
justify-content: space-between;
align-items: center;
background: #1b1e2e;
border: 2px solid #ffd60a;
padding: 8px;
margin-bottom: 8px;
font-size: 13px;
}
/* Workshop */
.ws-preview {
width: 140px;
height: 140px;
border: 3px solid #ffd60a;
box-shadow: 4px 4px 0 #000;
margin: 0 auto 10px;
display: block;
background: #182232;
image-rendering: pixelated;
}
.form-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
font-size: 13px;
}
input[type="text"], select {
background: #111;
color: #fff;
border: 2px solid #ffd60a;
padding: 5px 8px;
font-size: 14px;
font-weight: bold;
}
input[type="color"] {
width: 48px;
height: 30px;
border: 2px solid #ffd60a;
background: none;
cursor: pointer;
}
/* Country Builder */
.flag-preview {
width: 90px;
height: 54px;
border: 2px solid #ffd60a;
box-shadow: 3px 3px 0 #000;
margin: 6px auto;
display: flex;
flex-direction: column;
overflow: hidden;
}
.flag-stripe { flex: 1; width: 100%; }
#footer-credit {
position: fixed;
bottom: 4px;
left: 50%;
transform: translateX(-50%);
z-index: 50;
font-size: 12px;
font-weight: bold;
color: #ffd60a;
text-shadow: 2px 2px 0 #000;
pointer-events: none;
background: rgba(0,0,0,0.55);
padding: 2px 8px;
border: 1px solid #ffd60a;
}
#mute-btn {
position: fixed;
top: 10px;
left: 10px;
z-index: 60;
padding: 6px 10px;
font-size: 14px;
}
</style>
</head>
<body>
<canvas id="game-canvas"></canvas>
<button id="mute-btn" class="px-btn interactive" onclick="toggleMute()">🔊 صوت</button>
<div id="ui-layer">
<!-- IN-GAME HUD -->
<div id="hud">
<div class="hud-top" style="padding-left: 85px;">
<div class="hud-box">
<div>المرحلة: <span id="hud-stage">1</span> | <span id="hud-country">جزيرة ليمو</span></div>
<div>الأهداف: <span id="hud-targets">0</span> | الصواريخ: <span id="hud-rockets">3</span></div>
</div>
<div class="hud-box">
<div>الوقود (<span id="hud-fuel-sec">24</span>ث)</div>
<div class="fuel-bar-wrap"><div id="fuel-bar"></div></div>
</div>
<div class="hud-box">
<div>النقاط: <span id="hud-score">0</span></div>
<div style="color:#ffd60a;font-size:11px;" id="hud-quest">مهمة: -</div>
</div>
</div>
<div id="target-indicator">
<div id="arrow-icon"></div>
<div id="dist-label">0 م</div>
</div>
<div id="combo-banner">ضربة مزدوجة! +200</div>
<div id="touch-hint">اسحب إصبعك لتوجيه الصاروخ (أو الأسهم / WASD)</div>
</div>
</div>
<!-- MAIN MENU / STAGE BRIEFING -->
<div id="screen-menu" class="overlay-screen">
<div class="px-panel">
<div class="title-logo">🚀 صاروخ ليمو</div>
<div class="sub-stats">
<span>🪙 العملات: <b id="ui-coins">0</b></span>
<span>🏆 أعلى مرحلة: <b id="ui-best">1</b></span>
<span>⭐ النقاط: <b id="ui-total-score">0</b></span>
</div>
<div class="stage-card-box">
<div style="display:flex;justify-content:space-between;align-items:center;">
<b style="color:#ffd60a;font-size:16px;">المرحلة القادمة: <span id="card-stage">1</span></b>
<span id="card-world" class="badge" style="background:#2a9d8f;">جزيرة خضراء</span>
</div>
<div>🏳️ البلد الخيالي: <b id="card-country">مملكة ليمونيا</b></div>
<div>🚀 الصواريخ المتاحة: <b id="card-rockets">3</b></div>
<div>🎯 أنواع الأهداف: <div id="card-targets" style="margin-top:3px;"></div></div>
<div style="margin-top:6px;border-top:1px dashed #666;padding-top:4px;color:#ffd60a;">
📜 المهمة الجانبية: <span id="card-quest">دمّر كل الأهداف</span> (+<span id="card-quest-reward">50</span> 🪙)
</div>
<div id="card-boss-alert" class="hidden" style="margin-top:6px;background:#e63946;padding:4px 8px;border:2px solid #ffd60a;font-weight:bold;">
👑 تحذير زعيم المرحلة 100: <span id="card-boss-name"></span>
</div>
</div>
<button class="px-btn green" style="width:100%;font-size:18px;padding:12px;" onclick="startStage()">🔥 أطلق الصاروخ!</button>
<div class="menu-grid">
<button class="px-btn" onclick="openModal('screen-shop')">🎨 متجر السكنات (12)</button>
<button class="px-btn" onclick="openModal('screen-upgrades')">⚡ الترقيات (0-10)</button>
<button class="px-btn" onclick="openModal('screen-workshop')">🛠️ ورشة الصاروخ</button>
<button id="btn-country-menu" class="px-btn gold" onclick="openCountryModal()">🏛️ بناء دولة (م100)</button>
</div>
</div>
</div>
<!-- STAGE RESULT MODAL -->
<div id="screen-result" class="overlay-screen hidden">
<div class="px-panel" style="text-align:center;">
<h2 id="res-title" style="color:#ffd60a;font-size:24px;margin-bottom:8px;">انتصرت!</h2>
<div id="res-stars" style="font-size:32px;margin:8px 0;">⭐⭐⭐</div>
<div class="stage-card-box" style="text-align:right;">
<div>🎯 نقاط المرحلة: <b id="res-score">0</b></div>
<div>🪙 عملات الفوز: <b id="res-coins">0</b></div>
<div>📜 المهمة الجانبية: <b id="res-quest-status">مكتملة!</b></div>
<div id="res-base-capture" class="hidden" style="color:#06d6a0;font-weight:bold;">🏴 تم الاستيلاء على قاعدة دولية لدولتك!</div>
</div>
<button class="px-btn green" style="width:100%;font-size:17px;padding:10px;" onclick="nextAfterResult()">متابعة ⬅️</button>
</div>
</div>
<!-- SHOP MODAL -->
<div id="screen-shop" class="overlay-screen hidden">
<div class="px-panel">
<div style="display:flex;justify-content:space-between;align-items:center;">
<h3 style="color:#ffd60a;">🎨 متجر سكنات الصاروخ</h3>
<span>🪙 <b id="shop-coins">0</b></span>
</div>
<div id="shop-grid" class="grid-3"></div>
<button class="px-btn red" style="width:100%;margin-top:12px;" onclick="closeModals()">إغلاق</button>
</div>
</div>
<!-- UPGRADES MODAL -->
<div id="screen-upgrades" class="overlay-screen hidden">
<div class="px-panel">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;">
<h3 style="color:#ffd60a;">⚡ ترقيات الصاروخ</h3>
<span>🪙 <b id="upg-coins">0</b></span>
</div>
<div id="upg-list"></div>
<button class="px-btn red" style="width:100%;margin-top:8px;" onclick="closeModals()">إغلاق</button>
</div>
</div>
<!-- WORKSHOP MODAL -->
<div id="screen-workshop" class="overlay-screen hidden">
<div class="px-panel">
<h3 style="color:#ffd60a;text-align:center;margin-bottom:8px;">🛠️ ورشة تصميم الصاروخ</h3>
<canvas id="ws-canvas" class="ws-preview" width="70" height="70"></canvas>
<div class="form-row">
<label>اسم الصاروخ (8 حروف):</label>
<input type="text" id="ws-name" maxlength="8" value="LOOM" oninput="updateWorkshopPreview()">
</div>
<div class="form-row">
<label>لون الجسم:</label>
<input type="color" id="ws-body" value="#f1faee" onchange="updateWorkshopPreview()">
</div>
<div class="form-row">
<label>شكل المقدمة:</label>
<select id="ws-nose-shape" onchange="updateWorkshopPreview()">
<option value="cone">مخروطي حاد</option>
<option value="round">كبسولة دائرية</option>
<option value="block">مكعب مدرع</option>
<option value="needle">إبرة سريعة</option>
</select>
</div>
<div class="form-row">
<label>لون المقدمة:</label>
<input type="color" id="ws-nose-color" value="#e63946" onchange="updateWorkshopPreview()">
</div>
<div class="form-row">
<label>لون الزعانف:</label>
<input type="color" id="ws-fins" value="#e63946" onchange="updateWorkshopPreview()">
</div>
<div class="form-row">
<label>لون اللهب:</label>
<input type="color" id="ws-flame" value="#ff9f1c" onchange="updateWorkshopPreview()">
</div>
<div style="display:flex;gap:8px;margin-top:10px;">
<button class="px-btn green" style="flex:1;" onclick="saveWorkshop()">💾 حفظ وتطبيق</button>
<button class="px-btn red" style="flex:1;" onclick="closeModals()">إلغاء</button>
</div>
</div>
</div>
<!-- COUNTRY BUILDER MODAL (UNLOCKS AT STAGE 100) -->
<div id="screen-country" class="overlay-screen hidden">
<div class="px-panel">
<h3 style="color:#ffd60a;text-align:center;">🏛️ بناء الدولة الخيالية</h3>
<div class="flag-preview" id="country-flag-box">
<div class="flag-stripe" id="flag-s1"></div>
<div class="flag-stripe" id="flag-s2"></div>
<div class="flag-stripe" id="flag-s3"></div>
</div>
<div class="form-row">
<label>اسم دولتك:</label>
<input type="text" id="c-name" maxlength="16" value="إمبراطورية ليمو">
</div>
<div class="form-row">
<label>ألوان العلم الثلاثة:</label>
<div>
<input type="color" id="c-f1" value="#2a9d8f" onchange="updateFlagUI()">
<input type="color" id="c-f2" value="#ffd60a" onchange="updateFlagUI()">
<input type="color" id="c-f3" value="#e63946" onchange="updateFlagUI()">
</div>
</div>
<div class="stage-card-box">
<div>🏴 القواعد الدولية المُسيطر عليها: <b id="c-bases">0</b></div>
<div>💰 دخل إضافي لكل مرحلة: +<b id="c-income-bonus">0</b> 🪙</div>
<div>🚀 صواريخ إضافية من القواعد: +<b id="c-rocket-bonus">0</b></div>
</div>
<div id="country-upg-list"></div>
<div style="display:flex;gap:8px;margin-top:10px;">
<button class="px-btn green" style="flex:1;" onclick="saveCountry()">💾 حفظ الدولة</button>
<button class="px-btn red" style="flex:1;" onclick="closeModals()">إغلاق</button>
</div>
</div>
</div>
<div id="footer-credit">صُنعت من LEMO_Loom</div>
<script>
// ==================== SAVE DATA & CONFIG ====================
const DEFAULT_SAVE = {
stage: 1,
bestStage: 1,
coins: 120,
totalScore: 0,
ownedSkins: [0],
selectedSkin: 0,
useCustomWorkshop: false,
upgrades: { blast: 0, fuel: 0, control: 0, rockets: 0 },
workshop: {
name: 'LOOM',
body: '#f1faee',
noseShape: 'cone',
noseColor: '#e63946',
fins: '#e63946',
flame: '#ff9f1c'
},
country: {
unlocked: false,
name: 'جمهورية ليمو',
f1: '#2a9d8f',
f2: '#ffd60a',
f3: '#e63946',
bases: 0,
economyLvl: 0,
arsenalLvl: 0,
monumentLvl: 0
}
};
let save = JSON.parse(localStorage.getItem('lemo_rocket_save_v1') || 'null') || JSON.parse(JSON.stringify(DEFAULT_SAVE));
function persist() {
localStorage.setItem('lemo_rocket_save_v1', JSON.stringify(save));
}
// ==================== FICTIONAL WORLDS, COUNTRIES, TARGETS, BOSSES ====================
const WORLDS = [
{ name: 'جزيرة خضراء', sky: 0x6ec6ff, fog: 0x8ad4ff, ground: 0x4caf50, sand: 0xf4d58d, water: 0x0077b6, tree: 0x2b9348 },
{ name: 'صحراء الكثبان', sky: 0xffb703, fog: 0xfdca40, ground: 0xe09f3e, sand: 0xfff3b0, water: 0x219ebc, tree: 0x606c38 },
{ name: 'أرض الجليد', sky: 0xcaf0f8, fog: 0xade8f4, ground: 0xeef8ff, sand: 0x90e0ef, water: 0x023e8a, tree: 0x48cae4 },
{ name: 'جزيرة الليل', sky: 0x0b132b, fog: 0x1c2541, ground: 0x283845, sand: 0x3a506b, water: 0x090d16, tree: 0x3a86ff },
{ name: 'بركان الحمم', sky: 0x370617, fog: 0x6a040f, ground: 0x2b2d42, sand: 0xd00000, water: 0xff5400, tree: 0x9d0208 },
{ name: 'مملكة الحلوى', sky: 0xffafcc, fog: 0xffc8dd, ground: 0xfde2e4, sand: 0xbde0fe, water: 0xff70a6, tree: 0x9b5de5 }
];
const FICTIONAL_COUNTRIES = [
'مملكة ليمونيا', 'اتحاد زافيريا', 'جمهورية أسترا', 'إمبراطورية كرونو', 'أرض سولاريس',
'دولة نوفا لوم', 'مقاطعة فيردانت', 'سلطنة أوريون', 'اتحاد نيبولا', 'جزيرة تيتانيا',
'مملكة فلورا', 'جمهورية كوزموس', 'إقليم زينيث', 'بلاد لومينا', 'أرخبيل فورتكس'
];
const SHOP_BRANDS = [
'ليمو ماركت', 'برجر لوم', 'لوم تك', 'كافيه ليمو', 'لوم موتورز',
'سوبر ليمو', 'لوم فون', 'مخبز لوم', 'لوم ستار', 'لوم بلازا'
];
const SKINS = [
{ name: 'كلاسيك لوم', price: 0, body: '#f1faee', nose: '#e63946', fins: '#e63946', flame: '#ff9f1c', shape: 'cone' },
{ name: 'ليمون طازج', price: 100, body: '#ffd60a', nose: '#38b000', fins: '#38b000', flame: '#ff5400', shape: 'round' },
{ name: 'القرش الأزرق', price: 200, body: '#0096c7', nose: '#023e8a', fins: '#48cae4', flame: '#00f5d4', shape: 'needle' },
{ name: 'النينجا الأسود', price: 320, body: '#2b2d42', nose: '#d90429', fins: '#8d99ae', flame: '#ff0054', shape: 'needle' },
{ name: 'الذهب الملكي', price: 450, body: '#ffb703', nose: '#fb8500', fins: '#ffffff', flame: '#ffd60a', shape: 'cone' },
{ name: 'النيون البنفسجي', price: 600, body: '#7209b7', nose: '#f72585', fins: '#4cc9f0', flame: '#f72585', shape: 'block' },
{ name: 'الزمرد الأخضر', price: 750, body: '#2a9d8f', nose: '#e9c46a', fins: '#264653', flame: '#06d6a0', shape: 'cone' },
{ name: 'الحمم البركانية', price: 950, body: '#370617', nose: '#ff4800', fins: '#dc2f02', flame: '#ffba08', shape: 'block' },
{ name: 'سفينة الفضاء', price: 1200, body: '#adb5bd', nose: '#3a86ff', fins: '#ffbe0b', flame: '#3a86ff', shape: 'round' },
{ name: 'الحلوى الوردية', price: 1500, body: '#ff70a6', nose: '#70d6ff', fins: '#ffd670', flame: '#ff9770', shape: 'round' },
{ name: 'المدرع الثقيل', price: 1900, body: '#4a5759', nose: '#e63946', fins: '#b0c4b1', flame: '#ff6b35', shape: 'block' },
{ name: 'أسطورة LOOM', price: 2500, body: '#ffffff', nose: '#ffd60a', fins: '#00f5d4', flame: '#ff006e', shape: 'needle' }
];
// Target Catalog (progressive unlock by stage)
const TARGET_TYPES = [
{ id: 'tank', name: 'دبابة', minStage: 1, hp: 1, pts: 100 },
{ id: 'apc', name: 'مدرعة', minStage: 1, hp: 1, pts: 110 },
{ id: 'house', name: 'بيت هدف', minStage: 1, hp: 1, pts: 90 },
{ id: 'lemon_villain', name: 'شرير ليمون', minStage: 2, hp: 1, pts: 140 },
{ id: 'star_toon', name: 'نجمة كرتونية', minStage: 2, hp: 1, pts: 150 },
{ id: 'villa', name: 'فيلا فاخرة', minStage: 3, hp: 1, pts: 130 },
{ id: 'gov_blue', name: 'مبنى قبة زرقاء', minStage: 3, hp: 1, pts: 170 },
{ id: 'gov_gold', name: 'مبنى قبة ذهبية', minStage: 4, hp: 1, pts: 180 },
{ id: 'gov_red', name: 'برج سقف أحمر', minStage: 4, hp: 1, pts: 175 },
{ id: 'gov_court', name: 'محكمة بأعمدة', minStage: 5, hp: 1, pts: 185 },
{ id: 'sam', name: 'منصة صواريخ', minStage: 5, hp: 1, pts: 160 },
{ id: 'plane', name: 'طائرة دوارة', minStage: 6, hp: 1, pts: 220, flying: true },
{ id: 'restaurant', name: 'مطعم خيالي', minStage: 6, hp: 1, pts: 145 },
{ id: 'market', name: 'سوق ومتجر', minStage: 7, hp: 1, pts: 150 },
{ id: 'skyscraper', name: 'ناطحة سحاب', minStage: 7, hp: 1, pts: 210 },
{ id: 'bank', name: 'بنك مركزي', minSGame Source: صاروخ ليمو - LEMO Rocket
Creator: ChromeFlame24
Libraries: none
Complexity: complex (606 lines, 20.9 KB)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: lemo-rocket-chromeflame24" to link back to the original. Then publish at arcadelab.ai/publish.