# Rakku: Rebirth Café V10.25 Maintenance Polish Full

Komplette Version, kein Patch.

V10.25:
- Wartungsmodus-Kaffeetasse ersetzt:
  - kein Emoji mehr
  - neue generierte SVG-Grafik unter `public/assets/maintenance-cup.svg`
  - Rauch/Dampf kommt direkt aus der Tasse
  - alter störender Rahmen/Artefakte werden ausgeblendet
- Fortschrittsbalken wieder wie früher:
  - leuchtender Loader bewegt sich von links nach rechts und zurück
  - zusätzlicher Shine-Effekt
  - Farbverlauf bleibt animiert
- Nur Wartungsmodus und Asset ergänzt.
- Normale PC-Spielseite bleibt unverändert.
- V10.23, V10.22, V10.21, V10.20 und V10.19 bleiben enthalten.
- Deploy-Ordner bleibt enthalten.

Installation:
```bash
cd /var/www/html/RakkuGame
unzip -o RakkuGame-service-v10.24-maintenance-polish-full.zip -d /var/www/html/RakkuGame
bash sync-production-env.sh
FORCE_NPM_INSTALL=1 bash install-rakku-game.sh
npm run create-admin
systemctl restart rakku-game
```


V10.25:
- Nur Mobile / Handy Layout verbessert
- PC Browser Version bleibt unverändert
- Banner, Portal, Kampf und Panels auf kleinen Screens entzerrt
- Mobile Tab-Leiste kompakter
- Räume/Banner und Dialoge auf Handy kleiner und sauberer gesetzt
- Kein separater Server nötig, gleiche Instanz für PC + Mobile


V10.26:
- Mobile Layout erneut gezielt gefixt.
- Mobile Sidebar zeigt wieder kleine Labels statt riesiger leerer Karten.
- Account/Datenlöschung auf Mobile nicht mehr links abgeschnitten.
- Kampfbereich auf Mobile nicht mehr riesig/fullscreen gecroppt.
- Kampf-Sprites auf Mobile kleiner und sauberer gesetzt.
- Komische Teddy-/Pflanzen-Helfer neben dem Helden im Kampf entfernt, auch auf PC.
- PC-Layout ansonsten unverändert.


V10.27:
- Sprachumschaltung DE/EN repariert.
- Harte deutsche UI-Texte werden nach dem Rendern ins Englische übertragen.
- Funktioniert für Login, Wartung, Header, Ressourcen, Tabs, Räume, Kampf, Crafting, Gear und Admin-Dashboard.
- document.documentElement.lang wird korrekt gesetzt.
- PC-/Mobile-Layout bleibt unverändert.


V10.28:
- Englische Übersetzung weiter vervollständigt.
- Guide, Starter-Führung, Sidebar, Raumkarten, Banner-Untertitel und gemischte Texte wie „Nächster Guest“ werden bereinigt.
- Translator läuft mehrere Durchgänge, damit teilweise übersetzte Strings sauber werden.
- Layout bleibt unverändert.


V10.29:
- Vollständigere Englisch-Bereinigung ergänzt.
- Guide, Starter-Führung, Sidebar, Raumkarten, Banner, Kampf, Crafting, Gear, Wartungsmodus, Login und Admin werden nach dem Rendern nochmal komplett bereinigt.
- Mixed Strings wie „Nächster Guest“, „Kämpfe & Materialien finden“, „Gäste bedienen“ usw. werden gezielt korrigiert.
- Wartungsmodus-Texte sind ebenfalls enthalten.
- Layout bleibt unverändert.


V10.30:
- Tavern/upgrade texts corrected in English and German.
- Fixed typo/mixed text like "Kanden kaufen..." and "Nächster Guest".
- Upgrade cards now have icons again.
- Upgrade cards now describe exactly what they do.
- Tavern upgrades now have real levels and affect guest coin rewards.
- Added roomUpgrades save field.
- Layout mostly unchanged; only upgrade cards received styling.


V10.32:
- Build-Fix for V10.31 syntax error.
- Rebuilt safely from V10.30 instead of the broken V10.31 file.
- Does not replace text inside `const tr`, so the syntax error cannot occur again.
- Expanded English cleanup for all visible frontend areas:
  login, maintenance, header, guide, starter, rooms, tavern, guests, upgrades, portal, battle, crafting, gear, quests, board, shrine, helpers, account and admin.
- Layout unchanged.


V10.33:
- Account panel fixed: data deletion button no longer breaks into ugly vertical letters.
- Added clickable imprint link: https://impressum4u.de/rakkulive/
- Added in-game privacy page at /datenschutz and /privacy.
- Login/auth legal footer now has clickable imprint and privacy links.
- Privacy policy is available in German and English depending on selected language.
- Account panel also links to imprint and privacy policy.
- Layout changes are limited to legal/account readability.


V10.34:
- Fixed blank screen caused by direct roomName/roomDesc reference in sidebar.
- Uses safe typeof checks so missing optional helper functions no longer crash the frontend.
- Exposes openLegal on window for inline legal buttons.
- Added emergency frontend error display instead of completely blank page if a future runtime error happens.
- Legal/privacy changes from V10.33 remain included.


V10.35:
- Fixed remaining roomDesc ReferenceError that caused the blank page.
- Added fallback roomName/roomDesc helpers directly, so sidebar cannot crash even if helper generation is missing.
- Moved frontend error handler before render so errors are visible instead of a blank screen.
- Legal/privacy fixes from V10.33 remain included.


V10.36:
- Economy deadlock fix for wood starvation.
- Added "Materialien sammeln / Gather materials" panel in Crafting Workshop.
- Player can collect 5-9+ wood without fighting every 75 seconds.
- Small chance for 1 iron when gathering.
- Daily login wood reward increased slightly.
- Tavern missing-goods button now points to crafting/gathering.
- Gathering state is stored in save.gathering.


V10.37:
- Gather materials / wood cooldown now updates live every second.
- No page refresh needed for "Bereit in Xs" / "Available in Xs".
- Button automatically becomes enabled and changes to "Holz sammeln" / "Collect wood".
- Guest timer and gather timer both use the same tick loop.


V10.38:
- Fixed save merge bug that restored used healing items after refresh.
- Server inventory merge no longer uses max(); newest submitted inventory is authoritative.
- Server resource merge no longer uses max(); spent resources stay spent after refresh.
- useHeal now waits for save request before re-rendering.
- Gear upgrade item consumption now clamps to 0 safely.
- roomUpgrades are merged on server if present.


V10.39:
- Added automatic level-up system.
- XP now converts into levels automatically once enough XP is reached.
- XP bar now uses real next-level requirement instead of the old static /18 width.
- Added XP label in profile: XP current/needed.
- XP sources now call addXp():
  quests, guests, monster kills, stages, bosses, crafting, gathering and gear upgrades.
- Server save merge fixed for XP: XP may go down when leveling consumes it, so newest XP is authoritative.


V10.40:
- Room unlock levels adjusted to match manual balancing:
  Forge & Equipment: Lv. 2
  Job Board: Lv. 7
  Sakura Shrine: Lv. 10
  Helper Hall: Lv. 15
- Forge unlock cost reduced to fit the earlier Lv.2 unlock.

V10.41:
- Added hero leveling in Forge & Equipment.
- Hero level increases ATK, DEF and HP.
- Added owned-only inventory panel.
- Gear upgrade list only displays gear the player owns.
- Added rarity shards for every rarity.
- Gear upgrades require duplicate gear plus matching rarity shards.
- Rarity is color-coded on inventory and gear cards.
- Battles can drop gear and rarity shards.

V10.42:
- Fixed copyGuard crash: e.key is now safely converted before toLowerCase().
- Login/register now show clear 403/409 messages:
  email not verified, username/email exists, password too short.
- Added equipped gear panel with weapon/armor/relic slots.
- Owned gear cards now have Equip/Ausrüsten buttons.
- Equipped gear is visually shown with rarity color and stats.
- Equipped gear contributes ATK/DEF/HP to heroStats.
- Equipped gear is saved server-side.


V10.43:
- Fixed/clarified locked room click behaviour.
- Clicking Schmiede & Ausrüstung now always opens the unlock panel instead of feeling unclickable.
- Unlockable locked rooms are visually marked with GO / Jetzt freischaltbar.
- Locked room panel now shows clearer status, costs and forge explanation.
- Forge scene title/description is language-aware.
- setRoom is guarded so a room render error falls back instead of killing the whole UI.


V10.44:
- Added much more guest variety:
  9 guests -> 24 guests.
- Added many new customer goods:
  Rice ball pack, Lucky charm set, Repair kit, Lantern oil, Sakura parcel,
  Crystal cookie tin, Shrine incense, Relic polish.
- Every new guest has German and English dialogue via enText/text.
- Guest selection now avoids recent repeats.
- Hard/rare/elite guests appear as variety, not constantly.
- XP progression slowed significantly.
- XP rewards reduced from guests, quests, crafting, gathering, hero leveling, gear upgrading, stages and bosses.


V10.45:
- Reduced guest coin payouts.
- Reduced tavern upgrade coin multipliers slightly.
- Reduced several quest and battle coin rewards.
- Added rare guest bonus rewards with rarity tiers:
  Common, Uncommon, Rare, Epic, Legendary.
- Guest bonuses can rarely include wood, iron, crystals, rare shards or essence.
- Guest cards now show a DE/EN bonus hint.
- Bonus rewards are shown in the toast after serving a guest.


V10.46:
- Added resource routes in Crafting Workshop.
- Forest path remains the basic anti-softlock route for wood.
- Old mine unlocks at Lv.3 for iron and rare crystals.
- Moss grove unlocks at Lv.5 for essence chances.
- Shrine trail unlocks at Lv.8 for essence/crystals/uncommon shards.
- Relic ruins unlock at Lv.12 for rare relic/shard chances.
- Each route has its own cooldown, so resources are more available but still not easy to spam.
- All route names/descriptions/buttons are DE/EN aware.


V10.47:
- Fixed Admin Dashboard "Zurück zum Spiel" button.
- closeAdmin now prevents default events, clears admin timers, resets admin tab, replaces /admin with / and renders game view.
- Admin back button now uses type="button", data-admin-back, inline return and delegated click handler.
- Render now prevents stale adminOpen when the URL is not /admin.


V10.48:
- Added public leaderboard/ranklist.
- New top tab: Rankliste / Leaderboard.
- Ranking metrics:
  Level, Adventure stage, Coins, Playtime, Monsters, Bosses, Crafting, Gear.
- Backend endpoint: GET /api/leaderboard?metric=...
- Shows top 50 users and the logged-in user's rank.
- DE/EN labels included.
- Mobile-friendly leaderboard layout.


V10.49:
- Fixed Crafting-Atelier and Schmiede & Ausrüstung not opening.
- Added missing shared helper functions:
  itemName, costText, statText, roleName.
- These helpers were referenced by the inventory/gear/resource route UI and caused room rendering to crash.
- Improved console/detail toast for future room render errors.
- Crafting cost display now uses translated resource/item names.


V10.50:
- Fixed Crafting-Atelier crash: resName() was missing.
- Fixed Forge/Equipment helper audit: ui(), resName(), itemName(), costText(), statText(), roleName() are now all present.
- Crafting display now uses costText() and translated item/resource names consistently.
- Added static build-time helper audit during generation.

V10.51:
- Fixed admin Save reset for players with open/stale clients.
- Reset now writes a fresh default save with _adminResetAt instead of only deleting the DB row.
- /api/save refuses stale client overwrites after admin reset and returns resetApplied.
- Frontend persist adopts resetApplied saves automatically.
- Fixed battle farming exploit:
  monster kill XP/resources/stats are now pending until the full wave is cleared.
- If the player dies before clearing the wave/boss, pending monster kills, XP and resources are discarded.
- Leaderboard monster kills now only count confirmed wave clears, not failed attempts.
