Escanea con tu iPhone para instalar
This is a pixel art game made with ai
Novedades
Versión 1.0
First release
Qué hace
5 acciones-
CommentThis shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=4d241e0d-dab0-4680-838a-d49ff885f41b made with AI
-
Text
-
Base64 Encode
-
Text
-
Open URLs
Ver como código
Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.
#include 'actions/web'
#include 'actions/crypto'
#define glyph shield
// This shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=4d241e0d-dab0-4680-838a-d49ff885f41b made with AI
const GameHtml = "<!doctype html><html><head><meta name=\\"viewport\\" content=\\"width=device-width,initial-scale=1\\"><title>Boss Battle</title><style>body{margin:0;background:#120d1a;color:#f7d77a;font-family:monospace;text-align:center;image-rendering:pixelated}main{max-width:520px;margin:20px auto;padding:20px;border:6px solid #8b1e3f;background:#24152d;box-shadow:0 0 0 6px #f7d77a}h1{font-size:32px;text-shadow:4px 4px #8b1e3f}.boss{font-size:80px;margin:12px}.bar{height:24px;background:#351b2b;border:4px solid #f7d77a;margin:10px}.fill{height:100%;background:#c62828;width:100%;transition:width .2s}button{font:inherit;font-weight:bold;color:#120d1a;background:#f7d77a;border:4px solid #fff0a8;padding:12px;margin:5px;cursor:pointer}button:disabled{opacity:.35}#log{min-height:70px;border:4px dashed #8b1e3f;padding:10px;margin-top:14px;color:#fff0a8}</style></head><body><main><h1>⚔ BOSS BATTLE ⚔</h1><div class=\\"boss\\">👹</div><h2>THE SHADOW KING</h2><div class=\\"bar\\"><div id=\\"bossFill\\" class=\\"fill\\"></div></div><div id=\\"bossHp\\">Boss HP: 100 / 100</div><p>Hero HP: <span id=\\"heroHp\\">100</span> / 100</p><button id=\\"attack\\" onclick=\\"attack()\\">ATTACK</button><button id=\\"finisher\\" onclick=\\"finish()\\" disabled>FINISHER</button><button onclick=\\"potion()\\">POTION</button><button onclick=\\"flee()\\">FLEE</button><div id=\\"log\\">The arena awaits your challenge.</div><button onclick=\\"restart()\\">RESTART</button></main><script>let b=100,h=100,p=2,ended=false;const $=id=>document.getElementById(id);function say(t){$('log').textContent=t}function draw(){ $('bossFill').style.width=b+'%';$('bossHp').textContent='Boss HP: '+b+' / 100';$('heroHp').textContent=h;$('finisher').disabled=b>25||ended;$('attack').disabled=ended}function check(){if(b<=0){ended=true;say('VICTORY! The Shadow King has fallen!')}else if(h<=0){ended=true;say('DEFEAT! The darkness wins.')}draw()}function enemy(){if(b>0){let d=Math.floor(Math.random()*12)+8;h=Math.max(0,h-d);say('The boss strikes back for '+d+' damage!');check()}}function attack(){if(ended)return;let d=Math.floor(Math.random()*16)+10;b=Math.max(0,b-d);say('Your pixel blade deals '+d+' damage!');check();if(!ended)setTimeout(enemy,350)}function finish(){if(ended||b>25)return;b=0;say('FINISHER! A legendary pixel strike ends the battle!');check()}function potion(){if(ended||p<1){say('No potions remain.');return}p--;let old=h;h=Math.min(100,h+30);say('Potion restores '+(h-old)+' HP. Potions left: '+p);draw()}function flee(){if(ended)return;ended=true;say('You fled the boss battle.');draw()}function restart(){b=100;h=100;p=2;ended=false;say('The arena resets. Face the Shadow King!');draw()}draw()</script></body></html>"
const EncodedGame = base64Encode(GameHtml)
const GameURL = "data:text/html;base64,{EncodedGame}"
openURL(GameURL)
Abrir en Cherri Playground
Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.
Valoraciones y reseñas
Escribe una reseña–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!
Publicidad
Más de pooopv
También te puede gustar
Publicidad