Download index.html from kblock/terrunia: direct link, hf CLI and curl.
- Browser
- Download file 49.3 kB
-
https://huggingface.co/spaces/kblock/terrunia/resolve/main/index.html
- Command line
-
hf download hf://spaces/kblock/terrunia/index.html
-
curl -L -o index.html https://huggingface.co/spaces/kblock/terrunia/resolve/main/index.html
49.3 kB
| <html lang="pt-br"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Ficha de Personagem - Terrúnia RPG</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .tooltip { | |
| position: relative; | |
| display: inline-block; | |
| } | |
| .tooltip .tooltiptext { | |
| visibility: hidden; | |
| width: 300px; | |
| background-color: #333; | |
| color: #fff; | |
| text-align: center; | |
| border-radius: 6px; | |
| padding: 10px; | |
| position: absolute; | |
| z-index: 1; | |
| bottom: 125%; | |
| left: 50%; | |
| margin-left: -150px; | |
| opacity: 0; | |
| transition: opacity 0.3s; | |
| font-size: 14px; | |
| font-style: italic; | |
| } | |
| .tooltip:hover .tooltiptext { | |
| visibility: visible; | |
| opacity: 1; | |
| } | |
| .selected { | |
| box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.5); | |
| border-color: rgba(74, 222, 128, 1); | |
| } | |
| .progress-container { | |
| width: 100%; | |
| background-color: #e5e7eb; | |
| border-radius: 9999px; | |
| } | |
| .progress-bar { | |
| height: 20px; | |
| background-color: #4f46e5; | |
| border-radius: 9999px; | |
| transition: width 0.3s ease; | |
| } | |
| @keyframes shake { | |
| 0%, 100% { transform: translateX(0); } | |
| 25% { transform: translateX(-5px); } | |
| 75% { transform: translateX(5px); } | |
| } | |
| .shake-effect { | |
| animation: shake 0.5s ease-in-out; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white min-h-screen"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <!-- Header --> | |
| <div class="flex flex-col md:flex-row justify-between items-center mb-8 bg-gray-800 p-6 rounded-lg"> | |
| <div> | |
| <h1 class="text-3xl font-bold text-purple-400 mb-2">Terrúnia RPG</h1> | |
| <p class="text-gray-300">Sistema baseado em Savage Worlds com ênfase em magia, joias e runas</p> | |
| </div> | |
| <div class="mt-4 md:mt-0"> | |
| <img src="https://placehold.co/150x150/4f46e5/white?text=Terrúnia" alt="Logo Terrúnia" class="rounded-full border-4 border-purple-500"> | |
| </div> | |
| </div> | |
| <!-- Character Creation --> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8"> | |
| <!-- Basic Info --> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Informações Básicas</h2> | |
| <div class="space-y-4"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-300 mb-1">Nome do Personagem</label> | |
| <input type="text" id="charName" class="w-full bg-gray-700 text-white rounded p-2"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-300 mb-1">Idade</label> | |
| <input type="number" id="charAge" class="w-full bg-gray-700 text-white rounded p-2"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-300 mb-1">Nível</label> | |
| <input type="number" id="charLevel" min="1" value="1" class="w-full bg-gray-700 text-white rounded p-2"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-300 mb-1">Experiência</label> | |
| <div class="flex items-center space-x-2"> | |
| <input type="number" id="charXP" min="0" value="0" class="w-full bg-gray-700 text-white rounded p-2"> | |
| <span>/100</span> | |
| </div> | |
| <div class="progress-container mt-1"> | |
| <div id="xpBar" class="progress-bar" style="width: 0%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Clan Selection --> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Clã</h2> | |
| <div class="grid grid-cols-2 gap-4"> | |
| <button onclick="selectClan('dunavar')" id="clan-dunavar" class="bg-gray-700 hover:bg-gray-600 p-3 rounded-lg text-left flex items-center transition hover:scale-105"> | |
| <span class="text-yellow-400 mr-2"><i class="fas fa-shield-alt"></i></span> | |
| <span class="tooltip">Clã Dûn'Avar (Defensores da Barreira Arcana) | |
| <span class="tooltiptext">Passiva: Proteção Arcana - Uma vez por combate, reduz dano recebido em 50% por 1 rodada</span> | |
| </span> | |
| </button> | |
| <button onclick="selectClan('rustal')" id="clan-rustal" class="bg-gray-700 hover:bg-gray-600 p-3 rounded-lg text-left flex items-center transition hover:scale-105"> | |
| <span class="text-blue-400 mr-2"><i class="fas fa-scroll"></i></span> | |
| <span class="tooltip">Clã Rustal | |
| <span class="tooltiptext">Passiva: Sabedoria das Runas - Uma vez por sessão, pode refazer um teste de feitiço ou habilidade</span> | |
| </span> | |
| </button> | |
| <button onclick="selectClan('cebios')" id="clan-cebios" class="bg-gray-700 hover:bg-gray-600 p-3 rounded-lg text-left flex items-center transition hover:scale-105"> | |
| <span class="text-purple-400 mr-2"><i class="fas fa-star"></i></span> | |
| <span class="tooltip">Clã Cebios Esti | |
| <span class="tooltiptext">Passiva: Leitura Estelar - Pode prever um evento, recebendo vantagem no próximo teste de Astúcia</span> | |
| </span> | |
| </button> | |
| <button onclick="selectClan('estres')" id="clan-estres" class="bg-gray-700 hover:bg-gray-600 p-3 rounded-lg text-left flex items-center transition hover:scale-105"> | |
| <span class="text-red-400 mr-2"><i class="fas fa-random"></i></span> | |
| <span class="tooltip">Clã Estres do Ét | |
| <span class="tooltiptext">Passiva: Fluxo Caótico - Pode alterar um efeito mágico ao seu favor uma vez por combate</span> | |
| </span> | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Class Selection --> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Classe</h2> | |
| <div id="classContainer" class="grid grid-cols-1 gap-2 text-gray-400"> | |
| <p class="text-center">Selecione um Clã primeiro</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Attributes --> | |
| <div class="bg-gray-800 p-6 rounded-lg mb-8"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Atributos</h2> | |
| <p class="text-gray-300 mb-4">Você tem <span id="attributePoints" class="font-bold">3</span> pontos para distribuir. Todos começam com d4.</p> | |
| <div class="grid grid-cols-1 md:grid-cols-5 gap-4"> | |
| <!-- Astúcia --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-yellow-400 flex justify-between mb-2"> | |
| <span>Astúcia</span> | |
| <span id="astuciaValue">d4</span> | |
| </h3> | |
| <p class="text-gray-300 text-sm mb-2">Inteligência e percepção</p> | |
| <div class="flex justify-between items-center"> | |
| <button onclick="decrementAttribute('astucia')" class="bg-red-500 hover:bg-red-600 text-white px-2 rounded disabled:opacity-50" disabled> | |
| <i class="fas fa-minus"></i> | |
| </button> | |
| <span id="astuciaPoints" class="text-center">+0</span> | |
| <button onclick="incrementAttribute('astucia')" class="bg-green-500 hover:bg-green-600 text-white px-2 rounded"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| <p class="text-gray-400 text-xs mt-2 italic">Detecção de armadilhas, análise de situações, resistência a efeitos mentais</p> | |
| </div> | |
| <!-- Agilidade --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-green-400 flex justify-between mb-2"> | |
| <span>Agilidade</span> | |
| <span id="agilidadeValue">d4</span> | |
| </h3> | |
| <p class="text-gray-300 text-sm mb-2">Reflexos e destreza</p> | |
| <div class="flex justify-between items-center"> | |
| <button onclick="decrementAttribute('agilidade')" class="bg-red-500 hover:bg-red-600 text-white px-2 rounded disabled:opacity-50" disabled> | |
| <i class="fas fa-minus"></i> | |
| </button> | |
| <span id="agilidadePoints" class="text-center">+0</span> | |
| <button onclick="incrementAttribute('agilidade')" class="bg-green-500 hover:bg-green-600 text-white px-2 rounded"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| <p class="text-gray-400 text-xs mt-2 italic">Melhora esquiva, velocidade de ação e precisão em ataques rápidos</p> | |
| </div> | |
| <!-- Força --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-red-400 flex justify-between mb-2"> | |
| <span>Força</span> | |
| <span id="forcaValue">d4</span> | |
| </h3> | |
| <p class="text-gray-300 text-sm mb-2">Potência muscular</p> | |
| <div class="flex justify-between items-center"> | |
| <button onclick="decrementAttribute('forca')" class="bg-red-500 hover:bg-red-600 text-white px-2 rounded disabled:opacity-50" disabled> | |
| <i class="fas fa-minus"></i> | |
| </button> | |
| <span id="forcaPoints" class="text-center">+0</span> | |
| <button onclick="incrementAttribute('forca')" class="bg-green-500 hover:bg-green-600 text-white px-2 rounded"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| <p class="text-gray-400 text-xs mt-2 italic">Aumenta dano físico e capacidade de carga</p> | |
| </div> | |
| <!-- Vigor --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-blue-400 flex justify-between mb-2"> | |
| <span>Vigor</span> | |
| <span id="vigorValue">d4</span> | |
| </h3> | |
| <p class="text-gray-300 text-sm mb-2">Saúde e resistência</p> | |
| <div class="flex justify-between items-center"> | |
| <button onclick="decrementAttribute('vigor')" class="bg-red-500 hover:bg-red-600 text-white px-2 rounded disabled:opacity-50" disabled> | |
| <i class="fas fa-minus"></i> | |
| </button> | |
| <span id="vigorPoints" class="text-center">+0</span> | |
| <button onclick="incrementAttribute('vigor')" class="bg-green-500 hover:bg-green-600 text-white px-2 rounded"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| <p class="text-gray-400 text-xs mt-2 italic">Resistência contra venenos, fadiga e amplia pontos de vida</p> | |
| </div> | |
| <!-- Espírito --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-purple-400 flex justify-between mb-2"> | |
| <span>Espírito</span> | |
| <span id="espiritoValue">d4</span> | |
| </h3> | |
| <p class="text-gray-300 text-sm mb-2">Determinação e carisma</p> | |
| <div class="flex justify-between items-center"> | |
| <button onclick="decrementAttribute('espirito')" class="bg-red-500 hover:bg-red-600 text-white px-2 rounded disabled:opacity-50" disabled> | |
| <i class="fas fa-minus"></i> | |
| </button> | |
| <span id="espiritoPoints" class="text-center">+0</span> | |
| <button onclick="incrementAttribute('espirito')" class="bg-green-500 hover:bg-green-600 text-white px-2 rounded"> | |
| <i class="fas fa-plus"></i> | |
| </button> | |
| </div> | |
| <p class="text-gray-400 text-xs mt-2 italic">Resistência contra controle mental e efetividade de habilidades mágicas</p> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <h3 class="font-bold text-gray-300 mb-2">Progressão dos Dados</h3> | |
| <div class="grid grid-cols-1 md:grid-cols-5 gap-2 text-sm"> | |
| <div class="bg-gray-700 p-2 rounded text-center">-2pts = d4</div> | |
| <div class="bg-gray-700 p-2 rounded text-center">2pts = d6</div> | |
| <div class="bg-gray-700 p-2 rounded text-center">4pts = d8</div> | |
| <div class="bg-gray-700 p-2 rounded text-center">6pts = d10</div> | |
| <div class="bg-gray-700 p-2 rounded text-center">8pts = d12</div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Skills --> | |
| <div class="bg-gray-800 p-6 rounded-lg mb-8"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Perícias</h2> | |
| <p class="text-gray-300 mb-4">Você tem <span id="skillPoints" class="font-bold">3</span> pontos para distribuir.</p> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4"> | |
| <!-- Skill buttons will be dynamically generated here --> | |
| </div> | |
| </div> | |
| <!-- Advantages & Disadvantages --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8"> | |
| <!-- Advantages --> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Vantagens</h2> | |
| <p class="text-gray-300 mb-4">Você pode escolher até <span id="advantagePoints" class="font-bold">3</span> pontos positivos.</p> | |
| <div class="grid grid-cols-1 gap-2"> | |
| <!-- Advantage buttons will be dynamically generated here --> | |
| </div> | |
| </div> | |
| <!-- Disadvantages --> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Desvantagens</h2> | |
| <p class="text-gray-300 mb-4">Você pode escolher até <span id="disadvantagePoints" class="font-bold">3</span> pontos negativos.</p> | |
| <div class="grid grid-cols-1 gap-2"> | |
| <!-- Disadvantage buttons will be dynamically generated here --> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Items, Jewels and Runes --> | |
| <div class="bg-gray-800 p-6 rounded-lg mb-8"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Itens, Joias e Runas</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> | |
| <!-- Items --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-yellow-400 mb-3"><i class="fas fa-gem mr-2"></i> Joias</h3> | |
| <div id="jewelsContainer" class="grid grid-cols-1 gap-2"> | |
| <button onclick="selectJewel('none')" class="bg-gray-600 hover:bg-gray-500 p-2 rounded text-left selected">Nenhuma</button> | |
| <!-- Tier 1 --> | |
| <button onclick="selectJewel('safira')" class="bg-gray-600 hover:bg-gray-500 p-2 rounded text-left tooltip"> | |
| Safira das Marés <span class="tooltiptext">+1 em Ocultismo e Cura</span> | |
| </button> | |
| <button onclick="selectJewel('rubi')" class="bg-gray-600 hover:bg-gray-500 p-2 rounded text-left tooltip"> | |
| Rubi da Ira <span class="tooltiptext">+1 em Lutar e dano de fogo</span> | |
| </button> | |
| <!-- More jewels would be added here --> | |
| </div> | |
| </div> | |
| <!-- Jewels --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-blue-400 mb-3"><i class="fas fa-ring mr-2"></i> Itens Mágicos</h3> | |
| <div class="space-y-2"> | |
| <select class="w-full bg-gray-600 text-white rounded p-2"> | |
| <option>Selecione um item</option> | |
| <option class="tooltip">Item Comum <span class="tooltiptext">Pequenos bônus por 5 minutos (85% de quebrar)</span></option> | |
| <option class="tooltip">Item Raro <span class="tooltiptext">Efeitos especiais por 15 minutos (60% de quebrar)</span></option> | |
| <option class="tooltip">Item Épico <span class="tooltiptext">Grande impacto por 45 minutos (35% de quebrar)</span></option> | |
| </select> | |
| <button class="w-full bg-purple-600 hover:bg-purple-700 p-2 rounded"> | |
| Absorver Essência | |
| </button> | |
| <p class="text-xs italic text-gray-400 mt-2">Os Terrírians podem absorver a essência dos itens temporariamente</p> | |
| </div> | |
| </div> | |
| <!-- Runes --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-green-400 mb-3"><i class="fas fa-scroll mr-2"></i> Runas</h3> | |
| <div class="grid grid-cols-2 gap-2"> | |
| <button onclick="toggleRune('cura')" class="bg-gray-600 hover:bg-gray-500 p-2 rounded text-left tooltip"> | |
| <i class="fas fa-heart mr-1"></i> Cura <span class="tooltiptext">Regenera 1 PV por rodada em combate</span> | |
| </button> | |
| <button onclick="toggleRune('velocidade')" class="bg-gray-600 hover:bg-gray-500 p-2 rounded text-left tooltip"> | |
| <i class="fas fa-running mr-1"></i> Velocidade <span class="tooltiptext">+1 em Agilidade para esquiva</span> | |
| </button> | |
| <button onclick="toggleRune('fogo')" class="bg-gray-600 hover:bg-gray-500 p-2 rounded text-left tooltip"> | |
| <i class="fas fa-fire mr-1"></i> Fogo <span class="tooltiptext">+1 de dano em ataques corpo a corpo</span> | |
| </button> | |
| <button onclick="toggleRune('escudo')" class="bg-gray-600 hover:bg-gray-500 p-2 rounded text-left tooltip"> | |
| <i class="fas fa-shield-alt mr-1"></i> Escudo <span class="tooltiptext">Reduz 1 ponto de dano recebido</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Character Stats --> | |
| <div class="bg-gray-800 p-6 rounded-lg"> | |
| <h2 class="text-xl font-bold text-purple-400 mb-4 border-b border-gray-700 pb-2">Estatísticas do Personagem</h2> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6"> | |
| <!-- Combat Stats --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-red-400 mb-3"><i class="fas fa-swords mr-2"></i> Combate</h3> | |
| <div class="space-y-2"> | |
| <div class="flex justify-between"> | |
| <span>Pontos de Vida:</span> | |
| <span id="hpValue" class="font-bold">10</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span>Defesa:</span> | |
| <span id="defenseValue" class="font-bold">10</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span>Dano Físico:</span> | |
| <span id="physDmgValue" class="font-bold">1d4</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span>Dano Mágico:</span> | |
| <span id="magicDmgValue" class="font-bold">1d4</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Magic Stats --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-blue-400 mb-3"><i class="fas fa-hat-wizard mr-2"></i> Magia</h3> | |
| <div class="space-y-2"> | |
| <div class="flex justify-between"> | |
| <span>Pontos de Magia:</span> | |
| <span id="mpValue" class="font-bold">5</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span>Resistência Mágica:</span> | |
| <span id="magicResistValue" class="font-bold">10</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span>Bonus de Feitiço:</span> | |
| <span id="spellBonusValue" class="font-bold">+0</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Other Stats --> | |
| <div class="bg-gray-700 p-4 rounded-lg"> | |
| <h3 class="font-bold text-green-400 mb-3"><i class="fas fa-bolt mr-2"></i> Outras</h3> | |
| <div class="space-y-2"> | |
| <div class="flex justify-between"> | |
| <span>Furtividade:</span> | |
| <span id="stealthValue" class="font-bold">0</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span>Persuasão:</span> | |
| <span id="persuasionValue" class="font-bold">0</span> | |
| </div> | |
| <div class="flex justify-between"> | |
| <span>Velocidade:</span> | |
| <span id="speedValue" class="font-bold">6m</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Save Button --> | |
| <div class="mt-8 text-center"> | |
| <button onclick="saveCharacter()" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-6 rounded-full text-lg transition hover:scale-105"> | |
| Salvar Personagem | |
| </button> | |
| </div> | |
| </div> | |
| <script> | |
| // Character data | |
| let character = { | |
| name: "", | |
| age: "", | |
| level: 1, | |
| xp: 0, | |
| clan: null, | |
| class: null, | |
| attributes: { | |
| astucia: { points: 0, dice: "d4" }, | |
| agilidade: { points: 0, dice: "d4" }, | |
| forca: { points: 0, dice: "d4" }, | |
| vigor: { points: 0, dice: "d4" }, | |
| espirito: { points: 0, dice: "d4" } | |
| }, | |
| skills: [], | |
| advantages: [], | |
| disadvantages: [], | |
| jewels: "none", | |
| runes: [], | |
| attributePoints: 3, | |
| skillPoints: 3, | |
| advantagePoints: 3, | |
| disadvantagePoints: 3 | |
| }; | |
| // Available skills with their costs and descriptions | |
| const skillsList = [ | |
| { id: "atletismo", name: "Atletismo", cost: 1, description: "+1 em testes de corrida, salto e escalada" }, | |
| { id: "sobrevivencia", name: "Sobrevivência", cost: 1, description: "+1 em rastreamento e caça" }, | |
| { id: "persuasao", name: "Persuasão", cost: 1, description: "+1 em testes de influência social" }, | |
| { id: "notar", name: "Notar", cost: 1, description: "+1 em detecção de detalhes e armadilhas" }, | |
| { id: "curar", name: "Curar", cost: 1, description: "+1 em medicina e primeiros socorros" }, | |
| { id: "furtividade", name: "Furtividade", cost: 2, description: "+2 em movimentação silenciosa" }, | |
| { id: "lutar", name: "Lutar", cost: 2, description: "+2 em ataques corpo a corpo" }, | |
| { id: "atirar", name: "Atirar", cost: 2, description: "+2 em ataques à distância" }, | |
| { id: "estrategia", name: "Estratégia de Combate", cost: 3, description: "+3 em planejamento tático e liderança em batalha" } | |
| ]; | |
| // Available advantages with their points and descriptions | |
| const advantagesList = [ | |
| { id: "conexao_arcana", name: "Conexão Arcana", points: 1, description: "+2 em Ocultismo e Manipulação de Magia" }, | |
| { id: "olhos_atentos", name: "Olhos Atentos", points: 1, description: "Enxerga no escuro sem dificuldades" }, | |
| { id: "guerreiro_runico", name: "Guerreiro Rúnico", points: 2, description: "+2 em Lutar e pode usar armas encantadas" }, | |
| { id: "magia_ancestral", name: "Magia Ancestral", points: 2, description: "Pode lançar feitiços sem treinamento formal" }, | |
| { id: "mestre_runas", name: "Mestre das Runas", points: 3, description: "Consegue aprimorar runas sem risco de falha" } | |
| ]; | |
| // Available disadvantages with their points and descriptions | |
| const disadvantagesList = [ | |
| { id: "coracao_generoso", name: "Coração Generoso", points: -1, description: "Não consegue negar ajuda" }, | |
| { id: "genio_dificil", name: "Gênio Difícil", points: -1, description: "Resiste a ordens e trabalho em equipe" }, | |
| { id: "fobia_criaturas", name: "Fobia de Criaturas Grandes", points: -2, description: "Fica paralisado perto de monstros" }, | |
| { id: "mao_ruim", name: "Mão Ruim", points: -3, description: "Todo início de sessão, rola 1d6: se tirar 1, algo ruim acontece" } | |
| ]; | |
| // Clan Classes | |
| const clanClasses = { | |
| dunavar: [ | |
| { id: "sentinela", name: "Sentinela da Luz", type: "Tanker", | |
| skills: [ | |
| "Muralha Viva - Reduz todo dano recebido em 2 pontos por 2 rodadas", | |
| "Postura Inquebrantável - Enquanto estiver defendendo, não pode ser empurrado nem derrubado" | |
| ], | |
| passive: "Vigilância Absoluta - Ganha +1 em testes de resistência contra efeitos negativos" | |
| }, | |
| { id: "gladiador", name: "Gladiador da Barreira", type: "Guerreiro", | |
| skills: [ | |
| "Impacto Arcano - Desfere um golpe que empurra o alvo 2 metros para trás", | |
| "Contra-Golpe Rúnico - Ao bloquear um ataque, pode atacar imediatamente" | |
| ], | |
| passive: "Treino dos Guardiões - Ataques básicos ignoram 1 ponto de armadura inimiga" | |
| } | |
| ], | |
| rustal: [ | |
| { id: "forjador", name: "Forjador Arcano", type: "Tanker", | |
| skills: [ | |
| "Armadura Rúnica - Recebe +2 de armadura por 3 rodadas", | |
| "Punho de Pedra - Atordoar o alvo por 1 rodada" | |
| ], | |
| passive: "Pele de Cristal - Reduz em 1 todo dano recebido" | |
| }, | |
| { id: "gravador", name: "Gravador das Sombras", type: "Dano a Distância", | |
| skills: [ | |
| "Projeção Arcana - Dispara uma energia rúnica que causa dano e reduz a velocidade do alvo", | |
| "Runa Explosiva - Marca um inimigo; se ele for atingido novamente, sofre dano adicional" | |
| ], | |
| passive: "Fluxo de Mana - Regenera 1 ponto de energia por rodada" | |
| } | |
| ] | |
| }; | |
| // Initialize the character sheet | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Generate skill buttons | |
| const skillsContainer = document.querySelector('.bg-gray-800:nth-of-type(4) .grid'); | |
| skillsList.forEach(skill => { | |
| const button = document.createElement('button'); | |
| button.className = 'bg-gray-700 hover:bg-gray-600 p-3 rounded-lg text-left tooltip'; | |
| button.onclick = () => selectSkill(skill.id); | |
| button.innerHTML = ` | |
| <span class="font-medium">${skill.name}</span> | |
| <span class="text-xs text-gray-400 block">${skill.description}</span> | |
| <span class="tooltiptext">${skill.description}</span> | |
| `; | |
| skillsContainer.appendChild(button); | |
| }); | |
| // Generate advantage buttons | |
| const advantagesContainer = document.querySelector('.bg-gray-800:nth-of-type(5) .grid'); | |
| advantagesList.forEach(adv => { | |
| const button = document.createElement('button'); | |
| button.className = 'bg-gray-700 hover:bg-gray-600 p-3 rounded-lg text-left tooltip'; | |
| button.onclick = () => selectAdvantage(adv.id); | |
| button.innerHTML = ` | |
| <span class="font-medium">${adv.name} (${adv.points} ponto${adv.points > 1 ? 's' : ''})</span> | |
| <span class="text-xs text-gray-400 block">${adv.description}</span> | |
| <span class="tooltiptext">${adv.description}</span> | |
| `; | |
| advantagesContainer.appendChild(button); | |
| }); | |
| // Generate disadvantage buttons | |
| const disadvantagesContainer = document.querySelector('.bg-gray-800:nth-of-type(6) .grid'); | |
| disadvantagesList.forEach(disadv => { | |
| const button = document.createElement('button'); | |
| button.className = 'bg-gray-700 hover:bg-gray-600 p-3 rounded-lg text-left tooltip'; | |
| button.onclick = () => selectDisadvantage(disadv.id); | |
| button.innerHTML = ` | |
| <span class="font-medium">${disadv.name} (${disadv.points} ponto${disadv.points < -1 ? 's' : ''})</span> | |
| <span class="text-xs text-gray-400 block">${disadv.description}</span> | |
| <span class="tooltiptext">${disadv.description}</span> | |
| `; | |
| disadvantagesContainer.appendChild(button); | |
| }); | |
| }); | |
| // Update XP bar | |
| function updateXP() { | |
| const xp = parseInt(document.getElementById('charXP').value); | |
| const xpBar = document.getElementById('xpBar'); | |
| const percentage = Math.min(100, Math.floor((xp / 100) * 100)); | |
| xpBar.style.width = `${percentage}%`; | |
| // Update character object | |
| character.xp = xp; | |
| calculateStats(); | |
| } | |
| // Clan selection | |
| function selectClan(clanId) { | |
| // Reset previously selected clan | |
| if (character.clan) { | |
| document.getElementById(`clan-${character.clan}`).classList.remove('selected'); | |
| } | |
| // Set new clan | |
| character.clan = clanId; | |
| document.getElementById(`clan-${clanId}`).classList.add('selected'); | |
| // Update classes | |
| updateClasses(); | |
| // Calculate stats | |
| calculateStats(); | |
| } | |
| // Update available classes based on clan selection | |
| function updateClasses() { | |
| const classContainer = document.getElementById('classContainer'); | |
| classContainer.innerHTML = ''; | |
| if (!character.clan) return; | |
| const classes = clanClasses[character.clan]; | |
| classes.forEach(cls => { | |
| const button = document.createElement('button'); | |
| button.className = 'bg-gray-700 hover:bg-gray-600 p-4 rounded-lg text-left transition hover:scale-105'; | |
| button.onclick = () => selectClass(cls.id); | |
| button.innerHTML = ` | |
| <h3 class="font-bold text-lg">${cls.name}</h3> | |
| <p class="text-sm text-gray-400">${cls.type}</p> | |
| <div class="mt-2 text-xs"> | |
| <p class="font-medium">Habilidades:</p> | |
| <ul class="list-disc list-inside"> | |
| ${cls.skills.map(skill => `<li>${skill}</li>`).join('')} | |
| </ul> | |
| <p class="font-medium mt-1">Passiva: ${cls.passive}</p> | |
| </div> | |
| `; | |
| if (character.class === cls.id) { | |
| button.classList.add('selected'); | |
| } | |
| classContainer.appendChild(button); | |
| }); | |
| } | |
| // Class selection | |
| function selectClass(classId) { | |
| // Only proceed if a clan is selected | |
| if (!character.clan) return; | |
| // Reset previously selected class | |
| if (character.class) { | |
| document.querySelectorAll(`#classContainer button`).forEach(btn => { | |
| btn.classList.remove('selected'); | |
| }); | |
| } | |
| // Set new class | |
| character.class = classId; | |
| // Update UI and calculate stats | |
| updateClasses(); | |
| calculateStats(); | |
| } | |
| // Attribute increment | |
| function incrementAttribute(attribute) { | |
| if (character.attributePoints > 0) { | |
| character.attributes[attribute].points += 1; | |
| character.attributePoints -= 1; | |
| updateAttributeDisplay(attribute); | |
| updateAttributePointsDisplay(); | |
| // Update dice value based on points | |
| updateDiceValue(attribute); | |
| } else { | |
| alert("Você não tem mais pontos de atributo para distribuir!"); | |
| } | |
| } | |
| // Attribute decrement | |
| function decrementAttribute(attribute) { | |
| if (character.attributes[attribute].points > 0) { | |
| character.attributes[attribute].points -= 1; | |
| character.attributePoints += 1; | |
| updateAttributeDisplay(attribute); | |
| updateAttributePointsDisplay(); | |
| // Update dice value based on points | |
| updateDiceValue(attribute); | |
| } | |
| } | |
| // Update attribute display | |
| function updateAttributeDisplay(attribute) { | |
| document.getElementById(`${attribute}Points`).textContent = `+${character.attributes[attribute].points}`; | |
| document.getElementById(`${attribute}Value`).textContent = character.attributes[attribute].dice; | |
| // Enable/disable decrement button | |
| document.querySelector(`button[onclick="decrementAttribute('${attribute}')"]`).disabled = | |
| character.attributes[attribute].points <= 0; | |
| } | |
| // Update dice value based on points | |
| function updateDiceValue(attribute) { | |
| const points = character.attributes[attribute].points; | |
| let dice; | |
| if (points <= 1) dice = "d4"; | |
| else if (points <= 3) dice = "d6"; | |
| else if (points <= 5) dice = "d8"; | |
| else if (points <= 7) dice = "d10"; | |
| else dice = "d12"; | |
| character.attributes[attribute].dice = dice; | |
| document.getElementById(`${attribute}Value`).textContent = dice; | |
| } | |
| // Update attribute points display | |
| function updateAttributePointsDisplay() { | |
| document.getElementById('attributePoints').textContent = character.attributePoints; | |
| } | |
| // Skill selection | |
| function selectSkill(skillId) { | |
| const skill = skillsList.find(s => s.id === skillId); | |
| // Check if skill is already selected | |
| const index = character.skills.findIndex(s => s.id === skillId); | |
| if (index === -1) { | |
| // Check if player has enough points | |
| if (character.skillPoints >= skill.cost) { | |
| character.skills.push({ id: skill.id, name: skill.name }); | |
| character.skillPoints -= skill.cost; | |
| // Update UI | |
| document.querySelectorAll(`.bg-gray-800:nth-of-type(4) button`).forEach(btn => { | |
| if (btn.textContent.includes(skill.name)) { | |
| btn.classList.add('selected'); | |
| } | |
| }); | |
| updateSkillPointsDisplay(); | |
| } else { | |
| alert("Você não tem pontos de perícia suficientes!"); | |
| } | |
| } else { | |
| // Remove skill | |
| character.skills.splice(index, 1); | |
| character.skillPoints += skill.cost; | |
| // Update UI | |
| document.querySelectorAll(`.bg-gray-800:nth-of-type(4) button`).forEach(btn => { | |
| if (btn.textContent.includes(skill.name)) { | |
| btn.classList.remove('selected'); | |
| } | |
| }); | |
| updateSkillPointsDisplay(); | |
| } | |
| } | |
| // Update skill points display | |
| function updateSkillPointsDisplay() { | |
| document.getElementById('skillPoints').textContent = character.skillPoints; | |
| } | |
| // Advantage selection | |
| function selectAdvantage(advantageId) { | |
| const advantage = advantagesList.find(a => a.id === advantageId); | |
| // Check if advantage is already selected | |
| const index = character.advantages.findIndex(a => a.id === advantageId); | |
| if (index === -1) { | |
| // Check if player has enough points | |
| if (character.advantagePoints >= advantage.points) { | |
| character.advantages.push({ id: advantage.id, name: advantage.name }); | |
| character.advantagePoints -= advantage.points; | |
| // Update UI | |
| document.querySelectorAll(`.bg-gray-800:nth-of-type(5) button`).forEach(btn => { | |
| if (btn.textContent.includes(advantage.name)) { | |
| btn.classList.add('selected'); | |
| } | |
| }); | |
| updateAdvantagePointsDisplay(); | |
| } else { | |
| alert("Você não tem pontos de vantagem suficientes!"); | |
| } | |
| } else { | |
| // Remove advantage | |
| character.advantages.splice(index, 1); | |
| character.advantagePoints += advantage.points; | |
| // Update UI | |
| document.querySelectorAll(`.bg-gray-800:nth-of-type(5) button`).forEach(btn => { | |
| if (btn.textContent.includes(advantage.name)) { | |
| btn.classList.remove('selected'); | |
| } | |
| }); | |
| updateAdvantagePointsDisplay(); | |
| } | |
| } | |
| // Update advantage points display | |
| function updateAdvantagePointsDisplay() { | |
| document.getElementById('advantagePoints').textContent = character.advantagePoints; | |
| } | |
| // Disadvantage selection | |
| function selectDisadvantage(disadvantageId) { | |
| const disadvantage = disadvantagesList.find(d => d.id === disadvantageId); | |
| // Check if disadvantage is already selected | |
| const index = character.disadvantages.findIndex(d => d.id === disadvantageId); | |
| if (index === -1) { | |
| // Check if player has enough points | |
| if (character.disadvantagePoints >= Math.abs(disadvantage.points)) { | |
| character.disadvantages.push({ id: disadvantage.id, name: disadvantage.name }); | |
| character.disadvantagePoints += disadvantage.points; // Note: points are negative | |
| // Update UI | |
| document.querySelectorAll(`.bg-gray-800:nth-of-type(6) button`).forEach(btn => { | |
| if (btn.textContent.includes(disadvantage.name)) { | |
| btn.classList.add('selected'); | |
| } | |
| }); | |
| updateDisadvantagePointsDisplay(); | |
| } else { | |
| alert("Você já selecionou o máximo de desvantagens permitido!"); | |
| } | |
| } else { | |
| // Remove disadvantage | |
| character.disadvantages.splice(index, 1); | |
| character.disadvantagePoints -= disadvantage.points; // Note: points are negative | |
| // Update UI | |
| document.querySelectorAll(`.bg-gray-800:nth-of-type(6) button`).forEach(btn => { | |
| if (btn.textContent.includes(disadvantage.name)) { | |
| btn.classList.remove('selected'); | |
| } | |
| }); | |
| updateDisadvantagePointsDisplay(); | |
| } | |
| } | |
| // Update disadvantage points display | |
| function updateDisadvantagePointsDisplay() { | |
| document.getElementById('disadvantagePoints').textContent = character.disadvantagePoints; | |
| } | |
| // Jewel selection | |
| function selectJewel(jewelId) { | |
| character.jewels = jewelId; | |
| // Update UI | |
| document.querySelectorAll('#jewelsContainer button').forEach(btn => { | |
| btn.classList.remove('selected'); | |
| }); | |
| document.querySelector(`#jewelsContainer button[onclick="selectJewel('${jewelId}')"]`).classList.add('selected'); | |
| calculateStats(); | |
| } | |
| // Toggle rune | |
| function toggleRune(runeId) { | |
| const index = character.runes.indexOf(runeId); | |
| if (index === -1) { | |
| character.runes.push(runeId); | |
| } else { | |
| character.runes.splice(index, 1); | |
| } | |
| // Update UI | |
| const button = document.querySelector(`button[onclick="toggleRune('${runeId}')"]`); | |
| button.classList.toggle('selected'); | |
| calculateStats(); | |
| } | |
| // Calculate all character stats | |
| function calculateStats() { | |
| // Base HP based on Vigor | |
| let hp = 8 + (character.attributes.vigor.points * 2); | |
| // Class adjustments | |
| if (character.class === 'sentinela' || character.class === 'forjador') { | |
| hp += 4; // Tank classes get bonus HP | |
| } | |
| document.getElementById('hpValue').textContent = hp; | |
| // Defense calculation | |
| let defense = 10; | |
| if (character.attributes.agilidade.points >= 2) { | |
| defense += 1; | |
| } | |
| if (character.runes.includes('escudo')) { | |
| defense += 1; | |
| } | |
| document.getElementById('defenseValue').textContent = defense; | |
| // Physical damage based on Strength | |
| let physDmg = "1d4"; | |
| if (character.attributes.forca.points >= 2) { | |
| physDmg = "1d6"; | |
| } | |
| document.getElementById('physDmgValue').textContent = physDmg; | |
| // Magic damage based on Spirit | |
| let magicDmg = "1d4"; | |
| if (character.attributes.espirito.points >= 2) { | |
| magicDmg = "1d6"; | |
| } | |
| document.getElementById('magicDmgValue').textContent = magicDmg; | |
| // Magic points | |
| let mp = 5; | |
| if (character.attributes.espirito.points >= 4) { | |
| mp += 2; | |
| } | |
| document.getElementById('mpValue').textContent = mp; | |
| // Jewel effects | |
| if (character.jewels === 'rubi') { | |
| physDmg += "+1 (fogo)"; | |
| document.getElementById('physDmgValue').textContent = physDmg; | |
| } | |
| } | |
| // Save character | |
| function saveCharacter() { | |
| // Basic validation | |
| if (!character.name) { | |
| alert("Por favor, insira um nome para o personagem!"); | |
| return; | |
| } | |
| if (!character.clan) { | |
| alert("Por favor, selecione um clã!"); | |
| return; | |
| } | |
| if (!character.class) { | |
| alert("Por favor, selecione uma classe!"); | |
| return; | |
| } | |
| if (character.attributePoints > 0) { | |
| if (!confirm(`Você ainda tem ${character.attributePoints} ponto(s) de atributo não distribuído(s). Deseja continuar mesmo assim?`)) { | |
| return; | |
| } | |
| } | |
| // Update character name | |
| character.name = document.getElementById('charName').value; | |
| character.age = document.getElementById('charAge').value; | |
| character.level = parseInt(document.getElementById('charLevel').value); | |
| alert(`Personagem "${character.name}" salvo com sucesso!`); | |
| // Log character data (in a real app, you would save this to a database) | |
| console.log("Personagem salvo:", character); | |
| // Animation effect | |
| document.querySelector('button[onclick="saveCharacter()"]').classList.add('shake-effect'); | |
| setTimeout(() => { | |
| document.querySelector('button[onclick="saveCharacter()"]').classList.remove('shake-effect'); | |
| }, 500); | |
| } | |
| // Expose functions to global scope for HTML onclick handlers | |
| window.selectClan = selectClan; | |
| window.selectClass = selectClass; | |
| window.incrementAttribute = incrementAttribute; | |
| window.decrementAttribute = decrementAttribute; | |
| window.selectSkill = selectSkill; | |
| window.selectAdvantage = selectAdvantage; | |
| window.selectDisadvantage = selectDisadvantage; | |
| window.selectJewel = selectJewel; | |
| window.toggleRune = toggleRune; | |
| window.saveCharacter = saveCharacter; | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=kblock/terrunia" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |