Sfoglia il codice sorgente

Add pirate jelly slot theme

bang 2 settimane fa
parent
commit
264227251c
3 ha cambiato i file con 30 aggiunte e 4 eliminazioni
  1. 11 3
      server.py
  2. 18 1
      slot_workflow.py
  3. 1 0
      web/index.html

+ 11 - 3
server.py

@@ -102,9 +102,13 @@ def _creative_fallback(data):
     brief = (data.get("brief") or "").lower()
     text = " ".join([brief, data.get("styleNotes", "").lower(), data.get("avoidNotes", "").lower()])
     theme = "jelly"
-    if any(k in text for k in ("egypt", "埃及", "金字塔", "法老")):
+    pirate_hint = any(k in text for k in ("pirate", "海盗", "treasure", "宝藏", "金币", "船长"))
+    jelly_hint = any(k in text for k in ("jelly", "果冻", "candy", "糖果", "gummy", "软糖"))
+    if pirate_hint and jelly_hint:
+        theme = "pirate_jelly"
+    elif any(k in text for k in ("egypt", "埃及", "金字塔", "法老")):
         theme = "egypt"
-    elif any(k in text for k in ("pirate", "海盗", "treasure", "宝藏")):
+    elif pirate_hint:
         theme = "pirate"
     elif any(k in text for k in ("cyber", "赛博", "neon", "霓虹")):
         theme = "cyber"
@@ -117,6 +121,10 @@ def _creative_fallback(data):
         features.append("hold_win")
     if any(k in text for k in ("倍率", "multiplier", "连锁")):
         features.append("multipliers")
+    if theme == "pirate_jelly":
+        for feature in ("hold_win", "multipliers"):
+            if feature not in features:
+                features.append(feature)
     title = data.get("title") or "AI Custom Slot"
     style = data.get("styleNotes") or data.get("brief") or ""
     return {
@@ -244,7 +252,7 @@ def creative_to_slot_request(data):
                 "allowedFields": {
                     "gameId": "string slug or title",
                     "title": "string",
-                    "theme": "jelly|fruit|egypt|pirate|cyber",
+                    "theme": "jelly|fruit|egypt|pirate|pirate_jelly|cyber",
                     "style": "English image-generation style prompt, include reference-derived art direction",
                     "reelMode": "ways|paylines|megaways|cluster",
                     "volatility": "low|medium|high",

+ 18 - 1
slot_workflow.py

@@ -17,6 +17,7 @@ DEFAULT_STYLE_BY_THEME = {
     "fruit": "bright juicy fruit slot game, glossy 3D fruit icons, fresh arcade colors, mobile game asset, centered, clean edges",
     "egypt": "golden ancient egypt treasure slot game, polished gems, warm sandstone and turquoise palette, premium mobile game asset, centered, clean edges",
     "pirate": "playful pirate treasure slot game, glossy gold coins, tropical ocean colors, stylized 3D mobile game asset, centered, clean edges",
+    "pirate_jelly": "cute 3D pirate candy slot game, translucent jelly pirate mascot, glossy gummy texture, tropical island ocean background, wooden pirate UI frame, treasure chest, bright gold coins, colorful candy letters, high-saturation casual mobile casino art, soft rounded shapes, polished 3D render, clean mobile game asset, centered, clean edges",
     "cyber": "neon cyber arcade slot game, glowing glass panels, electric blue and magenta palette, premium mobile game asset, centered, clean edges",
 }
 
@@ -26,6 +27,7 @@ THEME_LABELS = {
     "fruit": "水果乐园",
     "egypt": "埃及宝藏",
     "pirate": "海盗金币",
+    "pirate_jelly": "海盗糖果",
     "cyber": "霓虹赛博",
 }
 
@@ -107,6 +109,18 @@ BASE_SYMBOLS = {
         ("symbol_coin", "a shiny golden coin fruit slot symbol"),
         ("symbol_seven", "a red lucky seven fruit slot symbol with gold trim"),
     ],
+    "pirate_jelly": [
+        ("jelly_pirate_red", "a red translucent jelly pirate mascot with a black skull pirate hat, winking, glossy gummy texture, cute mobile slot symbol"),
+        ("jelly_pirate_pink", "a pink jelly candy pirate mascot holding a tiny gold coin, cheerful face, glossy 3D gummy texture"),
+        ("symbol_treasure_chest", "a purple and gold pirate treasure chest overflowing with bright gold coins, glossy 3D mobile slot icon"),
+        ("symbol_coin_multiplier", "a glowing golden coin multiplier badge reading 20x style, no small text, premium hold and win coin symbol"),
+        ("symbol_pirate_hat", "a black pirate hat with skull emblem, candy glossy trim, cute mobile game slot icon"),
+        ("symbol_parrot", "a colorful cute pirate parrot, glossy 3D mobile slot symbol, clean edges"),
+        ("symbol_compass", "a golden pirate compass with blue glass, polished 3D icon"),
+        ("symbol_map_scatter", "a rolled treasure map scatter symbol with red X, glossy parchment and gold trim, no tiny text"),
+        ("symbol_anchor", "a candy-colored pirate anchor with gold rope, glossy 3D icon"),
+        ("symbol_ship", "a cute miniature pirate ship on blue ocean waves, polished mobile slot icon"),
+    ],
 }
 
 
@@ -201,7 +215,10 @@ def build_slot_config(data):
     theme = data.get("theme", "jelly")
     reel_mode = data.get("reelMode", "ways")
     volatility = data.get("volatility", "medium")
-    feature_names = set(data.get("features") or ["cascades", "free_spins", "wilds"])
+    default_features = ["cascades", "free_spins", "wilds"]
+    if theme == "pirate_jelly":
+        default_features = ["cascades", "free_spins", "wilds", "hold_win", "multipliers"]
+    feature_names = set(data.get("features") or default_features)
     columns = 6 if reel_mode == "megaways" else 5
     rows = 5 if reel_mode == "cluster" else 3
     return {

+ 1 - 0
web/index.html

@@ -114,6 +114,7 @@
           <option value="fruit">水果乐园</option>
           <option value="egypt">埃及宝藏</option>
           <option value="pirate">海盗金币</option>
+          <option value="pirate_jelly">海盗糖果</option>
           <option value="cyber">霓虹赛博</option>
         </select></div>
       <div class="field"><label>基础玩法</label>