<<if $language === "EN">><div align='center'>
<h2>Choose your Ancestry:</h2>
<table>
<tr>
<td><<button "Human">>
<<dialog>>
<<include "Human Passage">>
<div align='center'>
<<link "I choose to be a Human">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Human">>
<<set $character[1].availableAttribute += 5>>
<<dialogclose>>
<</link>>
<<link "I reject this fate">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Dwarf">>
<<dialog>>
<<include "Dwarf Passage">>
<div align='center'>
<<link "I choose to be a Dwarf">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Dwarf">>
<<set $character[1].availableExpertise += 10>>
<<dialogclose>>
<</link>>
<<link "I reject this fate">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Herald">>
<<dialog>>
<<include "Herald Passage">>
<div align='center'>
<<link "I choose to be a Herald">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Herald">>
<<dialogclose>>
<</link>>
<<link "I reject this fate">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Elf">>
<<dialog>>
<<include "Elf Passage">>
<div align='center'>
<<link "I choose to be an Elf">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Elf">>
<<dialogclose>>
<</link>>
<<link "I reject this fate">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Draconian">>
<<dialog>>
<<include "Draconian Passage">>
<div align='center'>
<<link "I choose to be a Draconian">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Draconian">>
<<dialogclose>>
<</link>>
<<link "I reject this fate">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Vanadi">>
<<dialog>>
<<include "Vanadi Passage">>
<div align='center'>
<<link "I choose to be a Vanadi">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Vanadi">>
<<dialogclose>>
<</link>>
<<link "I reject this fate">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
</tr>
</table>
</div>
<<elseif $language === "PT-BR">><<set $character[1] to "Personagem do Jogador">> <div align='center'>
<h2>Escolha sua Ancestralidade:</h2>
<table>
<tr>
<td><<button "Humano">>
<<dialog>>
<<include "Human Passage">>
<div align='center'>
<<link "Eu escolho seu Humano.">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Human">>
<<set $character[1].availableAttribute += 5>>
<<dialogclose>>
<</link>>
<<link "Eu rejeito esse destino">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Anão">>
<<dialog>>
<<include "Dwarf Passage">>
<div align='center'>
<<link "Eu escolho ser um Anão.">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Dwarf">>
<<set $character[1].availableExpertise += 10>>
<<dialogclose>>
<</link>>
<<link "Eu rejeito esse destino">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Arauto">>
<<dialog>>
<<include "Herald Passage">>
<div align='center'>
<<link "Eu escolho ser um Arauto">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Herald">>
<<dialogclose>>
<</link>>
<<link "Eu rejeito esse destino">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Elfo">>
<<dialog>>
<<include "Elf Passage">>
<div align='center'>
<<link "Eu escolho ser um Elfo">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Elf">>
<<dialogclose>>
<</link>>
<<link "Eu rejeito esse destino">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Draconian">>
<<dialog>>
<<include "Draconian Passage">>
<div align='center'>
<<link Eu escolho ser um Draconiano">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Draconian">>
<<dialogclose>>
<</link>>
<<<link "Eu rejeito esse destino">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
<td><<button "Vanadi">>
<<dialog>>
<<include "Vanadi Passage">>
<div align='center'>
<<link "Eu escolho ser um Vanadi">>
<<goto "Class and Specialization">>
<<set $character[1].Ancestry to "Vanadi">>
<<dialogclose>>
<</link>>
<<link "Eu rejeito esse destino">>
<<dialogclose>>
<</link>>
</div>
<</dialog>>
<</button>></td>
</tr>
</table>
</div>
<</if>><div align='center'>
<img src="img/others/Archer.png" style="float: left; background-color: black; padding-left: 25em; padding-right: 25em;">
<hr>
</div>
<<if $language === "EN">>
<div align='center'>
<h2>Archer</h2>
<b>The Archer is a Specialization of the Warrior Class that focuses on Ranged weapon usage, being able to finish fights before enemies can have a reaction.</b>
<i><b>Main Attribute:</b> Strength (STR)</i>
<i><b>Secondary Attribute:</b> Perception (Per)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Archer:</b> (Skill) Quick Shot.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Archer:</b> Spare Arrows: After killing a enemy with a ranged weapon, reduce the cooldown of your weapon by 1.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Warrior:</b> Weapon Mastery: Your weapons apply additional effects based on their damage type.
Blunt - Apply Confusion on the target.
Slashing - Applies Bleed for 2 turns.
Piercing - Decreases the target's defense by 5.
Firearm - Has 35% chance to deal 75% extra damage..
</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Archer:</b> Follow-up: After using an Offensive skill, deal 1d4 against a random enemy. This is affected by <b>Barbed Points</b> and <b>Dragon Piercing Arrows</b>.
If you possess a Ranged weapon with the Light trait in your offhand, make a weapon attack with that weapon, instead.
</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Archer:</b> (Skill) Triple Shot:</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Warrior:</b> Tactical Genius: Your Skills that cost three or more Action Points cost 1 point less.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Archer:</b> (Skill) Arrow Barrage: </i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Archer:</b> Barbed Points. When calculating Damage, increase the number of dices of your ranged weapons by 1. (Ex.: 1d4 to 2d4)</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Warrior:</b> Second Wind: During each combat, the first time you hit below 25% of your maximum health, heal yourself by 35% of your lost health.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Archer:</b> Dragon Piercing Arrows: When calculating Damage, increase the damage dice of your ranged weapons by 1 step. (d4 to d6, d6 to d8, d8 to d10, d10 to d12) </i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Archer:</b> Headshot: Your ranged weapon attacks have a 20% chance to execute non-Bosses or non-Undead enemies.</i></td>
</tr>
</table>
<hr>
<div align='center'>
An Archer character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Gamberson</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Shortbow</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Arqueiro</h2>
<b>O Arqueiro é uma Especialização da Classe Guerreiro que se concentra no uso de armas de longo alcance, sendo capaz de terminar combates antes que os inimigos possam reagir.</b>
<i><b>Atributo Principal:</b> Força (FOR)</i>
<i><b>Atributo Secundário:</b> Percepção (Per)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Arqueiro:</b> (Habilidade) Tiro Rápido.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Arqueiro:</b> Flechas Sobressalentes: Após matar um inimigo com uma arma de longo alcance, reduza o tempo de recarga da sua arma em 1.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Guerreiro:</b> Maestria com Armas: Suas armas aplicam efeitos adicionais com base no tipo de dano delas.
Contundente - Aplica Confusão no alvo.
Cortante - Aplica Sangramento por 2 turnos.
Perfurante - Diminui a defesa do alvo em 5.
Arma de Fogo - têm 30% de chance de causar 75% de Dano Adicional.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Arqueiro:</b> Acompanhamento: Após usar uma habilidade ofensiva, cause 1d4 de dano a um inimigo aleatório. Isso é afetado por <b>Pontos Frapadas<b> e <b>Flechas Perfurantes de Dragão</b>. Se você possuir uma arma de longo alcance com o atributo Leve em sua mão secundária, faça um ataque com essa arma, em vez disso.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Arqueiro:</b> (Habilidade) Tiro Triplo.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Guerreiro:</b> Gênio Tático: Suas Habilidades que custam três ou mais Pontos de Ação custam um ponto a menos.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Arqueiro:</b> (Habilidade) Chuva de Flechas.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Arqueiro:</b> Pontas Farpadas: Quando calculando Dano, aumente o número de dados das suas armas de longo alcance em 1. (Ex.: 1d4 para 2d4)</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Guerreiro:</b> Segundo Fôlego: Durante cada combate, na primeira vez que você atinge abaixo de 25% da sua Força Vital, você se cura em 35% da sua Força Vital perdida.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Arqueiro:</b> Flechas Perfurantes de Dragão: Quando calculando Dano, aumente o dado de dano das suas armas de longo alcance em 1 estágio. (d4 para d6, d6 para d8, d8 para d10, d10 para d12)</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Arqueiro:</b> Tiro na Cabeça: Seus ataques com armas de longo alcance têm 20% de chance de executar inimigos não-Chefes e não-Mortos-Vivos.</i></td>
</tr>
</table>
<hr>
Um personagem Arqueiro começa com:
<table>
<tr>
<td><b>Tronco:</b> <i>Gamberson</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Arco Curto</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">><div align='center'>
<h2>Assassin</h2>
<b>The Assassin is a Specialization of the Rogue Class that focuses on ending the combat without being touched.</b>
<i><b>Main Attribute:</b> Dexterity (DEX)</i>
<i><b>Secondary Attribute:</b> Strength (STR)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Assassin:</b> (Skill) Apply Venom.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Rogue:</b> Nimble Fingers: During combat, you gain 15% more Gold from defeating enemies. Additionally, you may steal from story characters (NPCs).</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Assassin:</b> Lethality: Attacks against full health targets deal 1d10 of extra damage.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Rogue:</b> Gambler: Reduce one of your test dice to a 1d4, but increase the other to a 1d10.</i></td>
</tr>
<tr>
<tr>
<td>At level 08 | <i><b>Rogue:</b> Sneaky: You start each combat <b>Hidden</b>. While hidden, your next attack deal 1d8 of extra damage.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Assassin:</b> Lethality II: Attacks against full health targets deal 1d10 extra damage and apply as much Poison.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Assassin:</b> (Skill) Poisonous Bomb.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Assassin:</b> Into the Shadows: If an attack kills an enemy, become <b>Hidden</b>.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Assassin:</b> Sure-Death: Enemies no longer loses stacks of Poison.</i></td>
</tr>
</table>
<hr>
<div align='center'>
An Assassin character starts with:
<table>
<tr>
<td><b>Torso:</b><i>Leather armor</i></td>
<td><b>Legs:</b><i>Pants</i></td>
<td><b>Main Hand:</b><i>Crossbow</i></td>
<td><b>Off-Hand:</b><i>Wooden Shield</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Assassino</h2>
<b>O Assassino é uma Especialização da Classe Ladino que se concentra em encerrar o combate sem ser tocado.</b>
<i><b>Atributo Principal:</b> Destreza (DEX)</i>
<i><b>Atributo Secundário:</b> Força (FOR)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Assassino:</b> (Habilidade) Aplicar Veneno.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Ladino:</b> Dedos Ágeis: Durante o combate, você ganha 15% mais Ouro ao derrotar inimigos. Além disso, você pode roubar de personagens da história (NPCs).</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Assassino:</b> Letalidade: Ataques contra alvos com saúde total causam 1d10 de Dano extra.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Ladino:</b> Apostador: Reduza um dos seus dados de teste para 1d4, mas aumente o outro para 1d10.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Ladino:</b> Furtivo: Você começa cada combate <b>Escondido</b>. Enquanto estiver escondido, seu próximo ataque causa 1d8 de dano extra.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Assassino:</b> Letalidade II: Ataques contra alvos com saúde total causam 1d10 de dano extra e aplicam tanto <b>Veneno</b></i>.</td>
</tr>
<tr>
<td>No nível 13 | <i><b>Assassino:</b> (Habilidade) Bomba Venenosa.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Assassino:</b> Nas Sombras: Se um ataque matar um inimigo, fique <b>Escondido</b>.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Assassino:</b> Morte Certa: Inimigos não perdem mais acumulações de <b>Veneno</b>.</i></td>
</tr>
</table>
<hr>
Um personagem Assassino começa com:
<table>
<tr>
<td><b>Tronco:</b><i>Armadura de Couro</i></td>
<td><b>Pernas:</b><i>Calças</i></td>
<td><b>Mão Principal:</b><i>Balestra</i></td>
<td><b>Mão Secundária:</b><i>Escudo de Madeira</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">><div align='center'>
<h2>Bard</h2>
<b>The Bard is a Specialization of the Artist Class that not only allows the player to inspire new ways to resolve problems but as well as improving their standing at combat trials.</b>
<i><b>Main Attribute:</b> Charisma (CHA)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Bard:</b> Wide Range: Gain the skills "Earworm", "Crescendo" and "Healing Song".
Additionally, you may use Arts to World Knowledge tests.</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Bard:</b>Well-versed: Add a Spell of your choice to your Repertoire, whenever you learn a new Ballad, reduce the time taken to 2 hours.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Artist:</b> Trustworthy Instrument: While equipped with an Instrument, mark it as Esoteric. Additionally, you gain +5 to Art tests</i></td>
</tr>
<td>At level 07 | <i><b>Bard:</b> Double Time: When attacking with a Improved Attack, reduce all skill cooldowns by 1.</i></td>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Bard:</b> Legendary Performace: Increase your Art expertise by 10, then increase your Essence by your Art expertise.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Artist:</b> Winning Smile: When making a test and the result would be lower than 10, add 1/3 of your Charisma to the resut.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Bard:</b> Triple Time: When making Improved Attacks, make an additional attack, this extra attack deals only 50% of its Damage.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Bard:</b> Magnum Opus: Your buffs and debuffs last and additional turn and heal yourself by the duration.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Bard character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Waist:</b> <i>Belt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Short sword</i></td>
<td><b>Offhand:</b> <i>Lute</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2> Bardo </h2>
<b>Bardo é uma Especialização da Classe Artista que não apenas permite ao jogador inspirar novas formas de resolver problemas, mas também melhora sua posição nos testes de combate.</b>
<i><b>Atributo Principal:</b> Carisma (CAR)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Bardo:</b> Amplo Alcance: Obtenha as habilidades "Earworm", "Crescendo" e "Healing Song".</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Bardo:</b> Bem-Versado: Adicione uma Magia de sua escolha ao seu Repertório, sempre que aprender uma nova Balada, reduza o tempo necessário para 2 horas.
Adicionalmente, você pode usar Artes para testes de Conhecimento do Mundo.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Artista:</b> Instrumento Confiável: Ao equipar um Instrumento, marque-o como Esotérico. Além disso, você ganha +5 em testes de Arte.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Bardo:</b> Tempo Duplo: Ao atacar com um Ataque Melhorado, reduza todos os tempos de recarga de habilidades em 1.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Bardo:</b> Performance Lendária: Aumente sua perícia em Arte em 10, em seguida, aumente sua Essência pela sua perícia em Arte.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Artista:</b> Sorriso Vencedor: Ao fazer um teste e o resultado seria inferior a 10, adicione 1/3 do seu Carisma ao resultado.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Bardo:</b> Tempo Triplo: Ao realizar Ataques Melhorados realize um ataque adicional, esse ataque extra causa apenas 50% de seu Dano.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Bardo:</b> Magnum Opus: Seus Buffs e Debuffs duram um turno adicional e você se cura pela duração.</i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Bardo começa com:
<ul>
<li><b>Torso:</b> <i>Camisa de Lã</i></li>
<li><b>Cintura:</b> <i>Cinto</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Espada Curta</i></li>
<li><b>Mão Secundária:</b> <i>Lira</i></li>
</ul>
</div>
<hr>
</div>
<</if>>
<<if $language === "EN">><div align='center'>
<h2>Berserker</h2>
<b>The Berserker is a Specialization of the Barbarian Class that focuses on distilling as much damage as it can withhold, or even more.</b>
<i><b>Main Attribute:</b> Resilience (RES)</i>
<i><b>Secondary Attribute:</b> Strenght (STR)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Berserker</b> Though Skin: When under 50% of your health, reduce all damage taken by 3. At level 5, 10 and 15, increase this value by 2.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Berserker</b> (Skill) War Cry.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Berserker</b> (Skill) Cleave.</i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Barbarian</b> Champion's Might: Add half of your resilience to your Damage and to your Athletics.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Berserker</b> Bloodthirst: You weapon attacks deal additional damage equal to 5% of the target's current Lifeblood. If they have the Visceral trait, increase the damage to 7%.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Berserker</b> Overwhelming Strength: When you make an attack and misses, damage the target by 1/3 of the Damage.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Barbarian:</b>Unending Vigor: At the start of each turn, regain 3% of your missing Lifeblood.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Berserker</b> (Skill) Feel the Pain.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Bereseker</b> Unyelding: When you would be killed by an attack, make a weapon attack, if you kill your attacker, recover 15% of your missing life. Can only happen once per battle.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
A Berserker character starts with:
<table>
<tr>
<td><b>Waist:</b> <i>Belted Skirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main Hand:</b> <i>Great Axe</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Berserker</h2>
<b>O Berserker é uma Especialização da Classe Bárbaro que se concentra em destilar o máximo de dano que pode suportar, ou até mais.</b>
<i><b>Atributo Principal:</b> Resiliência (RES)</i>
<i><b>Atributo Secundário:</b> Força (FOR)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Berserker</b> Pele Grossa: Quando estiver com menos de 50% da sua vida, reduza todo o dano recebido em 3. Nos níveis 5, 10 e 15, aumente esse valor em 2.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Berserker</b> (Habilidade) Grito de Guerra.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Berserker</b> (Habilidade) Cutilada.</i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Bárbaro</b> Poder do Campeão: Adicione metade da sua resiliência ao seu Dano e à sua Atletismo.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Berserker</b> Sede de Sangue: Seus ataques armados causam dano adicional igual a 5% da Força Vital atual do alvo. Caso sua arma possua o traço Visceral, aumente o dano para 7%.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Berserker</b> Força Avassaladora: Quando você faz um ataque e erra, cause dano ao alvo igual a 1/3 do dano.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Bárbaro</b> Vigor Infinito: No início de cada turno, recupere 3% de sua Força Vital perdida.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Berserker</b> (Habilidade) Sinta a Dor.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Bereseker</b> Inabalável: Quando você seria morto por um ataque, faça um ataque, se matar seu atacante, recupere 15% da sua vida perdida. Só pode acontecer uma vez por batalha.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
</table>
<hr>
Um personagem Berserker começa com:
<ul>
<li><b>Cintura:</b> <i>Saia com cinto</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Machado Grande</i></li>
</ul>
<hr>
</div>
<</if>><<if $language === "EN">>
<div align='center'>
<<link "I have made a mistake">>
<<set $character[1].traits=[]>>
<<goto $return>>
<</link>>
<hr>
<div style="display: flex; justify-content: space-between;">
<div style="width: 30%; margin-right: 20px;">
<!-- Left side nav for attributes -->
<div>
<h2>Attributes:</h2>
<table>
<tr>
<td> <abbr title="Affects hit chance for Melee weapons, as well as damage on Heavy or Versatile weapons.">STRENGTH:</abbr></td>
<td><span id="current-attr-STR"><<print $character[1].STR>></span> </td>
</tr>
<tr>
<td> <abbr title="Affects hit chance for Melee weapons, as well as damage on Agile or Versatile weapons.">DEXTERITY:</abbr> </td>
<td><span id="current-attr-DEX"><<print $character[1].DEX>></span></td>
</tr>
<tr>
<td> <abbr title="Affects only your Lifeblood (Life).">RESILIENCE:</abbr> </td>
<td><span id="current-attr-RES"><<print $character[1].RES>></span> </td>
</tr>
<tr>
<td> <abbr title="Mainly used for its expertises, it also affects your Essence (Mana) and the majority of abilities.">INTELLIGENCE:</abbr></td>
<td><span id="current-attr-INT"><<print $character[1].INT>></span> </td>
</tr>
<tr>
<td> <abbr title="Mainly used for its expertise, it also affects some abilities and bargaining.">CHARISMA:</abbr> </td>
<td><span id="current-attr-CHA"><<print $character[1].CHA>></span> </td>
</tr>
<tr>
<td> <abbr title="Affects hitchance for Ranged weapons, as well as some abilities.">PERCEPTION:</abbr></td>
<td><span id="current-attr-PER"><<print $character[1].PER>></span> </td>
</tr>
</table>
</div>
</div>
<div style="width: 30%; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<table>
<tr>
<td>
<<button "Increase Strength">>
<<if ($character[1].availableAttribute >= 1 && $character[1].STR < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].STR += 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Dexterity">>
<<if ($character[1].availableAttribute >= 1 && $character[1].DEX < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].DEX += 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Resilience">>
<<if ($character[1].availableAttribute >= 1 && $character[1].RES < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].RES += 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Intelligence">>
<<if ($character[1].availableAttribute >= 1 && $character[1].INT < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].INT += 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Charisma">>
<<if ($character[1].availableAttribute >= 1 && $character[1].CHA < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].CHA += 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<</if>><</button>>
</td>
<td>
<<button "Increase Perception">>
<<if ($character[1].availableAttribute >= 1 && $character[1].PER < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].PER += 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Decrease Strength">>
<<if $character[1].STR > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].STR -= 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Dexterity">>
<<if $character[1].DEX > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].DEX -= 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Resilience">>
<<if $character[1].RES > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].RES -= 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Intelligence">>
<<if $character[1].INT > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].INT -= 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Charisma">>
<<if $character[1].CHA > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].CHA -= 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Perception">>
<<if $character[1].PER > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].PER -= 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
</table>
<hr>
</div>
<div style="width: 30%; margin-left: 30px;">
<div>
<h2>Expertises:</h2>
<table>
<tr>
<td>Athletics:</td>
<td><span id="current-expertise-Athletics"><<print $character[1].Athletics>></span></td>
</tr>
<tr>
<td>Acrobatics:</td>
<td><span id="current-expertise-Acrobatics"><<print $character[1].Acrobatics>></span></td>
</tr>
<tr>
<td>Stealth: </td>
<td><span id="current-expertise-Stealth"><<print $character[1].Stealth>></span ></td>
</tr>
<tr>
<td>Sleight of Hands:</td>
<td><span id="current-expertise-SleightofHands"><<print $character[1].SleightofHands>></span> </td>
</tr>
<tr>
<td>World Knowledge:</td>
<td><span id="current-expertise-WorldKnowledge"><<print $character[1].WorldKnowledge>></span> </td>
</tr>
<tr>
<td>Mystical Knowledge:</td>
<td><span id="current-expertise-MysticalKnowledge"><<print $character[1].MysticalKnowledge>></span></td>
</tr>
<tr>
<td>Arcane Knowledge:</td>
<td><span id="current-expertise-ArcaneKnowledge"><<print $character[1].ArcaneKnowledge>></span></td>
</tr>
<tr>
<td>Speech:</td>
<td><span id="current-expertise-Speech"><<print $character[1].Speech>></span></td>
</tr>
<tr>
<td>Arts:</td>
<td><span id="current-expertise-Arts"><<print $character[1].Arts>></span></td>
</tr>
<tr>
<td>Intimidation:</td>
<td><span id="current-expertise-Intimidation"><<print $character[1].Intimidation>></span></td>
</tr>
<tr>
<td>Insight: </td>
<td><span id="current-expertise-Insight"><<print $character[1].Insight>></span></td>
</tr>
<tr>
<td>Awareness: </td>
<td><span id="current-expertise-Awareness"><<print $character[1].Awareness>></span></td>
</tr>
</table></div> </div></div>
<hr>
<table>
<tr>
<td>
You have <span id="current-avlb-attr"><<print $character[1].availableAttribute>></span> Points remaining for your Attributes
</td>
<td>
<i>1-4 weak | 5-9 ordinary | 10-14 strong | 15-20 Legendary</i>
</td>
<td>
You have <span id="current-avlb-exp"><<print $character[1].availableExpertise>></span> Points remaining for your Expertises.
</td>
</tr>
</table>
<hr>
<hr>
<table>
<tr>
<td>
<<button "Increase Athletics">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Athletics < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Athletics += 1>>
<<replace "#current-expertise-Athletics">><<print $character[1].Athletics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Acrobatics">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Acrobatics < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Acrobatics += 1>>
<<replace "#current-expertise-Acrobatics">><<print $character[1].Acrobatics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Stealth">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Stealth < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Stealth += 1>>
<<replace "#current-expertise-Stealth">><<print $character[1].Stealth>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Sleight of Hands">>
<<if ($character[1].availableExpertise >= 1 && $character[1].SleightofHands < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].SleightofHands += 1>>
<<replace "#current-expertise-SleightofHands">><<print $character[1].SleightofHands>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase World Knowledge">>
<<if ($character[1].availableExpertise >= 1 && $character[1].WorldKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].WorldKnowledge += 1>>
<<replace "#current-expertise-WorldKnowledge">><<print $character[1].WorldKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Mystical Knowledge">>
<<if ($character[1].availableExpertise >= 1 && $character[1].MysticalKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].MysticalKnowledge += 1>>
<<replace "#current-expertise-MysticalKnowledge">><<print $character[1].MysticalKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Arcane Knowledge">>
<<if ($character[1].availableExpertise >= 1 && $character[1].ArcaneKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].ArcaneKnowledge += 1>>
<<replace "#current-expertise-ArcaneKnowledge">><<print $character[1].ArcaneKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Speech">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Speech < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Speech += 1>>
<<replace "#current-expertise-Speech">><<print $character[1].Speech>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<</if>><</button>>
</td>
<td>
<<button "Increase Arts">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Arts < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Arts += 1>>
<<replace "#current-expertise-Arts">><<print $character[1].Arts>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Intimidation">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Intimidation < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Intimidation += 1>>
<<replace "#current-expertise-Intimidation">><<print $character[1].Intimidation>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Insight">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Insight < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Insight += 1>>
<<replace "#current-expertise-Insight">><<print $character[1].Insight>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Increase Awareness">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Awareness < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Awareness += 1>>
<<replace "#current-expertise-Awareness">><<print $character[1].Awareness>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Decrease Athletics">>
<<if $character[1].Athletics > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Athletics -= 1>>
<<replace "#current-expertise-Athletics">><<print $character[1].Athletics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Acrobatics">>
<<if $character[1].Acrobatics > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Acrobatics -= 1>>
<<replace "#current-expertise-Acrobatics">><<print $character[1].Acrobatics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Stealth">>
<<if $character[1].Stealth > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Stealth -= 1>>
<<replace "#current-expertise-Stealth">><<print $character[1].Stealth>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Sleight of Hands">>
<<if $character[1].SleightofHands > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].SleightofHands -= 1>>
<<replace "#current-expertise-SleightofHands">><<print $character[1].SleightofHands>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease World Knowledge">>
<<if $character[1].WorldKnowledge > 1 >>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].WorldKnowledge -= 1>>
<<replace "#current-expertise-WorldKnowledge">><<print $character[1].WorldKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Mystical Knowledge">>
<<if $character[1].MysticalKnowledge > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].MysticalKnowledge -= 1>>
<<replace "#current-expertise-MysticalKnowledge">><<print $character[1].MysticalKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Arcane Knowledge">>
<<if $character[1].ArcaneKnowledge > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].ArcaneKnowledge -= 1>>
<<replace "#current-expertise-ArcaneKnowledge">><<print $character[1].ArcaneKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Speech">>
<<if $character[1].Speech > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Speech -= 1>>
<<replace "#current-expertise-Speech">><<print $character[1].Speech>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Arts">>
<<if $character[1].Speech > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Arts -= 1>>
<<replace "#current-expertise-Arts">><<print $character[1].Arts>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Intimidation">>
<<if $character[1].Intimidation > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Intimidation -= 1>>
<<replace "#current-expertise-Intimidation">><<print $character[1].Intimidation>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Insight">>
<<if $character[1].Insight > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Insight -= 1>>
<<replace "#current-expertise-Insight">><<print $character[1].Insight>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Awareness">>
<<if $character[1].Awareness > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Awareness -= 1>>
<<replace "#current-expertise-Awareness">><<print $character[1].Awareness>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
</table>
<hr>
[[Let us proceed|Class and Specialization]]
</div>
<<elseif $language === "PT-BR">>
<div align='center'>
<<link "Cometi um erro">>
<<set $character[1].traits=[]>>
<<goto $return>>
<</link>>
<hr><div style="display: flex; justify-content: space-between;">
<div style="width: 30%; margin-right: 20px;">
<div>
<h2>Atributos:</h2>
<table>
<tr>
<td> <abbr title="Afeta a chance de acerto para armas corpo a corpo, bem como o dano em armas pesadas ou versáteis.">FORÇA:</abbr> </td>
<td><span id="current-attr-STR"><<print $character[1].STR>></span></td>
</tr>
<tr>
<td> <abbr title="Afeta a chance de acerto para armas corpo a corpo, bem como o dano em armas ágeis ou versáteis.">DESTREZA:</abbr></td><td><span id="current-attr-DEX"><<print $character[1].DEX>></span></td>
</tr>
<tr>
<td> <abbr title="Afeta apenas a sua Vitalidade (Vida).">RESISTÊNCIA:</abbr> </td><td><span id="current-attr-RES"><<print $character[1].RES>></span> </td>
</tr>
<tr>
<td> <abbr title="Principalmente usado por suas especializações, também afeta sua Essência (Mana) e a maioria das habilidades.">INTELIGÊNCIA:</abbr> </td><td><span id="current-attr-INT"><<print $character[1].INT>></span> </td>
</tr>
<tr>
<td> <abbr title="Principalmente usado por suas especializações, também afeta algumas habilidades.">CARISMA:</abbr> </td><td><span id="current-attr-CHA"><<print $character[1].CHA>></span> </td>
</tr>
<tr>
<td> <abbr title="Afeta a chance de acerto para armas de longo alcance, bem como algumas habilidades.">PERCEPÇÃO:</abbr> </td><td><span id="current-attr-PER"><<print $character[1].PER>></span> </td></tr>
</table>
</div>
</div>
<div style="width: 30%; display: flex; flex-direction: column; justify-content: center; align-items: center;">
<table>
<tr>
<td>
<<button "Aumentar Força">>
<<if ($character[1].availableAttribute >= 1 && $character[1].STR < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].STR += 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Destreza">>
<<if ($character[1].availableAttribute >= 1 && $character[1].DEX < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].DEX += 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Resiliência">>
<<if ($character[1].availableAttribute >= 1 && $character[1].RES < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].RES += 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Inteligência">>
<<if ($character[1].availableAttribute >= 1 && $character[1].INT < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].INT += 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Carisma">>
<<if ($character[1].availableAttribute >= 1 && $character[1].CHA < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].CHA += 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Percepção">>
<<if ($character[1].availableAttribute >= 1 && $character[1].PER < 14)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].PER += 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Diminuir Força">>
<<if $character[1].STR > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].STR -= 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Destreza">>
<<if $character[1].DEX > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].DEX -= 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Resiliência">>
<<if $character[1].RES > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].RES -= 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Inteligência">>
<<if $character[1].INT > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].INT -= 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Carisma">>
<<if $character[1].CHA > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].CHA -= 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Percepção">>
<<if $character[1].PER > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].PER -= 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
</table>
<hr>
</div>
<div style="width: 30%; margin-left: 30px;">
<div>
<h2>Perícias:</h2>
<table>
<tr>
<td>Atletismo:</td>
<td><span id="current-expertise-Athletics"><<print $character[1].Athletics>></span></td>
</tr>
<tr>
<td>Acrobacia:</td>
<td><span id="current-expertise-Acrobatics"><<print $character[1].Acrobatics>></span></td>
</tr>
<tr>
<td>Furtividade: </td>
<td><span id="current-expertise-Stealth"><<print $character[1].Stealth>></span ></td>
</tr>
<tr>
<td>Truque de Mãos:</td>
<td><span id="current-expertise-SleightofHands"><<print $character[1].SleightofHands>></span> </td>
</tr>
<tr>
<td>Conhecimento do Mundo:</td>
<td><span id="current-expertise-WorldKnowledge"><<print $character[1].WorldKnowledge>></span> </td>
</tr>
<tr>
<td>Conhecimento Místico:</td>
<td><span id="current-expertise-MysticalKnowledge"><<print $character[1].MysticalKnowledge>></span></td>
</tr>
<tr>
<td>Conhecimento Arcano:</td>
<td><span id="current-expertise-ArcaneKnowledge"><<print $character[1].ArcaneKnowledge>></span></td>
</tr>
<tr>
<td>Fala:</td>
<td><span id="current-expertise-Speech"><<print $character[1].Speech>></span></td>
</tr>
<tr>
<td>Artes:</td>
<td><span id="current-expertise-Arts"><<print $character[1].Arts>></span></td>
</tr>
<tr>
<td>Intimidação:</td>
<td><span id="current-expertise-Intimidation"><<print $character[1].Intimidation>></span></td>
</tr>
<tr>
<td>Discernimento: </td>
<td><span id="current-expertise-Insight"><<print $character[1].Insight>></span></td>
</tr>
<tr>
<td>Conciência: </td>
<td><span id="current-expertise-Awareness"><<print $character[1].Awareness>></span></td>
</tr>
</table>
</div>
</div>
</div>
<hr>
<table>
<tr>
<td>
Você tem <span id="current-avlb-attr"><<print $character[1].availableAttribute>></span> pontos de Atribitos restantes.
</td>
<td><i>1-4 fraco | 5-9 comum | 10-14 forte | 15-20 lendário</i></td>
<td>
Você tem <span id="current-avlb-exp"><<print $character[1].availableExpertise>></span> pontos de Perícias restantes.
</td>
</tr>
</table>
<hr>
<table>
<tr>
<td>
<<button "Aumentar Atletismo">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Athletics < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Athletics += 1>>
<<replace "#current-expertise-Athletics">><<print $character[1].Athletics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Acrobacia">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Acrobatics < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Acrobatics += 1>>
<<replace "#current-expertise-Acrobatics">><<print $character[1].Acrobatics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Furtividade">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Stealth < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Stealth += 1>>
<<replace "#current-expertise-Stealth">><<print $character[1].Stealth>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Truque de Mãos">>
<<if ($character[1].availableExpertise >= 1 && $character[1].SleightofHands < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].SleightofHands += 1>>
<<replace "#current-expertise-SleightofHands">><<print $character[1].SleightofHands>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Conhecimento do Mundo">>
<<if ($character[1].availableExpertise >= 1 && $character[1].WorldKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].WorldKnowledge += 1>>
<<replace "#current-expertise-WorldKnowledge">><<print $character[1].WorldKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td><td>
<<button "Aumentar Conhecimento Místico">>
<<if ($character[1].availableExpertise >= 1 && $character[1].MysticalKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].MysticalKnowledge += 1>>
<<replace "#current-expertise-MysticalKnowledge">><<print $character[1].MysticalKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Conhecimento Arcano">>
<<if ($character[1].availableExpertise >= 1 && $character[1].ArcaneKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].ArcaneKnowledge += 1>>
<<replace "#current-expertise-ArcaneKnowledge">><<print $character[1].ArcaneKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Fala">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Speech < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Speech += 1>>
<<replace "#current-expertise-Speech">><<print $character[1].Speech>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Artes">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Arts < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Arts += 1>>
<<replace "#current-expertise-Arts">><<print $character[1].Arts>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Intimidação">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Intimidation < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Intimidation += 1>>
<<replace "#current-expertise-Intimidation">><<print $character[1].Intimidation>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Dicernimento">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Insight < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Insight += 1>>
<<replace "#current-expertise-Insight">><<print $character[1].Insight>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Aumentar Conciência">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Awareness < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Awareness += 1>>
<<replace "#current-expertise-Awareness">><<print $character[1].Awareness>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Diminuir Atletismo">>
<<if $character[1].Athletics > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Athletics -= 1>>
<<replace "#current-expertise-Athletics">><<print $character[1].Athletics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Acrobacia">>
<<if $character[1].Acrobatics > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Acrobatics -= 1>>
<<replace "#current-expertise-Acrobatics">><<print $character[1].Acrobatics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Furtividade">>
<<if $character[1].Stealth > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Stealth -= 1>>
<<replace "#current-expertise-Stealth">><<print $character[1].Stealth>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Truque de Mãos">>
<<if $character[1].SleightofHands > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].SleightofHands -= 1>>
<<replace "#current-expertise-SleightofHands">><<print $character[1].SleightofHands>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Conhecimento do Mundo">>
<<if $character[1].WorldKnowledge > 1 >>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].WorldKnowledge -= 1>>
<<replace "#current-expertise-WorldKnowledge">><<print $character[1].WorldKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Conhecimento Místico">>
<<if $character[1].MysticalKnowledge > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].MysticalKnowledge -= 1>>
<<replace "#current-expertise-MysticalKnowledge">><<print $character[1].MysticalKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Conhecimento Arcano">>
<<if $character[1].ArcaneKnowledge > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].ArcaneKnowledge -= 1>>
<<replace "#current-expertise-ArcaneKnowledge">><<print $character[1].ArcaneKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Fala">>
<<if $character[1].Speech > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Speech -= 1>>
<<replace "#current-expertise-Speech">><<print $character[1].Speech>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td><td>
<<button "Diminir Artes">>
<<if $character[1].Speech > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Arts -= 1>>
<<replace "#current-expertise-Arts">><<print $character[1].Arts>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Intimidação">>
<<if $character[1].Intimidation > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Intimidation -= 1>>
<<replace "#current-expertise-Intimidation">><<print $character[1].Intimidation>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Dicernimento">>
<<if $character[1].Insight > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Insight -= 1>>
<<replace "#current-expertise-Insight">><<print $character[1].Insight>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Diminuir Conciência">>
<<if $character[1].Awareness > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Awareness -= 1>>
<<replace "#current-expertise-Awareness">><<print $character[1].Awareness>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
</table>
<hr>
[[Vamos proceder|Class and Specialization]]
</div>
<</if>><<script>>
setTimeout(window.updateCharPage,0)
<</script>>
<div align='center'>
<<if $language is "EN">> <p> [[Inventory]] | [[Jornal]]</p> <<elseif $language is "PT-BR">> <p> [[Inventário|Inventory]] | [[Jornal]]</p><</if>>
</div>
<div id="Charpage">
| <h2>Character's Page:</h2> |
<p><b>Name</b> <<print $character[1].Name>> <b>Class Specialization:</b> <<print $character[1].Specialization>></p>
<b>Ancestry:</b> <<print $character[1].Ancestry>>
<p><b>Lifeblood:</b> <<print $character[1].currentLife>> | <<print $character[1].MAXLIFE>> <b>Essence:</b> <<print $character[1].currentMana>> | <<print $character[1].MAXMANA>></p>
<p><b>Current Experience:</b> <<print $character[1].experience>> / <<print $xpToLevelUp>> | <b>Level:</b><<print $character[1].level>>.</p>
<<if $character[1].experience >= $xpToLevelUp>>
<<button "Level Up">>
<<set $character[1].level += 1>>
<<set $xpToLevelUp += Math.round($xpToLevelUp * 1.5)>>
<<set $character[1].availableAttribute += 3>>
<<if $character[1].traits.includes("Unlimited Potential")>>
<<set $character[1].availableExpertise += 4>>
<<else>>
<<set $character[1].availableExpertise += 3>>
<</if>>
<<goto "level up passage">>
<</button>>
<</if>>
<b>Traits:</b> <<print $character[1].traits.join(", ")>>
<b>Skills:</b>
<p><<button "Show Skills">>
<<replace "#skillsContainer">>
<ul>
<<for _i to 0; _i lt $character[1].skills.length; _i++>>
<<set _skill = $character[1].skills[_i]>>
<li><b>Name:</b> <<print _skill.name>><br>
<b>Categories:</b> <<print _skill.categories.join(", ")>><br>
<b>Description:</b> <<print _skill.description>><br>
<b>AP Cost:</b> <<print _skill.APCost>> | <b>Mana Cost:</b> <<print _skill.Manacost>><br>
<b>Cooldown:</b> <<print _skill.cooldown>> turns<br></li>
<</for>>
</ul>
<</replace>>
<</button>> | <<button "Hide Skills">>
<<replace "#skillsContainer">>
<!-- Replace with an empty container, effectively hiding the skills -->
<</replace>>
<</button>></p>
<span id="skillsContainer">
</span>
<nobr>
<div align='center'>
<h3>Equipment</h3>
<table>
<tr>
<td></td>
<td><b>Head:</b> <<print $character[1].equipment.head.Name>></td>
<td></td>
</tr>
<tr>
<td></td>
<td><b>Torso:</b> <<print $character[1].equipment.torso.Name>></td>
<td></td>
</tr>
<tr>
<td><b>Main hand:</b> <<print $character[1].equipment.mainhand.Name>></td>
<td><b>Waist:</b> <<print $character[1].equipment.waist.Name>></td>
<td><b>Offhand:</b> <<print $character[1].equipment.offhand.Name>></td>
</tr>
<tr>
<td></td>
<td><b>Legs:</b> <<print $character[1].equipment.legs.Name>></td>
<td></td>
</tr>
<tr>
<td></td>
<td><b>Feet:</b> <<print $character[1].equipment.feet.Name>></td>
<td></td>
</tr>
</table>
<hr>
<h3>Attributes:</h3>
<hr>
<table>
<tr>
<td> STRENGTH: </td>
<td> DEXTERITY: </td>
<td> RESILIENCE: </td>
<td> INTELLIGENCE: </td>
<td> CHARISMA: </td>
<td> PERCEPTION: </td>
</tr>
<tr>
<td><span id="current-attr-STR"><<print $character[1].STR>></span> </td>
<td><span id="current-attr-DEX"><<print $character[1].DEX>></span></td>
<td><span id="current-attr-RES"><<print $character[1].RES>></span> </td>
<td><span id="current-attr-INT"><<print $character[1].INT>></span> </td>
<td><span id="current-attr-CHA"><<print $character[1].CHA>></span> </td>
<td><span id="current-attr-PER"><<print $character[1].PER>></span> </td>
</tr>
</table>
</div>
<hr>
<div align='center'>
<h3>Expertises:</h3>
<hr>
<table>
<tr>
<td>Athletics:</td>
<td>Acrobatics:</td>
<td>Stealth: </td>
<td>Sleight of Hands:</td>
<td>World Knowledge:</td>
<td>Mystical Knowledge:</td>
<td>Arcane Knowledge:</td>
<td>Speech:</td>
<td>Arts:</td>
<td>Intimidation:</td>
<td>Insight: </td>
<td>Awareness: </td>
</tr>
<tr>
<td><span id="current-expertise-Athletics"><<print $character[1].Athletics>></span></td>
<td><span id="current-expertise-Acrobatics"><<print $character[1].Acrobatics>></span></td>
<td><span id="current-expertise-Stealth"><<print $character[1].Stealth>></span ></td>
<td><span id="current-expertise-SleightofHands"><<print $character[1].SleightofHands>></span> </td>
<td><span id="current-expertise-WorldKnowledge"><<print $character[1].WorldKnowledge>></span> </td>
<td><span id="current-expertise-MysticalKnowledge"><<print $character[1].MysticalKnowledge>></span></td>
<td><span id="current-expertise-ArcaneKnowledge"><<print $character[1].ArcaneKnowledge>></span></td>
<td><span id="current-expertise-Speech"><<print $character[1].Speech>></span></td>
<td><span id="current-expertise-Arts"><<print $character[1].Arts>></span></td>
<td><span id="current-expertise-Intimidation"><<print $character[1].Intimidation>></span></td>
<td><span id="current-expertise-Insight"><<print $character[1].Insight>></span></td>
<td><span id="current-expertise-Awareness"><<print $character[1].Awareness>></span></td>
</tr>
</table>
</div>
</nobr>
</div>
<hr>
<div align='center'>
<p>[[Inventory]] | [[Jornal]]</p>
</div>Human Thief
Dwarf Vanguard
Elf Cleric
Herald Wizard
Draconian Feral
Vanadi Dancer<style>
.class-container {
display: grid;
grid-template-columns: repeat(6, 1fr);
text-align: center;
}
.grid-header {
grid-column: span 6;
}
.custom-table {
width: 100%;
border-collapse: collapse;
}
.grid-item {
padding: 10px;
border: 1px solid #000;
}
div.align-center {
text-align: center;
}
.warrior-header {
background-color: #8B0000; /* Dark Red */
}
.rogue-header {
background-color: #333333; /* Dark Gray */
color: #ffffff; /* White text on dark background */
}
.barbarian-header {
background-color: #4B4B00; /* Dark Moss Green */
}
.mage-header {
background-color: #00008B; /* Dark Blue (Azure) */
}
.artist-header {
background-color: #8B008B; /* Dark Violet */
}
.devotee-header {
background-color: #8B8B00; /* Dark Yellow (Light Yellow) */
}
</style>
<<set $character[1].Oath = "">>
<<set $character[1].Pact = "">>
<<if $language === "EN">>
<div class="grid-container" align='center'>
<div class="grid-header"><h3>Classes and Specializations:</h3></div>
<table class="custom-table">
<thead>
<tr>
<th><div class="grid-header warrior-header">Warrior:</div></th>
<th><div class="grid-header rogue-header">Rogue</div></th>
<th><div class="grid-header barbarian-header">Barbarian</div></th>
<th><div class="grid-header mage-header">Mage</div></th>
<th><div class="grid-header artist-header">Artist</div></th>
<th><div class="grid-header devotee-header">Devotee</div></th>
</tr>
</thead>
<tbody>
<tr>
<td><div class="grid-item"><nobr><b>Starting skills:</b>
<i>Intimidate</i>
<i>Dodge</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Starting skills:</b>
<i>Sneak</i>
<i>True Strike</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Starting skills:</b>
<i>Rend</i>
<i>Headbutt</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Starting skills:</b>
<i>Dazzle</i>
<i>Infuse Weapon</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Starting skills:</b>
<i>Inspire</i>
<i>BOOM!</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Starting skills:</b>
<i>Prayer</i>
<i>Sacred Flame</i></nobr></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Vanguard">><<dialog>><<include "Vanguard">><div align="center"><<link "I shall become a Vanguard">><<set $character[1].Specialization to "Vanguard">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Assassin">><<dialog>><<include "Assassin">><div align="center"><<link "I shall become an Asssassin">><<set $character[1].Specialization to "Assassin">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Juggernaut">><<dialog>><<include "Juggernaut">><div align="center"><<link "I shall become a Juggernaut">><<set $character[1].Specialization to "Juggernaut">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Wizard">><<dialog>><<include "Wizard">><div align="center"><<link "I shall become a Wizard">><<set $character[1].Specialization to "Wizard">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Dancer">><<dialog>><<include "Dancer">><div align="center"><<link "I shall become a Dancer">><<set $character[1].Specialization to "Dancer">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Paladin">><<dialog>><<include "Paladin">><div align="center"><<link "I shall become a Paladin">><<set $character[1].Specialization to "Paladin">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Archer">><<dialog>><<include "Archer">><div align="center"><<link "I shall become an Archer">><<set $character[1].Specialization to "Archer">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Thief">><<dialog>><<include "Thief">><div align="center"><<link "I shall become a Thief">><<set $character[1].Specialization to "Thief">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Berserker">><<dialog>><<include "Berserker">><div align="center"><<link "I shall become a Berserker">><<set $character[1].Specialization to "Berserker">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Warlock">><<dialog>><<include "Warlock">><div align="center"><<link "I shall become a Warlock">><<set $character[1].Specialization to "Warlock">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Bard">><<dialog>><<include "Bard">><div align="center"><<link "I shall become a Bard">><<set $character[1].Specialization to "Bard">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Cleric">><<dialog>><<include "Cleric">><div align="center"><<link "I shall become a Cleric">><<set $character[1].Specialization to "Cleric">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Duelist">><<dialog>><<include "Duelist">><div align="center"><<link "I shall become a Duelist">><<set $character[1].Specialization to "Duelist">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Spy">><<dialog>><<include "Spy">><div align="center"><<link "I shall become a Spy">><<set $character[1].Specialization to "Spy">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Feral">><<dialog>><<include "Feral">><div align="center"><<link "I shall become a Feral">><<set $character[1].Specialization to "Feral">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Invoker">><<dialog>><<include "Invoker">><div align="center"><<link "I shall become a Invoker">><<set $character[1].Specialization to "Invoker">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Scholar">><<dialog>><<include "Scholar">><div align="center"><<link "I shall become a Scholar">><<set $character[1].Specialization to "Scholar">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Inquisitor">><<dialog>><<include "Inquisitor">><div align="center"><<link "I shall become an Inquisitor">><<set $character[1].Specialization to "Inquisitor">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Shredder">><<dialog>><<include "Shredder">><div align="center"><<link "I shall become a Shredder">><<set $character[1].Specialization to "Shredder">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Trapper">><<dialog>><<include "Trapper">><div align="center"><<link "I shall become a Trapper">><<set $character[1].Specialization to "Trapper">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Shaman">><<dialog>><<include "Shaman">><div align="center"><<link "I shall become a Shaman">><<set $character[1].Specialization to "Shaman">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Invoker">><<dialog>><<include "Spellblade">><div align="center"><<link "I shall become a Spellblade">><<set $character[1].Specialization to "Spellblade">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Barber Surgeon">><<dialog>><<include "Barber Surgeon">><div align="center"><<link "I shall become a Barber Surgeon">><<set $character[1].Specialization to "Barber Surgeon">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Flagellant">><<dialog>><<include "Flagellant">><div align="center"><<link "I shall become a Flagellant">><<set $character[1].Specialization to "Flagellant">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
</tbody>
</table>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<div class="grid-header"><h3>Classes e Especializações:</h3></div>
<table class="custom-table">
<thead>
<tr>
<th><div class="grid-header warrior-header">Guerreiro:</div></th>
<th><div class="grid-header rogue-header">Ladino</div></th>
<th><div class="grid-header barbarian-header">Bárbaro</div></th>
<th><div class="grid-header mage-header">Mago</div></th>
<th><div class="grid-header artist-header">Artista</div></th>
<th><div class="grid-header devotee-header">Devoto</div></th>
</tr>
</thead>
<tbody>
<tr>
<td><div class="grid-item"><nobr><b>Habilidades iniciais:</b>
<i>Intimidar</i>
<i>Esquivar</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Habilidades iniciais:</b>
<i>Furtar</i>
<i>Ataque Preciso</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Habilidades iniciais:</b>
<i>Estraçalhar</i>
<i>Cabeçada</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Habilidades iniciais:</b>
<i>Deslumbrar</i>
<i>Infundir Arma</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Habilidades iniciais:</b>
<i>Inspirar</i>
<i>BUM!</i></nobr></div></td>
<td><div class="grid-item"><nobr><b>Habilidades iniciais:</b>
<i>Rezar</i>
<i>Chama Sagrada</i></nobr></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Vanguarda">><<dialog>><<include "Vanguard">><div align="center"><<link "Eu serei um Vanguarda">><<set $character[1].Specialization to "Vanguarda">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Assassino">><<dialog>><<include "Assassin">><div align="center"><<link "Eu serei um Assassino">><<set $character[1].Specialization to "Assassino">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Juggernaut">><<dialog>><<include "Juggernaut">><div align="center"><<link "Eu serei um Juggernaut">><<set $character[1].Specialization to "Juggernaut">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Feiticeiro">><<dialog>><<include "Wizard">><div align="center"><<link "Eu serei um Feiticeiro">><<set $character[1].Specialization to "Wizard">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Dançarino">><<dialog>><<include "Dancer">><div align="center"><<link "Eu serei um Dançarino">><<set $character[1].Specialization to "Dançarino">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Paladino">><<dialog>><<include "Paladin">><div align="center"><<link "Eu serei um Paladino">><<set $character[1].Specialization to "Paladino">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Arqueiro">><<dialog>><<include "Archer">><div align="center"><<link "Eu serei um Arqueiro">><<set $character[1].Specialization to "Arqueiro">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Ladrão">><<dialog>><<include "Thief">><div align="center"><<link "Eu serei um Ladrão">><<set $character[1].Specialization to "Ladrão">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Berserk">><<dialog>><<include "Berserker">><div align="center"><<link "Eu serei um Berserk">><<set $character[1].Specialization to "Berserk">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Bruxo">><<dialog>><<include "Warlock">><div align="center"><<link "Eu serei um Bruxo">><<set $character[1].Specialization to "Bruxo">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Bardo">><<dialog>><<include "Bard">><div align="center"><<link "Eu serei um Bardo">><<set $character[1].Specialization to "Bardo">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Clérigo">><<dialog>><<include "Cleric">><div align="center"><<link "Eu serei um Clérigo">><<set $character[1].Specialization to "Clérigo">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Duelista">><<dialog>><<include "Duelist">><div align="center"><<link "Eu serei um Duelista">><<set $character[1].Specialization to "Duelista">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Espião">><<dialog>><<include "Spy">><div align="center"><<link "Eu serei um Espião">><<set $character[1].Specialization to "Espião">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Selvagem">><<dialog>><<include "Feral">><div align="center"><<link "Eu serei um Selvagem">><<set $character[1].Specialization to "Feral">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Invocador">><<dialog>><<include "Invoker">><div align="center"><<link "Eu serei um Invocador">><<set $character[1].Specialization to "Invocador">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Erudito">><<dialog>><<include "Scholar">><div align="center"><<link "Eu serei um Erudito">><<set $character[1].Specialization to "Erudito">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Inquisidor">><<dialog>><<include "Inquisitor">><div align="center"><<link "Eu serei um Inquisidor">><<set $character[1].Specialization to "Inquisidor">><<goto "Criação de Personagem">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
<tr>
<td><div class="grid-item"><<link "Retalhador">><<dialog>><<include "Shredder">><div align="center"><<link "Eu serei um Retalhador">><<set $character[1].Specialization to "Shredder">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Caçador">><<dialog>><<include "Trapper">><div align="center"><<link "Eu serei um Caçador">><<set $character[1].Specialization to "Trapper">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Xamã">><<dialog>><<include "Shaman">><div align="center"><<link "Eu serei um Xamã">><<set $character[1].Specialization to "Shaman">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Lâmina Feiticeira">><<dialog>><<include "Spellblade">><div align="center"><<link "Eu serei uma Lâmina Feiticeira">><<set $character[1].Specialization to "Spellblade">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Barbeiro-Cirurgião">><<dialog>><<include "Barber Surgeon">><div align="center"><<link "Eu serei um Barbeiro-Cirurgião">><<set $character[1].Specialization to "Barber Surgeon">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
<td><div class="grid-item"><<link "Flagellante">><<dialog>><<include "Flagellant">><div align="center"><<link "Eu serei um Flagellante">><<set $character[1].Specialization to "Flagellant">><<goto "Confirmation">><<dialogclose>><</link>></div><</dialog>><</link>></div></td>
</tr>
</tbody>
</table>
</div>
<</if>>
<<if $language === "EN">><div align='center'>
<h2>Cleric</h2>
<b>The Cleric is a Specialization of the Devotee Class that gives the Player access to powers beyond compared to the divine.</b>
<i><b>Main Attribute:</b> Perception (PER)</i>
<i><b>Secondary Attribute:</b> Intelligence (INT)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Cleric:</b> Divine Foundation: You add the 'Heal', 'Judgement' and 'Shield of the Faithfull' Skills to your Repertoire.
</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Devotee:</b> Divine Blessings I Whenever you cast a Holy Spell, gain 2 stacks of <b>Piety</b>, at the end of your turn, you heal yourself by 1 for each 6 stack of <b>Piety</b>. Casting a non-Holy Spell, reset all points of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Cleric:</b>Divine Grace: You may re-roll a failed test once per level.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Devotee:</b> Divine Blessings II <b>Piety</b> increases your Defense and Damage by 1 for every 6 points.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Cleric:</b> Pious Devotion: Whenever you gain <b>Piety</b> gain 2 additional stacks .</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Devotee:</b> Divine Blessings III: Increases by 1 all values given due <b>Piety</b> for every 12 stacks of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Cleric:</b> True Calling: Choose a deity, add it's Divine Call to your Repertoire. Whenever you cast a Divine Call, regain 50 Lifeblood. </i></td>
</tr
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Cleric:</b> Holy Ardor: Start each combat with 20 stacks of <b>Piety</b>.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Cleric character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Holy Garments</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Wand</i></td>
<td><b>Offhand:</b> <i>Dvine Symbol</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Clerigo</h2>
<b>O Clérigo é uma Especialização da Classe Devoto que dá ao jogador acesso a poderes além do comparado ao divino.</b>
<i><b>Atributo Principal:</b> Percepção (PER)</i>
<i><b>Atributo Secundário:</b> Inteligência (INT)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Clérigo:</b> Fundação Divina: Você adiciona as Habilidades 'Cura', 'Juízo' e 'Escudo dos Fiéis' ao seu Repertório.</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Devoto:</b> Bênçãos Divinas I: Sempre que lançar um Feitiço Sagrado, ganhe 2 acúmulos de <b>Piedade</b>. No final de seu turno, cure-se em 1 para cada 6 acúmulos de <b>Piedade</b>. Ao lançar um Feitiço não Sagrado, resete todos os pontos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Clérigo:</b> Graça Divina: Você pode relançar um teste falho uma vez por nível.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Devoto:</b> Bênçãos Divinas II: <b>Piedade</b> aumenta sua Defesa e Dano em 1 para cada 6 pontos.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Clérigo:</b> Devoção Piedosa: Sempre que ganhar <b>Piedade</b>, ganhe 2 acúmulos adicionais.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Devoto:</b> Bênçãos Divinas III: Aumenta em 1 todos os valores dados devido à <b>Piedade</b> para cada 12 acúmulos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 15 |<i><b>Clérigo:</b> Verdadeira Vocação: Escolha uma divindade, adicione sua Chamada Divina ao seu Repertório. Sempre que lançar uma Chamada Divina, recupere 50 de Força Vital.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Clérigo:</b> Ardor Sagrado: Comece cada combate com 20 acúmulos de <b>Piedade</b>.</i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Clérigo começa com:
<ul>
<li><b>Torso:</b> <i>Vestes Sagradas</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Varinha</i></li>
<li><b>Mão Secundária:</b> <i>Símbolo Divino</i></li>
</ul>
</div>
<hr>
</div>
<</if>><style>
#enemy-list {
display: contents;
justify-items: stretch;
}
.fullhud {
display: flex;
}
.centerhud {
top: 30px;
position: relative;
z-index: 1
}
.lefthud {
top: 3px;
position: relative;
left: -220px;
z-index: -1;
}
.righthud {
position: relative;
right: -220px;
z-index: -1;
}
.skills {
z-index: 0;
top: -625px;
left: -72px;
display: none;
position: relative;
}
.skills-grid {
position: absolute
}
.topleft {
position: absolute;
top: 60px;
left: -210px;
font-size: 18px;
}
.combat-buttons {
position: absolute;
top: 80px;
left: -190px;
font-size: 18px;
}
.targets {
position: absolute;
top: 50px;
right: -100px
}
.values {
position: absolute;
top: 45px;
left: -10px;
font-size: 10px;
}
.finalbutton{
position: absolute;
top: 55px;
left: 5px;
font-size: 16px;
}
img {
height: auto;
}
#battle-log {
z-index: -3;
display: block;
overflow-y: auto;
height: 300px;
width: 100%;
color: #ccc;
text-align: justify;
padding: 10px;
background-color: #222;
border: 1px solid #555;
border-radius: 5px;
margin-top: 20px;
position: relative;
}
.message-divider {
border: none;
height: 1px;
background-color: rgba(169, 169, 169, 0.3);
margin: 10px 0;
width: 100%;
}
.player-turn {
float: left;
clear: left;
color: white;
border-radius: 5px;
padding: 5px;
margin: 5px 0;
max-width: 70%;
}
.enemy-turn {
float: right;
clear: right;
color: silver;
border-radius: 5px;
padding: 5px;
margin: 5px 0;
max-width: 70%;
}
</style>
<<run window.showRightUIBar()>>
<h2><<if $language is "EN">> Your enemies: <<elseif $language is "PT-BR">> Seus Inimigos:<</if>></h2>
<div id="enemy-list" align='center'>
<table>
<tr id="enemy-row">
<!-- Generate enemy names and details -->
</tr>
</table>
</div>
<div id="selected-enemy-details" style="display: none;">
<!-- Display detailed information about the selected enemy -->
</div>
<div class="fullhud">
<div class="lefthud">
<img src="img/others/leftballHover.png" width="175%">
<div class="values" id="values"><nobr>
<b>Lifeblood:</b><i><<print $character[1].currentLife>> | <<print $character[1].MAXLIFE>></i>
<b>AP:</b> <i><<print $character[1].AP>></i>
<b>Essence:</b><i><<print $character[1].currentMana>> | <<print $character[1].MAXMANA>></i></nobr>
</div>
</div>
<div class="centerhud">
<img src="img/others/newHud.png" width="175%">
<div class="topleft" id="topleft"> <p><<print $character[1].Name>> - <<print $character[1].Specialization>> (<<print $character[1].level>>)</p>
</div>
<div class="combat-buttons">
<p><button id="generateSkillbox" onclick="window.toggleSkillsDisplay()">Skills</button>
<button id="generate-button" onclick="window.createAttackButtons()">Attack</button></p>
</div>
<div class="targets">
<div id="attack-buttons"></div>
</div>
</div>
<div class="righthud">
<img src="img/others/rightballHover.png" width="175%">
<div class="finalbutton">
<button id="end-turn-button" onclick="endPlayerTurn()">End Turn</button><button id="game-over-button" style="display: none;">[[Game Over][UIBar.unstow(); UIBar.show();]]</button><button id="victory-button" style="display: none;">[[Victory|Victory Screen]]</button>
</div>
</div>
</div>
<div align='center'>
<<if $language is "EN">>
<<button "Help">>
<<dialog "Help">>
<b>How does combat work?</b> Combat mainly occurs in turns with the sequence: <i>Player > Summons > Enemies > Player</i>. During your turn, you can Attack or use Skills.
- Attacks cost 1-2 Action Points <i>(AP)</i>. <b>1-Handed</b> weapons have a lower damage dices, and therefore cost 1 AP, while<b>2-Handed</b> weapons have an higher cost and damage.
-Skills that contain "Technique" often only cost AP but tend to have higher cooldowns. While "Spells" tend to cost both AP and Essence. Unique weapons have their own way to utilizae Action points.<br>
<b>How can I attack an enemy?</b> First, click on the "Attack" button. This will display the available targets <i>(from left to right)</i>.<br>
After choosing a target, your hit chance will be calculated as follows: <i>(Weapon hit-chance + attacker's additional Hit Chance - target's Defense + target's additional Defense)</i>. If the attack is higher than the target's Defense, it's a hit; otherwise, it's a miss.
Different types of weapons have different hit chances:
- <b>Melee</b> weapons have a hit chance of 30 + (Attacker's Strength + Attacker's Dexterity) / 2.
- <b>Ranged</b> weapons have a hit chance of 15 + (Attacker's Perception) * 2
<b>How is Damage calculated?</b> Damage calculation depends on the weapon type:
- <b>Heavy</b> weapons add 1/3 of your Strength to the damage.
- <b>Agile</b> weapons add 1/3 of your Dexterity to the damage.
- <b>Versatile</b> adds 1/3 of the higher value between your Dexterity and Strength to the damage.
- <b>Visceral</b> weapons add 7% of the target's missing life to the damage.
- <b>Esoteric</b> Improves most spells, adding extra damage or upgrading its effects, sometimes, both.
<b>What are Stun, Poison, Bleed?</b> These are status effects:
- <b>Poison</b> damages you by its value at the start of each turn, then it's halved.
- <b>Bleed</b> damages you by 5% of your maximum health/Lifeblood at the start of each turn.
- <b>Regeneration</b> heals you by its value, then decreases by 1 for the next turn.
- <b>Confusion</b> makes your attacks need to be lower than the target's defense to hit.
- <b>Stun</b> prevents you from attacking.
- <b>Blinded</b> makes that attacks miss.
- <b>Hindered</b> prevents you from using skills.
- <b>Burning</b> damages the affected by 6 whenever they use an action, stacking and increasing the next instance of damage. At the end of the turn, all stacks are lost.
- <b>Improved attacks</b> determines the number of improved attacks by skills you hold. Most status effects last for a few turns, decreasing by one (1) at the end of your turn.
<b>What happens when a enemy is killed?</b> Well, their body goes to a special place called the graveyard. Some enemies might even use these bodies for some special abilities. Watch out.
<b>Is there anything else I should know?</b> Yes! Enemy traits affect combat. For example, an enemy with the "Opportunistic" trait will retaliate when you miss an attack. The "Follower" trait halves the enemy's Action Points when they are alone.
<</dialog>>
<</button>>
<<elseif $language is "PT-BR">>
<<button "Ajuda">>
<b>Como funciona o combate?</b> O combate ocorre principalmente em turnos com a sequência: <i>Jogador > Invocação > Inimigos > Jogador</i>. Durante o seu turno, você pode atacar ou usar habilidades.
- Os ataques custam de 1 a 2 pontos de ação <i>(PA)</i>. Armas de <b>1 mão</b> têm dados de dano mais baixos e, portanto, custam 1 PA, enquanto armas de <b>2 mãos</b> têm custo e dano maiores.
- Habilidades que contêm “Técnica” geralmente custam apenas AP, mas tendem a ter tempos de recarga mais altos. Enquanto “Feitiços” tendem a custar PA e Essência. Armas únicas têm sua própria maneira de utilizar pontos de ação.<br>
<b> Como posso atacar um inimigo?</b> Primeiro, clique no botão "Atacar". Isso exibirá os alvos disponíveis <i>(da esquerda para a direita)</i>.<br>
Depois de escolher um alvo, sua chance de acerto será calculada da seguinte forma: <i>(Chance de acerto da arma + Chance de acerto adicional do atacante - Defesa do alvo + Defesa adicional do alvo)</i>. Se o ataque for maior que a Defesa do alvo, é um acerto; caso contrário, é uma falta.
Diferentes tipos de armas têm diferentes chances de acerto:
- Armas <b>corpo a corpo</b> têm chance de acerto de 30 + (Força do Atacante + Destreza do Atacante) / 2.
- Armas de <b>alcance</b> têm chance de acerto de 15 + (Percepção do Atacante) * 2
<b>Como o dano é calculado?</b> O cálculo do dano depende do tipo de arma:
- Armas <b>Pesadas</b> adicionam 1/3 da sua Força ao dano.
- Armas <b>Ágeis</b> adicionam 1/3 da sua Destreza ao dano.
- <b>Versátil</b> adiciona 1/3 do maior valor entre sua Destreza e Força ao dano.
- Armas <b>Viscerais</b> adicionam 7% da vida perdida do alvo ao dano.
- <b>Esotérico</b> Melhora a maioria dos feitiços, adicionando dano extra ou aprimorando seus efeitos, às vezes, ambos.
<b>O que são Atordoamento, Veneno e Sangramento?</b> Estes são efeitos de status:
- <b>Veneno</b> causa dano igual ao seu valor no início de cada turno e depois é reduzido pela metade.
- <b>Sangramento</b> causa dano de 5% do seu máximo de saúde/Sangue Vital no início de cada turno.
- <b>Regeneração</b> cura você de acordo com seu valor e depois diminui em 1 no próximo turno.
- <b>Confusão</b> faz com que seus ataques precisem ser menores que a defesa do alvo para acertar.
- <b>Atordoamento</b> impede você de atacar.
- <b>Cego</b> faz com que os ataques errem.
- <b>Impedimento</b> impede que você use habilidades.
- <b>Queima</b> causa 6 de dano aos afetados sempre que eles usam uma ação, acumulando e aumentando a próxima ocorrência de dano. No final do turno, todas as acúmulos são perdidas.
- <b>Ataques aprimorados</b> determina o número de ataques aprimorados por habilidades que você possui. A maioria dos efeitos de status dura alguns turnos, diminuindo em um (1) no final do seu turno.
<b>O que acontece quando um inimigo é morto?</b> Bem, o corpo dele vai para um lugar especial chamado cemitério. Alguns inimigos podem até usar esses corpos para obter algumas habilidades especiais. Atenção.
<b>Há mais alguma coisa que eu deva saber?</b> Sim! As características do inimigo afetam o combate. Por exemplo, um inimigo com o traço “Oportunista” retaliará quando você errar um ataque. A característica "Seguidor" reduz pela metade os Pontos de Ação do inimigo quando ele está sozinho.
<<dialog "Ajuda">>
<</dialog>>
<</button>>
<</if>>
</div>
<hr>
<<script>>
let enemyInstances = State.variables.enemyInstances;
let selectedEnemyIndex = -1;
let character = State.variables.character[1];
setTimeout(updatePlayerDetails, 0)
function selectEnemy(index, attacker, target) {
const selectedEnemyElement = document.querySelector(`#enemy-${index}`);
if (!selectedEnemyElement) {
return; // Exit the function if the element does not exist
}
// Check if the clicked enemy is already selected, then deselect it
if (selectedEnemyIndex === index) {
selectedEnemyElement.classList.remove('selected-enemy');
document.getElementById('selected-enemy-details').style.display = 'none';
selectedEnemyIndex = -1; // Reset the selected enemy index
// Remove the target image if it exists
const targetImage = selectedEnemyElement.querySelector('.target-image');
if (targetImage) {
targetImage.remove();
}
} else {
// Remove the "selected-enemy" class from the previously selected enemy
if (selectedEnemyIndex >= 0) {
const previousSelectedEnemyElement = document.querySelector(`#enemy-${selectedEnemyIndex}`);
if (previousSelectedEnemyElement) {
previousSelectedEnemyElement.classList.remove('selected-enemy');
}
document.getElementById('selected-enemy-details').style.display = 'none';
// Remove the target image from the previously selected enemy
const previousSelectedTargetImage = previousSelectedEnemyElement.querySelector('.target-image');
if (previousSelectedTargetImage) {
previousSelectedTargetImage.remove();
}
}
// Add the "selected-enemy" class to the newly selected enemy
selectedEnemyElement.classList.add('selected-enemy');
selectedEnemyIndex = index;
console.log("selectedEnemyIndex:", selectedEnemyIndex);
// Calculate the position of the selectedEnemyElement relative to its parent
const parentRect = selectedEnemyElement.parentElement.getBoundingClientRect();
const enemyRect = selectedEnemyElement.getBoundingClientRect();
const topOffset = enemyRect.top - parentRect.top;
const leftOffset = enemyRect.left - parentRect.left;
// Show the selected enemy's details
const selectedEnemy = enemyInstances[selectedEnemyIndex];
const detailsHtml = `
<h3>Enemy: ${selectedEnemy.Name}</h3>
<p><b>Type:</b><i> ${selectedEnemy.Specialization}</i> | <b>Ancestry:</b><i> ${selectedEnemy.Ancestry}</i></p>
<p><b>Lifeblood:</b><i> ${selectedEnemy.currentLife} / ${selectedEnemy.MAXLIFE} </i> | <b>Essence:</b><i> ${selectedEnemy.currentMana} / ${selectedEnemy.MAXMANA}</i></p>
<p><b>Traits:</b><i> ${selectedEnemy.traits.join(', ')}</i></p>
<!-- Add more properties here -->
`;
const deadHtml = `
<h3>Enemy: ${selectedEnemy.Specialization} (<b>Dead</b>)</h3>
<p><b>Lifeblood:</b><i> ${selectedEnemy.currentLife}</b></p>
`;
// Create a new img element for the target image
const targetImage = document.createElement('img');
targetImage.src = "img\\others\\target.png";
targetImage.size = '64px';
targetImage.width = '50%';
targetImage.style.position = 'inherit'; // Set the position to absolute for precise placement
targetImage.classList.add('target-image'); // Add a class for easier identification and removal
// Append the target image to the selected enemy's container
selectedEnemyElement.appendChild(targetImage);
if (selectedEnemy.currentLife > 0) {
document.getElementById('selected-enemy-details').innerHTML = detailsHtml;
document.getElementById('selected-enemy-details').style.display = 'block';
} else {
document.getElementById('selected-enemy-details').innerHTML = deadHtml;
document.getElementById('selected-enemy-details').style.display = 'block';
}
}
}
State.temporary.enemyCells = []
let enemyCells = State.temporary.enemyCells; // Array to store enemy cell elements
window.initializeEnemyList = function() {
const enemyListRow = document.getElementById('enemy-row'); // Get the row to append to
const specializationCounts = {}; // To count occurrences of each specialization
const enemyInstances = State.variables.enemyInstances; // Get the enemy instances from State.variables
// Clear existing enemy cells
enemyListRow.innerHTML = '';
// Initialize variables for tracking enemy count and row creation
let enemyCount = 0;
let currentRow = document.createElement('tr');
// Loop through the player's skills and generate table data cells
enemyInstances.forEach((enemy, index) => {
const specialization = enemy.Name;
const isBoss = enemy.traits && enemy.traits.includes('Boss');
const hidden = enemy.statusEffects && enemy.statusEffects.Hidden; // Check if the enemy is hidden
// Count occurrences of each specialization
const count = specializationCounts[specialization] || 0;
specializationCounts[specialization] = count + 1;
// Create a table data cell within the row
const cell = document.createElement('td');
// Create a container div for the enemy image and border images
const container = document.createElement('div');
container.style.ID = 'enemyContainer';
container.style.position = 'relative'; // Set the container to relative position for proper overlapping
container.style.width = '100px'; // Set the width of the container (adjust as needed)
container.style.height = '100px'; // Set the height of the container (adjust as needed)
// Create an image element for the enemy
const enemyImage = document.createElement('img');
enemyImage.src = enemy.image; // Set the image source from the enemy's "image" property
enemyImage.alt = specialization; // Set alt text for accessibility
enemyImage.style.position = 'absolute'; // Set the position to absolute for precise placement
enemyImage.style.top = '0'; // Aligns the top of the enemy image with the top of the container
enemyImage.style.left = '0'; // Aligns the left of the enemy image with the left of the container
// Create an image element for the border
const borderImage = document.createElement('img');
borderImage.style.position = 'absolute'; // Set the position to absolute for precise placement
borderImage.style.top = '0'; // Aligns the top of the border image with the top of the container
borderImage.style.left = '0'; // Aligns the left of the border image with the left of the container
// Set the source of the border image based on the "Boss" trait
if (isBoss) {
borderImage.src = "img/others/borderBnormal.png"; // Set the border image for bosses
} else if (isBoss && hidden) {
borderImage.src = "img/others/borderBhidden.png";
} else if (!isBoss && hidden) {
borderImage.src = "img/others/borderAhidden.png";
} else {
borderImage.src = "img/others/borderAnormal.png"; // Set the border image for non-bosses
}
container.appendChild(enemyImage); // Append the enemy image to the container
container.appendChild(borderImage); // Append the border image to the container
// Append the container to the cell
cell.appendChild(container);
// Determine the label for the enemy cell, including a numeric identifier for duplicates
const enemyLabel = count === 0 ? specialization : `${specialization} (${count + 1})`;
// Create a paragraph element for the enemy label (name)
const nameLabel = document.createElement('p');
nameLabel.textContent = enemyLabel;
cell.appendChild(nameLabel); // Append the enemy label to the cell
// Assign an ID for each enemy cell
cell.id = `enemy-${index}`;
// Add click event listeners to select enemies
cell.addEventListener('click', function () {
selectEnemy(index);
});
// Append the cell to the current row
currentRow.appendChild(cell);
// Increment enemy count
enemyCount++;
// If the enemy count reaches 6, start a new row
if (enemyCount % 6 === 0) {
enemyListRow.appendChild(currentRow); // Append the current row to the enemy list
currentRow = document.createElement('tr'); // Create a new row
}
});
// If there are remaining enemies not added to a row, append the current row
if (currentRow.childNodes.length > 0) {
enemyListRow.appendChild(currentRow);
}
}
// Run the initialization function when the DOM is fully loaded
setTimeout(initializeEnemyList, 0);
setTimeout(window.battleStart, 0);
<</script>><<script>>
$(document).on('keyup', 'input', function(e) {
if (e.which === 13) { // Check if Enter key is released
State.variables.character[1].Name = State.variables.playerName; // Update the Player's Name property with the new name
console.log(`${State.variables.character[1].Name}`); // Corrected to log the updated name
var nameChangeSpan = $('#namechange');
if (State.variables.language === "PT-BR") {
nameChangeSpan.text(" Você se renomou!");
} else if (State.variables.language === "EN") {
nameChangeSpan.text(" You have renamed yourself!");
}
nameChangeSpan.show();
// Automatically revert to the dot after a few seconds (e.g., 3 seconds)
setTimeout(function() {
nameChangeSpan.text(".");
nameChangeSpan.hide();
}, 3000); // 3000 milliseconds (3 seconds)
}
});
<</script>>
<<if $langage === "EN">>
| <h1> Your Character </h1> |
<div align='center'>
<p><<textbox "$playerName" "Player's Character">> <i><span id="namechange">.</span></i><p>
<i>(Type your name and press Enter)</i>
<<link 'Configure your pronouns.'>>
<<pronouns>>
<</link>>
<b>Ancestry:</b> <<print $character[1].Ancestry>>
<hr>
<h3>Attributes:</h3>
<hr>
<table>
<tr>
<td> STRENGTH: </td>
<td> DEXTERITY: </td>
<td> RESILIENCE: </td>
<td> INTELLIGENCE: </td>
<td> CHARISMA: </td>
<td> PERCEPTION: </td>
</tr>
<tr>
<td><span id="current-attr-STR"><<print $character[1].STR>></span> </td>
<td><span id="current-attr-DEX"><<print $character[1].DEX>></span></td>
<td><span id="current-attr-RES"><<print $character[1].RES>></span> </td>
<td><span id="current-attr-INT"><<print $character[1].INT>></span> </td>
<td><span id="current-attr-CHA"><<print $character[1].CHA>></span> </td>
<td><span id="current-attr-PER"><<print $character[1].PER>></span> </td>
</tr>
</table>
</div>
<hr>
<div align='center'>
<h3>Expertises:</h3>
<hr>
<table>
<tr>
<td>Athletics:</td>
<td>Acrobatics:</td>
<td>Stealth: </td>
<td>Sleight of Hands:</td>
<td>World Knowledge:</td>
<td>Mystical Knowledge:</td>
</tr>
<tr>
<td><span id="current-expertise-Athletics"><<print $character[1].Athletics>></span></td>
<td><span id="current-expertise-Acrobatics"><<print $character[1].Acrobatics>></span></td>
<td><span id="current-expertise-Stealth"><<print $character[1].Stealth>></span ></td>
<td><span id="current-expertise-SleightofHands"><<print $character[1].SleightofHands>></span> </td>
<td><span id="current-expertise-WorldKnowledge"><<print $character[1].WorldKnowledge>></span> </td>
<td><span id="current-expertise-MysticalKnowledge"><<print $character[1].MysticalKnowledge>></span></td>
</tr>
<tr>
<td>Arcane Knowledge:</td>
<td>Speech:</td>
<td>Arts:</td>
<td>Intimidation:</td>
<td>Insight: </td>
<td>Awareness: </td>
</tr>
<tr>
<td><span id="current-expertise-ArcaneKnowledge"><<print $character[1].ArcaneKnowledge>></span></td>
<td><span id="current-expertise-Speech"><<print $character[1].Speech>></span></td>
<td><span id="current-expertise-Arts"><<print $character[1].Arts>></span></td>
<td><span id="current-expertise-Intimidation"><<print $character[1].Intimidation>></span></td>
<td><span id="current-expertise-Insight"><<print $character[1].Insight>></span></td>
<td><span id="current-expertise-Awareness"><<print $character[1].Awareness>></span></td>
</tr>
</table>
</div>
<hr>
<div align='center'>
<h3>Class Specialization:</h3>
<<print $character[1].Specialization>>
<hr>
You are free to roam the land now.
[[I am ready|NOTRICKS]]
<p><<link "I would like to rethink my choices.">><<dialog "Are you sure?">>
This will revert ALL changes made.
<p><<link "Yes.">><<goto "AncestryPage" <<set $character[1] = $remember>> <<dialogclose>><</link>> <<link "No.">><<dialogclose>><</link>></p><</dialog>><</link>> <<link "But, Randomly!!">><<run window.randomCharacterCreation()>><<goto "Confirmation">><</link>></p>
</div>
<<elseif $language === "PT-BR">>
| <h1> Seu Personagem </h1> |
<div align='center'>
<p><<textbox "$playerName" "Personagem do Jogador">> <i><span id="namechange">.</span></i><p>
<i>(Digite seu nome e pressione Enter)</i>
<<link 'Configure seus pronomes.'>>
<<pronouns>>
<</link>>
<b>Ancestrailidade:</b> <<switch $character[1].Ancestry>>
<<case "Human">> Humano <<case "Vanadi">> Vanadi <<case "Draconian">> Draconiano <<case "Elf">> Elfo <<case "Dwarf">> Anão <<case "Herald">> Arauto<</switch>>
<hr>
<h3>Atributos:</h3>
<hr>
<table>
<tr>
<td> FORÇA: </td>
<td> DESTREZA: </td>
<td> RESISTÊNCIA: </td>
<td> INTELIGÊNCIA: </td>
<td> CARISMA: </td>
<td> PERCEPÇÃO: </td>
</tr>
<tr>
<td><span id="current-attr-STR"><<print $character[1].STR>></span> </td>
<td><span id="current-attr-DEX"><<print $character[1].DEX>></span></td>
<td><span id="current-attr-RES"><<print $character[1].RES>></span> </td>
<td><span id="current-attr-INT"><<print $character[1].INT>></span> </td>
<td><span id="current-attr-CHA"><<print $character[1].CHA>></span> </td>
<td><span id="current-attr-PER"><<print $character[1].PER>></span> </td>
</tr>
</table>
</div>
<hr>
<div align='center'>
<h3>Perícias:</h3>
<hr>
<table>
<tr>
<td>Atletismo:</td>
<td>Acrobacia:</td>
<td>Furtividade: </td>
<td>Destreza Manual:</td>
<td>Conhecimento Mundano:</td>
<td>Conhecimento Místico:</td>
</tr>
<tr>
<td><span id="current-expertise-Athletics"><<print $character[1].Athletics>></span></td>
<td><span id="current-expertise-Acrobatics"><<print $character[1].Acrobatics>></span></td>
<td><span id="current-expertise-Stealth"><<print $character[1].Stealth>></span ></td>
<td><span id="current-expertise-SleightofHands"><<print $character[1].SleightofHands>></span> </td>
<td><span id="current-expertise-WorldKnowledge"><<print $character[1].WorldKnowledge>></span> </td>
<td><span id="current-expertise-MysticalKnowledge"><<print $character[1].MysticalKnowledge>></span></td>
</tr>
<tr>
<td>Conhecimento Arcano:</td>
<td>Oratória:</td>
<td>Artes:</td>
<td>Intimidação:</td>
<td>Percepção:</td>
<td>Consciência:</td>
</tr>
<tr>
<td><span id="current-expertise-ArcaneKnowledge"><<print $character[1].ArcaneKnowledge>></span></td>
<td><span id="current-expertise-Speech"><<print $character[1].Speech>></span></td>
<td><span id="current-expertise-Arts"><<print $character[1].Arts>></span></td>
<td><span id="current-expertise-Intimidation"><<print $character[1].Intimidation>></span></td>
<td><span id="current-expertise-Insight"><<print $character[1].Insight>></span></td>
<td><span id="current-expertise-Awareness"><<print $character[1].Awareness>></span></td>
</tr>
</table>
</div>
<hr>
<div align='center'>
<h3>Especialização de Classe:</h3>
<<switch $character[1].Specialization>><<case "Vanguard">> Vanguarda
<<case "Archer">> Arqueiro<<case "Duelist">> Duelista<<case "Shredder">> Retalhador<<case "Assassin">> Assassino<<case "Thief">> Ladrão<<case "Spy">> Espião<<case "Trapper">> Caçador<<case "Juggernaut">> Juggernaut
<<case "Berserker">> Berserker<<case "Feral">> Selvagem<<case "Shaman">> Xamã<<case "Wizard">> Feiticeiro<<case "Warlock">> Bruxo<<case "Invoker">> Invocador<<case "Spellblade">> Lâmina Feiticeira<<case "Dancer">> Dançarino
<<case "Bard">> Bardo<<case "Scholar">> Erudito<<case "Barber Surgeon">> Barbeiro-Cirurgião<<case "Paladin">> Paladino<<case "Cleric">> Clérigo<<case "Inquisitor">> Inquisidor<<case "Flagellant">> Flagellante<</switch>>
<hr>
Você está livre para explorar a terra agora.
[[Estou pronto|NOTRICKS]]
<p><<link "Gostaria de repensar minhas escolhas.">><<dialog "Tem certeza?">>
Isso reverterá TODAS as mudanças feitas.
<p><<link "Sim.">><<goto "AncestryPage" <<set $character[1] = $remember>> <<dialogclose>><</link>> <<link "Não.">><<dialogclose>><</link>></p><</dialog>><</link>> <<link "Mas, aleatoriamente!!">><<run window.randomCharacterCreation()>><<goto "Confirmation">><</link>></p>
</div>
<</if>>
<<if $language === "EN">><div align='center'>
<h2>Dancer</h2>
<b>The Dancer is a Specialization of the Artist Class that allows the Player to graciously dance on the battlefield, making numerous movements during their turns.</b>
<i><b>Main Attribute:</b> Charisma (CHA)</i>
<i><b>Secondary Attribute:</b> Dexterity (DEX)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Dancer:</b> Blade Dancer: Slashing weapons count as instruments for you. While wielding one, increase your Defense by 1/3 of your Charisma.
Additionally, you may use Arts to Acrobatic tests.
</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Dancer:</b> Tempo I: The first time you cast an spell each turn, make a weapon attack against a random enemy.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Artist:</b> Trustworthy Instrument: While equipped with an Instrument, mark it as Esoteric. Additionally, you gain +5 to Art tests</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Dancer:</b> Graceful Steps: After you are missed by an attack, gain an Action point.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Artist:</b> Winning Smile: When making a test and the result would be lower than 10, add 1/3 of your Charisma to the resut.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Dancer:</b> Tempo II: The first time you cast a spell each turn, make a weapon attack against a random enemy. Refresh whenever you cast a Ballad.</i></td>
</tr>
<tr>
<td>At level 17 | i><b>Dancer:</b> Rythimic Strike: Whenever you make a weapon attack, deal 1/2 of your charisma as damage to the target. .</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
A Dancer character starts with:
<table>
<tr>
<td><b>Head:<b> <i>Circlet</i></td>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Scimitar</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2> Dançarino </h2>
<b>O Dançarino é uma Especialização da Classe Artista que permite ao Jogador dançar graciosamente no campo de batalha, realizando inúmeros movimentos durante seus turnos.</b>
<i><b>Atributo Principal:</b> Carisma (CAR)</i>
<i><b>Atributo Secundário:</b> Destreza (DES)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Dançarino:</b> Dançarino de Lâminas: Armas Cortantes contam como instrumentos para você. Ao empunhar uma, aumente sua Defesa em 1/3 do seu Carisma.
Adicionalmente, você pode utilizar Artes para testes de Acrobacia.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Dançarino:</b> Andamento I: Na primeira vez que lançar um feitiço a cada turno, faça um ataque com arma contra um inimigo aleatório.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Artista:</b> Instrumento Confiável: Ao equipar um Instrumento, marque-o como Esotérico. Além disso, você ganha +5 em testes de Arte.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Dançarino:</b> Passos Graciosos: Depois de desviar de um ataque, ganhe um ponto de Ação.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Artista:</b> Sorriso Vencedor: Ao fazer um teste e o resultado seria inferior a 10, adicione 1/3 do seu Carisma ao resultado.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Dançarino:</b> Andamento II: Na primeira vez que lançar um feitiço a cada turno, faça um ataque com arma contra um inimigo aleatório. Atualize sempre que lançar uma Balada.</i></td>
</tr>
<tr>
<td>No nível 17 | i><b>Dançarino:</b> Golpe Rítmico: Sempre que realizar um ataque com arma, cause 1/2 do seu Carisma como dano ao alvo .</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Dançarino começa com:
<ul>
<li><b>Cabeça:</b> <i>Tiara</i></li>
<li><b>Torso:</b> <i>Camisa de Lã</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Cimitarra</i></li>
</ul>
</div>
<hr>
</div>
<</if>><<if $language === "EN">>
<div align='center'>
<h1>Draconian:</h1>
<hr>
<h4> "The might of an empire is defined by one of its warriors." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>In the annals of centuries ago, the Draconians emerged from the embers of the forgotten Iruxi. A name whispered with reverence, a reminder of a time before shadows deepened. A people who thrived amidst enigmatic swamps and sinuous rivers, their existence was a relentless symphony of conflict, an unending dance for meager resources. Unity was alien to these people, and vulnerability was their anathema, for they embraced a semi-primal existence where the strongest ruled the weak. Yet, the overture of their existence was no more with the birth of the Dragons, the ironic architects of their metamorphosis.
The Dragons stood as a wave of destruction over the Giants, with such terrible force that left even their creators in awe. Even the seductive calls whispered silently by the twisted "Mother of Monsters." A deity whose silent but overt demands that echo through primal instinctive urges could not sway them to the divine fold. No, their allegiance remained unwaveringly with the Dragons, the world asunder. And in the detached nature of deities, their yearning was granted.
As the fierce Iruxi transitioned into the zealous Draconians, their society underwent a seismic transformation over five centuries. What once were designed to be hidden enclaves to fend for their newborns. Rose instead obsidian citadels to show their dominion over the land. They tamed the wild rivers, seizing control over the arteries of resources upon which rival races depended. Their fervor blazed like an inferno, an unyielding devotion to their draconic overlords. With righteous fury, they reclaimed the scorched ruins, remnants of the Dragons' fiery breath, only to find the once-desolate sanctuaries now harboring humans. Audacious interlopers, insolent heretics of the Draconic might who dared to loot the spoils of the Dragons, who had defeated the once-thought invincible Giants. Enraged by this disrespect, the Draconians unleashed their wrath upon the invaders and their kin, a clash that marked the birth of the Scalebounds order, draconic knights sworn to guard the sanctity of their legacy. From the embers of that clash arose a decree to ensure that the lowly and pathetic humans were to understand their place.
Thus, the sentence to be subjugation was given to the humans, to live in servitude of the worthy and strong Draconians, and from the insides of their tumbling cities, rows of broken families and proud nobles terrified by their new fate.
Yet dissent lingered, concealed in shadows, for tradition dictated reverence and utter obedience to the Elders. Rebellion whispered, not through actions, but in silent inaction, as they overlooked the rebellious few that orchestrated liberation of the conquered folk, offering freedom to the oppressed with deft hands and cunning minds. Among the Draconians, a group spurned the tide of transformation, clinging to their ancient and proud Iruxi heritage as the world plunged further into the abyss with each passing day.</i>
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Natural Warriors:</b>
<i>Draconians have natural Claws instead of Fists. As well as durable scales instead of skin, increasing their Defense.</i>
<b>Underwater Marauders</b>
<i>Draconians can swim and breathe underwater without needing making tests.</i>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div align='center'>
<h1>Draconian:</h1>
<hr>
<h4> "The might of an empire is defined by one of its warriors." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>Nos anais de séculos atrás, os Draconianos emergiram das cinzas dos esquecidos Iruxi. Um nome sussurrado com reverência, um lembrete de um tempo antes que as sombras se aprofundassem. Um povo que prosperava no meio de pântanos enigmáticos e rios sinuosos, sua existência era uma sinfonia implacável de conflito, uma dança interminável por recursos escassos. A unidade era alienígena para esse povo, e a vulnerabilidade era seu anátema, pois abraçavam uma existência semi-primal onde os mais fortes dominavam os mais fracos. No entanto, a abertura de sua existência acabou com o nascimento dos Dragões, os arquitetos irônicos de sua metamorfose.
Os Dragões ergueram-se como uma onda de destruição sobre os Gigantes, com uma força tão terrível que deixou até mesmo seus criadores admirados. Nem mesmo os chamados sedutores sussurrados silenciosamente pela distorcida "Mãe dos Monstros". Uma divindade cujas demandas silenciosas, mas evidentes, ecoam por meio de impulsos instintivos primais, não puderam desviá-los para o lado divino. Não, sua lealdade permaneceu inabalavelmente com os Dragões, o mundo em ruínas. E na natureza distante das divindades, seu anseio foi concedido.
Enquanto os ferozes Iruxi se transformavam nos zelosos Draconianos, sua sociedade passou por uma transformação sísmica ao longo de cinco séculos. O que antes eram enclaves escondidos para cuidar de seus recém-nascidos se tornaram cidadelas de obsidiana para mostrar seu domínio sobre a terra. Eles domesticaram os rios selvagens, assumindo o controle sobre as artérias de recursos de que raças rivais dependiam. Seu fervor ardia como um inferno, uma devoção inabalável a seus senhores draconianos. Com fúria justa, eles recuperaram as ruínas queimadas, restos do sopro de fogo dos Dragões, apenas para encontrar os santuários outrora desolados, agora abrigando humanos. Intrusos audaciosos, hereges insolentes do poder Draconiano que ousaram saquear os despojos dos Dragões, que haviam derrotado os Gigantes antes considerados invencíveis. Enfurecidos por esse desrespeito, os Draconianos desencadearam sua ira sobre os invasores e seus parentes, um confronto que marcou o nascimento da ordem Scalebounds, cavaleiros draconianos jurados a guardar a santidade de seu legado. Das cinzas desse confronto surgiu um decreto para garantir que os humanos humildes e patéticos entendessem seu lugar.
Assim, a sentença de subjugação foi dada aos humanos, para viverem em servidão aos dignos e fortes Draconianos, e das entranhas de suas cidades em ruínas, fileiras de famílias quebradas e nobres orgulhosos aterrorizados por seu novo destino.
No entanto, o descontentamento persistia, escondido nas sombras, pois a tradição ditava reverência e obediência total aos Anciões. A rebelião sussurrava, não por meio de ações, mas em silenciosa inação, enquanto ignoravam os poucos rebeldes que orquestravam a libertação do povo conquistado, oferecendo liberdade aos oprimidos com mãos hábeis e mentes astutas. Entre os Draconianos, um grupo rejeitou a maré da transformação, agarrando-se à sua antiga e orgulhosa herança Iruxi enquanto o mundo mergulhava cada vez mais no abismo a cada dia que passava.</i>
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Guerreiros Naturais:</b>
<i>Draconianos possuem Garras naturais ao invés de Punhos. Além de uma durável escamas ao invés de pele, aumentando sua Defesa</i>
<b>Saqueadores Subaquáticos</b>
<i>Draconianos podem nadar e respirar debaixo d'agua sem a necessidade de testes.</i>
<hr>
</div>
<</if>>
<<set $return to passage()>>
<<if $language === "EN">><div align='center'>
<h2> Invoker </h2>
<b>The Invoker is a Specialization of the Mage Class that focuses on improving your Summons.</b>
<i><b>Main Attribute:</b> Intelligence (INT)</i>
<i><b>Secondary Attribute:</b> Perception (PER)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Mage:</b> Arcane Initiation: Add the skills "Fire Bolt."; "Lightning Strike." and "Freeze." to your Repertoire. They cost 3 less.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Invoker:</b> (Skill) Summon: Elemental.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Invoker:</b> (Skill) Summon: Spirit.</i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Invoker:</b> Bonded Existence: Whenever you invoke a Summon, regain 7% of your lost Essence, additionally, for each invoked Summon, increase your Damage by 3.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Invoker:</b> (Skill) Summon: Familiar.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Mage:</b> Arcane Mastery: Add the skills; "Inferno", "Storm and "Blizzard" to your Repertoire. When cast, you roll the damage twice and chooses the highest result.</i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Invoker:</b> Improved Summons: When you invoke a summon, increase their Lifeblood by 1/2 of your Intelligence and their attributes by 3.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Invoker:</b> Master Summoner: Decrease the cost of your summons by half. Additionally, when a summon would be destroyed, regain Essence equal to it's original cost.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Invoker</b> Masterful Summons: When you invoke a summon, Increase their Lifeblood by your Intelligence and their attributes by 6. </i></td>
</tr>
</table>
<hr>
<div align='center'>
A Invoker character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Arcane Staff</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2> Invocador </h2>
<b>O Invocador é uma Especialização da Classe Mago que se concentra em melhorar suas Invocações.</b>
<i><b>Atributo Principal:</b> Inteligência (INT)</i>
<i><b>Atributo Secundário:</b> Percepção (PER)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Mago:</b> Iniciação Arcana: Adicione as habilidades: "Bola de Fogo.", "Raio." e "Congelamento." ao seu Repertório. Essas habilidades custam 3 menos.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Invocador:</b> (Habilidade) Invocar: Elemental.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Invocador:</b> (Habilidade) Invocar: Espírito.</i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Invocador:</b> Existência Vinculada: Sempre que você invoca uma Invocação, aumente seu Dano em 3, além disso, para cada Invocação feita, recupere 7% de sua Essência perdida.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Invocador:</b> (Habilidade) Invocar: Familiar.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Mago:</b> Maestria Arcana: Adicione as habilidades; "Inferno", "Tempestade e "Nevasca" ao seu Repertório. Quando conjuradas, você rola o Dano duas vezes e escolhe o maior resultado.</i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Invocador:</b> Invocações Aprimoradas: Quando você invoca uma nova invocação, aumente a Força Vital dela em 1/2 de sua Inteligência e seus atributos em 3.</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Invocador:</b> Mestre Invocador: Diminua pela metade o custo de suas invocações. Além disso, quando uma invocação seria destruída, recupere Essência igual ao seu custo original.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Invocador:</b> Invocações Maestrais: Aumente a Força Vital de suas Invocações pela sua Inteligência e seus atributos em 6</i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Invocador começa com:
<ul>
<li><b>Torso:</b> <i>Camisa de Lã</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Varinha Arcana</i></li>
</ul>
</div>
<hr>
</div>
<</if>><div align='center'>
<img src="img/others/Duelist.png" style="float: left; background-color: black; padding-left: 25em; padding-right: 25em;">
<hr>
</div>
<<if $language === "EN">>
<div align='center'>
<h2>Duelist</h2>
<b>The Duelist is a Specialization of the Warrior Class that focuses on the usage of Riposte, exceeding on-on-one combats.</b>
<i><b>Main Attribute:</b> Strength (STR)</i>
<i><b>Secondary Attribute:</b> Dexterity (DEX)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Duelist:</b> (Skill) Feint</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Duelist:</b> Natural Reflexes: At the end of your turn, gain Riposte.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Warrior:</b> Weapon Mastery: Your weapons apply additional effects based on their damage type.
Blunt - Apply Confusion on the target.
Slashing - Applies Bleed for 2 turns.
Piercing - Decreases the target's Defense by 5.
Firearm - Has 35% to deal 75% extra damage.
</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Duelist:</b> (Skill) En Garde!:</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Duelist:</b> Graceful: While wielding only a 1-handed weapon in your hands, increase your Defense and Hit-Chance by 10.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Warrior:</b> Tactical Genius: Your Skills that cost three or more Action Points cost 1 point less.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Duelist:</b>Bon Mot: After killing an enemy, heal yourself by 10% of your lost Lifeblood.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Duelist:</b> (Skill) Disengage.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Warrior:</b> Second Wind: During each combat, the first time you hit below 25% of your maximum health, heal yourself by 35% of your lost health.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Duelist:</b> Firm Hand: While wielding a single 1-handed weapon, whenever you make a weapon attack, you make an additional attack .</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Duelist:</b> Masterful Efficiency: Riposte no longer fades after you hit an enemy.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Duelist character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Gamberson</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Rapier</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Duelista</h2>
<b>O Duelista é uma Especialização da Classe Guerreiro que se concentra no uso de Riposte, destacando-se em combates um contra um.</b>
<i><b>Atributo Principal:</b> Força (FOR)</i>
<i><b>Atributo Secundário:</b> Destreza (DEX)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Duelista:</b> (Habilidade) Finta</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Duelista:</b> Reflexos Naturais: No final do seu turno, ganhe Riposte.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Guerreiro:</b> Maestria com Armas: Suas armas aplicam efeitos adicionais com base no tipo de dano delas.
Contundente - Aplica Confusão no alvo.
Cortante - Aplica Sangramento por 2 turnos.
Perfurante - Diminui a defesa do alvo em 5.
Arma de Fogo - têm 30% de chance de causar 75% de Dano Adicional.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Duelista:</b> (Habilidade) En Garde!:</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Duelista:</b> Gracioso: Ao empunhar apenas uma arma de uma mão nas suas mãos, aumente sua Defesa e Chance de Acerto em 10.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Guerreiro:</b> Gênio Tático: Suas Habilidades que custam três ou mais Pontos de Ação custam 1 ponto a menos.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Duelista:</b> Bon Mot: Após matar um inimigo, cure-se em 10% da sua Força Vital perdida.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Duelista:</b> (Habilidade) Desengajar.</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Guerreiro:</b> Segundo Fôlego: Durante cada combate, na primeira vez que você atinge abaixo de 25% da sua saúde máxima, você se cura em 35% da sua saúde perdida.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Duelista:</b> Mão Firme: Ao empunhar apenas uma arma de uma mão, sempre que você fizer um ataque com arma, faça um ataque adicional.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Duelista:</b> Eficiência Magistral: Riposte não desaparece mais depois de você atingir um inimigo.</i></td>
</tr>
</table>
<hr>
Um personagem Duelista começa com:
<table>
<tr>
<td><b>Tronco:</b> <i>Gamberson</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Rapieira</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">>
<div align='center'>
<h1>Dwarf</h1>
<hr>
<h4> "The proud descendants of our usurped sovereigns." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>The Dwarfs, keepers of ancient knowledge, hold the weight of their forefathers' legacy on their sturdy shoulders. Their ancestors, the fallen Giants, created them to preserve their achievements from the invading gods who sought to destroy them. The Dwarfs are a mixture of the Giants' resilient flesh and the unyielding rock of their mountain homes, brought to life by the fiery heart of our world. Though their size is but a pebble compared to their creators, their minds are perfected beyond measure. But the Dwarfs must hide from the eyes of the gods and their monstrous creations, the Dragons. As well as their zealots, the Iruxian bastards who now call themselves "Draconians";
Their matriarchal society may seem oppressive to outsiders, but it is necessary for their underground continuity;
The Law-Mothers, the first Dwarfs the Giants created, dictate the customs that the Dwarfs must live by, favoring preserving the same lifestyle as their architects, basking in their vast glories and devising new inventions with each passing day;
The family Matrons command each household, training their daughters and boys from birth to the coming roles they will assume in their society;
While women and lasses may become establishment owners, bankers, or even Matrons themselves, men and lads serve only as workforce, upper-world scouts, or bodyguards. It is one of the rarest sights to see a female Dwarf in the upper world, generally tending to be scorned or expelled from their subterranean society for unspoken crimes.
Few males can advance enough to be granted recognition in their roles. But when they accomplish this feat, they are revered to the same degree as a Law-mother. A strategy implemented so their morale may not falter during misfortune periods they may yet face.
The Dwarfs carry a heavy weight to preserve their ancestors' knowledge and customs. They hid their cities beneath the feet and eyes of thousands, but they did this mission hoping to persevere beyond these dark times and endure they shall. Their small stature misrepresents their mighty intellects and even mightier deeds. The dwarven society shall withstand the harshest of trials.</i>
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Ancestral Knowledge:</b>
<i>Dwarfs start with +10 points to distribute among their expertise.</i>
<h4>Reforger</h4>
<i>Dwarfs are able to improve their wearings any armor has a higher defense value based on its type.</i>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div align='center'>
<h1>Anões</h1>
<hr>
<h4> "Os orgulhosos decendentes de nossos soberanos usurpados." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>Os Anões, guardiões do conhecimento antigo, carregam o peso do legado de seus antepassados sobre seus ombros robustos. Seus ancestrais, os Gigantes caídos, os criaram para preservar suas conquistas dos deuses invasores que buscavam destruí-los. Os Anões são uma mistura da carne resiliente dos Gigantes e da rocha inabalável de seus lares nas montanhas, trazidos à vida pelo coração ardente de nosso mundo. Embora seu tamanho seja apenas uma pedra em comparação com seus criadores, suas mentes são aperfeiçoadas além da medida. Mas os Anões devem se esconder dos olhos dos deuses e de suas criações monstruosas, os Dragões. Assim como de seus fanáticos, os bastardos Iruxianos que agora se chamam de "Draconianos";
Sua sociedade matriarcal pode parecer opressiva para os estrangeiros, mas é necessária para sua continuidade subterrânea;
As Mães da Lei, os primeiros Anões criados pelos Gigantes, ditam os costumes pelos quais os Anões devem viver, favorecendo a preservação do mesmo estilo de vida de seus arquitetos, desfrutando de suas vastas glórias e inventando novas invenções a cada dia que passa;
As Matriarcas comandam cada família, treinando suas filhas e filhos desde o nascimento para os papéis futuros que assumirão em sua sociedade;
Enquanto mulheres e meninas podem se tornar proprietárias de estabelecimentos, banqueiras ou até mesmo Matriarcas, homens e rapazes servem apenas como mão de obra, exploradores do mundo superior ou guardiões. É uma das visões mais raras ver uma Anã no mundo superior, sendo geralmente tendo de ser desprezada ou expulsa de sua sociedade subterrânea por crimes não ditos.
Poucos machos conseguem avançar o suficiente para serem reconhecidos em seus papéis. Mas quando realizam esse feito, são reverenciados no mesmo grau que uma Mãe da Lei. Uma estratégia implementada para que sua moral não vacile durante os períodos de infortúnio que ainda podem enfrentar.
Os Anões carregam um peso enorme para preservar o conhecimento e os costumes de seus antepassados. Eles esconderam suas cidades sob os pés e os olhos de milhares, mas fizeram essa missão na esperança de perseverar além desses tempos sombrios e perseverarão. Sua pequena estatura representa mal seus poderosos intelectos e feitos ainda mais poderosos. A sociedade anã resistirá aos testes mais severos.</i>
</div>
<hr>
<div align='center'>
<h3>Traços:</h3>
<b>Conhecimento Ancestral:</b>
<i>Anões começam com +10 pontos para distribuir entre suas Perícias.</i>
<h4>Reforjadores</h4>
<i>Anões são capazes de melhorar a qualidade de suas armaduras. concebendo uma maior Defesa dependedo de seu tipo.</i>
<hr>
</div>
<</if>>
<<set $return to passage()>><<if $language === "EN">>
<div align='center'>
<h1>Elf</h1>
<hr>
<h4> "The gods once favored their progeny, or at least that was our belief." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>Conceived and shaped from the very heartwood of our world, they were instilled with life by the sovereignty of our novel divine overlords, devoid of any purpose but to propagate their lineage. These majestic and ethereal entities flourished with a yearning only for tranquil existence, even forsaking dominion over our realm to safeguard its harmonious equilibrium—a glint of benevolence amid the gods' release of the harrowing scourge known as the 'Dragons' whose fierce beasts were intended solely to eradicate the mighty giants and enthrone their creators as true sovereigns, forever altering our domain.
Yet, lamentably, this compassion is now entwined with encroaching madness.
Like an affliction ravaging their psyche, it inches inexorably through their ranks, slowly transmuting the once noble and intricate arboreal folk into ravenous brutes. They rend asunder and splay wide the roots of an ominous, twisted woodland—a forest consumed by a never-ending ravening appetite. That unveils each dawn, a deepening monstrosity of increasingly aberrant nature.
It comes as no shock that the wellspring of this ailment springs from one of their progenitors—Urahyahra, dubbed as the "Mother of Monsters." a title aptly earned, for she is the malign goddess of savagery and fecundity, a manifestation of the innate chaos that yearns for mortals to crave her triad of laws: breed, endure, and devour.
Now, the fate of their people falls upon the elves to unearth a remedy and quell the perverse longings of their sinister progenitor.</i>
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Favored</b>
<i>The gods give easier trials and tests for the Elfs.</i>
<b>Harmonious Existence:</b>
<i>Elfs add their Perception to their Lifeblood and Essence.</i>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div align='center'>
<h1>Elfos</h1>
<hr>
<h4> "Os deuses já favoreceram sua progênie, ou pelo menos essa era a nossa crença." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>Concebidos e moldados do próprio cerne de nosso mundo, eles foram dotados de vida pela soberania de nossos novos senhores divinos, desprovidos de qualquer propósito além de propagar sua linhagem. Essas entidades majestosas e etéreas floresceram com um anseio apenas por uma existência tranquila, até mesmo renunciando ao domínio sobre nosso reino para salvaguardar seu equilíbrio harmonioso—um lampejo de benevolência em meio à liberação dos deuses do flagelo atormentador conhecido como os 'Dragões', cujas feras ferozes foram destinadas apenas a erradicar os gigantes poderosos e entronizar seus criadores como verdadeiros soberanos, alterando para sempre nosso domínio.
No entanto, lamentavelmente, essa compaixão agora está entrelaçada com a loucura crescente.
Como uma aflição devastadora de sua psique, ela avança inexoravelmente por suas fileiras, transformando lentamente o povo arbóreo, nobre e intrincado em brutos vorazes. Eles destroem e abrem as raízes de uma floresta sinistra e distorcida—uma floresta consumida por um apetite insaciável e sem fim. Isso se revela a cada amanhecer, uma monstruosidade cada vez mais aberrante.
Não é surpresa que a fonte dessa doença emane de um de seus progenitores—Urahyahra, apelidada de "Mãe dos Monstros." um título merecido, pois ela é a deusa maligna da selvageria e fecundidade, uma manifestação do caos inato que anseia para que os mortais desejem sua tríade de leis: procriar, resistir e devorar.
Agora, o destino de seu povo recai sobre os elfos para descobrir um remédio e reprimir os desejos perversos de sua sinistra progenitora.</i>
</div>
<hr>
<div align='center'>
<h3>Traços:</h3>
<b>Favoritos</b>
<i>Os deuses concebem testes e desafios mais fáceis para os Elfos.</i>
<b>Existência Harmônica:</b>
<i>Elfos adicionam metade de sua Percepção para sua Força Vital e Essência.</i>
<hr>
</div>
<</if>>
<<set $return to passage()>>
<<if $language === "EN">><div align='center'>
<h2>Feral</h2>
<b>The Feral is a Specialization of the Barbarian Class that embodies the brutal and animalistic qualities of nature into a hectic fighter.</b>
<i><b>Main Attribute:</b> Resilience (RES)</i>
<i><b>Secondary Attribute:</b> Perception (PER)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Feral:</b> Natural Fighter: For each unequipped slot, increase your Damage by 2 and Defense by 1. At level 8 and 14, increase these values by 1</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Feral:</b> (Skill) Adrenaline Rush.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Feral:</b> (Skill) Mutilate.</i></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Barbarian:</b> Champion's Might: Add 1/2 of your resilience to your Damage and to your Athletics.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Feral</b> Savagery: Increase the damage of your mainhand and offhand by 1 step when unnequiped. (none to 1d4, 1d4 to 1d6, etc). Additionally, your offhand gains the weapon trait.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Feral:</b> Blood Frenzy: You recover 12.5% of the damage dealt as Lifeblood</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Barbarian:</b>Unending Vigor: At the start of each turn, regain 3% of your missing Lifeblood.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Feral:</b> Primal Fury: When unarmed, when dealing 20 or more damage on a attack, apply <b>Confusion</b> to the target.</i></td>
</tr>
<tr>
<td>At level 17 | <i><b>Feral</b>(Skill) Rage.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
A Feral character starts with:
- Nothing -
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Selvagem</h2>
<b>O Selvagem é uma Especialização da Classe Bárbaro que incorpora as qualidades brutais e animalísticas da natureza em um lutador agitado.</b>
<i><b>Atributo Principal:</b> Resiliência (RES)</i>
<i><b>Atributo Secundário:</b> Percepção (PER)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Selvagem:</b> Lutador Natural: Para cada slot de equipamento desequipado, aumente seu Dano em 2 e sua Defesa em 1. Nos niveis 8 e 14, aumente esses valores em 1.</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Selvagem:</b> (Habilidade) Pico de Adrenalina.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Selvagem:</b> (Habilidade) Mutilar.</i></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Bárbaro:</b> Poder do Campeão: Adicione 1/2 de sua resiliência ao seu Dano e à sua Atletismo.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Selvagem:</b> Selvageria: Aumente o dano do seu punho principal e de sua mão secundário em 1 passo quando desequipados. Além disso, sua mão sêcundária ganha o traço de arma mesmo quando desequipada.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Selvagem:</b> Frenesi Sanguinário: Você recupera 12.5% do dano causado como Força Vital</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Bárbaro:</b> Vigor Infinito: No início de cada turno, recupere 3% de sua Força Vital perdida.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Selvagem:</b> Fúria Primordial: Quando desarmado, ao causar 20 ou mais de Dano com Ataques aplique <b>Confusão</b> ao alvo.</i></td>
</tr>
<tr>
<td>No nível 17 | <i><b>Selvagem</b> (Habilidade) Fúria.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
</table>
<hr>
Um personagem Selvagem começa com:
<ul>
<li>Nada</li>
</ul>
<hr>
</div>
<</if>><<if $language === "EN">>
<div align='center'>
<h1>Herald</h1>
<hr><h4> "The undesired children of the greatest powers combined." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>Little there is to tell about the Heralds, beings that exist as an unforeseen consequence of the Giants' unnerving natural immunity to the mystical powers of the otherworldly deities that invaded our realm. They are not born of flesh and lifeblood. Nor bestowed life by any creator; No, they are the essence of the arcane itself, given corporeal form and an independent consciousness. These creatures are the offspring of fathers and mothers who harbored an intense hatred for one another, striving to maintain a veneer of ignorance regarding their newfound progeny.
However, with the fall of the Giants into the ravenous maws of the dreadful Dragons, the Heralds came to be perceived as a potential threat. Unfortunately for them, when struck with a fatal blow, they release the esoteric energies that sustain their forms, unleashing cataclysmic devastation to those nearby, leaving behind only distorted, charred, and mutated remains by the not supposed-to-be contained magic. Due to this devastating consequence, it alone retains the divinities' hands from eradicating their existence, for without this self-destructive safeguard, perhaps they would be permitted to coexist with other beings. Instead, they have to live in isolation for years or maybe centuries;
A Herald, as it seems, is nothing more than a harbinger of its torment and loneliness.</i>
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Arcane Core:</b>
<i>When near death, Heralds release all their remaining Essence to damage nearby enemies.</i>
<span id=choicetextA>
<<if $HeraldChoice !== "">>
<</if>>
</span>
<table>
<thead>
<tr>
<th></th>
<th><b>Choose your Calling:</b></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><<nobr>><<button "Nature's Harbinger">>
<<set $HeraldChoice = "Nature's Harbinger">>
<<replace "#choicetextA">>
<p>You have chosen to be a <<print $HeraldChoice>>.</p>
<p>When answered the call of Nature, the world around a Herald strengthens their form, solidifying the magic inside them.</P>
<p><b>Nature's Blessing:</b></p>
<p>Your maximum Essence is halved. Add your Esence to your Lifeblood.</p>
<</replace>>
<</button>><</nobr>></td>
<td><<nobr>><<button "Cosmos' Harbinger">>
<<set $HeraldChoice = "Cosmos' Harbinger">>
<<replace"#choicetextA">>
<p>You have chosen to be a <<print $HeraldChoice>>.</p>
<p>When answered the call of the Cosmos, a Herald's mind is filled with the infinitude of the cosmos' knowledge and madness.</p>
<p><b>Astral Connection:</b> </p>
<p>When near Secrets, you may expend a bit of your Essence to reveal them .</p>
<</replace>>
<</button>><</nobr>></td>
<td><<nobr>><<button "Creation's Harbinger">>
<<set $HeraldChoice = "Creation's Harbinger">>
<<replace "#choicetextA">>
<p>You have chosen to be a <<print $HeraldChoice>>.</p>
<p>When answered the call of Creation, tjhe contained magic inside a Herald is allowed to remake itself and take the form of trinkets or objects.</p>
<p><b>Architect of Reality:</b></p>
<p>A Herald may pay part of their Essence to create "Object" items.</p>
<</replace>>
<</button>><</nobr>></td>
<td><<nobr>><<button "Destruction's Harbinger">>
<<set $HeraldChoice = "Destruction's Harbinger">>
<<replace "#choicetextA">>
<p>You have chosen to be a <<print $HeraldChoice>>.</p>
<p>When answered the call of Destruction, a Heralds is able to consume part of the Essence of others into themselves.</p>
<p><b>Eternal Hunger:</b></p>
<p>During combat, when a Herald slays an enemy, regain a part of your lost Essence.</p>
<</replace>>
<</button>><</nobr>></td>
</tr>
</tbody>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div align='center'>
<h1>Arauto</h1>
<hr><h4> "As indesejadas crianças dos maiores poderes combinados." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>Pouco há para contar sobre os Arautos, seres que existem como uma consequência imprevista da imunidade natural perturbadora dos Gigantes aos poderes místicos das divindades de outro mundo que invadiram nosso reino. Eles não nascem da carne e do sangue. Nem recebem vida de qualquer criador; não, eles são a essência do próprio arcano, dando forma corpórea e consciência independente. Essas criaturas são os filhos de pais e mães que nutriam um ódio intenso um pelo outro, lutando para manter uma aparência de ignorância em relação à sua prole recém-descoberta.
No entanto, com a queda dos Gigantes nas mandíbulas vorazes dos terríveis Dragões, os Arautos passaram a ser percebidos como uma ameaça potencial. Infelizmente para eles, quando atingidos por um golpe fatal, liberam as energias esotéricas que sustentam suas formas, desencadeando uma devastação cataclísmica para aqueles próximos, deixando para trás apenas restos distorcidos, carbonizados e mutados pela magia que não deveria ser contida. Devido a essa consequência devastadora, apenas isso impede as mãos das divindades de erradicar sua existência, pois sem esse salvaguarda autodestrutivo, talvez lhes fosse permitido coexistir com outros seres. Em vez disso, eles têm que viver isolados por anos ou talvez séculos;
Um Arauto, ao que parece, não é nada mais do que um mensageiro de seu tormento e solidão.</i>
</div>
<hr>
<div align='center'>
<h3>Traços:</h3>
<b>Núcleo Arcano:</b>
<i>Quando próximo da morte, Arautos dispersam toda Essência restante para danificar todos os inimigos.</i>
<span id=choicetextA>
<<if $HeraldChoice !== "">>
<</if>>
</span>
<table>
<thead>
<tr>
<th></th>
<th><b>Escolha seu Chamado:</b></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><<nobr>><<button "Prenúncio da Natureza">>
<<set $HeraldChoice = "Nature's Harbinger">>
<<replace "#choicetextA">>
<p>Você escolheu ser um Arauto da Natureza.</p>
<p>Quando respondido o chamado da Natureza, o mundo ao redor do Arauto reforça sua forma, solidificando a magia dentro deles.</P>
<p><b>Bença da Naturaza:</b></p>
<p>Sua Essência máxima é reduzida pela metada. Aumente sua Força Vital por sua Essência.</p>
<</replace>>
<</button>><</nobr>></td>
<td><<nobr>><<button "Prenúncio do Cosmos">>
<<set $HeraldChoice = "Cosmos' Harbinger">>
<<replace"#choicetextA">>
<p>Você escolheu ser um Arauto do Cosmos.</p>
<p>Quando respondido o chamado do Cosmos, a mente de um Arauto é preenchida pela infinitude do conhecimento e loucura do Cosmos.</p>
<p><b>Conecção Astral:</b> </p>
<p>Quando perto de segredos, você oferecer parte de sua Essência para revela-los.</p>
<</replace>>
<</button>><</nobr>></td>
<td><<nobr>><<button "Prenúncio da Criação">>
<<set $HeraldChoice = "Creation's Harbinger">>
<<replace "#choicetextA">>
<p>Você escolheu ser um Arauto da Criação.</p>
<p>Quando respondido o chamado da Criação, a magia contida do Arauto pode se reformar e tomar a forma de pequenos itens ou objetos.</p>
<p><b>Arquiteto da Realidade:</b></p>
<p>Você pode criar items do tipo "Objeto" gastando parte de sua Essência.</p>
<</replace>>
<</button>><</nobr>></td>
<td><<nobr>><<button "Prenúncio da Destruição">>
<<set $HeraldChoice = "Destruction's Harbinger">>
<<replace "#choicetextA">>
<p>Você escolheu ser um Arauto da Destruição.</p>
<p>Quando respondido o chamado da Destruição, um Arauto é capaz de consumir a essencia de outros para si.</p>
<p><b>Fome Eterna:</b></p>
<p>Durante Combate, quando um inimigo é morto, recupera parte de sua Essência perdida.</p>
<</replace>>
<</button>><</nobr>></td>
</tr>
</tbody>
</table>
<hr>
</div>
<</if>>
<<set $return to passage()>>
<<if $language === "EN">>
<div align='center'>
<h1>Human</h1>
<hr>
<i><b> "To be Human means to have but two choices: to be a slave in the Draconian's claws. Or at a Human's hand." </b></i>
<hr>
<h2>Lore:</h2>
</div>
<div align='left'>
<i>Over the centuries, humanity lived in a fragile peace, merely observing the Old War's ferocity from the sidelines, their hands untainted by the bloodshed as they fixated on their development. Expanding the horizons of their borders and unfurling the banners of progress, they sculpted for themselves a world seemingly untouched by the world's turmoil.
However, as the colossal giants succumbed to the might of the terrible Dragons, their titan frames shattered just as their sovereignty crumbled, and a sinister shift stained the horizon as otherworldly outsiders crowned themselves as divinities of the world. Swiftly, humanity dispatched expeditions to the fallen giants' desolated cities, driven perhaps either by an insatiable hunger for arcane technologies and artifacts or their fear of yielding some of the prosperity they forged for themselves. Their urge to uncover the world's hidden wisdom propelled their actions, yet, in their ceaseless search, they unearthed not the coveted mastery but rather the dormant embers of animosity—embers seen as hallowed by the Draconians.
In the Draconians' eyes, these human incursions were nothing short of sacrilegious plundering, a transgression against the spoils rightfully earned by the Dragons through their relentless battles against the towering Giants. As such, an inferno of rage blazed within the Draconians' hearts, an all-consuming fire that ignited retribution. Humanity's fate veered that day, forever shackled by the draconic dominion.
Within the Draconian order, a sinister faction emerged—the Scalebounds, draconic knights ordained with the grim task of guarding the artifacts left by the Giants and relentlessly hunting humans for enslavement. When the Draconians swept over human cities and capitals, a tidal wave of domination tumbling over the grandeur of their empire, the Scalebounds emerged as the enforcers of oppression. Their armor, forged from Dragon scales, became a chilling emblem of submission and dread.
In the aftermath of the Draconian onslaught, a handful of humans endure, their lives teetering on the precipice between survival and subjugation. They cloak themselves in shadows, ghosting through a world now cast in Draconian chains, evading the ravenous jaws that ache for their enslavement. Others opt for an alternative, navigating the desolate wastelands to the west, where the landscape's unforgiving bleakness mirrors their despair. Amidst this desolation, a faint glimmer endures—a spark of the indomitable human spirit. This flame, a testament to resilience, flickers amidst the torrent of Draconian dominion, an embodiment of defiance that declares even in the abyssal depths of adversity;
Liberation remains a possibility.
Curiously, there be another faction of humans—the dwellers of the Great Desert. These individuals, driven by a rapacious pursuit of wealth as much as power, had long sponsored the very explorations that would eventually unleash the Draconians. Their hands remained unscathed, spared by the vast distances that separated them from the fires of vengeance. Ironically, they title themselves the "Free Humans," standing as a paradox, for their social hierarchy relegates the less fortunate to near-slavery, a cruel mimicry of the Draconians' oppression. A sinister marketplace emerges, where these "Free Humans" willingly barter their less privileged brethren to the Draconians in exchange for substantial resources, valuing riches over the lives they discard.</i>
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Adaptable:</b>
<i>Humans start with +5 points to distribute among their Attributes.</i>
<b>Unlimited Potential:</b>
<i>Whenever a Human levels up, they gain +1 point to distribute among their Expertises.</i>
</div>
<<elseif $language === "PT-BR">>
<div align='center'>
<h1>Humanos</h1>
<hr>
<i><b> "Ser um Humano siginifica ter apenas duas escolhas: ser um escravo nas garras dos Draconianos. Ou em mãos humanas."</b></i>
<hr>
<h2>Lore:</h2>
</div>
<div align='left'>
<i>Ao longo dos séculos, a humanidade viveu em uma paz frágil, observando meramente a ferocidade da Antiga Guerra à distância, suas mãos intocadas pelo derramamento de sangue enquanto se concentravam em seu desenvolvimento. Expandindo os horizontes de suas fronteiras e desfraldando as bandeiras do progresso, eles esculpiram para si um mundo aparentemente intocado pelas turbulências do mundo.
No entanto, à medida que os gigantes colossais sucumbiram ao poder dos terríveis Dragões, suas estruturas titânicas se despedaçaram, assim como sua soberania se desmoronou, e uma sinistra mudança manchou o horizonte quando estrangeiros de outro mundo se coroaram divindades do mundo. Rapidamente, a humanidade despachou expedições para as cidades desoladas dos gigantes caídos, impulsionada talvez por um apetite insaciável por tecnologias e artefatos arcanos ou pelo medo de ceder parte da prosperidade que eles forjaram para si. Seu desejo de descobrir a sabedoria oculta do mundo impulsionou suas ações, no entanto, em sua busca incessante, eles desenterraram não a maestria cobiçada, mas sim as brasas adormecidas da animosidade—brasas vistas como sagradas pelos Draconianos.
Aos olhos dos Draconianos, essas incursões humanas não foram nada menos que saques sacrílegos, uma transgressão contra os despojos legitimamente conquistados pelos Dragões através de suas batalhas implacáveis contra os Gigantes imponentes. Como tal, um inferno de raiva ardia nos corações dos Draconianos, um fogo devorador que incendiava a retribuição. O destino da humanidade desviou-se naquele dia, para sempre acorrentado pelo domínio draconiano.
Dentro da ordem Draconiana, uma facção sinistra emergiu—os Encouraçados, cavaleiros draconianos ordenados com a sombria tarefa de guardar os artefatos deixados pelos Gigantes e caçar implacavelmente os humanos para escravizá-los. Quando os Draconianos varreram as cidades e capitais humanas, uma onda de dominação se abateu sobre a grandeza de seu império, os Encouraçados surgiram como os executores da opressão. Sua armadura, forjada a partir das escamas dos Dragões, tornou-se um emblema arrepiante de submissão e terror.
Na esteira do ataque Draconiano, alguns poucos humanos sobrevivem, suas vidas oscilando no precipício entre a sobrevivência e a subjugação. Eles se envolvem em sombras, deslizando por um mundo agora lançado em correntes Draconianas, escapando das mandíbulas vorazes que anseiam por sua escravidão. Outros optam por uma alternativa, navegando pelas terras desoladas a oeste, onde a desolação implacável do cenário espelha seu desespero. Em meio a essa desolação, um brilho tênue persiste—uma centelha do espírito humano indomável. Esta chama, um testamento à resiliência, tremula em meio à torrente do domínio Draconiano, uma encarnação de desafio que declara mesmo nas profundezas abissais da adversidade;
A libertação permanece uma possibilidade.
Curiosamente, há outra facção de humanos—os habitantes do Grande Deserto. Estes indivíduos, impulsionados por uma busca rapaz de riqueza tanto quanto poder, há muito tempo patrocinavam as explorações que eventualmente libertariam os Draconianos. Suas mãos permaneceram ilesas, poupadas pelas vastas distâncias que os separavam das chamas da vingança. Ironicamente, eles se intitulam os "Humanos Livres", um paradoxo, pois sua hierarquia social relega os menos afortunados à quase escravidão, uma cruel imitação da opressão dos Draconianos. Um mercado sinistro emerge, onde esses "Humanos Livres" trocam voluntariamente seus irmãos menos privilegiados pelos Draconianos em troca de recursos substanciais, valorizando riquezas sobre as vidas que descartam.</i>
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Adaptáveis:</b>
<i>Humanos começam com +5 pontos para distribuir entre seus Atributos.</i>
<b>Potêncial Ilitimitado:</b>
<i>Sempre que um Humano sobe de nível, eles ganham +1 ponto para distribuir entre suas Perícias.</i>
</div>
<</if>>
<<set $return to passage()>><<if $language === "EN">><div align='center'>
<h2>Inquisitor</h2>
<b>The Inquisitor is a Specialization of the Devotee Class that bring fervent punishment for those that defy your holy endevours.</b>
<i><b>Main Attribute:</b> Perception (PER)</i>
<i><b>Secondary Attribute:</b> Dexterity (DEX)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Inquisitor:</b> Brand the Heretic: Whenever you hit an enemy with a weapon attack, apply <b>Burn</b> to the target .</i></td>
</tr>
<td>At level 03 | <i><b>Devotee:</b> Divine Blessings I: Whenever you cast a Holy Spell, gain 2 stacks of <b>Piety</b>, at the end of your turn, you heal yourself by 1 for each 6 stack of <b>Piety</b>. Casting a non-Holy Spell, reset all points of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Inquistor:</b> Brazen Inquiry: Add 1/3 of your Perception to Intimidation and Speech tests. Additionally, applying <b>Burn</b> to an enemy gives 2 stacks of <b>Piety</b></i> </td>
</tr>
<tr>
<td>At level 08 | <i><b>Devotee:</b> Divine Blessings II: <b>Piety</b> increases your Defense and Damage by 1 for every 6 points.</i>.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Inquisitor:</b> Blessed Flames: <b>Burning</b> enemies take 1 additional damage for every 6 stacks of your <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Devotee:</b> Divine Blessings III: Increases by 1 all values given due <b>Piety</b> for every 12 stacks of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 15 |<i><b>Inquisitor:</b> Fervorous Zeal: Whenever an enemy takes damage due to <b>Burn</b>, heal yourself by 4 for each stack of <b>Burn</b> and increase your <b>Piety</b> by 1.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Inquisitor:</b> Fiery Cleasing: Whenever you apply <b>Burn</b> to an enemy, add 2 more stacks.</i></td>
</tr>
</table>
<hr>
<div align='center'>
An Inquisitor character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Holy Garments</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Mace</i></td>
<td><b>Offhand:</b> <i>Dvine Symbol</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Inquisidor</h2>
<b>O Inquisidor é uma Especialização da Classe Devoto que traz punições fervorosas para aqueles que desafiam seus empreendimentos sagrados.</b>
<i><b>Atributo Principal:</b> Percepção (PER)</i>
<i><b>Atributo Secundário:</b> Força (FOR)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Inquisidor:</b> Brandai os Hereges: Sempre que acertar um inimigo com um ataque armado, aplique <b>Queimadura</b> no alvo.</i></td>
</tr>
<tr>
td>No nível 03 | <i><b>Devoto:</b> Bênçãos Divinas I: Sempre que lançar um Feitiço Sagrado, ganhe 2 acúmulos de <b>Piedade</b>. No final de seu turno, cure-se em 1 para cada 6 acúmulos de <b>Piedade</b>. Ao lançar um Feitiço não Sagrado, resete todos os pontos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Inquisidor:</b> Inquérito Descarado: Adicione 1/3 da sua Percepção aos testes de Intimidação e Persuasão.
Além disso, aplicar <b>Queimadura</b> a um inimigo dá 2 acúmulos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Devoto:</b> Bênçãos Divinas II: <b>Piedade</b> aumenta sua Defesa e Dano em 1 para cada 6 pontos.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Inquisidor:</b> Chamas Abençoadas: Inimigos <b>Queimando</b> recebem 1 dano adicional para cada 6 acúmulos de sua <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Devoto:</b> Bênçãos Divinas III: Aumenta em 1 todos os valores dados devido à <b>Piedade</b> para cada 12 acúmulos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 15 |<i><b>Inquisidor:</b> Zelo Fervoroso: Sempre que um inimigo sofre dano devido a <b>Queimadura</b>, cure-se em 4 para cada acúmulo de <b>Queimadura</b> e aumente sua <b>Piedade</b> em 1.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Inquisidor:</b> Purificação Ardente: Sempre que aplicar <b>Queimadura</b> a um inimigo, adicione +2 acúmulos a mais.</i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Inquisidor começa com:
<ul>
<li><b>Torso:</b> <i>Vestes Sagradas</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Maça</i></li>
<li><b>Mão Secundária:</b> <i>Símbolo Divino</i></li>
</ul>
</div>
<hr>
</div>
<</if>><div align='center'>
<<if $language is "EN">> <p> [[Character Page|Characterpage]] | [[Jornal]]</p> <<elseif $language is "PT-BR">> <p> [[Página do Personagem|Characterpage]] | [[Jornal]]</p><</if>>
</div>
| <h3>Equipment</h3> |
<div id="gear-container">
<span id="gear">
<b>Head:</b> <<print $character[1].equipment.head.Name>> <<if $character[1].equipment.head.Name !== 'Empty Head'>> <button onclick='unequipItem("head")'>Unequip</button> <<endif>>
<<print '<img src="' + $character[1].equipment.head.icon + '">'>>
<i><<print $character[1].equipment.head.Description>></i>
<b>Torso:</b> <<print $character[1].equipment.torso.Name>> <<if $character[1].equipment.torso.Name !== 'Empty Torso'>> <button onclick='unequipItem("torso")'>Unequip</button> <<endif>>
<<print '<img src="' + $character[1].equipment.torso.icon + '">'>>
<i><<print $character[1].equipment.torso.Description>></i>
<b>Waist:</b> <<print $character[1].equipment.waist.Name>> <<if $character[1].equipment.waist.Name !== 'Empty Waist'>> <button onclick='unequipItem("waist")'>Unequip</button> <<endif>>
<i><<print $character[1].equipment.waist.Description>></i>
<b>Legs:</b> <<print $character[1].equipment.legs.Name>> <<if $character[1].equipment.legs.Name !== 'Empty Legs'>> <button onclick='unequipItem("legs")'>Unequip</button> <<endif>>
<i><<print $character[1].equipment.legs.Description>></i>
<b>Feet:</b> <<print $character[1].equipment.feet.Name>> <<if $character[1].equipment.feet.Name !== 'Empty Feet'>> <button onclick='unequipItem("feet")'>Unequip</button> <<endif>>
<i><<print $character[1].equipment.feet.Description>></i>
<b>Main hand:</b> <<print $character[1].equipment.mainhand.Name>> <<if $character[1].equipment.mainhand.Name !== 'Fist' && $character[1].equipment.mainhand.Name !== 'Draconian claws'>> <button onclick='unequipItem("mainhand")'>Unequip</button> <<endif>>
<<print '<img src="' + $character[1].equipment.mainhand.icon + '">'>>
<i><<print $character[1].equipment.mainhand.Description>></i>
<b>Offhand:</b> <<print $character[1].equipment.offhand.Name>> <<if $character[1].equipment.offhand.Name !== 'Other hand' && $character[1].equipment.offhand.Name !== 'Handler'>> <button onclick='unequipItem("offhand")'>Unequip</button> <<endif>>
<i><<print $character[1].equipment.offhand.Description>></i>
</span>
</div>
<b>Gold</b> <i><<print $character[1].Gold>></i>
<hr>
<div id="inventory" align="center">
<h3>Inventory</h3>
<<for _i to 0; _i lt $character[1].inventory.length; _i++>>
<<nobr>>
<<set _item to $character[1].inventory[_i]>>
<<if _item.Slot && !_item.Type.includes("bornwith")>>
<table>
<tr>
<td>
<<print '<img src="' + _item.icon + '" style="float:left; margin-right:10px;">'>>
</td>
<td>
<p>[<<print _item.Name>> | x <<print _item.count>>] <<print _item.Type.join(" ,")>></p>
<p><<if _item.hasOwnProperty("Damage") && _item.Damage !== undefined>><<print _item.Damage>><</if>> | <<if _item.hasOwnProperty("Defense") && _item.Defense !== undefined || _item.Defense !== 0>><<print _item.Defense>><</if>></p>
<<capture _item>>
<<if _item.Type.includes("instrument") || _item.Type.includes("wearable") || _item.Type.includes("weapon") || _item.Type.includes("shield")>>
<p><<link "Equip _item.Name">> <<notify 2s "Inventory">>You equipped _item.Name<</notify>> <<equipItem _item.Name>><<run updateGearDisplay()>><<run window.updateInventoryDisplay()>><</link>> - <i><<print _item.Description>></i></p>
<<elseif _item.Type.includes("Usable")>>
<p><<link "Use _item.Name">><<run _item.onUse>><</link>></p>
<</if>>
<</capture>>
</td>
</tr>
</table>
<<else>>
<p>[<<print _item.Name>> | x <<print _item.count>> | <<print _item.equipped>>]</p>
<</if>>
<</nobr>>
<</for>>
</div>
<hr>
<<script>>
setTimeout(window.updateGearDisplay,0)
setTimeout(window.updateInventoryDisplay, 0)
<</script>>
<<if $language === "EN">><div align='center'>
<h2>Juggernaut</h2>
<b>The Juggernaut is a Specialization of the Barbarian Class that focuses on having impossible amounts of Defense, outlasting any enemy that may come your way.</b>
<i><b>Main Attribute:</b> Resilience (RES)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Juggernaut:</b> Iron Suit: For each equipped slot, increase your Defense by 2. At level 10, increase the bonus to 3.</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Juggernaut:</b> Titanic: While above of 70% of your Lifeblood, increase your damage and hit chance by 5. At level 5 and 10, increase these values by 5.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Barbarian:</b> Champion's Might: Add half of your resilience to your Damage and to your Athletics.</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Juggernaut</b> (Skill). Taunt.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Juggernaut:</b> Spiked: When you are attacked, deal damage equal to 10% of your Defense back to your attacker.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Barbarian:</b>Unending Vigor: At the start of each turn, regain 3% of your missing Lifeblood.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Juggernaut:</b> Body Slam: During combat, if your damage is lower than your Defense, increase your damage to your Defense.</i></td>
</tr>
<tr>
<td>At level 17 | <i><b>Juggernaut:</b> (Skill) Sacrifice Armor.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
A Juggernaut character starts with:
<table>
<tr>
<td><b>Head:</b> <i>Coif</i></td>
<td><b>Torso:</b> <i>Leather Armor</i></td>
<td><b>Waist:</b> <i>Buckle</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Rusted Sword</i></td>
<td><b>Offhand:</b> <i>Wooden Shield</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Juggernaut</h2>
<b>O Juggernaut é uma Especialização da Classe Bárbaro que se concentra em ter quantidades impossíveis de Defesa, resistindo a qualquer inimigo que possa surgir no seu caminho.</b>
<i><b>Atributo Principal:</b> Resiliência (RES)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Juggernaut:</b> Armadura de Ferro: Para cada slot equipado, aumente sua Defesa em 2. A partir do nível 10, aumente o bonus para 3.</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Juggernaut:</b> Titânico: Quando acima de 70% da sua Vida, aumente seu Dano e Chance de Acerto em 5. No nivel 5 e 10, aumente esses valores em 5.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Bárbaro</b> Poder do Campeão: Adicione 1/2 da sua resiliência ao seu Dano e à sua Atletismo.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Juggernaut:</b> (Habilidade) Provocar.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Juggernaut:</b> Espetado: Quando você é atacado, cause dano igual a 10% da sua Defesa contra seu atacante.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Bárbaro:</b> Vigor Infinito: No início de cada turno, recupere 3% de sua Força Vital perdida.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Juggernaut:</b> Arremesso de Corpo: Durante o combate, se seu dano for menor que sua Defesa, aumente seu dano para o valor da sua Defesa.</i></td>
</tr>
<tr>
<td>No nível 17 | <i><b>Juggernaut</b> (Habilidade) Sacrificar Armadura.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
</table>
<hr>
Um personagem Juggernaut começa com:
<ul>
<li><b>Cabeça:</b> <i>Touca</i></li>
<li><b>Torso:</b> <i>Armadura de Couro</i></li>
<li><b>Cintura:</b> <i>Fivela</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Espada Enferrujada</i></li>
<li><b>Mão Secundária:</b> <i>Escudo de Madeira</i></li>
</ul>
<hr>
</div>
<</if>><<nobr>>
<<if $moon == 31>><<set $moon to 1>><</if>>
/*New moon*/
<<if $moon == 1>>🌑
/*Waxing Crescent*/
<<elseif $moon >= 2 && $moon <= 7>>🌒
/*First Quarter*/
<<elseif $moon == 8>>🌓
/*Waxing Gibbous*/
<<elseif $moon >= 9 && $moon <= 15>>🌔
/*Full moon*/
<<elseif $moon == 16>>🌕
/*Waning Gibbous*/
<<elseif $moon >= 17 && $moon <= 23>>🌖
/*Third Quarter*/
<<elseif $moon == 24>>🌗
/*Waning Crescent*/
<<elseif $moon >= 25 && $moon <= 30>>🌘<</if>>
<</nobr>><<if $language === "EN">><div align='center'>
<h2>Paladin</h2>
<b>The Paladin is a Specialization of the Devotee Class that bounds the player to an oath that empowers the paladin.</b>
<i><b>Main Attribute:</b> Perception (PER)</i>
<i><b>Secondary Attribute:</b> Strenght (STR)</i>
<h3>Oath of:</h3>
<span id="Oath">
<table>
<thead>
<tr>
<th>Selfishness:</th>
<th>Conquest:</th>
<th>Liberty:</th>
<th>Justice:</th>
</tr>
</thead>
<tbody>
<tr>
<td>The Oath of Selfishness demands that you act on your desires, free to do as you please, without fear of facing consequences.</td>
<td>The Oath of Conquest demands that you enforce your will upon others, making them submit to your laws.</td>
<td>The Oath of Liberty demands you to guarantee the freedom of all living beings, allowing them to act on their desires while understanding the consequences of doing so.</td>
<td>The Oath of Justice demands of you to uphold the law and good of all and societies</td>
</tr>
<tr>
<td><<button "Selfishness">><<set $character[1].Oath to "Selfishness">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Selfishness:</th>
<th>Conquest:</th>
<th>Liberty:</th>
<th>Justice:</th>
</tr>
</thead>
<tbody>
<tr>
<td>The Oath of Selfishness demands that you act on your desires, free to do as you please, without fear of facing consequences.</td>
<td>The Oath of Conquest demands that you enforce your will upon others, making them submit to your laws.</td>
<td>The Oath of Liberty demands you to guarantee the freedom of all living beings, allowing them to act on their desires while understanding the consequences of doing so.</td>
<td>The Oath of Justice demands of you to uphold the law and good of all and societies</td>
</tr>
<tr>
<td>You have sworn to act upon this cause.</td>
<td>You made an oath to Selfishness.</td>
<td>You made an oath to Selfishness.</td>
<td>You made an oath to Selfishness.</td>
</tr>
</tbody>
</table>
<</replace>>
>><</button>></td>
<td><<button "Conquest">><<set $character[1].Oath to "Conquest">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Selfishness:</th>
<th>Conquest:</th>
<th>Liberty:</th>
<th>Justice:</th>
</tr>
</thead>
<tbody>
<tr>
<td>The Oath of Selfishness demands that you act on your desires, free to do as you please, without fear of facing consequences.</td>
<td>The Oath of Conquest demands that you enforce your will upon others, making them submit to your laws.</td>
<td>The Oath of Liberty demands you to guarantee the freedom of all living beings, allowing them to act on their desires while understanding the consequences of doing so.</td>
<td>The Oath of Justice demands of you to uphold the law and good of all and societies</td>
</tr>
<tr>
<td>You made an oath to Conquest.</td>
<td>You have sworn to act upon this cause.</td>
<td>You made an oath to Conquest.</td>
<td>You made an oath to Conquest.</td>
</tr>
</tbody>
</table>
<</replace>><</button>></td>
<td><<button "Liberty">><<set $character[1].Oath to "Liberty">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Selfishness:</th>
<th>Conquest:</th>
<th>Liberty:</th>
<th>Justice:</th>
</tr>
</thead>
<tbody>
<tr>
<td>The Oath of Selfishness demands that you act on your desires, free to do as you please, without fear of facing consequences.</td>
<td>The Oath of Conquest demands that you enforce your will upon others, making them submit to your laws.</td>
<td>The Oath of Liberty demands you to guarantee the freedom of all living beings, allowing them to act on their desires while understanding the consequences of doing so.</td>
<td>The Oath of Justice demands of you to uphold the law and good of all and societies</td>
</tr>
<tr>
<td>You made an oath to Liberty.</td>
<td>You made an oath to Liberty.</td>
<td>You have sworn to act upon this cause.</td>
<td>You made an oath to Liberty.</td>
</tr>
</tbody>
</table>
<</replace>><</button>></td>
<td><<button "Justice">><<set $character[1].Oath to "Justice">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Selfishness:</th>
<th>Conquest:</th>
<th>Liberty:</th>
<th>Justice:</th>
</tr>
</thead>
<tbody>
<tr>
<td>The Oath of Selfishness demands that you act on your desires, free to do as you please, without fear of facing consequences.</td>
<td>The Oath of Conquest demands that you enforce your will upon others, making them submit to your laws.</td>
<td>The Oath of Liberty demands you to guarantee the freedom of all living beings, allowing them to act on their desires while understanding the consequences of doing so.</td>
<td>The Oath of Justice demands of you to uphold the law and good of all and societies</td>
</tr>
<tr>
<td>You made an oath to Justice.</td>
<td>You made an oath to Justice.</td>
<td>You made an oath to Justice.</td>
<td>You have sworn to act upon this cause.</td>
</tr>
</tbody>
</table>
<</replace>><</button>></td>
</tr>
</tbody>
</table>
</span>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Paladin:</b> Aura of Devotion: Paladins get different bonuses depending on their Oaths.</i>
(Selfishness) Aura of the Uncaring: Increase your Damage by five (5) and your Sleight of Hands by 1/3 of your Perception;
(Conquest): Aura of Tyrants: Increase your Damage by five (5) and your Intimidation by 1/3 of your Perception;
(Liberty) Aura of the Dauntless: Increase your Defense by five (5) and your Acrobatics by 1/3 of your Perception;
(Justice) Aura of Heroism: Increase your Defense by five (5) and your Athletics by 1/3 of your Perception.
Increase the bonus by 3 every 5 levels.
</td>
</tr>
<tr>
<td>At level 02 | <i><b>Paladin:</b> Oathkeeper: Whenever you make a choice that aligns with your Oath or a test correspondending to your Aura, you gain 1 permanent stack of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Devotee:</b> Divine Blessings I: Whenever you cast a Holy Spell, gain 2 stacks of <b>Piety</b>, at the end of your turn, you heal yourself by 1 for each 6 stack of <b>Piety</b>. Casting a non-Holy Spell, reset all points of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Paladin:</b> War Blessings: Add the "Smite" and "Blessed Strikes" skills.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Devotee:</b> Divine Blessings II <b>Piety</b> increases your Defense and Damage by 1 for every 6 points.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Paladin:</b> Faith in Arms:
(Selfishness) - Whenever you make an improved weapon attack, regain 3% of your total Essence.
(Conquest) - Whenever you make an improved weapon attack, decrease the target's defense by 3.
(Liberty) - Whenever you make an improved weapon attack, reduce your status effects (Burning, Confusion, Hindered, etc...) by 1 turn.
(Justice) - Whenever you make an improved weapon attack, increase your Defense by 3.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Paladin:</b> Sacred Cause: Whenever you would take more than 25 damage in a single strike, reduce the damage taken by 5 + 1 for each 6 stacks of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Devotee:</b> Divine Blessings III: Increases by 1 all values given due <b>Piety</b> for every 12 stacks of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Paladin:</b> Embezoned Armaments: At the start of your turn, gain a Improved Attack. Additionally, your improved weapon attacks deal 1d6 additional damage, add another 1d6 if the target is a Daemon, Vampyr or Undead .</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Paladin:</b> Champion of:
(Selfishness) - When you are attacked, cast Smite on the attacker if available.
(Conquest) - Instead of Healing at the end of your turn, your Divine Blessing I now deals damage to each enemy.
(Liberty) - You are immune to Stunned and Hindered status.
(Justice) - Increase your total Lifeblood by 50%, whenever you are attacked, reduce the damage received by 5%.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Paladin character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Holy Garments</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Warhammer</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Paladino</h2>
<b>O Paladino é uma Especialização da Classe Devoto que vincula o jogador a um juramento que fortalece o paladino.</b>
<i><b>Atributo Principal:</b> Percepção (PER)</i>
<i><b>Atributo Secundário:</b> Resiliência (RES)</i>
<h3>Juramento de:</h3>
<span id="Oath">
<table>
<thead>
<tr>
<th>Egoísmo:</th>
<th>Conquista:</th>
<th>Liberdade:</th>
<th>Justiça:</th>
</tr>
</thead>
<tbody>
<tr>
<td>O Juramento do Egoísmo exige que você aja conforme seus desejos, livre para fazer o que quiser, sem medo de enfrentar consequências.</td>
<td>O Juramento da Conquista exige que você imponha sua vontade sobre os outros, fazendo com que se submetam às suas leis.</td>
<td>O Juramento da Liberdade exige que você garanta a liberdade de todos os seres vivos, permitindo que ajam conforme seus desejos, desde que entendam as consequências disso.</td>
<td>O Juramento da Justiça exige que você mantenha a lei e o bem de todos e das sociedades.</td>
</tr>
<tr>
<td><<button "Egoísmo">><<set $character[1].Oath to "Egoísmo">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Egoísmo:</th>
<th>Conquista:</th>
<th>Liberdade:</th>
<th>Justiça:</th>
</tr>
</thead>
<tbody>
<tr>
<td>O Juramento do Egoísmo exige que você aja conforme seus desejos, livre para fazer o que quiser, sem medo de enfrentar consequências.</td>
<td>O Juramento da Conquista exige que você imponha sua vontade sobre os outros, fazendo com que se submetam às suas leis.</td>
<td>O Juramento da Liberdade exige que você garanta a liberdade de todos os seres vivos, permitindo que ajam conforme seus desejos, desde que entendam as consequências disso.</td>
<td>O Juramento da Justiça exige que você mantenha a lei e o bem de todos e das sociedades.</td>
</tr>
<tr>
<td>Você jurou agir por essa causa.</td>
<td>Você fez um juramento ao Egoísmo.</td>
<td>Você fez um juramento ao Egoísmo.</td>
<td>Você fez um juramento ao Egoísmo.</td>
</tr>
</tbody>
</table>
<</replace>><</button>></td>
<td><<button "Conquista">><<set $character[1].Oath to "Conquista">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Egoísmo:</th>
<th>Conquista:</th>
<th>Liberdade:</th>
<th>Justiça:</th>
</tr>
</thead>
<tbody>
<tr>
<td>O Juramento do Egoísmo exige que você aja conforme seus desejos, livre para fazer o que quiser, sem medo de enfrentar consequências.</td>
<td>O Juramento da Conquista exige que você imponha sua vontade sobre os outros, fazendo com que se submetam às suas leis.</td>
<td>O Juramento da Liberdade exige que você garanta a liberdade de todos os seres vivos, permitindo que ajam conforme seus desejos, desde que entendam as consequências disso.</td>
<td>O Juramento da Justiça exige que você mantenha a lei e o bem de todos e das sociedades.</td>
</tr>
<tr>
<td>Você fez um juramento à Conquista.</td>
<td>Você jurou agir por essa causa.</td>
<td>Você fez um juramento à Conquista.</td>
<td>Você fez um juramento à Conquista.</td>
</tr>
</tbody>
</table>
<</replace>><</button>></td>
<td><<button "Liberdade">><<set $character[1].Oath to "Liberdade">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Egoísmo:</th>
<th>Conquista:</th>
<th>Liberdade:</th>
<th>Justiça:</th>
</tr>
</thead>
<tbody>
<tr>
<td>O Juramento do Egoísmo exige que você aja conforme seus desejos, livre para fazer o que quiser, sem medo de enfrentar consequências.</td>
<td>O Juramento da Conquista exige que você imponha sua vontade sobre os outros, fazendo com que se submetam às suas leis.</td>
<td>O Juramento da Liberdade exige que você garanta a liberdade de todos os seres vivos, permitindo que ajam conforme seus desejos, desde que entendam as consequências disso.</td>
<td>O Juramento da Justiça exige que você mantenha a lei e o bem de todos e das sociedades.</td>
</tr>
<tr>
<td>Você fez um juramento à Liberdade.</td>
<td>Você fez um juramento à Liberdade.</td>
<td>Você jurou agir por essa causa.</td>
<td>Você fez um juramento à Liberdade.</td>
</tr>
</tbody>
</table>
<</replace>><</button>></td>
<td><<button "Justiça">><<set $character[1].Oath to "Justiça">><<replace "#Oath">>
<table>
<thead>
<tr>
<th>Egoísmo:</th>
<th>Conquista:</th>
<th>Liberdade:</th>
<th>Justiça:</th>
</tr>
</thead>
<tbody>
<tr>
<td>O Juramento do Egoísmo exige que você aja conforme seus desejos, livre para fazer o que quiser, sem medo de enfrentar consequências.</td>
<td>O Juramento da Conquista exige que você imponha sua vontade sobre os outros, fazendo com que se submetam às suas leis.</td>
<td>O Juramento da Liberdade exige que você garanta a liberdade de todos os seres vivos, permitindo que ajam conforme seus desejos, desde que entendam as consequências disso.</td>
<td>O Juramento da Justiça exige que você mantenha a lei e o bem de todos e das sociedades.</td>
</tr>
<tr>
<td>Você fez um juramento à Justiça.</td>
<td>Você fez um juramento à Justiça.</td>
<td>Você fez um juramento à Justiça.</td>
<td>Você jurou agir por essa causa.</td>
</tr>
</tbody>
</table>
<</replace>><</button>></td>
</tr>
</tbody>
</table>
</span>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Paladino:</b> Aura da Devoção: Paladinos recebem diferentes bônus dependendo de seus Juramentos.</i>
(Egoísmo) Aura do Desinteresse: Aumenta seu Dano em cinco (5) e sua Truque de Mãos em 1/3 de sua Percepção;
(Conquista): Aura dos Tiranos: Aumenta seu Dano em cinco (5) e sua Intimidação em 1/3 de sua Percepção;
(Liberdade) Aura do Intrépido: Aumenta sua Defesa em cinco (5) e sua Acrobacia em 1/3 de sua Percepção;
(Justiça) Aura do Heroísmo: Aumenta sua Defesa em cinco (5) e sua Atletismo em 1/3 de sua Percepção;</td>
Aumente o bônus em 3 a cada 5 niveis.</tr>
<tr>
<tr>
<td>No nível 02 | <i><b>Paladino:</b> Guardião do Juramento: Sempre que fizer uma escolha que esteja alinhada com seu Juramento ou um teste correspondente à sua Aura, ganhe 1 acúmulo permanente de <b>Piedade</b>.</i></td>
</tr>
<td>No nível 03 | <i><b>Devoto:</b> Bênçãos Divinas I: Sempre que lançar um Feitiço Sagrado, ganhe 2 acúmulos de <b>Piedade</b>, ao final de seu turno, cure-se em 1 para cada 6 acúmulos de <b>Piedade</b>. Ao lançar um Feitiço não Sagrado, resete todos os pontos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Paladino:</b> Benções da Guerra: Adicione as habilidades "Golpe Divino" e "Ataques Abençoados".</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Devoto:</b> Bênçãos Divinas II <b>Piedade</b> aumenta sua Defesa e Dano em 1 a cada 6 pontos.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Paladino:</b> Fé nas Armas:
(Egoísmo) - Sempre que você realizar um ataque aprimorado com arma, recupere 3% do seu total de Essência.
(Conquista) - Sempre que você realizar um ataque aprimorado com arma, diminua a Defesa do alvo em 3.
(Libertação) - Sempre que você realizar um ataque aprimorado com arma, reduza seus efeitos de status (Queimadura, Confusão, Impedimento, etc.) em 1 turno.
(Justiça) - Sempre que você realizar um ataque aprimorado com arma, aumente sua Defesa em 3.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Paladino:</b> Causa Sagrada: Sempre que você receber mais de 25 de dano em um único golpe, reduza o dano recebido em 5 + 1 para cada 6 acúmulos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Devoto:</b> Bênçãos Divinas III: Aumenta em 1 todos os valores dados devido à <b>Piedade</b> para cada 12 acúmulos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Paladino:</b> Armamentos Embelezados: No inicio de cada turno, ganhe um Ataque Aprimorado. Além disso, seu ataque aprimorado com arma causa 1d6 de dano adicional, adicione outro 1d6 se o alvo for um Daemon, Vampyr ou Morto-Vivo.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Paladino:</b> Campeão d(o/a):
(Egoísmo) - Quando você é atacado, conjure Golpear no atacante se disponível.
(Conquista) - Em vez de se curar no final de seu turno, sua Bênção Divina I agora causa dano a cada inimigo.
(Libertação) - Você é imune aos status Atordoado e Impedimento.
(Justiça) - Aumenta o seu total de Força Vital em 50%, sempre que você é atacado, reduza o dano recebido em 5%.</i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Paladino começa com:
<ul>
<li><b>Torso:</b> <i>Vestes Sagradas</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Martelo de Guerra</i></li>
</ul>
</div>
<hr>
</div>
<</if>><<if $language === "EN">><div align='center'>
<h2>Scholar</h2>
<b>The Scholar is a Specialization of the Artist Class that gives the Player further knowledge on the most diverse topics at any time.</b>
<i><b>Main Attribute:</b> Charisma (CHA)</i>
<i><b>Secondary Attribute:</b> Intelligence (INT)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Scholar</b> Novice: Increase your first test dice to a 1d8.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Scholar</b> Genius Mind: Increase the gains of Experience due tests by 50%.</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Scholar</b> Jack-of-All-Trades: During tests, add +2 to any Expertise. Increase this bonus by 2 at level 7 and 15.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Artist:</b> Trustworthy Instrument: While equipped with an Instrument, mark it as Esoteric. Additionally, you gain +5 to Art tests</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Scholar</b> Expert: Increase your first test dice to a 1d10 and your second test dice to a 1d8.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Scholar</b> Quick-learner: Adding Skills and Spells to your Repertoire takes only 1 hour.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Artist:</b> Winning Smile: When making a test and the result would be lower than 10, add 1/3 of your Charisma to the result.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Scholar</b> Master: Increase both of your test dice to 1d12's.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Scholar</b> Transcendance: Gain 10 Attribute points.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Scholar</b> Ascencion: You add your Intelligence to your damage and your Charisma to your defense.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Scholar character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Waist:</b> <i>Belt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Quatterstaff</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2> Erudito </h2>
<b>O Erudito é uma Especialização da Classe Artista que dá ao jogador conhecimento adicional sobre os mais diversos tópicos a qualquer momento.</b>
<i><b>Atributo Principal:</b> Carisma (CAR)</i>
<i><b>Atributo Secundário:</b> Inteligência (INT)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Erudito</b> Novato: Aumente seu primeiro dado de teste para um 1d8.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Erudito</b> Mente Genial: Aumente os ganhos de Experiência devido a testes em 50%.</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Erudito</b> Faz-Tudo: Durante testes, adicione +2 a qualquer Perícia. Aumente esse bônus em 2 nos níveis 7 e 15.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Artista:</b> Instrumento Confiável: Ao equipar um Instrumento, marque-o como Esotérico. Além disso, você ganha +5 em testes de Arte.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Erudito</b> Especialista: Aumente seu primeiro dado de teste para um 1d10 e seu segundo dado de teste para um 1d8.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Erudito</b> Aprendiz Rápido: Adicionar Habilidades e Feitiços ao seu Repertório leva apenas 1 hora.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Artista:</b> Sorriso Vencedor: Ao fazer um teste e o resultado seria inferior a 10, adicione 1/3 do seu Carisma ao resultado.</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Erudito</b> Mestre: Aumente ambos os seus dados de teste para 1d12.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Erudito</b> Transcendência: Ganhe 10 pontos de Atributo.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Erudito</b> Ascensão: Adicione sua Inteligência ao seu dano e sua Carisma à sua defesa.</i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Erudito começa com:
<ul>
<li><b>Torso:</b> <i>Camisa de Lã</i></li>
<li><b>Cintura:</b> <i>Cinto</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Bastão</i></li>
</ul>
</div>
<hr>
</div>
<</if>><<if $language === "EN">><div align='center'>
<h2>Spy</h2>
<b>The Spy is a Specialization of the Rogue Class that allows the player new interactions in the world and being able to avoid unnecessary combat.</b>
<i><b>Main Attribute:</b> Dexterity (DEX)</i>
<i><b>Secondary Attribute:</b> Charisma (CHA)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Spy:</b> Silver Tongue: During Speech tests, add +3 plus your level to the result.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Rogue:</b> Nimble Fingers: During combat, you gain 15% more Gold from defeating enemies. Additionally, you may steal from story characters (NPCs).</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Rogue:</b> Gambler: Reduce one of your test dice to a 1d4, but increase the other to a 1d10.</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Spy</b> (Skill) Bribe.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Rogue:</b> Sneaky: You start each combat <b>Hidden</b>. While hidden, your next attack deal 1d8 of extra damage.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Spy:</b> Eye for Detail: You always find secrets.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Spy:</b> Secret Stash: You are considered to always have the right tool for the job. Like a rope, lantern, or lockpick.</i></td>
</tr>
<tr>
<td>At level 17 | <i><b>Spy:</b> Hidden Machinations: During test, you roll an aditional 1d6 dice and add to the result. If the test expertise is of Sleitght of Hands, World Knowledge or Insight, you roll another 1d6 and choose the highest result.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Spy:</b> Faceless Shadow: You always succeed at Stealth tests.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Spy character starts with:
<table>
<tr>
<td><b>Head:</b>Mask</i></td>
<td><b>Torso:</b> <i>Leather armor</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main Hand:</b> <i>Dagger</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Espião</h2>
<b>O Espião é uma Especialização da Classe Ladino que permite ao jogador novas interações no mundo e a habilidade de evitar combates desnecessários.</b>
<i><b>Atributo Principal:</b> Destreza (DEX)</i>
<i><b>Atributo Secundário:</b> Carisma (CHA)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Espião:</b> Lábia: Durante testes de Fala, adicione +3 mais seu nível ao resultado.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Ladino:</b> Dedos Ágeis: Durante o combate, você ganha 15% mais Ouro ao derrotar inimigos. Além disso, você pode roubar de personagens da história (NPCs).</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Ladino:</b> Apostador: Reduza um dos seus dados de teste para 1d4, mas aumente o outro para 1d10.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Espião:</b> (Habilidade) Suborno.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Ladino:</b> Furtivo: Você começa cada combate <b>Escondido</b>. Enquanto estiver escondido, seu próximo ataque causa 1d8 de dano extra.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Espião:</b> Olhos para Detalhes: Você sempre encontra segredos.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Espião:</b> Estoque Secreto: Você sempre será considerado ter a ferramenta certa para o trabalho. Como uma corda, lanterna ou gazua.</i></td>
</tr>
<tr>
<td>No nível 17 | <i><b>Espião:</b> Esquemas Secretos: Durante testes, você rola 1d6 e adiciona ao resultado. Caso a Perícia do teste seja Truque de Mãos, Conhecimento do Mundo ou Discernimento, você rola outro 1d6 e escolhe o maior resultado.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b >Sombra sem face: Você sempre obtêm sucesso em testes de Furtividade.</b></i></td>
</tr>
</table>
</table>
<hr>
Um personagem Espião começa com:
<table>
<tr>
<td><b>Cabeça:</b> Máscara</i></td>
<td><b>Tronco:</b> <i>Armadura de Couro</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Adaga</i></td>
</tr>
</table>
<hr>
</div>
<</if>><style>
.body {
background-color: black;
background-color: rgba(0, 0, 0, 0.8); /* Transparent black background */
}
</style>
<<if $arena is false>>
<<set $day to State.variables.now.getDate()>>
<<set $hour to State.variables.now.getHours()>>
<<set $minute to State.variables.now.getMinutes()>>
<div align="center">
<b>Day:</b> $day. <br>
<b>Hours:</b> $hour : $minute.
</div>
<<if $hour >= 18>>
<<if $night is false>>
<<set $night to true>>
<</if>>
<</if>>
<<if $hour >= 6 and $night is true>>
<<set $moon += 1>>
<<set $night to false>>
<</if>>
<<else>>
<div align="center">
<h3>Stage</h3>
<<print $arenaStage>>
<hr>
<div id="arenaequip">
Gold: <<print $character[1].Gold>>
</div>
<hr>
</div>
<</if>><<set $language to "EN">>
<<set $quest to {
saveHusband: {
Active: false,
Status: "yet to start",
},
hideoutInvasion: {
Active: false,
Status: "yet to start",
},
}>>
<<set $event to []>>
<<set $newEvent to false>>
<<set $arena = false>>
<<set $Graveyard to []>>
<<set $chapterResolution to {
chapter1: ["in progress"],
chapter2: ["in progress"],
chapter3: ["in progress"],
chapter4: ["in progress"],
chapter5: ["in progress"],
}>>
<<set $alignment to {
goodChaos: 0,
goodOrder: 0,
evilChaos: 0,
evilOrder: 0,
}>>
<<set $remember to $character[1]>>
<<set $moon to 1>>
<<set $night to false>>
<<set $enemyInstances = []>>
<<set $showAttackButtons = false>>
<<set $whosturn = "Player">>
<<set $xpToLevelUp to 45>>
<<set $inMenu to 0>>
<<set $return to "">>
<<set $npc to {
Elder: {
Name: "Elder",
Gold: 75,
Ancestry: "Human",
hasmet: false,
Respect: -10,
},
Owner: {
Name: "Owner",
Gold: 50,
Ancestry: "Human",
hasmet: false,
Respect: 10,
alive: true
},
john: {
Name: "John",
Gold: 15,
Ancestry: "Human",
healed: false,
alive: true,
Respect: 25,
},
oldMan: {
Name: "Old man",
Gold: 125,
Ancestry: "Human",
hasmet: false,
Respect: 10,
alive: true
},
bandit1: {
Name: "Bald-fella",
Ancestry: "Human",
Respect: -10,
alive: true
},
bandit2: {
Name: "'mud'-face",
Ancestry: "Human",
Respect: -10,
alive: true
},
bandit3: {
Name: "Third guy",
Ancestry: "Human",
Respect: -5,
alive: true
},
banditleader1: {
Name: "Bandit Leader",
Ancestry: "Human",
Respect: -25,
alive: true
}
}>>
<<set $loreBits = {
EN: [
"Try having your Lifeblood above 0. Most of the time, it works.",
"If there were any tales about the Mother of Monsters, they would tell you about her twin, the embodiment of nature's beauty and nurturing. They would tell you the tales of the Horned maw devouring her whole.",
"She of the three faces is the goddess of Fortune, Fate, and Death; Ellis is the god of War and Civilization; Urahyahra is the goddess of Nature and Fertility, while Uldrun is the god of Hope and Despair.",
"Draconians are natural hunters and apex warriors. A single unequipped Draconian warrior is equivalent to five heavily armored humans. Or so is said.",
"A favorite plate in draconian lands is their tail grilled. Not safe for non-draconians.",
"8 out of 10 draconians prefer to have sex with humans. The majority consensus is that screams of 'stop!' and 'you are hurting me!' are hot.",
"There are only four erotic manuscripts about Draconians in the world. Since they were all written by draconians themselves, they all suck.",
"Heralds often refer to themselves as 'Vösh'. The reason? I don't know, I never asked one...",
"Elfs do not have sexual organs, nor do they understand the concept of 'libido'. These walking sticks plant their 'children' midst the roots of other trees.",
"There is a rumor that Heralds with erectile dysfunction cannot explode when killed. Pure bullshit, but funny as heck.",
"In Dwarven society, to shave a beard is a mark of utmost shame.",
"Yes, female dwarfs do have beards..., Yes, there are those who have two beards....",
"When too much magic is accumulated in a spot like a forest, lake, or a battlefield, a Daemon is born. They tend to hunt and consume themselves, and very rarely do they meddle with mortals' affairs. Is theorized that a Daemon could eventually become a god by just consuming others.",
"Ellis demands all crafts of his despíction must be made in gold-this caused some places to accept any other round-shaped metal as coin, although the term 'gold' is still the most commonly used.",
"Hobgoblins hate Goblins for seeing them as a shameful version of themselves, while Goblins find Hobgoblins to be a bunch of funny dumb looking Goblins.",
"Ellis demands worship of him under the threat of eternal darkness. Many prefer to comply other than to verify his capabilities.",
"She of the three faces is the only of the gods who did not demand worship. Mortals are just that desperate for good fortune.",
"Uldur, the white, the savior of the fallen, the Vulture knight. Uldur, the one who pushes you to the bottom of a well so he can pretend to be the one who takes you from there.",
"Uldur is represented as a white Vulture, while Elilis is seen as the sun itself, and She of Three Faces is depicted as a three-headed woman. Only Urahyahra does not have a precise depiction of her appearance, although all come together that her face is adorned by a crown of horns and a maw so big she could devour all.",
"The Mother of Monsters, Urahyahra, is depicted as the 'boogeyman' of the four gods, a role she plays too well with the abominations she calls children and the madness her words bring to one's mind.",
"A farmer would pray to Ellis for sunlight. While also praying for 'She of the three faces' for a bountiful harvest. Neither would bother to comply without proper tribute.",
"In human language, Vanadi could be translated to either 'Shapeshifter' 'Skinwalker' or even 'Pretty skin'. But for the author, Vanadi stands as 'Furries'.",
"Despite common misconceptions, praying does not increase a god's power, they are just self-centered assholes that crave attention.",
"There is, in fact, a tale of a human who got fucked a giant and survived. The accomplishment is so massive that even the gods were impressed.",
"Did you know? Orcs are hemarfrodites. What? You did not want to know that? Too bad, and their phalluses are the size of horses.",
"TO GOBLINS, SPEAKING LOUDER MEANS SPEAKING GOOD.",
"Goblins participate of orgies to procriate, they do not like the presence of other species during them.",
"The age of consent in this world is of at least 17 years old, for the people of this world are not that type of degenerates.",
"There were made 36 Dragons, one for each dozen Giants. Only three have fallen during the war.",
"The Wild Lands are where creatures like Ogroids, Aberrations and other type of Monsters run rampant, both the 'Free Human' lands and Draconian Empire, the ones who share borders with it, let it be thinking that these beings will just end up killing themselves. They are not wrong...",
],
"PT-BR": [
"Tente ter sua Força Vital acima de 0. Na maioria das vezes, funciona.",
"Se houvesse alguma história sobre a Mãe dos Monstros, eles contariam a você sobre sua irmã gêmea, a personificação da beleza e do cuidado da natureza. Eles contariam a você as histórias da Boca Chifruda devorando-a inteira.",
"Ela das três faces é a deusa da Fortuna, do Destino e da Morte; Ellis é o deus da Guerra e da Civilização; Urahyahra é a deusa da Natureza e da Fertilidade, enquanto Uldrun é o deus da Esperança e do Desespero.",
"Draconianos são caçadores naturais e guerreiros de ponta. Um único guerreiro Draconiano não equipado é equivalente a cinco humanos fortemente blindados. Ou pelo menos é o que se diz.",
"Um prato favorito em terras draconianas são seus rabos grelhados. Não é seguro para não-draconianos.",
"8 em cada 10 dragonianos preferem fazer sexo com humanos. O consenso da maioria é que gritos de 'pare!' e 'você está me machucando!' são excitante.",
"Existem apenas quatro manuscritos eróticos sobre Draconianos no mundo. Como todos foram escritos pelos próprios draconianos, todos são uma merda.",
"Os arautos costumam se referir a si mesmos como 'Vösh'. O motivo? Não sei, nunca perguntei a um...",
"Os elfos não possuem órgãos sexuais, nem entendem o conceito de 'libido'. Esses gravetos ambulantes plantam seus 'filhos' no meio das raízes de outras árvores.",
"Há um boato de que Arautos com disfunção erétil não podem explodir quando mortos. Pura besteira, mas engraçado pra caramba.",
"Na sociedade dos Anões, raspar a barba é um sinal de extrema vergonha.",
"Sim, as anãs têm barba..., sim, têm aquelas que têm duas barbas...",
"Quando muita magia é acumulada em um local como uma floresta, lago ou campo de batalha, nasce um Daemon. Eles tendem a caçar e se consumir, e muito raramente se intrometem nos assuntos dos mortais. É teorizado que um Daemon poderia eventualmente se tornar um deus apenas consumindo os outros.",
"Ellis exige que todos os artesanatos de sua descrição sejam feitos em ouro - isso fez com que alguns lugares aceitassem qualquer outro metal redondo como moeda, embora o termo 'ouro' ainda seja o mais comumente usado.",
"Os Hobgoblins odeiam os Goblins por vê-los como uma versão vergonhosa de si mesmos, enquanto os Goblins consideram os Hobgoblins um bando de Goblins engraçados e idiotas.",
"Ellis exige adoração a ele sob a ameaça das trevas eternas. Muitos preferem obedecer em vez de verificar suas capacidades.",
"Ela das três faces é a única dos deuses que não exige adoração. Os mortais estão apenas desesperados por boa sorte.",
"Uldur, o branco, o salvador dos caídos, o cavaleiro Abutre. Uldur, aquele que te empurra para o fundo de um poço para que ele possa fingir ser aquele que te tira de lá.",
"Uldur é representado como um abutre branco, enquanto Elilis é vista como o próprio sol, e Ela de Três Faces é retratada como uma mulher de três cabeças. Apenas Urahyahra não tem uma representação precisa de sua aparência, embora todos se unam para que ela rosto é adornado por uma coroa de chifres e uma boca tão grande que ela poderia devorar tudo.",
"A Mãe dos Monstros, Urahyahra, é retratada como o 'bicho-papão' dos quatro deuses, um papel que ela desempenha muito bem com as abominações que ela chama de crianças e a loucura que suas palavras trazem à mente.",
"Um fazendeiro oraria a Ellis por luz solar. Ao mesmo tempo que orava por 'Ela das três faces' por uma colheita abundante. Nenhum dos dois se daria ao trabalho de obedecer sem o devido tributo.",
"Na linguagem humana, Vanadi pode ser traduzido como 'Metamorfo', 'Skinwalker' ou até mesmo 'Pele bonita'. Mas para o autor, Vanadi significa 'Furries'.",
"Apesar dos equívocos comuns, orar não aumenta o poder de um deus, eles são apenas idiotas egocêntricos que anseiam por atenção.",
"Existe, de fato, a história de um humano que fodeu um gigante e sobreviveu. A conquista é tão grande que até os deuses ficaram impressionados.",
"Você sabia? Orcs são hemarfroditas. O quê? Você não queria saber disso? Que pena, e seus falos são do tamanho de cavalos.",
"PARA GOBLINS, FALAR MAIS ALTO SIGNIFICA FALAR BEM.",
"Goblins participam de orgias para procriar, eles não gostam da presença de outras espécies durante elas.",
"A idade de consentimento neste mundo é de pelo menos 17 anos, pois as pessoas deste mundo não são daquele tipo de degenerados.",
"Foram feitos 36 Dragões, um para cada dúzia de Gigantes. Apenas três caíram durante a guerra.",
"As Terras Selvagens são onde criaturas como Ogroids, Aberrações e outros tipos de Monstros correm soltos, tanto as terras dos 'Humanos Livres' quanto o Império Draconiano, aqueles que compartilham fronteiras com o lugar, deixam-o em paz pensando que esses seres acabarão matando a si mesmos. Eles não estão errados...",
]
}>>
<<if $language === "EN">><div align='center'>
<h2>Thief</h2>
<b>The Thief is a Specialization of the Rogue Class that permits the player new interactions and earns extra rewards amidst combat.</b>
<i><b>Main Attribute:</b> Dexterity (DEX)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Thief:</b> (Skill) Pickpocket.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Rogue:</b> Nimble Fingers: During combat, you gain 15% more Gold from defeating enemies. Additionally, you may steal from story characters (NPCs).</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Rogue:</b> Gambler: Reduce one of your test dice to a 1d4, but increase the other to a 1d10.</i></td>
</tr>
<tr>
<td>At level 06 | <i><>Thief:</b> Deep Pockets: You add the "Disarm" skill to your Repertoire, whenever you cast it, you have the chance to steal the item, instead.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Rogue:</b> Sneaky: You start each combat <b>Hidden</b>. While hidden, your next attack deal 1d8 of extra damage.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Thief:</b> (Skill) Steal Soul.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Thief:</b> Professional Robber: You add your level to Sleight of Hand and Stealth Test.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Thief:</b Hoarder: Increase your Damage by your 1/3 of your Gold.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Thief:</b> Spell Thief: Whenver an enemy uses an Skill, you have a chance to learn that Skill.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Thief character starts with:
<table>
<tr>
<td><b>Head:</b>Hood</i></td>
<td><b>Torso:</b> <i>Leather armor</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main Hand:</b> <i>Dagger</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Ladrão</h2>
<b>O Ladrão é uma Especialização da Classe Ladino que permite ao jogador novas interações e ganha recompensas extras em meio ao combate.</b>
<i><b>Atributo Principal:</b> Destreza (DEX)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Ladrão:</b> (Habilidade) Batedor de Carteiras.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Ladino:</b> Dedos Ágeis: Durante o combate, você ganha 15% mais Ouro ao derrotar inimigos. Além disso, você pode roubar de personagens da história (NPCs).</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Ladino:</b> Apostador Reduza um dos seus dados de teste para 1d4, mas aumente o outro para 1d10.</i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Ladrão:</b> Bolsos Fundos: Você adiciona a habilidade "Desarmar" ao seu Repertório, sempre que lançá-la, você tem a chance de roubar o item, em vez disso.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Ladino:</b> Furtivo: Você começa cada combate <b>Escondido</b>. Enquanto estiver escondido, seu próximo ataque causa 1d8 de dano extra.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Ladrão:</b> (Habilidade) Roubar Essência.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Ladrão:</b> Ladrão Profissional: Você adiciona seu nível nos Testes de Truque de Mãos e Furtividade.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Ladrão:</b> Acumulador: Aumente seu Dano em 1/3 do seu Ouro.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Ladrão:</b> Ladrão de Magia: Sempre que um inimigo usa uma Habilidade, você tem a chance de aprender essa habilidade.</i></td>
</tr>
</table>
<hr>
Um personagem Ladrão começa com:
<table>
<tr>
<td><b>Cabeça:</b> Capuz</i></td>
<td><b>Tronco:</b> <i>Armadura de Couro</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Adaga</i></td>
</tr>
</table>
<hr>
</div>
<</if>>[align.center]
<u><strong>High priority</strong></u>
<ul>
<li>Ancestry affecting the story; dwarfs being disrespected by elfs and draconians, humans being seen as pitiful beings, elves being overestimated.</li>
<li>More Class Traits: and skills.</li>
<li>Journal (Quests & Achievements)</li>
<li>Item Descriptions: It is hard to be funny or descriptive when you lack charisma.</li>
<li>Skill descriptions.</li>
<li>The whole design of the game</li>
<li>More enemies</li>
<hr>
<u><strong>Minor:</strong></u>
<ul>
<li>Origin adventure: Instead of just reading a text, the player would experience a tutorial-like adventure.</li>
<li>Images (Pixel art)</li>
<li>Different fonts for each race (Still thinking about it)</li>
<b>When is the game going to leave Alpha?</b> When I have all the Origin lores written.
.
<hr>
[[Return|main-menu]]<div align='center'>
<<set $classImage to "img/others/Vanguard.png">>
<img src="img/others/Vanguard.png" style="float: left; background-color: black; padding-left: 25em; padding-right: 25em;">
<hr>
</div>
<<if $language === "EN">>
<div align='center'>
<h2>Vanguard</h2>
<b>The Vanguard is a Specialization of the Warrior Class that focuses on Shield usage and survivability against multiple opponents.</b>
<i><b>Main Attribute:</b> Strength (STR)</i>
<i><b>Secondary Attribute:</b> Resilience (RES)</i>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Vanguard:</b> Phalanx Training: You gain +3 Defense for each enemy alive.
Additionally, when you make a weapon attack while wielding a Shield in your offhand, you make a weapon attack with your Shield, it deal 1d4 of damage and gains the "Blunt" trait.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Vanguard:</b> (Skill) Bash.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Warrior:</b> Weapon Mastery: Your weapons apply additional effects based on their damage type.
Blunt - Apply Confusion on the target.
Slashing - Applies Bleed for 2 turns.
Piercing - Decreases the target's defense by 5.
Firearm - Has 35% to deal 75% extra damage.
</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Vanguard:</b> Shielded Assault: You gain +3 additional Hit-Chance for each enemy alive.
Additionally, when you hit an enemy with your Shield, you increase the damage dealt by its Defense.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Warrior:</b> Tactical Genius: Your Skills that cost three or more Action Points cost 1 point less.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Vanguard:</b> (Skill) Shield up.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Vanguard:</b> Survivalist: Increase the bonus given by <b>Phalanx Training</b> and <b>Shielded Assault</b> by 2 and increase your Shield damage dice to 2d4.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Warrior:</b> Second Wind: During each combat, the first time you hit below 25% of your maximum health, heal yourself by 35% of your lost health.</i></td>
</tr>
<tr>
<td>At level 17 | <i><b>Vanguard:</b> Arcane Aegis: Reduce the damage taken by Spells by 20% while wielding a Shield.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Vanguard:</b> Shield wall: Double the Defense given by your Shield.</i></td>
</tr>
</table>
<hr>
A Vanguard character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Gamberson</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main Hand:</b> <i>Rusted sword</i></td>
<td><b>Off-Hand:</b> <i>Wooden shield</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Vanguard</h2>
<b>A Vanguarda é uma Especialização da Classe Guerreiro que se concentra no uso de escudos e na sobrevivência contra múltiplos oponentes.</b>
<i><b>Atributo Principal:</b> Força (FOR)</i>
<i><b>Atributo Secundário:</b> Resiliência (RES)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Vanguarda:</b> Treinamento de Falange: Você ganha +3 de Defesa adicional com base no número de inimigos vivos.
Além disso, quando você faz um ataque com arma enquanto empunha um escudo na sua mão secundária, você realiza um ataque com seu escudo, causando 1d4 de dano e ganhando o atributo "Contundente".</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Vanguarda:</b> (Habilidade) Pancada.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Guerreiro:</b> Maestria com Armas: Suas armas aplicam efeitos adicionais com base no tipo de dano delas.
Contundente - Aplica Confusão no alvo.
Cortante - Aplica Sangramento por 2 turnos.
Perfurante - Diminui a defesa do alvo em 5.
Arma de Fogo - têm 30% de chance de causar 75% de Dano Adicional.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Vanguarda:</b> Assaulto de Escudo: Você ganha +3 de Chance de Acerto adicional com base no número de inimigos vivos.
Além disso, quando você acerta um inimigo com seu escudo, você aumenta o dano causado pela sua Defesa.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Guerreiro:</b> Gênio Tático: Suas Habilidades que custam três ou mais Pontos de Ação custam um ponto a menos.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Vanguarda:</b> (Habilidade) Escudo Erguido.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Vanguarda:</b> Sobrevivencialista: Aumenta o bônus de seu <b>Treinamento de Falange</b> e <b>Assaulto de Escudo</b> e aumenta o dado de dano do seu Escudo para 2d4.</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Guerreiro:</b> Segundo Fôlego: Durante cada combate, na primeira vez que você atinge abaixo de 25% da sua saúde máxima, você se cura em 35% da sua saúde perdida.</i></td>
</tr>
<tr>
<td>No nível 17 | <i><b>Vanguarda:</b> Escudo Arcano: Reduz o dano recebido por Magias em 20% enquanto empunha um Escudo.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Vanguarda:</b> Muralha de Escudos: Dobra a Defesa fornecida pelo seu Escudo.</i></td>
</tr>
</table>
<hr>
Um personagem Vanguarda começa com:
<table>
<tr>
<td><b>Tronco:</b> <i>Gamberson</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Espada enferrujada</i></td>
<td><b>Mão Secundária:</b> <i>Escudo de madeira</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">><div align='center'>
<h2>Warlock</h2>
<b>The Warlock is a Specialization of the Mage Class that allows the Player to take pacts, powerful blessings for terrible curses.</b>
<i><b>Main Attribute:</b> Intelligence (INT)</i>
<i><b>Secondary Attribute:</b> Resilience (RES)</i>
</div>
<hr>
<h3>Pact of The:</h3>
<table>
<tr>
<td><<button "Shadowless">><<set $character[1].Pact to "Shadows">>
<<replace "#textclassA">>
<p>You have captured an otherworldly creature, trapping them in your shadow, forcing your will upon them.</p>
<p>Thus, although you can command your shadow to perform actions, you feel your own grip on the world weaker; the creature feeds on your Lifeblood.<p>
<p><b>Boon:</b> You gain the "Summon: Shadow" skill to your Repertoire.
<p><b>Curse:</b> Your Lifeblood is diminished by 15%.</p>
<</replace>>
<</button>></td>
<td><<button "Bloodless">><<set $character[1].Pact to "Blood">>
<<replace "#textclassA">>
<p>Seeking immortality, you have made a pact with an vampyric daemon, but the creature has duped you! It has taught you how to maintain your body by feeding from the Lifeblood of others, but the creature also has escaped with your blood.</p>
<p>Now, you are required to use your Essence at all times just to preserve your body and an unending stream of victims to guarantee your existence.</p>
<p><b>Boon:</b> You gain the Vampyr trait. Adding your Essence into your Lifeblood.</p>
<p><b>Curse:</b> You use your Lifeblood to cast spells, but they cost twice as more.</p>
<</replace>>
<</button>></td>
<td><<button "Soulless">><<set $character[1].Pact to "Soul">>
<<replace "#textclassA">>
<p>In your quest to understand the afterlife, you have unadvisedly summoned a Lich, an undead creature as powerful as it is vile.</p>
<p>Thankfully, the Lich proposed to you that with the exchange of your servitude, they would teach you what you so desired, fearing repercussions from rejecting such an offer, you have accepted it. Thus, the creature severed your soul from your being and placed it under a gem to guarantee your obedience.
<p>Now, you have a deeper understanding of the necrotic arts of the arcane, while the joy of life feels like a hellish torture.</p>
<p><b>Boon: </b> Whenever you kill an enemy, permanently increase your Damage and Defense by 1.</p>
<p><b>Curse:</b> Your Expertises are halved during tests.</p>
<</replace>>
</tr>
</table>
<div align='center'>
<span id="textclassA">
<i>Make your pact, warlock.</i>
</span>
</div>
<div align='center'>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Mage:</b> Arcane Initiation: Add the skills "Fire Bolt."; "Lightning Strike." and "Freeze." to your Repertoire. They cost 3 less.</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Warlock:</b> Lesser Pact Magic:
Shadowless: Add the "Shadow Bolt" Skill to your Repertoire.
Bloodless: Add the "Drain" Skill to your Repertoire.
Soulless: Add the "Soul Syphon" Skill to your Repertoire.
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Warlock:</b> Great Sacrifice: Reduce your total Lifeblood by 10%, add +2 to your Damage per level.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Warlock: Pact Mastery:</b>
(Shadowless) Masterful Dark Magic: Whenever you cast a Pact magic, damage yourself by 3 to damage all enemies by your 1/3 of your Resillience.
(Bloodless) Masterful Hemomancy: Whenever you cast a Pact magic, heal yourself by 3 for each <b>Bleeding</b> enemy, then apply <b>Bleeding</b> to all non-<b>Bleeding</b> enemies for 2 turns.
(Soulless) Masterful Necromancy: Whenever you cast a Pact magic, summon an Undead Helper.
</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<tr>
<td>At level 10 | <i><b>Mage:</b> Arcane Mastery: Add the skills; "Inferno", "Storm and "Blizzard" to your Repertoire. When cast, you roll the damage twice and chooses the highest result.</i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Warlock:</b> Greater Pact Magic;
Shadowless: Add the "Puppeteering" and "Consume the Light" Skills to your Repertoire.
Bloodless: Add the "Sanguine Armor" and "Bloodsurge" Skills to your Repertoire.
Soulless: Add the "Death Spyral" and "Reap" Skills to your Repertoire.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Warlock:</b> Second Deal: Choose a second Pact, add to your Repertoire it's <b>Minor Pact Magic</b> skill and gain it's <b>Pact Mastery</b>.</i></td>
</tr>
<tr>
<td>At level 17 | <i><b>Warlock:</b Magic Drainer: At the start of your turn, drain 5% of all enemies current Essence and Lifeblood.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
A Warlock character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Wand</i></td>
<td><b>Offhand:</b> <i>Spellbook</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Bruxo</h2>
<b>O Bruxo é uma Especialização da Classe Mago que permite ao Jogador fazer pactos, poderosas bênçãos para terríveis maldições.</b>
<i><b>Atributo Principal:</b> Inteligência (INT)</i>
<i><b>Atributo Secundário:</b> Resiliência (RES)</i>
<hr>
<h3>Pacto do(a):</h3>
<table>
<tr>
<td><<button "Sem Sombra">><<set $character[1].Pact to "Shadows">>
<<replace "#textclassA">>
<p>Você capturou uma criatura de outro mundo, aprisionando-a em sua sombra, forçando sua vontade sobre ela.</p>
<p>Assim, embora você possa comandar sua sombra para realizar ações, você sente seu próprio domínio sobre o mundo mais fraco; a criatura se alimenta do seu Sangue Vital.<p>
<p><b>Bênção:</b> Você ganha a habilidade "Invocar: Sombra" para o seu Repertório.
<p><b>Maldição:</b> Sua Força Vital é reduzido em 15%.</p>
<</replace>>
<</button>></td>
<td><<button "Sem Sangue">><<set $character[1].Pact to "Blood">>
<<replace "#textclassA">>
<p>Em busca da imortalidade, você fez um pacto com um demônio vampírico, mas a criatura o enganou! Ela ensinou como manter seu corpo se alimentando do Sangue Vital dos outros, mas também escapou com seu sangue.</p>
<p>Agora, você precisa usar sua Essência o tempo todo apenas para preservar seu corpo e uma corrente interminável de vítimas para garantir sua existência.</p>
<p><b>Bênção:</b> Você ganha o traço Vampírico. Adicionando sua Essência a sua Força Vital.</p>
<p><b>Maldição:</b> Você usa sua Força Vital para lançar magias, mas elas custam o dobro.</p>
<</replace>>
<</button>></td>
<td><<button "Sem Alma">><<set $character[1].Pact to "Soul">>
<<replace "#textclassA">>
<p>Em sua busca para entender a vida após a morte, você imprudentemente convocou um Lich, uma criatura morta-viva tão poderosa quanto vil.</p>
<p>Felizmente, o Lich propôs a você que, com a troca de sua servidão, ele ensinaria o que você tanto desejava, temendo represálias por rejeitar tal oferta, você a aceitou. Assim, a criatura separou sua alma de seu ser e a colocou sob uma gema para garantir sua obediência.
<p>Agora, você tem um entendimento mais profundo das artes necróticas do arcano, enquanto a alegria da vida parece um tormento infernal.</p>
<p><b>Bênção:</b> Sempre que você mata um inimigo, aumente permanentemente seu Dano e Defesa em 1.</p>
<p><b>Maldição:</b> Suas Habilidades são reduzidas pela metade durante testes.</p>
<</replace>>
</tr>
</table>
<div align='center'>
<span id="textclassA">
<i>Faça seu pacto, bruxo.</i>
</span>
</div>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Mago:</b> Iniciação Arcana: Adicione as habilidades: "Bola de Fogo.", "Raio." e "Congelamento." ao seu Repertório. Essas habilidades custam 3 menos.</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Bruxo:</b> Magia de Pacto Inferior:
Sem Sombra: Adicione a habilidade "Raio Sombrio" ao seu Repertório.
Sem Sangue: Adicione a habilidade "Drenar" ao seu Repertório.
Sem Alma: Adicione a habilidade "Sifão de Alma" ao seu Repertório.
</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Bruxo:</b> Grande Sacrifício: Reduza seu total de Força Vital em 10%, adicione +2 ao seu Dano por nível.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Bruxo:</b> Maestria de Pacto:
(Sem Sombra) Magia Negra Maestral: Sempre que lançar uma magia de Pacto, se machuque em 3 para machucar todos os inimigos em 1/3 da sua Resiliência.
(Sem Sangue) Hemomancia Maestral: Sempre que lançar uma magia de Pacto, cure-se em 3 para cada inimigo <b>Sangrando</b>, depois aplique <b>Sangramento</b> a todos os inimigos que não estejam <b>Sangrando</b> por 2 turnos.
(Sem Alma) Necromancia Maestral: Sempre que lançar uma magia de Pacto, invoque um Escravo Morto-Vivo.
</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Mago:</b> Maestria Arcana: Adicione as habilidades; "Inferno", "Tempestade e "Nevasca" ao seu Repertório. Quando conjuradas, você rola o Dano duas vezes e escolhe o maior resultado.</i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Bruxo:</b> Magia de Pacto Superior;
Sem Sombra: Adicione as habilidades "Marionetismo" e "Consumir a Luz" ao seu Repertório.
Sem Sangue: Adicione as habilidades "Armadura Sanguínea" e "Maré de Sangue" ao seu Repertório.
Sem Alma: Adicione as habilidades "Espiral da Morte" e "Ceifar" ao seu Repertório.
</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Bruxo:</b> Segundo Pacto: Escolha um segundo Pacto, adicione ao seu Repertório sua habilidade de <b>Magia de Pacto Menor</b> e ganhe sua <b>Maestria de Pacto</b></i></td>
</tr>
<tr>
<td>No nível 17 | <i><b>Bruxo:</b> Drenador de Magia: No início de seu turno, drene 5% da Essência e da Força Vital de todos os inimigos.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Bruxo começa com:
<ul>
<li><b>Torso:</b> <i>Camisa de Lã</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Varinha</i></li>
<li><b>Mão Secundária:</b> <i>Grimório</i></li>
</ul>
</div>
<hr>
</div>
<</if>><div align='center'>
<h2>Wizard</h2>
<b>The Wizard is a Specialization of the Mage Class that focuses on using costly spells to deal as much damage as possible.</b>
<i><b>Main Attribute:</b> Intelligence (INT)</i>
</div>
<hr>
<table>
<tr>
<td>At level 01 | <i><b>Mage:</b> Arcane Initiation: Add the skills "Fire Bolt."; "Lightning Strike." and "Freeze." to your Repertoire. They cost 3 less.
</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Wizard:</b> Overflow I: At the start of each turn, regain Essence equal to 1/3 of your Intelligence .</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Wizard:</b> Mystical Arsenal: Add the skills "Arcane Armor" and "Arcane Beam"to your Repertoire.
Whenever you cast an Arcane Spell, increase your Damage by 5.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Wizard:</b> Overflow II: At the start of each turn, regain Essence equal to 1/2 of your Intelligence (Replaces Overflow I).</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Mage:</b> Arcane Mastery: Add the skills; "Inferno", "Storm and "Blizzard" to your Repertoire. When cast, you roll the damage twice and chooses the highest result.
</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Mage:</b> Intellect Empowerment: Whenever you cast a spell against a single enemy, deal 1/2 of your Intelligence as damage on the same target.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Wizard:</b> Overflow III: At the start of each turn, regain Essence equal to your Intelligence (Replaces Overflow II).</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Wizard:</b> Essence Renewal: Whenever you cast a spell, regain Lifeblood equal to it's cost.</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Wizard character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Arcane Staff</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div class="grid-container" align='center'>
<h2>Feiticeiro</h2>
<b>O Feiticeiro é uma Especialização da Classe Mago que se concentra em usar magias custosas para causar o máximo de dano possível.</b>
<i><b>Atributo Principal:</b> Inteligência (INT)</i>
<hr>
<table>
<tr>
<td>No nível 01 | <i><b>Mago:</b> Iniciação Arcana: Adicione as habilidades "Raio de Fogo.", "Golpe de Relâmpago." e "Congelar." ao seu Repertório. Essas habilidades custam 3 menos.
</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Feiticeiro:</b> Transbordamento I: No início de cada turno, recupere Essência igual a 1/3 da sua Inteligência.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Feiticeiro:</b> Arsenal Místico: Adicione as habilidades "Armadura Arcana" e "Raio Arcano" ao seu Repertório.
Sempre que lançar uma Magia Arcana, aumente seu Dano em 5.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Feiticeiro:</b> Transbordamento II: No início de cada turno, recupere Essência igual a 1/2 da sua Inteligência (Substitui Transbordamento I).</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Mago:</b> Maestria Arcana: Adicione as habilidades "Inferno", "Tempestade" e "Nevasca" ao seu Repertório. Quando conjuradas, você rola o Dano duas vezes e escolhe o maior resultado.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Mago:</b> Potencialização Intelectual: Sempre que lançar uma magia contra um unico inimigo, cause metade da sua Inteligência como dano no mesmo alvo.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Feiticeiro:</b> Transbordamento III: No início de cada turno, recupere Essência igual à sua Inteligência (Substitui Transbordamento II).</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Feiticeiro:</b> Renovação de Essência: Sempre que lançar uma magia, recupere Força Vital igual ao seu custo.</i></td>
</tr>
</table>
<hr>
Um personagem Feiticeiro começa com:
<ul>
<li><b>Torso:</b> <i>Camisa de Lã</i></li>
<li><b>Pernas:</b> <i>Calças</i></li>
<li><b>Mão Principal:</b> <i>Cajado Arcano</i></li>
</ul>
<hr>
</div>
<</if>><style>
body {
background-image: url("img/others/background.png");
background-color: transparent;
background-repeat: no-repeat;
background-size: cover;
}
.header {
font-family: 'ENDOR';
font-size: 42;
letter-spacing: 3px;
outline: 3px ridge #cacdce;
m
argin: auto;
outline-offset: 11px;
filter: drop-shadow(-7px 6px 15px #000000);
text-transform: uppercase;
}
#game-container {
position: relative;
width: auto;
height: auto;
background-color: black;
background-color: rgba(0, 0, 0, 0.8); /* Transparent black background */
overflow: auto ; /* Hide overflow content */
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(10px); /* Blur effect */
}
#text-container {
color: silver;
/* Additional styles for your text container */
}
.sub [
line-height: 2;
text-transform: lowercase;
}
.changelog {
overflow: hidden;
}
</style>
<<run UIBar.stow();>><<run UIBar.hide();>><<run window.hideRightUIBar()>>
<<if $language === "EN">>
<div id="game-container">
<div id="text-container">
<div class="header" align='center'>
<img src="img\others\Tittle.png">
<div class="sub">
<i>A Dark Fantasy Adventure.</i>
</div>
</div>
<div class="content" align='center'>
<<link "New Game">><<goto "pre-Character Creation">><</link>>
<<link "Arena">><<goto "FighterChoice">><<set $arena to true>>
<<set $arenaStage to 0>><</link>>
<<link "Options">><<run UI.settings()>><</link>>
<<if visited() > 1>><<link "Resume Game">><<run UIBar.unstow();>> <<run UIBar.show();>><<run Save.autosave.load()>><</link>><</if>>
<<link "Load Game">><<run UI.saves();>><<run UIBar.unstow();>> <<run UIBar.show();>><</link>>
</div>
<hr>
</div>
</div>
<<elseif $language === "PT-BR">>
<div id="game-container">
<div id="text-container">
<div class="header" align='center'>
<img src="img\others\Tittle.png">
<div class="sub">
<i>Uma Aventura de Fantasia Sombria.</i>
</div>
</div>
<div class="content" align='center'>
<<link "Novo jogo">><<goto "pre-Character Creation">><</link>>
<<link "Opções">><<run UI.settings()>><</link>>
<<if visited() > 1>><<link "Retorne ao jogo">><<run UIBar.unstow();>> <<run UIBar.show();>><<run Save.autosave.load()>><</link>><</if>>
<<link "Carregue jogo">><<run UI.saves();>><<run UIBar.unstow();>> <<run UIBar.show();>><</link>>
</div>
<hr>
</div>
</div>
<</if>>
<a href='https://ko-fi.com/H2H3SAWYH' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a><<run UIBar.stow();>><<run UIBar.hide();>>
<<set $EndCreation to false>>
<<if $language === "EN">>
<div aling='center'>
<table>
<tr>
<th></th>
<th>Difficulty:</th>
<th></th>
</tr>
<tr>
<td>
<<radiobutton "$difficulty" "easy">>Easy
<ul>
<li>Enemies have <b>75%</b> of their Lifeblood and Essence.</li>
<li>Enemies have their Damage, Defense and Hit-Chance <b>reduced</b>.</li>
<li>Tests are <b>easier</b> to success.</li>
<li>You gather <b>more</b> Gold and Experience than usual.</li>
</ul>
</td>
<td>
<<radiobutton "$difficulty" "normal" autocheck>>Normal
<ul>
<li>Enemies have <b>100%</b> of their Lifeblood and Essence.</li>
<li>Enemies have their Damage, Defense and Hit-Chance <b>unaltered</b>.</li>
<li>You gather Gold and Experience as usual.</li>
</ul>
</td>
<td>
<<radiobutton "$difficulty" "hard">>Hard
<ul>
<li>Enemies have <b>135%</b> of their Lifeblood and Essence.</li>
<li>Enemies have their Damage, Defense and Hit-Chance <b>increased</b>.</li>
<li>Tests are <b>harder</b> to success.</li>
<li>You gather <b>less</b> Gold and Experience than usual.</li>
</ul>
</td>
</tr>
</table>
[[Create your own character.|AncestryPage]]
<<link "Create a Random Character">>
<<run window.randomCharacterCreation()>>
<<goto "Confirmation">>
<</link>>
[[Go Back|main-menu]]
</div>
<<elseif $language === "PT-BR">>
<div aling='center'>
<table>
<tr>
<th></th>
<th>Dificuldade:</th>
<th></th>
</tr>
<tr>
<td>
<<radiobutton "$difficulty" "easy">>Fácil
<ul>
<li>Inimigos têm <b>75%</b> de suas Forças Vitais e Essências.</li>
<li>Inimigos têm seu Dano, Defesa e Chance-de-Acerto <b>reduzidos</b>.</li>
<li>Testes são <b>mais fáceis</b> de obter sucesso.</li>
<li>Você obtêm <b>mais</b> Ouro e Expêrience que o usual.</li>
</ul>
</td>
<td>
<<radiobutton "$difficulty" "normal" autocheck>>Normal
<ul>
<li>Inimigos têm <b>100%</b> de suas Forças Vitais e Essências.</li>
<li>Inimigos têm seu Dano, Defesa e Chance-de-Acerto <b>inálterados</b>.</li>
<li>Você obtêm Ouro e Expêrience como usual.</li>
</ul>
</td>
<td>
<<radiobutton "$difficulty" "hard">>Díficil
<ul>
<li>Inimigos têm <b>125%</b> de suas Forças Vitais e Essências.</li>
<li>Inimigos têm seu Dano, Defesa e Chance-de-Acerto <b>aumentados</b>.</li>
<li>Testes são <b>mais difíceis</b> de obter sucesso.</li>
<li>Você obtêm <b>menos</b> Ouro e Expêrience que o usual.</li>
</ul>
</td>
</tr>
</table>
[[Crie seu proprio personagem.|AncestryPage]]
<<link "Crie um personagem aleatório.">>
<<run window.randomCharacterCreation()>>
<<goto "Confirmation">>
<</link>>
</div>
<</if>><<nobr>>
<<if $minute == 60>>
<<set $minute to 0>>
<<set $hour += 1>>
<</if>>
<<if $hour >= 18>>
<<if $night is false>>
<<set $night to true>>
<</if>>
<<elseif $hour >= 6>>
<<if $night is true>>
<<set $moon += 1>>
<<set $night to false>>
<</if>>
<</if>>
<<if $night is false>>☀️<<else>><<display "moon">><</if>>
<</nobr>>
<<goto "RealStart">>
<div align='center'>
<<fadein 200ms 3s>> Chapter 1:<</fadein>><<fadein 200ms 4s>><<if $language === "EN">><h2>The Whose Give A Fuck Village:</h2><<elseif $language === "PT-BR">><h2>O Vilarejo dos que não se importam:</h2><</if>><</fadein>>
<<fadein 200ms 5s>>[[Start|Chapter 1]]<</fadein>>
</div>
<<silently>>
<<if $character[1].Specialization === "Vanguard">>
<<run State.variables.character[1].addTrait("Phalanx Training")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Rusted sword">><</addItem>> <<addItem "Shield">><</addItem>>
<<elseif $character[1].Specialization === "Shredder">>
<<run State.variables.character[1].addSkill("Shredder Stance")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Rusted sword">><</addItem>> <<addItem "Short sword">><</addItem>>
<<elseif $character[1].Specialization === "Archer">>
<<run State.variables.character[1].addSkill("Quick Shot")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Short bow">><</addItem>>
<<elseif $character[1].Specialization === "Duelist">>
<<run State.variables.character[1].addSkill("Feint")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Rapier">><</addItem>>
<<elseif $character[1].Specialization === "Thief">>
<<run State.variables.character[1].addSkill("Pickpocket")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>><<addItem "Hood">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Dagger">><</addItem>> <<addItem "Pants">><</addItem>>
<<elseif $character[1].Specialization === "Assassin">>
<<run State.variables.character[1].addSkill("Apply Venom")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>>
<<addItem "Hood">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Crossbow">><</addItem>><<addItem "Wooden shield">><</addItem>>
<<elseif $character[1].Specialization === "Spy">>
<<run State.variables.character[1].addTrait("Silver Tongue")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>>
<<addItem "Mask">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Dagger">><</addItem>>
<<elseif $character[1].Specialization === "Trapper">>
<<run State.variables.character[1].addTrait("Lay-in-Wait")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>>
<<addItem "Hood">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Crossbow">><</addItem>>
<<elseif $character[1].Specialization === "Berserker">>
<<run State.variables.character[1].addTrait("Though Skin")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<addItem "Belted skirt">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Great axe">><</addItem>>
<<elseif $character[1].Specialization === "Feral">>
<<run State.variables.character[1].addTrait("Natural Fighter")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<elseif $character[1].Specialization === "Juggernaut">>
<<run State.variables.character[1].addTrait("Iron Suit")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<addItem "Coif">><</addItem>><<addItem "Leather armor">><</addItem>> <<addItem "Buckle">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Rusted sword">><</addItem>> <<addItem "Wooden shield">><</addItem>>
<<elseif $character[1].Specialization === "Shaman">>
<<run State.variables.character[1].addSkill("Call the Elements")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<addItem "Wool Shirt">><</addItem>><<addItem "Belted Skirt">><</addItem>><<addItem "Circlet">><</addItem>>
<<addItem "Pants">><</addItem>> <<addItem "Shield">><</addItem>>
<<elseif $character[1].Specialization === "Wizard">>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>><<addItem "Wool shirt">><</addItem>> <<addItem "Circlet">><</addItem>> <<addItem "Arcane staff">><</addItem>><<addItem "Pants">><</addItem>>
<<elseif $character[1].Specialization === "Warlock">><<addItem "Wool shirt">><</addItem>><<addItem "Circlet">><</addItem>> <<addItem "Wand">><</addItem>> <<addItem "Spellbook">><</addItem>> <<addItem "Pants">><</addItem>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>>
<<if $character[1].Pact === "Shadows">>
<<run State.variables.character[1].addSkill("Summon: Shadow")>>
<</if>>
<<elseif $character[1].Specialization === "Invoker">>
<<addItem "Wool shirt">><</addItem>> <<addItem "Circlet">><</addItem>><<addItem "Arcane staff">><</addItem>><<addItem "Pants">><</addItem>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>>
<<elseif $character[1].Specialization === "Spellblade">>
<<addItem "Wool shirt">><</addItem>> <<addItem "Belt">><</addItem>>
<<addItem "Pants">><</addItem>> <<addItem "Wand">><</addItem>><<addItem "Shield">><</addItem>>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>>
<<elseif $character[1].Specialization === "Dancer">>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addTrait("Blade Dancer")>>
<<addItem "Circlet">><</addItem>> <<addItem "Wool shirt">><</addItem>><<addItem "Belted skirt">><</addItem>> <<addItem "Scimitar">><</addItem>>
<<elseif $character[1].Specialization === "Bard">>
<<addItem "Belt">><</addItem>> <<addItem "Pants">><</addItem>> <<addItem "Wool shirt">><</addItem>><<addItem "Short sword">><</addItem>> <<addItem "Lute">><</addItem>>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addSkill("Earworm")>>
<<elseif $character[1].Specialization === "Scholar">>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addTrait("Novice Knowledge")>>
<<addItem "Wool shirt">><</addItem>> <<addItem "Belt">><</addItem>>
<<addItem "Pants">><</addItem>> <<addItem "Quatterstaff">><</addItem>>
<<elseif $character[1].Specialization === "Barber Surgeon">>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addTrait("Cirurgic Precision")>>
<<addItem "Pants">><</addItem>> <<addItem "Wool shirt">><</addItem>><<addItem "Throwing knifes">><</addItem>> <<addItem "Dagger">><</addItem>>
<<elseif $character[1].Specialization === "Paladin">><<addItem "Holy garments">><</addItem>> <<addItem "Pants">><</addItem>> <<addItem "Warhammer">><</addItem>>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Aura of Devotion")>>
<<elseif $character[1].Specialization === "Cleric">> <<addItem "Holy garments">><</addItem>> <<addItem "Pants">><</addItem>> <<addItem "Wand">><</addItem>> <<addItem "Divine symbol">><</addItem>>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Divine Fondation")>>
<<run State.variables.character[1].addSkill("Heal")>>
<<run State.variables.character[1].addSkill("Judgement")>>
<<run State.variables.character[1].addSkill("Shield of the Faithful")>>
<<elseif $character[1].Specialization === "Inquisitor">><<addItem "Holy garments">><</addItem>> <<addItem "Divine symbol">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Mace">><</addItem>>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Brand The Heretic")>>
<<elseif $character[1].Specialization === "Flagellant">>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Penitent Strike")>>
</div><<addItem "Holy garments">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Flail">><</addItem>>
<</if>>
<<for _i = 0; _i < $character[1].level;_i++>>
<<set $character[1].MAXLIFE to 20>><<set $character[1].MAXMANA to 10>>
<<set _liferoll to window.rollDice('1d12')>> <<set _manaroll to window.rollDice('1d10')>>
<<if _liferoll < 6>><<set _liferoll = 6>><</if>>
<<if _manaroll < 5>><<set _manaroll = 5>><</if>>
<<set $character[1].MAXLIFE += _liferoll>>
<<set $character[1].MAXMANA += _manaroll>>
<</for>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].PER>>
<<set $character[1].MAXMANA += $character[1].INT + $character[1].PER>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<elseif $character[1].Ancestry === 'Herald' && $heraldChoice === "Nature">>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].MAXMANA = Math.round(($character[1].MAXMANA / 2))>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].MAXMANA >>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<else>>
<<set $character[1].MAXLIFE += $character[1].RES>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<</if>>
<<if $character[1].Ancestry === "Draconian">>
<<addItem "Draconian claw">><</addItem>>
<<equipItem "Draconian claw">>
<<addItem "Other Draconian claw">><</addItem>>
<<equipItem "Other Draconian claw">>
<</if>>
<<set $EndCreation to true>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += $character[1].MAXMANA>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<elseif $character[1].Pact === "Shadow">>
<<set $character[1].MAXLIFE = parseInt(Math.round($character[1].MAXLIFE * 0.15))>>
<<set $character[1].currentLife = parseInt(Math.round($character[1].currentLife * 0.15))>>
<</if>><<set $character[1].Athletics += Math.round($character[1].STR / 3)>> <<set $character[1].Acrobatics += Math.round($character[1].DEX / 3)>> <<set $character[1].Stealth += Math.round($character[1].DEX / 3)>> <<set $character[1].SleightofHands += Math.round($character[1].DEX / 3)>> <<set $character[1].WorldKnowledge += Math.round($character[1].INT / 3)>> <<set $character[1].MysticalKnowledge += Math.round($character[1].INT / 3)>> <<set $character[1].ArcaneKnowledge += Math.round($character[1].INT / 3)>> <<set $character[1].Speech += Math.round($character[1].CHA / 3)>> <<set $character[1].Arts += Math.round($character[1].CHA / 3)>> <<set $character[1].Intimidation += Math.round($character[1].CHA / 3)>> <<set $character[1].Insight += Math.round($character[1].PER / 3)>> <<set $character[1].Awareness += Math.round($character[1].PER / 3)>>
<<if $character[1].Ancestry === 'Human'>><<run $character[1].addTrait('Adaptable')>> <<run $character[1].addTrait('Unlimited Potential')>> <<elseif $character[1].Ancestry === 'Vanadi'>> <<run $character[1].addTrait('Animal senses')>> <<run State.variables.character[1].addTrait("Feral Mask")>> <<set $character[1].additionalHitChance += 5>> <<elseif $character[1].Ancestry === 'Dwarf'>><<run $character[1].addTrait('Reforger')>> <<run $character[1].addTrait('Ancestral Knowledge')>> <<elseif $character[1].Ancestry === 'Elf'>> <<run $character[1].addTrait('Favored')>> <<run $character[1].addTrait('Harmonious Existence')>> <<elseif $character[1].Ancestry === 'Draconian'>> <<set $character[1].BaseDefense = 15>><<run $character[1].addTrait('Natural Warriors')>> <<run $character[1].addTrait('Underwater Marauder')>> <<elseif $character[1].Ancestry === 'Herald'>><<run $character[1].addTrait('Arcane Core')>> <<if $HeraldChoice === "Nature's Harbinger">><<run $character[1].addTrait("Nature's Blessing")>> <<elseif $HeraldChoice === "Cosmos' Harbinger">> <<run $character[1].addTrait("Astral Connection")>>
<<elseif $HeraldChoice === "Creation's Harbinger">> <<run $character[1].addTrait("Architect of Reality")>> <<elseif $HeraldChoice === "Destruction's Harbinger">> <<run $character[1].addTrait("Eternal Hunger")>>
<</if>> <</if>>
<<run $character[1].addSkill("Rest")>>
<</silently>><<run UIBar.unstow();>> <<run UIBar.show();>><<run window.showRightUIBar()>>
<<if $language === "EN">>
<i>*Thump*</i>
The sound made by an agonizing step;
<p>And another <i>*Thump*</i> you make.</p>
This mind-numbing rhythm has been your weary routine for the past few days, each step a torturous reminder of your unrelenting march toward nowhere. You are exhausted, bored, and parched beyond belief, simply yearning for a break -any break, even if it is just a brief respite. But rest is not an option for you now, not when the gnawing fear that if you close your eyes, you might never open them again circles over you like a vulture circles dead meat.
Curiously, a vulture does indeed appear in the skies above you. But not because of you, no. Not everything is about you.
Thankfully, a few hours ago, you stumbled upon a crude wooden signpost, a desperate cry for civilization in this desolate wasteland. It points to a road that looks like it has not seen maintenance in centuries, but it is a path nonetheless, and you follow it with a heavy heart and heavier feet.
One might say the scenery has a certain rugged charm if they were blind and had lost all sense of smell. Unfortunately, you possess both sight and scent and the overwhelming stench of decay and filth in the air strips away any semblance of beauty. Even the flies, those resilient scavengers, have given up and flown to less foul pastures. Only someone truly desperate for the promise of a warm meal and a bed would willingly endure this torturous journey. And, unsurprisingly, that someone is you.
Why, you might ask? Well, my dear traveler, it is because...
<span id="originslector">
<div align='center'>
<hr>
Choose your history:
<<if $character[1].Ancestry === "Human">>
<<link "You have barely escaped from draconian slavery.">>
<<replace "#originslector">>
<<include "Draconian Slave">>
<</replace>>
<<set $character[1].Origin = "Escapee">>
<</link>>
<<link "You have lost everything you once had.">>
<<replace "#originslector">>
<<include "No longer Free">>
<</replace>>
<<set $character[1].Origin = "Free-human">>
<</link>>
<<link "They allowed you to go free, for some reason...">>
<<replace "#originslector">>
<<include "Earned Freedom">>
<</replace>>
<<set $character[1].Origin = "Liberated">>
<</link>>
<<elseif $character[1].Ancestry === "Elf">>
<<link "With showing signs of the affliction, you were presenting yourself as a danger for anyone around.">>
<<set $character[1].Origin = "Sick">>
<<replace "#originslector">>
<<include "Ravenous">>
<</replace>>
<</link>>
<<link "I simply wanted to explore this world.">>
<<set $character[1].Origin = "Curious mind">>
<<replace "#originslector">>
<<include "What a beautiful word">>
<</replace>>
<</link>>
<<link "Someone I care about was afflicted, I must search for a way to cure them.">>
<<set $character[1].Origin = "Searching for a cure">>
<<replace "#originslector">>
<<include "Must save someone">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Herald">>
<<link "Something calls for me.">>
<<set $character[1].Origin = "Called">>
<<replace "#originslector">>
<<include "Strange dreams">>
<</replace>>
<</link>>
<<link "The only person that cared for me has passed away, I have nowhere to call home.">>
<<set $character[1].Origin = "Without home">>
<<replace "#originslector">>
<<include "Goodbye">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Dwarf">>
<<link "They cast me out and shaved my beard. I cannot ever return back.">>
<<set $character[1].Origin = "Banished">>
<<replace "#originslector">>
<<include "Against the law">>
<</replace>>
<</link>>
<<link "I am tasked to explore the upperworld.">>
<<set $character[1].Origin = "Overworld Scout">>
<<replace "#originslector">>
<<include "Tasked with a mission">>
<</replace>>
<</link>>
<<link "Someone needed my skills, but it ended up bad.">>
<<set $character[1].Origin = "Hired for a job">>
<<replace "#originslector">>
<<include "Bad job">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Draconian">>
<<link "Did not return home. And never will!">>
<<set $character[1].Origin = "Immature">>
<<replace "#originslector">>
<<include "Never going back">>
<</replace>>
<</link>>
<<link "Cast out from Scalebound order.">>
<<set $character[1].Origin = "Ex-Scalebound">>
<<replace "#originslector">>
<<include "Heresy">>
<</replace>>
<</link>>
<<link "Draconians forgotten of our true name! But Iruxi lives through me!">>
<<set $character[1].Origin = "Iruxi Legacy">>
<<replace "#originslector">>
<<include "A memory">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Vanadi">>
<<link "Our homes were burned... and our children, killed...">>
<<set $character[1].Origin = "Survivor">>
<<replace "#originslector">>
<<include "In blazes">>
<</replace>>
<</link>>
<<link "Monsters attacked my lands, i fear i was the only survivor.">>
<<set $character[1].Origin = "Prey">>
<<replace "#originslector">>
<<include "Runaway">>
<</replace>>
<</link>>
<</if>>
</div>
</span>
<<elseif $language === "PT-BR">>
<i>*Baque*</i>
O som produzido por um passo agonizante;
<p>E outro <i>*Baque*</i> que você dá.</p>
Esse ritmo entorpecente tem sido sua rotina cansativa nos últimos dias, cada passo um lembrete torturante de sua marcha implacável em direção a lugar nenhum. Você está exausto, entediado e com uma sede inacreditável, simplesmente ansiando por uma pausa – qualquer pausa, mesmo que seja apenas uma breve pausa. Mas descansar não é uma opção para você agora, não quando o medo corrosivo de que, se você fechar os olhos, nunca mais os abrirá, circula sobre você como um abutre circula sobre carne morta.
Curiosamente, um abutre realmente aparece nos céus acima de você. Mas não por sua causa, não. Nem tudo é sobre você.
Felizmente, algumas horas atrás, você tropeçou em uma placa de madeira rústica, um grito desesperado pela civilização neste deserto desolado. Aponta para uma estrada que parece não receber manutenção há séculos, mas mesmo assim é um caminho, e você o segue com o coração pesado e os pés mais pesados.
Poderíamos dizer que o cenário tem um certo encanto acidentado se eles fossem cegos e tivessem perdido todo o olfato. Infelizmente, você possui visão e olfato, e o cheiro insuportável de decomposição e sujeira no ar elimina qualquer aparência de beleza. Até as moscas, aqueles necrófagos resilientes, desistiram e voaram para pastagens menos sujas. Somente alguém verdadeiramente desesperado pela promessa de uma refeição quente e uma cama suportaria de bom grado esta jornada torturante. E, sem surpresa, esse alguém é você.
Por que, você pode perguntar? Bem, meu caro viajante, é porque...
<span id="originslector">
<div align='center'>
<hr>
Choose your history:
<<if $character[1].Ancestry === "Human">>
<<link "Você mal escapou da escravidão draconiana.">>
<<replace "#originslector">>
<<include "Draconian Slave">>
<</replace>>
<<set $character[1].Origin = "Escapee">>
<</link>>
<<link "Você perdeu tudo que um dia teve.">>
<<replace "#originslector">>
<<include "No longer Free">>
<</replace>>
<<set $character[1].Origin = "Free-human">>
<</link>>
<<link "Eles permitiram você a ir livre, por alguma razão...">>
<<replace "#originslector">>
<<include "Earned Freedom">>
<</replace>>
<<set $character[1].Origin = "Liberated">>
<</link>>
<<elseif $character[1].Ancestry === "Elf">>
<<link "Ao mostrar sinais da aflição, você se apresentava como um perigo para qualquer pessoa ao seu redor..">>
<<set $character[1].Origin = "Sick">>
<<replace "#originslector">>
<<include "Ravenous">>
<</replace>>
<</link>>
<<link "Eu simplesmente queria explorar o mundo.">>
<<set $character[1].Origin = "Curious mind">>
<<replace "#originslector">>
<<include "What a beautiful word">>
<</replace>>
<</link>>
<<link "Alguém de quem eu gosto foi afligido, devo procurar uma maneira de curá-lo.">>
<<set $character[1].Origin = "Searching for a cure">>
<<replace "#originslector">>
<<include "Must save someone">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Herald">>
<<link "Algo chama por mim.">>
<<set $character[1].Origin = "Called">>
<<replace "#originslector">>
<<include "Strange dreams">>
<</replace>>
<</link>>
<<link "A única pessoa que cuidou de mim faleceu, não tenho onde ligar para casa.">>
<<set $character[1].Origin = "Without home">>
<<replace "#originslector">>
<<include "Goodbye">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Dwarf">>
<<link "Eles me expulsaram e rasparam minha barba. Eu não posso voltar.">>
<<set $character[1].Origin = "Banished">>
<<replace "#originslector">>
<<include "Against the law">>
<</replace>>
<</link>>
<<link "Tenho a tarefa de explorar o mundo superior..">>
<<set $character[1].Origin = "Overworld Scout">>
<<replace "#originslector">>
<<include "Tasked with a mission">>
<</replace>>
<</link>>
<<link "Alguém precisava de minhas habilidades, mas acabou dando ruim.">>
<<set $character[1].Origin = "Hired for a job">>
<<replace "#originslector">>
<<include "Bad job">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Draconian">>
<<link "Nunca a retornar a casa. E nunca irei!">>
<<set $character[1].Origin = "Immature">>
<<replace "#originslector">>
<<include "Never going back">>
<</replace>>
<</link>>
<<link "Exilado da Ordem dos Jurados da Escama.">>
<<set $character[1].Origin = "Ex-Scalebound">>
<<replace "#originslector">>
<<include "Heresy">>
<</replace>>
<</link>>
<<link "Draconianos esqueceram de nosso verdadeiro nome! Mas Iruxi vive através de mim!">>
<<set $character[1].Origin = "Iruxi Legacy">>
<<replace "#originslector">>
<<include "A memory">>
<</replace>>
<</link>>
<<elseif $character[1].Ancestry === "Vanadi">>
<<link "Nossas casas foram queimadas... e nossas crianças, mortas...">>
<<set $character[1].Origin = "Survivor">>
<<replace "#originslector">>
<<include "In blazes">>
<</replace>>
<</link>>
<<link "Monstros atacaram minhas terras, sou o unico sobrevivente.">>
<<set $character[1].Origin = "Prey">>
<<replace "#originslector">>
<<include "Runaway">>
<</replace>>
<</link>>
<</if>>
</div>
</span>
<</if>><<if $language === "EN">>
You've managed to scrape away from the gripping claws of draconian slavery, although you owe your newfound freedom to the odd decision of a guard who chose to rest at the most convenient time for you. But who's complaining? Not you, perhaps the other slaves who did not get the memo? But who cares about their opinion, anyway?
In the bizarre minds of those reptiles, you're practically a free soul in the world now – well, at least until you cross paths with one of those Scalebound fanatics, but at least those are as rare as common sense. To most draconians, it does not matter from whence you came; if you are not working as a slave, then you aren't one.
But let's not downplay the years you've toiled away crafting the Draconians' weapons, structures, and designs. And let's not forget those nights of catering to the whims of the demanding draconian ladies, an experience far less enjoyable than one might initially imagine.
Nevertheless, you've survived – or more accurately, parts of you have survived, bearing the marks of harsh cuts and bites as badges of resilience. What's left doesn't have the slightest intention of taking a leisurely rest right now. No, it yearns for restitution, for the stolen moments and wasted years to return with interest.
Sadly, true freedom doesn't come cheap, especially when your coin purse is lighter than a cloud, and the only ones willing to employ a former slave are the rebellion groups who risk themselves to free other slaves. You're going to spoil your hands, tackling the oddest jobs and questionable tasks, to slowly and certainly fallible, produce a reputation as a mercenary who answers to no one but themselves.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Você conseguiu se livrar das garras da escravidão draconiana, embora deva sua liberdade recém-adquirida à estranha decisão de um guarda que escolheu descansar no momento mais conveniente para você. Mas quem está reclamando? Não é você, talvez sejam os outros escravos que não receberam o memorando, mas quem se importa com a opinião deles, afinal?
Nas mentes bizarras desses répteis, você é praticamente uma alma livre no mundo agora – bem, pelo menos até cruzar o caminho de um daqueles fanáticos Scalebound, mas pelo menos esses são tão raros quanto o bom senso. Para a maioria dos Draconianos, não importa de onde você veio; se você não trabalha como escravo, então você não é escravo.
Mas não vamos subestimar os anos em que você trabalhou duro criando armas, estruturas e designs dos Draconianos. E não esqueçamos aquelas noites de atendimento aos caprichos das exigentes senhoras draconianas, uma experiência muito menos agradável do que se poderia imaginar inicialmente.
No entanto, você sobreviveu – ou, mais precisamente, partes de você sobreviveram, trazendo marcas de cortes e mordidas duras como emblemas de resiliência. O que sobrou não tem a menor intenção de descansar agora. Não, anseia por restituição, porque os momentos roubados e os anos perdidos são devolvidos com juros.
Infelizmente, a verdadeira liberdade não sai barata, especialmente quando o seu porta-moedas é mais leve que uma nuvem, e os únicos dispostos a empregar um ex-escravo são os grupos rebeldes que se arriscam para libertar outros escravos. Você vai estragar suas mãos, enfrentando os trabalhos mais estranhos e tarefas questionáveis, para lenta e certamente falível, produzir uma reputação de mercenário que não responde a ninguém além de si.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
You've seen it all slip away, haven't you? The palaces, the gleaming gold, the finest clothing money could buy, and a line of lovers that would make any court poet envious – all gone. A single disastrous wager, a treacherous 'associate' who turned out to be a viper in disguise – that's the tale of your riches-to-rags plunge. But then again, that's life in the Great Desert of Havar. A place where slaves can ascend to nobility while nobles plummet into servitude in the blink of an eye. It's what they mean when they say, 'You reap what you sow.'
Sure, you might've engaged in some morally questionable endeavors to amass that obscene wealth back in the day, but it's different, right? Back then, you were on the winning side, not playing the part of the dupe, but that's how it sadly works in the golden cities; only those with gold are considered citizens.
Gold, and gold alone, speaks as the hammer of justice. No law protects someone from unfair deals or theft. No bribe is enough to secure someone's wealth. Even for the chance of work, one has to pay a hefty price. Thus, many have fallen into a treacherous and unending cycle of debt and semi-slavery. Others are sold as slaves in markets and caravans for and by Draconian tourists, a profitable and despicable practice that rends piles of Draconian coins.
Alas, it's all behind you now. The past is a distant mirage, fading with every step you take, retreating like a cowardly cur. You had to abandon your opulent abode, or else you'd be consigned to the same fate as those other poor saps – a life of backbreaking labor and subservience. So here you are, traversing the Grasslands amidst Draconians, Elves, and fellow humans who, unlike you, never had the privilege of tasting life's finer fruits and instead languished as perpetual thralls.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Você viu tudo escapar, não foi? Os palácios, o ouro reluzente, as melhores roupas que o dinheiro poderia comprar e uma linhagem de amantes que deixaria qualquer poeta da corte com inveja – tudo se foi. Uma única aposta desastrosa, um “associado” traiçoeiro que se revelou uma víbora disfarçada – essa é a história da sua queda da riqueza para a miséria. Mas, novamente, assim é a vida no Grande Deserto de Havar. Um lugar onde os escravos podem ascender à nobreza enquanto os nobres mergulham na servidão num piscar de olhos. É o que eles querem dizer quando dizem: 'Você colhe o que planta'.
Claro, você pode ter se envolvido em alguns esforços moralmente questionáveis para acumular essa riqueza obscena no passado, mas é diferente, certo? Naquela época, você estava do lado vencedor, não fazendo o papel de ingênuo, mas infelizmente é assim que funciona nas cidades douradas; apenas aqueles com ouro são considerados cidadãos.
O ouro, e somente o ouro, fala como o martelo da justiça. Nenhuma lei protege alguém de negócios injustos ou roubo. Nenhum suborno é suficiente para garantir a riqueza de alguém. Mesmo pela oportunidade de trabalho, é preciso pagar um preço alto. Assim, muitos caíram num ciclo traiçoeiro e interminável de dívida e semi-escravidão. Outros são vendidos como escravos em mercados e caravanas para e por turistas draconianos, uma prática lucrativa e desprezível que rasga acúmulos de moedas draconianas.
Infelizmente, tudo ficou para trás agora. O passado é uma miragem distante, desaparecendo a cada passo que você dá, recuando como um vira-lata covarde. Você teve que abandonar sua residência opulenta, ou então seria condenado ao mesmo destino daqueles outros pobres idiotas - uma vida de trabalho árduo e subserviência. Então aqui está você, atravessando as Pradarias entre Draconianos, Elfos e outros seres humanos que, ao contrário de você, nunca tiveram o privilégio de provar os melhores frutos da vida e, em vez disso, definharam como escravos perpétuos.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Like countless others before you and doubtlessly countless more to come, you were nothing more than a human slave, or at least until recently. By some twisted stroke of luck, you found yourself among the double-digit number of slaves granted a semblance of freedom. The reasons behind your newfound liberty matter little to you; you are thankful to be no longer within the cruel grasp of Ulgarosh Citadel (Uhl-gah-roash), the very heart of the draconian empire, a testament to the hundreds of thousands of slaves whose blood and sweat had soaked into the stones over centuries, their spirits crushed beneath the draconian overlords' rule.
But behind those stone-cold walls, your brother remains trapped alongside those reptilian monsters. Your existence as a slave, while undoubtedly unbearable, was not as agonizing as it had been in the last month. You both served primarily as cookers in the household of a minor draconian family—though using the term 'family' felt foreign, given the draconians' peculiar concept of familial bonds. They traded partners with every gestation. As soon as the offspring were born, they were to be trained by their biological fathers to hunt and fight. After years of this harsh education, they returned to their mothers to learn their tongue and history, and, above all, they were taught reverence for the dragons. Only then were these draconian children granted a semblance of freedom. An irony that was not lost; the draconians valued their offspring's liberty while ruthlessly enslaving yours. But such musings mattered little in the grand scheme of your existence. The truth was, they fed you. You had time to rest and mend from wounds and diseases. You even had your own house within those walls, although it was far from the comfort the draconians enjoyed. A part of you yearned for the familiar weight of chains, the perverse sense of stability it offered. But another part, a defiant part, yearned for dignity—for you and your brother.
You couldn't stand the thought of him remaining captive for any moment longer. Whispers among the slaves spoke of northern human lands engaging in the commerce of slaves. Horrendous as it is, perhaps, if you could amass enough coins, you might secure your brother's freedom, wrenching him from the clutches of the draconians. In the vast expanse of your determination, the spark of hope flickered, dim yet unyielding, lighting the path to your uncertain future.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Como inúmeros outros antes de você e, sem dúvida, incontáveis outros que virão, você não era nada mais do que um escravo humano, pelo menos até recentemente. Por algum golpe de sorte, você se viu entre o número de dois dígitos de escravos que receberam uma aparência de liberdade. As razões por trás de sua liberdade recém-adquirida pouco importam para você; você está grato por não estar mais sob o domínio cruel da Cidadela de Ulgarosh (Uhl-gah-roash), o próprio coração do império draconiano, um testemunho das centenas de milhares de escravos cujo sangue e suor foram encharcados nas pedras ao longo dos séculos, seus espíritos foram esmagados sob o domínio dos senhores draconianos.
Mas por trás dessas paredes frias, seu irmão permanece preso ao lado daqueles monstros reptilianos. Sua existência como escravo, embora sem dúvida insuportável, não foi tão angustiante como no último mês. Vocês dois serviram principalmente como cozinheiros na casa de uma família draconiana menor – embora usar o termo “família” parecesse estranho, dado o conceito peculiar de laços familiares dos draconianos. Eles trocaram parceiros a cada gestação. Assim que os filhos nascessem, seriam treinados por seus pais biológicos para caçar e lutar. Após anos dessa educação severa, eles voltaram para suas mães para aprenderem sua língua e história e, acima de tudo, aprenderam a reverenciar os dragões. Só então foi concedida a estas crianças draconianas uma aparência de liberdade. Uma ironia que não se perdeu; os draconianos valorizavam a liberdade de seus descendentes enquanto escravizavam implacavelmente os seus. Mas tais reflexões pouco importavam no grande esquema da sua existência. A verdade é que eles alimentaram você. Você teve tempo para descansar e curar feridas e doenças. Você até tinha sua própria casa dentro daquelas paredes, embora estivesse longe do conforto que os draconianos desfrutavam. Uma parte de você ansiava pelo peso familiar das correntes, pela sensação perversa de estabilidade que elas ofereciam. Mas outra parte, uma parte desafiadora, ansiava por dignidade – para você e seu irmão.
Você não aguentava mais pensar nele permanecendo em cativeiro por mais nenhum momento. Sussurros entre os escravos falavam de terras humanas do norte envolvidas no comércio de escravos. Por mais horrível que seja, talvez, se você conseguisse acumular moedas suficientes, você pudesse garantir a liberdade de seu irmão, arrancando-o das garras dos draconianos. Na vasta extensão da sua determinação, a centelha de esperança cintilou, fraca, mas inflexível, iluminando o caminho para o seu futuro incerto.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Sometimes...Sometimes, when you squeeze your eyelids shut, closing your senses of the world, you can feel it moving.
Slithering through your phloems, worming its way deep within you, that vile imprint burrowing, forming a nest within you, a mark into the very core of your wood-flesh to brand you as the new abomination, a child of the dark goddess Urahyahra, "The Horned maw"; "The mother of monsters" as the mortals call her.
You can feel the hunger within you. The lust that suggests, no, demands you to quench your thirst with blood, feed your hunger with flesh and bones, and force yourself to spread your "gift" with others.
The call to purge the weak;
The urge to change, to evolve, and to be more. So much more.
It's like a necessity, an instinct that somehow was always inside you, hidden in some locked chamber, that slowly, day by day, consumes your being.
But you have to be stronger.
You cannot allow her to have another twisted child.
The thought of your starting to delve into those desires terrifies you. That "thing" is not the being you desire to be; that "gift" is not a gift at all. It's a curse, a twisted view of nature that grows at the same rate as it devours itself whole. It's madness.
No wonder your "serie'rey" shunned you, or as in human terms, your "family"-although that term does not entirely grasp the complexity of your connection... You were more than kin; the three of you, carved from the same roots, fed by the same soil, and your minds and feelings entwined as one, it was harmonic.
But when the dark mother decided to play favorites, they were forced to serve you from that harmony to save themselves from the disease you now carry in your thoughts. But you are lost without them. They made you whole. But you cannot put them in danger of sharing such fate. No, no one deserves this.
You ran away, as far as you could from them;
But it's merely a matter of time before her influence condemns you to become a bannermen of her twisted visage, propagating her cycle of unending violence as spores of a mutated carnivorous plant that seeks proliferation at all moments. That's why you must resist her as long as you can. Her design is cunning, a cascading effect of unending chaos.
She may be a goddess, but some once stood toe to toe with her before the dragon's birth. Perhaps they have a cure.
There must be one.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Às vezes... Às vezes, quando você fecha as pálpebras, fechando os sentidos do mundo, você pode senti-lo se movendo.
Deslizando através de seus floemas, abrindo caminho profundamente dentro de você, aquela marca vil escavando, formando um ninho dentro de você, uma marca no próprio âmago de sua carne de madeira para marcá-lo como a nova abominação, um filho da deusa negra Urahyahra, "A boca com chifres"; “A mãe dos monstros”, como os mortais a chamam.
Você pode sentir a fome dentro de você. A luxúria que sugere não exige que você sacie sua sede com sangue, alimente sua fome com carne e ossos e se force a espalhar seu “presente” com os outros.
O chamado para purificar os fracos;
A vontade de mudar, de evoluir e de ser mais. Muito mais.
É como uma necessidade, um instinto que de alguma forma sempre esteve dentro de você, escondido em alguma câmara trancada, que lentamente, dia após dia, vai consumindo o seu ser.
Mas você tem que ser mais forte.
Você não pode permitir que ela tenha outro filho distorcido.
A ideia de começar a mergulhar nesses desejos o aterroriza. Essa “coisa” não é o ser que você deseja ser; esse “presente” não é um presente de forma alguma. É uma maldição, uma visão distorcida da natureza que cresce na mesma proporção em que se devora inteira. É uma loucura.
Não admira que sua “serie'rey” tenha evitado você, ou, como em termos humanos, sua “família” – embora esse termo não compreenda inteiramente a complexidade de sua conexão... Você era mais que parente; vocês três, esculpidos nas mesmas raízes, alimentados pelo mesmo solo, e suas mentes e sentimentos entrelaçados como um só, eram harmônicos.
Mas quando a mãe sombria decidiu ter favoritos, eles foram forçados a servi-lo a partir dessa harmonia para se salvarem da doença que você agora carrega em seus pensamentos. Você está perdido sem eles. Eles fizeram você inteiro. Mas você não pode colocá-los em risco de compartilhar tal destino. Não, ninguém merece isso.
Você fugiu deles o mais longe que pôde.
Porém, é apenas uma questão de tempo até que a influência dela o condene a tornar-se um vassalo do seu rosto distorcido, propagando o seu ciclo de violência interminável como esporos de uma planta carnívora mutante que procura a proliferação a todo o momento. É por isso que você deve resistir a ela enquanto puder. Seu design é astuto, um efeito cascata de caos sem fim.
Ela pode ser uma deusa, mas alguns já estiveram frente a frente com ela antes do nascimento do dragão. Talvez eles tenham uma cura.
Deve haver um.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Honor.
What does that damned word even mean?
You had "honor" once when you were nothing more than a lapdog for your matron when you beat some sense into those who did not follow her orders.
When she told you to sit, you'd sit;
When she told you to bark, you'd bark;
When she told you to kill, you'd kill;
Fuck "honor". Fuck that bitch, she got what she deserved, a knife on her throat. But that is not what the other dwarves saw, no. They only saw a "liability" as a son who committed matricide. Fuck them too.
At least it was fast.
The trial had no delay settled in a single day. The court dictated you were guilty, not even allowing you to have a lawyer or being able to present your case, no, just the punishments; you'd be marked as an outcast and sent to the overworld to never put a foot again inside the undercities. And, of course, it meant that they would strip you of anything that marked you as a Dwarf: your belongings, heritage, and even your beard.
Now, you are alone in a world you have no fucking clue how it works, no one to help or give a fuck for you.
You are fucked...
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Honra.
O que essa maldita palavra significa?
Você teve "honra" uma vez, quando não era nada mais do que um cachorrinho de estimação de sua matrona, quando colocava algum bom senso naqueles que não seguiam suas ordens.
Quando ela lhe dissesse para sentar, você se sentaria.
Quando ela lhe dissesse para latir, você latiria.
Quando ela lhe dissesse para matar, você mataria.
Foda-se "honra". Foda-se essa vadia, ela teve o que merecia, uma faca na garganta. Mas não foi isso que os outros anões viram, não. Eles só viam como “responsabilidade” um filho que cometesse matricídio. Fodam-se eles também.
Pelo menos foi rápido.
O julgamento não teve atraso resolvido em um único dia. O tribunal determinou que você era culpado, nem mesmo permitindo que você tivesse advogado ou pudesse apresentar seu caso, não, apenas as punições; você seria marcado como um pária e enviado para o mundo superior para nunca mais colocar um pé nas cidades subterrâneas. E, claro, isso significava que eles iriam despojá-lo de qualquer coisa que o marcasse como um anão: seus pertences, sua herança e até mesmo sua barba.
Agora, você está sozinho em um mundo que você não tem ideia de como funciona, ninguém para ajudar ou se importar com você.
Você está fodido...
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
You should not be alive...
You not only allowed a slave to run away from a citadel, but you were the one that opened the gates to it's escape. This moment of weakness, no moment, is not forgivable for a Scalebounded.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Among the myriad rites and ceremonies overseen by the Draconians, none holds greater significance to them than the Vhrak'Eksh – their ritual of maturity, the ceremony that separates a child from an adult. Every decade, Draconians dispatch their offspring to test their mettle by surviving alone beyond the impregnable walls of their citadel, a stone-cold structure etched by the toil of human slaves. More than a hundred of these fledglings embark on this rite, aiming to prove the resilience and strength of their kind. However, the truth remains shrouded beneath the myth, and only a handful, scarcely a dozen, return to their father's and mother's embraces.
The common conception of Draconians perpetuates the image of perfect-born warriors, with skin and scales rivaling any armor crafted by men, boasting fangs and claws capable of cutting through metal. But reality starkly contrasts these exaggerated ideals. The public sees only the exceptional ones – those with the most enduring scales, the sharpest claws, and the strongest of their generation. The rest, the weak, the diseased, and the crippled? All become offerings to satiate the insatiable appetite of the monsters and beasts that roam the untamed lands beyond their citadel's protection.
For weakness is anathema to Draconians, a trait reserved only for other races. Only the strong are allowed to live in Draconians cities. It's a sad truth that burdens you all too intimately, for once, you were among those audacious youths. Once, you believed in these old lies, adorned the cloak of foolishness that your kind often wears. But no longer shall you heed the ritual's call to return to those forsaken cities or embrace the hypocrisy of your kind. The decree of insanity shall not bind you.
Now, as you stand apart from the dogma of your kin, a sense of purpose arises, a rebellion against the established norms, the skies seem broader, the lands untamed beckoning with whispers of freedom and truth. You forge your path, resolute in your decision to defy the confines of tradition and seek a destiny beyond the dictates of Draconian society.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Entre a miríade de ritos e cerimônias supervisionados pelos Draconianos, nenhum tem maior significado para eles do que o Vhrak'Eksh – seu ritual de maturidade, a cerimônia que separa uma criança de um adulto. A cada década, os Draconianos enviam seus descendentes para testar sua coragem, sobrevivendo sozinhos além das muralhas inexpugnáveis de sua cidadela, uma estrutura de pedra fria esculpida pelo trabalho de escravos humanos. Mais de cem desses calouros embarcam neste ritual, visando provar a resiliência e a força de sua espécie. No entanto, a verdade permanece envolta no mito, e apenas um punhado, quase uma dúzia, regressa aos abraços do pai e da mãe.
A concepção comum dos Draconianos perpétua a imagem de guerreiros natos perfeitos, com pele e escamas que rivalizam com qualquer armadura feita por homens, ostentando presas e garras capazes de cortar metal. Mas a realidade contrasta fortemente com estes ideais exagerados. O público vê apenas os excepcionais – aqueles com as escamas mais duradouras, as garras mais afiadas e os mais fortes da sua geração. O resto, os fracos, os doentes e os aleijados? Todos se tornam oferendas para saciar o apetite insaciável dos monstros e feras que vagam pelas terras indomadas além da proteção de sua cidadela.
Pois a fraqueza é um anátema para os Draconianos, uma característica reservada apenas para outras raças. Somente os fortes podem viver nas cidades draconianas. É uma triste verdade que pesa muito sobre vocês, pois pela primeira vez vocês estavam entre aqueles jovens audaciosos. Uma vez, você acreditou nessas velhas mentiras, adornou o manto da tolice que sua espécie costuma usar. Mas você não deverá mais atender ao chamado do ritual para retornar àquelas cidades abandonadas ou abraçar a hipocrisia de sua espécie. O decreto da insanidade não o obrigará.
Agora, à medida que você se distancia do dogma de seus parentes, surge um senso de propósito, uma rebelião contra as normas estabelecidas, os céus parecem mais amplos, as terras indomadas acenam com sussurros de liberdade e verdade. Você traça seu caminho, resoluto em sua decisão de desafiar os limites da tradição e buscar um destino além dos ditames da sociedade draconiana.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<if $character[1] !== $remember && $arena === false>>
<<if $inMenu is 1>>
<<nobr>><<if $return neq "">>
<<link "Return to the Game">>
<<goto $return>>
<<set $inMenu to 0>>
<<run window.showRightUIBar()>>
<</link>>
<</if>><</nobr>>
<<else>>
<<link 'Character'>>
<<goto 'Characterpage'>>
<<set $return to passage()>><<run window.hideRightUIBar()>>
<<set $inMenu to 1>>
<</link>>
<<link 'Inventory'>>
<<goto 'Inventory'>>
<<set $return to passage()>><<run window.hideRightUIBar()>>
<<set $inMenu to 1>>
<</link>>
<<link 'Jornal'>>
<<goto 'Jornal'>>
<<set $return to passage()>><<run window.hideRightUIBar()>>
<<set $inMenu to 1>>
<</link>>
<</if>>
<<elseif $arena is true>>
<<link "Fighter Page">>
<<dialog "Fighter Page">>
<div align="center">
<table>
<th></th>
<th>Equipment</th>
<th></th>
<tr>
<td></td>
<td><b>Head:</b> <<print $character[1].equipment.head.Name>></td>
<td></td>
</tr>
<tr>
<td></td>
<td><b>Torso:</b> <<print $character[1].equipment.torso.Name>></td>
<td></td>
</tr>
<tr>
<td><b>Main hand:</b> <<print $character[1].equipment.mainhand.Name>></td>
<td><b>Waist:</b> <<print $character[1].equipment.waist.Name>></td>
<td><b>Offhand:</b> <<print $character[1].equipment.offhand.Name>></td>
</tr>
<tr>
<td></td>
<td><b>Legs:</b> <<print $character[1].equipment.legs.Name>></td>
<td></td>
</tr>
<tr>
<td></td>
<td><b>Feet:</b> <<print $character[1].equipment.feet.Name>></td>
<td></td>
</tr>
</table>
<hr>
<b>Lifeblood:</b> <<print $character[1].currentLife>> / <<print $character[1].MAXLIFE>>
<b>Essence:</b> <<print $character[1].currentMana>> / <<print $character[1].MAXMANA>>
<b>Traits:</b> [<<print $character[1].traits>>]
<b>Wounds</b> <<print $character[1].broken>>
</div>
<</dialog>>
<</link>>
<</if>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 4)>>
You hear noises, the sound of movement,
the sound of a hurry, laughter, and metal.
And then,
Two men come from the woods.
<p>The first is an old, hairless, and toothless light-skinned man, <<if $character[1].Ancestry is "Herald" || $character[1].Ancestry is "Draconian">> taller than the average human, which means, smaller than you<<elseif $character[1].Ancestry is "Dwarf">> much taller than you<<else>>not taller than you<</if>>, with an ugly scar covering the leftmost part of his face, which, to be honest, is not a hideous mug to look at. Sure, the wound takes a toil to his looks, but perhaps, in another life, he could've been a ladies' man. In this one, though, he prefers the company of women convinced by the metallic clinking of coins.</p>
<p>The other is a younger man with far more hair than his fellow friend, somewhere between bronzed or brownish skin - well, it is hard to say when "mud" paints his face. Unlike his friend, this one has a roundish mug, a crooked nose, and eyes of the wrong colors. Not even his mother could love his face, especially after he beat her to death for money to spend on booze and whores. But you didn’t hear that from me.</p>
<p>These two men come from the forest grinning like wolves as they play, push, and laugh at each other's jokes and antics as two idiots who have been friends for years. In their hands lies a pouch. Even from afar, you can hear the sound it makes with each of its bearer's steps. Of the dangling sound of the many metallic pieces in contact with each other, the sound of coins.
At first, they are unaware of your presence, but their ignorance towards you lives short as the delightful and very..."perfumed" aroma of your unshowered body reaches their nostrils;</p>
<p>Briefly, they trade glances before turning to you with mischievous smiles - if they were trying to conceal it, they have failed. And as if they weren't two of the worst actors in the world, they fake some worried expressions as they approach you to babble.</p>
<p><b> Bald fella:</b> "Oi! Ye seems lost, pal! Are ye all right?"</p>
<br>
<p><b>"Mud"-face:</b> "Ye wanna some help, buddy? Wunna us to show you sum' shelter?"</p>
<br>
<p><b>??? (1):</b> "We can show ye the place, ye know..? *giggles* For a price."</p>
<span id="page2choice">
Do you:
<hr>
<<link "Attempt to dissuade them?">>
<<replace "#page2choice">>
<<include "diplomacy approach1">>
<</replace>>
<</link>>
<<link "Attempt to dissuade them <b>firmly</b>?">>
<<replace "#page2choice">>
<<include "intimidation approach1">>
<</replace>>
<</link>>
<<link "Tell in their faces how pathetic they are.">>
<<replace "#page2choice">>
<<include "tell them some truth">>
<</replace>>
<</link>>
<<link "Or do you want to get rid of them?">>
<<replace "#page2choice">>
<<include "straight to combat">>
<</replace>>
<</link>>
<<if $character[1].Specialization is "Thief" || $character[1].Specialization is "Assassin" || $character[1].Specialization is "Spy">>
<<link "Chat a little with them, you know, from thief to thieves.">>
<<replace "#page2choice">>
<<include "what a rapscallion">>
<</replace>>
<</link>>
<</if>>
</span>
<<if visited("Combatpage") >= 1>>
<<set $event.chapter1.initBandits = "dead">>
<<goto "Was that it?">>
<</if>><<run UIBar.unstow();>> <<run UIBar.show();>>
<<if $language === "EN">>
<h2>Victory</h2>
<<link "Return">>
<<set $character[1].statusEffects = $remember.statusEffects>>
<<set $character[1].MAXLIFE = $remember.MAXLIFE>>
<<set $character[1].MAXMANA = $remember.MAXMANA>>
<<set $character[1].additionalDamage = $remember.additionalDamage>>
<<set $character[1].additionalDefense = $remember.additionalDefense>>
<<set $character[1].additionalHitChance = $remember.additionalHitChance>>
<<set $whosturn = "Player">>
<<goto $return>>
<</link>>
<<elseif $language === "PT-BR">>
<h2>Vitória</h2>
<<link "Retornar">>
<<set $whosturn = "Player">>
<<goto $return>>
<</link>>
<</if>>
<<silently>>
<<set $graveyard to []>>
<<script>>
State.variables.character[1].skills.forEach(skill => {
if (skill.inCooldown > 0) {
skill.inCooldown = 0;
}
})
if (State.variables.character[1].equipment.mainhand.incooldown > 0) {
State.variables.character[1].equipment.mainhand.incooldown = 0
}
if (State.variables.character[1].equipment.offhand.incooldown > 0) {
State.variables.character[1].equipment.offhand.incooldown = 0
}
<</script>>
<<if $character[1].equipment.offhand.Type.includes("throwing")>>
<<set $character[1].equipment.offhand.ammo = 6>>
<</if>>
<<if $character[1].equipment.mainhand.Type.includes("throwing")>>
<<set $character[1].equipment.mainhand.ammo = 6>>
<</if>>
<<set $allyInstances to []>>
<<if $character[1].statusEffects.eagleForm>>
<<set $character[1].PER -= 6>>
<<set $character[1].INT -= 3>>
<<set $character[1].MAXMANA -= 3>>
<<set $character[1].currentMana -= 3>>
<<set $character[1].statusEffects.eagleForm to false>>
<<elseif $character[1].statusEffects.wolfForm>>
<<set $character[1].STR -= 6>>
<<set $character[1].DEX -= 3>>
<<set $character[1].statusEffects.wolfForm to false>>
<<esleif $character[1].statusEffects.bearForm>>
<<set $character[1].RES -= 6>>
<<set $character[1].CHA -= 3>>
<<set $character[1].MAXLIFE -= 6>>
<<set $character[1].currentLife -= 6>>
<<set $character[1].statusEffects.bearForm to false>>
<</if>>
<<if $arena is true>>
<<set _earned += (random(15, 50) * $arenaStage) + (4 * $character[1].level)>>
<<if $character[1].traits.includes("Nimble Fingers")>> <<set earned to Math.round(_earned * 1.15)>><</if>>
<<set $character[1].Gold += _earned>>
This fight earned you <<print _earned>> Gold>>
<</if>>
<</silently>>
<div align='center'>
<<if $language === "EN">>
<h1>You have been defeated in battle</h1>
<<set $return to passage()>>
Restart the game.
<<else if $language === "PT-BR">>
<h1>Você foi derrotado em combate</h1>
<<set $return to passage()>>
Reinicie o jogo.
<</if>>
</div><style>
div {
display: grid;
place-items: center;
}
</style>
<<if $character[1].experience >= $xpToLevelUp && passage() !== "level up passage">> <<if $language is "EN">><i>You have enough experience to level up, go to your Character's Page</i><<elseif $language is "PT-BR">><i>Você tem expêriencia suficiente para subir de nível, vá para a Página de seu Personagem.</i><</if>><</if>>
<div align='center'>
<<if $arena is true>>
<img src="img\others\ArenaBar.png">
<<else>>
<<if $character[1].Ancestry is "Human">>
<img src="img\others\Humanbar.png">
<<elseif $character[1].Ancestry is "Dwarf">>
<img src="img\others\Dwarfbar.png">
<<elseif $character[1].Ancestry is "Draconian">>
<img src="img\others\Draconianbar.png">
<<elseif $character[1].Ancestry is "Elf">>
<img src="img\others\Elfbar.png">
<<elseif $character[1].Ancestry is "Herald">>
<img src="img\others\Heraldbar.png">
<<elseif $character[1].Ancestry is "Vanadi">>
<img src="img\others\Vanadibar.png">
<<else>>
<img src="img\others\bar.png">
<</if>>
<</if>>
</div>
<style>
div {
display: grid;
place-items: center;
}
</style>
<div align='center'>
<<if $arena is true>>
<img src="img\others\ArenaBar.png">
<<else>>
<<if $character[1].Ancestry is "Human">>
<img src="img\others\Humanbar.png">
<<elseif $character[1].Ancestry is "Dwarf">>
<img src="img\others\Dwarfbar.png">
<<elseif $character[1].Ancestry is "Draconian">>
<img src="img\others\Draconianbar.png">
<<elseif $character[1].Ancestry is "Elf">>
<img src="img\others\Elfbar.png">
<<elseif $character[1].Ancestry is "Herald">>
<img src="img\others\Heraldbar.png">
<<elseif $character[1].Ancestry is "Vanadi">>
<img src="img\others\Vanadibar.png">
<<else>>
<img src="img\others\bar.png">
<</if>>
<</if>>
</div>
Fala chapa, se você tá lendo isso, 1. você entende português ou foi no google translate e 2. você acessou os arquivos desse jogo no twine. Não posso te impedir, então tenha um bom dia, tarde ou noite;
]tipos de quest
Caça: Lute contra um cara e fim de missão.
Trabalho: Repetivel, da pouco dinheiro mas n tem dificuldade.
Missão: Você tem que chegar no local, conversar com locais para entender a parada então resolver o troço
Aventurar: pega os tres acima e se vira fazendo algo repetitivo que não pareça
capitulo 1
zé ninguem catando trampo ruim
capitulo 2
inicia primeira aventura, onde uma mina jurada da escama te chama para consertar a merda que deu no trampo dela, vc ou fica miguxo dela ou de uma revolucionaria humana, no fim voce falha em consertar a merda
capitulo 3
dragões viajam ao leste, convocados pelos deuses para enfrentar alguma merda que deu la
Draconianos estao entrando em desespero, se voce se aliou a draconata voce vai ajudar a botar ordem, se voce se aliou a revolucionaria voce vai aproveitar para libertar mais escravos
inicio a aventuras secundarias além da aventura principal
capitulo 4+
ainda pensando
You observe the two men, a glimmer of fear in your eyes, but determination shines through. With a shaky yet sincere voice, you attempt to appeal to their humanity, "Gentlemen, please, I mean you no harm. I'm just a weary traveler, trying to survive in these harsh lands. I have a little gold, not much, but it's yours if you let me go unharmed. We all have families to look out for, right?"
<<test Speech 8>>
<<onSuccess>>
The older bandit scratches his head, exchanging a hesitant glance with his friend. After a moment of deliberation, he grunts, "Fine, just pay us a toil and scram. But remember, next time we meet, it won't be this easy."
[[Hand them your gold and git.|Was that it?][$character[1].Gold -= 5, $event.chapter1.initBandits = "DiplomacyResolution"]]
<<link "On second hand... (punch their faces, instead)">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "Player">>
<<goto Combatpage>>
<</link>>
<<onFailure>>
The bandits eye your gold greedily, dismissing your plea. "Nice try, traveler," sneers the younger one. "We'll take that gold and whatever else you've got.".
<div align="center">
<<link "It seems that the vermin wish to fight">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "ambush">>
<<goto Combatpage>>
<</link>>
</div>
<</test>>
<<if visited("Combatpage") >= 1>>
<<set $event.chapter1.initBandits = "dead">>
<<goto "Was that it?">>
<</if>>You straighten your posture, your eyes hardening as you stare at them. "You've picked the wrong person to mess with," you growl, your tone low and menacing. "I suggest you turn around and forget you ever saw me. I'm not someone you want to cross." Your hand subtly moves toward a hidden weapon, making your point clear.
<<test Intimidation 8>>
<<onSuccess>>
Your confident demeanor and icy tone give them pause. The older bandit gulps nervously and stammers, "Alright, we ain't looking for trouble. Let's go, mate." They retreat into the woods, leaving you unharmed and victorious.
[[And just like that, they leave|Was that it?][$event.chapter1.initBandits ="IntimidationResolution"]]
<<link "Wait, who said them that they could leave?">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "Player">>
<<goto Combatpage>>
<</link>>
<<onFailure>>
Despite your attempts at intimidation, the bandits exchange amused glances. The older one smirks, "Nice try, little tough guy. Let's see how tough you really are
<<link "Time to get rid of the vermin">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "ambush">>
<<goto Combatpage>>
<</link>>
<</test>>
<<if visited("Combatpage") >= 1>>
<<set $event.chapter1.initBandits = "dead">>
<<goto "Was that it?">>
<</if>><<if visited("Combatpage") > 1>>
<<set $event.chapter1.initBandits = "dead">>
<<goto "Was that it?">>
<<else>>
With a sneer, you unleash a torrent of insults, questioning their intelligence and parentage. The men's faces contort with rage, and before you can react, a swift punch lands on your jaw. Pain shoots through your face, but you bear it, your defiance unwavering, knowing you provoked this reaction.
<b>??? (2)</b> You are going to regret this, ye little fucker!
<i>You lost 5 points of Lifeblood.</i>
<<link "Shouldn't have done that.">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "ambush">>
<<goto Combatpage>>
<</link>>
<<set $character[1].currentLife -= 5>>
<</if>>You widen your eyes and take on a tone of exaggerated familiarity, "Wait a minute... aren't you two... from Galden's Gang? It's me, Renny! You remember, right? We shared a drink at the Red Dragon Inn just last summer!" Their eyes narrow, clearly unsure. "Come on, guys, it's me, your old friend! I've been through some rough times, lost a bit of weight, you know how it is."
<<test Speech 6>>
<<onSuccess>>
Doubt creeps into their eyes as they glance at each other, unsure. "Renny, huh? You do look a bit familiar... Fine, old friend, we'll let you go this time," says the younger bandit, a tad relunted. With a mixture of relief and guilt, you accept their aid and continue your journey.
[[And off you go.|Was that it?][$event.chapter1.initBandits = "DeceiveResolution"]]
<<link "Wait, you are not done yet.">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "Player">>
<<goto Combatpage>>
<</link>>
<<onFailure>>
The bandits exchange suspicious looks, clearly unconvinced. The older one folds his arms, chuckling, "Nice try, but we're not stupid."
<<link "Better luck next time.">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "ambush">>
<<goto Combatpage>>
<</link>>
<</test>>
<<if visited("Combatpage") > 1>>
<<set $event.chapter1.initBandits = "dead">>
<goto "Was that it?">>
<</if>>You waste not your time or your words. All you do is take your weapons in your arms.
And they readily answer the call for battle, happily so.
<b>Bald fella:</b> Ye going to regret this.
<hr>
<div align="center">
<<link "Time to get rid of the vermin">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set $whosturn to "Player">>
<<goto Combatpage>>
<</link>>
</div>
<<if visited("Combatpage") > 1>>
<<set $event.chapter1.initBandits = "dead">>
<<goto "Was that it?">>
<</if>><div align='center'>
<<if $language === "EN">>
Sadly, this is all i have for now, please come back in a future update.
Please, i beg of you, leave a comment, tell me if you found a bug, tell me if the writting somewhere is weird or have a error. Please.
Or don't, i cannot control your actions.
<<elseif $language === "PT-BR">>
Infelizmente, é tudo que tenho por agora, por favor volte em uma futura atualização.
Por tudo que é mais sagrado, deixe um comentário, diga-me se encontrou um bug. Diga-me se a escrita de uma página está estranha ou tem um erro. Por favor.
Ou não, eu não controlo suas ações.
<</if>>
</div>
<a href='https://ko-fi.com/H2H3SAWYH' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi5.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a><<if $event.chapter1.initBandits === "dead">>
<<unset $npc.bandit1>> <<unset $npc.bandit2>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 6)>>
And that was that.
Two lowly crooks are now lying dead upon the irregular, full-of-shit road.
Perhaps you should've spared a prayer for their souls, asking for mercy or further torment. Maybe you could've looted their bodies for more than the few coins you found in that sack, but you are still too tired, even more so after that action. Instead, you press on, walking down the road.
<<else>>
And with that, you are free to do what you should arelady be doing: walking.
<</if>>
For no more than half an hour, you can finally spot, while straining your eyes, a pillar of ashy smoke disrupting the monotonous gray and clouded sky, at last, a banner of civilization.
Perhaps you could reach the remote village post sundown if you continue walking.
[[I should rest, firstt|Rest]]
[[I can rest when I'm there]]
<<set $event.chapter1.bannedfromTavern1 to false>><<run UIBar.unstow();>> <<run UIBar.show();>>
<<set $askedforBlacksmithWork = false>>
<nobr>
<div align="center">
<<fadein 200ms 2s>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'hours', 1)>>
You walk,
<<fadein 200ms 4s>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'hours', 1)>>
<div style="margin-left: 20px;">and walk,</div>
<<fadein 200ms 6s>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'hours', 1)>>
<div style="margin-left: 60px;"> and walk,</div>
<<fadein 200ms 8s>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'hours', 1)>>
<div style="margin-left: 120px;"> and walk,</div>
<<fadein 200ms 10s>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'hours', 1)>>
<div style="margin-left: 160px;"> and walk a little bit more,</div>
<<fadein 200ms 12s>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'hours', 1)>>
<div style="margin-left: 200px;"> And at last,
<<fadein 200ms 14s>>you are there.
[[Finally...|Village Center]]<</fadein>>
</div>
<</fadein>>
<</fadein>>
<</fadein>>
<</fadein>>
<</fadein>>
<</fadein>>
</div>
</nobr>
<<run UIBar.stow();>><<run UIBar.hide();>>
<<set $character[1].currentLife += Math.round(($character[1].MAXLIFE / 2))>>
<<set $character[1].currentMana += Math.round(($character[1].MAXMANA / 2))>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'hours', 6)>>
<div align='left'><<set $randomLoreBit = $loreBits[$language][random(0, $loreBits[$language].length - 1)]>>
<i> <<print $randomLoreBit>></i>
</div>
<div align='right'>
<<fadein 200ms 8s>>
6 hours have passed.
You are rested.
<<fadein 200ms 10s>>
[[Continue|I can rest when I'm there]]
<</fadein>>
<</fadein>>
</div><<if $newEvent === true && $event.chapter1.banditraid !== "stopped">>
<<if $event.chapter1.bandits > 0>>
<<silently>>
<<set _roll1 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll1 > 4>><<set _roll1 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll1>>
<<set _roll2 to 0>>
<<set _roll3 to 0>>
<<if $event.chapter1.bandits > 0>>
<<set _roll2 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll2 > 4>><<set _roll2 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll2>>
<</if>>
<<if $event.chapter1.bandits > 0>>
<<set _roll3 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll3 > 4>><<set _roll3 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll3>>
<</if>>
<</silently>>
<<battle "Ruffian" _roll1>><</battle>>
<<if _roll2 > 0>><<battle "HiredMuscle" _roll2>><</battle>><</if>>
<<if _roll3 > 0>><<battle "HiredSpellcaster" _roll3>><</battle>><</if>>
The village is ablaze, the villagers are trying their best to defend themselves. But everywhere you look...
<<link "There are bandits to deal with.">>
<<set $whosturn to "player">>
<<set $return to "Interlude">>
<<goto "Combatpage">>
<</link>>
<<else>>
<<set $event.chapter1.banditraid to "raided">>
<<goto "Interlude">>
<</if>>
<<else>>
<p><<if $hour >= 14>>[[Tavern]] The tavern is open<<else>>The tavern is closed.<</if>></p>
<p><<if $hour < 17 && $hour >= 7>>[[Blacksmith]]<<else>>The forge is closed for today.<</if>></p>
[[Houses]]
<p>[[Take a walk in the forest][$now = setup.changeDate(State.variables.now, 'hours', 1)]] <<if $quest.saveHusband.Active is true && $quest.saveHusband.Status is "onGoing">>The woman's husband must have gone this way.<</if>></p>
<<link "Loiter for an hour">>
<<set $now = setup.changeDate(State.variables.now, 'hours', 1)>>
<<goto "Village Center">>
<</link>>
<<if $event.chapter1.banditproblem === "in progress">>
[[To the woods]]
<<elseif $event.chapter1.banditLeaderOffer.active is true>>
[[To the meeting point|End of update]]
<</if>>
<</if>><<run UIBar.unstow();>> <<run UIBar.show();>>
<<if $newEvent === true && $event.chapter1.banditraid !== "stopped">>
<<if $npc.oldMan.alive is true>>
<<set $event.chapter1.bandits -=3>>
<<if $event.chapter1.bandits > 0>>
<<silently>>
<<set _roll1 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll1 > 4>><<set _roll1 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll1>>
<<set _roll2 to 0>>
<<set _roll3 to 0>>
<<if $event.chapter1.bandits > 0>>
<<set _roll2 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll2 > 3>><<set _roll2 = 3>><</if>>
<<set $event.chapter1.bandits -= _roll2>>
<</if>>
<<if $event.chapter1.bandits > 0>>
<<set _roll3 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll3 > 2>><<set _roll3 = 2>><</if>>
<<set $event.chapter1.bandits -= _roll3>>
<</if>>
<</silently>>
Entering the place, you are met with the visage of an old man cornered with <<print _roll1 + _roll2 + _roll3 + 3>> Bandits.
<p><b><<print $npc.oldMan.Name>>:</b> Finally, some help!</p>
Some of the raiders turn around to see who the newcomer is, but without missing the opportunity, the old blacksmith uses his hammer to smash the head of one of them and moves to your side.
<p><b><<print $npc.oldMan.Name>>:</b> I'll deal with those on the right. As for you, deal with the left!</p>
<<link "Got it.">>
<<set $whosturn to "player">>
<<set $return to "Interlude">>
<<goto "Combatpage">>
<</link>>
<<else>>
<p><b><<print $npc.oldMan.Name>>:</b> Now that you show up? Get the hell out of my sight. <<set $npc.oldMan.Respect -=10>></p>
<<link "Looks like you aren't needed here.">>
<<goto "Interlude">>
<<set $event.chapter1.banditraid to "raided">>
<</link>>
<</if>>
<<else>>
You have come too late. The old man's body lies lifeless on the ground. The bandits have ransacked everything of value here.
[[Dammit|Interlude]]
<</if>>
<<else>>
<<if $hour <= 16 && $npc.oldMan.hasmet is false>>
<span id="grumpy">
<b>$npc.oldMan.Name:</b> I'm busy, don't even bother.
</span>
<<elseif $hour <= 16 && $npc.oldMan.hasmet is true>>
<span id="grumpy">
<b>$npc.oldMan.Name:</b> It's you...
</span>
<<elseif $hour >= 17>>
<span id="grumpy">
<b>$npc.oldMan.Name:</b> I'm going to close, so git.
</span>
<</if>>
<<if $askedforBlacksmithWork === false>>
<<link "Ask for work (Test: Speech)">>
<<test Speech 6>>
<<onSuccess>>
<<replace "#grumpy">>
<b>$npc.oldMan.Name:</b> Urgh... fine. But come back later.
<</replace>>
<<set $askedforBlacksmithWork = true>>
<<onFailure>>
<<replace "#grumpy">>
<b>$npc.oldMan.Name:</b> No.
<</replace>>
<</test>>
<</link>>
<<elseif $askedforBlacksmithWork === true && $hour <17>>
<<link "Work as Blacksmith">>
<<goto "BlacksmithWork">>
<</link>>
<</if>>
<<link "Show me your wares">>
<<dialog>>
<p>Buy a <<link "Short sword">>
<<if $character[1].Gold >= $Items["Short sword"].Price>>
<<replace "#item1">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items["Short sword"].Price>>
<<addItem "Short sword">><</addItem>>
<<else>>
<<replace "#item1">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items["Short sword"].Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items["Short sword"].Price * (_discount / 100))>>
<<set _offer to 0>>
<<replace "#haggle1">>
<p><<numberbox "_offer" 40 autofocus>>
<<button "Offer.">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle1">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Short sword">><</addItem>>
<<else>>
<<replace "#haggle1">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if i would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>></p>
<</replace>>
<</link>>
<</if>> <span id="haggle1"></span> <span id="item1"></span></p>
<p>Buy a <<link "Sword">>
<<if $character[1].Gold >= $Items['Long sword'].Price>>
<<replace "#item7">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Sword.Price>>
<<addItem "Long sword">><</addItem>>
<<else>>
<<replace "#item7">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items['Long sword'].Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items['Long sword'].Price * (_discount / 100))>>
<<set _offer to 0>>
<<replace "#haggle7">>
<p><<numberbox "_offer" 80 autofocus>>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle7">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Long sword">><</addItem>>
<<else>>
<<replace "#haggle7">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>></p>
<</replace>>
<</link>>
<</if>> <span id="haggle7"></span> <span id="item7"></span></p>
<p>Buy an <<link "Axe">>
<<if $character[1].Gold >= $Items.Axe.Price>>
<<replace "#item8">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Axe.Price>>
<<addItem "Axe">><</addItem>>
<<else>>
<<replace "#item8">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Axe.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Axe.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle8">>
<p><<numberbox "_offer" 60 autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle8">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Axe">><</addItem>>
<<else>>
<<replace "#haggle8">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle8"></span> <span id="item8"></span></p>
<p>Buy a <<link "Dagger">>
<<if $character[1].Gold >= $Items.Dagger.Price>>
<<replace "#item9">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Dagger.Price>>
<<addItem "Dagger">><</addItem>>
<<else>>
<<replace "#item9">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Dagger.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Dagger.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle9">>
<p><<numberbox "_offer" 25 autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle9">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Dagger">><</addItem>>
<<else>>
<<replace "#haggle9">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle9"></span> <span id="item9"></span></p>
<p>Buy a <<link "Spear">>
<<if $character[1].Gold >= $Items.Spear.Price>>
<<replace "#item10">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Spear.Price>>
<<addItem "Spear">><</addItem>>
<<else>>
<<replace "#item10">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Spear.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Spear.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle10">>
<p><<numberbox "_offer" 40 autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle10">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Spear">><</addItem>>
<<else>>
<<replace "#haggle10">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle10"></span> <span id="item10"></span></p>
<p>Buy a <<link "Circlet">>
<<if $character[1].Gold >= $Items.Circlet.Price>>
<<replace "#item4">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Circlet.Price>>
<<addItem "Circlet">><</addItem>>
<<else>>
<<replace "#item4">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Circlet.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Circlet.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle4">>
<p><<numberbox "_offer" _hagglePrice autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle4">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Circlet">><</addItem>>
<<else>>
<<replace "#haggle4">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle4"></span> <span id="item4"></span></p>
<p>Buy a <<link "Cuirass">>
<<if $character[1].Gold >= $Items.Cuirass.Price>>
<<replace "#item5">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Cuirass.Price>>
<<addItem "Cuirass">><</addItem>>
<<else>>
<<replace "#item5">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Cuirass.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Cuirass.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle5">>
<p><<numberbox "_offer" 87 autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle5">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Cuirass">><</addItem>>
<<else>>
<<replace "#haggle5">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle5"></span> <span id="item5"></span></p>
<p>Buy a <<link "Breastplate">>
<<if $character[1].Gold >= $Items.Breastplate.Price>>
<<replace "#item6">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Breastplate.Price>>
<<addItem "Breastplate">><</addItem>>
<<else>>
<<replace "#item6">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Breastplate.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Breastplate.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle6">>
<p><<numberbox "_offer" 100 autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle6">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Breastplate">><</addItem>>
<<else>>
<<replace "#haggle6">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle6"></span> <span id="item6"></span></p>
<p>Buy a <<link "Lamp">>
<<if $character[1].Gold >= $Items.Lamp.Price>>
<<replace "#item2">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Lamp.Price>>
<<addItem "Lamp">><</addItem>>
<<else>>
<<replace "#item2">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Lamp.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Lamp.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle2">>
<p><<numberbox "_offer" 20 autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle2">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Lamp">><</addItem>>
<<else>>
<<replace "#haggle2">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle2"></span> <span id="item2"></span></p>
<p>Buy a <<link "Lockpick">>
<<if $character[1].Gold >= $Items.Lockpick.Price>>
<<replace "#item3">><<fadeout 200ms 3s>>Bought!<<fadeout>><</replace>>
<<set $character[1].Gold -= $Items.Lockpick.Price>>
<<addItem "Lockpick">><</addItem>>
<<else>>
<<replace "#item3">><<fadeout 200ms 3s>>
<b><<print $npc.oldMan.Name>></b>: Do you think this is a charity? Come back when you have the money!
<</fadeout>><</replace>>
<</if>>
<</link>> for <<print $Items.Lockpick.Price>> Gold Pieces. <<if $npc.oldMan.Respect > 25>> <<link "Haggle">>
<<set _discount = 0>>
<<if $npc.oldMan.Respect > 100>> <<set _discount to 60>>
<<elseif $npc.oldMan.Respect > 70 && $npc.oldMan.Respect < 100>> <<set _discount to 70>>
<<elseif $npc.oldMan.Respect > 40 && $npc.oldMan.Respect < 71>><<set _discount to 80>>
<<elseif $npc.oldMan.Respect >= 25 && $npc.oldMan.Respect < 41>><<set _discount to 90>>
<</if>>
<<set _hagglePrice = Math.floor($Items.Lockpick.Price * (_discount / 100))>>
<<set _offer to _hagglePrice>>
<<replace "#haggle3">>
<p><<numberbox "_offer" 7 autofocus>><</numberbox>></p>
<<button "Offer">>
<<if _offer >= _hagglePrice>>
<<replace "#haggle3">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: Fine, I can sell it to you for <<print _hagglePrice>> pieces.<</fadeout>><</replace>>
<<set $character[1].Gold -= _offer>>
<<addItem "Lockpick">><</addItem>>
<<else>>
<<replace "#haggle3">>
<<fadeout 200ms 3s>> <b><<print $npc.oldMan.Name>></b>: As if I would sell for that low.<</fadeout>><</replace>>
<</if>>
<</button>>
<</replace>>
<</link>>
<</if>> <span id="haggle3"></span> <span id="item3"></span></p>
<<link "Thank you.">><<closedialog>><</link>>
<</dialog>>
<</link>>
[[Houses]]
<p><<if $hour >= 14>>[[Tavern]] The tavern is open<<else>>The tavern is closed.<</if>></p>
[[Village Center]]
<</if>><<if $newEvent === true && $event.chapter1.banditraid !== "stopped">>
<<if $event.chapter1.bandits > 0>>
<<silently>>
<<set _roll1 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll1 > 4>><<set _roll1 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll1>>
<<set _roll2 to 0>>
<<set _roll3 to 0>>
<<if $event.chapter1.bandits > 0>>
<<set _roll2 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll2 > 4>><<set _roll2 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll2>>
<</if>>
<<if $event.chapter1.bandits > 0>>
<<set _roll3 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll3 > 4>><<set _roll3 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll3>>
<</if>>
<</silently>>
<<battle "Ruffian" _roll1>><</battle>>
<<if _roll2 > 0>><<battle "HiredMuscle" _roll2>><</battle>><</if>>
<<if _roll3 > 0>><<battle "HiredSpellcaster" _roll3>><</battle>><</if>>
<<<if $npc.john.alive is true>> <<if $event.chapter1.bandits > 3>> <<set $event.chapter1.bandits -=3>><<set _value to 3>> <<elseif $event.chapter1.bandits < 3>> <<set _value to $event.chapter1.bandits>><<set $event.chapter1.bandits to 0>><</if>>
<b><<print $npc.John.Name>></b>: Ah! Good timing, my friend! Could you lend me another hand?
He says that, but even barehanded he is proving to be a difficult to deal with. even against <<print _value>>.
<</if>>
<</if>>
<<link "There are bandits to deal with.">>
<<set $return to "Interlude">>
<<goto "Combatpage">>
<<set $whosturn to "player">>
<</link>>
<<else>>
<<set $event.chapter1.banditraid to "raided">>
[[Elder's Home]]
<</if>>
<<else>>
Simple houses with very shut windows and doors, with no sign of a kind soul to allow a vagrant like yourself to have some a meal and rest.
<<if $quest.saveHusband.Active !== true>>
[[You see a woman with a worried expression.]]
<<elseif $quest.saveHusband.Status === "complete">> [[Report your findings to the woman]]
<</if>>
<p><<if $hour >= 19>>[[Find an alleyway to sleep at.]]<</if>></p>
<p><<if $hour >= 14>>[[Tavern]] The tavern is open<<else>>The tavern is closed.
<</if>></p>
<p><<if $hour < 17 && $hour >= 7>>[[Blacksmith]]<<else>>The forge is closed for today.<</if>></p>
[[Village Center]]
<</if>><<run UIBar.unstow();>> <<run UIBar.show();>>
<<set $npc.Owner.hasmet to true>>
<<if visited("Tavern") < 2>>
<<if $character[1].Ancestry === "Dwarf">>
<i>As you enter the establishment, you are met with disgruntled eyes and coldness in the air. The man on the balcony is the only one who says out loud what everyone is thinking.</i>
<b><<print $npc.Owner.Name>>:</b> We be danmed, it's a shorty...
<<elseif $character[1].Ancestry === "Draconian">>
<i> As you enter the establishment, you are welcomed with worried gazes and cold sweat. Clearly, your kind isn't a good sign to these folks.</i>
<b><<print $npc.Owner.Name>>:</b> Shit, we are not in trouble. Are we?
<<elseif $character[1].Ancestry === "Herald">>
<i>As you enter the establishment, some of the customers leave the precinct, others let out an exasperated sigh.</i>
<b><<print $npc.Owner.Name>>:</b> Look, as long you don't wish to go "kaboom" in our town, you can stay; otherwise, I suggest you find another place to go.
<<elseif $character[1].Ancestry === "Vanadi">>
<i>As you enter the establishment, you can feel the stares of the townsfolk as they wonder: "What the hell are you doing here?" Well... not everyone can have a narrator to tell them your whole backstory.</i>
<b><<print $npc.Owner.Name>>:</b> A furry in these parts? - Huh - Well, you are lucky we are not fans of the golden arsehole... what can I do for you?
<<else>>
<i>As you enter the establishment, you are met with... well, no one that would be bothered by your presence... it seems you will fit well here.</i>
<b><<print $npc.Owner.Name>>:</b> What can i do for you?
<</if>>
<<else>>
<b><<print $npc.Owner.Name>>:</b> Ah, it's you again.
<</if>>
<<if $event.chapter1.bannedfromTavern1 is false>>
<<link "Chat">>
<<replace "#chattext1">>
Mood: <<cycle "$Mood" autoselect>>.
<<option "Rude">>
<<option "Friendly">>
<<option "Flirty">>
<</cycle>>
<hr>
Ask:
<<linkreplace "Where are we?">>
<<if $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> So, where are we?<br>
<b><<print $npc.Owner.Name>>:</b> Did you seriosly walked around knowing not where you are headed? <br>
<p><b><<print $npc.Owner.Name>>:</b> Anyway, we are at Convac region, west to the montain ranges. After that, lies the wild lands. <<if $character[1].Ancestry === "Draconian">> We are pretty far from the rest of your kind<<elseif $character[1].Ancestry === "Human" || $character[1].Ancestry === "Dwarf">> Don't worry, we are pretty far from the lizard brains<</if>>.</p>
<b><<print $character[1].Name>>:</b> Thanks.<br>
<<elseif $Modd is "Rude">>
<b><<print $character[1].Name>>:</b> So, what end of the world are we?<br>
<b><<print $npc.Owner.Name>>:</b> The one that only idiots like yourself end up <br>
<b><<print $character[1].Name>>:</b> Are you calling yourself an idiot, then?
<p><b><<print $npc.Owner.Name>>:</b> Anyway, we are at Convac region, west to the montain ranges. After that, lies the wild lands. <<if $character[1].Ancestry === "Draconian">> We are pretty far from the rest of your kind<<elseif $character[1].Ancestry === "Human" || $character[1].Ancestry === "Dwarf">> Don't worry, we are pretty far from the lizard brains<</if>>.</p>
<b><<print $character[1].Name>>:</b> I see.<br>
<<else>>
<b><<print $character[1].Name>>:</b> Mind telling me about this lovely place?<br>
<b><<print $npc.Owner.Name>>:</b> Lovely? Are you blind?</br>
<p><b><<print $npc.Owner.Name>>:</b> Anyway, we are at Convac region, west to the montain ranges. After that, lies the wild lands. <<if $character[1].Ancestry === "Draconian">> We are pretty far from the rest of your kind<<elseif $character[1].Ancestry === "Human" || $character[1].Ancestry === "Dwarf">> Don't worry, we are pretty far from the lizard brains<</if>>.</p>
<b><<print $character[1].Name>>:</b> Thanks sweety.<br>
<</if>>
<</linkreplace>>
<span id="answer1"> <<link "What's the village name?">>
<<replace "#answer1">>
<<if $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> Greetings, could you tell me what this place's name is? <br>
<b><<print $npc.Owner.Name>>:</b> I could've... if we had one.
<span id ="answer1A"> <<link "What do you mean by that?">>
<<replace "#answer1A">>
<<if $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> Hold on, what do you mean by that?
<br>
<b><<print $npc.Owner.Name>>:</b> I'm telling you, we don't have one...every time we tried to give ourselves a name, there would be a fire or some plague, so we just gave up on the idea.
<<elseif $Mood is "Rude">>
<b><<print $character[1].Name>>:</b> Hold the fuck up, what the hell do you mean with that shit?
<br>
<b><<print $npc.Owner.Name>>:</b> I'm telling you, we don't have one...every time we tried to give ourselves a name, there would be a fire or some plague, so we just gave up on the idea.
<<elseif $Mood is "Flirty">>
<b><<print $character[1].Name>>:</b> Oooh... mysterious, me likey!.<br>
<b><<print $npc.Owner.Name>>:</b> ... Get a hold of yourself <<if $gender.noun is "man">> man <<elseif $gender.noun is "woman">> woman <<else>> person<</if>>, we don't have a name, every time we tried to decide one, there would be a plague or fire to worry our asses first.
<</if>>
<</replace>>
<</link>></span>
<<elseif $Mood is "Rude">>
<b><<print $character[1].Name>>:</b> What's the name of this shithole? <br>
<b><<print $npc.Owner.Name>>:</b> It's called "Fuck off Arsehole Village" be welcomed.
<span id ="answer1A"> <<link "What do you mean by that?">>
<<replace "#answer1A">>
<<if $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> Sorry, but seriously, what is the name of this village?
<br>
<b><<print $npc.Owner.Name>>:</b> Eh. We don't have one...every fucking time we tried to give ourselves a name, there would be a fire or some plague, so we just gave up on the idea.
<<elseif $Mood is "Rude">>
<b><<print $character[1].Name>>:</b> Hold the fuck up, what the hell do you mean with that shit?
<br>
<b><<print $npc.Owner.Name>>:</b> We don't have one, fuckface...every time we tried to give ourselves a name, there would be a fucking fire or some plague, or even a dumbass like you would appear, so we just gave up on the idea.
<<elseif $Mood is "Flirty">>
<b><<print $character[1].Name>>:</b> Come on, you can be honest with me, it is 'Dicktown' is it not?<br>
<b><<print $npc.Owner.Name>>:</b> ... Get a hold of yourself ?man, we don't have a name, every time we tried to decide one, there would be a plague or fire.
<</if>>
<</replace>>
<</link>></span>
<<elseif $Mood is "Flirty">>
<b><<print $character[1].Name>>:</b> Say handsome, what's the name of the vicinity - let me guess: "Handsome Man Village"? <br>
<b><<print $npc.Owner.Name>>:</b> Sorry, but I'm not into the ugly ones like yourself... As for the village name, well,.. Dicktown would be a better name than what we have...
<span id ="answer1A"> <<link "What do you mean by that?">>
<<replace "#answer1A">>
<<if $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> Hold on, what do you mean by that?
<br>
<b><<print $npc.Owner.Name>>:</b> I'm telling you, we don't have one...every time we tried to give ourselves a name, there would be a fire or some plague, so we just gave up on the idea.
<<elseif $Mood is "Rude">>
<b><<print $character[1].Name>>:</b> Hold the fuck up, what the hell do you mean with that shit?
<br>
<b><<print $npc.Owner.Name>>:</b> I'm telling you, we don't have one...every time we tried to give ourselves a name, there would be a fire or some plague, so we just gave up on the idea.
<<elseif $Mood is "Flirty">>
<b><<print $character[1].Name>>:</b> Tell me, is it Dicktown? - I would also not tell if it was 'Dicktown'...<br>
<b><<print $npc.Owner.Name>>:</b> ... Get a hold of yourself <<if $gender.noun is "man">> man <<elseif $gender.noun is "woman">> woman <<else>> person<</if>>, we don't have a name, every time we tried to decide one, there would be a plague or fire.
<</if>>
<</replace>>
<</link>></span>
<span id ="answer1B"> <<link "Your loss, then.">>
<<replace "#answer1B">>
<<if $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> Fair enough, what other activities can one <<if $gender.noun is "man">> man <<elseif $gender.noun is "woman">> woman <<else>> person <</if>> do to have some fun?
<<elseif $Mood is "Rude">>
<b><<print $character[1].Name>>:</b> Fuck you, I did not even want to flirt with you; just look at yourself, disgusting! - Hope you get stabbed, arsehole.
<br>
<b><<print $npc.Owner.Name>>:</b> Oh yeah?! Then you can get the hell away from here, idiot!
<b><<print $npc.Owner.Name>>:</b> By the way, consider yourself banned from here! <<set $event.chapter1.bannedfromTavern1 to true>><<set $npc.Owner.respect -= 30>>
<<elseif $Mood is "Flirty">>
<b><<print $character[1].Name>>:</b> Aw, but it's fun messing with you...<br>
<b><<print $npc.Owner.Name>>:</b> Yeah, but I am asking you to stop, okay? Can you do that?
<</if>>
<</replace>>
<</link>></span>
<</if>>
<</replace>>
<</link>>
<span id=question2><<link "What is your name?">>
<<replace "#question2">>
<<if $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> Hey friend, mind if I ask you your name?
<br>
<b><<print $npc.Owner.Name>>:</b> Not at all, the name is Ulffer. And yours? <<set $npc.Owner.Name to "Ulffer">>
<br>
<b><<print $character[1].Name>>:</b> Mine is <<print $character[1].Name>>.
<<elseif $Mood is "Rude">>
<b><<print $character[1].Name>>:</b> Ugly mug! Do you have a name?
<br>
<b><<print $npc.Owner.Name>>:</b> Sure, it's "Fuck off" <<set $npc.Owner.Name to "Fuck off (Not actually his name)">>
<<else>>
<b><<print $character[1].Name>>:</b> Hey Daddy, what's your name.
<br>
<b><<print $npc.Owner.Name>>:</b> Never again call me daddy. Did you hear me?<<set $npc.Owner.Name to "Daddy">><<set $npc.Owner.respect -= 10>>
<</if>>
<</replace>>
<</link>>
</span>
<</replace>>
<<if $event.chapter1.banditproblem == "dealt">>
<span id="report">
<<link "It is done">>
<<replace "#report">>
<b><<print $npc.Owner.Name>>:</b> Already done? That fast? Well, thank you... Honestly, I did not expect that.
<<if $event.chapter1.banditraid === "revealed">>
<span id="raidinfo">
<<link "I got some info.">>
<<replace "#raidinfo">>
<b><<print $character[1].Name>>:</b> I got news. There will be a raid soon, we need to prepare.
<b><<print $npc.Owner.Name>>:</b> Shit... you gotta tell that to the Elder, he lives at the middle of the houses.
<b><<print $npc.Owner.Name>>:</b> And... be quick!
<</replace>>
<</link>>
</span>
<</if>>
<span id="report2">
<<link "What about my payment?">>
<<replace "#report2">>
<b><<print $npc.Owner.Name>>:</b> Payment? I never said anything about a 'payment'!
Despite you wanting to punch him right now, you can't. He is right, you two never spoke about payments, but at least you learned to discuss these matters <b>before</b> accepting a work. Living is learning.
Sensing your frustration, the tavern owner continues.
<b><<print $npc.Owner.Name>>:</b> But, since you've done the heavy work for us, how about some free nights and drinks? It's all I can give you, okay?
It's best to accept, it's not like you have a better place to go, unless you want to sleep outside.
<</replace>>
<</link>>
</span>
<</replace>>
<</link>>
</span>
<<elseif $event.chapter1.banditproblem === "unresolved">>
<span id="report">
<<link "Some escaped">>
<<replace "#report">>
<b><<print $npc.Owner.Name>>:</b> Escaped? $Man, are you sure you want to continue at this job? You seem to suck at it.
Sadly, it's not like you have the choice of whether to be or not a mercenary.
<<span id="report1">>
<<link "Hey, at least I was honest.">>
<<replace "#report1">>
<b><<print $npc.Owner.Name>>:</b> Hah! True. But honesty does not get you free drinks.
<</replace>>
<</link>>
<<link "Whatever.">>
<<replace "#report1">>
<b><<print $npc.Owner.Name>>:</b> Well, you ain't getting free drinks with that attitude.
<</replace>>
<</link>>
<<link "Oh, fuck you.">>
<<replace "#report1">>
<b><<print $npc.Owner.Name>>:</b> Not before yourself.
<</replace>>
<</link>>
</span>
<</replace>>
<</link>>
<<link "[Lie] All done.">>
<<set $alignment.evilChaos += 1>>
<<replace "#report">>
<b><<print $npc.Owner.Name>>:</b> All done?
<b><<print $character[1].Name>>:</b> All done!
<<fadein 200ms 2s>>...
<<fadein 200ms 4s>>
<<test Speech 15>>
<<onSuccess>>
<b><<print $npc.Owner.Name>>:</b> All right, then. As your reward, how about some free nights? And some free drinks on the house as well. <<set $npc.Owner.respect += 5>>
<<onFailure>>
<b><<print $npc.Owner.Name>>:</b> They have escaped, haven't they? Argh. <<set $npc.Owner.respect -= 5>>
Shit, he saw through our ruse!
<</test>>
<</fadein>><</fadein>>
<</replace>>
<</link>>
</span>
<<elseif $event.chapter1.banditproblem !== "">>
<<link "Nothing yet.">>
<<replace "#report">>
<b><<print $npc.Owner.Name>>:</b> Nothing yet? C'mon, chop chop! The sooner you deal with them, the sooner you can rest.
<</replace>>
<</link>>
<</if>>
<i>You gained 60 Experience from concluding this quest</i><<set $character[1].experience += 60>>
<<else>>
<b><<print $npc.Owner.Name>>:</b> You're here again? I already told you that you're not welcome here!
<<link "Report">>
<<replace "chattext1">>
<<if $event.chapter1.banditproblem == "dealt">>
<span id="report">
<<link "It is done">>
<<replace "#report">>
<b><<print $npc.Owner.Name>>:</b> Well.. congratulations, i guess..<<set $npc.Owner.respect +=5>>
<<if $event.chapter1.banditraid === "revealed">>
<span id="raidinfo">
<<link "I got some info.">><<set $npc.Owner.respect +=15>>
<<replace "#raidinfo">>
<b><<print $character[1].Name>>:</b> There will be a raid happening here soon, we need to prepare.
<b><<print $npc.Owner.Name>>:</b> Shit... you gotta tell that to the Elder, he lives in the middle of the houses.
<b><<print $npc.Owner.Name>>:</b> I don't think I need to tell you to get you arse out, do I?
<</replace>>
<</link>>
</span>
<</if>>
<span id="report2">
<<link "What about my payment?">>
<<replace "#report2">>
<b><<print $npc.Owner.Name>>:</b> Payment? I never said anything about 'payment'! Nor would i pay you up.
Despite you wanting to punch him right now, you can't. He is right, you two never spoke about payments, but at least you learned to discuss these matters <b>before</b> accepting a job. Living is learning.
Sensing your frustration, the tavern owner continues.
<b><<print $npc.Owner.Name>>:</b> But, since you've done the heavy work for us, how about some free nights and drinks? It's all I can give you, okay?
It's best to accept. It's not like you have a better place to go, unless you want to sleep outside.
<</replace>>
<</link>>
</span>
<</replace>>
<</link>>
</span>
<<elseif $event.chapter1.banditproblem === "unresolved">>
<span id="report">
<<link "Some escaped">>
<<replace "#report">>
<b><<print $npc.Owner.Name>>:</b> Why do I am surrounded by idiots and useless people? <<set $npc.Owner.respect -=10>>
Don't he knows that words hurts?
<</replace>>
<</link>>
<<link "[Lie] All done.">>
<<set $alignment.evilChaos += 1>>
<<replace "#report">>
<b><<print $npc.Owner.Name>>:</b> All done?
<b><<print $character[1].Name>>:</b> All done!
<<fadein 200ms 2s>>...
<<fadein 200ms 4s>>
<<test Speech 15>>
<<onSuccess>>
<b><<print $npc.Owner.Name>>:</b> All right, then. As your reward, how about some free nights? And some free drinks on the house as well. <<set $npc.Owner.respect += 5>>
<<onFailure>>
<b><<print $npc.Owner.Name>>:</b> They have escaped, haven't they? Argh. <<set $npc.Owner.respect -= 5>>
Shit, he saw through our ruse!
<</test>>
<</fadein>><</fadein>>
<</replace>>
<</link>>
<<if $event.chapter1.banditraid === "revealed">>
<span id="raidinfo">
<<link "I got some info.">>
<<replace "#raidinfo">>
<b><<print $character[1].Name>>:</b> I got news. There will be a raid soon, we need to prepare.
<b><<print $npc.Owner.Name>>:</b> Shit... you gotta tell that to the Elder, he lives in the middle of the houses.
<b><<print $npc.Owner.Name>>:</b> And... be quick!
<</replace>>
<</link>>
</span>
<</if>>
</span>
<span id="report2">
<<link "Do you have any other jobs?">>
<<replace "#report2">>
<b><<print $npc.Owner.Name>>:</b> <<if $event.chapter1.banditraid === "revealed">>If you go to the Elder, I'm sure he will give you an epic quest that people will sing tales of. Otherwise, well, you can always try working for Volo... but if he will pay you is another story.<</if>>
<</replace>>
<</link>>
</span>
<<else>>
<b><<print $npc.Owner.Name>>:</b> Don't waste my time.
<</if>>
<</replace>>
<</link>>
<i>You gained 60 Experience from concluding this quest</i><<set $character[1].experience += 60>>
<</if>>
<span id "chattex1"></span>
<<if $jobasked is false>>
<<link "Ask for a job">>
<<set $jopasked to true>>
<<replace "#questgiver1">>
<<if $event.chapter1.bannedfromTavern1 !== true>>
<<if $event.chapter1.banditproblem === undefined>>
<b><<print $npc.Owner.Name>>: </b> You are a mercenary, huh?
<b><<print $npc.Owner.Name>>: </b> Well.., we have some bandit problems.
Not many people come to these parts, but when they do, they always tell me their story about meeting with some ruffians. They must be camping in the woods near the road. If you are looking for a more adventurous job, you could tell them their services as a welcoming committee are no longer needed.
<b><<print $npc.Owner.Name>>: </b> Whatever you find with them is yours.
<span id="acceptquest1">
<<link "Accept the quest">>
<<set $event.chapter1.banditproblem = "in progress">>
<<replace "#acceptquest1">>
Quest Accepted!
<</replace>>
<</link>>
</span>
<</if>>
<<if $askedforBlacksmithWork === false>>
<b><<print $npc.Owner.Name>>:</b> Volo may hire you to help him at his forge, but the fella isn't the most charitable... you can say that I sent you. <<set $npc.oldMan.Name to "Volo">>
<</if>>
<<else>>
<b><<print $npc.Owner.Name>>: </b> A job? How about getting stabbed by a bandit?! Can you do that? Get out of here! A freaking job... for fucks sake.
<span id="acceptquest1">
<<link "Accept the quest">>
<<set $event.chapter1.banditproblem = "in progress">>
<<replace "#acceptquest1">>
Quest... Accepted?
<</replace>>
<</link>>
</span>
<</if>>
<</replace>>
<</link>>
<</if>>
<span id="questgiver1"></span>
<<link "Ask for a room">>
<<replace "#text2">>
<<if $freenight === true>>
[[Rest until morning|TavernRest][$freenight to false, $newEvent to true, State.variables.now = setup.changeDate(State.variables.now, 'hours', (6 - State.variables.now.getHours())), State.variables.now.setMinutes(0)]]
<<else>>
<<if $event.chapter1.bannedfromTavern1>>
<b><<print $npc.Owner.Name>>: </b> Shouldn't have said those things, arsehole, now get your ass out of my tavern!
<<else>>
<<if $character[1].Gold >= 7>>
<b><<print $npc.Owner.Name>>: </b>Sure, cost just seven pieces.
[[Rest until morning|TavernRest][$character[1].Gold -= 7, State.variables.now = setup.changeDate(State.variables.now, 'hours', (6 - State.variables.now.getHours())), State.variables.now.setMinutes(0)]]
[[Rest for 6 hours|TavernRest][$character[1].Gold -= 7, State.variables.now = setup.changeDate(State.variables.now, 'hours', 6)]]
<<else>>
Sure, cost seven pieces.
You don't have enough money.
<</if>>
<</if>>
<</if>>
<</replace>>
<</link>>
<span id="text2"></span>
<<if $npc.Owner.respect < 0>><<set $event.chapter1.bannedfromTavern1 to true>><<elseif $npc.Ownerrespect > 10>> set $event.chapter1.bannedfromTavern1 to false>><</if>><<run UIBar.stow();>><<run UIBar.hide();>>
<<set $now = setup.changeDate(State.variables.now, 'hours', 1)>>
<<test Awareness 7>>
<<onSuccess>>
<<test Athletics 9>>
<<onSuccess>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)>>
<b>Old man:</b>: Hm. Acceptable. Here's your payment.
<<set $npc.oldMan.respect +=3>>
+5 gold
<<set $character[1].Gold += 5.>>
<<onFailure>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)>>
<b>Old man:</b>: This is terrbile. I'm not paying you.
<</test>>
<<onFailure>>
<b>Old man:</b>: Are you kidding me?! Get out!
<<set $npc.oldMan.respect -=2>>
<</test>>
[[Finish work here.|Blacksmith]]<<run UIBar.stow();>><<run UIBar.hide();>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<if $newEvent is true && $event.chapter1.banditraid !== false>>
<<fadein 200ms 8s>>
You hear cries and screams from outside.
<<fadein 200ms 10s>>
As muffled as they are, you can still distinguish some of the words that are being said.
"Bandits!"
<<set $event.chapter1.bandits to 14>>
[[You must go.|Village Center][set $firstplace to "Village Center"]]
<</fadein>>
<</fadein>>
<<else>>
<div align='left'><<set $randomLoreBit = $loreBits[$language][random(0, $loreBits[$language].length - 1)]>>
<<print $randomLoreBit>>
</div>
<div align='right'>
<<fadein 200ms 8s>>
You are rested.
<<fadein 200ms 10s>>
[[Continue|Tavern]]
<</fadein>>
<</fadein>>
</div>
<</if>><<set $event.chapter1.banditraid to "underway">>
<<if $hour >= 18 || $hour <= 5>>
Under the shroud of darkness, you slip through the shadows, your steps silent on the damp earth while trying to avoid stepping on dry leaves or broken twigs. The moonlight filters through the dense canopy of trees, casting eerie shapes on the forest floor. You know why you are here, but parts of you don't really accept the fact that you are hunting other people for money, even if they are criminals. But that's what we do when we are desperate, anything.
With every careful stride, you listen intently to the night sounds – the rustle of leaves, the howl of the wind, and even the distant hoot of an owl, if it's an owl. In your hand, your grip tightens around the <<if $character[1].equipment.mainhand.Type.includes("2-handed")>> handler<<else>>hilt<</if>> of your <<print $character[1].equipment.mainhand.name>>. The respiration is heavy with anticipation as you follow the remnants of a trail that leads deeper into the woods. Thank the darkness for cloaking you like a protective veil as you inch closer to your targets. Your senses heightened as your heart beat excitedly with the rhythm of the hunt. There's an edge to the silence, broken only by the occasional missteps over broken twigs under your foot. You glimpse something ahead.
<<elseif $hour >= 5 || $hour <= 18>>
As the sunlight filters through the leaves, dappling the forest floor with patches of golden light, you tread lightly along the worn path. The greenery of the woods seems barely alive with the squeamish colors and the eerie silence, perhaps a good sign; not many animals means not many aberrations around as well. But the current problem is other; daylight brings a different kind of challenge – visibility may be higher, but so is the risk of being spotted.
As you move with purpose, your eyes scan the surroundings, alert to any movement or sound that might betray the presence of the ruffians. The air is crisp, filled with the sweet scent of shit, pine and earth. Maybe you stepped on a turd on your way here, for the smell has been following you for miles.
You grip your <<print $character[1].mainhand.Name>>, fingers tracing the familiar <<if $character[1].equipment.mainhand.Type.includes("2-handed")>> handler<<else>>hilt<</if>>. Even lacking colors, the forest has a certain magnificence. You can feel nature's defiance of death when you look at the fungus growing on the trunks of trees or when you gaze at the refusal of the leaves to switch to brownish tones. The forest may be malnourished, but it is not dead yet.
With determination returning to your being, you press on. You have a task to fulfill. Criminals to make face "justice".
<</if>>
[[Get closer.|Abandoned encampment][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].<<if $day >= 2>>
You manage to find an encampment, it looks abandoned.
<span id="investigation1">
<<link "investigate it">>
<<replace "#investigation1">>
<<test Awareness 11>>
<<onSuccess>><i> - Awareness</i>
Thankfully, you were able to discover some footprints amidst the dead leaves and broken twigs spread on the ground. <<if $event.chapter1.initBandits !== "dead">> It looks like there were three people last night; one went east, probably drunk beyond belief, while the other two slept the night and went north with the dawn. <<else>> It looks like there was only one person last night, they must have gathered everything and went north.<</if>>
<<onFailure>><i> - Awarness</i>
Okay, either they did a good job hiding their tracks, or you are not good in the head to be doing this type of job. You have no clue about their whereabouts. Or even how many are out there.
<</test>>
<</replace>>
<</link>>
</span>
Search at [[North][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[West][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[East][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
earch at [[South][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
<<elseif $day == 1 && $event.chapter1.initBandits !== "dead">>
It is the dark of the night when you find the troublemakers that the tavern's owner asked you to hunt. It is a trio, all gathered around the fire, drinking their poisons and telling their stories, hah! As if they are a bunch of innocent children. A frontal assault would be unwise, too many. Even being furtive would be a risky maneuver, perhaps....
Wait.
You recognize them! At least two of them. It's the bald man and the "mud"-face. You could try a second time to deal with all of this peacefully, but it would be unwise to expect it to work.
As a failsafe, it's better to have your weapons in hand. You never know if someone wants to dance with death,
[[Approach them]]
[[Thinking better, you'd prefer to deal with the matter without words.|Night Ambush]]
<<elseif $day == 1 && $event.chapter1.initBandits == "dead">>
It is the dark of the night when you find the troublemakers that the tavern's owner asked you to hunt. It's a single man, he seems in a hurry while he gathers all of his belongings, you could get rid of him now.., or you could make him lead you to his other "friends"...
[[Approach him|Night Ambush]]
[[Follow him|Gather intel]]
<</if>><<fadein 200ms 3s>>
After walking so long, you finally find something...
<<fadein 200ms 5s>>
An abandoned camp comes into view, appearing worn and desolate. Three makeshift beds lay partially collapsed under a tattered cloth canopy. Upon searching, you find only a few almost spoiled fruits and meager rations—a stark indication that nothing of significant value remains here.
<<set _daysaway to $now.getDate() - 1>>
<span id="textA">
<<link "Explore">>
At first sight, the encampment appears rather small and beaten down. It seems to have served its purpose as a temporary shelter. Among the debris, you discover some loose coins, possibly overlooked by the previous occupants. Unfortunately, it appears that all valuable items were taken or hidden elsewhere.
<i> You found 7 coins. </i>
<<set $character[1].Gold += 7>>
<span id="textB">
<<link "Explore more">>
<<replace "#textB">>
<<test Awareness 9>>
<<onSuccess>>
Upon a closer examination, you spot numerous footprints ingrained into the ground. Some lead back the way you came, while others continue deeper into the woods. The trails suggest the recent movement of several individuals, hinting at a departure from this site <<if _daysaway === 0>>last night<<else>> <<print _daysaway>> night ago<</if>>.
<<link "Follow the footprints">>
<<goTo "isDangerousOutThere">>
<</if>>
<<onFailure>>
You scour the area but find no further substantial clues.
</test>>
<span id="textC">
<<link "Explore more">>
<<replace "#textC">>
<<test Awareness 15>>
<<onSuccess>>
It seems that our first discernment was somewhat wrong, for between dry wood and rotten leaves, a hidden cache was left dug close the ground to future visitors like yourself.
Inside it, more coins can be found, many more.
<i>You find 25 coins.</i><<set $character[1].Gold += 25>>
<<onFailure>>
Despite your focused search, nothing of significance catches your attention.
</test>>
<</replace>>
<</link>>
</span>
<</replace>>
<</link>>
</span>
<</replace>>
<<link "Return to the village">>
<<goto "Village Center">>
<<set $event.chapter1.banditproblem to "unresolved">>
<</link>>
<</link>>
</span>
<</fadein>><</fadein>>You find no trace of the bandits.
You just waisted your time...
Search at [[North][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[West][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[East][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
You find no trace of the bandits.
You just wasted your time...
Search at [[North][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[South][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[East][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
You find an empty bottle, but no trace of the bandits or the drinker.
You just wasted your time...
Search at [[North][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[West][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
Search at [[South][State.variables.now to setup.changeDate(State.variables.now, 'hours', 1), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 30)]].
<<if visited("Combatpage") >= 2>>
With the matters here settled, it is time to return to the tavern to report this.
[[Let us go.|Village Center][$event.chapter1.banditproblem to "dealt"]]
<<else>>
Mood: <<cycle "$Mood" autoselect>>.
<<option "Menacing">>
<<option "Diplomatic">>
<<option "Informal">>
<</cycle>>
<hr>
<p>Ask:<<set _anger to 0>> <<set _friendly to 0>> <<set _itsRenny to false>></p>
<span id="BanditApproaching">
<span id="question1"><<link "Just say hi.">>
<<replace "#question1">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> Weapons down! Nobody needs to get hurt... for now.<<set _anger += 1>>
<b><<print $npc.bandit2.Name>>:</b> Shit...
<b> <<print $npc.bandit1.Name>>:</b> Easy friend... there's plenty of liquor to share. Why don't you join us?
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> I hope I am not interrupting, but i believe there are some things that we need to discuss.
<b><<print $npc.bandit2.Name>>:</b> What the hell?
They are a bit startled, almost dropping their liquors, but soon enough they recompose themselves
<b> <<print $npc.bandit2.Name>>:</b> Hey.... I remember you, you are from earlier, aren't ya?
<<if $event.chapter1.initBandits === "DeceiveResolution">> What it was, again... Remy... Ranndy?
<span id="answer1a">
<<link "It's Rendri">> <<replace "#answer1a">>
<b><<print $character[1].Name>>:</b> It's Rendri.
<b><<print $npc.bandit2.Name>>:</b> Wait, no! It was Renny, you shit!
<b><<print $npc.bandit3.Name>>:</b> Wait... ?he doesn't know ?his name?
<b><<print $npc.bandit2.Name>>:</b> No, dumbass, ?he lied! <<set _friendly -= 2>> <<set _anger += 1>>
<</replace>> <</link>>
<<link "It's Remy">> <<replace "#answer1a">>
<b><<print $character[1].Name>>:</b> It's Remy.
<b><<print $npc.bandit2.Name>>:</b> Wait, no! It was Renny, you shit!
<b><<print $npc.bandit3.Name>>:</b> Wait... ?he doesn't know ?his name?
<b><<print $npc.bandit2.Name>>:</b> No, dumbass, he lied! <<set _friendly -= 2>> <<set _anger += 1>>
<</replace>><</link>>
<<link "It's Renny">><<replace "#answer1a">>
<b><<print $character[1].Name>>:</b> It's Renny.
<b><<print $npc.bandit2.Name>></b> Renny! Come on, drink with us!
<b><<print $npc.bandit3.Name>>:</b> Do you know this ?man? <<set _friendly += 1>> <<set _itsRenny to true>> <<set _trueName = $character[1].Name>>
<<set $character[1].Name = $character[1].Name + " (Renny)">>
<</replace>> <</link>>
<<link "It's Bob">> <<replace "#answer1a">>
<b><<print $character[1].Name>>:</b> It's Bob.
<b><<print $npc.bandit2.Name>>:</b> Wait, no! It was Renny, you shit!
<b><<print $npc.bandit3.Name>>:</b> Wait... ?he doesn't know ?his name?
<b><<print $npc.bandit2.Name>>:</b> No, dumbass, ?he lied! <<set _friendly -= 2>> <<set _anger += 1>>
<</replace>> <</link>>
</span>
<<elseif $event.chapter1.initBandits === "IntimidationResolution">>
<b><<print $character[1].Name>>:</b> We have nothing to discuss. <<set _anger += 1>>
<<elseif $event.chapter1.initBandits === "DiplomacyResolution">>
<b><<print $character[1].Name>>:</b> What? Do you want your money back? Sorry, but no refunds. <<set _anger -= 1>>
<</if>>
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Do you guys have one more drink to share? <br>
<b><<print $npc.bandit2.Name>>:</b> It depends; do we have "idiot" written on our faces?<br>
<b> <<print $npc.bandit1.Name>>:</b> Aren't you the ?man from earlier? Got lost again? <<set _friendly += 1>> <<set _anger += 1>>
<</if>>
<</replace>>
<</link>></span>
<span id="question2"><<link "Smalltalk.">> <<replace "#question2">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> Any reason I shouldn't kill you three right now? <br> <<set _anger += 1>>
<b><<print $npc.bandit3.Name>>:</b> Because... it's... wrong? </br>
You, and the others look at the third guy with either disbelief or amusement at the stupidity of what was said...
<b><<print $npc.bandit1.Name>>:</b> If you kill us, nothing changes. Another group will come and do our jobs. At least we stick just to the roads.
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> So... how has business been? Good?<br>
<<set _anger += 1>><<set _friendly -= 1>>
<b><<print $npc.bandit2.Name>>:</b> Right... as if we would tell you.
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> I didn't get your guy's name at our first encounter.... <br>
<<if _itsRenny is false>> <b><<print $npc.bandit2.Name>>:</b> Not telling. <br>
<b><<print $npc.bandit1.Name>>:</b> They are Felka and Vargo. Mine's Gregory. <br>
<<set $npc.bandit2.Name to "Felka">> <<set $npc.bandit1.Name to "Gregory">> <<set $npc.bandit3.Name to "Vargo">>
<b><<print $npc.bandit2.Name>>:</b> What the heck, man? <br>
<set _friendly -= 1>> <<set _anger += 1>>
<<else>>
<b><<print $npc.bandit2.Name>>:</b> Come on Renny! You wound me. It's Felka. <<set $npc.bandit2.Name to "Felka">><br>
<b><<print $npc.bandit1.Name>>:</b> Gregory. <<set $npc.bandit1.Name to "Gregory">><br>
<b><<print $npc.bandit1.Name>>:</b> Hi, i am Vargo. <<set $npc.bandit3.Name to "Vargo">><br>
<<set _anger -= 1>>
<</if>>
<</if>>
<</replace>><</link>></span>
<span id="question3"><<link "Is there any more bandits?">><<replace "#question3">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> Should I worry about more of you kin,, then?
<b><<print $npc.bandit3.Name>>:</b>...<br>
<b><<print $npc.bandit1.Name>>:</b> I don't know. Should you?<br>
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> This whole operation of yours, who of you three is the head?
<b><<print $npc.bandit3.Name>>:</b> Jarret is the head, not us.<br><<set $npc.banditleader1.Name to "Jarret">>
<<if _itsRenny>>
<b><<print $npc.bandit2.Name>>:</b> Come on, Renny, did you hit your head and forget?<br>
<set _friendly -= 1>>
<<else>>
<b><<print $npc.bandit2.Name>>:</b> Shut the fuck up, Vargo.<br>
<<set _anger += 1>>
<</if>>
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Just three men against a whole town? Sorry, but the math isn't in your guy's favor.
<<if _itsRenny>>
<b><<print $npc.bandit1.Name>>:</b> Shouldn't you know that, <i>"Renny"</i>?
<<else>>
<b><<print $npc.bandit3.Name>>:</b> T-there are more on the hideout... <br>
<<set $hideoutInfo to true>>
<b><<print $npc.bandit1.Name>>:</b> Quiet Vargo, let the talking to us.<br>
<</if>>
<<set _anger += 1>> <set _friendly -= 1>>
<</if>>
<</replace>><</link>></span>
<span id="question4"><<link "Ask them if they could leave.">><<replace "#question4">>
<<if $Mood is "Menacing">>
<<if _anger < 4 && _friendly > 3>>
<<test Intimidation 7>>
<<onSuccess>>
<b><<print $character[1].Name>>:</b> How about you three just leave and never come back? <br>
<b><<print $npc.bandit1.Name>>:</b> Ye know what? Okay, we will leave, but don't ye think this is over, pal.
Honoring his last words, they pick up their thinks and prompt, to leave the place, going deeper into the forest. But a gnawning feeling in your head keeps asking you if this was really the right choice?
<<link "Go back to the village">><<set $event.chapter1.banditproblem to "unresolved">><<set $character[1].experience += 15>><<goto "VillageCenter">><</link>>
<<onFailure>>
<<if _anger < 5>>
<b><<print $character[1].Name>>:</b> Leave! And never come back. <br>
<b><<print $npc.bandit1.Name>>:</b> Eh, i don't now, not feeling it, what about you guys?
<b><<print $npc.bandit2.Name>>:</b> Honestly, i think i'm going to stay longer.
<b><<print $npc.bandit3.Name>>:</b> M-me too.
<b><<print $npc.bandit1.Name>>:</b> There you have it <b>pal</b>, guess we are staying. <<set _anger += 2>> <<set _friendly -= 2>>
<<else>>
<b><<print $npc.bandit1.Name>>:</b> Oh no, it's you who is going to be leaving.
<b><<print $npc.bandit2.Name>>:</b> Preferbly, in pieces.
<<link "They reach for their weapons! [Battle]">> <<battle "Ruffian" 3>><</battle>> <<set $enemyInstances[0].additionalHitChance -= 10 && $enemyInstances[0].traits.push("Drunk")>> <<set $enemyInstances[1].additionalHitChance -= 10 && $enemyInstances[1].traits.push("Drunk")>> <<set $enemyInstances[2].additionalHitChance -= 10 && $enemyInstances[2].traits.push("Drunk")>> <<set $return to passage()>> <<goto "Combatpage">> <</link>>
<</if>>
<</test>>
<<else>>
<<test Intimidation 11>>
<<onSuccess>>
<b><<print $character[1].Name>>:</b> Leave! And never come back. <br>
<b><<print $npc.bandit1.Name>>:</b> Ye know what? Okay, we will leave, but don't ye think this is over, pal.
Despite his last words, they comply with the orders, leaving the place and going deeper into the forest. Was this the right choice?
<<link "Go back to the village">> <<set $event.chapter1.banditproblem to "unresolved">><<set $character[1].experience += 15>><<goto "VillageCenter">><</link>>
<<onFailure>>
<<if _anger < 5>>
<b><<print $character[1].Name>>:</b> Leave! And never come back. <br>
<b><<print $npc.bandit1.Name>>:</b> Eh, i don't now, not feeling it, what about you guys?
<b><<print $npc.bandit2.Name>>:</b> Honestly, i think i'm going to stay longer.
<b><<print $npc.bandit3.Name>>:</b> M-me too.
<b><<print $npc.bandit1.Name>>:</b> There you have it <b>pal</b>, guess we are staying. <<set _anger += 2>> <<set _friendly -= 2>>
<<else>>
<b><<print $npc.bandit1.Name>>:</b> Oh no, it's you who is going to be leaving.
<b><<print $npc.bandit2.Name>>:</b> Preferbly, in pieces.
<<link "They reach for their weapons! [Battle]">><<battle "Ruffian" 3>><</battle>><<set $enemyInstances[0].additionalHitChance -= 10 && $enemyInstances[0].traits.push("Drunk")>><<set $enemyInstances[1].additionalHitChance -= 10 && $enemyInstances[1].traits.push("Drunk")>><<set $enemyInstances[2].additionalHitChance -= 10 && $enemyInstances[2].traits.push("Drunk")>><<set $return to passage()>><<goto "Combatpage">><</link>>
<</if>>
<</test>>
<</if>>
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> How about if I pay you guys to leave? Would you comply?
<b><<print $npc.bandit1.Name>>:</b> ...
<<if _frindly > 3 && _anger < 5>>
<b><<print $npc.bandit1.Name>>:</b> 30 pieces, no less.
Time to bargain!
<<test Speech 8>>
<<onSuccess>>
<b><<print $character[1].Name>>:</b> 20.
<b><<print $npc.bandit1.Name>>:</b> Tsc, 25.
<b><<print $character[1].Name>>:</b> 15.
<b><<print $npc.bandit1.Name>>:</b> 22. Final offer.
<<if $character[1].Gold >= 22>>
You got the money, but are you willing to pay?
<span id="answerC"><<link "Pay up">>
<<replace "#answerC">>
<<set $character[1].Gold -= 22>>
<b><<print $character[1].Name>>:</b> Fine, here's the money, now leave.
<b><<print $npc.bandit1.Name>>:</b> Pleasure doing business with you.
With his last words, they comply, packing up their things and leaving this place, and you with only one question: was this the right choice?
<<link "Go back to the village">>
<<set $event.chapter1.banditproblem to "unresolved">>
<<set $character[1].experience += 15>>
<<goto "VillageCenter">>
<</link>>
<</replace>><</link>>
<<link "No">>
<<replace "#answerC">>
<b><<print $character[1].Name>>:</b> Forget it.
<b><<print $npc.bandit1.Name>>:</b> If that's the case... Then, I guess we will stay a tad longer...
<</replace>><</link>>
<</span>>
<<else>>
You don't even have the money.
<b><<print $npc.bandit1.Name>>:</b> What? Don't even have the money?<br>
<b><<print $npc.bandit2.Name>>:</b> Shouldn't be making deals you can't hold... <br>
<</if>>
<<onFailure>>
<b><<print $character[1].Name>>:</b> 20.
<b><<print $npc.bandit1.Name>>:</b> 30! No more. No less.
<<if $character[1].Gold >= 30>>
You got the money, but are you willing to pay?
<span id="answerC"><<link "Pay up">>
<<replace "#answerC">>
<<set $character[1].Gold -= 30>>
<b><<print $character[1].Name>>:</b> Fine, here's the money, now leave.
<b><<print $npc.bandit1.Name>>:</b> Pleasure doing business with you.
With his last words, they comply, packing up their things and leaving this place, and you with only one question: was this the right choice?
<<link "Go back to the village">>
<<set $event.chapter1.banditproblem to "unresolved">>
<<set $character[1].experience += 15>>
<<goto "VillageCenter">>
<</link>>
<</replace>><</link>>
<<link "No">>
<<replace "#answerC">>
<b><<print $character[1].Name>>:</b> Forget it.
<b><<print $npc.bandit1.Name>>:</b> If that's the case... Then, I guess we will stay a tad longer...
<</replace>><</link>>
<</span>>
<<else>>
You don't even have the money.
<b><<print $npc.bandit1.Name>>:</b> What? Don't even have the money?<br>
<b><<print $npc.bandit2.Name>>:</b> Shouldn't be making deals you can't hold... <br>
<</if>>
<</onFailure>>
<</test>>
<<else>>
<b><<print $npc.bandit1.Name>>:</b> Do we look that easy for you? Skamp kid!
<b><<print $npc.bandit2.Name>>:</b> Hey Greg, why don't we just get rid of this ?guy? ?He is really getting in my nerves.
<</if>>
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Why do you guys even stick to this village? I bet there are better places to be.<br>
<b><<print $npc.bandit2.Name>>:</b> What? Don't tell me you don't like the countryside? It is just so calm here... no one bothers anyone. <<set _friendly += 1>>
<</if>>
<</replace>><</link>> Or... <<link "Offer them a deal.">> <<replace "#question4">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b>You three, how about working for me? It's better than dying here, don't you think? <br>
<b><<print $npc.bandit2.Name>>:</b> And why the fuck would we do that?
<b><<print $character[1].Name>>:</b> Because if not, I will kill you three. Aren't you paying attention, idiot? <<set _anger += 1>>
<<if _anger < 4>>
<<test Intimidation 7>>
<<onSuccess>>
<<set _friendly -= 2>>
<<set _anger += 2>>
<b><<print $npc.bandit3.Name>>:</b> What? H-hold on...
<b><<print $npc.bandit2.Name>>:</b> I'm not a fucking idiot...
<span id="dealresponse">
<<link "Then we have a deal?">>
<<set _chance to Math.floor(Math.random() * 20)>>
<<replace "#dealresponse">>
The three look at each other, and without a single word being proffered, a consensus is made.
<<if _chance > 20 - $character[1].Speech>>
<b><<print $npc.bandit1.Name>>:</b> You know what? Fuck it, we can work for you. But don't you go expecting us to do bodyguard stuff, you hear me?
<span id="dealresponse2">
<<link "We can discuss this later.">>
<<replace "#dealresponse2">>
<b><<print $npc.bandit1.Name>>:</b> Fine, then...
<b><<print $npc.bandit2.Name>>:</b> Then I suppose you probably want to know about what's going to happen to the village, then.
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> You suppose correctly, spill it.
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Yep!
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> You are correct.
<</if>>
<b><<print $npc.bandit1.Name>>:</b> There will be a raid, soon. Don't know when exactly, though.
Well, shit, now you will probably have to save the whole village. Sucks to be you.
<<link "Go back to the village">>
<<set $event.chapter1.banditproblem to "resolved">>
<<set $event.chapter1.initBandits to "hired">>
<<set $character[1].experience += 15>>
<<goto "VillageCenter">>
<<set $character[1].Name = _trueName>>
<</link>>
<</replace>>
<</link>>
</span>
<</if>>
<</replace>>
<</link>>
</span>
<<onFailure>>
<<if _anger < 5>>
<<set _friendly -= 2>>
<<set _anger += 2>>
<b><<print $npc.bandit2.Name>>:</b> You're just bluffing! We won't fall for it.
<b><<print $npc.bandit3.Name>>:</b> Y-yeah, get lost!
<<else>>
<b><<print $npc.bandit2.Name>>:</b> Not if we kill you first, fucker!
<<link "To Battle!">>
<<battle "Ruffian" 3>>
<<set $enemyInstances[0].additionalHitChance -= 10 && $enemyInstances[0].traits.push("Drunk")>>
<<set $enemyInstances[1].additionalHitChance -= 10 && $enemyInstances[1].traits.push("Drunk")>>
<<set $enemyInstances[2].additionalHitChance -= 10 && $enemyInstances[2].traits.push("Drunk")>>
<<set $return to passage()>>
<<goto "Combatpage">>
<</link>>
<</if>>
<</test>>
<</if>>
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> Work for me instead. <br>
<b><<print $npc.bandit1.Name>>:</b> What? Like how? Steal things for you?
<b><<print $npc.bandit2.Name>>:</b> Besides, I doubt you could even deal with Jaret. <<set $npc.banditleader1.Name to "Jaret">>
This "Jaret" must be their leader, well, it's best for you to assume you'll have to deal with him later.
<span id="formalDiscussion">
<<link "What? Do you want a demonstration?">>
<<replace "#formalDiscussion">>
<<if $character[1].Oath is "Conquest">>
<b><<print $character[1].Name>>:</b> Just work for me, soon that village and your old gang are going to be mine.<br>
<b><<print $npc.bandit1.Name>>:</b> Big talk, but I like it. Alright boys, we will work for him.<br>
<b><<print $npc.bandit2.Name>>:</b> What?! What about Jaret?<br>
<b><<print $npc.bandit1.Name>>:</b> We will not mess with Jaret's plans. Boss, you will have to deal with that alone. He and his men will try to raid the village, don't know when, but imagine it to be soon.
A raid, hm? If there are more bandits, it's not likely these three would survive anyway.
<b><<print $character[1].Name>>:</b> Fine by me.
<span id="formalresponse">
<<link "I will call for you when you are needed; you three should answer.">>
<<replace "#formalresponse">>
<b><<print $npc.bandit1.Name>>:</b> Don't worry, we are not stupid.
<b><<print $npc.bandit2.Name>>:</b> Tsc. Better this work out, do you hear me? Jaret does not like double coats.
Hurray, now you have a new passive income. Illegal, yes. But they can be proven to be useful.
<<link "Go back to the village">>
<<set $event.chapter1.banditproblem to "resolved">>
<<set $event.chapter1.initBandits to "hired">>
<<set $event.chapter1.banditraid to "revealed">>
<<set $character[1].experience += 15>>
<<goto "VillageCenter">>
<<set $character[1].Name = _trueName>>
<</link>>
<</replace>>
<</link>>
</span>
<<else>>
<<test Intimidation 9>>
<<onSuccess>>
<b><<print $npc.bandit2.Name>>:</b> ... No, I'm fine.
<b><<print $npc.bandit1.Name>>:</b> Oh! So you can make Felka shut up? Well, you do have my respect, then. <<set _friendly += 1>><<set $npc.bandit1.respect += 5>><br>
<b><<print $npc.bandit1.Name>>:</b> Look, if you can deal with Jaret and the rest of the guys, we can work for you. But we won't meddle in that for you, do you hear me?
<b><<print $character[1].Name>>:</b> Fine by me. For now, you three should stop your operation. We can discuss that later.
<b><<print $npc.bandit1.Name>>:</b> Aye.
<<link "Go back to the village">>
<<set $event.chapter1.banditproblem to "resolved">>
<<set $event.chapter1.initBandits to "hired">>
<<set $character[1].experience += 15>>
<<goto "VillageCenter">>
<<set $character[1].Name = _trueName>>
<</link>>
<</onSuccess>>
<<onFailure>>
<b><<print $npc.bandit2.Name>>:</b> You know what? I think I do...
<b><<print $npc.bandit1.Name>>:</b> No, you don't, you're a dumbass. <<set _anger += 1>><<set $npc.bandit1.respect -= 5>><br>
<b><<print $npc.bandit1.Name>>:</b> Look, if you can deal with Jaret and the rest of the guys, we can work for you. But we won't meddle in that for you, do you hear me?
<b><<print $character[1].Name>>:</b> Fine by me. For now, you three should stop your operation. We can discuss that later.
<b><<print $npc.bandit1.Name>>:</b> Aye.
<b><<print $npc.bandit2.Name>>:</b> As if this ?guy could do that. You know ?he is going to die, right Greg? Fat chance.
Urgh, now you really want to punch that guy's face.
<<link "Go back to the village">>
<<set $event.chapter1.banditproblem to "resolved">>
<<set $event.chapter1.initBandits to "hired">>
<<set $character[1].experience += 15>>
<<goto "VillageCenter">>
<<set $character[1].Name = _trueName>>
<</link>>
<</onFailure>>
<</test>>
<</if>>
<</replace>>
<</link>>
</span>
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Have the three of you ever thought about a career change? <br>
<b><<print $npc.bandit2.Name>>:</b> Hah! What do you want us to do? Pick flowers?! Fuck off. << set _friendly -= 1>> <br>
<b><<print $character[1].Name>>:</b> I'm just saying it, you three could...
<b><<print $npc.bandit2.Name>>:</b> Yeah? And we aren't interested. << set _anger += 1>>
<</if>>
<</replace>><</link>></span>
</span>
<<link "Just attack them.">><<battle "Ruffian" 3>><</battle>><<set $enemyInstances[0].additionalHitChance -= 10 && $enemyInstances[0].traits.push("Drunk")>><<set $enemyInstances[1].additionalHitChance -= 10 && $enemyInstances[1].traits.push("Drunk")>><<set $enemyInstances[2].additionalHitChance -= 10 && $enemyInstances[2].traits.push("Drunk")>><<set $return to passage()>><<goto "Combatpage">><</link>>
</span>
<</if>><nobr>
<<set $npc.bandit3.Name = "Bandit">>
<<set _anger to 2>>
<<if visited() < 2'>>
<span id="oneguy">
<<link "Talk to him?">>
<<replace "#oneguy">>
Mood: <<cycle "$Mood" autoselect>>.
<<option "Menacing">>
<<option "Diplomatic">>
<<option "Informal">>
<</cycle>>
<span id="angerbar"><<print _anger>> / 5 Stress</span>
<hr>
<b><<print $npc.bandit3.Name>>:</b> S-Shit... who are you?
<span id="text1"><<link "Act: Calm him down.">>
<<replace "#text1">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> If you don't want to die, it's better to calm yourself down.
<<set _anger += 1>>
<b><<print $npc.bandit3.Name>>:</b> S-shut up! I'm warning you!
<<elseif $Mood is "Diplomatic">>
<<set _anger -= 1>>
<b><<print $character[1].Name>>:</b> I'm not here to harm you, let's talk...
<b><<print $npc.bandit3.Name>>:</b> D-don't come any closer!
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Ow! Ow! Ow! Easy there, friend... let's not get hasty.
<b><<print $npc.bandit3.Name>>:</b> I-I am not an idiot! Stay there!
<</if>>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<<if _anger >= 5>>
<<replace "#oneguy">>
<b><<print $npc.bandit3.Name>>:</b> Shut the fuck!
<<link "He had enough of your babble.">>
<<battle "Ruffian" 1>><</battle>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 12)>>
<<set $return to passage()>>
<<goto "Combatpage">>
<</link>>
<</replace>>
<</if>>
<</link>>
</span>
<span id="text2"><<link "Ask: Who you are?.">>
<<replace "#text2">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> So... how should i call you? Fuckface or dead meat?
<b><<print $npc.bandit3.Name>>:</b> *Gulp* L-look ?man, i don't want a problem. My name is Vargos.
<span id="text2a">
<<link "Call him 'Deadmeat'">>
<<replace "#text2a">>
<b><<print $character[1].Name>>:</b>Nah, I will stick with Deadmeat, and boy, you are in for a load of problems...
<<set $npc.bandit3.Name to "Deadmeat">>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<</replace>>
<</link>>
<<link "Call him 'Fuckface'.">>
<<replace "#text2a">>
<b><<print $character[1].Name>>:</b> Nah, I will stick with Fuckface, and boy, you are in for a load of problems...
<<set $npc.bandit3.Name to "Fuckface">>
<<set _anger += 1>>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<</link>>
<<link "Call him 'Vargos'.">>
<<replace "#text2a">>
<b><<print $character[1].Name>>:</b> Then, Vargos... You are in a lot of problems...
<<set $npc.bandit3.Name to "Vargos">>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<</link>>
</span>
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> Hey, what's your name? Mine is <<print $character[1].Name>>.
<b><<print $npc.bandit3.Name>>:</b> I-It's V-vargos.... Please, just let me go.<br>
<b><<print $character[1].Name>>:</b> I am afraid i can't do that yet, Vargos.
<<set $npc.bandit3.Name to "Vargos">>
<<set _anger -= 1>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Look, Bob... may i call you Bob?
<b><<print $npc.bandit3.Name>>:</b> That is not my name!
<<set _anger += 1>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<span id="text2b">
<<link "Then, what's your name?">>
<b><<print $character[1].Name>>:</b> Then what's your name, Bob?
<b><<print $npc.bandit3.Name>>:</b> It's Vargos...
<<set $npc.bandit3.Name to "Vargos">>
<b><<print $character[1].Name>>:</b> Vargos, huh? That's a pretty name.
<<set _anger -= 1>>
<<replace "#text2b">>
<</replace>>
<</link>>
</span>
<<link "Listen here, Bob...">>
<<set $npc.bandit3.Name to "Bob">>
<<replace "#tesxt2a">>
<b><<print $character[1].Name>>:</b> Listen here, Bob, the truth is that you are in a lot of problems... and I don't give a shit what your name is, so you either: let me resolve this peacefully, or we are going to do it the "I going to kill you" way.
<b><<print $npc.bandit3.Name>>:</b> F-fine, then...
<</replace>>
<</link>>
</span>
<</if>>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<<if _anger >= 5>>
<<replace "#oneguy">>
<b><<print $npc.bandit3.Name>>:</b> Shut the fuck!
<<link "He had enough of your babble.">>
<<battle "Ruffian" 1>><</battle>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 12)>>
<<set $return to passage()>>
<<goto "Combatpage">>
<</link>>
<</replace>>
<</if>>
<</link>>
</span>
<span id="text3"><<link "Ask: What is you doing here?">>
<<replace "#text3">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> So you are the little thief of the village? Huh?<br>
<b><<print $npc.bandit3.Name>>:</b> W-well, y-i mean, no! I mean, I am just a lookout! <br>
<b><<print $character[1].Name>>:</b> So there are others?<br>
<b><<print $npc.bandit3.Name>>:</b> Y-yes! They are the real thieves, not me!<br>
<span id="text3a">
<<link "But you helped them.">>
<<replace "#text3a">>
<b><<print $character[1].Name>>:</b> But you helped them, so you are to blame just as your friends.<br>
<b><<print $npc.bandit3.Name>>:</b> What?! N-no! Come on, ?man.
<</replace>>
<</link>>
<<link "I see...">>
<<replace "#text3a">>
<b><<print $character[1].Name>>:</b> I see... What do the others look like?<br>
<b><<print $npc.bandit3.Name>>:</b> Eh... I-I not telling. Not a rat.
<<set _anger += 1>>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<</link>>
<<link "All the same for me.">>
<<replace "#text3a">>
<b><<print $character[1].Name>>:</b> Don't care it's all the same for me. My job here is to kill you, and that's what I will do.<br>
<b><<print $npc.bandit3.Name>>:</b> S-shit!
<<set _anger += 2>>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<</link>>
</span>
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> I heard rumors of bandits hiding in these forests. You wouldn't know anything about it, would you? <br>
<b><<print $npc.bandit3.Name>>:</b> N-no... Sorry.
<i>Despite his words, he is clearly lying...</i>
<br>
<span id=text3b>
<<link "Don't lie to me">>
<<replace "#text3b">>
<<if $Mood is "Menacing">>
<b><<print $character[1].Name>>:</b> Don't lie to me, you piece of shit! I know it is you!
<<set _anger += 2>>
<b><<print $npc.bandit3.Name>>:</b> I-I am sorry, it's the truth, i did not steal a thing! I am just on the lookout!
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<<elseif $Mood is "Diplomatic">>
<b><<print $character[1].Name>>:</b> I see then. But, one more thing: It is just that I can't get it around my head, but what are you doing here? I mean, alone in the middle of the forest? When there is a village and tavern nearby to sleep at night... it just does not make sense.
<b><<print $npc.bandit3.Name>>:</b> What? N-no, you got it wrong! I-I am just a lookout, not a thief! I swear!
<<elseif $Mood is "Informal">>
<b><<print $character[1].Name>>:</b> Sure.... and I am a pink elephant.
<b><<print $npc.bandit3.Name>>:</b> I-It's the truth, I am not a thief, I am just the lookout...
<<set _anger += 1>>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<</if>>
<</link>>
</span>
<<elseif $Mood is "Informal">>
<</if>>
<</replace>>
<<replace "#angerbar">> <<print _anger>>/ 5 <</replace>>
<<if _anger >= 5>>
<<replace "#oneguy">>
<b><<print $npc.bandit3.Name>>:</b> Shut the fuck!
<<link "He had enough of your babble.">>
<<battle "Ruffian" 1>><</battle>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 12)>>
<<set $return to passage()>>
<<goto "Combatpage">>
<</link>>
<</replace>>
<</if>>
<</link>>
</span>
<span id="text4">
<<link "Let's settle this, then.">>
<<replace "#text4">>
<<if _anger >= 5>>
<b><<print $npc.bandit3.Name>>:</b> Y-you know what?! I had enough of you! <<link "DIE!">>
<<battle "Ruffian" 1>><</battle>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 12)>>
<<set $return to passage()>>
<<goto "Combatpage">>
<</link>>
<<else>>
<b><<print $npc.bandit3.Name>>:</b> Please... just let me go. I will never come back, I swear!
<div align="center">
<span id="text4a"><<link "Kill him">>
<<battle "Ruffian" 1>><</battle>>
<<set $return to passage()>>
<<goto "Combatpage">>
<<set $enemyInstances[0].currentLife to 5>>
<<set $enemyInstances[0].MAXLIFE to 5>>
<<set $enemyInstances[0].additionalHitchance to -15>>
<</link>> or <<link "Let him go">>
<<replace "#text4a">>
Perhaps this is not the smartest or best decision, but it is the kindest. You allow the poor man to go.
Maybe something good come up from that, but only time will tell.
<</replace>><</link>>
</span>
</div>
<</if>>
<</replace>>
<</link>>
</span>
<</replace>>
<</link>>
</span>
</nobr>
<<else>>
<<set $event.chapter1.banditproblem to "killedoneguy">>
<<elseif $event.chapter1.initBandits === "dead" && visited() < 2>>
<<link "Just kill him">> <<replace "#oneguy">>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 4)>>
<<test Stealth 6>>
<<onSuccess>>
He did not even notices when you <<if $character[1].equipment.mainhand.Type.includes("blunt")>> crushed his skull <<elseif $character[1].equipment.mainhand.Type.includes("piercing")>> pierced his skull <<elseif $character[1].equipment.mainhand.Type.includes("slashing")>> cut his head off <<elseif $character[1].equipment.mainhand.Type.includes("esoteric")>> exploded his brain from inside out<</if>>.
[[Simple as that...|Village Center][$event.chapter1.banditproblem to "dealt"]]
<<onFailure>>
<<link "He spotted you before you could do anything.">>
<<battle "Ruffian" 1>><</battle>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 12)>>
<<set $return to passage()>>
<<goto "Combatpage">>
<</link>>
<</test>>
<</replace>> <</link>>
</span>
<<elseif visited("Combatpage") >= 2>>
Finally, all three of them were dealt with.
[[Simple as that...|Village Center][$event.chapter1.banditproblem to "dealt"]]
<</if>>
<<else>>
You move through the shadows like a ghost, your steps silent upon the forest floor, with the crackling campfire casting flickering shadows across the faces of the three bandits and their laughter breaking the monotonous silence of the night.
You survey your scene: three men enjoying a hearty drink and a piece of jerked beef. The bald one hardly touches his glass as he prioritizes hearing the wild stories of the others... it looks like he is the smart one of the group.
As for the other two, the young man with a round face and an ugly mug, he is the one that keeps rambling, just stopping to take sips and refills of his drink. And then, the third man, his gaze is focused solely on the fire and the piece of meat it heats.
For now, you wait...
It does not take much time for the younger of the three to get up from its seat and go to the woods to answer the call of nature, which we mortal refers to as "taking a piss"...
<<test Stealth 9>>
<<onSuccess>>
You do not waste the chance, you approach the drunkard and with weapons in had, <<if $character[1].equipment.mainhand.Type.includes("blunt")>> you bash his skull open wide.<<elseif $character[1].equipment.mainhand.Type.includes("piercing")>> you impale him, right at his throat... <<elseif $character[1].equipment.mainhand.Type.includes("slashing")>> cut his head off.<</if>>.
Thankfully, there was no sound.... no scream. Just a kill.
The other two bandits remain blissfully unaware for minutes before the elder one points out the lateness of their friend.
<<set $character[1].experience += 5>>
<<set $character[1].Gold += $character[2].Gold>>
<<test Stealth 12>>
<<onSuccess>> <i>- Stealth </i>
Sensing something is amiss, he and his remaining friend reach for the weapons and enter further into the forest...
...with each of their step...
getting closer to you;
Step by step;
Sweat by sweat;
Until...
<<if $character[1].equipment.mainhand.Type.includes("blunt")>>
*THUD!*
<<elseif $character[1].equipment.mainhand.Type.includes("piercing")>>
*SCHLUK!*
<<elseif $character[1].equipment.mainhand.Type.includes("slashing")>>
*SWISH!*
<</if>>.
A strike is made.
And a body lies dead.
Now, there only remains you and the last bandit.
<<set $character[1].experience += 5>>
<<set $character[1].Gold += $character[2].Gold>>
And here he comes to see the deceased body of his former friend. Just before he joins the dead.
<b><<print $npc.bandit1.Name>>:</b> Vargos, where ar... Vargos?! Shit
<b><<print $npc.bandit1.Name>>:</b> You... Heh! Well, fuck me, i guess... I'm gonna be honest with ye kid... if I had known you would do this to us, I'd have killed you on the spot... But guess life is just a bunch of mistakes.
<<link "Let's give him a proper battle.">>
<<battle "Ruffian" 1>><</battle>>
<<set $return to passage()>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 12)>>
<<set $whosturn to "ambush">>
<<goto "Combatpage">>
<</link>>
<<onFailure>>
<<fadein 200ms 2s>> .<</fadein>><<fadein 200ms 4s>> .<</fadein>><<fadein 200ms 6s>> .<</fadein>>
<<fadein 200ms 8s>> <b><<print $npc.bandit3.Name>>:</b> He's here!
<<link "Sadly, they have spotted you.">>
<<battle "Ruffian" 2>><</battle>>
<<set $return to passage()>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 15)>>
<<set $whosturn to "ambush">>
<<goto "Combatpage">>
<</link>>
<</fadein>>
<</test>>
<<onFailure>>
<<link "Sadly, they have spotted you.">>
<<battle "Ruffian" 3>><</battle>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 24)>>
<<set $return to passage()>>
<<set $whosturn to "ambush">>
<<goto "Combatpage">>
<</link>>
<</test>>
<</if>>
<</if>><span id="test2">
<<link "It's dark...">>
<<replace"#test2">>
<<if $character[1].traits.includes("Animal Senses")>>
Its dark...
But your animal senses don't care for it... the feeling of the hunt, the adrenaline, it empowers you, your sight, your scent, your muscles. You maintain a keen watch on the man as if they were your prey. You silently follow as he heads north.
<br>
<<include "Intel2">>
<<elseif $character[1].Ancestry === "Draconian">>
It's dark...
But the night will not hinder you from hunting a human. Your sight may be tampered with, but your scent remains your most powerful asset.
And like every human, they reek of booze and fear. Easy prey.
He heads north...
<br>
<<include "Intel2">>
<<include "Intel2">>
<<elseif $character[1].Ancestry === "Dwarf">>
It's dark...
But the dark is no issue for you, for your eyes glow like two gemstones near the light of a fire, a trait that has born significance for one that has been living underground for decades. As for our pursuit, the man heads north...
<br>
<<include "Intel2">>
<<else>>
<<test Awareness 10>>
<<onSuccess>>
Even though the dark of the night tampers with your vision, you are able to stay behind him as they head north.
<br>
<<include "Intel2">>
<<onFailure>>
It's dark...
Too dark to see shit ahead.
Shit.
<span id="test3">[[Give up.|Village Center][$event.chapter1.banditproblem = "unresolved"]] | <<link "Re-do your steps">><<replace"#test2">>
<<fadein 200ms 2s>> . <<fadein 200ms 4s>> . <<fadein 200ms 6s>> . <</fadein>><</fadein>><</fadein>>
<<fadein 200ms 7s>>
<<test WorldKnowledge 8>>
<<onSuccess>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
You got it! He went north!
<br>
<<include "Intel2">>
<<onFailure>>
Shit...
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
[[Give up.|Village Center][$event.chapter1.banditproblem = "unresolved"]]
<</test>>
<</fadein>>
<</replace>><</link>></span>
<</test>>
<</if>>
<</replace>>
<</link>>
<<if $character[1].Specialization === "Wizard" || $character[1].Specialization === "Invoker" || $character[1].Specialization === "Warlock" || $character[1].Specialization === "Paladin" || $character[1].Specialization === "Cleric" || $character[1].Specialization === "inquisitor" >>
<<link "Cast a spell (5).">> <<set $character[1].currentMana -= 5>>
<<replace"#test2">>
<<set _magicglow to true>>
You create a soft sphere of light to illuminate your path, not too bright to evoke atention to your side.
<br>
<<include "Intel2">>
<</replace>>
<</link>>
<<elseif $character[1].traits.includes("Architect of Reality")>>
<<link "Create a torch (3)">> <<set $character[1].currentMana -= 3>>
<<replace"#test2">>
<<set _torch to true>>
The essence of your body shapes itself into a stick that expontainly combust its point. Enough to brighlty illuminate the path ahead.
<br>
<<include "Intel2">>
<</replace>>
<</link>>
<</if>>
</span>
<<if $language === "EN">>
<div align='center'>
<h1>Vanadi</h1>
<hr><h4> "The wild ones." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
<i>In the everlasting tapestry of the world, the Vanadi emerge as enigmatic figures, cloaked in the skins of animals since their very inception. From the tender cradle of childhood, they don masks, shedding their human origins like brittle skin. Do not be deceived; these masks are more than mere ceremonial trinkets. They wield a potent magic, a transformative force that melds flesh and spirit. With these veils, they slip into the skin of fierce and graceful creatures, stepping into the silent dance of the wild.
Yet, adulthood weaves a different tapestry. It is a time when the younglings must learn the primal laws, the whispered secrets of nature's eternal cycle. Some return to their human forms, yet others, forever touched by the spirits, wear hybrid skins, a blend of the human and the beast, walking the line between two worlds.
But alas, the symphony of their existence is marred by the discordant intrusion of the otherworldly Gods. The Wild Spirits, ethereal beings once revered as patrons of this realm's very soul, now find themselves overshadowed. Ellis, the Conquering Sun, casts his scorching disdain, banishing Vanadi from his cities, breeding seeds of hatred and igniting the fires of discrimination. Uldur, the false Saviour, parades with honeyed hollow sermons of forgiveness even as his forces pillage Vanadi's lands, leaving behind only scorched earth and bitter memories. And then there's Urahyahra, the Mother of Monsters, a goddess whose fairness transcends race – every living soul, whether human, elf, or Vanadi, trembles beneath her monstrous dominion, where existence is both a sin and a curse.
Amidst these nightmarish trials, the Vanadi stand defiant, their spirits unyielding against adversity's onslaught. They clutch to their faith with their teeth and claws, refusing to relinquish the sacred artistry of their costumes. Even when the world they knew is no longer the same, they remain resolute, never waiver their strength, never abandon their lands, and never yield to the dominion of the usurping "gods"...
</div>
<hr>
<div align='center'>
<h3>Traits:</h3>
<b>Animal senses:</b>
<i>The Vanadi can see in the dark. Additionally, they have a +5 to their Hit-Chance.</i>
<b>Feral Mask:</b>
<i>The Vanadi gain the ability to shapeshift during combat, you gain the skills "Form of the Bear", "Form of the Wolf" and "Form of the Eagle".</i>
<hr>
</div>
<<elseif $language === "PT-BR">>
<div align='center'>
<h1>Vanadi</h1>
<hr><h4> "Os selvagens." </h4>
<h3>Lore:</h3>
</div>
<hr>
<div align='left'>
No eterno tecido do mundo, os Vanadi emergem como figuras enigmáticas, envoltas nas peles dos animais desde sua origem. Desde o berço terno da infância, eles usam máscaras, descartando suas origens humanas como pele frágil. Não se engane; essas máscaras são mais do que meros adornos cerimoniais. Elas possuem uma magia poderosa, uma força transformadora que funde carne e espírito. Com esses véus, eles se transformam nas peles de criaturas ferozes e graciosas, adentrando a dança silenciosa do selvagem.
Entretanto, a idade adulta tece um tecido diferente. É um tempo em que os jovens devem aprender as leis primordiais, os segredos sussurrados do ciclo eterno da natureza. Alguns retornam às suas formas humanas, enquanto outros, tocados para sempre pelos espíritos, usam peles híbridas, uma mistura do humano e da besta, caminhando na linha entre dois mundos.
Mas, lamentavelmente, a sinfonia de sua existência é manchada pela intrusão discordante dos Deuses de outro mundo. Os Espíritos Selvagens, seres etéreos antes reverenciados como patronos da alma deste reino, agora encontram-se obscurecidos. Ellis, o Sol Conquistador, lança seu desdém escaldante, banindo os Vanadi de suas cidades, semeando sementes de ódio e acendendo as chamas da discriminação. Uldur, o falso Salvador, desfila com sermões doces e vazios de perdão, mesmo enquanto suas forças saqueiam as terras dos Vanadi, deixando para trás apenas terra queimada e memórias amargas. E então há Urahyahra, a Mãe dos Monstros, uma deusa cuja justiça transcende raças - toda alma viva, seja humana, elfa ou Vanadi, treme sob seu domínio monstruoso, onde a existência é tanto um pecado quanto uma maldição.
Em meio a esses julgamentos terríveis, os Vanadi permanecem desafiadores, seus espíritos inabaláveis contra o ataque da adversidade. Eles se agarram à sua fé com seus dentes e garras, recusando-se a abandonar a arte sagrada de suas vestimentas. Mesmo quando o mundo que conheciam já não é mais o mesmo, eles permanecem resolutos, nunca vacilam em sua força, nunca abandonam suas terras e nunca se rendem ao domínio dos "deuses" usurpadores...</i>
</div>
<hr>
<div align='center'>
<h3>Traços:</h3>
<b>Sentidos Animais:</b>
<i>Os Vanadi podem ver no escuro. Além disso, eles têm uma +5 para suas Chânces de Acerto.</i>
<b>Mascara Feroz:</b>
<i>Os Vanadi tem a habilidade de se transformarem durante o combate, ganhando as habilidades "Forma do Urso", "Forma do Lobo" e "Forma da Águia".</i>
</div>
<</if>>
<<set $return to passage()>>
<<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<if $language === "EN">>
Imagine that i have actually added the story here.
[[Procceed|Company Arrives]]
<<elseif $language === "PT-BR">>
Imagine que eu realmente adicionei a história aqui.
[[Proceda|Company Arrives]]
<</if>><<run UIBar.stow();>><<run UIBar.hide();>><<run window.hideRightUIBar()>>
<<silently>>
<<switch $character[1].level>>
<<case 2>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addSkill("Bash")>>
<<elseif $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addTrait("Spare Arrows")>>
<<elseif $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addSkill("Dual Weapon Rush")>>
<<elseif $character[1].Specialization === 'Wizard'>>
<<run State.variables.character[1].addTrait("Overflow")>>
<<elseif $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addSkill("Summon: Undead")>>
<<elseif $character[1].Specialization === 'Spellblade'>>
<<run State.variables.character[1].addTrait("Arcane Weapon")>>
<<run State.variables.character[1].addSkill("Summon Arcane Blade")>>
<<elseif $character[1].Specialization === 'Assassin'>>
<<run State.variables.character[1].addTrait("Nimble Fingers")>>
<<elseif $character[1].Specialization === 'Thief'>>
<<run State.variables.character[1].addTrait("Nimble Fingers")>>
<<elseif $character[1].Specialization === 'Spy'>>
<<run State.variables.character[1].addTrait("Nimble Fingers")>>
<<elseif $character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Nimble Fingers")>>
<<elseif $character[1].Specialization === 'Dancer'>>
<<run State.variables.character[1].addTrait("Tempo I")>>
<<elseif $character[1].Specialization === 'Scholar'>>
<<run State.variables.character[1].addTrait("Genius Mind")>>
<<elseif $character[1].Specialization === 'Barber Surgeon'>>
<<run State.variables.character[1].addSkill("Quick Fix")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<run State.variables.character[1].addTrait("Oathkeeper")>>
<</if>>
<<case 3>>
<<if $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addTrait("Natural Reflexes")>>
<<elseif $character[1].Specialization === 'Assassin'>>
<<run State.variables.character[1].addTrait("Lethality")>>
<<elseif $character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Trapsmith")>>
<<elseif $character[1].Specialization === 'Juggernaut'>>
<<run State.variables.character[1].addTrait("Titanic")>>
<<elseif $character[1].Specialization === 'Berserker'>>
<<run State.variables.character[1].addSkill("Warcry")>>
<<elseif $character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Elemental Affinity I")>>
<<run State.variables.character[1].addSkill("Rainfall")>>
<<run State.variables.character[1].addSkill("Turn the Tides")>>
<<elseif $character[1].Specialization === 'Feral'>>
<<run State.variables.character[1].addSkill("Adrenaline Rush")>>
<<elseif $character[1].Specialization === 'Warlock'>>
<<if $character[1].Pact === "Shadow">>
<<run State.variables.character[1].addSkill("Shadow Bolt")>>
<<elseif $character[1].Pact === "Soul">>
<<run State.variables.character[1].addSkill("Soul Syphon")>>
<<elseif $character[1].Pact === "Blood">>
<<run State.variables.character[1].addSkill("Drain")>>
<</if>>
<<elseif $character[1].Specialization === 'Bard'>>
<<run State.variables.character[1].addTrait("Well-versed")>>
<<link "open">>
<<dialog "Choose a Skill:">>
<div align = "center">
<<silently>>
<<set _skillInfo to []>>
<<set _bardSkills = []>>
<<for _i to 0; _i lt $skill.length; _i++>>
<<if $skill[_i].categories.includes("Spell") && !($character[1].skills.includes($skill[_i].name)) && $skill[_i].name !== "Blizzard" && $skill[_i].name !== "Inferno" && $skill[_i].name !== "Storm" && $skill[_i].name !== "Summon Arcane Blade" && !($skill[_i].categories.includes("Vampyr")) && !($skill[_i].categories.includes("Pact"))>>
<<set _skillInfo.push($skill[_i])>>
<<set _bardSkills.push($skill[_i].name)>>
<</if>>
<</for>>
<</silently>>
<<for _j to 0; _j lt _bardSkills.length; _j++>>
<<radiobutton "_skilltoAdd" "_bardSkills[_j]">> <b><<if $language is "EN">><<print _bardSkills[_j]>><<elseif $language is "PT-BR">><<print _skillInfo[_j].name_pt>></b><</if>>
<<if $language is "EN">><b>Essence cost:</b><<elseif $language is "PT-BR">>Custo de Essência<</if>> <<print _skillInfo[_j].Manacost>>
<<if $language is "EN">><b>A.P cost:</b><<elseif $language is "PT-BR">> Custo de P.A.<</if>> <<print _skillInfo[_j].APCost>>
<<if $language is "EN">><b>Description:</b> <<print _skillInfo[_j].description>><<elseif $language is "PT-BR">><b>Descrição:</b> <<print _skillInfo[_j].desc_pt>><</if>>
<<if $language is "EN">><b>Cooldown:</b> <<print _skillInfo[_j].cooldown>> turns.<<elseif $language is "PT-BR">><b>Tempo de Recarga:</b> <<print _skillInfo[_j].cooldown>> turnos.<</if>>
<hr>
<</for>>
<<link "This one">>
<<dialogClose>>
<</link>>
</div>
<<onclose>>
<<run State.variables.character[1].addSkill(_skilltoAdd)>>
<</dialog>>
<</link>>
<<elseif $character[1].Specialization === 'Scholar'>>
<<run State.variables.character[1].addTrait("Jack-of-All-Trades")>>
<<elseif $character[1].Specialization === 'Paladin' ||
$character[1].Specialization === 'Cleric' ||
$character[1].Specialization === 'Inquisitor' ||
$character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Divine Blessing I")>>
<</if>>
<<case 4>>
<<set $character[1].APregen += 1>>
<<case 5>
<<if $character[1].Specialization === 'Vanguard' ||
$character[1].Specialization === 'Archer' ||
$character[1].Specialization === 'Duelist' ||
$character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addTrait("Weapon Mastery")>>
<<elseif $character[1].Specialization === 'Assassin' ||
$character[1].Specialization === 'Thief' ||
$character[1].Specialization === 'Spy' ||
$character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Gambler")>>
<<elseif $character[1].Specialization === 'Berserker'>>
<<run State.variables.character[1].addSkill("Cleave")>>
<<elseif $character[1].Specialization === 'Feral'>>
<<run State.variables.character[1].addSkill("Mutilate")>>
<<elseif $character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Elemental Affinity II")>>
<<run State.variables.character[1].addSkill("Stormsurge")>>
<<run State.variables.character[1].addSkill("Gale Winds")>>
<<elseif $character[1].Specialization === 'Wizard'>>
<<run State.variables.character[1].addTrait("Mystical Arsenal")>>
<<run State.variables.character[1].addSkill("Daze")>>
<<run State.variables.character[1].addSkill("Arcane Armor")>>
<<run State.variables.character[1].addSkill("Arcane Beam")>>
<<elseif $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addSkill("Summon: Elemental")>>
<<elseif $character[1].Specialization === 'Cleric'>>
<<run State.variables.character[1].addTrait("Divine Grace")>>
<<elseif $character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Bloody Embrace")>>
<</if>>
<<case 6>>
<<if $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addSkill("Combo")>>
<<elseif $character[1].Specialization === 'Thief'>>
<<run State.variables.character[1].addSkill("Deep Pockets")>>
<<elseif $character[1].Specialization === 'Juggernaut' ||
$character[1].Specialization === 'Berserker' ||
$character[1].Specialization === 'Feral' ||
$character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Champion's Might")>>
<<elseif $character[1].Specialization === 'Warlock'>>
<<run State.variables.character[1].addTrait("Ultimate Sacrifice")>>
<<set $character[1].additionalDamage += 10>> <!-- Make sure this variable is initialized before using it -->
<<elseif $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addTrait("Bonded Existence")>>
<<elseif $character[1].Specialization === 'Spellblade'>>
<<run State.variables.character[1].addTrait("Arcane Armory")>>
<<elseif $character[1].Specialization === 'Dancer' ||
$character[1].Specialization === 'Bard' ||
$character[1].Specialization === 'Scholar' ||
$character[1].Specialization === 'Barber Surgeon'>>
<<run State.variables.character[1].addTrait("Trustworthy Instrument")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<run State.variables.character[1].addSkill("Smite")>>
<<run State.variables.character[1].addSkill("Blessed Strikes")>>
<<elseif $character[1].Specialization === 'Inquisitor'>>
<<run State.variables.character[1].addTrait("Brazen Inquiry")>>
<</if>>
<<case 7>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addTrait("Shielded Assault")>>
<<elseif $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addTrait("Barbed Points")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addSkill("En Garde!")>>
<<elseif $character[1].Specialization === 'Spy'>>
<<run State.variables.character[1].addSkill("Bribe")>>
<<elseif $character[1].Specialization === 'Juggernaut'>>
<<run State.variables.character[1].addSkill("Taunt")>>
<<elseif $character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Wild Surge")>>
<<elseif $character[1].Specialization === 'Spellblade'>>
<<run State.variables.character[1].addTrait("Mystical Arts")>>
<<run State.variables.character[1].addSkill("Blade Surge")>>
<<run State.variables.character[1].addSkill("Spectral Strike")>>
<<elseif $character[1].Specialization === 'Dancer'>>
<<run State.variables.character[1].addTrait("Double Time")>>
<<elseif $character[1].Specialization === 'Scholar'>>
<<run State.variables.character[1].addTrait("Expert")>>
<</if>>
<<case 8>>
<<if $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addSkill("Triple Shot")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addTrait("Graceful")>>
<<elseif $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addTrait("Flurry")>>
<<elseif $character[1].Specialization === 'Assassin'>>
<<run State.variables.character[1].addTrait("Sneaky")>>
<<elseif $character[1].Specialization === 'Spy'>>
<<run State.variables.character[1].addTrait("Sneaky")>>
<<elseif $character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Sneaky")>>
<<elseif $character[1].Specialization === 'Berserker'>>
<<run State.variables.character[1].addTrait("Bloodthirst")>>
<<elseif $character[1].Specialization === 'Feral'>>
<<run State.variables.character[1].addTrait("Savagery")>>
<<elseif $character[1].Specialization === 'Wizard'>>
<<run State.variables.character[1].addTrait("Overflow II")>>
<<elseif $character[1].Specialization === 'Warlock'>>
<<if $character[1].Pact === "Shadow">>
<<run State.variables.character[1].addTrait("Masterful Dark Magic")>>
<<elseif $character[1].Pact === "Soul">>
<<run State.variables.character[1].addTrait("Masterful Necromancy")>>
<<elseif $character[1].Pact === "Blood">>
<<run State.variables.character[1].addTrait("Masterful Hemomancy")>>
<</if>>
<<elseif $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addSkill("Summon: Spirit")>>
<<elseif $character[1].Specialization === 'Barber Surgeon'>>
<<run State.variables.character[1].addTrait("Bloody Mess")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<run State.variables.character[1].addTrait("Divine Blessing II")>>
<<elseif $character[1].Specialization === 'Cleric'>>
<<run State.variables.character[1].addTrait("Divine Blessing II")>>
<<elseif $character[1].Specialization === 'Inquisitor'>>
<<run State.variables.character[1].addTrait("Divine Blessing II")>>
<<elseif $character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Divine Blessing II")>>
<</if>>
<<case 9>>
<<set $character[1].APregen += 1>>
<<case 10>>
<<run State.variables.character[1].addTrait("Veteran")>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addTrait("Tactical Genius")>>
<<elseif $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addTrait("Tactical Genius")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addTrait("Tactical Genius")>>
<<elseif $character[1].Specialization === 'Assassin'>>
<<run State.variables.character[1].addTrait("Lethality II")>>
<<elseif $character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Skirmish Tactics")>>
<<elseif $character[1].Specialization === 'Juggernaut'>>
<<run State.variables.character[1].addTrait("Spiked")>>
<<elseif $character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Elemental Affinity III")>>
<<run State.variables.character[1].addSkill("Eruption")>>
<<run State.variables.character[1].addSkill("Blazing Strike")>>
<<elseif $character[1].Specialization === 'Wizard' || $character[1].Specialization === 'Warlock' || $character[1].Specialization === 'Spellblade' || $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addTrait("Arcane Mastery")>>
<<run State.variables.character[1].addSkill("Daze All")>>
<<run State.variables.character[1].addSkill("Inferno")>>
<<run State.variables.character[1].addSkill("Blizzard")>>
<<run State.variables.character[1].addSkill("Storm")>>
<<elseif $character[1].Specialization === 'Dancer'>>
<<run State.variables.character[1].addTrait("Graceful Steps")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<run State.variables.character[1].addTrait("Faith in Arms")>>
<<elseif $character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Pious Resilience")>>
<</if>>
<<case 11>>
<<if $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addTrait("Momentum")>>
<<elseif $character[1].Specialization === 'Thief'>>
<<run State.variables.character[1].addSkill("Steal Soul")>>
<<elseif $character[1].Specialization === 'Spy'>>
<<run State.variables.character[1].addSkill("Eye for Detail")>>
<<elseif $character[1].Specialization === 'Berserker'>>
<<run State.variables.character[1].addTrait("Overwhelming Strength")>>
<<elseif $character[1].Specialization === 'Feral'>>
<<run State.variables.character[1].addTrait("Blood Frenzy")>>
<<elseif $character[1].Specialization === 'Warlock'>>
<<if $character[1].Pact === "Shadow">>
<<run State.variables.character[1].addSkill("Puppeteering")>>
<<run State.variables.character[1].addSkill("Consume the Light")>>
<<elseif $character[1].Pact === "Soul">>
<<run State.variables.character[1].addSkill("Death Spyral")>>
<<run State.variables.character[1].addSkill("Reap")>>
<<elseif $character[1].Pact === "Blood">>
<<run State.variables.character[1].addSkill("Sanguine Armor")>>
<<run State.variables.character[1].addSkill("Bloodsurge")>>
<</if>>
<<elseif $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addTrait("Improved Summons")>>
<<elseif $character[1].Specialization === 'Bard'>>
<<run State.variables.character[1].addTrait("Legendary Performace")>>
<<elseif $character[1].Specialization === 'Cleric'>>
<<run State.variables.character[1].addTrait("Pious Devotion")>>
<<elseif $character[1].Specialization === 'Inquisitor'>>
<<run State.variables.character[1].addTrait("Blessed Flames")>>
<</if>>
<<case 12>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addSkill("Adrenaline Rush")>>
<<elseif $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addSkill("Arrow Barrage")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addTrait("Bon Mot")>>
<<elseif $character[1].Specialization === 'Juggernaut'>>
<<run State.variables.character[1].addTrait("Unending Vigor")>>
<<elseif $character[1].Specialization === 'Berserker'>>
<<run State.variables.character[1].addTrait("Unending Vigor")>>
<<elseif $character[1].Specialization === 'Feral'>>
<<run State.variables.character[1].addTrait("Unending Vigor")>>
<<elseif $character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Unending Vigor")>>
<<elseif $character[1].Specialization === 'Wizard'>>
<<run State.variables.character[1].addTrait("Intellect Empowerment")>>
<<elseif $character[1].Specialization === 'Spellblade'>>
<<run State.variables.character[1].addTrait("Eldritch Knight")>>
<<elseif $character[1].Specialization === 'Dancer'>>
<<run State.variables.character[1].addTrait("Winning Smile")>>
<<elseif $character[1].Specialization === 'Bard'>>
<<run State.variables.character[1].addTrait("Winning Smile")>>
<<elseif $character[1].Specialization === 'Scholar'>>
<<run State.variables.character[1].addTrait("Winning Smile")>>
<<elseif $character[1].Specialization === 'Barber Surgeon'>>
<<run State.variables.character[1].addTrait("Winning Smile")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<run State.variables.character[1].addTrait("Sacred Cause")>>
<<elseif $character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Divine Atonement")>>
<</if>>
<<case 13>>
<<if $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addTrait("Follow-up")>>
<<elseif $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addSkill("Lunging Stance")>>
<<elseif $character[1].Specialization === 'Assassin'>>
<<run State.variables.character[1].addSkill("Poisonous Bomb")>>
<<elseif $character[1].Specialization === 'Thief'>>
<<run State.variables.character[1].addTrait("Professional Robber")>>
<<elseif $character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Master Trapper")>>
<<elseif $character[1].Specialization === 'Juggernaut'>>
<<run State.variables.character[1].addTrait("Body Slam")>>
<<elseif $character[1].Specialization === 'Berserker'>>
<<run State.variables.character[1].addSkill("Feel The Pain")>>
<<elseif $character[1].Specialization === 'Inquisitor'>>
<<run State.variables.character[1].addTrait("Divine Blessing III")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<run State.variables.character[1].addTrait("Divine Blessing III")>>
<<elseif $character[1].Specialization === 'Cleric'>>
<<run State.variables.character[1].addTrait("Divine Blessing III")>>
<<elseif $character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Divine Blessing III")>>
<</if>>
<<case 14>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addTrait("Survivalist")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addSkill("Disengage")>>
<<elseif $character[1].Specialization === 'Spy'>>
<<run State.variables.character[1].addTrait("Secret Stash")>>
<<elseif $character[1].Specialization === 'Feral'>>
<<run State.variables.character[1].addTrait("Primal Fury")>>
<<elseif $character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Elemental Affinity IV")>>
<<run State.variables.character[1].addSkill("Tremors")>>
<<run State.variables.character[1].addSkill("Turn to Stone")>>
<<elseif $character[1].Specialization === 'Wizard'>>
<<run State.variables.character[1].addTrait("Overflow III")>>
<<elseif $character[1].Specialization === 'Warlock'>>
<<run State.variables.character[1].addTrait("Second Deal")>>
<<dialog "Second Deal">>
<p><<button "Soulless">><<set $character[1].secondPact = "Soul">>
<<run State.variables.character[1].addSkill("Soul Syphon")>>
<<run State.variables.character[1].addTrait("Masterful Necromancy")>>
<<closedialog>>
<</button>>
<<button "Bloodless">><<set $character[1].secondPact = "Blood">>
<<run State.variables.character[1].addSkill("Drain")>>
<<run State.variables.character[1].addTrait("Masterful Hemomancy")>>
<<closedialog>>
<</button>>
<<button "Shadowless">><<set $character[1].secondPact = "Shadow">>
<<run State.variables.character[1].addSkill("Shadow Bolt")>>
<<run State.variables.character[1].addTrait("Masterful Dark Magic")>>
<<closedialog>>
<</button>></p>
<</dialog>>
<<elseif $character[1].Specialization === 'Dancer'>>
<<run State.variables.character[1].addTrait("Tempo II")>>
<<elseif $character[1].Specialization === 'Barber Surgeon'>>
<<run State.variables.character[1].addTrait("Battle-Medic")>>
<</if>>
<<case 15>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addTrait("Second Wind")>>
<<elseif $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addTrait("Second Wind")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addTrait("Second Wind")>>
<<elseif $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addTrait("Second Wind")>>
<<elseif $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addTrait("Master Summonner")>>
<<elseif $character[1].Specialization === 'Scholar'>>
<<run State.variables.character[1].addTrait("Master")>>
<<elseif $character[1].Specialization === 'Spellblade'>>
<<run State.variables.character[1].addTrait("Runic Mastery")>>
<<elseif $character[1].Specialization === 'Cleric'>>
<<run State.variables.character[1].addTrait("True Calling")>>
<<if $character[1].God !== true>>
<<dialog "Choose your God">>
<p><<button "Urahyahra">> <<set $character[1].God= "HornedMaw">>
<<dialogclose>> <</button>>
<<button "Ellis">> <<set $character[1].God= "BlindingLight">><<dialogclose>><</button>>
<<button "She of Three Faces">> <<set $character[1].God= "DeathFateLuck">> <<dialogclose>><</button>>
<<button "Uldrum">> <<set $character[1].God= "WHiteSaviour">> <<dialogclose>><</button>><</p>
<</dialog>>
<</if>>
<<elseif $character[1].Specialization === 'Inquisitor'>>
<<run State.variables.character[1].addTrait("Fervent Zeal")>>
<<elseif $character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Zaelous Reckoning")>>
<</if>>
<<case 16>>
<<if $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addTrait("Dragon Piercing Arrows")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addTrait("Firm Hand")>>
<<elseif $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addTrait("Impossible Flurry")>>
<<elseif $character[1].Specialization === 'Assassin'>>
<<run State.variables.character[1].addTrait("Into the Shadows")>>
<<elseif $character[1].Specialization === 'Thief'>>
<<run State.variables.character[1].addTrait("Hoarder")>>
<<elseif $character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Hit-and-Run")>>
<<elseif $character[1].Specialization === 'Berserker'>>
<<run State.variables.character[1].addTrait("Unyelding")>>
<<elseif $character[1].Specialization === 'Shaman'>>
<<run State.variables.character[1].addTrait("Totem Carver")>>
<<elseif $character[1].Specialization === 'Bard'>>
<<run State.variables.character[1].addTrait("Triple Time")>>
<<elseif $character[1].Specialization === 'Scholar'>>
<<run State.variables.character[1].addTrait("Transcendance")>>
<<elseif $character[1].Specialization === 'Barber Surgeon'>>
<<run State.variables.character[1].addTrait("Improved Cirurgic Precision")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<run State.variables.character[1].addTrait("Embezoned Armaments")>>
<</if>>
<<case 17>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addTrait("Arcane Aegis")>>
<<elseif $character[1].Specialization === 'Spy'>>
<<run State.variables.character[1].addTrait("Hidden Machinations")>>
<<elseif $character[1].Specialization === 'Juggernaut'>>
<<run State.variables.character[1].addSkill("Sacrifice Armor")>>
<<elseif $character[1].Specialization === 'Feral'>>
<<run State.variables.character[1].addSkill("Rage")>>
<<elseif $character[1].Specialization === 'Warlock'>>
<<run State.variables.character[1].addTrait("Magic Drainer")>>
<<elseif $character[1].Specialization === 'Dancer'>>
<<run State.variables.character[1].addTrait("Rythimic Strike")>>
<</if>>
<<case 18>>
<<set $character[1].APregen += 1>>
<<case 19>>
<<if $character[1].Specialization === 'Archer'>>
<<run State.variables.character[1].addTrait("Headshot")>>
<<elseif $character[1].Specialization === 'Duelist'>>
<<run State.variables.character[1].addTrait("Masterful Efficiency")>
<<elseif $character[1].Specialization === 'Shredder'>>
<<run State.variables.character[1].addTrait("Stance Master")>
<<elseif $character[1].Specialization === 'Thief'>>
<<run State.variables.character[1].addTrait("Spell Thief")>
<<elseif $character[1].Specialization === 'Spy'>>
<<run State.variables.character[1].addTrait("Faceless Shadow")>>
<<elseif $character[1].Specialization === 'Wizard'>>
<<run State.variables.character[1].addTrait("Essence Renewal")>>
<<elseif $character[1].Specialization === 'Invoker'>>
<<run State.variables.character[1].addTrait("Masterful summon")>>
<<elseif $character[1].Specialization === 'Spellblade'>>
<<run State.variables.character[1].addTrait("Mage Slayer")>>
<<elseif $character[1].Specialization === 'Bard'>>
<<run State.variables.character[1].addTrait("Magnum Opus")>>
<<elseif $character[1].Specialization === 'Cleric'>>
<<run State.variables.character[1].addTrait("Holy Ardor")>>
<<elseif $character[1].Specialization === 'Flagellant'>>
<<run State.variables.character[1].addTrait("Martyrdom")>>
<</if>>
<<case 20>>
<<if $character[1].Specialization === 'Vanguard'>>
<<run State.variables.character[1].addTrait("Shield Wall")>>
<<elseif $character[1].Specialization === 'Assassin'>>
<<run State.variables.character[1].addTrait("Sure-Death")>>
<<elseif $character[1].Specialization === 'Trapper'>>
<<run State.variables.character[1].addTrait("Sniper Shot")>>
<<elseif $character[1].Specialization === 'Scholar'>>
<<run State.variables.character[1].addTrait("Ascension")>>
<<elseif $character[1].Specialization === 'Inquisitor'>>
<<run State.variables.character[1].addTrait("Fiery Cleansing")>>
<<elseif $character[1].Specialization === 'Paladin'>>
<<if $character[1].Oath === "Selfishness">>
<<run State.variables.character[1].addTrait("Champion of Selfishness")>>
<<elseif $character[1].Oath === "Conquest">>
<<run State.variables.character[1].addTrait("Champion of Conquest")>>
<<elseif $character[1].Oath === "Liberty">>
<<run State.variables.character[1].addTrait("Champion of Liberty")>>
<<elseif $character[1].Oath === "Justice">>
<<run State.variables.character[1].addTrait("Champion of Justice")>>
<</if>>
<</if>>
<</switch>>
<</silently>>
<div align='center'>
<p><<link "Return to the game">><<goto $return>><<set $inMenu to 0>>
<<run UIBar.unstow();>> <<run UIBar.show();>>
<<for _i = 0; _i < $character[1].level;_i++>>
<<set $character[1].MAXLIFE to 20>><<set $character[1].MAXMANA to 10>>
<<set _liferoll to window.rollDice('1d12')>> <<set _manaroll to window.rollDice('1d10')>>
<<if _liferoll < 6>><<set _liferoll = 6>><</if>>
<<if _manaroll < 5>><<set _manaroll = 5>><</if>>
<<set $character[1].MAXLIFE += _liferoll>>
<<set $character[1].MAXMANA += _manaroll>>
<</for>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].PER>>
<<set $character[1].MAXMANA += $character[1].INT + $character[1].PER>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<elseif $character[1].Ancestry === 'Herald' && $character[1].traits.includes("Nature's Blessing")>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].MAXMANA = Math.round(($character[1].MAXMANA / 2))>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].MAXMANA >>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<else>>
<<set $character[1].MAXLIFE += $character[1].RES>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<</if>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += $character[1].MAXMANA>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<</if>>
<<if $character[1].traits.includes("Ultimate Sacrifice")>>
<<set $character[1].MAXLIFE = Math.round(($character[1].MAXLIFE * 0.9))>>
<<set $character[1].currentLife = $character[1].MAXLIFE
<<set $character.additionalDamage += 2>>
<</if>>
<<if $character[1].traits.includes("Divine Grace")>>
<<set $character[1].statusEffects.grace += 1>>
<</if>>
<<if $character[1].traits.includes("Pious Resilience")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.25))>>
<</if>>
<<if $character[1].traits.includes("Martyrdom")>>
<<set $character[1].MAXLIFE *=2>>
<</if>>
<<if $character[1].traits.includes("Champion of Justice")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.5))>>
<</if>>
<</link>> | <<link "Return to your Character's Page">><<goto "Characterpage">>
<<run UIBar.unstow();>> <<run UIBar.show();>>
<<for _i = 0; _i < $character[1].level;_i++>>
<<set $character[1].MAXLIFE to 20>><<set $character[1].MAXMANA to 10>>
<<set _liferoll to window.rollDice('1d12')>> <<set _manaroll to window.rollDice('1d10')>>
<<if _liferoll < 6>><<set _liferoll = 6>><</if>>
<<if _manaroll < 5>><<set _manaroll = 5>><</if>>
<<set $character[1].MAXLIFE += _liferoll>>
<<set $character[1].MAXMANA += _manaroll>>
<</for>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].PER>>
<<set $character[1].MAXMANA += $character[1].INT + $character[1].PER>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<elseif $character[1].Ancestry === 'Herald' && $heraldChoice === "Nature">>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].MAXMANA = Math.round(($character[1].MAXMANA / 2))>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].MAXMANA >>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<else>>
<<set $character[1].MAXLIFE += $character[1].RES>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<</if>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += $character[1].MAXMANA>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<</if>>
<<if $character[1].traits.includes("Ultimate Sacrifice")>>
<<set $character[1].MAXLIFE = Math.round(($character[1].MAXLIFE * 0.9))>>
<<set $character[1].currentLife = $character[1].MAXLIFE
<<set $character.additionalDamage += 2>>
<<if $character[1].traits.includes("Divine Grace")>>
<<set $character[1].statusEffects.grace += 1>>
<</if>>
<<if $character[1].traits.includes("Pious Resilience")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.25))>>
<</if>>
<<if $character[1].traits.includes("Martyrdom")>>
<<set $character[1].MAXLIFE *=2>>
<</if>>
<<if $character[1].traits.includes("Champion of Justice")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.5))>>
<</if>>
<</link>></p>
<h2>Attributes:</h2>
You have <span id="current-avlb-attr"><<print $character[1].availableAttribute>></span> Points remaining.
<hr>
<table>
<tr>
<td> <abbr title="Affects hit chance for Melee weapons, as well as damage on Heavy or Versatile weapons.">STRENGTH:</abbr> </td>
<td> <abbr title="Affects hit chance for Melee weapons, as well as damage on Agile or Versatile weapons.">DEXTERITY:</abbr> </td>
<td> <abbr title="Affects only your Lifeblood (Life).">RESILIENCE:</abbr> </td>
<td> <abbr title="Mainly used for its expertises, it also affects your Essence (Mana) and the majority of abilities.">INTELLIGENCE:</abbr> </td>
<td> <abbr title="Mainly used for its expertise, it also affects some abilities.">CHARISMA:</abbr> </td>
<td> <abbr title="Affects hitchance for Ranged weapons, as well as some abilities.">PERCEPTION:</abbr> </td>
</tr>
<tr>
<td><span id="current-attr-STR"><<print $character[1].STR>></span> </td>
<td><span id="current-attr-DEX"><<print $character[1].DEX>></span></td>
<td><span id="current-attr-RES"><<print $character[1].RES>></span> </td>
<td><span id="current-attr-INT"><<print $character[1].INT>></span> </td>
<td><span id="current-attr-CHA"><<print $character[1].CHA>></span> </td>
<td><span id="current-attr-PER"><<print $character[1].PER>></span> </td>
</tr>
</table>
<hr>
<table>
<tr>
<td>
<<button "Increase Strength">>
<<if ($character[1].availableAttribute >= 1 && $character[1].STR < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].STR += 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Strength">>
<<if $character[1].STR > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].STR -= 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Dexterity">>
<<if ($character[1].availableAttribute >= 1 && $character[1].DEX < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].DEX += 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Dexterity">>
<<if $character[1].DEX > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].DEX -= 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Resilience">>
<<if ($character[1].availableAttribute >= 1 && $character[1].RES < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].RES += 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Resilience">>
<<if $character[1].RES > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].RES -= 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Intelligence">>
<<if ($character[1].availableAttribute >= 1 && $character[1].INT < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].INT += 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Intelligence">>
<<if $character[1].INT > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].INT -= 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Charisma">>
<<if ($character[1].availableAttribute >= 1 && $character[1].CHA < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].CHA += 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Charisma">>
<<if $character[1].CHA > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].CHA -= 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Perception">>
<<if ($character[1].availableAttribute >= 1 && $character[1].PER < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].PER += 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Perception">>
<<if $character[1].PER > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].PER -= 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
</table>
<h2>Expertises:</h2>
You have <span id="current-avlb-exp"><<print $character[1].availableExpertise>></span> Points remaining.
<hr>
<table>
<tr>
<td>Athletics:</td>
<td>Acrobatics:</td>
<td>Stealth: </td>
<td>Sleight of Hands:</td>
<td>World Knowledge:</td>
<td>Mystical Knowledge:</td>
</tr>
<tr>
<td><span id="current-expertise-Athletics"><<print $character[1].Athletics>></span></td>
<td><span id="current-expertise-Acrobatics"><<print $character[1].Acrobatics>></span></td>
<td><span id="current-expertise-Stealth"><<print $character[1].Stealth>></span ></td>
<td><span id="current-expertise-SleightofHands"><<print $character[1].SleightofHands>></span> </td>
<td><span id="current-expertise-WorldKnowledge"><<print $character[1].WorldKnowledge>></span> </td>
<td><span id="current-expertise-MysticalKnowledge"><<print $character[1].MysticalKnowledge>></span></td>
</tr>
<tr>
<td>Arcane Knowledge:</td>
<td>Speech:</td>
<td>Arts:</td>
<td>Intimidation:</td>
<td>Insight: </td>
<td>Awareness: </td>
</tr>
<tr>
<td><span id="current-expertise-ArcaneKnowledge"><<print $character[1].ArcaneKnowledge>></span></td>
<td><span id="current-expertise-Speech"><<print $character[1].Speech>></span></td>
<td><span id="current-expertise-Arts"><<print $character[1].Arts>></span></td>
<td><span id="current-expertise-Intimidation"><<print $character[1].Intimidation>></span></td>
<td><span id="current-expertise-Insight"><<print $character[1].Insight>></span></td>
<td><span id="current-expertise-Awareness"><<print $character[1].Awareness>></span></td>
</tr>
</table>
<hr>
<table>
<tr>
<td>
<<button "Increase Athletics">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Athletics < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Athletics += 1>>
<<replace "#current-expertise-Athletics">><<print $character[1].Athletics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Athletics">>
<<if $character[1].Athletics > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Athletics -= 1>>
<<replace "#current-expertise-Athletics">><<print $character[1].Athletics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Acrobatics">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Acrobatics < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Acrobatics += 1>>
<<replace "#current-expertise-Acrobatics">><<print $character[1].Acrobatics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Acrobatics">>
<<if $character[1].Acrobatics > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Acrobatics -= 1>>
<<replace "#current-expertise-Acrobatics">><<print $character[1].Acrobatics>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Stealth">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Stealth < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Stealth += 1>>
<<replace "#current-expertise-Stealth">><<print $character[1].Stealth>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Stealth">>
<<if $character[1].Stealth > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Stealth -= 1>>
<<replace "#current-expertise-Stealth">><<print $character[1].Stealth>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Sleight of Hands">>
<<if ($character[1].availableExpertise >= 1 && $character[1].SleightofHands < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].SleightofHands += 1>>
<<replace "#current-expertise-SleightofHands">><<print $character[1].SleightofHands>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Sleight of Hands">>
<<if $character[1].SleightofHands > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].SleightofHands -= 1>>
<<replace "#current-expertise-SleightofHands">><<print $character[1].SleightofHands>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase World Knowledge">>
<<if ($character[1].availableExpertise >= 1 && $character[1].WorldKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].WorldKnowledge += 1>>
<<replace "#current-expertise-WorldKnowledge">><<print $character[1].WorldKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease World Knowledge">>
<<if $character[1].WorldKnowledge > 1 >>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].WorldKnowledge -= 1>>
<<replace "#current-expertise-WorldKnowledge">><<print $character[1].WorldKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Mystical Knowledge">>
<<if ($character[1].availableExpertise >= 1 && $character[1].MysticalKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].MysticalKnowledge += 1>>
<<replace "#current-expertise-MysticalKnowledge">><<print $character[1].MysticalKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Mystical Knowledge">>
<<if $character[1].MysticalKnowledge > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].MysticalKnowledge -= 1>>
<<replace "#current-expertise-MysticalKnowledge">><<print $character[1].MysticalKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Arcane Knowledge">>
<<if ($character[1].availableExpertise >= 1 && $character[1].ArcaneKnowledge < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].ArcaneKnowledge += 1>>
<<replace "#current-expertise-ArcaneKnowledge">><<print $character[1].ArcaneKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Arcane Knowledge">>
<<if $character[1].ArcaneKnowledge > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].ArcaneKnowledge -= 1>>
<<replace "#current-expertise-ArcaneKnowledge">><<print $character[1].ArcaneKnowledge>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Speech">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Speech < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Speech += 1>>
<<replace "#current-expertise-Speech">><<print $character[1].Speech>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Speech">>
<<if $character[1].Speech > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Speech -= 1>>
<<replace "#current-expertise-Speech">><<print $character[1].Speech>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Arts">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Arts < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Arts += 1>>
<<replace "#current-expertise-Arts">><<print $character[1].Arts>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Arts">>
<<if $character[1].Speech > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Arts -= 1>>
<<replace "#current-expertise-Arts">><<print $character[1].Arts>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<!-- Repeat the above structure for other expertise -->
<tr>
<td>
<<button "Increase Intimidation">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Intimidation < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Intimidation += 1>>
<<replace "#current-expertise-Intimidation">><<print $character[1].Intimidation>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Intimidation">>
<<if $character[1].Intimidation > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Intimidation -= 1>>
<<replace "#current-expertise-Intimidation">><<print $character[1].Intimidation>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<!-- Repeat the above structure for other expertise -->
<tr>
<td>
<<button "Increase Insight">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Insight < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Insight += 1>>
<<replace "#current-expertise-Insight">><<print $character[1].Insight>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Insight">>
<<if $character[1].Insight > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Insight -= 1>>
<<replace "#current-expertise-Insight">><<print $character[1].Insight>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Awareness">>
<<if ($character[1].availableExpertise >= 1 && $character[1].Awareness < 20)>>
<<set $character[1].availableExpertise -= 1>>
<<set $character[1].Awareness += 1>>
<<replace "#current-expertise-Awareness">><<print $character[1].Awareness>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Awareness">>
<<if $character[1].Awareness > 1>>
<<set $character[1].availableExpertise += 1>>
<<set $character[1].Awareness -= 1>>
<<replace "#current-expertise-Awareness">><<print $character[1].Awareness>><</replace>>
<<replace "#current-avlb-exp">><<print $character[1].availableExpertise>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
</table>
<<if $character[1].experience >= $xpToLevelUp>>
<p><<link "Continue Level up">><<run window.levelCharUp()>><</link>>
</p>
<</if>>
<p><<link "Return to the game">><<goto $return>><<set $inMenu to 0>>
<<run UIBar.unstow();>> <<run UIBar.show();>>
<<for _i = 0; _i < $character[1].level;_i++>>
<<set $character[1].MAXLIFE to 20>><<set $character[1].MAXMANA to 10>>
<<set _liferoll to window.rollDice('1d12')>> <<set _manaroll to window.rollDice('1d10')>>
<<if _liferoll < 6>><<set _liferoll = 6>><</if>>
<<if _manaroll < 5>><<set _manaroll = 5>><</if>>
<<set $character[1].MAXLIFE += _liferoll>>
<<set $character[1].MAXMANA += _manaroll>>
<</for>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].PER>>
<<set $character[1].MAXMANA += $character[1].INT + $character[1].PER>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<elseif $character[1].Ancestry === 'Herald' && $character[1].traits.includes("Nature's Blessing")>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].MAXMANA = Math.round(($character[1].MAXMANA / 2))>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].MAXMANA >>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<else>>
<<set $character[1].MAXLIFE += $character[1].RES>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<</if>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += $character[1].MAXMANA>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<</if>>
<<if $character[1].traits.includes("Ultimate Sacrifice")>>
<<set $character[1].MAXLIFE = Math.round(($character[1].MAXLIFE * 0.9))>>
<<set $character[1].currentLife = $character[1].MAXLIFE
<<set $character.additionalDamage += 2>>
<</if>>
<<if $character[1].traits.includes("Divine Grace")>>
<<set $character[1].statusEffects.grace += 1>>
<</if>>
<<if $character[1].traits.includes("Pious Resilience")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.25))>>
<</if>>
<<if $character[1].traits.includes("Martyrdom")>>
<<set $character[1].MAXLIFE *=2>>
<</if>>
<<if $character[1].traits.includes("Champion of Justice")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.5))>>
<</if>>
<</link>> | <<link "Return to your Character's Page">><<goto "Characterpage">>
<<run UIBar.unstow();>> <<run UIBar.show();>>
<<for _i = 0; _i < $character[1].level;_i++>>
<<set $character[1].MAXLIFE to 20>><<set $character[1].MAXMANA to 10>>
<<set _liferoll to window.rollDice('1d12')>> <<set _manaroll to window.rollDice('1d10')>>
<<if _liferoll < 6>><<set _liferoll = 6>><</if>>
<<if _manaroll < 5>><<set _manaroll = 5>><</if>>
<<set $character[1].MAXLIFE += _liferoll>>
<<set $character[1].MAXMANA += _manaroll>>
<</for>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].PER>>
<<set $character[1].MAXMANA += $character[1].INT + $character[1].PER>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<elseif $character[1].Ancestry === 'Herald' && $heraldChoice === "Nature">>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].MAXMANA = Math.round(($character[1].MAXMANA / 2))>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].MAXMANA >>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<else>>
<<set $character[1].MAXLIFE += $character[1].RES>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<</if>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += $character[1].MAXMANA>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<</if>>
<<if $character[1].traits.includes("Ultimate Sacrifice")>>
<<set $character[1].MAXLIFE = Math.round(($character[1].MAXLIFE * 0.9))>>
<<set $character[1].currentLife = $character[1].MAXLIFE
<<set $character.additionalDamage += 2>>
<<if $character[1].traits.includes("Divine Grace")>>
<<set $character[1].statusEffects.grace += 1>>
<</if>>
<<if $character[1].traits.includes("Pious Resilience")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.25))>>
<</if>>
<<if $character[1].traits.includes("Martyrdom")>>
<<set $character[1].MAXLIFE *=2>>
<</if>>
<<if $character[1].traits.includes("Champion of Justice")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.5))>>
<</if>>
<</link>></p>
</div>
You both walk under the heavy cloak of dusk, your eyes fixed on their silhouette ahead, as his eyes focus on the ground, trying, but failing, to have some balance. Maybe he shouldn't have drank that much... But thanks to that, his movements are slower, allowing you to sneak behind him.
You two have walked a fair bit.
But it seems that the man has a lot of ground to cover. It bears no end to the constant act of putting one foot in front of the other. And step, tread, pace, whatever more variations there are, you keep doing it, and you are tired of it already.
You two have been careful how you step in each twig or leave so far, trying to make the softest sound possible, trying not to gain the attention of some night predator... you never know when a beast is hungry... But, like every occasion, a break to the status quo has to occur. In this case, you step too harshly on a fallen branch, and the sweet and ecstatic sound of a *CRUNCH* echoes through the woods.
Startled like a deer, he looks back, and as luck's middle finger to you, he looks directly at your direction.<br>
<<if $character[1].Ancestry === "Elf">>
But thankfully, all he perceives are trees. You should thank the man for drinking too much the next time you two meet. If you don't end up killing each other first...
The both of you move on, this time more hastily, more paranoic, getting closer and closer... to a stone structure... a fort! Ah, a hideout...
The structure is small but old, ravaged by time alone. It's impressive it remains standing in the conditions it is in. But, together with the moss and vines, it allows it to blend in with the surroundings. Maybe, if some of the torchlights weren't lit, you would miss it.
You could try to explore the fortification...
But without knowing how many there are inside? It would be a terrible idea...
But a job is a job...
<<link "History is made by the brave or the fool!">>
<<goto "End of Entrance">>
<</link>>
[[Leave it for another day..|Village Center][$event.chapter1.banditproblem = "VargusSurvivor", $event.chapter1.banditHideout to "visited"]]
<<else>>
<<test Stealth 10>> <i> = Stealth </i>
<<onSuccess>>
His eyes scanning the dark forest, between each tree, for each possible shape that seems to not fit right with the place. But all that he sees is the pitch black of night. "She of the Three Faces" was merciful tonight and only gave you a warning.
The both of you move on, this time more hastily, more paranoic, getting closer and closer... to a stone structure... a fort! Ah, a hideout...
The structure is small but old, ravaged by time alone. It's impressive it remains standing in the conditions it is in. But, together with the moss and vines, it allows it to blend in with the surroundings. Maybe, if some of the torchlights weren't lit, you would miss it.
You could try to explore the fortification...
But without knowing how many there are inside? It would be a terrible idea...
But a job is a job...
<<link "History is made by the brave or the fool!">>
<<goto "Entrance">>
<</link>>
[[Leave it for another day.|Village Center][$event.chapter1.banditproblem = "VargusSurvivor", $event.chapter1.banditHideout to "visited"]]
<<onFailure>> <i> = Stealth </i>
And oh... he sees you.
Still, seemingly possessed by the animal's spirit, he starts to sprint, zig-zagging, from left to right with the hope that its predator, you, loses sight of him... a conflict that lasts for less than a minute. With him as the victorious front.
You could still try to remake your steps and look for hints he might have left with the chase, but it would take time...
<span id="test3">[[Give up.|Village Center][$event.chapter1.banditproblem = "VargusSurvivor"]] | <<link "Re-do your steps">><<replace"#test2">>
<<fadein 200ms 2s>> . <<fadein 200ms 4s>> . <<fadein 200ms 6s>> . <</fadein>><</fadein>><</fadein>>
<<fadein 200ms 7s>>
<<test WorldKnowledge 8>>
<<onSuccess>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
<br>
At last, you managed to deduce where the ruffian was headed to...
It was a decayed fortress, very well hidden from any prying eye.
You could try to explore the fortification...
But without knowing how many there are inside? It would be a terrible idea...
But a job is a job...
<<link "History is made by the brave or the fool!">>
<<goto "Entrance">>
<</link>>
[[Leave it for another day.|Village Center][$event.chapter1.banditproblem = "VargusSurvivor", $event.chapter1.banditHideout to "visited"]]
<br>
<<include "Intel2">>
<<onFailure>>
Shit...
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
[[Give up.|Village Center][$event.chapter1.banditproblem = "VargusSurvivor"]]
<</test>>
<</fadein>>
<</replace>><</link>></span>
<</test>>
<</if>><div align="center">
<<if $language is "EN">> <p> [[Inventory]] | [[Character Page|Characterpage]]</p> <<elseif $language is "PT-BR">> <p> [[Inventário|Inventory]] | [[Página do Personagem|Characterpage]]</p><</if>>
<hr>
|<h2> Jornal: </h2>|
<<link "Red my Origin again">>
<<replace "#origntext">>
<<if $character[1].Origin === "Escapee">>
"You've managed to scrape away from the gripping claws of draconian slavery, although you owe your newfound freedom to the odd decision of a guard who chose to rest at the most convenient time for you. But who's complaining? Not you, perhaps the other slaves who did not get the memo? But who cares about their opinion, anyway?
In the bizarre minds of those reptiles, you're practically a free soul in the world now – well, at least until you cross paths with one of those Scalebound fanatics, but at least those are as rare as common sense. To most draconians, it does not matter from whence you came; if you are not working as a slave, then you aren't one.
But let's not downplay the years you've toiled away crafting the Draconians' weapons, structures, and designs. And let's not forget those nights of catering to the whims of the demanding draconian ladies, an experience far less enjoyable than one might initially imagine.
Nevertheless, you've survived – or more accurately, parts of you have survived, bearing the marks of harsh cuts and bites as badges of resilience. What's left doesn't have the slightest intention of taking a leisurely rest right now. No, it yearns for restitution, for the stolen moments and wasted years to return with interest.
Sadly, true freedom doesn't come cheap, especially when your coin purse is lighter than a cloud, and the only ones willing to employ a former slave are the rebellion groups who risk themselves to free other slaves. You're going to spoil your hands, tackling the oddest jobs and questionable tasks, to slowly and certainly fallible, produce a reputation as a mercenary who answers to no one but themselves."
<<elseif $character[1].Origin === "Free-human">>
You've seen it all slip away, haven't you? The palaces, the gleaming gold, the finest clothing money could buy, and a line of lovers that would make any court poet envious – all gone. A single disastrous wager, a treacherous 'associate' who turned out to be a viper in disguise – that's the tale of your riches-to-rags plunge. But then again, that's life in the Great Desert of Havar. A place where slaves can ascend to nobility while nobles plummet into servitude in the blink of an eye. It's what they mean when they say, 'You reap what you sow.'
Sure, you might've engaged in some morally questionable endeavors to amass that obscene wealth back in the day, but it's different, right? Back then, you were on the winning side, not playing the part of the dupe, but that's how it sadly works in the golden cities; only those with gold are considered citizens.
Gold, and gold alone, speaks as the hammer of justice. No law protects someone from unfair deals or theft. No bribe is enough to secure someone's wealth. Even for the chance of work, one has to pay a hefty price. Thus, many have fallen into a treacherous and unending cycle of debt and semi-slavery. Others are sold as slaves in markets and caravans for and by Draconian tourists, a profitable and despicable practice that rends piles of Draconian coins.
Alas, it's all behind you now. The past is a distant mirage, fading with every step you take, retreating like a cowardly cur. You had to abandon your opulent abode, or else you'd be consigned to the same fate as those other poor saps – a life of backbreaking labor and subservience. So here you are, traversing the Grasslands amidst Draconians, Elves, and fellow humans who, unlike you, never had the privilege of tasting life's finer fruits and instead languished as perpetual thralls.
<<elseif $character[1].Origin === "Free-Liberated">>
Like countless others before you and doubtlessly countless more to come, you were nothing more than a human slave, or at least until recently. By some twisted stroke of luck, you found yourself among the double-digit number of slaves granted a semblance of freedom. The reasons behind your newfound liberty matter little to you; you are thankful to be no longer within the cruel grasp of Ulgarosh Citadel (Uhl-gah-roash), the very heart of the draconian empire, a testament to the hundreds of thousands of slaves whose blood and sweat had soaked into the stones over centuries, their spirits crushed beneath the draconian overlords' rule.
But behind those stone-cold walls, your brother remains trapped alongside those reptilian monsters. Your existence as a slave, while undoubtedly unbearable, was not as agonizing as it had been in the last month. You both served primarily as cookers in the household of a minor draconian family—though using the term 'family' felt foreign, given the draconians' peculiar concept of familial bonds. They traded partners with every gestation. As soon as the offspring were born, they were to be trained by their biological fathers to hunt and fight. After years of this harsh education, they returned to their mothers to learn their tongue and history, and, above all, they were taught reverence for the dragons. Only then were these draconian children granted a semblance of freedom. An irony that was not lost; the draconians valued their offspring's liberty while ruthlessly enslaving yours. But such musings mattered little in the grand scheme of your existence. The truth was, they fed you. You had time to rest and mend from wounds and diseases. You even had your own house within those walls, although it was far from the comfort the draconians enjoyed. A part of you yearned for the familiar weight of chains, the perverse sense of stability it offered. But another part, a defiant part, yearned for dignity—for you and your brother.
You couldn't stand the thought of him remaining captive for any moment longer. Whispers among the slaves spoke of northern human lands engaging in the commerce of slaves. Horrendous as it is, perhaps, if you could amass enough coins, you might secure your brother's freedom, wrenching him from the clutches of the draconians. In the vast expanse of your determination, the spark of hope flickered, dim yet unyielding, lighting the path to your uncertain future.
<<elseif $character[1].Origin === "Sick">>
Sometimes...Sometimes, when you squeeze your eyelids shut, closing your senses of the world, you can feel it moving.
Slithering through your phloems, worming its way deep within you, that vile imprint burrowing, forming a nest within you, a mark into the very core of your wood-flesh to brand you as the new abomination, a child of the dark goddess Urahyahra, "The Horned maw"; "The mother of monsters" as the mortals call her.
You can feel the hunger within you. The lust that suggests, no, demands you to quench your thirst with blood, feed your hunger with flesh and bones, and force yourself to spread your "gift" with others.
The call to purge the weak;
The urge to change, to evolve, and to be more. So much more.
It's like a necessity, an instinct that somehow was always inside you, hidden in some locked chamber, that slowly, day by day, consumes your being.
But you have to be stronger.
You cannot allow her to have another twisted child.
The thought of your starting to delve into those desires terrifies you. That "thing" is not the being you desire to be; that "gift" is not a gift at all. It's a curse, a twisted view of nature that grows at the same rate as it devours itself whole. It's madness.
No wonder your "serie'rey" shunned you, or as in human terms, your "family"-although that term does not entirely grasp the complexity of your connection... You were more than kin; the three of you, carved from the same roots, fed by the same soil, and your minds and feelings entwined as one, it was harmonic.
But when the dark mother decided to play favorites, they were forced to serve you from that harmony to save themselves from the disease you now carry in your thoughts. But you are lost without them. They made you whole. But you cannot put them in danger of sharing such fate. No, no one deserves this.
You ran away, as far as you could from them;
But it's merely a matter of time before her influence condemns you to become a bannermen of her twisted visage, propagating her cycle of unending violence as spores of a mutated carnivorous plant that seeks proliferation at all moments. That's why you must resist her as long as you can. Her design is cunning, a cascading effect of unending chaos.
She may be a goddess, but some once stood toe to toe with her before the dragon's birth. Perhaps they have a cure.
There must be one.
<<elseif $character[1].Origin === "Curious mind">>
<<elseif $character[1].Origin === "Searching for a cure">>
<<elseif $character[1].Origin === "Without home">>
<<elseif $character[1].Origin === "Called">>
<<elseif $character[1].Origin === "Overworld Scout">>
<<elseif $character[1].Origin === "Hired for a job">>
<<elseif $character[1].Origin === "Banished">>
"Honor.
What does that damned word even mean?
You had "honor" once when you were nothing more than a lapdog for your matron when you beat some sense into those who did not follow her orders.
When she told you to sit, you'd sit;
When she told you to bark, you'd bark;
When she told you to kill, you'd kill;
Fuck "honor". Fuck that bitch, she got what she deserved, a knife on her throat. But that is not what the other dwarves saw, no. They only saw a "liability" as a son who committed matricide. Fuck them too.
At least it was fast.
The trial had no delay settled in a single day. The court dictated you were guilty, not even allowing you to have a lawyer or being able to present your case, no, just the punishments; you'd be marked as an outcast and sent to the overworld to never put a foot again inside the undercities. And, of course, it meant that they would strip you of anything that marked you as a Dwarf: your belongings, heritage, and even your beard.
Now, you are alone in a world you have no fucking clue how it works, no one to help or give a fuck for you.
You are fucked..."
<<elseif $character[1].Origin === "Immature">>
"Among the myriad rites and ceremonies overseen by the Draconians, none holds greater significance to them than the Vhrak'Eksh – their ritual of maturity, the ceremony that separates a child from an adult. Every decade, Draconians dispatch their offspring to test their mettle by surviving alone beyond the impregnable walls of their citadel, a stone-cold structure etched by the toil of human slaves. More than a hundred of these fledglings embark on this rite, aiming to prove the resilience and strength of their kind. However, the truth remains shrouded beneath the myth, and only a handful, scarcely a dozen, return to their father's and mother's embraces.
The common conception of Draconians perpetuates the image of perfect-born warriors, with skin and scales rivaling any armor crafted by men, boasting fangs and claws capable of cutting through metal. But reality starkly contrasts these exaggerated ideals. The public sees only the exceptional ones – those with the most enduring scales, the sharpest claws, and the strongest of their generation. The rest, the weak, the diseased, and the crippled? All become offerings to satiate the insatiable appetite of the monsters and beasts that roam the untamed lands beyond their citadel's protection.
For weakness is anathema to Draconians, a trait reserved only for other races. Only the strong are allowed to live in Draconians cities. It's a sad truth that burdens you all too intimately, for once, you were among those audacious youths. Once, you believed in these old lies, adorned the cloak of foolishness that your kind often wears. But no longer shall you heed the ritual's call to return to those forsaken cities or embrace the hypocrisy of your kind. The decree of insanity shall not bind you.
Now, as you stand apart from the dogma of your kin, a sense of purpose arises, a rebellion against the established norms, the skies seem broader, the lands untamed beckoning with whispers of freedom and truth. You forge your path, resolute in your decision to defy the confines of tradition and seek a destiny beyond the dictates of Draconian society."
<<elseif $character[1].Origin === "Ex-Scalebound">>
<<elseif $character[1].Origin === "Survivor">>
<<elseif $character[1].Origin === "Prey">>
<</if>>
<<link "Close">>
<<replace "#origntext">>
<</replace>>
<</link>>
<</replace>>
<</link>>
<span id="origntext"></span>
<<silently>>
<<if $event.chapter1.initBandits !== undefined>>
Just hours before I reached the unnamed village, I met two bandits on the road, an old and hairless man and another, younger but far uglier, that had its face covered in some brownish substance.
<<if $event.chapter1.initBandits === "dead">>
I dealt with them on the spot. They won't bother anyone anymore.
<<elseif $event.chapter1.initBandits === "DeceiveResolution">>
I managed to trick them into believing I was some "old friend" of theirs. Hope it pays off in the future, but for now, it allowed me to live another day.
<<elseif $event.chapter1.initBandits === "IntimidationResolution">>
They understood I was not in the mood to get robbed.
<<elseif $event.chapter1.initBandits === "DiplomacyResolution">>
I convinced them not to kill me but had to pry myself off some of my coins; not off to a great start if I say so myself.
<</if>>
<</if>>
<</silently>>
</div><<set $event.chapter1.lastplace === "The main room">>
<<if visited() === 2>>
<<if $event.chapter1.banditraid !== "raided">><<set $event.chapter1.banditraid to "stopped">><</if>>
<<if $banditnumbers > 0>>
With the leader dead, you will have to now decide what to do if the remaining bandits.
As a token of your deed, you rip the leader's head off their bodies, this will proove useful to deal with them.
<<else>>
WIth the leader and the whole group dead - which by the way, congratulations, you can now return to the village to collect your just reward.
As a proof of your deed, you rip the leader's head off their bodies.
<</if>>
<<if $event.chapter1.key is true>>
<</if>>
<<if $event.chapter1.surprise is true>> You can go back trought the [[secret tunnels|Fortress Secret Tunnels]]
<</if>>
<<elseif visited() === 1>>
<<if $event.chapter1.surprise is true>>
Surging from his rear, you meet a fat man sitting on a chair much akin to a throne.
He looks to the doors to the hall astonished.
<<battle banditLeader 1>><</battle>>
<b><<print $npc.banditleader1.Name>>:</b> What? How did you...?
He is loud.
If he keep being this loud, there will be brought unwanted attention to this room. <p>Well, far sooner than expects
It's best for you to <<link "don't even given him the moment.">>
<<goto "Combatpage">>
<<set $npc.banditleader1.alive to false>>
<<set $whosturn to "player">>
<</link>> but... you can also <<linkreplace "talk with him.">><<set _time to 1>>
<b><<print $npc.banditleader1.Name>></b>: How did you even entered here?
<b><<print $character[1].Name>></b>: Does that really matter? Besides, it's best for you to be quiet.
<b><<print $npc.banditleader1.Name>></b>: Grr! What do you want?!
<<linkreplace "How much for you and the others to get out of this lands?">>
<b><<print $character[1].Name>></b>: How much for you and the others to get out of this lands?
<b><<print $npc.banditleader1.Name>></b>: Leave? HAH! You've come to this place, killed some of my men and now you want us to kindly leave? Don't fuck with me!
<b><<print $character[1].Name>></b>: Not even for <span id="that"<<numberbox "_offer" 50>></span> <<linkappend "pieces?">> <<replace "#that">><</replace>><br><<set _offer to 0>> <<set _banditAwareness = 6>><<set _roll = rollDice('1d20')>>
<<include "offering">>
<</linkappend>>
<</linkreplace>>
<</linkreplace>>
<</link>></p>
<<else>>
<<battle banditLeader 1>><</battle>>
<<if $event.chapter1.bandits < 3>> <<battle Ruffian $event.chapter1.bandits>><</battle>>
<<else>> <<battle Ruffian 2>><</battle>> <</if>>
As you enter the room, you are greeted with a man sitting in a wooden chair, tall enough to look like a throne. He smirks at you, and grabs his flail.
<b><<print $npc.banditleader1.Name>>:</b> Well, well, well, looks like we have an little bug meddling in our business. Boys, why don't we show him what we do with vermin like ?him ?
Before you even notice, there are two Ruffians behind you.
<<link "Shit!">>
<<set $npc.banditleader1.alive to false>>
<<goto "Combatpage">>
<<set $whosturn to "ambush">>
<</link>>
<</if>>
<</if>><style>
.battle-log {
display: none;
}
</style>
<<if $character[1].inventory.includes($Items.Lamp)>><<set $event.chapter1.cansee to true>><<elseif $character[1].ancestry === "Dwarf" || $character[1].ancestry === "Vanadi">><<set $event.chapter1.cansee to true>><<else>><<set $event.chapter1.cansee to false>><</if>>
<<if visited() < 2>>
<<set $event.chapter1.bandits to 48>><<if $event.chapter1.banditraid is "raided">> <<set $event.chapter1.bandits -= 14>><</if>>
<<set $event.chapter1.key to false>>
<<set $event.chapter1.entranceguard to true>>
You pass through the gateless walls and hide yourself behind some open crates. The courtyard is smaller than you would've first thought. Protecting the main door lies a brick wall of a human, tall and bald, like what one would imagine a thug or bodyguard to look like. His face is being covered by a mask, perhaps to hide an ugly scar, a ridiculous mustache, or a pair of kissable lips that disrupts the intimidating factor.
<span id="hallsoutside">
<<if $character[1].Stealth > 3>>
You could try to find another entrance to the innards of the remains of this building without the man noticing.
<<link "Sneak inside">>
<<replace "#hallsoutside">>
<<test Stealth 10>>
<<onSuccess>>
You carefully observe the guard's movements, waiting for the perfect moment to slip past him unnoticed. As he turns his back, you silently make your way to a lateral entrance.
<<test Awareness 8>>
<<onSuccess>>
Scanning your surroundings for any signs of danger you were able to spot some hidden traps, it seems they are were desing to ring bells when a the tripwire is triggered, thanks to your focus, you avoid them with ease,.
<<onFailure>>
While you were too much focused on your stealthy approach, you failed to notice a tripwire hidden in the shadows. As you step on it, bells ring, alerting the guard and other bandits of your presence.
<<link "Oh no!">>
<<set $event.chapter1.bargedin to true>>
<<battle "hiredMuscle" 1>><</battle>>
<<set $whosturn to "ambush">>
<<set $return to passage()>>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<</test>>
<<onFailure>>
The man takes notice of your attempt at skulduggery.
For your poor attempt, he decides to charge at you.
<<link "Oh no!">>
<<battle "hiredMuscle" 1>><</battle>>
<<set $whosturn to "ambush">>
<<set $return to passage()>>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<</test>>
<</replace>>
<</link>>
<</if>>
You could always just try to barge your way inside a guarded building.
<<if $character[1].equipment.mainhand.Type.includes("melee")>>
<<link "Make your way inside">><<set $event.chapter1.bargedin to true>>
<<replace "#hallsoutside">>
<<battle "HiredMuscle" 1>><</battle>>
<<set _charging to random(1, 12) + $character[1].DEX>>
<<set _guard to random(1, 12) + $enemyInstances[0].DEX>>
<<if _charging > _guard>>
You charge against the human,
<<link "He is surprised, take advantage!">>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<<else>>
You charge against the human, but before you even reach, he places his foot in your belly, knocking you off of your imprudent act. Following up the act, he takes his proportionally-sized axe.
<<link "Prepare yourself for battle!">>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<</if>>
<</replace>>
<</link>>
<<elseif $character[1].equipment.mainhand.Type.includes("ranged")>>
<<link "Try to kill him, right here">>
<<battle "HiredMuscle" 1>><</battle>>
<<set _character to State.variables.character[1]>>
<<set _enemy to State.variables.enemyInstances[0]>>
<<set _mainhand to _character.equipment.mainhand>>
<<set _hit to window.calculateHitChance(_character, _enemy, _mainhand)>>
<<replace "#hallsoutside">>
<<if _hit>>
<<set _damage to window.calculateDamage(_character, _enemy, _mainhand)>>
<<set _enemy.currentLife -= _damage>>
<<if _enemy.currentLife <= 0>>
<<set $event.chapter1.entranceguard to false>>
<i>You hit him for _damage.</i>
You watch as the loose arrow finds a nest in the guard's throat, silencing him for the few remaining minutes until he loses enough blood.
<span id="text1">
<<link "Loot the body?">>
<<addItem "Great Axe">><</addItem>>
<<addItem "Mask">><</addItem>>
<<addItem "Leather armor">><</addItem>>
<<replace "#text1">>
You looted a dead body's clothes and weapon, just like a maniac. You must be really proud of yourself for that.
<<link "Now you can go on.">>
<<set $event.chapter1.bargedIn to true>>
<<goto "Halls">>
<</link>>
<</replace>>
<</link>>
<<link "Just move on">>
<<set $event.chapter1.bargedIn to true>>
<<goto "Halls">>
<</link>>
<<else>>
<i>You hit him for _damage.</i>
You hit him. Although not with a fatal strike, now that he knows of your presence, combat is imminent...
<<link "He comes at you">>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<</if>>
<<else>>
You miss him?! And worse, he now knows of you. There is no time to prepare yourself, shit!
<<link "He comes at you">>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<</if>>
<</replace>>
<</link>>
<</if>>
You could try to fool him... you know what they say about big muscled people... not very bright.
<<link "Try to fool him">>
<<replace "#hallsoutside">>
<<if $event.chapter1.initBandits = "DeceiveResolution">>
As you approach the man, he does the same, but with a far more aggressive demeanor on his face... or at least the part of his face which is not covered by the mask...
<b>Big Man:</b> Turn around, here is nothing to be seen here.
<b><<print character[1].name + " (Renny)">>:</b> Hey, bud, good to see you again!
<b>Big Man:</b> Really? Do you think I'm an idiot?
Well... that's how long this running gag could go on...
<<link "He grabs his weapon and charges upon you.">>
<<battle "hiredMuscle" 1>><</battle>>
<<set $whosturn to "ambush">>
<<set $return to passage()>>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<<else>>
(Here you have to guess a password)
<<if $character[1].WorldKnowledge > 11>>
<<set $character[1].gold -= 1>>
<</if>>
<</if>>
<</replace>>
<</link>>
Or, you could return another day. Is not like this place would move away.
<<link "Return another day">>
<<set $event.chapter1.banditHideout to "visited">>
<<goto "Village Center">>
<</link>>
</span>
<<elseif $event.chapter1.entranceguard is false && $event.chapter1.entranceguardbody !== "looted">>
<span id="text1">
<<link "Loot the body?">>
<<set $event.chapter1.entranceguardbody to "looted">>
<<addItem "Great Axe">><</addItem>>
<<addItem "Mask">><</addItem>>
<<addItem "Leather armor">><</addItem>>
<<replace "#hallsoutside">>
<<replace "#text1">>
You looted a dead body's clothes and weapon, just like a maniac. You must be really proud of yourself for that.
<<link "Now you can go on.">>
<<set $event.chapter1.bargedIn to true>>
<<goto "Halls">>
<</link>>
<</replace>>
<</link>>
<<link "Just move on">>
<<set $event.chapter1.bargedIn to true>>
<<goto "Halls">>
<</link>>
</span>
<<elseif visited() > 1 && $event.chapter1.entranceguard is true>>
Ah, yes, there was a guy guarding the door...
<<link "Oh well...">>
<<battle "hiredMuscle" 1>><</battle>>
<<set $whosturn to "ambush">>
<<set $return to passage()>>
<<goto "Combatpage">>
<<set $event.chapter1.entranceguard to false>>
<</link>>
<<elseif $event.chapter1.entranceguard is false && $event.chapter1.entranceguardbody === "looted">>
There is only a body outside of the entrance.
[[Return to the village|Village Center]]
[[Halls]]
<<else if $event.chapter1.entranceguard is true && $event.chapter1.banditLeaderOffer.active is true>>
<b>Guard</b> ...
<b><<print $character[1].Name>></b>: ...
[[Return to the village|Village Center]]
[[Halls]]
<</if>>
<div id="battle-log"></div><<set $event.chapter1.lastplace to passage()>>
<<if visited() < 2>>
<<else>>
Where to go next?
<<include "DungeonTransition">>
<<</if>><<set $event.chapter1.lastplace to passage()>>
<<if $event.chapter1.haha !== true>>
Hm... it's an empty room... maybe there is a hidden secret?
<<test Awareness 8>>
<<onSucess>>
<<set $event.chapter1.haha to true>>
Nope, it was just a waste of time...
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
<<onFailure>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
You could not find anything... Perhaps if you try again you might find something?
<<include "anotherendless">>
<</test>>
<<else>>
You already explored this room....
<</if>>
[[Go back||DungeonTransition]]<<set $event.chapter1.lastplace to passage()>><<if visited(Armory) <2>> If If this fort was once a great bastion, this room does not remember of those times. It is covered in dust and cobwebs, with most of the brigand "equipment" and some broken shelves left on the ground, worse is the smell of piss and rum, which entwines to burn your nostrils. Hopefully, there is something useful amidst this mess. fort was once a great bastion, this room does not remember. Visibly dirty, equipment and shelves are left on the ground and the smell of piss and rum unmistakingly fills your nostrils. Hopefully, there is something useful amidst this mess.
<<if $character[1].traits.includes("Astral Connection") && $secret1 is false>>
<span id="secret"><<link "You hear whispers... <i>*...hear us...*</i> (11 Essence)">>
<<set $secret1 to true>>
<<replace "#secret">>
You let your mind be consumed by the whispers...
<i>*... In the walls...*</i>
<i>*... False walls!*</i>
<i>*...naughty walls (giggles)...*</i>
They speak to you, through you, for you...
They speak in both words and images, guiding your body to where they desire.
<i>*...behind them...* </i>
<i>*...inside them...* </i>
<i>*...hidden by a lever...*</i>
They take you to near one of the few shelves that remains upright, they place your hand in the torchless sconce, and they bring it up. <br>
<div aling: center><b>*CLICK*</b></div><br>
At your left, what once was a wall, now reveals a large wound in the inside of the fort, a large and long chamber that leads to the inside of the walls, a secret tunnel...
[[Enter it.|Fortress Secret Tunnels]]<</replace>><</link>></span>
<<else>>
<<if $character[1].Awareness > 3>>
You sense that this room hides something.
<<test Awareness 14>>
<<onSuccess>>
<<set $secret1 to true>>
Ah! near one of the few remaining standing shelfs, you find a hidden mechanism... by activating it, a wound in the walls opens wide as the stone falls to the insides of the ground, inside the oppening, a secret tunnel for you to [[explore|Fortress Secret Tunnels]].
<<onFailure>>
No, you can't quite figure out what could be the secret. But the feeling still gnaws in your mind...
<</test>><</if>>
<<else>>
All that could be salvaged from here is already in your possession.<</if>>
<<if $secret1 is true>><p>The hidden tunnel still is there, not going anywhere else. [[Pass through it|Fortress Secret Tunnels]]. </p><</if>>
<span id="result">
<<link "Explore Armory">>
<<if $exploredArmory !== true>>
<<set _lootedItems to []>>
<<set _lootList to ["Rusted sword", "Hood", "Wool shirt", "Axe", "Small Red potion", "Short sword", "Dagger", "Parrying Dagger", "Pants", "Empty Flask", "Leather armor", "Rope", "Rations"]>>
<<set _lootAmount to Math.floor(Math.random() * 3) + 1>>
<<for _i = 0; _i < _lootAmount; _i++>>
<<set _lootedItem to _lootList[random(_lootList.length)]>> <!-- Remove -1 from random index -->
<<addItem _lootedItem>><</addItem>>
<<set _lootedItems.push(_lootedItem)>>
<</for>>
<<replace "#result">>
You managed to find the following items: <<print _lootedItems.join(", ")>>.
<</replace>>
<<set $exploredArmory to true>>
<<else>>
<<replace "#result">>
You already explored this section. There is nothing more to find.
<</replace>>
<</if>>
<</link>>
</span><<set $event.chapter1.lastplace to passage()>>
<<set _loot = random(1,8)>>
<<if $lootedRoom2 !== true>>
<span id="loottable">
<<link "explore this room">>
<<replace "#loottable">>
<<test Awareness 12>>
<<onSuccess>>
What is that? A secret stash? You manage to put your hands in some great valuables.
You found a Health Potion, 35 coins, and a Lute. <<set $character[1].Gold += 35>>
<<addItem "Lute">><</addItem>><<addItem "Red potion">><</addItem>>
Additionally...
<<switch _loot>>
<<case 1, 2, 3>>
You found a cockroach! But sadly, it seems that our new friend does not want to accompany us in our jorney
<<case 4, 5, 6>>
5 coins! At least this is something... right? <<set $character[1].Gold += 5>>
<<case 7, 8>>
You find some coins and a Dagger underneath one of the makeshift beds.
<<set $character[1].Gold += 5>><<addItem "Dagger">><</addItem>>
<</switch>>
<<onFailure>>
<<switch _loot>>
<<case 1, 2, 3>>
You found a cockroach! But sadly, it seems that our new friend does not want to accompany us.
<<case 4, 5, 6>>
5 coins! At least this is something... right? <<set $character[1].Gold += 5>>
<<case 7, 8>>
You find some coins and a Dagger underneath one of the makeshift beds.
<<set $character[1].Gold += 5>><<addItem "Dagger">><</addItem>>
<</switch>>
<</test>>
<</replace>>
<<set $lootedRoom2 = true>>
<</link>>
</span>
<</if>><<set $return to passage("Village Center")>>
<<if $quest.saveHusband.Active is true>>
This must be where the woman's huband went missing.
<span id="questtext">
<<link "Search for clues">>
<<replace "#questtext">>
<<test Awareness 8>>
<<onSuccess>>
Thankfully, you were able to spot some footprints and traces of blood. But of who or what, you have no clue.
[[Onwards]]
<<onFailure>>
<<set _roll to Math.floor(Math.random(1,4))>>
<<if _roll is 1>>
<<battle goblin 2>>
<<elseif _roll is 2>>
<<battle RatSwarm 1>>
<<elseif _roll is 3>>
<<battle Snakes 2>>
<<elseif _roll is 4>>
<<battle WildWolf 1>>
<</if>>
[[Survive.|Combatpage]]
<</test>>
<</replace>>
<</link>>
</span>
<<else>>
<<switch $character[1].level>>
<<case 1, 2, 3>>
<<set _roll to Math.floor(Math.random(1,4))>>
<<if _roll is 1>>
<<battle goblin 2>>
<<elseif _roll is 2>>
<<battle RatSwarm 2>>
<<elseif _roll is 3>>
<<battle Snakes 1>>
<<elseif _roll is 4>>
<<battle WildWolf 1>>
<</if>>
<<case 4, 5, 6>>
<<set _roll to Math.floor(Math.random(1,6))>>
<<if _roll is 1>>
<<battle goblin 4>>
<<elseif _roll is 2>>
<<battle RatSwarm 3>>
<<elseif _roll is 3>>
<<battle Snakes 2>>
<<elseif _roll is 4>>
<<battle WildWolf 3>>
<<elseif _roll is 5>>
<<battle Bear 1>>
<<elseif _roll is 6>>
<<battle RatKing 1>>
<</if>>
<</switch>>
[[Survive.|Combatpage]]
<</if>>
As you approach her she is startled.
<p><b>Woman:</b> My goodness, i did not see you there.</p>
Mood: <<cycle "$Mood" autoselect>>.
<<option "Rude">>
<<option "Friendly">>
<</cycle>>
<hr>
<span id="text1"><<link "Is everything alright?">>
<<replace "#text1">>
<<if $Mood is "Rude">>
<b><<print $character[1].Name>>:</b> What's wrong?
<b>Woman:</b> Excuse me?
<b><<print $character[1].Name>>:</b> You're frantic, what's wrong?
<b>Woman:</b> Ah... Well, it's just my husband, John. He went hunting in the forest <<if $day is 1>>yesterday<<else>><<print $day - 1>> days ago<</if>>, but he hasn't returned since...
<b><<print $character[1].Name>>:</b> Do you think he's dead?
<b>Woman:</b> Don't give the gods ideas.
<<elseif $Mood is "Friendly">>
<b><<print $character[1].Name>>:</b> Sorry about that ma'am, is everything alright?
<b>Woman:</b> Oh dear, it's my husband, John. He went hunting in the forest <<if $day is 1>>yesterday<<else>><<print $day - 1>> days ago<</if>>, but he hasn't returned since.
<</if>>
<<link "I'll have a look at that.">>
<<set $quest.saveHusband to {Active: true, Status: "onGoing"}>>
<<goto "Houses">>
<</link>>
<<link "That's not my problem">>
<<goto "Houses">>
<</link>>
<</replace>>
<</link>>
</span><<set $return to passage()>> <<set _Man to "John">><<set $now = setup.changeDate(State.variables.now, 'hours', 1)>>
<<if $day < 3>><<set $npc.john.healed to false>>
<<set $npc.john.alive to true>>
It took you a while, but you find the lost husband. He hid inside a cavity between the roots of a tree. Somehow, he managed to remain undetected by the wildlife. The man in question is large, with a rough beard covering his complexion and a bleeding wound at his side.
Despite his hoarse voice, he confirms he is still alive, together with grunts of pain.
<span id="quest1">
<b><<print _Man>>:</b> Thank the gods-urgh.... someone came.
<<link "Are you, John?">>
<<replace "#quest1">>
<b><<print $character[1].Name>>:</b> Are you John?
<<if $npc.john.healed is true>>
<b><<print _Man>>:</b> Yup! That would be me.
<<else>>
<<set _Man to "John">>
<b><<print _Man>>:</b> Yup-huff, that would be me.
<</if>>
<</replace>>
<</link>>
</span>
<span id="quest3">
<<link "What caused the wound?">>
<<replace "#quest3">>
<b><<print $character[1].Name>>:</b> What caused the wound?
<<if $npc.john.healed is true>>
<b><<print _Man>>:</b> Hah! A bear! A huge bear! If it wasn't for you, I probably would've bled to death. So, again, thanks.
<<else>>
<b><<print _Man>>:</b> Ah-argh,.. W-would you believe me i-if I told you-urgh, it was a bear? Bare - mph - barely got myself alive.
With the state he is in, you can truly believe it could be anything. The wound is deep and probably infected.
<</if>>
<</replace>>
<</link>>
</span>
<span id="quest2">
<<if $character[1].Specialization === "Cleric" || $character[1].Specialization === "Paladin" || $character[1].Specialization === "Wizard" || $character[1].Specialization === "Warlock" || $character[1].Specialization === "Invoker">>
<<link "Heal him - (10)">>
<<replace "#quest2">>
<b><<print $character[1].Name>>:</b> Here, let me help you.
With a weave of the arcane, you mend the hunter's wound. As he feels invigorated, you feel drained.
<b><<print _Man>>:</b> Shit, you are a mage? I'm afraid I don't have enough to pay you for the work.
<span id="quest4">
<<link "Well, in that case...[Kill him]">><<set $alignment.evilChaos += 2>>
<<replace "#quest4">>
You reverse the flow of the arcane, taking back the infused magic in his body. And when infused with a living being, its exit causes an unbearable amount of pain. And so... he screams, loud.
Thankfully it is short-lived, he no longer screams, talks, or even moves. For he is dead.
<</replace>>
<</link>>
<<link "There is no need for that.">><<set $alignment.goodOrder += 1>>
<<replace "#quest4">>
<b><<print $character[1].Name>>:</b> Please, there is no need for payment, you are hurt, this is the least I can do.
<b><<print _Man>>:</b> Thank you, truly, thank you.
<</replace>>
<</link>>
<<link "I think we can work something out">><<set $alignment.evilOrder += 1>>
<<replace "#quest4">>
<b><<print $character[1].Name>>:</b> I am sure we can work something out.
The hunter says nothing, but his expression? It truly spoke of worry for him.
<</replace>>
<</link>>
</span>
<</replace>>
<</link>>
<<elseif $character[1].Specialization === "Scholar">>
<<link "Tend to him">>
<<replace "#quest4">>
<<test WorldKnowledge 12>>
<<onSuccess>>
With the herbs at your disposal, you were able to ease the pain of the hunter.<<set $rep += 5>>
<<onFailure>>
As he screams a loud scream of pain, you are acknowledged with the sentiment of failure. Your "attempt" of helping actually may have probably worsened his condition. Thus, you will have to endure a very long journey to bring him back to the village.<<set $now = setup.changeDate(State.variables.now, 'hours', 3)>><<set $rep -= 2>>
<</test>>
<</replace>>
<</link>>
<<elseif $character[1].inventory.includes("Small Red potion") || $character[1].inventory.includes("Red potion") || $character[1].inventory.includes("Large Red potion")>>
<<link "Give him a potion to drink">>
<<replace "#quest4">>
You pour part of the potion into his mouth and the other into his wound, it takes a few seconds for the miraculous liquid to soothe the pain and lessen the wound. After a few weeks of rest, you are sure he will be recovered.
<</replace>>
<</link>>
<</if>>
</span>
<<else>>
<<set $npc.john.alive to false>>
You find where the man has been for the last few day, it's in a shallow hole underneath between the roots of a large tree where you find him, or rather, were you find his corpse.
The cause of death? He bled to death, the wound is made by four large cuts, surrounded by purplish bruises, probably by a paw of some large animal or creature. They are deep, very deep in fact.
<span id="quest5">
<<link "Loot his body">><<set $alignment.evilChaos += 1>>
<<addItem "Leather armor">><</addItem>>
<<addItem "Pants">><</addItem>>
<<addItem "Shoes">><</addItem>>
<<addItem "Longbow">><</addItem>>
<<replace "#quest5">>
<</replace>>
<</link>>
<<link "Bury his body">><<set $alignment.goodOrder += 1>>
<<set $now = setup.changeDate(State.variables.now, 'hours', 3)>>
<<replace "#quest5">>
It took hours, but it is done.
<</replace>>
<</link>>
</span>
<</if>>
<<set $quest.saveHusband to {Active: true, Status: "complete"}>>
[[Village Center]]
<<if $npc.john.alive is true && $npc.john.healed !== true>>
Finally arriving at the woman's house after your journey with the wounded hunter, you learn that the woman's name is Anna. As you approach the door with the injured hunter before you even knocks, it swings open, revealing Anna's astonished face as she spots her not-so-long-lost husband. She rushes forward to embrace him, only to press exactly at his injury.
<b>John:</b> Argh! Easy, darling. I'm still wounded.
<b>Anna:</b> Oh, I'm sorry. But I've missed you so much.
They linger in each other's arms for a few poignant moments before turning to you.
<b>Anna:</b> Thank you. Thank you so much, kind sir. I-I don't even know how can i repay you.
<b>John:</b> I know. You can keep my bow. It's yours now.
<<addItem "Bow">><</addItem>>
<<set $character[1].experience += 30>>
<<elseif $npc.john.alive is true && $npc.john.healed === true>>
Finally arriving at the woman's house after your journey with her missing husband, you learn that the woman's name is Anna. As you approach the door with the man before you even knocks, it swings open, reaveling Anna's astonished face as she spots her not-so-long-lost husband. She rushes forward to embrace him, and he answers in kind.
They linger in each other's arms for decades before turning to you, still linked in arms.
<b>Anna:</b> Thank you. Thank you so much, kind sir. I-I don't even know how can i repay you.
<b>John:</b> I know. You can keep my bow. It's yours now.
<<addItem "Longbow">><</addItem>>
<<set $character[1].experience += 30>>
<<else>>
<span id="report">
<<link "Your husband is dead.">>
<<replace "#report">>
<b><<print $character[1].Name>>>:</b> I am sorry ma'am, but your husband.. he has passed away.
<b>Woman:</b> No! Oh gods... no... I-sob-I'm sorry...
The woman weep for a few more minutes before she recollects herself.
<b>Woman:</b> Here, for your troubles...
<b>You gained measly five pieces of Gold.</b
<<set $character[1].experience += 30>>
<</link>>
</span>
<</if>>
[[With that done...|Houses]]
<i>You gained 30 Experience from concluding this little quest</i><<if $event.chapter1.cansee is true>>
It seems that the secret tunnels, are a colection of various tunnels, which many leads to dead ends. Thankfully, since you can see the place, you can also notice the markings on the walls, someone already explored this place and marked the dead ends.
Following the correct path, you end in a fork, where to go next?
<span id="itsdark">
<p><<link "North">><<replace "#itsdark">> <<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200 7s>>
You find a door. But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<test "Athlestism">>
<<onSuccess>>
With the power of brute force, you open the locked door.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
It seems that even the power of brute force it is not enough to open this dammed door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>>, <<link "South">><<replace "#itsdark">> <<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 6s>>
...Until...
<<fadein 200 9s>>
You find yourself outside of the fortress. <<if $hour > 18>> It is already night...<<else>> It is day.<</if>>
What to do?
<<link "Rest? [1 hour]">>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
<<set $character[1].currentLife += Math.round(($character[1].MAXLIFE * 0.15))>><<if $character[1].currentLife > $character[1].MAXLIFE>><<set $character[1].currentLife = $character[1].MAXLIFE>><</if>
<<set $character[1].currentMana += Math.round(($character[1].MAXMANA * 0.15))>><<if $character[1].currentMana > $character[1].MAXMANA>><<set $character[1].currentMana = $character[1].MAXMANA>><</if>
<<replace "#rest">><<fadein 200ms 10s>
You somewhat rested. Recovering a bit of your lost Lifeblood and Essence.
<<link "Go back to the armory?">><<goto 'Armory'>><</link>>
<<link "Go West.">><<replace "#itsdark">><<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200ms 7s>>
You find a door! <<fadein 200ms 9s>> But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<if $event.chapter1.secret1Door !== "not oppening">>
<<test "Sleight of Hands">>
<<onSuccess>>
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
You try and try as much as you like, but... Well... you ain't opening this door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<<else>>
That dammed door that won't bulge....
[[Go back|Armory]]
<</if>><</fadein>>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>>
<</replace>>
<</link>>
<span id="rest"></span>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>> or <<link "West">><<replace "#itsdark">>
<<replace "#itsdark">> <<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200ms 7s>>
You find a door! <<fadein 200ms 9s>> But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<if $event.chapter1.secret1Door !== "not oppening">>
<<test "Athlestism">>
<<onSuccess>>
With the power of brute force, you open the locked door.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
It seems that even the power of brute force it is not enough to open this dammed door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<<else>>
That dammed door that won't bulge....
[[Go back|Armory]]
<</if>><</fadein>>
<</fadein>><</fadein>><</fadein>>
<</replace>>
<</replace>><</link>>?</p>
<<else>>
It's quite dark in here, specially without any means to watch your steps in the dark.
<span id="itsdark"><p><<link "Try anyway">>
<<replace "#itsdark">>
<<test Awareness 13>>
<<onSuccess>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 2)>>
2 hours have passed, but by feeling the walls, you eventually manage to find a path where it does not lead to a dead end, but you find yourself in a fork, instead. Where to go next?
<p><<link "North">><<replace "#itsdark">> <<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200 7s>>
You find a door. But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<test "Athlestism">>
<<onSuccess>>
With the power of brute force, you open the locked door.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
It seems that even the power of brute force it is not enough to open this dammed door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>>, <<link "South">><<replace "#itsdark">> <<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 6s>>
...Until...
<<fadein 200 9s>>
You find yourself outside of the fortress. <<if $hour > 18>> It is already night...<<else>> It is day.<</if>>
What to do?
<<link "Rest? [1 hour]">>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
<<set $character[1].currentLife += Math.round(($character[1].MAXLIFE * 0.15))>><<if $character[1].currentLife > $character[1].MAXLIFE>><<set $character[1].currentLife = $character[1].MAXLIFE>><</if>
<<set $character[1].currentMana += Math.round(($character[1].MAXMANA * 0.15))>><<if $character[1].currentMana > $character[1].MAXMANA>><<set $character[1].currentMana = $character[1].MAXMANA>><</if>
<<replace "#rest">><<fadein 200ms 10s>
You somewhat rested. Recovering a bit of your lost Lifeblood and Essence.
<<link "Go back to the armory?">><<goto 'Armory'>><</link>>
<<link "Go West.">><<replace "#itsdark">><<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200ms 7s>>
You find a door! <<fadein 200ms 9s>> But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<if $event.chapter1.secret1Door !== "not oppening">>
<<test "Sleight of Hands">>
<<onSuccess>>
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
You try and try as much as you like, but... Well... you ain't opening this door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<<else>>
That dammed door that won't bulge....
[[Go back|Armory]]
<</if>><</fadein>>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>>
<</replace>>
<</link>>
<span id="rest"></span>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>> or <<link "West">><<replace "#itsdark">>
<<replace "#itsdark">> <<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 7)>>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200ms 7s>>
You find a door! <<fadein 200ms 9s>> But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<if $event.chapter1.secret1Door !== "not oppening">>
<<test "Athlestism">>
<<onSuccess>>
With the power of brute force, you open the locked door.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
It seems that even the power of brute force it is not enough to open this dammed door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<<else>>
That dammed door that won't bulge....
[[Go back|Armory]]
<</if>><</fadein>>
<</fadein>><</fadein>><</fadein>>
<</replace>>
<</replace>><</link>>?</p>
<<onFailure>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>
There are just too many paths leading to dead ends, you don't know if you have visited them beforehand or if they are the first time. You barely know the correct path to return...
<<include "endlessTest">>
<</replace>><</link>>or go [[back|Armory]]?</p></span>
<<if $event.chapter1.banditHideout !== "visited">>
<<visited() < 2>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 2)>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 45)>>
<<set _chance = Math.random(1,20) - $character[1].Stealth>>
<<set _roll to Math.floor(Math.random(1,4))>>
<<switch _roll>>
<<case 1>>
<<battle Goblin 1>><</battle>>
<<battle HuntGoblin 1>><</battle>>
<<battle SpellGoblin 1>><</battle>>
<<battle LoudGoblin 1>><</battle>>
<<battle Goblin 1>><</battle>>
<<case 2>>
<<battle WildWolf 3>><</battle>>
<<case 3>>
<<battle Snakes 2>><</battle>>
<<battle RatSwarm 1>><</battle>>
<<case 4>>
<<battle Bear 1>><</battle>>
<</switch>>
<</if>>
<<link "Look out!">>
<<set $return to passage()>>
<<goto "Combatpage">>
<</link>>
<<else>>
<</if>>
<<if _chance > 10>>
<<if visited() === 2>>
<<set State.variables.now = setup.changeDate(State.variables.now, 'minutes', 2)>>
Fortunally, or not, you survived, now you can go on.
[[Entrance][[State.variables.now to setup.changeDate(State.variables.now, 'hours', 2), State.variables.now = setup.changeDate(State.variables.now, 'minutes', 15)]].
<</if>>
<<else>>
You retake your steps from that night,
<<fadein 200ms 3s>>
You step,
<<fadein 200ms 5s>>
walk,
<<fadein 200ms 7s>>
and run.
<<fadein 200ms 9s>>
After some time, you manage to find the fortress again.
[[To it's entrance.|Entrance]]
<</fadein>><</fadein>><</fadein>><</fadein>>
<</if>><<if $language === "EN">>
<h2>Shredder</h2>
<b>The Shredder is a Specialization of the Warrior Class that maximizes the usage of a weapon in each hand, forsaking precision to deliver a barrage of constant attacks.</b>
<i><b>Main Attribute:</b> Strength (STR)</i>
<i><b>Secondary Attribute:</b> Dexterity (DEX)</i>
<table>
<tr>
<td>At level 01 | <i><b>Shredder:</b> Shredder Stance: You gain access to the "Shredder Stance" Skill, while active, you have -15 to Hit-Chance but you roll Damage twice and uses the highest result. Only one stance is permited per combat.
</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Shredder:</b> (Skill) Dual Weapon Rush.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Warrior:</b> Weapon Mastery: Your weapons apply additional effects based on their damage type.
Blunt - Apply Confusion on the target.
Slashing - Applies Bleed for 2 turns.
Piercing - Decreases the target's Defense by 5.
Firearm - Has 35% to deal 75% extra damage.
</i></td>
</tr>
<tr>
<td>At level 06| <i><b>Shredder:</b> (Skill) Combo.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Shredder:</b> Flurry: Whenever you make a weapon attack with your offhand, make one additional attack without cost, this attack has a -15 to Hit-Chance, -30 if the weapon is heavy.
If the weapon it in Cooldown, reduce its Cooldown by 1, instead.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Warrior:</b> Tactical Genius: Your Skills that cost three or more Action Points cost 1 point less.</i></td>
</tr>
<tr>
<td>At level 11 | <i><b>Shredder:</b> Momentum: Whenever you miss an enemy with a weapon attack, increase your Hit-Chance by 7. Resets whenever you hit an enemy .</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Shredder:</b> Lunging Stance: You gain access to the "Lunging Stance" Skill, while active, your first weapon strike against an enemy each turn is garanteed to hit, addting +2 Dices to the damage, but your Defense is reduced by 20. Only one stance is permited per combat.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Warrior:</b> Second Wind: During each combat, the first time you hit below 25% of your maximum health, heal yourself by 35% of your lost health.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Shredder:</b> Impossible Flurry: Whenever you make a weapon attack with your mainhand or offhand, make one additional attack without cost, this attack has a -15 to Hit-Chance, -30 if the weapon is heavy.
If the weapon it in Cooldown, reduce its Cooldown by 1, instead .</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Shredder:</b> Stance Master: While in the Shredder Stance, you make one additional attack per weapon in hand without cost, but further reduce your Hit-Chance by 10. If the weapon is in Cooldown, reduce its Cooldown by 1, instead.
While in Lunging Stance, your first two weapon strike are benefited from the bonus.
</i></td>
</tr>
</table>
<hr>
A Shredder character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Gamberson</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main Hand:</b> <i>Rusted Sword</i></td>
<td><b>Off-Hand:</b> <i>Short sword</i></td>
</tr>
</table>
<hr>
</div>
<<else if $language is "PT-BR">>
<h2>Retalhador</h2>
<b>O Retalhador é uma especialização da classe Guerriro que maximiza o uso de uma arma em cada mão, abandonando a precisão para desferir uma saraivada de ataques constantes.</b>
<i><b>Atributo Principal:</b> Força (STR)</i>
<i><b>Atributo secundário:</b> Destreza (DEX)</i>
<table>
<tr>
<td>No nível 01 | <i><b>Retalhador:</b> Postura do Retalhador: Você ganha acesso à habilidade "Postura do Retalhador", enquanto ativa, você tem -15 de Chance de Acerto, mas você rola Dano duas vezes e usa o resultado mais alto. Apenas uma postura é permitida por combate.
</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Retalhador:</b> (Habilidade) Investida com Arma Dupla.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de pontos de ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Guerreiro:</b> Maestria em Armas: Suas armas aplicam efeitos adicionais com base no tipo de dano.
Blunt – Aplique confusão no alvo.
Cortar – Aplica Sangramento por 2 turnos.
Piercing - Diminui a Defesa do alvo em 5.
Arma de fogo - Tem 35% para causar 75% de dano extra.
</i></td>
</tr>
<tr>
<td>No nível 06| <i><b>Retalhador:</b> (habilidade) Combo.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Retalhador:</b> Frenesi: Sempre que você fizer um ataque com arma com a mão improvisada, faça um ataque adicional sem custo, este ataque tem -15 na Chance de Acerto, -30 se a arma for pesada.
Se a arma estiver em Tempo de Recarga, reduza seu Tempo de Recarga em 1.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de pontos de ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Guerreiro:</b> Gênio Tático: Suas Habilidades que custam três ou mais Pontos de Ação custam 1 ponto a menos.</i></td>
</tr>
<tr>
<td>No nível 11 | <i><b>Retalhador:</b> Momentum: sempre que você errar um inimigo com um ataque com arma, aumente sua chance de acerto em 7. Reinicia sempre que você acertar um inimigo.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Retalhador:</b> Postura de Investida: Você ganha acesso à habilidade "Postura de Investida", enquanto ativa, seu primeiro ataque com arma contra um inimigo em cada turno tem garantia de acertar, adicionando +2 Dados ao dano, mas sua Defesa é reduzida em 20. Apenas uma postura é permitida por combate.</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Guerreiro:</b> Segundo Vento: Durante cada combate, na primeira vez que você atingir menos de 25% de sua saúde máxima, cure-se em 35% de sua saúde perdida.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Retalhador:</b> Frenesi Impossível: Sempre que você fizer um ataque com arma com a mão principal ou secundária, faça um ataque adicional sem custo, este ataque tem -15 na Chance de Acerto, -30 se a arma é pesado.
Se a arma estiver em Tempo de Recarga, reduza seu Tempo de Recarga em 1.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de pontos de ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Retalhador:</b> Mestre da Postura: Enquanto estiver na Postura do Destruidor, você faz um ataque adicional por arma em mão sem custo, mas reduz ainda mais sua Chance de Acerto em 10. Se a arma estiver em Tempo de Recarga, em vez disso, reduza seu Tempo de Recarga em 1.
Enquanto estiver na Postura Pulsante, seus dois primeiros golpes com arma serão beneficiados pelo bônus.
</i></td>
</tr>
</able>
<hr>
Um personagem Retalhador começa com:
<table>
<tr>
<td><b>Torso:</b> <i>Gamberson</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Espada Enferrujada</i></td>
<td><b>Mão Secundária:</b> <i>Espada Curta</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">>
<h2>Trapper</h2>
<b>The Trapper is a Specialization of the Rogue Class that has acess to Traps, contraptions which hinders the enemie's plans to attack you.</b>
<i><b>Main Attribute:</b> Dexterity (DEX)</i>
<table>
<tr>
<td>At level 01 | <i><b>Trapper:</b>Lay-in-wait: For each unnexpended Action Point, increase your Hit-Chance by +6 with Ranged Weapons. and +3 with Melee weapons.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Rogue:</b> Nimble Fingers: During combat, you gain 15% more Gold from defeating enemies. Additionally, you may steal from story characters (NPCs).</i></td>
</tr>
<tr>
<td>At level 03 | <i><>Trapper:</b> Trapsmith: At the start of each combat, you lay down 3 random Traps, when the enemy attacks you. Only 1 trap can be activated each turn.
Traps:
<b>Decoy:</b> Forces the attack to miss.
<b>Explosive Trap:</b> Deal 2d6 damage
<b>Smoking Bomb:</b> <b>Confuse</b> all other enemies
<b>Stinky bomb:</b> <b>Poison(10)</b> the attacker
<b>Stunning Bomb:</b> <b>Stun</b> the attacker.
<b>Caltrops:</b> Each enemy takes 1d4 damage ands <b>Bleeds</b> for 4 turns.i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Rogue:</b> Gambler: Reduce one of your test dice to a 1d4, but increase the other to a 1d10.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Rogue:</b> Sneaky: You start each combat <b>Hidden</b>. While hidden, your next attack deal 1d8 of extra damage.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Trapper:</b> Skirmish Tactics: When an enemy triggers a Trap, make a weapon attack against it. If your weapon is on Cooldown, recharge it, first.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Trapper:</b> Master trapper: Improve your traps:
<b>Decoy: Forces the attack to miss, then gain <b><b>Hidden.
<b>Explosive Trap:</b> Deal 4d6 damage to all enemies
<b>Smoking Bomb:</b> <b>Blinds</b> all other enemies
<b>Stinky bomb:</b> <b>Poison(10)</b> all enemies
<b>Stunning Bomb:</b> <b>Stun</b> all enemies.
<b>Caltrops:</b> Each enemy takes 2d4 damage ands <b>Bleeds</b> for 6 turns.</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Trapper:</b Hit-and-Run: After damaging an enemy with an attack, lay back a trap that has been activated.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 20 | <i><b>Trapper:</b> Sniper Shot: When attacking with a Ranged weapon, expend all Action Points, For each expended Action Point, increase your Ranged weapon Damage dice by 1 step. (d4 to d6, d6 to d8, d8 to d10, d10 to d12)
If the weapon damage dice is already higher than a d12, increase the number of Dices by 1, instead.
</i></td>
</tr>
</table>
<hr>
<div align='center'>
A Trapper character starts with:
<table>
<tr>
<td><b>Head:</b>Hood</i></td>
<td><b>Torso:</b> <i>Leather armor</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main Hand:</b> <i>Crossbow</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<h2>Caçador</h2>
<b>O Caçador é uma Especialização da Classe do Ladino que possui acesso à Armdilhas, engenhocas que atrapalham os planos de seus inimigos de te atacarem..</b>
<i><b>Main Attribute:</b> Destreza (DEX)</i>
<table>
<tr>
<td>No nível 01 | <i><b>Trapper:</b>Espera Oculta: For each unnexpended Action Point, increase your Hit-Chance by +6 with Ranged Weapons. and +3 with Melee weapons.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Ladino:</b> Dedos Ágeis: Durante o combate, você ganha 15% mais Ouro ao derrotar inimigos. Além disso, você pode roubar de personagens da história (NPCs).</i></td>
</tr>
<tr>
<td>No nível 03 | <i><>Trapper:</b> Armadilheiro: No começo de cada combate, você coloca três Armadilhas aleáorias em ação, Armadilhas são ativadas quando um inimigo o ataca. Apenas uma Armadilha pode ser ativada cada turno.
Armadilhas:
<b>Isca:</b> Força o ataque a errar.
<b>Armadilha Explosiva:</b> Causa 2d6 de dano
<b>Bomba Fumegante:</b> <b>Confundir</b> todos os outros inimigos
<b>Bomba Fedorenta:</b> <b>Envenene(10)</b> o atacante
<b>Bomba Atordoante:</b> <b>Atordoa</b> o atacante.
<b>Estrepes:</b> Cada inimigo sofre 1d4 de dano e <b>Sangra</b> por 4 turnos.i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Ladino:</b> Apostador Reduza um dos seus dados de teste para 1d4, mas aumente o outro para 1d10.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Ladino:</b> Furtivo: Você começa cada combate <b>Escondido</b>. Enquanto estiver escondido, seu próximo ataque causa 1d8 de dano extra.</i></td>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Trapper:</b> Táticas de Escaramuças: Quando um inimigo ativa uma Armadilha, faça um Golpe Armado contra ele. Se sua arma estiver em Recarga, a recarregue primeiro.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Trapper:</b> Mestre Armadilheiro: Melhore suas Armadilhas::
<b>Isca: Força o ataque a errar e então ganha <b><b>Oculto.
<b>Armadilha Explosiva:</b> Causa 4d6 de dano a todos os inimigos
<b>Bomba Fumegante:</b> <b>Cegue</b> todos os outros inimigos
<b>Bomba Fedorenta:</b> <b>Envenene(10)</b> todos os inimigos
<b>Bomba Atordoante:</b> <b>Atordoa</b> todos os inimigos.
<b>Estrepes:</b> Cada inimigo sofre 2d4 de dano e <b>Sangra</b> por 6 turnos.</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Trapper:</b> Bater e Correr: Após danificar um inimigo com um ataque, recoloque uma Armadilha que já foi ativada.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 20 | <i><b>Trapper:</b> Tiro de Francotirador: Ao atacar com uma Arma de Longo Alcance, gaster todos os Pontos de Ação, para cada gasto, aumente o Dado de sua Arma em um estágio. (d4 to d6, d6 to d8, d8 to d10, d10 to d12)
Se o Dado de Arma já é igual ou maior que um d12, aumente o número de Dados em 1.</i></td>
</tr>
</table>
<hr>
<hr>
<div align='center'>
Um personagem Caçador começa com:
<table>
<tr>
<td><b>Cabeça:</b>Capuz</i></td>
<td><b>Torso:</b> <i>Armadura de Couro</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Besta</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">>
<h2>Shaman</h2>
<b>The Shaman is a Specialization of the Barbarian Class that summons from the elemental powers of nature to the battlefield throght Totems.</b>
<table>
<tr>
<td>Water Totem</td>
<td>Air Totem</td>
<td>Earth Totem</td>
<td>Fire Totem</td>
</tr>
<tr>
<td>For each Totem of this Element, decrease Damage received by 2</td>
<td>For each Totem of this Element, increase your Hit-Chance by 2.</td>
<td>For each Totem of this Element, increase your Defense by 2.</td>
<td>For each Totem of this Element, increase your Damage dealt by 2.</td>
</tr>
</table>
<i><b>Main Attribute:</b> Resilience (RES)</i>
<i><b>Secondary Attribute:</b> Intelligence (INT)</i>
<table>
<tr>
<td>At level 01 | <i><b>Shaman:</b> (Skill) Call the Elements.</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Shaman:</b> Elemental Afinity I (Water): Add the 'Rainfall' and 'Turn the Tides' Skills to your Repertoire.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Shaman:</b> Elemental Afinity II (Air): Add the 'Stormsurge' and 'Gale Winds' Skills to your Repertoire.</i></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Barbarian:</b> Champion's Might: Add 1/2 of your resilience to your Damage and to your Athletics.</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Shaman</b> Wild Surge: At the end of your turn, your Totems deal 1 damage to all enemies.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Shaman:</b> Elemental Afinity III (Fire): Add the 'Eruption' and 'Blazing Strike' Skills to your Repertoire.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Barbarian:</b>Unending Vigor: At the start of each turn, regain 3% of your missing Lifeblood.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Shaman:</b> Elemental Afinity IV (Earth): Add the 'Tremors' and 'Turn to Stone' Skills to your Repertoire</i></td>
</tr>
<tr>
<td>At level 16 | <i><b>Shaman:</b> Totem Carver: After casting an Elemental Spell, summons a Totem of the same Element. Whenever you summon an Totem, Summons an improved version, instead.
<table>
<tr>
<td><b>Improved Water Totem:</b></td>
<td><b>Improved Air Totem:</b></td>
<td><b>Improved Earth Totem:</b></td>
<td><b>Improved Fire Totem:</b></td>
</tr>
<tr>
<td>At the end of your turn, heal yourself by 2% of your total Lifeblood. When overheal, damage an enemy. For each Totem of this Element, decrease Damage received by 2</td>
<td>At the end of your turn, if you have cast an Elemental Spell, summon a Lighting against a random enemy, dealing 1d10 of damage. For each Totem of this Element, increase your Hit-Chance by 2.</td>
<td>At the end of your turn, increase your Lifeblood by 2. For each Totem of this Element, increase your Defense by 2.</td>
<td> At the end of your turn, <b>Burn</b> a random enemy. If the enemy is already <b>Burning</b>, increase its stacks by 1. For each Totem of this Element, increase Damage dealt by 2.</td>
</tr>
</table></i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Shaman</b> Elementalist: If you control at least one of each Totem, increase your weapon damage Dice to a d20.</i></td>
</tr>
</table>
<div align='center'>
An Shaman character starts with:
<table>
<tr>
<td><b>Head:</b> <i>Cirlcet</i></td>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Waist:</b> <i>Belted Skirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Offhand:</b> <i>Shield</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<h2>Xamã</h2>
<b>O Xamã é uma Especialização da Classe Bárbara que invoca o poder elemental da natureza para o campo de batalha através de Totens,</b>
<table>
<tr>
<td>Totem da Água</td>
<td>Totem do Ar</td>
<td>Totem da Terra</td>
<td>Totem do Fogo</td>
</tr>
<tr>
<td>Para cada Totem desse Elemento, diminua o Dano recebido em 2,</td>
<td>Para cada Totem desse Elemento, aumente sua Chance de Acerto em 2.</td>
<td>Para cada Totem desse Elemento, aumente sua Defesa em 2.</td>
<td>Para cada Totem desse Elemento, aumente o Dano causado em 2.</td>
</tr>
</table>
<i><b>Atributo Primário:</b> Resiliência (RES)</i>
<i><b>Atributo Secundário:</b> Inteligência (INT)</i>
<table>
<tr>
<td>No nível 01 | <i><b>Xamã:</b> (Habilidade) Chamado dos Elementos.</i></td>
</tr>
<tr>
<td>No nível 03 | <i><b>Xamã:</b> Afinidade Elemental I (Água): Adicione as Habilidades 'Chuva' e 'Mudança de Máres' ao seu Repertório.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Xamã:</b> Afinidade Elemental II (Ar): Adicione as Habilidades 'Surto de Relâmpagos' and 'Ventos Fortes' ao seu Repertório.</i></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Bárbaro</b> Poder do Campeão: Adicione metade da sua resiliência ao seu Dano e à sua Atletismo.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Xamã</b> Onda Selvagem: No final de seu turno, seus Totens causam 1 de Dano a todos os inimigos.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Xamã:</b> Afinidade Elemental III (Fogo): Adicione as Hablidades 'Erupção' e 'Golpe Incandescente' ao seu Repertório.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Bárbaro:</b>Vigor Infinito: No início de cada turno, recupere 3% de sua Força Vital perdida.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Xamã:</b> Afinidade Elemental IV (Terra): Add the 'Tremors' and 'Turn to Stone' Skills to your Repertoire</i></td>
</tr>
<tr>
<td>No nível 16 | <i><b>Xamã:</b> Escultor de totens: Após usar uma Magia Elemental, invoque um Totem do mesmo Elemento. Sempre que invocar um Totem, invoque sua versão aprimorada.
<table>
<tr>
<td><b>Totem da Água Aprimorado</b></td>
<td><b>Totem do Ar Aprimorado</b></td>
<td><b>Totem da Terra Aprimorado</b></td>
<td><b>Totem do Fogo Aprimorado</b></td>
</tr>
<tr>
<td>No fim de cada turno, cure a si mesmo em 3% de sua Força Vital total. Quando sobrecura, danifique um inimigo. Para cada Totem desse elemento, diminua o Dano recebido em 2.</td>
<td>No fim de seu turno, se você usou uma magia Elemental, convoque um Relâmpago contra um inimigo aleátorio, causando 1d10 de Dano. Para cada Totem desse Elemento, aumente sua Chance de Acerto em 2.</td>
<td>No final de seu turno, aumente sua Força Vital em 2. Para cada Totem desse Elemento, aumente sua Defesa em 2.</td>
<td> No final de seu turno, <b>Queime<b> um inimigo aleátorio. Se o inimio já estiver <b>Queimando</b>, aumente seu acúmulo em 1. Para cada Totem desse Elemento, aumente seu Dano causado em 2.</td>
</tr>
</table></i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Xamã</b> Elementalista: Se você controla pelo menos um de cada Totem, aumento o Dado de Dano de sua Arma para um d20.</i></td>
</tr>
</table>
<div align='center'>
Um personagem Xamâ começa com:
<table>
<tr>
<td><b>Cabeça:</b> <i>Diadema</i></td>
<td><b>Torso:</b> <i>Camisa de Lã</i></td>
<td><b>Cintura:</b> <i>Saia com cinto</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Secundária:</b> <i>Escudo</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">>
<h2>Barber Surgeon</h2>
<b>The Barber Surgeon is a Specialization of the Artist Class, a medic who does not bother harm those in their way with their knowledge of the inner workings of a body.</b>
<i><b>Main Attribute:</b> Charisma (CHA)</i>
<table>
<tr>
<td>At level 01 | <i><b>Barber Surgeon:</b> Cirurgic Precision: Reduce the necessary amount to make a Critical Strike to be at least 1.75X the target's Defense.
</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Barber Surgeon:</b> (Skill) Quick-Fix.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 06 | <i><b>Artist:</b> Trustworthy Instrument: While equipped with an Instrument, mark it as Esoteric. Additionally, you gain +5 to Art tests</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Barber Surgeon:</b> Bloody mess: Whenever you Crit, apply <b>Bleeding</b> to the target for 3 turns. You add 1/2 of your Charisma to the to Hit-Chance against <b>Bleeding</b> targets.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Artist:</b> Winning Smile: When making a test and the result would be lower than 10, add 1/3 of your Charisma to the resut.</i></td>
</tr>
<tr>
<td>At level 14 | <i><b>Barber Surgeon:</b> Battle-Medic: Whenever you are hit, gain Regeneration(2). Increase all healing received by 5.</i></td>
</tr>
<tr>
<td>At level 16 | i><b>Barber Surgeon:</b> Improved Cirurgic Precision: Reduce the necessary amount to make a Critical Strike to 1.5X the target's Defense.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
An Barber Surgeon character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Dagger</i></td>
<td><b>Offhand:</b> <i>Throwing knifes</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<h2>Barbeiro-Cirurgião</h2>
<b>O Barbeiro-Cirurgião é uma Especialização da Classe Artista, um médico que não se preocupa em prejudicar quem está em seu caminho com seu conhecimento do funcionamento interno de um corpo.</b>
<i><b>Main Attribute:</b> Carisma (CHA)</i>
<table>
<tr>
<td>No nível 01 | <i><b>Barbeiro-Cirurgião:</b> Precisão Cirurgíca: Reduza o valor necessário para realizar um Ataque Crítico para apenas 1.75X a Defesa do Alvo,</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Barbeiro-Cirurgião:</b> (Habilidade) Tratamento Rápido.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremênto de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 06 | <i><b>Artista:</b> Instrumento Confiável: Ao equipar um Instrumento, marque-o como Esotérico. Além disso, você ganha +5 em testes de Arte.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Barbeiro-Cirurgião:</b> Confusão Sangrenta: Sempre que você realizar um ataque Crítico, aplique <b>Sangramento</b> no alvo por 3 turnos. Você adiciona 1/2 de sua Carisma à Chance de Acerto contra alvos <b>Sangrando</b>.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incremênto de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Artista:</b> Sorriso Vencedor: Ao fazer um teste e o resultado seria inferior a 10, adicione 1/3 do seu Carisma ao resultado.</i></td>
</tr>
<tr>
<td>No nível 14 | <i><b>Barbeiro-Cirurgião:</b> Medico de Batalha: Sempre que você for atingido, ganhe Regeneração(2). Aumente toda a cura recebida em 5.</i></td>
</tr>
<tr>
<td>No nível 16 | i><b>Barbeiro-Cirurgião:</b> Improved Cirurgic Precision: Reduza o valor necessário para realizar um Ataque Crítico para apenas 1.5X a Defesa do Alvo.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Incremênto de Pontos de Ação.</b></i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Barbeiro-Cirurgião começa com:
<table>
<tr>
<td><b>Torso:</b> <i>Camisa de Lã</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Adaga</i></td>
<td><b>Mão Secundária:</b> <i>Facas de Arremesso</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">>
<h2>Spellblade</h2>
<b>The Spellblade is a Specialization of the Mage Class that mixes the power of a great spellcaster with the strength of a even greater warrior.</b>
<i><b>Main Attribute:</b> Intelligence (INT)</i>
<table>
<tr>
<td>At level 01 | <i><b>Mage:</b> Arcane Initiation: Add the skills "Fire Bolt."; "Lightning Strike." and "Freeze." to your Repertoire. They cost 3 less.</i></td>
</tr>
<tr>
<td>At level 02 | <i><b>Spellblade:</b> Arcane Weapon: add the 'Summon Arcane Blade' to your Repertoire.
At level 5, 10 and 15, increase the Arcane Blade Damage Dice by 1d8.
While wielding the Arcane Blade, casting a Spell grants you an Improved Attack that deals 1/2 of your Intelligence as additional Damage.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Spellblade:</b> Arcane Armory: While wielding the Arcane Blade, increase your Defense to be equal to your Intelligence, if it isn't higher.
</i></td>
</tr>
<tr>
<td>At level 07 | <i><b>Spellblade:</b> Mystical Arts: Add the 'Blade Surge', and 'Spectral Strike' Skills to your Repertoire.
While wielding the Arcane Blade, whenever you make a weapon attack, recover 5 Essence.
</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Mage:</b> Arcane Mastery: Add the skills; "Inferno", "Storm and "Blizzard" to your Repertoire. When cast, you roll the damage twice and chooses the highest result.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Spellblade: </b> Eldritch Knight: Heavy Armor no longers increases the Essence cost of Spell Skills.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Spellblade:</b> Runic Mastery: You are now able to Enchant your own gear from your inventory, it takes 3 hours and 35 Essence to Enchant a gear.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Spellblade:</b> Mage Slayer: While wielding the Arcane Blade, whenever an enemy casts an Spell against you, make a weapon attack against it .</i></td>
</tr>
</table>
<div align='center'>
An Spellblade character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Wool Shirt</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Wand</i></td>
<td><b>Offhand:</b> <i>Shield</i></td>
</tr>
</table>
<hr>
</div>
<<elseif $language === "PT-BR">>
<h2>Lâmina Arcana</h2>
<b>A Lâmina Arcana é uma Especialização da Classe Mago que mistura o poder de um grande conjurador com a força de um guerreiro ainda maior.</b>
<i><b>Atributo Principal:</b> Inteligência (INT)</i>
<table>
<tr>
<td>No nível 01 | <i><b>Mage:</b> Iniciação Arcana: Adicione as habilidades: "Bola de Fogo.", "Raio." e "Congelamento." ao seu Repertório. Essas habilidades custam 3 menos.</i></td>
</tr>
<tr>
<td>No nível 02 | <i><b>Lâmina Arcana:</b> Arma Arcana: Adicione a Habilidade 'Invocar Lâmina Arcana' ao seu Repertório.
Nos níveis 5, 10 e 15, aumente o Dado de Dano da Lâmina Arcana em 1d8.
Enquanto empunha a Lâmina Arcana, conjurar uma Magia lhe concede um Ataque Empoderado que causa 1/2 de sua Inteligência como Dano adicional.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incrêmento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Lâmina Arcana:</b> Arsenal Arcano: Enquanto empunha a Lâmina Arcana, aumente sua Defesa para ser igual a sua Inteligência, se já não é maior.</i></td>
</tr>
<tr>
<td>No nível 07 | <i><b>Lâmina Arcana:</b> Artes Místicas: Adicione as Habilidades 'Surto de Lâminas' e 'Golpe Espectral' ao seu repertório.
Enquanto empunha a Lâmina Arcana, sempre que você fizer um ataque armado, recupere 5 Essências.
</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Incrêmento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Mage:</b> Maestria Arcana: Adicione as habilidades; "Inferno", "Tempestade e "Nevasca" ao seu Repertório. Quando conjuradas, você rola o Dano duas vezes e escolhe o maior resultado.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Lâmina Arcana: </b> Cavaleiro Sobrenatural: Armadura Pesada não aumenta mais o custo de Essência de Habilidades Mágicas.</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Lâmina Arcana:</b> Maestria Rûnica: Agora você pode encantar seu próprio equipamento do seu inventário, são necessárias 3 horas e 35 Essência para encantar um equipamento.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Incrêmento de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Lâmina Arcana:</b> Matador de Magos: Enquanto empunha a Lâmina Arcana, sempre que um inimigo lançar um Feitiço contra você, faça um ataque com arma contra ele.</i></td>
</tr>
</table>
<div align='center'>
Um personagem Lâmina Arcana começa com:
<table>
<tr>
<td><b>Torso:</b> <i>Camisa de lã</i></td>
<td><b>Pernas:</b> <i>Calcas</i></td>
<td><b>Mão Principal:</b> <i>Varinha</i></td>
<td><b>Mão Secundária:</b> <i>Escudo</i></td>
</tr>
</table>
<hr>
</div>
<</if>><<if $language === "EN">>
<h2>Flagellant</h2>
<b>The Flagellant is a Specialization of the Devotee Class that endures the hardships of battle whith ultmost devotion.</b>
<i><b>Main Attribute:</b> Perception (PER)</i>
<i><b>Secondary Attribute:</b> Resilience (RES)</i>
<table>
<tr>
<td>At level 01 | <i><b>Flagellant:</b> Penitent Strike: When attacking an enemy, deal 50% extra damage to yourself and the target. If you or the target are afflicted with <b>Bleeding</b>, heal yourself by 6% of your maximum Lifeblood.</i></td>
</tr>
<tr>
<td>At level 03 | <i><b>Devotee:</b> Divine Blessings I: Whenever you cast a Holy Spell, gain 2 stacks of <b>Piety</b>. At the end of your turn, you heal yourself for 1 Lifeblood for every 6 stacks of <b>Piety</b>. Casting a non-Holy Spell resets all <b>Piety</b> stacks.</i></td>
</tr>
<tr>
<td>At level 04 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 05 | <i><b>Flagellant:</b> Bloody Embrace: When being attacked by an enemy, reduce the damage taken by 50%. Convert the damage as <b>Bleeding</b> (For every 6 points of damage, gain 1 stack of Bleeding), then gain a stack of Piety. You no longer can die due to <b>Bleeding</b>.</i></td>
</tr>
<tr>
<td>At level 08 | <i><b>Devotee:</b> Divine Blessings II: <b>Piety</b> increases your Defense and Damage by 1 for every 6 points.</i></td>
</tr>
<tr>
<td>At level 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 10 | <i><b>Flagellant:</b> Pious Resilience: Increase your maximum Lifeblood by 25%. At the start of your turn, while your Lifeblood is below 50%, gain 3 stacks of Piety.</i></td>
</tr>
<tr>
<td>At level 12 | <i><b>Flagellant:</b> Divine Atonement: Whenever you are affected by a status effect, gain a stack of Piety.</i></td>
</tr>
<tr>
<td>At level 13 | <i><b>Devotee:</b> Divine Blessings III: Increases all bonuses from <b>Piety</b> by 1 for every 12 stacks of <b>Piety</b>.</i></td>
</tr>
<tr>
<td>At level 15 | <i><b>Flagellant:</b> Zealous Reckoning: Whenever an enemy attacks you, you reflect 30 + (+1 % for each stack of Piety)% of the received Damage back to the attacker.</i></td>
</tr>
<tr>
<td>At level 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>At level 19 | <i><b>Flagellant:</b> Martyrdom: Enemy Attacks can no longer miss you. In compesation, Double your Maximum Lifeblood.</i></td>
</tr>
</table>
<hr>
<div align='center'>
An Flagellant character starts with:
<table>
<tr>
<td><b>Torso:</b> <i>Holy Garments</i></td>
<td><b>Legs:</b> <i>Pants</i></td>
<td><b>Main-hand:</b> <i>Flail</i></td>
</tr>
</table>
<hr>
<<elseif $language === "PT-BR">>
<h2>Flagellant</h2>
<b>The Flagellant is a Specialization of the Devotee Class that endures the hardships of battle whith ultmost devotion.</b>
<i><b>Main Attribute:</b> Perception (PER)</i>
<i><b>Secondary Attribute:</b> Resilience (RES)</i>
<table>
<tr>
<td>No nível 01 | <i><b>Flagelante:</b> Golpe Penitente: Ao atacar um inimigo, causa 50% de dano extra a você e ao alvo. Se você ou o alvo estiverem afetados por <b>Sangramento</b>, cure-se em 6% de sua Força Vital máxima.</i></td>
</tr>
<tr>
td>No nível 03 | <i><b>Devoto:</b> Bênçãos Divinas I: Sempre que lançar um Feitiço Sagrado, ganhe 2 acúmulos de <b>Piedade</b>. No final de seu turno, cure-se em 1 para cada 6 acúmulos de <b>Piedade</b>. Ao lançar um Feitiço não Sagrado, resete todos os pontos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 04 | <i><b>Incremênto de Pontos de Ação.</b></i></td>
</tr>
<tr>
<td>No nível 05 | <i><b>Flagelante:</b> Abraço Sangrento: Ao ser atacado por um inimigo, reduz o dano recebido em 50%. Converta o dano em <b>Sangramento</b> (para cada 6 pontos de dano, ganhe 1 acúmulo de Sangramento) e depois ganhe uma acúmulo de Piedade. Você não pode mais morrer devido a <b>Sangramento</b>.</i></td>
</tr>
<tr>
<td>No nível 08 | <i><b>Devoto:</b> Bênçãos Divinas II: <b>Piedade</b> aumenta sua Defesa e Dano em 1 para cada 6 pontos.</i></td>
</tr>
<tr>
<td>No nível 09 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>No nível 10 | <i><b>Flagelante:</b> Resiliência Piedosa: Aumenta seu Lifeblood máximo em 25%. No início do seu turno, enquanto seu Sangeu Vital estiver abaixo de 50%, ganhe 3 acúmulos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 12 | <i><b>Flagelante:</b> Expiação Divina: Sempre que você for afetado por um efeito de status, ganhe uma acúmulo de Piedade.</i></td>
</tr>
<tr>
<td>No nível 13 | <i><b>Devoto:</b> Bênçãos Divinas III: Aumenta em 1 todos os valores dados devido à <b>Piedade</b> para cada 12 acúmulos de <b>Piedade</b>.</i></td>
</tr>
<tr>
<td>No nível 15 | <i><b>Flagellant:</b> Acerto de Contas Zeloso: Sempre que um inimigo ataca você, você reflete 30 + (+1% para cada acúmulo de <b>Piedade</b>)% do Dano recebido de volta ao atacante.</i></td>
</tr>
<tr>
<td>No nível 18 | <i><b>Action Points Increment.</b></i></td>
</tr>
<tr>
<td>No nível 19 | <i><b>Flagelante:</b> Marti: Os ataques inimigos não podem mais errar você. Em compensação, dobre sua força vital máxima.</i></td>
</tr>
</table>
<hr>
<div align='center'>
Um personagem Flagelante começa com:
<table>
<tr>
<td><b>Torso:</b> <i>Vestimentas Sagradas</i></td>
<td><b>Pernas:</b> <i>Calças</i></td>
<td><b>Mão Principal:</b> <i>Mangual</i></td>
</tr>
</table>
<hr>
<</if>><<switch visited()>>
<<case 1>>
There are still bandits loose pillaging the place, but where to go?
<<if $firstplace !== "Houses">>[[To the houses!|Houses][$chosenplace1 to "Houses"]]<</if>>
<<if $firstplace !== "Village Center">>[[To the center of the village!|Village Center][$chosenplace1 to "Village Center"]]<</if>>
[[To the blacksmith|Blacksmith][$chosenplace1 to "Blacksmith"]]
<<case 2>>
Even with your efforts, there are still bandits loose pillaging the place, but where to go next?
<<if $chosenplace1 !== "Houses">>[[To the houses!|Houses][$chosenplace2 to "Houses"; $npc.oldMan.alive to false]]<</if>>
<<if $chosenplace1 !== "Village Center">>[[To the center of the village!|Village Center][$chosenplace2 to "Village Center"; $npc.oldMan.alive to false]]<</if>>
<<if $chosenplace1 !== "Blacksmith">>[[To the blacksmith|Blacksmith][$chosenplace2 to "Blacksmith"]]<</if>>
<<case 3>>
Even with your efforts, there are still bandits loose pillaging the place, but where to go next?
<<if $chosenplace1 !== "Houses" || $chosenplace2 !== "Houses">>[[To the houses!|Houses][$chosenplace3 to "Houses"]]<</if>>
<<if $chosenplace1 !== "Village Center" || $chosenplace2 !== "Village Center">>[[To the center of the village!|Village Center][$chosenplace3 to "Village Center"]]<</if>>
<<if $chosenplace1 !== "Blacksmith" || $chosenplace2 !== "Blacksmith">>[[To the blacksmith|Blacksmith][$chosenplace3 to "Blacksmith"]]<</if>>
<<default>>
<<if $event.chapter1.bandits > 0>>
How many bandits are even here? Are they endless? You don't even have time to bother to think about it.
<<silently>>
<<set _roll1 to 0>>
<<set _roll2 to 0>>
<<set _roll3 to 0>>
<<set _roll1 to Math.floor(Math.random() * $event.chapter1.bandits)>>
<<if _roll1 > 4>><<set _roll1 = 4>><</if>>
<<set $event.chapter1.bandits -= _roll1>>
<<if $event.chapter1.bandits > 0>><<set _roll2 to Math.floor(Math.random() * $event.chapter1.bandits)>><<set $event.chapter1.bandits -= _roll2>><</if>>
<<if $event.chapter1.bandits > 0>><<set _roll3 to Math.floor(Math.random() * $event.chapter1.bandits)>><<set $event.chapter1.bandits -= _roll3>><</if>>
<</silently>>
<<battle "Ruffian" _roll1>><</battle>>
<<battle "HiredMuscle" _roll2>><</battle>>
<<battle "HiredSpellcaster" _roll3>><</battle>>
<<link "More bandits to deal with.">>
<<set $whosturn to "player">>
<<set $return to "Interlude">>
<<goto "Combatpage">>
<</link>>
<<else>>
<<unset $chosenplace1>>
<<unset $chosenplace2>>
<<unset $chosenplace3>>
<<set $event.chapter1.banditraid to "raided">>
After dealing with some of the bandits of the raid, the villagers come from their hiding places to thank you for your heroic acts. But a single voice dares to rebel from the sounds of appraisal and adoration, a call from the village's Elder, whom <<print $npc.Owner.Name>> didn't bother to tell you existed. Nevertheless, it would be disrespectful to ignore him.
[[He lives at the center of the habitant's houses|Houses]]
<</if>>
<</switch>>
<<if visited() === 1>>
As you enter the house, you notice the simplicity of it, baraly any decour, only a few painted portraits on the dry walls, and the old wooden planks squeal with each step you take on them. To your left lies a lit fireplace. To the opposite side, a table, an empty chair, and an old man waiting for you to sit.
<<if $event.chapter1.banditraid === "raided">>
<b><<print $npc.Elder.Name>></b>: Come along child, sit. Would you like a cup to tea?
He is surprinsingly calm despite his village just got raided.
<b><<print $npc.Elder.Name>></b>: You are probably wandering why i am so calm despite the mess that just happened... Well, in truth, these raids are not that uncommon to begin with, but since you could handle that many of them, i believe you could also take care of the rest.
<b><<print $character[1].Name>></b>: What do you mean by that?
<b><<print $npc.Elder.Name>></b>: These bandits, they have a bigger group, they hide themselves deeper in the forest, what i can offer you is 20 coins to make them stop raiding us. I'll add 3 more coins for each head you bring.
[[I'll see what i can do|Houses]]
<<elseif $event.chapter1.banditraid === "stopped">>
<b><<print $character[1].Name>></b>: <<print $npc.Owner.Name>> asked me to tell you about the bandit situation. There was a fortress deep in the woods, i took care of some of them and their leader.
<b><<print $npc.Elder.Name>></b>: Ah, those bandits were a old problem of ours, thank you for your service, young ?man. Well, i don't know how many of the were, so how about i give you 35 coins as reward, is that enough?
<b><<print $character[1].Name>></b>: I will kindly accept it.
<<set $character[1].Gold += 35>>
<<set $character[1].experience += 90>>
<i>You gained 90 Experience from concluding this quest</i>
<</if>>
<<else>>
<<if $$npc.banditleader1.alive is false>>
<b><<print $character[1].Name>></b>: Their leader is dead, they will no longer bother you. Since there were too many heads, i brought their ears, if you don't mind.
<b><<print $npc.Elder.Name>></b>: No problem at all. Thank you, young ?man. Here are your reward. If you ever visit us again, we will provide you with proper meal and shelter.
<<set _gold to 48 - $event.chapter1.bandits>>
<<set $character[1].Gold += (_gold + 20)>>
<<set $character[1].experience += 90>>
<i>You gained 90 Experience from concluding this quest</i>
<<elseif $event.chapter1.banditLeaderOffer.active is true>>
<b><<print $character[1].Name>></b>: I talked with them, they will not bother you anymore. But anyway, since there were too many heads, i brought their ears, if you don't mind.
<b><<print $npc.Elder.Name>></b>: I see... As promised, here is the money
<<set _gold to 48 - $event.chapter1.bandits>>
<<set $character[1].Gold += (_gold + 20)>>
<<set $character[1].experience += 90>>
<i>You gained 90 Experience from concluding this quest</i>
<</if>>
[[Outside|Houses]]
<</if>><<run UIBar.stow();>><<run UIBar.hide();>>
<<set $character[1].currentLife += Math.round(($character[1].MAXLIFE * 0.45))>>
<<if $character.currentLife > $character[1].MAXLIFE>><<set $character[1].currentLife = $character[1].MAXLIFE>><</if>>
<<set $character[1].currentMana += Math.round(($character[1].MAXMANA * 0.45))>>
<<if $character.currentMana > $character[1].MAXMANA>><<set $character[1].currentMana = $character[1].MAXMANA>><</if>>
<<if $newEvent is true && $event.chapter1.banditraid !== false>>
<<fadein 200ms 8s>>
You hear cries and screams together with the hasted sound of steps hitting the barren ground.
<<fadein 200ms 10s>>
The villager's voices are loud and clear, filled with fear
<div align="center"><h3>"Bandits!"</h3></div>
Bandits have invaded the village!
<<set $event.chapter1.bandits to 14>>
[[You must go.|Houses][set $firstplace to "Houses"]]
<</fadein>>
<</fadein>>
<<else>>
<div align='left'><<set $randomLoreBit = $loreBits[$language][random(0, $loreBits[$language].length - 1)]>>
<<print $randomLoreBit>>
</div>
<div align='right'>
<<fadein 200ms 8s>>
You are not at all rested. In fact, your body hurts from sleeping at the ground.
<<fadein 200ms 10s>>
[[Continue|Houses]]
<</fadein>>
<</fadein>>
</div>
<</if>><<if $event.chapter1.bargedin is true>><<set _value to 15>><<else<<set _value to 10>><</if>>
<<test Stealth _value>>
<<onSuccess>>
You manage to move without being seen.
<<if $event.chapter1.lastplace === "Halls">>
To the [[Entrance]].
To the [[Armory]].
To the [[First Room|Room 1]].
To the [[Second Room|Room 2]].
<<if $event.chapter1.key is true>>
Midst the corpses you've looted, you have found a key, it could open the locked door.
To [[The main room]].<<else>> You can't seem to be able to open the door, it is locked.
<</if>>
<<elseif $event.chapter1.lastplace === 'Armory'>>
To the [[Halls]].
<<if $secret1 is true>>
To the [[Fortress Secret Tunnels]] .
<</if>>
<<elseif $event.chapter1.lastplace === "Room 2" || $event.chapter1.lastplace === "Room 1">>
To the [[Halls]].
<<else if $event.chapter1.lastplace === "The main room">>
To the [[Halls]].
<<if $secret1 is true>>
To the [[Fortress Secret Tunnels]].
<</if>>
<</if>>
<<onFailure>><<silently>>
<<set _faceWho to ["Ruffian", "HiredMuscle", "HiredSpellcaster"]>>
<<set _enemy1 to _faceWho[Math.floor(Math.random() * _faceWho.length)]>>
<<set _enemy2 to _faceWho[Math.floor(Math.random() * _faceWho.length)]>>
<<set _number1 to Math.floor(Math.random() * 2) + 1>>
<<set _words to ["Intruder!", "We are being attacked!", "We got ourselfs a little rat, guys!", "Look what we have here, huh?", "Shit!", "Shouldn't have come here!", "Looking to die kid?!". "Hand over what you have!"]>>
<</silently>>
As it was bound to happen...
<b>Bandit</b>: <<print _words[Math.floor(Math.random() * _words.lenght)]>>
<<link "You've been spotted!">>
<<battle _enemy1 _number1>><</battle>><<battle _enemy2 1>><</battle>>
<<set banditnumber -= _number1 + _number2>><<set $bodies += __number1 + _number2>><<goto "Combatpage">><<set $return to "DungeonTransition">>
<<if $event.chapter1.key !== true>><<_chance = rollDice('1d20')>><<if _chance > 15>><<set $event.chapter1.key to true>><</if>>
<</link>>
<</test>><p>Name: <<textbox "$character[1].Name" "Player's Character">></p>
<p>You are a <<= $character[1].Ancestry>> <<= $character[1].Specialization>>.</p>
<<link "Go to Village Raid">>
<<set $event.chapter1.bandits to 14>>
<<goto "Village Center">>
<<unset $creator>>
<</link>>
<<addItem "Long sword" enchant>><</addItem>>
<<addItem "Long sword" curse>><</addItem>>
<<addItem "Long sword">><</addItem>>
<<link "Bandit Hideout">>
<<goto "Village Center">>
<<unset $creator>>
<</link>>
<<link "Test Fight">>
<<battle "DeathKnight" 1>><</battle>>
<<battle "reanCorpse" 1>><</battle>>
<<goto "Combatpage">>
<</link>>
<p><<link "level up">>
<<set $character[1].experience += $xpToLevelUp>>
<<goto "level up passage">>
<<set $return to passage()>>
<<run window.levelCharUp()>>
<</link>><<link "+1000 XP">><<set $character[1].experience += 1000>><</link>></p>
<<link "Wait, i did not like my character. ">>
<<set $character[1] = $remember>>
<<set $character[1].level to 1>>
<<set $xpToLevelUp to 75>>
<<run window.randomCharacterCreation()>>
<<goto "Jump in">>
<<set $creator to true>>
<</link>>
<<if $creator is true>>
<<set $creator to false>>
<<silently>>
<<if $character[1].Specialization === "Vanguard">>
<<run State.variables.character[1].addTrait("Phalanx Training")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Rusted sword">><</addItem>> <<addItem "Shield">><</addItem>>
<<elseif $character[1].Specialization === "Shredder">>
<<run State.variables.character[1].addSkill("Shredder Stance")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Rusted sword">><</addItem>> <<addItem "Short sword">><</addItem>>
<<elseif $character[1].Specialization === "Archer">>
<<run State.variables.character[1].addSkill("Quick Shot")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Short bow">><</addItem>>
<<elseif $character[1].Specialization === "Duelist">>
<<run State.variables.character[1].addSkill("Feint")>>
<<run State.variables.character[1].addSkill("Intimidate")>>
<<run State.variables.character[1].addSkill("Dodge")>>
<<addItem "Pants">><</addItem>> <<addItem "Gamberson">><</addItem>>
<<addItem "Rapier">><</addItem>>
<<elseif $character[1].Specialization === "Thief">>
<<run State.variables.character[1].addSkill("Pickpocket")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>><<addItem "Hood">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Dagger">><</addItem>> <<addItem "Pants">><</addItem>>
<<elseif $character[1].Specialization === "Assassin">>
<<run State.variables.character[1].addSkill("Apply Venom")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>>
<<addItem "Hood">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Crossbow">><</addItem>><<addItem "Wooden shield">><</addItem>>
<<elseif $character[1].Specialization === "Spy">>
<<run State.variables.character[1].addTrait("Silver Tongue")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>>
<<addItem "Mask">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Dagger">><</addItem>>
<<elseif $character[1].Specialization === "Trapper">>
<<run State.variables.character[1].addTrait("Lay-in-Wait")>>
<<run State.variables.character[1].addSkill("Sneak")>>
<<run State.variables.character[1].addSkill("True Strike")>>
<<addItem "Hood">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Leather armor">><</addItem>> <<addItem "Crossbow">><</addItem>>
<<elseif $character[1].Specialization === "Berserker">>
<<run State.variables.character[1].addTrait("Though Skin")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<addItem "Belted skirt">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Great axe">><</addItem>>
<<elseif $character[1].Specialization === "Feral">>
<<run State.variables.character[1].addTrait("Natural Fighter")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<elseif $character[1].Specialization === "Juggernaut">>
<<run State.variables.character[1].addTrait("Iron Suit")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<addItem "Coif">><</addItem>><<addItem "Leather armor">><</addItem>> <<addItem "Buckle">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Rusted sword">><</addItem>> <<addItem "Wooden shield">><</addItem>>
<<elseif $character[1].Specialization === "Shaman">>
<<run State.variables.character[1].addSkill("Call the Elements")>>
<<run State.variables.character[1].addSkill("Heabutt")>>
<<run State.variables.character[1].addSkill("Rend")>>
<<addItem "Wool Shirt">><</addItem>><<addItem "Belted Skirt">><</addItem>><<addItem "Circlet">><</addItem>>
<<addItem "Pants">><</addItem>> <<addItem "Shield">><</addItem>>
<<elseif $character[1].Specialization === "Wizard">>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>><<addItem "Wool shirt">><</addItem>> <<addItem "Circlet">><</addItem>> <<addItem "Arcane staff">><</addItem>><<addItem "Pants">><</addItem>>
<<elseif $character[1].Specialization === "Warlock">><<addItem "Wool shirt">><</addItem>><<addItem "Circlet">><</addItem>> <<addItem "Wand">><</addItem>> <<addItem "Spellbook">><</addItem>> <<addItem "Pants">><</addItem>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>>
<<if $character[1].Pact === "Shadows">>
<<run State.variables.character[1].addSkill("Summon: Shadow")>>
<</if>>
<<elseif $character[1].Specialization === "Invoker">>
<<addItem "Wool shirt">><</addItem>> <<addItem "Circlet">><</addItem>><<addItem "Arcane staff">><</addItem>><<addItem "Pants">><</addItem>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>>
<<elseif $character[1].Specialization === "Spellblade">>
<<addItem "Wool shirt">><</addItem>> <<addItem "Belt">><</addItem>>
<<addItem "Pants">><</addItem>> <<addItem "Wand">><</addItem>><<addItem "Shield">><</addItem>>
<<run State.variables.character[1].addTrait("Arcane Initiation")>>
<<run State.variables.character[1].addSkill("Dazzle")>>
<<run State.variables.character[1].addSkill("Infuse Weapon")>>
<<run State.variables.character[1].addSkill("Fire Bolt")>>
<<run State.variables.character[1].addSkill("Lightning Strike")>>
<<run State.variables.character[1].addSkill("Freeze")>>
<<elseif $character[1].Specialization === "Dancer">>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addTrait("Blade Dancer")>>
<<addItem "Circlet">><</addItem>> <<addItem "Wool shirt">><</addItem>><<addItem "Belted skirt">><</addItem>> <<addItem "Scimitar">><</addItem>>
<<elseif $character[1].Specialization === "Bard">>
<<addItem "Belt">><</addItem>> <<addItem "Pants">><</addItem>> <<addItem "Wool shirt">><</addItem>><<addItem "Short sword">><</addItem>> <<addItem "Lute">><</addItem>>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addSkill("Earworm")>>
<<elseif $character[1].Specialization === "Scholar">>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addTrait("Novice Knowledge")>>
<<addItem "Wool shirt">><</addItem>> <<addItem "Belt">><</addItem>>
<<addItem "Pants">><</addItem>> <<addItem "Quatterstaff">><</addItem>>
<<elseif $character[1].Specialization === "Barber Surgeon">>
<<run State.variables.character[1].addSkill("Inspire")>>
<<run State.variables.character[1].addSkill("BOOM!")>>
<<run State.variables.character[1].addTrait("Cirurgic Precision")>>
<<addItem "Pants">><</addItem>> <<addItem "Wool shirt">><</addItem>><<addItem "Throwing knifes">><</addItem>> <<addItem "Dagger">><</addItem>>
<<elseif $character[1].Specialization === "Paladin">><<addItem "Holy garments">><</addItem>> <<addItem "Pants">><</addItem>> <<addItem "Warhammer">><</addItem>>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Aura of Devotion")>>
<<elseif $character[1].Specialization === "Cleric">> <<addItem "Holy garments">><</addItem>> <<addItem "Pants">><</addItem>> <<addItem "Wand">><</addItem>> <<addItem "Divine symbol">><</addItem>>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Divine Fondation")>>
<<run State.variables.character[1].addSkill("Heal")>>
<<run State.variables.character[1].addSkill("Judgement")>>
<<run State.variables.character[1].addSkill("Shield of the Faithful")>>
<<elseif $character[1].Specialization === "Inquisitor">><<addItem "Holy garments">><</addItem>> <<addItem "Divine symbol">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Mace">><</addItem>>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Brand The Heretic")>>
<<elseif $character[1].Specialization === "Flagellant">>
<<run State.variables.character[1].addSkill("Prayer")>>
<<run State.variables.character[1].addSkill("Sacred Flame")>>
<<run State.variables.character[1].addTrait("Penitent Strike")>>
</div><<addItem "Holy garments">><</addItem>><<addItem "Pants">><</addItem>> <<addItem "Flail">><</addItem>>
<</if>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE = parseInt(25 + ($character[1].RES + Math.round($character[1].PER / 2)) * $character[1].level + 5)>>
<<set $character[1].currentLife = parseInt(25 + ($character[1].RES + Math.round($character[1].PER / 2)) * $character[1].level + 5)>>
<<set $character[1].MAXMANA = parseInt(10 + $character[1].RES + Math.round($character[1].PER / 2) + 5 * $character[1].level)>>
<<set $character[1].currentMana to parseInt($character[1].MAXMANA)>>
<<elseif $character[1].Ancestry === 'Herald' && $heraldChoice === "Nature">>
<<set $character[1].MAXLIFE = parseInt(25 + $character[1].RES * $character[1].level + 5 + $character[1].MAXMANA)>>
<<set $character[1].currentLife = parseInt(25 + $character[1].RES * $character[1].level + 5 + $character[1].MAXMANA)>>
<<set $character[1].MAXMANA = parseInt(Math.round(10 + $character[1].RES + 5 * $character[1].level) / 2)>>
<<set $character[1].currentMana to parseInt($character[1].MAXMANA)>>
<<else>>
<<set $character[1].MAXLIFE = parseInt(25 + $character[1].RES * $character[1].level + 5)>>
<<set $character[1].currentLife = parseInt(25 + $character[1].RES * $character[1].level + 5)>>
<<set $character[1].MAXMANA = parseInt(10 + $character[1].RES + 5 * $character[1].level)>>
<<set $character[1].currentMana to parseInt($character[1].MAXMANA)>>
<</if>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += parseInt($character[1].MAXMANA)>>
<<set $character[1].currentLife += parseInt($character[1].currentMana)>>
<<elseif $character[1].Pact === "Shadow">>
<<set $character[1].MAXLIFE = parseInt(Math.round($character[1].MAXLIFE * 0.15))>>
<<set $character[1].currentLife = parseInt(Math.round($character[1].currentLife * 0.15))>>
<</if>><<set $character[1].Athletics += Math.round($character[1].STR / 3)>> <<set $character[1].Acrobatics += Math.round($character[1].DEX / 3)>> <<set $character[1].Stealth += Math.round($character[1].DEX / 3)>> <<set $character[1].SleightofHands += Math.round($character[1].DEX / 3)>> <<set $character[1].WorldKnowledge += Math.round($character[1].INT / 3)>> <<set $character[1].MysticalKnowledge += Math.round($character[1].INT / 3)>> <<set $character[1].ArcaneKnowledge += Math.round($character[1].INT / 3)>> <<set $character[1].Speech += Math.round($character[1].CHA / 3)>> <<set $character[1].Arts += Math.round($character[1].CHA / 3)>> <<set $character[1].Intimidation += Math.round($character[1].CHA / 3)>> <<set $character[1].Insight += Math.round($character[1].PER / 3)>> <<set $character[1].Awareness += Math.round($character[1].PER / 3)>>
<<if $character[1].Ancestry === 'Human'>><<run $character[1].addTrait('Adaptable')>> <<run $character[1].addTrait('Unlimited Potential')>> <<elseif $character[1].Ancestry === 'Vanadi'>> <<run $character[1].addTrait('Animal senses')>> <<run State.variables.character[1].addTrait("Feral Mask")>> <<set $character[1].additionalHitChance += 5>> <<elseif $character[1].Ancestry === 'Dwarf'>><<run $character[1].addTrait('Reforger')>> <<run $character[1].addTrait('Ancestral Knowledge')>> <<elseif $character[1].Ancestry === 'Elf'>> <<run $character[1].addTrait('Favored')>> <<run $character[1].addTrait('Harmonious Existence')>> <<elseif $character[1].Ancestry === 'Draconian'>> <<set $character[1].BaseDefense = 15>><<run $character[1].addTrait('Natural Warriors')>> <<run $character[1].addTrait('Underwater Marauder')>> <<elseif $character[1].Ancestry === 'Herald'>><<run $character[1].addTrait('Arcane Core')>> <<if $HeraldChoice === "Nature's Harbinger">><<run $character[1].addTrait("Nature's Blessing")>> <<elseif $HeraldChoice === "Cosmos' Harbinger">> <<run $character[1].addTrait("Astral Connection")>>
<<elseif $HeraldChoice === "Creation's Harbinger">> <<run $character[1].addTrait("Architect of Reality")>> <<elseif $HeraldChoice === "Destruction's Harbinger">> <<run $character[1].addTrait("Eternal Hunger")>>
<</if>>
<</if>>
<<run $character[1].addSkill("Rest")>>
<</silently>>
<</if>><<set $newEvent to true>>
<<set $event.chapter1 to []>>
<<set $event.chapter1.banditraid to "let's go!">>
<<set $creator to true>>
<<set $remember = $character[1]>>
<<run window.randomCharacterCreation()>>
<<goto "Jump in">><<silently>>
<<set _skillInfo to []>>
<<set _bardSkills = []>>
<<for _i to 0; _i lt $skill.length; _i++>>
<<if $skill[_i].categories.includes("Spell") && !($character[1].skills.includes($skill[_i].name)) && $skill[_i].name !== "Blizzard" && $skill[_i].name !== "Inferno" && $skill[_i].name !== "Storm" && $skill[_i].name !== "Summon Arcane Blade" && !($skill[_i].categories.includes("Vampyr")) && !($skill[_i].categories.includes("Pact"))>>
<<set _skillInfo.push($skill[_i])>>
<<set _bardSkills.push($skill[_i].name)>>
<</if>>
<</for>>
<</silently>>
<<for _j to 0; _j lt _bardSkills.length; _j++>>
<<radiobutton "_skilltoAdd" "_bardSkills[_j]">> <b><<if $language is "EN">><<print _bardSkills[_j]>><<elseif $language is "PT-BR">><<print _skillInfo[_j].name_pt>><</if>></b>
<<if $language is "EN">><b>Essence cost:</b><<elseif $language is "PT-BR">>Custo de Essência<</if>> <<print _skillInfo[_j].Manacost>>
<<if $language is "EN">><b>A.P cost:</b><<elseif $language is "PT-BR">> Custo de P.A.<</if>> <<print _skillInfo[_j].APCost>>
<<if $language is "EN">><b>Description:</b><<print _skillInfo[_j].description>><<elseif $language is "PT-BR">><b>Descrição:</b> <<print _skillInfo[_j].desc_pt>><</if>>
<<if $language is "EN">><b>Cooldown:</b> <<print _skillInfo[_j].cooldown>> turns.<<elseif $language is "PT-BR">><b>Tempo de Recarga:</b> <<print _skillInfo[_j].cooldown>> turnos.<</if>>
<hr>
<</for>><<set $return to "The main room">>
<<switch _times>>
<<case 1>>
<<if _offer < 100>>
<b><<print $character[1].Name>></b>: Oh please,... that's the best you can offer?
<<linkreplace "As if you were that rich.">>
<<set _time-->>
<b><<print $character[1].Name>></b>: Oh please, i doubt you even ever saw this amount of gold in your whole life.
<b><<print $npc.banditleader1.Name>></b>: Maybe, but it is not just me you gotta bribe, the boys will not be happy with the moving. We gotta attached to the place, you know?
<b><<print $character[1].Name>></b>: Fine! how about <span id="that"<<numberbox "_offer" 75>></span> <<linkappend "pieces?">> <<replace "#that">><</replace>><br><<set _offer to 0>><<set _roll = rollDice('1d20')>><<set times++>>
<<include "offering">>
<</linkappend>>
<</linkreplace>>
<<elseif _offer > 100 && _offer > $character[1].Gold>>
<<if _roll + _banditAwareness >= $character[1].Speech>>
<b><<print $npc.banditleader1.Name>></b>: Oh? That's a nice sum, how about you show the money, then?
<b><<print $character[1].Name>></b>: What? Do you think i would come up here and just lie to you?
<b><<print $npc.banditleader1.Name>></b>: So you don't have the money, then... You know you shouldn't promise things you can't do.
What embaressment, but he is right. Now, what will you do?
<p><span id="violence"><<link "Just kill with him already.">> <<battle banditLeader 1>><</battle>> <<set $npc.banditleader1.alive to false>> <<goto "Combatpage">>
<</link>>or try to </span> <<linkreplace "convince him">><<replace "#violence">
<p><b><<print $character[1].Name>></b>: I don't have the money <b>yet</b>! Give just 3 day and i can give you the amount.</p>
<<set _roll to rollDice('1d20')>>
<<if _roll + _banditAwareness < $character[1].Speech>>
<b><<print $npc.banditleader1.Name>></b>: Okay, fine, bring me 95 coins and me and the boys will be leaving. Fail to do that, and we raid that shithole for the last time and then you.
<b><<print $character[1].Name>></b>: And your men, will they let me go?
<b><<print $npc.banditleader1.Name>></b>: But of course! I am a fucking gentlemen after all.
<<link "Fair enough!">>
<<set $event.chapter1.banditLeaderOffer to [active: true, value: 95]>>
<<goto "Entrance">>
<</link>>
<<else>>
<b><<print $npc.banditleader1.Name>></b>: Do you think i am an idiot? Fat chance! Now die!
<<link "Oh no!">>
<<battle banditLeader 1>><</battle>>
<<set $npc.banditleader1.alive to false>>
<<goto "Combatpage">>
<</link>>
<</if>>
<</replace>>
<</linkreplace>></p>
<<else>>
<b><<print $npc.banditleader1.Name>></b>: <<print _offeer>>? Well, the boys will surely like the sum, okay, just hand it over and the deal is done.
Shoot. You don't even have that much gold.
<b><<print $character[1].Name>></b>: H-hold on, whats the garantee that you men will let me go?
<b><<print $npc.banditleader1.Name>></b>: What? Didn't you came here dealing with them left from right? Can't you just do that on your way out?
<b><<print $character[1].Name>></b>: Let's set up a meeting, on another point. There i will hand your money.
<<set _roll2 to rollDice('1d20')>>
<<if _roll2 + _banditAwareness >= $character[1].Speech>>
<b><<print $npc.banditleader1.Name>></b>: No, you either hand over the money right here or there is no deal.
<<link "Then i guess there is no point continuing">>
<<battle banditLeader 1>><</battle>>
<<set $npc.banditleader1.alive to false>>
<<goto "Combatpage">>
<</link>>
<<else>>
<b><<print $npc.banditleader1.Name>></b>: Tsc, fine, i'll tell my boys to let you go. But if you are one minute late, we are attacking the village<<if $event.chapter1.banditraid === "raided">> again! And this time, <<else>>! And<</if>>, we will be killing each one of those vermin.
<<link "Fair enough">>
<<set $event.chapter1.banditLeaderOffer to [active: true, value: _offer]>>
<<if $event.chapter1.banditraid !== true>><<set event.banditraid to "stopped">><</if>><<goto "AfterBanditFortress">>
<</link>>
<</if>>
<</if>>
<<elseif _offer > 100 && _offer <= $character[1].Gold>>
<b><<print $npc.banditleader1.Name>></b>: <<print _offeer>>? Well, the boys will surely like the sum, okay, just hand it over and the deal is done.
You could give him the money right now, but would that be a good idea? Therer is no guarantee that you would leave here alive.
<b><<print $npc.banditleader1.Name>></b>: Come on, i am getting impacient.
<span id="offer2">
<p><<link "Just hand the money">>
<b><<print $character[1].Name>></b>: Fine, here it is. <<set $character[1].Gold -= _offer>>
<<battle banditLeader 1>><</battle>><<set $enemyInstances[0].Gold += _offer>>
<b><<print $npc.banditleader1.Name>></b>: Oh execelent, now. i just have to deal with you.
Oh no, who could've guess it, huh?
<<link "Oh, shut it">>
<<set $npc.banditleader1.alive to false>>
<<goto "Combatpage">>
<</link>>
<</link>> or
<<link "That would be a bad idea">><<replace "#offer2">>
<b><<print $character[1].Name>></b>: H-hold on, whats the garantee that you men will let me go?
<b><<print $npc.banditleader1.Name>></b>: What? Didn't you came here dealing with them left from right? Can't you just do that on your way out?
<b><<print $character[1].Name>></b>: Let's set up a meeting, on another point. There i will hand your money.
<<set _roll2 to rollDice('1d20')>>
<<if _roll2 + _banditAwareness >= $character[1].Speech>>
<b><<print $npc.banditleader1.Name>></b>: No, you either hand over the money right here or there is no deal.
<<link "Then i guess there is no point continuing">>
<<battle banditLeader 1>><</battle>>
<<set $npc.banditleader1.alive to false>>
<<goto "Combatpage">>
<</link>>
<<else>>
<b><<print $npc.banditleader1.Name>></b>: Tsc, fine, i'll tell my boys to let you go. But if you are one minute late, we are attacking the village<<if $event.chapter1.banditraid === "raided">> again! And this time, <<else>>! And<</if>>, we will be killing each one of those vermin.
<<link "Fair enough">>
<<set $event.chapter1.banditLeaderOffer to [active: true, value: _offer]>>
<<if $event.chapter1.banditraid !== true>><<set event.banditraid to "stopped">><</if>><<goto "AfterBanditFortress">>
<</link>>
<</if>>
<</if>>
<</replace>><</link>></p>
</span>
<</if>>
<<case 2>>
<<battle banditLeader 1>><</battle>>
<<if $event.chapter1.bandits < 3>><<switch $event.chapter1.bandits>><<case 1>><<set _amount to "one">><<case 2>><<set _amount to "two">><</switch>>
<<battle Ruffian $event.chapter1.bandits>><</battle>>
<<else>> <<battle Ruffian 3>> <<set _amount to "three">><</battle>>
<<replace "#discussion">>
Interrupting your conversation, he door opens wide, and with it, <<print _amount>> men surging with weapons in hands aiming at your figure.
<b><<print $npc.banditleader1.Name>></b>: Well, well, well, looks like you wasted your precious little time, my "friend". Now... neither of us are leaving.
You are surrounded by enemies now. Should have killed the man when you had the chance.
<<link "Fuck...">>
<<set $npc.banditleader1.alive to false>>
<<goto "Combatpage">>
<<set $return to "The main room">>
<</link>>
<</replace>>
<</switch>><<if $event.chapter1.banditraid === "raided" && $event.chapter1.banditLeaderOffer.active === true && ($event.chapter1.initBandits == "hired" || $event.chapter1.initBandits == "unresolved")>>
<<elseif $event.chapter1.banditraid === "raided" && $event.chapter1.banditLeaderOffer.active === false && $event.chapter1.initBandits == "hired">>
<<elseif $event.chapter1.banditraid === "raided" && $event.chapter1.banditLeaderOffer.active === false && $event.chapter1.initBandits == "resolved">>
<<if $event.chapter1.banditraid === "stopped" && $event.chapter1.banditLeaderOffer.active === true && ($event.chapter1.initBandits == "hired" || $event.chapter1.initBandits == "unresolved")>>
<<elseif $event.chapter1.banditraid === "stopped" && $event.chapter1.banditLeaderOffer.active === false && $event.chapter1.initBandits == "hired">>
<<elseif $event.chapter1.banditraid === "stopped" && $event.chapter1.banditLeaderOffer.active === false && $event.chapter1.initBandits == "resolved">>
<</if>><<set _timeSkip to window.rollDice('1d4')>>
<<if $character[1].Origin !== "" && $character[1].Origin !== "Unknown" && passage() !== "Inventory" && passage() !== "Characterpage" && passage() !== "Jornal" && passage() !== "level up passage">>
<<set $now = setup.changeDate(State.variables.now, 'minutes', State.temporary.timeSkip)>>
<</if>><<test Awareness 14>>
<<onSuccess>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
You did it!
You can now [[go back to the armory|Armory]].
<<onFailure>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
An hour has passed and you are still stuck inside these tunnels.
<<include "endlessTest">>
<</if>>
<</test>>
<span id="itsdark">
<p><<link "North">><<replace "#itsdark">>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200 7s>>
You find a door. But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<test "Sleight of Hands">>
<<onSuccess>>
<<onFailure>>
<</test>>
<</if>>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>>, <<link "South">><<replace "#itsdark">>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 6s>>
...Until...
<<fadein 200 9s>>
You find yourself outside of the fortress. <<if $hour > 18>> It is already night...<<else>> It is day.<</if>>
What to do?
<<link "Rest? [1 hour]">>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
<<set $character[1].currentLife += Math.round(($character[1].MAXLIFE * 0.15))>><<if $character[1].currentLife > $character[1].MAXLIFE>><<set $character[1].currentLife = $character[1].MAXLIFE>><</if>
<<set $character[1].currentMana += Math.round(($character[1].MAXMANA * 0.15))>><<if $character[1].currentMana > $character[1].MAXMANA>><<set $character[1].currentMana = $character[1].MAXMANA>><</if>
<<replace "#rest">><<fadein 200ms 10s>
You somewhat rested. Recovering a bit of your lost Lifeblood and Essence.
<<link "Go back to the armory?">><<goto 'Armory'>><</link>>
<<link "Go West.">><<replace "#itsdark">>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200ms 7s>>
You find a door! <<fadein 200ms 9s>> But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<if $event.chapter1.secret1Door !== "not oppening">>
<<test "Sleight of Hands">>
<<onSuccess>>
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
You try and try as much as you like, but... Well... you ain't opening this door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<<else>>
That dammed door that won't bulge....
[[Go back|Armory]]
<</if>><</fadein>>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>>
<</replace>>
<</link>>
<span id="rest"></span>
<</fadein>><</fadein>><</fadein>>
<</replace>><</link>> or <<link "West">><<replace "#itsdark">>
<<replace "#itsdark">>
<<fadein 200ms 3s>>
You walk for minutes...
<<fadein 200ms 5s>>
...Until...
<<fadein 200ms 7s>>
You find a door! <<fadein 200ms 9s>> But it is locked.
<<if $charcter[1].inventory.includes($Items.Lockpick)>>
Thankfully, with a little bit of effort and dedication, and a set of lockpicks, you manage to pry it open.
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<else>>
<<if $event.chapter1.secret1Door !== "not oppening">>
<<test "Sleight of Hands">>
<<onSuccess>>
[[Pass though the door.|The main room][$event.chapter1.surprise is true]]
<<onFailure>>
You try and try as much as you like, but... Well... you ain't opening this door...
[[Just give up...|Armory][$event.chapter1.secret1Door to "not openning"]]
<</test>>
<</if>>
<<else>>
That dammed door that won't bulge....
[[Go back|Armory]]
<</if>><</fadein>>
<</fadein>><</fadein>><</fadein>>
<</replace>>
<</replace>><</link>>?</p></span><<test Awareness 8>>
<<onSucess>>
<<set $event.chapter1.haha to true>>
Nope, it was just a waste of time...
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
<<onFailure>>
<<set State.variables.now to setup.changeDate(State.variables.now, 'hours', 1)>>
You could not find anything... Perhaps if you try again you might find something?
<<include "anotherendless">>
<</test>>Config.saves.autosave = true;
var changingLanguage = function (chosen) {
switch (settings.language) {
case "English":
State.variables.language = "EN";
break;
case "(Brasil) Português":
State.variables.language = "PT-BR";
break;
}
Engine.play(State.passage);
}
Setting.addList("language", {
label: "Choose the language you desire to play the game",
list: ["English", "(Brasil) Português"],
default: "English",
onChange: changingLanguage,
});
var $rightUiBar = $('<div id="right-ui-bar"></div>').insertAfter("#ui-bar");
var rightTray = $rightUiBar.append('<div id="right-ui-bar-tray"><button id="right-ui-bar-toggle" tabindex="0" title="Toggle the Right UI bar" aria-label="Toggle the Right UI bar" type="button"></button></div>');
var rightBody = $rightUiBar.append('<div id="right-ui-bar-body"></div>');
/* Attach the toggle button click. */
$rightUiBar.find('#right-ui-bar-toggle').ariaClick({label : "Toggle the Right UI bar"}, () => $rightUiBar.toggleClass('stowed'));
/* Automatically show the contents of the StoryRightSidebar passage in the right-ui-bar-body element. */
postrender["Display Right Sidebar Contents"] = function (content, taskName) {
setPageElement('right-ui-bar-body', 'StoryRightSidebar');
};
window.hideRightUIBar = function() {
$rightUiBar.toggleClass('stowed');
$rightUiBar.hide();
}
window.showRightUIBar = function() {
$rightUiBar.toggleClass('stowed');
$rightUiBar.show();
}
var meta = document.createElement('meta');
meta.name = 'viewport';
meta.content = 'width=device-width, initial-scale=1.0';
// Append the meta element to the document head
document.head.appendChild(meta);
State.variables.now = new Date('1 March 1397 11:10');
const currentTime = new Date(Date.now());
if (! setup.changeDate) {
setup.changeDate = function(date, interval, units) {
var d = new Date(date); // Don't change original date.
switch(interval.toLowerCase()) {
case 'years':
d.setFullYear(d.getFullYear() + units);
break;
case 'quarters':
d.setMonth(d.getMonth() + 3 * units);
break;
case 'months':
d.setMonth(d.getMonth() + units);
break;
case 'weeks':
d.setDate(d.getDate() + 7 * units);
break;
case 'days':
d.setDate(d.getDate() + units);
break;
case 'hours':
d.setTime(d.getTime() + units * 3600000);
break;
case 'minutes':
d.setTime(d.getTime() + units * 60000);
break;
default:
break;
}
return d;
};
}
function setReturn() {
if (!State.passage.tags.includes("menu") || State.passage.tags.includes("Combat")) {
State.variables.$return = State.passage.title;
}
}
function round(value, decimals) {
return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals);
}
if (Config.macros.maxLoopIterations < 2000) {
Config.macros.maxLoopIterations = 2000;
}
State.variables.skill = [];
State.variables.Items = {};
class Item {
constructor(Name,options = {}) {
this.ID = options.ID || null;
this.Name = options.Name || "Unnamed Item";
this.Singular = options.Singular || "A " + this.Name;
this.Plural = options.Plural || this.Name + "s";
this.Description = options.Description || "yet to add";
this.Type = options.Type || [];
this.Slot = options.Slot || null;
this.Price = options.Price || 0;
this.ammo = options.ammo || 0;
this.equipped = false;
this.Damage = options.Damage || null;
this.Defense = options.Defense || null;
this.Cooldown = options.Cooldown || 0;
this.incooldown = options.incooldown || 0;
this.icon = options.icon || "img/ItemsIcons/Missing.png";
//portuguese
this.Name_pt = options.Name_pt || options.Name;
this.Plural_pt = options.Plural_pt || options.Name + "s";
this.Description_pt = options.Description_pt || "A adicionar";
this.Type_pt = options.Type_pt || [];
}
}
function createItem(name, options) {
options.Name = name;
options.Description = options.Description || "yet to add";
State.variables.Items[name] = new Item(name, options);
}
var emptyFlask = createItem("Empty Flask", {
Price: 10,
Decription: "What remains after a drink.",
Description_pt: "O que resta depois de uma bêbida.",
Name_pt: "Frasco Vazio",
Plural_pt: "Fracos Vazios",
Type: ["object", "alchemy", "whorthless"],
Type_pt: ["objeto", "alquimia", "sem valor"],
})
var lamp = createItem("Lamp", {
Price: 20,
Decription: "For those afraid of the dark.",
Description_pt: "Para aqueles que temêm o escuro.",
Name_pt: "Lampârina",
Type: ["object", "lightsource", "adventure gear"],
Type_pt: ["objeto", "fonte de luz", "itêm de aventura"],
});
var rope = createItem("Rope", {
Price: 15,
Decription: "It's a rope. Rope it helps.",
Description_pt: "É uma corda. Vê se aCorda.",
Name_pt: "Corda",
Type: ["object", "adventure gear"],
});
var lockpick = createItem("Lockpick", {
Price: 7,
Decription: "For those that like to open or steal things.",
Description_pt: "Para aqueles que gostam de abrir e roubar coisas.",
Name_pt: "Gázua",
Type: ["object", "adventure gear", "crime gear"],
});
//more food items (Sausage, Cheese, Soup (description: WHY THE HELL ARE YOU WITH A SOUP ON YOUR INVENTORY???!), Cookies, Chicken Drum, Grealed Tailback (8 out 10 Draconians says it their favorite) ,
var rations = createItem("Rations", {
Price: 5,
Plural: "Rations",
Description: "Bleurgh... it's... urgh... yummy.",
Description_pt: "Bleurgh... é... urgh... totoso.",
Name_pt: "Rações",
Plural_pt: "Rações",
Type: ["food", "consumable"],
Type: ["comida", "consumível"],
onUse: function () {
State.variables.characte[1].currentLife += 7
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
setup.notify(`You regained 7 Lifeblood back.`);
removeItemFromInventory(this.Name);
updateInventoryDisplay();
}
});
var smallHealthpotion = createItem("Small Red potion", {
Price: 60,
Description: "Terrible taste.",
Description_pt: "Péssimo gosto.",
Name_pt: "Poção Vermelha pequena",
Plural_pt: "Pequenas Poções Vermelhas",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missinglife = State.variables.character[1].currentLife -State.variables.character[1].MAXLIFE;
State.variables.character[1].currentLife += Math.round(missinglife * 0.2) + 10
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
setup.notify(`You regained ${Math.round(missinglife * 0.2) + 10} Lifeblood back.`);
removeItemFromInventory(this.Name)
addItemToInventory("Empty Flask")
updateInventoryDisplay()
}
});
var smallManapotion = createItem("Small Blue potion", {
Price: 50,
Description: "Terrible taste.",
Description_pt: "Péssimo gosto.",
Name_pt: "Pequena Poção Azul",
Plural_pt: "Pequenas Poções Azuis",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missingMana = State.variables.character[1].currentMana -State.variables.character[1].MAXMANA;
State.variables.character[1].currentMana += Math.round(missingMana * 0.2) + 5
if (State.variables.character[1].currentMana > State.variables.character[1].MAXMANA) {
State.variables.character[1].currentMana = State.variables.character[1].MAXMANA
}
setup.notify(`You regained ${Math.round(missingMana * 0.2) + 5} Essence back.`);
removeItemFromInventory(this.Name)
addItemToInventory("Empty Flask")
updateInventoryDisplay()
}
});
var smallBothpotion = createItem("Small Purple potion", {
Price: 75,
Description: "Terrible taste.",
Description_pt: "Péssimo gosto.",
Name_pt: "Pequena Poção Roxa",
Plural_pt: "Pequenas Poções Roxas",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missingMana = State.variables.character[1].currentMana -State.variables.character[1].MAXMANA;
State.variables.character[1].currentMana += Math.round(missingMana * 0.15) + 5
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
const missinglife = State.variables.character[1].currentLife -State.variables.character[1].MAXLIFE;
State.variables.character[1].currentLife += Math.round(missinglife * 0.15) + 10
if (State.variables.character[1].currentMana > State.variables.character[1].MAXMANA) {
State.variables.character[1].currentMana = State.variables.character[1].MAXMANA
}
setup.notify(`You regained ${Math.round(missinglife * 0.15) + 10} Lifeblood and ${Math.round(missingMana * 0.15) + 5} Essence back.`);
removeItemFromInventory(this.Name)
addItemToInventory("Empty Flask")
updateInventoryDisplay()
}
});
var Healthpotion = createItem("Red potion", {
Price: 95,
Description: "Well, at least the taste is not that bad.",
Description_pt: "Bom, pelo menos o gosto não é tão ruim.",
Name_pt:"Poção Vermelha",
Plural_pt: "Poções Vermelhas",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missinglife = State.variables.character[1].currentLife -State.variables.character[1].MAXLIFE;
State.variables.character[1].currentLife += Math.round(missinglife * 0.4) + 20
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
setup.notify(`You regained ${Math.round(missinglife * 0.4) + 20} Lifeblood back.`);
removeItemFromInventory(this.Name)
addItemToInventory("Empty Flask")
updateInventoryDisplay()
}
});
var Manapotion = createItem("Blue potion", {
Price: 80,
Description: "Well, at least the taste is not that bad.",
Description_pt: "Bom, pelo menos o gosto não é tão ruim.",
Name_pt:"Poção Azul",
Plural_pt: "Poções Azuis",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missingMana = State.variables.character[1].currentMana -State.variables.character[1].MAXMANA;
State.variables.character[1].currentMana += Math.round(missingMana * 0.4) + 15
if (State.variables.character[1].currentMana > State.variables.character[1].MAXMANA) {
State.variables.character[1].currentMana = State.variables.character[1].MAXMANA
}
setup.notify(`You regained ${Math.round(missingMana * 0.4) + 15} Essence back.`);
removeItemFromInventory(this.Name)
addItemToInventory ("Empty Flask")
updateInventoryDisplay()
}
});
var Bothpotion = createItem("Purple potion", {
Price: 115,
Description: "Well, at least the taste is not that bad.",
Description_pt: "Bom, pelo menos o gosto não é tão ruim.",
Name_pt:"Poção Roxa",
Plural_pt: "Poções Roxas",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missingMana = State.variables.character[1].currentMana -State.variables.character[1].MAXMANA;
State.variables.character[1].currentMana += Math.round(missingMana * 0.3) + 15
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
const missinglife = State.variables.character[1].currentLife -State.variables.character[1].MAXLIFE;
State.variables.character[1].currentLife += Math.round(missinglife * 0.3) + 20
if (State.variables.character[1].currentMana > State.variables.character[1].MAXMANA) {
State.variables.character[1].currentMana = State.variables.character[1].MAXMANA
}
setup.notify(`You regained ${Math.round(missinglife * 0.3) + 20} Lifeblood and ${Math.round(missingMana * 0.3) + 15} Essence back.`);
//remove this item from the inventory, then add
removeItemFromInventory(this.Name)
addItemToInventory("Empty Flask")
updateInventoryDisplay()
}
});
var LargeHealthpotion = createItem("Large Red potion", {
Price: 145,
Description: "Oh! Finally something that taste good...",
Description_pt: "Oh! Finalmente algo de bom gosto...",
Name_pt: "Grande Poção Vermelha",
Plural_pt:"Grande Poções Vermelhas",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missinglife = State.variables.character[1].currentLife -State.variables.character[1].MAXLIFE;
State.variables.character[1].currentLife += Math.round(missinglife * 0.6) + 40
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
setup.notify(`You regained ${Math.round(missinglife * 0.6) + 40} Lifeblood back.`);
removeItemFromInventory(this.Name)
addItemToInventory ("Empty Flask")
updateInventoryDisplay()
}
});
var LargeManapotion = createItem("Large Blue potion", {
Price: 120,
Description: "Oh! Finally something that taste good...",
Description_pt: "Oh! Finalmente algo de bom gosto...",
Name_pt:"Grande Poção Azul",
Plural_pt:"Grande Poções Azuis",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missingMana = State.variables.character[1].currentMana -State.variables.character[1].MAXMANA;
State.variables.character[1].currentMana += Math.round(missingMana * 0.6) + 25
if (State.variables.character[1].currentMana > State.variables.character[1].MAXMANA) {
State.variables.character[1].currentMana = State.variables.character[1].MAXMANA
}
setup.notify(`You regained ${Math.round(missingMana * 0.6) + 25} Essence back.`);
removeItemFromInventory(this.Name)
addItemToInventory("Empty Flask")
updateInventoryDisplay()
}
});
var LargeBothpotion = createItem("Large Purple potion", {
Price: 180,
Description: "Oh! Finally something that taste good...",
Description_pt: "Oh! Finalmente algo de bom gosto...",
Name_pt:"Grande Poção Roxa",
Plural_pt:"Grande Poções Roxas",
Type: ["potion", "consumable", "alchemy"],
Type_pt: ["poção", "consumível", "alquimia"],
onUse: function () {
const missingMana = State.variables.character[1].currentMana -State.variables.character[1].MAXMANA;
State.variables.character[1].currentMana += Math.round(missingMana * 0.45) + 25
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
const missinglife = State.variables.character[1].currentLife -State.variables.character[1].MAXLIFE;
State.variables.character[1].currentLife += Math.round(missinglife * 0.45) + 40
if (State.variables.character[1].currentMana > State.variables.character[1].MAXMANA) {
State.variables.character[1].currentMana = State.variables.character[1].MAXMANA
}
setup.notify(`You regained ${Math.round(missinglife * 0.45) + 40} Lifeblood and ${Math.round(missingMana * 0.45) + 25} Essence back.`);
removeItemFromInventory(this.Name)
addItemToInventory("Empty Flask")
}
});
//Non-Armor: Increase all damage taken by 7% for each slot with this trait.
//Naked: -2 to Speech and Intimidation tests.
//Sacred: While equipped, whenever you would fail a test, add +2 to the result. If the test is of Mystical Knowledge, add +4, instead.
//Arcane: When adding new Spells to your Repertoire, a Spellbook reduces the time require by 2 hour.
//Elegant: Add +3 to Speech tests.
//Secretive: Add +3 to Stealth tests
//Instrument: Add +3 to Art tests.
//Draconic: Reduce all damage by extra 7%.
//Sturdy: Reduce damage taken from ranged weapons by extra 5% for each equipped item with this trait.
//Composite: Reduce damage taken from melee weapons by extra 5% for each equipped item with this trait.
var emptyHead = createItem("Empty Head", {
Description: "It's your ugly head.",
Description_pt: "É a sua cabeça feia.",
Name_pt:"Cabeça Vazia",
Type: ["bornwith", "naked", "non-armor"],
Slot: 'head',
equipped: false,
});
var emptyTorso = createItem("Empty Torso", {
Description: "Connects each part of your body.",
Description_pt: "Conecta todas as partes de seu corpo.",
Name_pt:"Torso Vazio",
Type: ["bornwith", "naked", "non-armor"],
Type_pt: ["De Nascença", "Pelado", "Não-é-armadura"],
Slot: 'torso',
equipped: false,
});
var emptyWaist = createItem("Empty Waist", {
Description: "You could lose some weight...",
Description_pt: "Você poderia perder peso...",
Name_pt:"Cintura Vazia",
Type: ["bornwith", "naked", "non-armor"],
Type_pt: ["De Nascença", "Pelado", "Não-é-armadura"],
Slot: 'waist',
equipped: false,
});
var emptyLegs = createItem("Empty Legs", {
Description: "Cover them up, nobody wants to look you naked.",
Description_pt: "Se vista, ninguém ter quer ver pelad(o/a).",
Name_pt:"Pernas Vazias",
Type: ["bornwith", "naked", "non-armor"],
Type_pt: ["De Nascença", "Pelado", "Não-é-armadura"],
Slot: 'legs',
equipped: false,
});
var emptyFeet = createItem("Empty Feet", {
Description: "Usefull, but smells terrible.",
Description_pt: "Utéis, mas cheiram terrivelmente.",
Name_pt:"Pés Vazios",
Type: ["bornwith", "naked", "non-armor"],
Type_pt: ["De Nascença", "Pelado", "Não-é-armadura"],
Slot: 'feet',
equipped: false,
});
var divineSymbol = createItem("Divine symbol", {
Name_pt:"Simbolo Divino",
Plural_pt: "Simbolos Divinos",
Description: "The sacred symbol of your deity.",
Description_pt: "O simbolo sagrado de sua divindade.",
Type: ["holy", "item"],
Type_pt: ["Sagrado", "Item"],
Slot: 'offhand',
Price: 35,
equipped: false,
});
var spellbook = createItem("Spellbook", {
Name_pt:"Livro de Magias",
Plural_pt: "Livros de Magias",
Description: "Surprisingly, it does get heavier with each spell it holds.",
Description_pt: "Surpreendimente, fica mais pesado com cada magia que segura.",
Type: ["arcane", "item"],
Type_pt: ["Arcano", "Item"],
Slot: 'offhand',
Price: 60,
equipped: false,
});
var lute = createItem("Lute", {
Name_pt: "Alaúde",
Singular_pt: "um alaúde",
Type: ["instrument", "item"],
Type_pt: ["Instrumento", "Item"],
Slot: ['offhand'],
Price: 50,
equipped: false,
});
var harp = createItem("Harp", {
Name_pt: "Harpa",
Singular_pt: "uma harpa",
Type: ["instrument", "item"],
Type_pt: ["Instrumento", "Item"],
Slot: 'offhand',
Price: 60,
equipped: false,
});
var flute = createItem("Flute", {
Name_pt: "Flauta",
Singular_pt: "uma flauta",
Type: ["instrument", "item"],
Type_pt: ["Instrumento", "Item"],
Slot: 'offhand',
Price: 45,
equipped: false,
});
var bagpipes = createItem("Bagpipes", {
Name_pt: "Gaita de foles",
Plural_pt: "Gaitas de foles",
Singular_pt: "uma gaita de foles",
Type: ["instrument", "item"],
Type_pt: ["Instrumento", "Item"],
Slot: 'offhand',
Price: 50,
equipped: false,
});
var drum = createItem("Drum", {
Name_pt: "Tambor",
Plural_pt: "Tambores",
Singular_pt: "um tambor",
Type: ["instrument", "item"],
Type_pt: ["Instrumento", "Item"],
Slot: 'offHand',
Price: 40,
equipped: false,
});
var dragonHelmet = createItem("Dragon Scale helmet", {
Name_pt: "Capacete de Escamas de Dragão",
Plural_pt: "Capacetes de Escamas de Dragão",
Description: "No dragons were killed to make this.",
Description_pt: "Nenhum dragão foi morto para fazer isso.",
Singular: "a dragon scale helmet",
Plural: "dragon scale helmets",
Type: ["wearable", "heavy armor", "draconic"],
Type_pt: ["Vestimenta", "Armadura Pesada", "Dracônico"],
Slot: 'head',
Defense: 10,
Price: 2500,
equipped: false,
});
var helmet = createItem("Helmet", {
Name_pt: "Capacete",
Type: ["wearable", "heavy armor"],
Type_pt: ["Vestimenta", "Armadura Pesada"],
Slot: 'head',
icon: "img/itemsIcons/Helmet",
Defense: 7,
Price: 110,
equipped: false,
});
var greatHelm = createItem("Great helm", {
Name_pt: "Grande Elmo",
Type: ["wearable", "heavy armor", "sturdy"],
Type_pt: ["Vestimenta", "Armadura Pesada", "Resistênte"],
Slot: 'head',
icon: "img/itemsIcons/GreatHelm",
Defense: 9,
Price: 120,
equipped: false,
});
var crusaderHelm = createItem("Crusader helm", {
Name_pt: "Elmo do Cruzado",
Type: ["wearable", "heavy armor", "sturdy", "sacred"],
Type_pt: ["Vestimenta", "Armadura Pesada", "Resistênte", "Sagrado"],
Slot: 'head',
icon: "img/itemsIcons/GreatHelm",
Defense: 9,
Price: 142,
equipped: false,
});
var bascinet = createItem("Bascinet", {
Name_pt: "Bascinete",
Type: ["wearable", "heavy armor", "sturdy"],
Type_pt: ["Vestimenta", "Armadura Pesada", "Resistênte"],
Slot: 'head',
Defense: 8,
icon: "img/itemsIcons/Bascinet",
Price: 115,
equipped: false,
});
var coif = createItem("Coif", {
Name_pt: "Touca",
Description: "Wheter to hide a bad haircut or just a bald head, the coif is the favorite headgear of the people.",
Description_pt: "Seja para esconder um corte de cabelo ruim ou apenas uma careca, a touca é o chapéu preferido do povo.",
Type: ["wearable", "light armor"],
Type_pt: ["Vestimenta", "Armadura Leve"],
Slot: 'head',
icon: "img/itemsIcons/Coif",
Defense: 1,
Price: 25,
equipped: false,
});
var wizzHat = createItem("Wizzard Hat", {
Name_pt: "Chápeu do Feiticeiro",
Description: "A Wizard without its hat is not legally allowed to cast spells, nor can it call itself a Wizzard.",
Description_pt: "Um Feiticeiro sem seu capéu não é legalmente permitido conjurar magias ou se chamar de Feiticeiro.",
Type: ["wearable", "light armor", "arcane"],
Slot: 'head',
icon: "img/itemsIcons/WizzHat",
Defense: 4,
Price: 89,
equipped: false,
});
var mask = createItem("Mask", {
Name_pt: "Máscara",
Description: "Perfect to hide your ugly mug!",
Description_pt: "Perfeito para esconder sua feiura!",
Type: ["wearable", "light armor", "secretive"],
Type_pt: ["Vestimenta", "Armadura Leve", "Secreto"],
Slot: 'head',
Defense: 2,
icon: "img/itemsIcons/Mask",
Price: 32,
equipped: false,
});
var hood = createItem("Hood", {
Name_pt: "Capuz",
Plural_pt: "Capuzes",
Type: ["wearable", "light armor", "secretive"],
Type_pt: ["Vestimenta", "Armadura Leve", "Secreto"],
icon: "img/itemsIcons/Hood",
Slot: 'head',
Defense: 1,
Price: 29,
equipped: false,
});
var circlet = createItem("Circlet", {
Name_pt:"Diadema",
Type: ["wearable", "light armor", "elegant"],
Type_pt: ["Vestimenta", "Armadura Leve", "Elegante"],
Slot: 'head',
icon: "img/itemsIcons/Circlet",
Defense: 1,
Price: 30,
equipped: false,
});
var crown = createItem("Crown", {
Name_pt:"Coroa",
Type: ["wearable", "medium armor", "elegant"],
Type_pt: ["Vestimenta", "Armadura Leve", "Elegante"],
Slot: 'head',
icon: "img/itemsIcons/Circlet",
Defense: 4,
Price: 2000,
equipped: false,
});
var chainmail = createItem("Chainmail", {
Name_pt:"Cota de Malha",
Plural_pt:"Cotas de Malha",
Type: ["wearable", "medium armor", "composite"],
Type_pt: ["Vestimenta", "Armadura Média", "Composta"],
Slot: 'torso',
icon: "img/itemsIcons/Chain",
Defense: 5,
Price: 70,
equipped: false,
});
var dragonArmor = createItem("Dragon Scale armor", {
Name_pt:"Armadura de Escamas de Dragão",
Plural_pt:"Armaduras de Escamas de Dragão",
Description: "No dragons were killed to make this.",
Description_pt: "Nenhum dragão foi morto para fazer isso.",
Type: ["wearable", "heavy armor", "draconic"],
Type_pt: ["Vestimenta", "Armadura Pesada", "Dracônico"],
icon: "img/itemsIcons/DracoTorso",
Slot: 'torso',
Defense: 12,
Price: 2600,
equipped: false,
});
var plateArmor = createItem("Plate armor", {
Name_pt: "Armadura de Placas",
Plural_pt:"Armaduras de Placas",
Description: "Just because you are inside a full metal armor suit, does not mean you are safe.",
Description_pt: "Só poeque você está dentro de uma armadura d completa de metal, não siginifica que você está seguro.",
Type: ["wearable", "heavy armor", "composite"],
Type_pt: ["Vestimenta", "Armadura Pesada", "Composta"],
icon: "img/itemsIcons/Plate",
Slot: 'torso',
Defense: 9,
Price: 150,
equipped: false,
});
var woolShirt = createItem("Wool shirt", {
Name_pt: "Camisa de lã",
Description: "A woolen shirt that barely protects you from the cold, what to say of blades.",
Description_pt: "Uma camisa de lã que mal lhe protege do frio, o que dizer de lâminas.",
Plural_pt: "Camisas de lã",
Type: ["wearable", "light armor"],
Type_pt: ["Vestimenta", "Armadura Leve"],
icon: "img/itemsIcons/WoolShirt",
Slot: 'torso',
Defense: 1,
Price: 20,
equipped: false,
});
var holyGarments = createItem("Holy garments", {
Name_pt: "Vestimentas sagradas",
Description: "For the fanatics.",
Description_pt: "Para os fanáticos.",
Type: ["wearable", "light armor", "holy"],
Type_pt: ["Vestimenta", "Armadura Leve", "Sagrado"],
icon: "img/itemsIcons/Holy",
Slot: 'torso',
Defense: 1,
Price: 35,
equipped: false,
});
var robes = createItem("Robes", {
Name_pt: "Vestes",
Description: "Simple and light.",
Description_pt: "Simples e leves.",
Type: ["wearable", "light armor"],
Type_pt: ["Vestimenta", "Armadura Leve"],
icon: "img/itemsIcons/cultRobe",
Slot: 'torso',
Defense: 1,
Price: 27,
equipped: false,
});
var robes = createItem("Cultist's Robes", {
Name_pt: "Dark clothes than definetly don't bring out attention, nor does scream 'i make part of a cult', nope.",
Description: "Roupas escuras que definitivamente não chamam a atenção, ou gritam 'eu faço parte de um culto', não.",
Description_pt: "Simples e leves.",
Type: ["wearable", "light armor", "cult"],
Type_pt: ["Vestimenta", "Armadura Leve", "Culto"],
icon: "img/itemsIcons/Robe",
Slot: 'torso',
Defense: 1,
Price: 22,
equipped: false,
})
var leatherArmor = createItem("Leather armor", {
Name_pt: "Armadura de couro",
Plural_pt: "Armaduras de couro",
Type: ["wearable", "light armor", "elegant"],
Type_pt: ["Vestimenta", "Armadura Leve", "Elegante"],
icon: "img/itemsIcons/leather",
Slot: 'torso',
Defense: 2,
Price: 40,
equipped: false,
});
var gamberson = createItem("Gamberson", {
Type: ["wearable", "medium armor", "composite"],
Type_pt: ["Vestimenta", "Armadura Média", "Composta"],
Slot: 'torso',
icon: "img/itemsIcons/Gamberson",
Defense: 3,
Price: 60,
equipped: false,
});
var bringandine = createItem("Brigandine", {
Name_pt: "Brigantina",
Type: ["wearable", "medium armor", "sturdy"],
Type_pt: ["Vestimenta", "Armadura Média", "Resitênte"],
icon: "img/itemsIcons/Brigandine",
Slot: 'torso',
Defense: 5,
Price: 80,
equipped: false,
});
var cuirass = createItem("Cuirass", {
Name_pt: "Couraça",
Type: ["wearable", "medium armor", "sturdy"],
Type_pt: ["Vestimenta", "Armadura Média", "Resitênte"],
icon: "img/itemsIcons/Cuirass",
Slot: 'torso',
Defense: 6,
Price:87,
equipped: false,
});
var breastplate = createItem("Breastplate", {
Name_pt: "Peitoral",
Plural_pt: "Peitorais",
Type: ["wearable", "medium armor", "composite"],
Type_pt: ["Vestimenta", "Armadura Média", "Composta"],
icon: "img/itemsIcons/breastplate",
Slot: 'torso',
Defense: 6,
Price: 100,
equipped: false,
});
var faulds = createItem("Faulds", {
Name_pt: "Cinturão",
Plural_pt: "Cinturões",
Type: ["wearable", "medium armor", "composite"],
Slot: 'waist',
Defense: 5,
Price: 75,
equipped: false,
});
var belt = createItem("Belt", {
Name_pt: "Cinto",
Type: ["wearable", "light armor"],
Slot: 'waist',
GearDefense: 1,
Price: 20,
equipped: false,
});
var beltpouch = createItem("Belt pouch", {
Name_pt: "Bolsa de cinto",
Plural_pt: "Bolsas com cinto",
Type: ["wearable", "light armor"],
Slot: 'waist',
Defense: 1,
Price: 22,
equipped: false,
});
var buckle = createItem("Buckle", {
Name_pt: "Fivela",
Type: ["wearable", "light armor", "sturdy"],
Slot: 'waist',
Defense: 2,
Price: 25,
equipped: false,
});
var beltedSkirt = createItem("Belted skirt", {
Description: "Just because you are wearing a skirt, does not mean you are less masculine...",
Description_pt: "Só porque você está vestindo uma saia, não significa que você é menos masculino...",
Name_pt: "Saia com cinto",
Plural_pt: "Saias com cinto",
Type: ["wearable", "medium armor"],
Slot: 'waist',
Defense: 5,
Price: 70,
equipped: false,
});
var tassets = createItem("Tassets", {
Name_pt: "Borlas",
Type: ["wearable", "heavy armor"],
Slot: 'waist',
Defense: 9,
Price: 130,
equipped: false,
});
var dragonTassets = createItem("Dragon Scale tassets", {
Name_pt: "Pernais de Escamas de Dragão",
Description: "No dragon were killed to make this.",
Description_pt: "Nenhum dragão foi morto para fazer isso.",
Type: ["wearable", "heavy armor", "draconic"],
Slot: 'waist',
Defense: 12,
Price: 2575,
equipped: false,
});
var greaves = createItem("Greaves", {
Name_pt: "Grevas",
Plural_pt: "Grevas",
Plural: "Greaves",
Type: ["wearable", "heavy armor", "composite"],
Slot: 'legs',
Defense: 8,
Price: 125,
equipped: false,
});
var chausses = createItem("Chausses", {
Name_pt: "Perneiras",
Plural_pt: "Perneiras",
Plural: "Chausses",
Type: ["wearable", "heavy armor", "sturdy"],
Slot: 'legs',
Defense: 7,
Price: 110,
equipped: false,
});
var cuisses = createItem("Cuisses", {
Name_pt: "Coxotes",
Plural_pt: "Coxotes",
Plural: "Cuisses",
Type: ["wearable", "heavy armor", "composite"],
Slot: 'legs',
Defense: 8,
Price: 120,
equipped: false,
});
var leggings = createItem("Leggings", {
Plural: "Leggings",
Type: ["wearable", "heavy armor", "composite", "sturdy"],
Slot: 'legs',
Defense: 8,
Price: 120,
equipped: false,
});
var dragonLeggings = createItem("Dragon Scale leggings", {
Name_pt: "Leggings de Escamas de Dragão",
Plural_pt: "Leggings de Escamas de Dragão",
Plural: "Dragon Scale leggings",
Description: "No dragons were killed to make this.",
Description_pt: "Nenhum dragão foi morto para fazer isso.",
Type: ["wearable", "heavy armor", "draconic"],
Slot: 'legs',
Defense: 11,
Price: 2550,
equipped: false,
});
var pants = createItem("Pants", {
Name_pt: "Calças",
Plural_pt: "Calças",
Plural: "Pants",
Description: "A pair of pants made of durable fabric.",
Description_pt: "Um par de calças, feito de uma fabrica durável.",
Type: ["wearable", "medium armor"],
Slot: 'legs',
Defense: 3,
Price: 55,
equipped: false,
});
var boots = createItem("Leather boots", {
Plural: "Leather boots",
Name_pt: "Botas de Couro",
Plural_pt: "Botas de Couro",
Description: "Stylish.",
Description_pt: "Estilosas.",
Type: ["wearable", "medium armor", "elegant"],
Slot: 'legs',
Defense: 4,
Price: 65,
equipped: false,
});
var greavesBoots = createItem("Greaves boots", {
Name_pt: "Botas de grevas",
Plural_pt: "Botas de grevas",
Plural: "Greaves boots",
Type: ["wearable", "heavy armor"],
Slot: 'legs',
Defense: 8,
Price: 120,
equipped: false,
});
var sabatons = createItem("Sabatons", {
Name_pt: "Sapatões",
Plural_pt: "Sapatões",
Plural: "Sabatons",
Type: ["wearable", "heavy armor"],
Slot: 'feet',
Defense: 9,
Price: 130,
equipped: false,
});
var dragonSabatons = createItem("Dragon Scale sabatons", {
Name_pt: "Sapatões de Escamas de Dragão",
Plural_pt: "Sapatões de Escamas de Dragão",
Plural: "Dragon Scale sabatons",
Type: ["wearable", "heavy armor", "draconic"],
Slot: 'legs',
Defense: 12,
Price: 2500,
equipped: false,
});
var sandals = createItem("Sandals", {
Name_pt: "Sandálias",
Plural_pt: "Sandálias",
Description: "Not stylish.",
Description_pt: "Nada estiloso.",
Plural: "Sandals",
Type: ["wearable", "light armor"],
Slot: 'legs',
Defense: 1,
Price: 24,
equipped: false,
});
var shoes = createItem("Shoes", {
Name_pt: "Sapatos",
Plural_pt: "Sapatos",
Plural: "Shoes",
Type: ["wearable", "light armor"],
Slot: 'legs',
Defense: 2,
Price: 30,
equipped: false,
});
var fist = createItem("Fist", {
Name_pt: "Punho",
Plural_pt: "Punhos",
Description: "Your favorite hand to beat people.",
Description_pt: "Sua mão favorita para bater nas pessoas.",
Type: ["weapon", "blunt", "melee", "1-handed", "bornwith", 'visceral'],
Slot: 'mainhand',
icon: "img/ItemsIcons/Fist.png",
Damage: "1d4",
equipped: false,
});
var otherhand = createItem("Other hand", {
Name_pt: "Segunda Mão",
Plural_pt: "Outras Mãos",
Description: "The other hand, except less useful.",
Type: ["1-handed", "bornwith"],
Slot: 'offhand',
Damage: '1d4',
Defense: 1,
equipped: false,
});
var bearHands = createItem("Bear hands", {
Name_pt: "Mão de Urso",
Plural_pt: "Mãos de Ursos",
Plural: "Bear Hands",
Description: "Your bare bear hands... just bear with me...",
Description_pt: "É mais engraçado em inglês... :(",
Type: ["weapon", "blunt", "melee", "bornwith", "1-handed", "visceral"],
Slot: 'mainhand',
Damage: "3d4",
equipped: false,
});
var Claws = createItem("Claws", {
Name_pt: "Garra",
Plural_pt: "Garras",
Plural: "claws",
Description: "Good enough to rend flesh.",
Description_pt: "Boas o suficiente para rasgar carne.",
Type: ["weapon", "slashing", "melee", "1-handed", "bornwith", "visceral"],
Slot: 'mainhand',
Damage: "2d4",
equipped: false,
});
var draconianClaw = createItem("Draconian claw", {
Name_pt: "Garra Dracônica",
Plural_pt: "Garras Dracônicas",
Plural: "Draconian claws",
Description: "Your bare claws. Sharp enough to kill someone.",
Description_pt: "Suas garras. Afiadas o suficiente para matar alguém",
Type: ["weapon", "slashing", "melee", "1-handed", "bornwith", "visceral", "draconian"],
Slot: 'mainhand',
Damage: "2d4",
Defense: 2,
equipped: false,
})
var otherdraconianClaw = createItem("Other Draconian claw", {
Name_pt: "Segunda Garra Dracônia",
Plural_pt: "Outras Garras Dracônias",
Description: "Just as usefull as your other one.",
Type: ["weapon", "slashing", "melee", "1-handed", "bornwith", "visceral", "draconian"],
Slot: 'offhand',
Damage: '2d4',
Defense: 2,
});
var rustySword = createItem("Rusted sword", {
Name_pt: "Espada enferrujada",
Plural_pt: "Espadas enferrujadas",
Description: "Why are you even using this?",
Description_pt: "Por que você sequer está usando isso?",
Type: ["weapon", "blunt", "melee", "1-handed", "versatile"],
Slot: 'mainhand',
Damage: "1d8",
icon: "img/ItemsIcons/RustyLongsword.png",
Price: 20,
equipped: false,
});
var shortSword = createItem("Short sword", {
Name_pt: "Espada curta",
Plural_pt: "Espadas curtas",
Description: "Size means little, it's how you use it.",
Description_pt: "Tamanho siginifia nada, é como você usa.",
Type: ["weapon", "slashing", "light", "melee", "1-handed", "versatile"],
Slot: 'offhand',
Damage: "2d4",
icon: "img/ItemsIcons/Shortsword.png",
Price: 40,
equipped: false,
});
var sword = createItem("Sword", {
Name_pt: "Espada",
Description_pt: "Uma lâmina básica, a mais versátil das lâminas, uma arma para ser usada quando você não tem uma arma melhor com você...",
Description: "A staple, the most versatile of blades, a weapon to be used when you have no better weapon with you...",
Type: ["weapon", "slashing", "melee", "1-handed", "versatile"],
Slot: 'mainhand',
Damage: "2d8",
icon: "img/ItemsIcons/LongSword.png",
Price: 80,
equipped: false,
});
var arcaneBlade = createItem("Arcane Blade", {
Name_pt: "Lâmina Arcana",
Description_pt: "Feita de magia, capaz de cortar tudo.",
Description: "Made of magic, capable of cutting through anything.",
Type: ["weapon", "slashing", "melee", "1-handed", "versatile", "arcane", "esoteric", "spell"],
Slot: 'mainhand',
Damage: "2d8",
icon: "img/ItemsIcons/LongSword.png",
Price: 80,
equipped: false,
});
var scimitar = createItem("Scimitar", {
Name_pt: "Cimitarra",
Type: ["weapon", "slashing", "melee", "1-handed", "versatile", "elegant"],
Slot: 'mainhand',
Damage: "2d8",
icon: "img/ItemsIcons/Scimitar.jpg",
Price: 80,
equipped: false,
});
var rapier = createItem("Rapier", {
Name_pt: "Rapieira",
Type: ["weapon", "piercing", "melee", "1-handed", "versatile", "elegant"],
Slot: 'mainhand',
Damage: "2d6",
icon: "img/ItemsIcons/Rapier.png",
Price: 90,
equipped: false,
});
var greatsword = createItem("Greatsword", {
Name_pt: "Espada Grande",
Plural_pt: "Espadas Grandes",
Description: "Bigger is better.",
Description_pt: "Maior é melhor.",
Type: ["weapon", "slashing", "melee", "2-handed", "heavy"],
Slot: 'mainhand',
Damage: "2d12",
icon: "img/ItemsIcons/GreatSword.png",
Price: 150,
equipped: false,
});
var axe = createItem("Axe", {
Name_pt: "Machado",
Type: ["weapon", "slashing", "melee", "1-handed", "visceral"],
Slot: 'mainhand',
Damage: "3d4",
icon: "img/ItemsIcons/Axe.png",
Price: 60,
equipped: false,
});
var greataxe = createItem("Great axe", {
Name_pt: "Machado Grande",
Plural_pt: "Machados Grandes",
Type: ["weapon", "slashing", "melee", "2-handed", "visceral"],
Slot: 'mainhand',
Damage: "5d4",
icon: "img/ItemsIcons/GreatAxe.png",
Price: 90,
equipped: false,
});
var shortbow = createItem("Short bow", {
Name_pt: "Arco curto",
Plural_pt: "Arcos curtos",
Type: ["weapon", "piercing", "ranged", "2-handed", "ammunition", "precision"],
Slot: 'mainhand',
Damage: "5d4",
icon: "img/ItemsIcons/Shortbow.png",
Cooldown: 1,
Price: 40,
equipped: false,
});
var longbow = createItem("Longbow", {
Name_pt: "Arco longo",
Plural_pt: "Arcos longos",
Type: ["weapon", "piercing", "ranged", "2-handed", "ammunition", "precision"],
Slot: 'mainhand',
Damage: "5d6",
icon: "img/ItemsIcons/Longbow.png",
Cooldown: 2,
Price: 85,
equipped: false,
});
var arbalest = createItem("Arbalest", {
Name_pt: "Arbalesta",
Type: ["weapon", "piercing", "ranged", "2-handed", "precision"],
Slot: 'mainhand',
Damage: "6d6",
icon: "img/ItemsIcons/HeavyCrossbow.png",
Cooldown: 3,
Price: 60,
equipped: false,
});
var flintlock = createItem("Flintlock Pistol", {
Name_pt: "Pistola de Perdeneira",
Type: ["weapon", "firearm", "light", "ranged", "1-handed", "Imprecise"],
Slot: "offhand",
Damage: '2d12',
Cooldonw: 5,
Price: 200,
equipped: false,
});
var arquebus = createItem("Arquebus", {
Name_pt: "Arcabuz",
Plural_pt: "Arcabuzes",
Type: ["weapon", "firearm", "ranged", "2-handed"],
Slot: "mainhand",
Damage: '4d8',
Cooldonw: 8,
Price: 400,
equipped: false,
});
var blunderbuss = createItem("Blunderbuss", {
Name_pt: "Bacamarte",
Plural_pt: "Bacamartes",
Type: ["weapon", "firearm", "ranged", "1-handed", "Imprecise", "Scatter"],
Slot: "offhand",
Damage: '3d10',
Cooldonw: 7,
Price: 435,
equipped: false,
});
var handcannon = createItem("Hand Cannon", {
Name_pt: "Canhão de Mão",
Plural_pt: "Canhões de Mão",
Type: ["weapon", "firearm", "ranged", "2-handed", "Imprecise"],
Slot: "mainhand",
Damage: '4d12',
Cooldonw: 10,
Price: 500,
equipped: false,
});
var lightCrossbow = createItem("Light Crossbow", {
Name_pt: "Besta leve",
Plural_pt: "Bestas Leve",
Type: ["weapon", "piercing", "ranged", "light", "1-handed", "precision"],
Slot: 'offhand',
Damage: "2d4",
icon: "img/ItemsIcons/Crossbow.png",
Cooldown: 2,
Price: 43,
equipped: false,
});
var crossbow = createItem("Crossbow", {
Name_pt: "Besta",
Plural_pt: "Bestas",
Type: ["weapon", "piercing", "ranged", "1-handed", "precision"],
Slot: 'mainhand',
Damage: "4d4",
icon: "img/ItemsIcons/Crossbow.png",
Cooldown: 1,
Price: 50,
equipped: false,
});
var dagger = createItem("Dagger", {
Name_pt: "Adaga",
Plural_pt: "Adagas",
Type: ["weapon", "piercing", "melee", "1-handed", "agile", "secretive"],
Slot: 'mainhand',
Damage: "2d4",
icon: "img/ItemsIcons/Dagger.png",
Price: 25,
equipped: false,
});
var Sacdagger = createItem("Sacrificial Dagger", {
Name_pt: "Adaga de Sacrifício",
Plural_pt: "Adagas de Sacrifício",
Type: ["weapon", "piercing", "melee", "1-handed", "agile", "secretive", "cult"],
Slot: 'mainhand',
Damage: "2d4",
icon: "img/ItemsIcons/Dagger.png",
Price: 37,
equipped: false,
});
var parryingDagger = createItem("Parrying Dagger", {
Name_pt: "Adaga de Defesa",
Plural_pt: "Adagas de Defesa",
Type: ["weapon", "piercing", "melee", "1-handed", "light"],
Slot: 'offhand',
Damage: "1d4",
Defense: 3,
icon: "img/ItemsIcons/ParryingDaggers.png",
Price: 29,
equipped: false,
});
var throwingKnife = createItem("Throwing Knife", {
Name_pt: "Faca de Arremesso",
Plural_pt: "Facas de Arremesso",
Type: ["weapon", "piercing", "1-handed", "light", "throwing"],
Slot: 'mainhand',
Damage: "3d4",
icon: "img/ItemsIcons/throwingKnifes.png",
ammo: 6,
Price: 31,
equipped: false,
});
var chakram = createItem("Chakram", {
Type: ["weapon", "slashing", "1-handed", "light", "throwing"],
Slot: 'offhand',
icon: "img/ItemsIcons/Chakram.png",
Damage: "2d6",
ammo: 6,
Price: 42,
equipped: false,
});
var flamethrower = createItem("Flamethrower", {
Name_pt: "Lança-chamas",
Plural_pt: "Lança-chamas",
Decription: "A Dragon's power to be wielded in mortal's hands...",
Type: ["weapon", "unique", "2-handed", "Scatter", "esoteric"],
Slot: 'mainhand',
cooldown: 2,
Price: 5555,
});
var mace = createItem("Mace", {
Name_pt: "Maça",
Type: ["weapon", "blunt", "melee", "1-handed", "heavy"],
Slot: 'mainhand',
Damage: "2d8",
icon: "img/ItemsIcons/Mace.png",
Price: 70,
equipped: false,
});
var wand = createItem("Wand", {
Name_pt: "Varinha",
Type: ["weapon", "melee", "1-handed", "arcane", "esoteric"],
Slot: 'mainhand',
icon: "img/ItemsIcons/Wand.png",
Damage: "1d4",
Price: 120,
equipped: false,
});
var arcanestaff = createItem("Arcane staff", {
Name_pt: "Cajado Arcano",
Plural_pt: "Cajados Arcano",
Type: ["weapon", "melee", "2-handed", "arcane", "esoteric"],
Slot: 'mainhand',
Damage: "2d4",
icon: "img/ItemsIcons/Arcane Staff.png",
Price: 240,
equipped: false,
});
var flail = createItem("Flail", {
Name_pt: "Mangual",
Plural_pt: "Manguais",
Type: ["weapon", "blunt", "melee", "1-handed", "heavy", "Imprecise"],
Slot: 'mainhand',
Damage: "3d8",
icon: "img/ItemsIcons/Flail.png",
Price: 75,
equipped: false,
});
var wip = createItem("Wip", {
Name_pt: "Chicote",
Plural_pt: "Chicotes",
Type: ["weapon", "blunt", "melee", "1-handed", "light", "Imprecise"],
Slot: 'offhand',
Damage: "3d6",
icon: "img/ItemsIcons/Flail.png",
Price: 56,
equipped: false,
});
var spear = createItem("Spear", {
Name_pt: "Lança",
Type: ["weapon", "piercing", "melee", "2-handed", "precision"],
Slot: 'mainhand',
Damage: "2d6",
icon: "img/ItemsIcons/Spear.png",
Price: 40,
equipped: false,
});
var javelin = createItem("Javelin", {
Name_pt: "Lança",
Type: ["weapon", "piercing", "throwing", "1-handed", "precision"],
Slot: 'mainhand',
Damage: "1d8",
ammo: 6,
Price: 37,
equipped: false,
});
var quarterstaff = createItem("Quarterstaff", {
Name_pt: "Bastão",
Plural_pt: "Bastões",
Description: "Big stick, good for smacking.",
Type: ["weapon", "blunt", "melee", "2-handed", "versatile"],
Slot: 'mainhand',
Damage: "1d8",
icon: "img/ItemsIcons/Quarterstaff.png",
Price: 15,
equipped: false,
});
var warhammer = createItem("War hammer", {
Name_pt: "Martelo de Guerra",
Plural_pt: "Martelos de Guerra",
Description_pt: "Lendas conteam que em um dia, a humanidade irá batalhar armada com quarenta mil martelos de guerra em uma guerra sem esperança pela soberania do sombrio e terrível cosmos.",
Description: "Legends tell that one day, mankind will battle armed with forty thousand War hammers in a hopeless war for sovereignty of the dark and terrible cosmos.",
Type: ["weapon", "blunt", "melee", "2-handed", "heavy"],
Place: 'mainhand',
Damage: "3d8",
icon: "img/ItemsIcons/War hammer.png",
Price: 100,
equipped: false,
});
var halberd = createItem("Halberd", {
Name_pt: "Alarbarda",
Type: ["weapon", "slashing", "melee", "2-handed", "heavy"],
Slot: 'mainhand',
Damage: "3d6",
icon: "img/ItemsIcons/Halberd.png",
Price: 120,
equipped: false,
});
var gloves = createItem("Gloves", {
Name_pt: "Luvas",
Plural_pt: "Luvas",
Description_pt: "Para quando você não quiser sujar suas pobres e frageis mãos...",
Description: "For when you don't want to dirt your poor and fragile hands...",
Type: ["1-handed", "wearable", "light armor"],
Slot: 'offhand',
Defense: 2,
Price: 42,
equipped: false,
});
var gauntlests = createItem("Gauntlets", {
Name_pt: "Manoplas",
Plural_pt: "Manoplas",
Description: "For when you don't want your hands cut off.",
Type: ["1-handed", "wearable", "heavy armor", "composite"],
Slot: 'offhand',
Defense: 5,
Price: 87,
equipped: false,
});
var shield = createItem("Shield", {
Name_pt: "Escudo",
Description: "Made for cowards.",
Description_pt: "Feito para covardes.",
Type: ["shield", "1-handed"],
Slot: 'offhand',
Defense: 10,
icon: "img/ItemsIcons/Shield.png",
Price: 75,
equipped: false,
});
var woodenShield = createItem("Wooden shield", {
Name_pt: "Escudo de Madeira",
Plural_pt: "Escudos de Madeira",
Description_pt: "O escudo mais resistente que o camponês mais rico pode comprar",
Description: "The sturdiest shield the richest peasant can buy.",
Type: ["shield", "1-handed"],
icon: "img/ItemsIcons/RoundShield.png",
Slot: 'offhand',
Defense: 5,
Price: 30,
equipped: false,
});
var towerShield = createItem("Tower shield", {
Name_pt: "Escudo Torre",
Plural_pt: "Escudos Torre",
Description_pt: "Grande e problemático, para você e o seus oponentes.",
Description: "Big and troublesome, for you and your opponents.",
Type: ["shield", "1-handed"],
Slot: 'offhand',
icon: "img/ItemsIcons/TowerShield.png",
Defense: 20,
Price: 140,
equipped: false,
});
var weaponhandler = createItem("Handle", {
Name_pt: "Cabo",
Plural_pt: "Cabos",
Description: "The end of a very large weapon. Usually forgotten by many that it exists.",
Description_pt: "O fim de uma arma bem larga. Usualmente esquecido por muitos que existe.",
Type: ["weapon", "2-handed", "blunt", "holded"],
Slot: 'offhand',
Damage: '1d4',
Defense: 3,
Price: 0,
equipped: false,
});
//Monster bits
var MonsterClaws = createItem("Sharp Claws", {
Type: ["bornwith", "weapon", "1-handed","Animal", "slashing"],
Damage: '6d4',
Slot: 'mainhand',
equipped: true,
});
var Tentacles1 = createItem("offhand Tentacles", {
Type: ["bornwith", "weapon", "1-handed", "Animal"],
Damage: '2d4',
Defense: 3,
Slot: 'offhand',
equipped: true,
});
var Tentacles2 = createItem("mainhand Tentacles", {
Type: ["bornwith", "weapon", "1-handed", "Animal"],
Damage: '2d4',
Defense: 3,
Slot: 'mainhand',
equipped: true,
});
var Tentacles3 = createItem("feet Tentacles", {
Type: ["bornwith", "weapon", "1-handed", "Animal"],
Damage: '2d4',
Defense: 3,
Slot: 'feet',
equipped: true,
});
var Tentacles4 = createItem("legs Tentacles", {
Type: ["bornwith", "weapon", "1-handed", "Animal"],
Damage: '2d4',
Defense: 3,
Slot: 'legs',
equipped: true,
});
var MonsterArms = createItem("Monster Arms", {
Type: ["bornwith", "weapon", "1-handed", "Monster-unique", "blunt"],
Damage: '4d4',
Slot: 'mainhand',
equipped: true,
});
var Wings1 = createItem ("Mainhand Wing", {
Type: ["bornwith", "Animal"],
Defense: 5,
Slot: 'mainhand',
equipped: true,
});
var talons = createItem("Talons", {
Type: ["bornwith", "weapon", "1-handed", "Animal", "piercing"],
Damage: '3d4',
Defense: 3,
Slot: 'feet',
equipped: true,
});
var Wings2 = createItem ("Offhand Wing", {
Type: ["bornwith", "Animal"],
Defense: 5,
Slot: 'offhand',
equipped: true,
});
var maw = createItem ("Maw", {
Type: ["bornwith", "piercing", "vicious"],
Defense: 0,
Slot: "head",
Damage: "1d10",
equiiped: true,
});
var rock = createItem("Rock", {
Name_pt: "Pedra",
Description_pt: "Eu podia fazer uma montanha de piadas de pedra. Mas ai, iram deslizar.",
Description: "I could make a montain of rock jokes. But then, they would slide.",
Type: ["weapon", "blunt", "1-handed", "light", "throwing"],
Slot: 'mainhand',
Damage: "3d4",
ammo: 3,
Price: 0,
equipped: false,
});
State.variables.character = [""];
class character {
constructor(
Name = "Unknown",
Ancestry = "Unknown",
Specialization = "Unknown",
Origin = "Unknown",
AP = 0,
APregen = 2,
BaseDefense = 10,
Pact = "",
level = 1,
STR = 3,
DEX = 3,
RES = 3,
INT = 3,
CHA = 3,
PER = 3,
MAXLIFE = 25,
MAXMANA = 10,
currentLife = 25,
currentMana = 10,
Athletics = 1,
Acrobatics = 1,
Stealth = 1,
SleightofHands = 1,
WorldKnowledge = 1,
MysticalKnowledge = 1,
ArcaneKnowledge = 1,
Speech = 1,
Arts = 1,
Intimidation = 1,
Insight = 1,
Awareness = 1,
availableAttribute = 1,
availableExpertise = 1,
traits = [],
skills = [],
inventory = [],
equipment = {
head: 'Empty Head',
torso: 'Empty Torso',
waist: 'Empty Waist',
legs: 'Empty Legs',
feet: 'Empty Feet',
mainhand: 'Fist',
offhand: 'Other hand'
},
broken = [],
statusEffects = {
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
},
blind: false,
hidden: false,
},
additionalDefense = 0,
additionalDamage = 0,
additionalHitChance = 0
) {
this.Name = Name;
this.Ancestry = Ancestry;
this.Specialization = Specialization;
this.Origin = Origin;
this.AP = AP;
this.APregen = APregen;
this.BaseDefense = BaseDefense;
this.level = level;
this.experience = 0;
this.STR = STR;
this.DEX = DEX;
this.RES = RES;
this.INT = INT;
this.CHA = CHA;
this.PER = PER;
this.MAXLIFE = MAXLIFE,
this.MAXMANA = MAXMANA,
this.currentLife = currentLife,
this.currentMana = currentMana,
this.Athletics = Athletics;
this.Acrobatics = Acrobatics;
this.Stealth = Stealth;
this.SleightofHands = SleightofHands;
this.WorldKnowledge = WorldKnowledge;
this.MysticalKnowledge = MysticalKnowledge;
this.ArcaneKnowledge = ArcaneKnowledge;
this.Speech = Speech;
this.Arts = Arts;
this.Intimidation = Intimidation;
this.Insight = Insight;
this.Awareness = Awareness;
this.availableAttribute = availableAttribute;
this.availableExpertise = availableExpertise;
this.traits = traits;
this.skills = skills;
this.inventory = inventory;
this.equipment = equipment;
this.broken = broken,
this.statusEffects = {
hidden: false,
blind: false,
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
improvedAttacks: 0, //Improved attacks, for Improved attacks
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
this.additionalDefense = additionalDefense;
this.additionalDamage = additionalDamage;
this.additionalHitChance = additionalHitChance;
this.Gold = 0;
}
addSkill(skillName) {
// Find the skill in State.variables.skill array based on its name
const skillToAdd = State.variables.skill.find(skill => skill.name === skillName);
// If the skill is found, add a copy of it to the character's skills array
if (skillToAdd) {
// Create a new object with the same properties as the skillToAdd
const learnedSkill = Object.assign({}, skillToAdd);
if (!this.skills.includes(skillToAdd)) {
learnedSkill.learned = true; // Set the learned property of the added skill instance to true
this.skills.push(learnedSkill);
console.log(`${this.Name} learned ${learnedSkill.name}!`);
}
} else {
console.log(`Skill not found: ${skillName}`);
}
}
addTrait(trait) {
// Check if the trait is not already in the traits array
if (!this.traits.includes(trait)) {
this.traits.push(trait);
if (trait === "Trancendance") {
this.availableAttribute += 10;
}
if (trait === "Ascencion") {
this.additionalDefense += this.CHA;
this.additionalDamage += this.INT;
}
if (trait === "Masterful Summons") {
const indexToRemove = this.traits.indexOf("Improved Summons");
if (indexToRemove !== -1) {
this.traits.splice(indexToRemove, 1);
}
}
if (trait === "Vampyric Hunger") {
if (this.Pact === "" || this.Pact === "Blood") {
this.addSkill("Thirst for Blood")
this.addSkill("Drain")
this.Pact === "Blood";
}
}
if (trait === "Arcane Weapon") {
this.addSkill("Summon Arcane Blade")
}
if (trait === "Elemental Afinity I") {
this.addSkill("Rainfall")
this.addSkill("Turn the Tides")
}
if (trait === "Elemental Afinity II") {
this.addSkill("Stormsurge")
this.addSkill("Gale Winds")
}
if (trait === "Elemental Afinity III") {
this.addSkill("Eruption")
this.addSkill("Blazing Strike")
}
if (trait === "Elemental Afinity IV") {
this.addSkill("Tremors")
this.addSkill("Turn to Stone")
}
if (trait === "Divine Foundation") {
this.addSkill("Heal")
this.addSkill("Judgement")
this.addSkill("Shield of the Faithfull")
}
if (trait === "Arcane Initiation") {
this.addSkill("Fire Bolt")
this.addSkill("Lightning Strike")
this.addSkill("Freeze")
}
if (trait === "Arcane Mastery") {
this.addSkill("Inferno")
this.addSkill("Storm")
this.addSkill("Blizzard")
}
if (trait === "Fluid Movements II") {
const indexToRemove = this.traits.indexOf("Fluid Movements");
if (indexToRemove !== -1) {
this.traits.splice(indexToRemove, 1);
}
}
if (trait === "Overflow II") {
const indexToRemove = this.traits.indexOf("Overflow");
if (indexToRemove !== -1) {
this.traits.splice(indexToRemove, 1);
}
}
if (trait === "Overflow III") {
const indexToRemove = this.traits.indexOf("Overflow II");
if (indexToRemove !== -1) {
this.traits.splice(indexToRemove, 1);
}
}
if (trait === "Impossible Flurry") {
const index = this.trait.indexOf("Flurry");
if (index !== -1) {
this.traits.splice(index, 1);
}
}
if (trait === "Improved Cirurgic Precision") {
const index = this.trait.indexOf("Cirurgic Precision");
if (index !== -1) {
this.traits.splice(index, 1);
}
}
if (trait === "Expert") {
const index = this.traits.indexOf("Novice");
if (index !== -1) {
this.traits.splice(index, 1);
}
}
if (trait === "Master") {
const index = this.traits.indexOf("Expert");
if (index !== -1) {
this.traits.splice(index, 1);
}
}
if (trait === "Feral Mask") {
this.addSkill("Form of the Bear");
this.addSkill("Form of the Eagle");
this.addSkill("Form of the Wolf");
}
if (trait === "Aura of Devotion" && this.Specialization === "Paladin") {
// Check if Aura of Devotion is not already in traits array
const index = this.traits.indexOf("Aura of Devotion");
if (index !== -1) {
this.traits.splice(index, 1);
if (this.Oath === "Selfishness") {
this.traits.push("Aura of the Uncaring");
this.additionalDamage += 5;
this.SleightofHands += Math.round(this.PER / 3);
} else if (this.Oath === "Conquest") {
this.traits.push("Aura of Tyrants");
this.additionalDamage += 5;
this.Intimidation += Math.round(this.PER / 3);
} else if (this.Oath === "Liberty") {
this.traits.push("Aura of the Dauntless");
this.additionalDefense += 5;
this.Acrobatics += Math.round(this.PER / 3);
} else if (this.Oath === "Justice") {
this.traits.push("Aura of Heroism");
this.additionalDefense += 5;
this.Athletics += Math.round(this.PER / 3);
}
}
}
}
}
}
const Player = new character();
Player.Name = "Player Character";
Player.Pact = "";
Player.secondPact = "";
Player.Oath = "",
Player.GOD = "",
Player.STR = 5;
Player.DEX = 5;
Player.RES = 5;
Player.INT = 5;
Player.CHA = 5;
Player.PER = 5;
Player.Ancestry = "Unknown";
Player.Specialization = "Unknown";
Player.Origin = "Unknown";
Player.AP = 0;
Player.APregen = 2;
Player.BaseDefense = 10;
Player.level = 1;
Player.experience = 0;
Player.MAXLIFE = 25 + (Player.RES * Player.level) + 5;
Player.MAXMANA = 10 + (Player.INT * Player.level) + 5;
Player.currentLife = 25 + (Player.RES * Player.level) + 5;
Player.currentMana = 10 + (Player.INT * Player.level) + 5;
Player.experience = 0;
Player.Athletics = 1;
Player.Acrobatics = 1;
Player.Stealth = 1;
Player.SleightofHands = 1;
Player.WorldKnowledge = 1;
Player.MysticalKnowledge = 1;
Player.ArcaneKnowledge = 1;
Player.Speech = 1;
Player.Arts = 1;
Player.Intimidation = 1;
Player.Insight = 1;
Player.Awareness = 1;
Player.availableAttribute = 15;
Player.availableExpertise = 10;
Player.traits = [];
Player.skills = [];
Player.broken = [];
Player.inventory = [];
Player.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
mainhand: State.variables.Items.Fist,
offhand: State.variables.Items["Other hand"]
};
Player.Gold = 0;
Player.statusEffects = {
hidden: false,
blind: false,
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
improvedAttacks: 0,
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
Player.additionalDefense = 0;
Player.additionalDamage = 0;
Player.additionalHitChance = 0;
State.variables.character.push(Player);
State.variables.character[1] === Player;
window.randomCharacterCreation = function () {
let player = Player;
for (let slot in player.equipment) {
if (player.equipment[slot].equipped === true && !player.equipment[slot].Type.includes("bornwith")) {
unequipItem(player.equipment[slot]);
}
}
player.traits = [];
player.skills = [];
player.inventory = [];
const possibleAncestry = ["Human", "Dwarf", "Draconian", "Elf", "Vanadi", "Herald"];
const possibleSpec = ["Vanguard", "Archer", "Duelist", "Shredder", "Assassin", "Thief", "Spy", "Trapper", "Juggernaut", "Berserker", "Feral", "Shaman", "Wizard", "Warlock", "Invoker", "Spellblade", "Dancer", "Bard", "Scholar", "Barber Surgeon", "Paladin", "Cleric", "Inquisitor", "Flagellant"];
player.Ancestry = possibleAncestry[Math.floor(Math.random() * possibleAncestry.length)];
player.Specialization = possibleSpec[Math.floor(Math.random() * possibleSpec.length)];
if (player.Ancestry === "Human") {
player.addTrait("Adaptable");
player.availableAttribute += 5;
player.addTrait("Unlimited Potential");
} else if (player.Ancestry === "Dwarf") {
player.addTrait("Ancestral Knowledge");
player.availableExpertise += 10;
player.addTrait("Reforger");
} else if (player.Ancestry === "Draconian") {
player.addTrait("Natural Warriors");
player.addTrait("Apex Hunter");
player.equipment.mainhand = State.variables.Items["Draconian claw"]
player.equipment.offhand = State.variables.Items["Other Draconian claw"]
} else if (player.Ancestry === "Elf") {
player.addTrait("Favored");
player.addTrait("Harmonious Existence");
} else if (player.Ancestry === "Vanadi") {
player.addTrait("Animal senses");
player.addTrait("Feral Mask");
} else if (player.Ancestry === "Herald") {
player.addTrait("Arcane Core");
const calling = ["Nature's Harbinger", "Cosmos' Harbinger", "Creation's Harbinger", "Destruction's Harbinger"];
State.variables.HeraldCHoice = calling[Math.floor(Math.random() * calling.length)];
if (State.variables.HeraldCHoice === "Nature's Harbinger") {
player.addTrait("Nature's Blessing");
} else if (State.variables.HeraldCHoice === "Cosmos' Harbinger") {
player.addTrait("Astral Connection");
} else if (State.variables.HeraldCHoice === "Creation's Harbinger") {
player.addTrait("Architect of Reality");
} else if (State.variables.HeraldCHoice === "Destruction's Harbinger") {
player.addTrait("Eternal Hunger");
}
}
if (player.Specialization === "Paladin") {
const possibleOath = ["Selfishness", "Conquest", "Liberty", "Justice"];
player.Oath = possibleOath[Math.floor(Math.random() * possibleOath.length)];
} else if (player.Specialization === "Warlock") {
const possiblePact = ["Blood", "Shadows", "Soul", "Fate"];
player.Pact = possiblePact[Math.floor(Math.random() * possiblePact.length)];
}
while (player.availableAttribute > 0) {
const maxAttributeValue = 14;
const attr = ["STR", "DEX", "RES", "INT", "PER"];
let toIncrease = attr[Math.floor(Math.random() * attr.length)];
if (player[toIncrease] < maxAttributeValue) {
player[toIncrease] += 1;
player.availableAttribute -= 1;
}
}
while (player.availableExpertise > 0) {
const maxExpertisevalue = 20;
const exper = ["Athletics", "Acrobatics", "Stealth", "SleightofHands", "WorldKnowledge", "MysticalKnowledge", "ArcaneKnowledge", "Speech", "Arts", "Intimidation", "Insight", "Awareness"];
let toIncrease = exper[Math.floor(Math.random() * exper.length)];
if (player[toIncrease] < maxExpertisevalue) {
player[toIncrease] += 1;
player.availableExpertise -= 1;
}
}
State.variables.character[1] = player;
};
Macro.add('test', {
tags: ['onSuccess', 'onFailure'],
handler: function () {
const expertise = this.args[0];
const onSuccess = this.payload[1].contents;
const onFailure = this.payload[2].contents;
const $wrapper = $(document.createElement('span'));
let language = State.variables.language;
let targetNumber = this.args[1];
const translatedExpertise = {
"PT-BR": {
"Athletics": "Atletismo",
"Acrobatics": "Acrobacia",
"Stealth": "Furtividade",
"Sleight of Hands": "Truque de Mãos",
"World Knowledge": "Conhecimento do Mundo",
"Mystical Knowledge": "Conhecimento Místico",
"Arcane Knowledge": "Conhecimento Arcano",
"Speech": "Fala",
"Intimidation": "Intimidação",
"Insight": "Dicernimento",
"Awareness": "Conciência"
},
"EN": {
"Athletics": "Athletics",
"Acrobatics": "Acrobatics",
"Stealth": "Stealth",
"Sleight of Hands": "Sleight of Hands",
"World Knowledge": "World Knowledge",
"Mystical Knowledge": "Mystical Knowledge",
"Arcane Knowledge": "Arcane Knowledge",
"Speech": "Speech",
"Intimidation": "Intimidation",
"Insight": "Insight",
"Awareness": "Awareness"
}
};
let dice1 = rollDice('1d6');
let dice2 = rollDice('1d6');
let dice3 = rollDice('1d6')
let d1 = 6;
let d2 = 6;
if (State.variables.character[1].Pact === 'Fate') {
dice1 = rollDice('1d4');
dice2 = rollDice('1d4');
d1 = 4;
d2 = 4;
} else if (State.variables.character[1].traits.includes("Novice Knowledge")) {
dice1 = rollDice('1d8');
d1 = 8;
} else if (State.variables.character[1].traits.includes("Expert Knowledge")) {
dice1 = rollDice('1d10');
dice2 = rollDice('1d8');
d1 = 10;
d2 = 8;
} else if (State.variables.character[1].traits.includes("Legendary Knowledge")) {
dice1 = rollDice('1d112');
dice2 = rollDice('1d12');
d1 = 12;
d2 = 12;
} else if (State.variables.character[1].traits.includes("Gambler")) {
dice1 = rollDice('1d4');
dice2 = rollDice('1d10');
d1 = 4;
d2 = 10;
}
let bonus = 0;
let diceimg1 = "img/others/Dice" + dice1 + ".png";
let diceimg2 = "img/others/Dice" + dice2 + ".png";
if (State.variables.difficulty === "easy") {
targetNumber = Math.round((targetNumber * 0.75));
} else if (State.variables.difficulty === "hard") {
targetNumber = Math.round((targetNumber * 1.35));
}
if (State.variables.character[1].Ancestry === 'Elf') {
targetNumber = Math.round((targetNumber * 0.65));
}
if (typeof State.variables.character[1][expertise] === 'number') {
if (State.variables.character[1].Pact === 'Soul') {
bonus -= Math.round(Player[expertise] / 2);
}
if (State.variables.character[1].traits.includes("Professional Robber") && expertise === "Stealth" || expertise === "Sleight of Hands") {
bonus += State.variables.character[1].level
}
if (State.variables.character[1].traits.includes("Jack-of-All-Trades")){
bonus += 2
if (State.variables.character[1].level > 7) {
bonus += 2
}
if (State.variables.character[1].level > 15) {
bonus += 2
}
}
if (State.variables.character[1].traits.includes("Silver Tongue") && expertise === "Speech") {
bonus += State.variables.character[1].level + 3
}
if (State.variables.character[1].traits.includes("Inquiry") && expertise === "Speech" || expertise === "Intimidation") {
bonus += Math.round((State.variables.character[1].PER /3))
}
if (State.variables.character[1].traits.includes("Trustworthy Instrument") && expertise === "Art") {
if (State.variables.character[1].equipment.mainhand.type.includes("Instrument") || State.variables.character[1].equipment.offhand.type.includes("instrument")) {
bonus += 5;
}
}
if (State.variables.character[1].traits.includes("Oathkeeper")) {
if (expertise === "Sleight of Hands" && State.variables.character[1].Oath === "Selfishness") {
State.variables.alignment.evilChaos++
} else if (expertise === "Intimidation" && State.variables.character[1].Oath === "Conquest") {
State.variables.alignment.evilOrder++
} else if (expertise === "Acrobatics" && State.variables.character[1].Oath === "Liberty") {
State.variables.alignment.goodChaos++
} else if (expertise === "Athletics" && State.variables.character[1].Oath === "Justice") {
State.variables.alignment.goodOrder++
}
}
if (State.variables.character[1].traits.includes("Champion's Might") && expertise === "Athletics") {
bonus += Math.round((State.variables.character[1].RES / 2));
}
let content = ""; // Placeholder for the content
let neededXP = State.variables.xpToLevelUp;
const startButton = document.createElement('button');
startButton.textContent = language == "PT-BR" ? "Começar Teste de " + translatedExpertise[language][expertise] : "Start " + expertise + " Test";
startButton.onclick = function () {
window.startRoll(diceimg1, diceimg2, d1, d2);
let result = dice1 + dice2 + State.variables.character[1][expertise] + bonus;
if (State.variables.character[1].traits.includes("Blade Dancer") && expertise === "Acrobatics") {
result = dice1 + dice2 + State.variables.character[1].Arts + bonus;
} else if (State.variables.character[1].traits.includes("Wide Range") && expertise === "WorldKnowledge") {
result = dice1 + dice2 + State.variables.character[1].Arts + bonus;
}
if (State.variables.character[1].traits.includes("Winning Smile") && result < 10) {
bonus += Math.round((State.variables.character[1].CHA / 3));
result = dice1 + dice2 + State.variables.character[1][expertise] + bonus;
}
const combinedArmor = [
State.variables.character[1].equipment.head,
State.variables.character[1].equipment.torso,
State.variables.character[1].equipment.waist,
State.variables.character[1].equipment.mainhand,
State.variables.character[1].equipment.offhand,
State.variables.character[1].equipment.legs,
State.variables.character[1].equipment.feet,
];
combinedArmor.forEach(armor => {
if(armor.Type.includes("Cursed")) {
if (armor.curse === "Screaming") {
if (expertise === "Stealth") {
bonus -= 5
} else if (expertise === "Intimidation") {
bonus += 3
} else if (expertise === "Speech") {
bonus -= 2
}
}
}
if (armor.Type.includes("Enchanted")) {
if (armor.enchantment === "Wise") {
bonus += Math.round((rollDice(armor.Damage) / 2))
}
}
if (armor.Type.includes("naked")) {
if (expertise === "Intimidation" || expertise === "Speech") {
bonus -= 2;
} else if (expertise === "Athletics" || expertise === "Acrobatics") {
bonus += 2
}
}
if (armor.Type.includes("holy")) {
if (result < targetNumber) {
bonus += 2
}
if (expertise === "MysticalKnowledge") {
bonus += 4
}
} else if (armor.Type.includes("divine")) {
if (result < targetNumber) {
bonus += 4
}
if (expertise === "MysticalKnowledge") {
bonus += 8
}
if (armor.Type.includes("secretive")) {
if (expertise === "Stealth") {
bonus += 2
}
}
if (armor.Type.includes("instrument")) {
if (expertise === "Arts") {
bonus += 2
}
}
if (armor.Type.includes("elegant")) {
if (expertise === "Speech") {
bonus += 2;
}
}
}
})
result = dice1 + dice2 + State.variables.character[1][expertise] + bonus;
if (State.variables.character[1].traits.includes("Hidden Machinations")) {
if (expertise === "Sleight of Hands" || expertise === "World Knowledge" || expertise === "Insight") {
let bestresult = rollDice('1d6')
if (bestresult > dice3) {
dice3 = bestresult
}
}
result += dice3
let diceimg3 = "img/others/Dice" + dice3 + ".png";
}
const isSuccess = result >= targetNumber;
if (State.variables.character[1].traits.includes("Faceless Shadow") && expertise === "Stealth") {
isSuccess = true
}
let XPreward = 0;
if (State.variables.difficulty === "easy") {
if (targetNumber < 7) {
XPreward = Math.round((0.06 * neededXP));
} else if (targetNumber >= 7 && targetNumber < 14) {
XPreward = Math.round((0.1 * neededXP));
} else {
XPreward = Math.round((0.14 * neededXP));
}
} else if (State.variables.difficulty === "hard") {
if (targetNumber < 7) {
XPreward = Math.round((0.02 * neededXP));
} else if (targetNumber >= 7 && targetNumber < 14) {
XPreward = Math.round((0.06 * neededXP));
} else {
XPreward = Math.round((0.10 * neededXP));
}
} else {
if (targetNumber < 7) {
XPreward = Math.round((0.04 * neededXP));
} else if (targetNumber >= 7 && targetNumber < 14) {
XPreward = Math.round((0.08 * neededXP));
} else {
XPreward = Math.round((0.12 * neededXP));
}
}
if (State.variables.character[1].traits.includes("Genius Mind")) {
XPreward = Math.round((XPreward * 0.5))
}
if (!isSuccess) {
//start of the test
let Usinggrace = false
const divineGraceButton = document.createElement('button');
divineGraceButton.textContent = "PT-BR" ? "Os deuses permitiram você refazer o Teste de " + translatedExpertise[language][expertise] : "The gods allowed you to retake the " + expertise + " Test";
if (State.variables.character[1].traits.includes("Divine Grace") && State.variables.character[1].statusEffects.grace > 0) {
Usinggrace = true
divineGraceButton.onclick = function () {
dice1 = rollDice(`1d${d1}`);
dice2 = rollDice(`1d${d2}`);
window.startRoll(diceimg1, diceimg2, d1, d2);
result = dice1 + dice2 + State.variables.character[1][expertise] + bonus;
if (State.variables.character[1].traits.includes("Blade Dancer") && expertise === "Acrobatics") {
result = dice1 + dice2 + State.variables.character[1].Arts + bonus;
} else if (State.variables.character[1].traits.includes("Wide Range") && expertise === "WorldKnowledge") {
result = dice1 + dice2 + State.variables.character[1].Arts + bonus;
}
if (State.variables.character[1].traits.includes("Winning Smile") && result < 10) {
bonus += Math.round((State.variables.character[1].CHA / 3));
}
if (State.variables.character[1].traits.includes("Hidden Machinations")) {
if (expertise === "Sleight of Hands" || expertise === "World Knowledge" || expertise === "Insight") {
let bestresult = rollDice('1d6')
if (bestresult > dice3) {
dice3 = bestresult
}
}
result += dice3
let diceimg3 = "img/others/Dice" + dice3 + ".png";
}
if (isSuccess) {
//DivineGraceSuccess
if (State.variables.language === "EN") {
addToBattleLog(`${State.variables.character[1].Name} obtains a Sucess in their ${expertise} Test, earning ${XPreward} Experience.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${State.variables.character[1].Name} obtêm Sucesso em seu Teste de ${translatedExpertise[language][expertise]}, ganhando ${XPreward} de Expêriencia.`);
}
State.variables.character[1].experience += XPreward;
content = State.variables.language === "EN" ?`<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${expertise}:</b> ${State.variables.character[1][expertise]} + <b>Bonus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${XPreward} experience earned.<</notify>> ${onSuccess}` : `<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${translatedExpertise[language][expertise]}:</b> ${State.variables.character[1][expertise]} + <b>Bônus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${XPreward} de experiência ganha.<</notify>> ${onSuccess}`;
} else if (!isSuccess) {
if (State.variables.language === "EN") {
addToBattleLog(`${State.variables.character[1].Name} Fails in their ${expertise} Test, earning ${XPreward} Experience.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${State.variables.character[1].Name} Falha em seu Teste de ${translatedExpertise[language][expertise]}, ganhando ${XPreward} de Expêriencia.`);
}
//DivineGraceFailure
State.variables.character[1].experience += Math.round(XPreward / 2);
content = State.variables.language === "EN" ? `<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${expertise}:</b> ${State.variables.character[1][expertise]} + <b>Bonus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${Math.round((XPreward / 2))} experience earned.<</notify>> ${onFailure}` : `<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${translatedExpertise[language][expertise]}:</b> ${State.variables.character[1][expertise]} + <b>Bônus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${XPreward} de experiência ganha.<</notify>> ${onFailure}`;
}
$wrapper
.empty() // Clear previous content
.wiki(content) // Update with new content
.addClass('macro-' + this.name)
.appendTo(this.output);
window.startRoll(diceimg1, diceimg2, d1, d2); // Initiate dice rolling after clicking the button
};
} else {
//normal failure
if (State.variables.language === "EN") {
addToBattleLog(`${State.variables.character[1].Name} Fails in their ${expertise} Test, earning ${XPreward} Experience.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${State.variables.character[1].Name} Falha em seu Teste de ${translatedExpertise[language][expertise]}, ganhando ${XPreward} de Expêriencia.`);
}
State.variables.character[1].experience += Math.round(XPreward / 2);
content = State.variables.language === "EN" ? `<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${expertise}:</b> ${State.variables.character[1][expertise]} + <b>Bonus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${Math.round((XPreward / 2))} experience earned.<</notify>> ${onFailure}` : `<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${translatedExpertise[language][expertise]}:</b> ${State.variables.character[1][expertise]} + <b>Bônus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${XPreward} de experiência ganha.<</notify>> ${onFailure}`;
}
}
if (isSuccess) {
if (State.variables.language === "EN") {
addToBattleLog(`${State.variables.character[1].Name} obtains a Sucess in their ${expertise} Test, earning ${XPreward} Experience.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${State.variables.character[1].Name} obtêm Sucesso em seu Teste de ${translatedExpertise[language][expertise]}, ganhando ${XPreward} de Expêriencia.`);
}
//normal success
State.variables.character[1].experience += XPreward;
content = State.variables.language === "EN" ?`<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${expertise}:</b> ${State.variables.character[1][expertise]} + <b>Bonus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${XPreward} experience earned.<</notify>> ${onSuccess}` : `<<message "${result}">><img src='${diceimg1}'> + <img src='${diceimg2}'> + ${State.variables.character[1].traits.includes("Hidden Machinations") ? "+ <img src='" + diceimg3 + "'>" : ""} <b>${translatedExpertise[language][expertise]}:</b> ${State.variables.character[1][expertise]} + <b>Bônus:</b> ${bonus}<</message>> vs <b>${targetNumber}</b> <<notify 2000>> +${XPreward} de experiência ganha.<</notify>> ${onSuccess}`;
}
$wrapper
.empty() // Clear previous content
.wiki(content) // Update with new content
.addClass('macro-' + this.name)
.appendTo(this.output);
if (State.variables.character[1].traits.includes("Divine Grace") && State.variables.character[1].statusEffects.grace > 0 && Usinggrace) {
State.variables.character[1].statusEffects.grace -= 1;
$wrapper.append(divineGraceButton).appendTo(this.output);
Usinggrace = false;
}
};
$wrapper
.empty() // Clear previous content
.wiki(content) // Update with new content
.addClass('macro-' + this.name)
.appendTo(this.output);
$wrapper.append(startButton).appendTo(this.output);
}
}
});
const diceImages = [
'img/others/Dice1.png',
'img/others/Dice2.png',
'img/others/Dice3.png',
'img/others/Dice4.png',
'img/others/Dice5.png',
'img/others/Dice6.png',
'img/others/Dice7.png',
'img/others/Dice8.png',
'img/others/Dice9.png',
'img/others/Dice10.png',
'img/others/Dice11.png',
'img/others/Dice12.png',
];
window.startRoll = function(result1, result2, d1, d2) {
setup.notify(`<div class="dice-container"> You rolled a
<img id="dice1" src="${result1}" alt="Dice 1"> and a <img id="dice2" src="${result2}" alt="Dice 2">
</div>`, 6000, "dice-container");
const diceElement1 = document.getElementById('dice1');
const diceElement2 = document.getElementById('dice2');
let i = 0;
let diceValue1 = Math.floor(Math.random() * d1) + 1; // Random number between 1 and 6 for dice 1
let diceValue2 = Math.floor(Math.random() * d2) + 1; // Random number between 1 and 6 for dice 2
const rollInterval = setInterval(() => {
diceElement1.src = diceImages[i % diceImages.length];
diceElement2.src = diceImages[i % diceImages.length];
i++;
if (i >= 12) {
clearInterval(rollInterval);
// Set the final dice values and trigger the end animation
diceElement1.src = result1 || "img/others/dice" + diceValue1 + ".png";
diceElement2.src = result2 || "img/others/dice" + diceValue2 + ".png";
diceElement1.classList.add('animate');
diceElement2.classList.add('animate');
}
}, 100); // Adjust the interval timing as needed
}
function addItemToInventory(itemName) {
const item = State.variables.Items[itemName];
if (item) {
const existingItem = State.variables.character[1].inventory.find((invItem) => invItem.Name === itemName);
if (existingItem) {
existingItem.count += 1;
} else {
const itemCopy = { ...item };
itemCopy.count = 1;
State.variables.character[1].inventory.push(itemCopy);
}
}
}
window.curseItem = function(itemName) {
let item = State.variables.Items[itemName]; // Get the original item
let curse = ""
if (!item.Type.includes("cursed") && !item.Type.includes("bornwith")) {
if (item.equipped) {
unequipItem(item.Slot)
}
if (item.count > 1) {
item.count -= 1;
}
if (item.Type.includes("weapon")) {
const weaponCurse = [
"Vampyric", //When making a weapon attack with this weapon, you and the target loose 3% of each one total Lifeblood
"Weathered", //Recue the number of dices by 1.
"Pathetic", //Reduce your weapon dice by 1 step
"Essence Draining", //When making a weapon attack with this weapon, you and the target loose 3% of each one total Essence
"Unholy", //Add the unholy trait to your weapon, which heals Vampyres, Daemons and Undead by half of the damage dealt
"Cowardly", //Reduce your hit chance by 10
"Screaming", //-5 to Stealth tests, -2 to Speech tests and +3 to Intimidation tests.
"Hungry", //Increase weapon damage dice by 1 step, At the end of your turn, if you haven't hit an enemy with an weapon attack, strike yourself.
"Burning", //Whenever you make a weapon attack with this weapon, damage yourself by 6.
"Possessed", //At start of your turn, make a weapon attack against a random enemy
];
curse = weaponCurse[Math.floor(Math.random() * weaponCurse.length)];
const [numDice, numSides] = item.Damage.split('d').map(Number);
if (curse === "Weathered") {
if (numDice > 1) {
numDice -= 1
} else if (numSides > 4) {
numSides -= 2
}
} else if (curse === "Unholy") {
if (item.Type.includes("holy")) {
const index = item.Type.indexOf("holy");
if (index !== -1) {
item.Type.splice(index, 1);
}
} else {
item.Type.push("unholy")
}
} else if (curse === "Pathetic") {
if (numSides > 4) {
numSides -= 2
} else if (numDice > 1) {
numDice -= 1
}
}
} else if (item.Type.includes("wearable")) {
const gearCurse = [
"Weathered",
"Screaming",
"Unholy", // Takes 50% extra damage from holy weapons.
"Daemon-touched", //Increase all damage taken by 5%
"Living", //During Athletics, Sleight of Hands and Acrobatics tests when the result would be higher than the target number, reroll
"Stone",//Makes the gear unusuble
];
if (curse === "Unholy") {
if (item.Type.includes("holy")) {
const index = item.Type.indexOf("holy");
if (index !== -1) {
item.Type.splice(index, 1);
}
} else {
item.Type.push("unholy")
}
} else if (curse === "Weathered") {
item.Defense -= 2
} else if (curse === "Stone") {
const index = item.Type.indexOf("wearable");
if (index !== -1) {
item.Type.splice(index, 1);
}
}
item.Defense -= 3;
}
item.Price = Math.round((item.Price * 0.6));
item.Name = curse + " " + itemName;
const translatedCurses = {
"Vampyric": "Vampírica" ,
"Pathetic": "Patética ",
"Essence Draining": "Consumidor de Essência ",
"Unholy": " Profana",
"Cowardly": "Covarde ",
"Screaming": "Gritante ",
"Hungry": "Esfomeada",
"Burning": "Em Chamas",
"Possessed": "Possuída",
"Weathered": "Desgastada",
"Daemon-touched": "Demoníaca",
"Living": "Viva",
"Stone": "De Pedra",
}
item.Name_pt = item.Name_pt + " " + translatedCurses[curse];
item.Type.push("cursed");
item.curse = curse;
if (item.equipped === false) {
addItemToInventory(item);
}
} else {
setup.notify("This item is already cursed.");
}
}
window.enchantItem = function(itemName) {
let item = State.variables.Items[itemName]; // Get the original item
let enchantment = "";
if (!item.Type.includes("enchanted") && !item.Type.includes("bornwith")) {
if (item.equipped) {
unequipItem(item.Slot)
}
if (item.count > 1) {
item.count -= 1;
}
if (item.Type.includes("weapon")) {
const possibleWeaponEnchantment = [
"Spellweaver", //Increase damage dealt by spells by 40%.
"Mighty", //Increase the number of dice of the weapon by 1.
"Intricate", //Add the Elegant trait to the item
"Esoteric", //Add the Esoteric trait to the item
"Holy", //Add the Holy trait to the item.
"Returning", //If ranged, reduce its cooldown by 1 (not lesser than 1). If melee, it becomes a throwing weapon with 10 ammos. If it is a throwing weapon, increase the ammo to 20.
"Fell", //Increase the Die size by 1 additional step.
"Rampaging", //When an enemy dies from a weapon attack, gain 1 AP.
"Vengeful", //Adds 15% of your Missing Lifeblood to the damage.
"Wise", //Add half of your weapon damage dice to tests.
"Protective", //Add half of your weapon damage dice to your Defense
"Dancing", //Whenever you make a weapon attack with this weapon, make a second weapon attack dealing half the damage.
"Light", //Add the Light property to the item (cancels out Heavy). Allowing an item to be used on the offhand without penalty.
];
enchantment = possibleWeaponEnchantment[Math.floor(Math.random() * possibleWeaponEnchantment.length)];
const [numDice, numSides] = item.Damage.split('d').map(Number);
numDice += 1;
if (enchantment === "Mighty") {
if (numSides < 12) {
numSides += 2;
} else {
numDice += 1;
}
} else if (enchantment === "Intricate") {
if (!item.Type.includes("elegant")) {
item.Type.push("elegant");
} else {
item.Price += Math.round((item.Price * 0.2));
}
} else if (enchantment === "Wise" || enchantment === "Protective" || enchantment === "Dancing") {
item.Type.push("Sentient");
} else if (enchantment === "Esoteric") {
if (!item.Type.includes("esoteric")) {
item.Type.push("esoteric");
} else {
enchantment = "Powerful";
}
} else if (enchantment === "Holy") {
if (!item.Type.includes("holy")) {
item.Type.push("holy");
} else {
const index = item.Type.indexOf("holy");
if (index !== -1) {
item.Type.splice(index, 1);
}
enchantment = "Divine";
item.Type.push("divine");
}
} else if (enchantment === "Fell") {
numDice += 1;
} else if (enchantment === "Returning") {
if (item.Type.includes("ranged")) {
if (item.cooldown > 1) {
item.cooldown -= 1;
}
} else if (item.Type.includes("ranged")) {
const index = item.Type.indexOf("melee");
if (index !== -1) {
item.Type.splice(index, 1);
}
item.Type.push("throwing")
item.ammo = 6;
} else if (item.Type.includes("throwing")) {
item.ammo += 14;
}
} else if (enchantment === "Light") {
item.Damage = numDice + "d" + numSides;
} else if (item.Type.includes("shield")) {
const possibleshieldEnchantment = [
"Spell-Hungry", //Reduz o dano tomado por magias em 10%
"Flame-warden", //Quando atacado, aplica Queima por 1 Ação
"Reflective", //Reflete 10% do dano tomado por armas
"Reenforced", //Increase the item defense by 3
"Holy",
];
if (enchantment === "Reenforced") {
item.Defense += 3;
}
item.Defense += 5;
}
} else if (item.Type.includes("wearable")) {
const possibleGearEnchantment = [
"Sturdy",
"Composite",
"Holy", //Takes 50% less damage from Unholy foes (such as Vampyres, Undead, and Daemons)
"Intricate",
"Reenforced", //Increase the item defense by 3
"Arcane", //
"Spiked", //For each Spiked gear, deal 2 damage back against the attacker.
"Light", //Add +2 to acrobatic tests
"Camouflaged",
"Wyrm-blessed",
"Dwarven-made",
];
enchantment = possibleGearEnchantment[Math.floor(Math.random() * possibleGearEnchantment.length)];
if (enchantment === "Sturdy") {
if (!item.Type.includes("sturdy")) {
item.Type.push("sturdy");
} else {
enchantment === "Reenforced";
item.Defense += 3;
}
} else if (enchantment === "Reenforced") {
item.Defense += 3;
} else if (enchantment === "Composite") {
if (!item.Type.includes("composite")) {
item.Type.push("composite");
} else {
enchantment === "Reenforced";
item.Defense += 3;
}
} else if (enchantment === "Holy") {
if (!item.Type.includes("holy")) {
item.Type.push("holy");
} else {
enchantment = "Sacred";
item.Type.push("sacred");
}
} else if (enchantment === "Camouflaged") {
if (!item.Type.includes("secretive")) {
item.Type.push("secretive");
} else {
item.Defense += 1;
}
} else if (enchantment === "Intricate") {
if (!item.Type.includes("elegant")) {
item.Defense -= 1;
item.Type.push("elegant");
} else {
item.Price += Math.round((item.Price * 0.3));
}
} else if (enchantment === "Light") {
item.Defense -= 1;
} else if (enchantment === "Arcane") {
if (!item.Type.includes("arcane")) {
item.Type.push("arcane");
} else {
enchantment === "Reenforced";
item.Defense += 3;
}
}
item.Defense += 2;
}
item.Price = Math.round((item.Price * 1.4));
item.Name = enchantment + " " + itemName;
const translatedEnchantment = {
"Spellweaver": "de Feitiçaria",
"Mighty": "Poderoso",
"Intricate": "Intricado",
"Esoteric": "Esotérico",
"Holy": "Sagrado",
"Returning": "Retornável",
"Vicious": "Cruel",
"Rampaging": "Furioso",
"Vengeful": "Vingativo",
"Wise": "Sábio",
"Protective": "Protetor",
"Dancing": "Dançante",
"Light": "Leve",
"Sturdy": "Resitênte",
"Composite": "Composto",
"Arcane": "Arcano",
"Spiked": "Espinhoso",
"Spell-Hungry": "Faminto por Magia",
"Camouflaged": "Camuflado",
"Flame-warden": "do Fogo Guardião",
"Reflective": "Refletor",
}
item.Name_pt = item.Name_pt + " " + translatedEnchantment[enchantment];
item.Type.push("enchanted");
item.enchantment = enchantment;
const curseChance = rollDice('1d100') < 15;
if (item.equipped === false) {
addItemToInventory(item);
}
} else {
setup.notify("This item is already enchanted.");
}
}
function removeItemFromInventory(itemName) {
const item = setup.Items[itemName];
if (item) {
const existingItemIndex = State.variables.character.inventory.findIndex((invItem) => invItem.Name === itemName);
if (existingItemIndex !== -1) {
State.variables.character.inventory[existingItemIndex].count -= 1;
if (State.variables.character.inventory[existingItemIndex].count === 0) {
State.variables.character.inventory.splice(existingItemIndex, 1);
}
}
}
}
Macro.add('addItem', {
tags: ['item'],
handler: function () {
const itemName = this.args[0];
const modifiers = this.args.slice(1); // Get any additional arguments as modifiers
if (modifiers.includes('enchant')) {
window.enchantItem(itemName);
} else if (modifiers.includes('curse')) {
window.curseItem(itemName);
} else {
addItemToInventory(itemName);
}
},
});
Macro.add('Drop', {
tags: ['item'],
handler: function () {
const itemName = this.args[0];
removeItemFromInventory(itemName);
},
});
function applyDwarfTrait(character) {
if (character.traits.includes("Reforger") && character.Ancestry === "Dwarf") {
const slotsToCheck = [
"head",
"torso",
"waist",
"legs",
"feet",
"offhand"
];
for (const slot of slotsToCheck) {
const equippedArmor = character.equipment[slot];
if (equippedArmor && !equippedArmor.countedForDwarfTrait) {
if (equippedArmor.Type.includes("Giant forged")) {
equippedArmor.Defense += 4;
} else if (equippedArmor.Type.includes("light armor")) {
equippedArmor.Defense += 1;
} else if (equippedArmor.Type.includes("medium armor")) {
equippedArmor.Defense += 2;
} else if (equippedArmor.Type.includes("heavy armor")) {
equippedArmor.Defense += 3;
}
equippedArmor.countedForDwarfTrait = true;
}
}
}
}
function applyIronSuit(character) {
if (character.traits.includes("Iron Suit") && character.Specialization === "Juggernaut") {
const slotsToCheck = ["head", "torso", "waist", "legs", "feet", "offhand"];
for (const slot of slotsToCheck) {
const equippedArmor = character.equipment[slot];
// Check if armor is equipped and not counted for Iron Suit
if (equippedArmor && !equippedArmor.countedForIronSuit) {
// Add additional defense for Iron Suit
character.additionalDefense += 1;
equippedArmor.countedForIronSuit = true;
}
// Check if armor has 'bornwith' type and reduce additional defense
if (equippedArmor && equippedArmor.Type.includes("bornwith")) {
character.additionalDefense -= 1;
}
}
}
}
function applyBladeDancer(character) {
if (character.traits.includes("Blade Dancer") && character.Specialization === "Dancer") {
const equippedweapon = character.equipment.mainhand
if (equippedweapon && !equippedweapon.countedforBladeDancer && equippedweapon.Type.includes("Slashing")) {
equippedweapon.categories.add("instrument")
equippedweapon.countedforBladeDancer = true;
} else {
equippedweapon.countedforBladeDancer = false;
}
}
}
function applytrustworthyInstrument(character) {
const equippedweapon = character.equipment.mainhand
const offhandInstrument = character.equipment.offhand
if (character.traits.includes("Trustworthy Instrument")) {
if (equippedweapon.includes("Instrument")) {
equippedweapon.add("esoteric");
equippedweapon.countedfortrustworthyInstrument = true
} else if (offhandInstrument.includes("instrument")) {
offhandInstrument.add("esoteric");
offhandInstrument.countedfortrustworthyInstrument = true
}
} else {
equippedweapon.countedfortrustworthyInstrument = false
offhandInstrument.countedfortrustworthyInstrument = false
}
}
function equipItem(itemName) {
const character = State.variables.character[1];
const itemInstance = character.inventory.find((item) => item.Name === itemName);
if (itemInstance) {
if (itemInstance.Slot) {
character.equipment[itemInstance.Slot] = itemInstance;
if (itemInstance.mainhand && itemInstance.mainhand.Type) {
character.equipment.offhand = State.variables.Items.Handler;
}
character.inventory.splice(character.inventory.indexOf(itemInstance), 1);
itemInstance.equipped = true;
if (State.variables.language === "EN") {
setup.notify(`You equipped: ${itemInstance.Name}.`);
} else if (State.variables.language === "PT-BR") {
setup.notify(`Você equipou: ${itemInstance.Name_pt}.`);
}
applyIronSuit(character);
applyBladeDancer(character);
applyDwarfTrait(character);
applytrustworthyInstrument(character)
updateGearDisplay();
} else {
if (State.variables.language === "EN") {
setup.notify(`Cannot be equipped: ${itemInstance.Name}. Author fucked up.`);
} else if (State.variables.language === "PT-BR") {
setup.notify(`Não pode ser equipado: ${itemInstance.Name_pt}. Autor fez merda.`);
}
}
} else {
console.error(`Item not found: ${itemName}`);
}
}
// Macro to call the equipItem function
Macro.add("equipItem", {
handler: function () {
const itemName = this.args[0];
equipItem(itemName);
},
});
window.updateGearDisplay = function () {
var gearContainer = document.getElementById("gear-container");
if (gearContainer) {
var gearSpan = document.getElementById("gear");
var newGearSpan = document.createElement("span");
newGearSpan.id = "gear";
newGearSpan.innerHTML = getGearHTML(State.variables.character[1]);
gearContainer.replaceChild(newGearSpan, gearSpan);
}
}
function getGearHTML(character) {
if (State.variables.language === "EN") {
var gearHTML = `
<p><b>Head:</b> ${character.equipment.head.Name} ${
character.equipment.head.Name !== 'Empty Head'
? `<button onclick='unequipItem("head")'>Unequip</button>`
: ''
}</p>
<img src="${character.equipment.head.icon}">
<p><i>${character.equipment.head.Description}</i></p>
<img src="${character.equipment.torso.icon}">
<p><b>Torso:</b> ${character.equipment.torso.Name} ${
character.equipment.torso.Name !== 'Empty Torso'
? `<button onclick='unequipItem("torso")'>Unequip</button>`
: ''
}</p>
<p><i>${character.equipment.torso.Description}</i></p>
<p><b>Waist:</b> ${character.equipment.waist.Name} ${
character.equipment.waist.Name !== 'Empty Waist'
? `<button onclick='unequipItem("waist")'>Unequip</button>`
: ''
}</p>
<p><i>${character.equipment.waist.Description}</i></p>
<p><b>Legs:</b> ${character.equipment.legs.Name} ${
character.equipment.legs.Name !== 'Empty Legs'
? `<button onclick='unequipItem("legs")'>Unequip</button>`
: ''
}</p>
<p><i>${character.equipment.legs.Description}</i></p>
<p><b>Feet:</b> ${character.equipment.feet.Name} ${
character.equipment.feet.Name !== 'Empty Feet'
? `<button onclick='unequipItem("feet")'>Unequip</button>`
: ''
}</p>
<p><i>${character.equipment.feet.Description}</i></p>
<p><b>Main hand:</b> ${character.equipment.mainhand.Name} ${
character.equipment.mainhand.Name !== 'Fist' ||
character.equipment.mainhand.Name !== 'Draconian claw'
? `<button onclick='unequipItem("mainhand")'>Unequip</button>`
: ''
}</p>
<img src=${character.equipment.mainhand.icon}>
<p><i>${character.equipment.mainhand.Description}</i></p>
<p><b>Offhand:</b> ${character.equipment.offhand.Name} ${
character.equipment.offhand.Name !== 'Other hand' ||
character.equipment.offhand.Name !== 'Handle' ||
character.equipment.offhand.Name !== 'Other Draconian claw'
? `<button onclick='unequipItem("offhand")'>Unequip</button>`
: ''
}</p>
<p><i>${character.equipment.offhand.Description}</i></p>
`;
} else if (State.variables.language === "PT-BR") {
var gearHTML = `
<p><b>Head:</b> ${character.equipment.head.Name_pt} ${
character.equipment.head.Name !== 'Empty Head'
? `<button onclick='unequipItem("head")'>Desequipar</button>`
: ''
}</p>
<img src="${character.equipment.head.icon}">
<p><i>${character.equipment.head.Description_pt}</i></p>
<p><b>Torso:</b> ${character.equipment.torso.Name_pt} ${
character.equipment.torso.Name !== 'Empty Torso'
? `<button onclick='unequipItem("torso")'>Desequipar</button>`
: ''
}</p>
<img src="${character.equipment.torso.icon}">
<p><i>${character.equipment.torso.Description_pt}</i></p>
<p><b>Waist:</b> ${character.equipment.waist.Name_pt} ${
character.equipment.waist.Name !== 'Empty Waist'
? `<button onclick='unequipItem("waist")'>Desequipar</button>`
: ''
}</p>
<p><i>${character.equipment.waist.Description_pt}</i></p>
<p><b>Legs:</b> ${character.equipment.legs.Name_pt} ${
character.equipment.legs.Name !== 'Empty Legs'
? `<button onclick='unequipItem("legs")'>Desequipar</button>`
: ''
}</p>
<p><i>${character.equipment.legs.Description_pt}</i></p>
<p><b>Feet:</b> ${character.equipment.feet.Name_pt} ${
character.equipment.feet.Name !== 'Empty Feet'
? `<button onclick='unequipItem("feet")'>Desequipar</button>`
: ''
}</p>
<p><i>${character.equipment.feet.Description_pt}</i></p>
<p><b>Main hand:</b> ${character.equipment.mainhand.Name_pt} ${
character.equipment.mainhand.Name !== 'Fist' ||
character.equipment.mainhand.Name !== 'Draconian claw'
? `<button onclick='unequipItem("mainhand")'>Desequipar</button>`
: ''
}</p>
<img src=${character.equipment.mainhand.icon}>
<p><i>${character.equipment.mainhand.Description_pt}</i></p>
<p><b>Offhand:</b> ${character.equipment.offhand.Name_pt} ${
character.equipment.offhand.Name !== 'Other hand' ||
character.equipment.offhand.Name !== 'Handle'||
character.equipment.offhand.Name !== 'Other Draconian claw'
? `<button onclick='unequipItem("offhand")'>Desequipar</button>`
: ''
}</p>
<p><i>${character.equipment.offhand.Description_pt}</i></p>
`;
}
return gearHTML;
}
window.updateCharPage = function () {
var charPage = document.getElementById('Charpage');
let char =State.variables.character[1]
const selectedLanguage = State.variables.language;
var traitlist = {
EN: {
"Architect of Reality":"Architect of Reality",
"Eternal Hunger":"Eternal Hunger",
"Astral Connection":"Astral Connection",
"Nature's Blessing":"Nature's Blessing",
"Arcane Core":"Arcane Core",
"Ancestral Knowledge": "Ancestral Knowledge",
"Reforger":"Reforger",
"Harmonious Existence": "Harmonious Existence",
"Favored":"Favored",
"Unlimited Potential": "Unlimited Potential",
"Adaptable":"Adaptable",
"Natural Warriors": "Natural Warriors",
"Apex Hunter":"Apex Hunter",
"Animal senses" : "Animal senses",
"Feral Mask" : "Feral Mask",
"Divine Blessings": "Divine Blessings",
"Divine Blessings II": "Divine Blessings II",
"Divine Blessings III": "Divine Blessings III",
"Brand the Heretic": "Brand the Heretic",
"Brazen Inquiry": "Brazen Inquiry",
"Blessed Flames": "Blessed Flames",
"Fervorous Zeal": "Fervorous Zeal",
"Fiery Cleasing": "Fiery Cleasing",
"Divine Foundation": "Divine Foundation",
"Divine Grace": "Divine Grace",
"Pious Devotion": "Pious Devotion",
"True Calling": "True Calling",
"Holy Ardor": "Holy Ardor",
"Aura of the Uncaring": "Aura of the Uncaring",
"Aura of Tyrants": "Aura of Tyrants",
"Aura of the Dauntless": "Aura of the Dauntless",
"Aura of Heroism": "Aura of Heroism",
"Oathkeeper": "Oathkeeper",
"Blessed Armaments": "Blessed Armaments",
"Faith of Arms": "Faith of Arms",
"Sacred Cause": "Sacred Cause",
"Embezoned Armaments": "Embezoned Armaments",
"Champion of Selfishness": "Champion of Selfishness",
"Champion of Conquest": "Champion of Conquest",
"Champion of Liberty": "Champion of Liberty",
"Champion of Justice": "Champion of Justice",
"Novice": "Novice",
"Genius Mind": "Genius Mind",
"Jack-of-All-Trades": "Jack-of-All-Trades",
"Trustworthy Instrument": "Trustworthy Instrument",
"Expert": "Expert",
"Quick-learner": "Quick-learner",
"Master": "Master",
"Transcendance": "Transcendance",
"Ascencion": "Ascencion",
"Wide Range": "Wide Range",
"Well-versed": "Well-versed",
"Double Time": "Double Time",
"Legendary Performace": "Legendary Performace",
"Winning Smile": "Winning Smile",
"Triple Time": "Triple Time",
"Magnum Opus": "Magnum Opus",
"Blade Dancer": "Blade Dancer",
"Tempo I": "Tempo I",
"Graceful Steps": "Graceful Steps",
"Tempo II": "Tempo II",
"Rythimic Strike": "Rythimic",
"Arcane Initiation": "Arcane Initiation",
"Arcane Mastery": "Arcane Mastery",
"Overflow": "Overflow I",
"Mystical Arsenal": "Mystical Arsenal",
"Overflow II": "Overflow II",
"Intellect Empowerment": "Intellect Empowerment",
"Overflow III": "Overflow III",
"Essence Renewal": "Essence Renewal",
"Great Sacrifice": "Great Sacrifice",
"Masterful Dark Magic": "Masterful Dark Magic",
"Masterful Hemomancy": "Masterful Hemomancy",
"Masterful Necromancy": "Masterful Necromancy",
"Second Deal": "Second Deal",
"Magic Drainer": "Drenador de Magia",
"Bonded Existence": "Bonded Existence",
"Improved Summons": "Improved Summons",
"Master Summoner": "Master Summoner",
"Masterful Summons": "Masterful Summons",
"Iron Suit": "Iron Suit",
"Titanic": "Titanic",
"Champion's Might": "Champion's Might",
"Spiked": "Spiked",
"Unending Vigor": "Unending Vigor",
"Body Slam": "Body Slam",
"Though Skin": "Though Skin",
"Bloodthirst": "Bloodthirst",
"Overwhelming Strength": "Overwhelming Strength",
"Unyelding": "Unyelding",
"Natural Fighter": "Natural Fighter",
"Savagery": "Savagery",
"Elemental Afinity I":"Elemental Afinity I",
"Elemental Afinity II":"Elemental Afinity II",
"Elemental Afinity III":"Elemental Afinity III",
"Elemental Afinity IV":"Elemental Afinity IV",
"Wild Surge": "Wild Surge",
"Totem Carver": "Totem Carver",
"Blood Frenzy": "Blood Frenzy",
"Primal Fury": "Primal Fury",
"Nimble Fingers": "Nimble Fingers",
"Lethality": "Lethality",
"Gambler": "Gambler",
"Sneaky": "Sneaky",
"Lethality II": "Lethality II",
"Into the Shadows": "Into the Shadows",
"Sure-Death": "Sure-Death",
"Deep Pockets": "Deep Pockets",
"Professional Robber": "Professional Robber",
"Hoarder": "Hoarder",
"Spell Thief": "Spell Thief",
"Phalanx Training": "Phalanx Training",
"Weapon Mastery": "Weapon Mastery",
"Shielded Assault": "Shielded Assault",
"Tactical Genius": "Tactical Genius",
"Survivalist": "Survivalist",
"Second Wind": "Second Wind",
"Arcane Aegis": "Arcane Aegis",
"Shield wall": "Shield wall",
"Spare Arrows": "Spare Arrows",
"Follow-up": "Follow-up",
"Barbed Points": "Barbed Points",
"Dragon Piercing Arrows": "Dragon Piercing Arrows",
"Headshot": "Headshot",
"Natural Reflexes": "Natural Reflexes",
"Graceful": "Graceful",
"Bon Mot": "Bon Mot",
"Firm Hand": "Firm Hand",
"Masterful Efficiency": "Masterful Efficiency",
"Lay-in-wait" : "Lay-in-wait",
"Trapsmith" : "Trapsmith",
"Poacher" : "Poacher",
"Master trapper" : "Master trapper",
"Sniper Shot" : "Sniper Shot",
"Flurry": "Flurry",
"Momentum": "Momentum",
"Impossible Flurry": "Impossible Flurry",
"Stance Master": "Stance Master",
"Penitent Strike" : "Penitent Strike",
"Bloody Embrace": "Bloody Embrace",
"Pious Resilience" : "Pious Resilience",
"Divine Atonement" : "Divine Atonement",
"Zealous Reckoning" : "Zealous Reckoning",
"Martyrdom" : "Martyrdom",
"Arcane Weapon" : "Arcane Weapon",
"Arcane Armory" : "Arcane Armory",
"Mystical Arts" : "Mystical Arts",
"Eldritch Knight" : "Eldritch Knight",
"Mage Slayer" : "Mage Slayer",
"Arcane Weapon" : "Arcane Weapon",
"Cirurgic Precision" : "Cirurgic Precision",
"Bloody mess" : "Bloody mess",
"Battle-Medic" : "Battle-Medic",
"Improved Cirurgic Precision" : "Improved Cirurgic Precision",
},
"PT-BR":{
"Architect of Reality":"Arquiteto da Realidade",
"Eternal Hunger":"Fome Eterna",
"Astral Connection":"Conecção Astral",
"Nature's Blessing":"Bença da Naturaza",
"Arcane Core":"Núcleo Arcano",
"Ancestral Knowledge": "Conhecimento Ancestral",
"Reforger":"Reforjadores",
"Harmonious Existence": "Existência Harmônica",
"Favored":"Favoritos",
"Unlimited Potential": "Potêncial Ilitimitado",
"Adaptable":"Adaptáveis",
"Natural Warriors": "Guerreiros Naturais",
"Apex Hunter":"Caçador Apex",
"Animal senses" : "Sentidos Animais",
"Feral Mask" : "Mascara Feroz",
"Divine Blessings I": "Bênçãos Divinas I",
"Divine Blessings II": "Bênçãos Divinas II",
"Divine Blessings III": "Bênçãos Divinas III",
"Brand the Heretic": "Brandai os Hereges",
"Brazen Inquiry": "Inquérito Descarado",
"Blessed Flames": "Chamas Abençoadas",
"Fervorous Zeal": "Zelo Fervoroso",
"Fiery Cleasing": "Purificação Ardente",
"Divine Foundation": "Fundação Divina",
"Divine Grace": "Graça Divina",
"Pious Devotion": "Devoção Piedosa",
"True Calling": "Verdadeira Vocação",
"Holy Ardor": "Ardor Sagrado",
"Aura of the Uncaring": "Aura do Desinteresse",
"Aura of Tyrants": "Aura dos Tiranos",
"Aura of the Dauntless": "Aura do Intrépido",
"Aura of Heroism": "Aura do Heroísmo",
"Oathkeeper": "Guardião do Juramento",
"Blessed Armaments": "Armamentos Abençoados",
"Faith of Arms": "Fé nas Armas",
"Sacred Cause": "Causa Sagrada",
"Embezoned Armaments": "Armamentos Embelezados",
"Champion of Selfishness": "Campeão do Egoísmo",
"Champion of Conquest": "Campeão da Conquista",
"Champion of Liberty": "Campeão da Libertação",
"Champion of Justice": "Campeão da Justiça",
"Novice": "Novato",
"Genius Mind": "Mente Genial",
"Jack-of-All-Trades": "Faz-Tudo",
"Trustworthy Instrument": "Instrumento Confiável",
"Expert": "Especialista",
"Quick-learner": "Aprendiz Rápido",
"Winning Smile": "Sorriso Vencedor",
"Master": "Mestre",
"Transcendance": "Transcendência",
"Ascencion": "Ascensão",
"Wide Range": "Amplo Alcance",
"Well-versed": "Bem-Versado",
"Double Time": "Tempo Duplo",
"Legendary Performace": "Performance Lendária",
"Winning Smile": "Sorriso Vencedor",
"Triple Time": "Tempo Triplo",
"Magnum Opus": "Magnum Opus",
"Blade Dancer": "Dançarino de Lâminas",
"Tempo I": "Andamento I",
"Graceful Steps": "Passos Graciosos",
"Tempo II": "Andamento II",
"Rythimic Strike": "Golpe Rítmico",
"Overflow": "Transbordamento",
"Arcane Initiation": "Iniciação Arcana",
"Arcane Mastery": "Maestria Arcana",
"Mystical Arsenal": "Arsenal Místico",
"Overflow II": "Transbordamento II",
"Intellect Empowerment": "Potencialização Intelectual",
"Overflow III": "Transbordamento III",
"Essence Renewal": "Renovação de Essência",
"Great Sacrifice": "Grande Sacrifício",
"Masterful Dark Magic": "Magia Negra Maestral",
"Masterful Hemomancy": "Hemomancia Maestral",
"Masterful Necromancy": "Necromancia Maestral",
"Second Deal": "Segundo Pacto",
"Magic Drainer": "Drenador de Magia",
"Bonded Existence": "Existência Vinculada",
"Improved Summons": "Invocações Aprimoradas",
"Master Summoner": "Mestre Invocador",
"Masterful Summons": "Invocação Maestrais",
"Iron Suit": "Armadura de Ferro",
"Titanic": "Titânico",
"Champion's Might": "Poder do Campeão",
"Spiked": "Espetado",
"Unending Vigor": "Vigor Infinito",
"Body Slam": "Arremesso de Corpo",
"Though Skin": "Pele Grossa",
"Bloodthirst": "Sede de Sangue",
"Overwhelming Strength": "Força Avassaladora",
"Unyelding": "Inabalável",
"Natural Fighter": "Lutador Natural",
"Savagery": "Selvageria",
"Blood Frenzy": "Frenesi Sanguinário",
"Primal Fury": "Fúria Primal",
"Elemental Afinity I":"Afinidade Elemental I",
"Elemental Afinity II":"Afinidade Elemental II",
"Elemental Afinity III":"Afinidade Elemental III",
"Elemental Afinity IV":"Afinidade Elemental IV",
"Wild Surge": "Onda Selvagem",
"Totem Carver": "Escultor de totens",
"Elementalist": "Elementalista",
"Nimble Fingers": "Dedos Ágeis",
"Lethality": "Letalidade",
"Gambler": "Apostador",
"Sneaky": "Furtivo",
"Lethality II": "Letalidade II",
"Poisonous Bomb": "Bomba Venenosa",
"Into the Shadows": "Nas Sombras",
"Sure-Death": "Morte Certa",
"Deep Pockets": "Bolsos Fundos",
"Professional Robber": "Ladrão Profissional",
"Hoarder": "Acumulador",
"Spell Thief": "Ladrão de Magia",
"Phalanx Training": "Postura Defensiva",
"Weapon Mastery": "Maestria com Armas",
"Shielded Assault": "Postura Ofensiva",
"Tactical Genius": "Gênio Tático",
"Survivalist": "Sobrevivencialista",
"Second Wind": "Segundo Fôlego",
"Arcane Aegis": "Escudo Arcano",
"Shield wall": "Muralha de Escudos",
"Spare Arrows": "Flechas Sobressalentes",
"Follow-up": "Acompanhamento",
"Arrow Barrage": "Chuva de Flechas",
"Barbed Points": "Pontas Farpadas",
"Dragon Piercing Arrows": "Flechas Perfurantes de Dragão",
"Headshot": "Tiro na Cabeça",
"Natural Reflexes": "Reflexos Naturais",
"Graceful": "Gracioso",
"Bon Mot": "Bon Mot",
"Firm Hand": "Mão Firme",
"Masterful Efficiency": "Eficiência Magistral",
"Lay-in-wait" : "Espera Oculta",
"Trapsmith" : "Armadilheiro",
"Skirmish Tactics" : "Táticas de Escaramuças",
"Master trapper" : "Mestre Armadilheiro",
"Hit-and-Run": "Bater e Correr",
"Sniper Shot" : "Tiro de Francotirador",
"Flurry": "Frenesi",
"Momentum": "Momento",
"Impossible Flurry": "Frenesi Impossível",
"Stance Master": "Mestre de Posturas",
"Penitent Strike" : "Golpe Penitente",
"Bloody Embrace": "Abraço Sangrento",
"Pious Resilience" : "Resiliência Piedosa",
"Divine Atonement" : "Expiação Divina",
"Zealous Reckoning" : "Acerto de Contas Zeloso",
"Martyrdom" : "Martírio",
"Arcane Weapon" : "Arma Arcana",
"Arcane Armory" : "Arsenal Arcano",
"Mystical Arts" : "Artes Místicas",
"Runic Mastery": "Maestria Rûnica",
"Eldritch Knight" : "Cavaleiro Sobrenatural",
"Mage Slayer" : "Matador de Magos",
"Cirurgic Precision" : "Precisão Cirúrgica",
"Bloody mess" : "Confusão Sangrenta",
"Battle-Medic" : "Medico de Batalha",
"Improved Cirurgic Precision" : "Precisão Cirúrgica Aprimorada",
},
};
var OathArm = ""
if (selectedLanguage === "EN") {
if (char.Oath === "Selfishness") {
OathArm = `Whenever you make an improved weapon attack, regain 3% of your total Essence. (${Math.round((char.MAXMANA * 0.03))})`
} else if (char.Oath === "Conquest") {
OathArm = "Whenever you make an improved weapon attack, decrease the target's defense by 3."
} else if (char.Oath === "Justice") {
OathArm = "Whenever you make an improved weapon attack, reduce your status effects (Burning, Confusion, Hindered, etc...) by 1 turn."
} else if (char.Oath === "Liberty") {
OathArm = "Whenever you make an improved weapon attack, increase your Defense by 3."
}
} else if (selectedLanguage === "PT-BR") {
if (char.Oath === "Selfishness") {
OathArm = `Sempre que você realizar um ataque aprimorado com arma, recupere 3% do seu total de Essência. (${Math.round((char.MAXMANA * 0.03))})`
} else if (char.Oath === "Conquest") {
OathArm = "Sempre que você realizar um ataque aprimorado com arma, diminua a Defesa do alvo em 3."
} else if (char.Oath === "Justice") {
OathArm = "Sempre que você realizar um ataque aprimorado com arma, reduza seus efeitos de status (Queimadura, Confusão, Impedimento, etc.) em 1 turno."
} else if (char.Oath === "Liberty") {
OathArm = "Sempre que você realizar um ataque aprimorado com arma, aumente sua Defesa em 3>"
}
}
var textForSecondPact = ""
if (selectedLanguage === "EN") {
if (char.secondPact === "Blood") {
textForSecondPact = `Masterful Hemomancy: Whenever you cast a Pact magic, heal yourself by 3 for each <b>Bleeding</b> enemy, then apply <b>Bleeding</b> to all enemies for 3 turns.`
} else if (char.secondPact === "Shadow") {
textForSecondPact = `Masterful Dark Magic: Whenever you cast a Pact magic, damage yourself by 3 to damage all enemies by your 1/3 of your Resillience. (${Math.round((char.RES / 3))})`
} else if (char.secondPact === "Soul") {
textForSecondPact = "Masterful Necromancy: Whenever you cast a Pact magic, summon an Undead Slave."
}
} else if (selectedLanguage === "PT-BR") {
if (char.secondPact === "Blood") {
textForSecondPact = `Hemomancia Maestral: Sempre que lançar uma magia de Pacto, cure-se em 3 para cada inimigo <b>Sangrando</b>, depois aplique <b>Sangramento</b> a todos os inimigos que não estejam <b>Sangrando</b> por 2 turnos.`
} else if (char.secondPact === "Shadow") {
textForSecondPact = `Magia Negra Maestral: Sempre que lançar uma magia de Pacto, se machuque em 3 para machucar todos os inimigos em 1/3 da sua Resiliência. (${Math.round((char.RES / 3))})`
} else if (char.secondPact === "Soul") {
textForSecondPact = "Necromancia Maestral: Sempre que lançar uma magia de Pacto, invoque um Escravo Morto-Vivo."
}
}
const traitText = {
EN: {
"Apex Hunter": `On a Critical Strike, Draconians add 1/3 of their Perception to their Damage. When using their Claws, they also inflict <b>Bleeding</b>(3). (${Math.round((char.PER / 3))})`,
"Natural Warriors": "Draconians have natural Claws instead of Fists. As well as durable scales instead of skin, increasing their Defense",
"Reforger": "Dwarfs are able to improve their wearings any armor has a higher defense value based on its type",
"Ancestral Knowledge": "Dwarfs start with +10 points to distribute among their expertise.",
"Harmonious Existence": "The gods give easier trials and tests for the Elfs.",
"Favored": "The gods give easier trials and tests for the Elfs.",
"Arcane Core": "When near death, Heralds release all their remaining Essence to damage nearby enemies",
"Eternal Hunger": "During combat, when a Herald slays an enemy, regain a part of your lost Essence.",
"Architect of Reality": "A Herald may pay part of their Essence to create 'Object' items.",
"Astral Connection": "When near Secrets, you may expend a bit of your Essence to reveal them.",
"Nature's Blessing": "Your maximum Essence is halved. Add your Esence to your Lifeblood.",
"Adaptable": "Humans start with +5 points to distribute among their Attributes.",
"Unlimited Potential":"Whenever a Human levels up, they gain +1 point to distribute among their Expertises",
"Animal senses": "The Vanadi can see in the dark. Additionally, they have a +5 to their Hit-Chance.",
"Feral Mask": "The Vanadi gain the ability to shapeshift during combat.",
"Divine Foundation": "You have added the 'Heal', 'Judgement' and 'Shield of the Faithfull' Skills to your Repertoire.",
"Divine Blessings I": `Whenever you cast a Holy Spell, gain 2 stacks of <b>Piety</b>, at the end of your turn, you heal yourself by 1 for each 6 stack of <b>Piety</b>. Casting a non-Holy Spell, reset all points of <b>Piety</b>`,
"Divine Blessings II": `<b>Piety</b> increases your Defense and Damage by 1 for every 6 points.`,
"Divine Blessings III": `Increases by 1 all values given due <b>Piety</b> for every 12 stacks of <b>Piety</b>.`,
"Brand the Heretic": `Whenever you hit an enemy with an weapon attack, apply <b>Burn</b> to the target`,
"Brazen Inquiry": `Add 1/3 of your Perception to Intimidation and Speech tests. Additionally, applying <b>Burn</b> to an enemy gives 2 stacks of <b>Piety</b>. )${Math.round((char.PER / 3))})`,
"Blessed Flames": `<b>Burning</b> enemies take 1 additional damage for every 6 stacks of your <b>Piety</b>`,
"Fervorous Zeal": `Whenever an enemy takes damage due to <b>Burn</b>, heal yourself by 4 for each stack of <b>Burn</b> and increase your <b>Piety</b> by 1.`,
"Fiery Cleasing": `Whenever you apply <b>Burn</b> to an enemy, add 2 more stacks.`,
"Divine Grace": "You may re-roll a failed test once per level.",
"Pious Devotion": `Whenever you gain <b>Piety</b> gain 2 additional stacks.`,
"True Calling": `Whenever you cast a Divine Call, regain 50 Lifeblood. You have chosen to follow ${char.GOD}.`,
"Holy Ardor": `Holy Ardor: Start each combat with 20 stacks of <b>Piety</b>.`,
"Aura of the Uncaring": `Increase your Damage by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Sleight of Hands by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Aura of Tyrants": `Increase your Damage by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Intimidation by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Aura of the Dauntless": `Increase your Defense by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Acrobatics by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Aura of Heroism": `Increase your Defense by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Athletics by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Oathkeeper": `Whenever you make a choice that aligns with your Oath or a test correspondending to your Aura, you gain 1 permanent stack of <b>Piety</b>.`,
"Faith of Arms": `${OathArm}`,
"Sacred Cause": `Whenever you would take more than 25 damage in a single strike, reduce the damage taken by 5 + 1 for each 6 stacks of <b>Piety</b>`,
"Embezoned Armaments": "At the start of your turn, gain a Improved Attack. Additionally, your improved weapon attacks deal 1d6 additional damage, add another 1d6 if the target is a Daemon, Vampyr or Undead ",
"Champion of Selfishness": "When you are attacked, cast Smite on the attacker if available.",
"Champion of Conquest": `Instead of Healing at the end of your turn, your <b>Divine Blessing I</b> now deals damage to each enemy.`,
"Champion of Liberty": "You are immune to Stunned and Hindered status.",
"Champion of Justice": "Increase your total Lifeblood by 50%, whenever you are attacked, reduce the damage received by 5%",
"Novice": "Increase your first test dice to a 1d8.",
"Genius Mind": "Increase the gains of Experience due tests by 50%.",
"Jack-of-All-Trades": `During tests, add +${char.level < 7 ? 2 : char.level < 15 ? 4 : 6} to any Expertise.`,
"Trustworthy Instrument": "While equipped with an Instrument, mark it as Esoteric. Additionally, you gain +5 to Art tests",
"Expert": "Increase your first test dice to a 1d10 and your second test dice to a 1d8.",
"Quick-learner": "Adding Skills and Spells to your Repertoire takes only 1 hour",
"Winning Smile": `When making a test and the result would be lower than 10, add 1/3 of your Charisma to the result ${Math.round((char.CHA / 3))})`,
"Master": "Increase both of your test dice to 1d12's",
"Transcendance": "You gained +10 Attribute points",
"Ascencion": "You add your Intelligence to your damage and your Charisma to your defense.",
"Well-versed": "Whenever you learn a new Ballad, reduce the time taken to 2 hours. Additionally you may use Arts to World Knowledge tests.",
"Double Time": "When attacking with a Improved Attack, reduce all skill cooldowns by 1.",
"Legendary Performace": "Increase your Art expertise by 10, then increase your Essence by your Art expertise.",
"Triple Time": "Your Improved Attacks deal more damage, and gain an additional charge.",
"Magnum Opus": "Your buffs and debuffs last and additional turn and heal yourself by the duration.",
"Blade Dancer": `Slashing weapons count as instruments for you. While wielding one, increase your Defense by 1/3 of your Charisma. Additionally, you may use Arts to Acrobatic tests. ${Math.round((char.CHA / 2))})`,
"Tempo I": "The first time you cast an spell each turn, make a weapon attack against a random enemy",
"Graceful Steps": "After you are missed by an attack, gain an Action point.",
"Tempo II": "The first time you cast a spell each turn, make a weapon attack against a random enemy. Refresh whenever you cast a Ballad.",
"Arcane Initiation": "You have added the skills 'Fire Bolt', 'Lightning Strike' and 'Freeze to your Repertoire. These skills cost 3 less.",
"Arcane Mastery":"You have added the skills 'Inferno', 'Storm' and 'Blizzard to your Repertoire. When these skills are cast, you roll their Damage twice and chooses the highest result.",
"Rythimic Strike": `Whenever you make an weapon attack, deal 1/2 of your charisma as damage to the target. (${Math.round((char.CHA / 2))})`,
"Overflow": `At the start of each turn, regain Essence equal to 1/3 of your Intelligence. (${Math.round((char.INT / 3))})`,
"Mystical Arsenal": "Whenever you cast an Arcane Spell, increase your Damage by 5.",
"Overflow II": `At the start of each turn, regain Essence equal to 1/2 of your Intelligence. (${Math.round((char.INT / 2))})`,
"Intellect Empowerment": "Whenever you cast a spell against a single enemy, deal 1/2 of your Intelligence as damage on the same target.",
"Overflow III": `At the start of each turn, regain Essence equal to your your Intelligence. (${char.INT})`,
"Essence Renewal": "Whenever you cast a spell, regain Lifeblood equal to it's cost.",
"Great Sacrifice": `Reduce your total Lifeblood by 10%, add ${2 * char.level} to your Damage`,
"Masterful Dark Magic": `Whenever you cast a Pact magic, damage yourself by 3 to damage all enemies by your 1/3 of your Resillience. (${Math.round((char.RES / 3))})`,
"Masterful Hemomancy": `Whenever you cast a Pact magic, heal yourself by 3 for each <b>Bleeding</b> enemy, then apply <b>Bleeding</b> to all non-<b>Bleeding</b> enemies for 3 turns.`,
"Masterful Necromancy": "Whenever you cast a Pact magic, summon an Undead Slave.",
"Second Deal": `Second Chosen Pact: ${char.secondPact} ${textForSecondPact}`,
"Magic Drainer": "At the start of your turn, drain 5% of all enemies current Essence and Lifeblood.",
"Bonded Existence": "Whenever you invoke a Summon, regain 7% of your lost Essence, additionally, for each invoked Summon, increase your Damage by 3.",
"Improved Summons": `When you invoke a summon, increase their Lifeblood by 1/2 of your Intelligence and their attributes by 3. (${Math.round((char.INT / 2))})`,
"Master Summoner": "Decrease the cost of your summons by half. Additionally, when a summon would be destroyed, regain Essence equal to it's original cost.",
"Masterful Summons": "When you invoke a summon, Increase their Lifeblood by your Intelligence and their attributes by 6.",
"Iron Suit": "For each equipped slot, increase your Defense by 1.",
"Titanic": `While above of 70% of your Lifeblood, increase your Damage and Hit chance by ${char.level < 5 ? 5 : char.level > 10 ? 10 : 15}.`,
"Champion's Might": `Add 1/2 of your resilience to your Damage and to your Athletics. (${Math.round((char.RES / 2))})`,
"Spiked": `When you are attacked, deal damage equal to 10% of your Defense back to your attacker. ${Math.round(((char.Defense + char.additionalDefense) * 0.1))}`,
"Unending Vigor": "At the start of each turn, regain 3% of your missing Lifeblood.",
"Body Slam": `During combat, if your damage is lower than your Defense, increase your damage to your Defense. ${char.Defense + char.additionalDefense}`,
"Though Skin": `When under 50% of your health, reduce all damage taken by ${char.level < 5 ? 3 : char.level < 10 ? 5 : char.level < 15 ? 7 : 9}.`,
"Bloodthirst": "You weapon attacks deal additional damage equal to 5% of the target's current Lifeblood. If they have the Visceral trait, increase the damage to 7%.",
"Overwhelming Strength": "When you make an attack and misses, damage the target by 1/3 of the Damage.",
"Unyelding": "When you would be killed by an attack, make a weapon attack, if you kill your attacker, recover 15% of your missing life. Can only happen once per battle.",
"Natural Fighter": `For each unequipped slot, increase your Damage by ${char.level < 8 ? 2 : char.level < 14 ? 3 : 4} and Defense by ${char.level < 8 ? 1 : char.level < 14 ? 2 : 3}.`,
"Savagery": "Increase the damage of your mainhand and offhand by 1 step when unnequiped. Additionally, your offhand gains the weapon trait.",
"Blood Frenzy": "You recover 12.5% of the damage dealt as Lifeblood",
"Primal Fury": "When unarmed, when dealing 20 or more damage on a attack, apply <b>Confusion</b> to the target.",
"Elemental Afinity I":"You have added the 'Rainfall' and 'Turn the Tides' Skills to your Repertoire.",
"Elemental Afinity II":"You have added the 'Stormsurge' and 'Gale Winds' Skills to your Repertoire.",
"Elemental Afinity III":"You have added the 'Eruption' and 'Blazing Strike' Skills to your Repertoire.",
"Elemental Afinity IV":"You have added the 'Tremors' and 'Turn to Stone' Skills to your Repertoire.",
"Wild Surge": "At the end of your turn, your Totems damage each enemy by 1.",
"Totem Carver": "After casting an Elemental Spell, summon a Totem of its Element. Whenever you Summon a Totem, empower it.",
"Elementalist": "If you control at least one of each Totem, increase your weapon damage Dice to a d20.",
"Nimble Fingers": "During combat, you gain 15% more Gold from defeating enemies. Additionally, you may steal from story characters (NPCs).",
"Lethality": "Attacks against full health targets deal 1d10 of extra damage.",
"Gambler": "Reduce one of your test dice to a 1d4, but increase the other to a 1d10.",
"Sneaky": `You start each combat <b>Hidden</b>. While hidden, your next attack deal 1d8 of extra damage`,
"Lethality II": "Attacks against full health targets deal 1d10 extra damage and apply as much Poison",
"Into the Shadows": `If an attack kills an enemy, become <b>Hidden</b>`,
"Sure-Death": "Enemies no longer loses stacks of Poison",
"Deep Pockets": "Whenever you cast the skill 'Disarm', you have the chance to steal the item.",
"Professional Robber": `You add your level to Sleight of Hand and Stealth Test. (${char.level})`,
"Hoarder": `Increase your Damage by your 1/3 of your Gold. ${Math.round((char.Gold / 3))}`,
"Spell Thief": "Whenever an enemy uses an Skill, you have a chance to learn that Skill.",
"Eye for Detail": "You always find secrets",
"Secret Stash": "You are considered to always have the right tool for the job. Like a rope, lantern, or lockpick",
"Hidden Machinations": "During test, you roll an aditional 1d6 dice and add to the result. If the test expertise is of Sleitght of Hands, World Knowledge or Insight, you roll another 1d6 and choose the highest result.",
"Faceless Shadow": "You always succeed at Stealth tests",
"Phalanx Training": "You gain +3 Defense for each of enemies alive. Additionally, when you make a weapon attack while wielding a Shield in your offhand, you make a weapon attack with your Shield, it deal 1d4 of damage and gains the 'Blunt' trait.",
"Weapon Mastery": `Your weapons apply additional effects based on their damage type. (Blunt - Apply <b>Confusion</b> on the Target | Slashing - Applies <b>Bleed</b> for 2 turns | Piercing - Decreases the target's Defense by 5 | Firearm - Has 35% to deal 75% extra damage)`,
"Shielded Assault": "You gain additional Hit-Chance based upon the number of enemies alive. Additionally, when you hit an enemy with your Shield, you increase the damage dealt by its Defense.",
"Tactical Genius": "Your Skills that cost three or more Action Points cost 1 point less.",
"Survivalist": `Increase the bonus given by <b>Phalanx Training</b> and <b>Shielded Assault</b> by 2 and increase your Shield damage dice to 2d4`,
"Second Wind": "During each combat, the first time you hit below 25% of your maximum health, heal yourself by 35% of your lost health.",
"Arcane Aegis": "Reduce the damage taken by Spells by 20% while wielding a Shield.",
"Shield wall": "Double the Defense given by your Shield.",
"Spare Arrows": "After killing a enemy with a ranged weapon, reduce the cooldown of your weapon by 1.",
"Follow-up": `After using an Offensive skill, deal 1d4 against a random enemy. This is affected by <b>Barbed Points</b> and <b>Dragon Piercing Arrows</b>. If you possess a Ranged weapon with the Light trait in your offhand, make a weapon attack with that weapon, instead.`,
"Barbed Points": "When calculating Damage, increase the number of dices of your ranged weapons by 1.",
"Dragon Piercing Arrows": "When calculating Damage, increase the damage dice of your ranged weapons by 1 step",
"Headshot": "Your ranged weapon attacks have a 20% chance to execute non-Bosses or Undead enemies",
"Natural Reflexes": "At the end of your turn, gain Riposte",
"Graceful": "While wielding only a 1-handed weapon in your hands, increase your Defense and Hit-Chance by 10.",
"Bon Mot": "After killing an enemy, heal yourself by 10% of your lost Lifeblood.",
"Firm Hand": "While wielding a single 1-handed weapon, whenever you make a weapon attack, you make an additional attack.",
"Masterful Efficiency": "Riposte no longer fades after you hit an enemy.",
"Penitent Strike": `When attacking an enemy, deal 50% extra damage to yourself and the target. If you or the target are afflicted with <b>Bleeding</b>, heal yourself by ${Math.round((char.MAXLIFE * 0.06))}% of your maximum Lifeblood.`,
"Bloody Embrace": `When being attacked by an enemy, reduce the damage taken by 50%. Convert the damage as <b>Bleeding</b> (For every 6 points of damage, gain 1 stack of Bleeding), then gain a stack of Piety. You no longer can die due to <b>Bleeding</b>.`,
"Pious Resilience": "Increase your maximum Lifeblood by 25%. At the start of your turn, while your Lifeblood is below 50%, gain 3 stacks of Piety.",
"Divine Atonement": "Whenever you are affected by a status effect, gain a stack of Piety.",
"Zealous Reckoning": "Whenever an enemy attacks you, you reflect 30 + (+1 % for each stack of Piety)% of the received Damage back to the attacker.",
"Martyrdom": "Enemy Attacks can no longer miss you. In compensation, Double your Maximum Lifeblood.",
"Lay-in-wait": "For each unexpended Action Point, increase your Hit-Chance by +6 with Ranged Weapons. and +3 with Melee weapons.",
"Trapsmith": "At the start of each combat, you lay 3 random Traps activated when the enemy attacks you. Only 1 trap can be activated each turn.",
"Poacher": "When an enemy triggers a Trap, make a weapon attack against it. If your weapon is on Cooldown, recharge it, first.",
"Master trapper": "Your traps are improved.",
"Hit-and-Run": "After damaging an enemy with an attack, lay back a trap that has been activated.",
"Sniper Shot": "When attacking with a Ranged weapon, expend all Action Points, For each expended Action Point, increase your Ranged weapon Damage dice by 1 step. If the weapon damage dice is already higher than a d12, increase the number of Dices by 1, instead.",
"Shredder Stance": "You gain access to the 'Shredder Stance' Skill.",
"Flurry": "Whenever you make a weapon attack with your offhand, make one additional attack without cost, this attack has a -15 to Hit-Chance, -30 if the weapon is heavy. If the weapon it in Cooldown, reduce its Cooldown by 1, instead.",
"Momentum": "Whenever you miss an enemy with a weapon attack, increase your Hit-Chance by 7. Resets whenever you hit an enemy.",
"Lunging Stance": "You gain access to the 'Lunging Stance' Skill",
"Impossible Flurry" : "Whenever you make a weapon attack with your mainhand or offhand, make one additional attack without cost, this attack has a -15 to Hit-Chance, -30 if the weapon is heavy. If the weapon it in Cooldown, reduce its Cooldown by 1, instead.",
"Stance Master": "While in the Shredder Stance, you make one additional attack per weapon in hand without cost, but reduce your Hit-Chance by 10. If the weapon is in Cooldown, reduce it by 1, instead. While in Lunging Stance, your first two weapon strikes are benefited from the bonus.",
"Arcane Weapon": `You have added the 'Summon Arcane Blade' to your Repertoire, the weapon's damage increases by 1d8 at levels 5, 10, and 15. While wielding the Arcane Blade, casting a Spell grants you an Improved Attack that deals 1/2 of your Intelligence as additional Damage. (${Math.round((char.INT / 2))})`,
"Arcane Armory": `While wielding the Arcane Blade, increase your Defense to be equal to your Intelligence, if it isn't higher. (${char.INT})`,
"Mystical Arts": "You have added the 'Blade Surge', and 'Spectral Strike' Skills to your Repertoire. While wielding the Arcane Blade, whenever you make a weapon attack, recover 5 Essence.",
"Eldritch Knight": "Heavy Armor no longers increases the Essence cost of Spell Skills.",
"Runic Mastery": "You are now able to Enchant your own gear from your inventory, it takes 3 hours and 35 Essence to Enchant a gear.",
"Mage Slayer": "While wielding the Arcane Blade, whenever an enemy casts a Spell against you, make a weapon attack against it .",
"Cirurgic Precision": "Reduce the necessary amount to make a Critical Strike to be at least 1.75X the target's Defense.",
"Bloody mess": `Whenever you make a Critical Strike, apply <b>Bleeding</b> to the target for 3 turns. You add 1/2 of your Charisma to the Hit-Chance against <b>Bleeding</b> targets. (${Math.round((char.CHA / 2))})`,
"Battle-Medic": "Whenever you are hit, gain Regeneration(2). Increase all healing received by 5.",
"Improved Cirurgic Precision": "Reduce the necessary amount to make a Critical Strike to 1.5X the target's Defense.",
},
//Portuguese Down here
"PT-BR": {
"Apex Hunter": `Em um Ataque Crítico, Draconianos adicionam 1/3 de suas Percepções ao Dano. Quando usando suas Garras, eles também aplicam <b>Sangramento</b>(3). (${Math.round((char.PER / 3))})`,
"Natural Warriors": "Draconianos possuem Garras naturais ao invés de Punhos. Além de uma durável escamas ao invés de pele, aumentando sua Defensa.",
"Reforger": "Anões são capazes de melhorar a qualidade de suas armaduras. concebendo uma maior Defesa dependedo de seu tipo",
"Ancestral Knowledge": "Anões começam com +10 pontos para distribuir entre suas Perícias.",
"Harmonious Existence": "Elfos adicionam metade de sua Percepção para sua Força Vital e Essência.",
"Favored": "Os deuses concebem testes e desafios mais fáceis para os Elfos.",
"Arcane Core": "Quando próximo da morte, Arautos dispersam toda Essência restante para danificar todos os inimigos",
"Eternal Hunger": "Durante Combate, quando um inimigo é morto, recupera parte de sua Essência perdida.",
"Architect of Reality": "Você pode criar items do tipo 'Objeto' gastando parte de sua Essência.",
"Astral Connection": "Quando perto de segredos, você oferecer parte de sua Essência para revela-los.",
"Nature's Blessing": "Sua Essência máxima é reduzida pela metada. Aumente sua Força Vital por sua Essência.",
"Adaptable": "Humanos começam com +5 pontos para distribuir entre seus Atributos.",
"Unlimited Potential":"Sempre que um Humano sobe de nível, eles ganham +1 ponto para distribuir entre suas Perícias.",
"Animal senses": "Os Vanadi podem ver no escuro. Além disso, eles têm uma +5 para suas Chânces de Acerto.",
"Divine Foundation": "Você adicionou as Habilidades 'Cura', 'Juízo' e 'Escudo dos Fiéis' ao seu Repertório.",
"Feral Mask": "Os Vanadi tem a habilidade de se transformarem durante o combate.",
"Divine Blessings I": `Sempre que lançar um Feitiço Sagrado, ganhe 2 acúmulos de <b>Piedade</b>, ao final de seu turno, cure-se em 1 para cada 6 acúmulos de <b>Piedade</b>. Ao lançar um Feitiço não Sagrado, resete todos os pontos de <b>Piedade</b>.`,
"Divine Blessings II": `<b>Piedade</b> aumenta sua Defesa e Dano em 1 a cada 6 pontos.`,
"Divine Blessings III": `Aumenta em 1 todos os valores dados devido à <b>Piedade</b> para cada 12 acúmulos de <b>Piedade</b>.`,
"Brand the Heretic": `Sempre que acertar um inimigo com um ataque armado, aplique <b>Queimadura</b> no alvo`,
"Brazen Inquiry": ` Adicione 1/3 da sua Percepção aos testes de Intimidação e Persuasão. Além disso, aplicar <b>Queimadura</b> a um inimigo dá 2 acúmulos de <b>Piedade</b>. (${Math.round((char.PER / 3))})`,
"Blessed Flames": `Inimigos <b>Queimando</b> recebem 1 dano adicional para cada 6 acúmulos de sua <b>Piedade</b>.`,
"Fervorous Zeal": `Sempre que um inimigo sofre dano devido a <b>Queimadura</b>, cure-se em 4 para cada acúmulo de <b>Queimadura</b> e aumente sua <b>Piedade</b> em 1.`,
"Fiery Cleasing": `Sempre que aplicar <b>Queimadura</b> a um inimigo, adicione +2 acúmulos a mais.`,
"Divine Grace": "Você pode relançar um teste falho uma vez por nível.",
"Pious Devotion": `Sempre que ganhar <b>Piedade</b>, ganhe 2 acúmulos adicionais.`,
"True Calling": `Sempre que lançar uma Chamada Divina, recupere 50 de Força Vital. Você escolhou servir ${char.GOD}.`,
"Holy Ardor": `Comece cada combate com 20 acúmulos de <b>Piedade</b>.`,
"Aura of the Uncaring": `Aumenta seu Dano em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Destreza de Mãos em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Aura of Tyrants": `Aumenta seu Dano em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Intimidação em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Aura of the Dauntless": `Aumenta sua Defesa em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Acrobacia em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Aura of Heroism": `Aumenta sua Defesa em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Atletismo em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Oathkeeper": `Sempre que fizer uma escolha que esteja alinhada com seu Juramento ou um teste correspondente à sua Aura, ganhe 1 acúmulo permanente de <b>Piedade</b>.`,
"Faith of Arms": `${OathArm}`,
"Sacred Cause": `Sempre que você receber mais de 25 de dano em um único golpe, reduza o dano recebido em 5 + 1 para cada 6 acúmulos de <b>Piedade</b>.`,
"Embezoned Armaments": "No inicio de cada turno, ganhe um Ataque Aprimorado. Além disso, seu ataque aprimorado com arma causa 1d6 de dano adicional, adicione outro 1d6 se o alvo for um Demônio, Vampiro ou Morto-Vivo ",
"Champion of Selfishness": "Quando você é atacado, conjure Golpear no atacante se disponível.",
"Champion of Conquest": `Em vez de se curar no final de seu turno, sua <b>Bênção Divina I</b> agora causa dano a cada inimigo.`,
"Champion of Liberty": "Você é imune aos status Atordoado e Impedimento.",
"Champion of Justice": "Aumenta o seu total de Força Vital em 50%, sempre que você é atacado, reduza o dano recebido em 5%",
"Novice": "Aumente seu primeiro dado de teste para um 1d8.",
"Genius Mind": "Aumente os ganhos de Experiência devido a testes em 50%.",
"Jack-of-All-Trades": `Durante testes, adicione +${char.level < 7 ? 2 : char.level < 15 ? 4 : 6} a qualquer Perícia.`,
"Trustworthy Instrument": "Ao equipar um Instrumento, marque-o como Esotérico. Além disso, você ganha +5 em testes de Arte",
"Expert": "Aumente seu primeiro dado de teste para um 1d10 e seu segundo dado de teste para um 1d8.",
"Quick-learner": "Adicionar Habilidades e Feitiços ao seu Repertório leva apenas 1 hora.",
"Winning Smile": `Ao fazer um teste e o resultado seria inferior a 10, adicione 1/3 do seu Carisma ao resultado ${Math.round((char.CHA / 3))})`,
"Master": "Aumente ambos os seus dados de teste para 1d12",
"Transcendance": "Você ganhou +10 pontos de Atributos.",
"Ascencion": "Adicione sua Inteligência ao seu dano e sua Carisma à sua defesa.",
"Well-versed": "Sempre que aprender uma nova Balada, reduza o tempo necessário para 2 horas. Additionally, você pode usar Artes para testes de Conhecimento do Mundo",
"Double Time": "Ao atacar com um Ataque Melhorado, reduza todos os tempos de recarga de habilidades em 1.",
"Legendary Performace": "Aumente sua perícia em Arte em 10, em seguida, aumente sua Essência pela sua perícia em Arte.",
"Triple Time": "Seus Ataques Melhorados causam mais dano e realizam um ataque adicional.",
"Magnum Opus": "Suas Habilidades do Tipo 'Buff' e 'Debuff' duram um turno adicional e você se cura pela duração.",
"Blade Dancer": `Armas Cortantes contam como instrumentos para você. Ao empunhar uma, aumente sua Defesa em 1/3 do seu Carisma. Adicionalmente, você pode utilizar Artes para testes de Acrobacia. ${Math.round((char.CHA / 2))})`,
"Tempo I": "Na primeira vez que lançar um feitiço a cada turno, faça um ataque com arma contra um inimigo aleatório.",
"Graceful Steps": "Depois de desviar de um ataque, ganhe um ponto de Ação.",
"Tempo II": "Na primeira vez que lançar um feitiço a cada turno, faça um ataque com arma contra um inimigo aleatório. Atualize sempre que lançar uma Balada.",
"Rythimic Strike": `Sempre que realizar um ataque armado, cause 1/2 do seu Carisma como dano ao alvo. (${Math.round((char.CHA / 2))})`,
"Arcane Initiation": "Você adicionou as Habilidades 'Raio de Fogo', 'Golpe de Relâmpago' e 'Congelar' ao seu Repertório. Essas habilidades custam 3 de Essência a menos.",
"Arcane Mastery": "Você adicionou as Habilidades 'Inferno', 'Tempestade' e 'Nevasca' ao seu Repertório. Ao conjurar uma dessas habilidades, você rola o Dano duas vezes e escolhe o maior resultado.",
"Overflow": `No início de cada turno, recupere Essência igual a 1/3 da sua Inteligência. (${Math.round((char.INT / 3))})`,
"Mystical Arsenal": "Sempre que lançar uma Magia Arcana, aumente seu Dano em 5.",
"Overflow II": `No início de cada turno, recupere Essência igual a 1/2 da sua Inteligência. (${Math.round((char.INT / 2))})`,
"Intellect Empowerment": "Sempre que lançar uma magia contra um unico inimigo, cause metade da sua Inteligência como dano no mesmo alvo.",
"Overflow III": `No início de cada turno, recupere Essência igual a sua Inteligência. (${char.INT})`,
"Essence Renewal": "Sempre que lançar uma magia, recupere Força Vital igual ao seu custo.",
"Great Sacrifice": `Reduza seu total de Força Vital em 10%, adicione ${2 * char.level} ao seu Dano.`,
"Masterful Dark Magic": `Sempre que lançar uma magia de Pacto, se machuque em 3 para machucar todos os inimigos em 1/3 da sua Resiliência. (${Math.round((char.RES / 3))})`,
"Masterful Hemomancy": `Sempre que lançar uma magia de Pacto, cure-se em 3 para cada inimigo <b>Sangrando</b>, depois aplique <b>Sangramento</b> a todos os inimigos que não estejam <b>Sangrando</b> por 2 turnos.`,
"Masterful Necromancy": "Sempre que lançar uma magia de Pacto, invoque um Escravo Morto-Vivo.",
"Second Deal": `Segundo Pacto Escolhido: ${char.secondPact} ${textForSecondPact}`,
"Magic Drainer": "No início de seu turno, drene 5% da Essência e da Força Vital de todos os inimigos.",
"Bonded Existence": "Sempre que você invoca uma Invocação, aumente seu Dano em 3, além disso, para cada Invocação feita, recupere 7% de sua Essência perdida.",
"Improved Summons": `Quando você invoca uma nova invocação, aumente a Força Vital dela em 1/2 de sua Inteligência e seus atributos em 3. (${Math.round((char.INT / 2))})`,
"Master Summoner": "Diminua pela metade o custo de suas invocações. Além disso, quando uma invocação seria destruída, recupere Essência igual ao seu custo original.",
"Masterful Summons": `Aumente a Força Vital de suas Invocações pela sua Inteligência e seus atributos em 6. (${char.INT})`,
"Iron Suit": "Para cada slot equipado, aumente sua Defesa em 1.",
"Titanic": `Quando acima de 70% da sua Vida, aumente seu Dano e Chance de Acerto em ${char.level < 5 ? 5 : char.level > 10 ? 10 : 15}.`,
"Champion's Might": `Adicione 1/2 da sua resiliência ao seu Dano e à sua Atletismo. (${Math.round((char.RES / 2))})`,
"Spiked": `Quando você é atacado, cause dano igual a 10% da sua Defesa contra seu atacante. ${Math.round(((char.Defense + char.additionalDefense) * 0.1))}`,
"Unending Vigor": "No início de cada turno, recupere 3% de sua Força Vital perdida.",
"Body Slam": `Durante o combate, se seu Dano for menor que sua Defesa, aumente seu Dano para o valor da sua Defesa. ${char.Defense + char.additionalDefense}`,
"Though Skin": `Quando estiver com menos de 50% da sua vida, reduza todo o dano recebido em ${char.level < 5 ? 3 : char.level < 10 ? 5 : char.level < 15 ? 7 : 9}.`,
"Bloodthirst": "Seus ataques armados causam dano adicional igual a 5% da Força Vital atual do alvo. Caso sua arma possua o traço Visceral, aumente o dano para 7%.",
"Overwhelming Strength": "Quando você faz um ataque e erra, cause dano ao alvo igual a 1/3 do Dano.",
"Unyelding": "Quando você seria morto por um ataque, faça um ataque, se matar seu atacante, recupere 15% da sua vida perdida. Só pode acontecer uma vez por batalha.",
"Natural Fighter": `Para cada slot de equipamento desequipado, aumente seu Dano em ${char.level < 8 ? 2 : char.level < 14 ? 3 : 4} e sua Defesa em ${char.level < 8 ? 1 : char.level < 14 ? 2 : 3}.`,
"Savagery": "Aumente o dano do seu punho principal e do punho/secundário em 1 passo. Além disso, sua mão sêcundária ganha o traço de arma mesmo quando desequipada.",
"Blood Frenzy": "Você recupera 12.5% do Dano causado como Força Vital",
"Primal Fury": "Quando desarmado, ao causar 20 ou mais de Dano com Ataques aplique <b>Confusão</b> ao alvo.",
"Elemental Afinity I":"Você adicionou as Habilidades 'Chuva' e 'Mudança de Marés' ao seu Repertório.",
"Elemental Afinity II":"Você adicionou as Habilidades 'Surto de Relâmpagos' e 'Ventos Fortes' ao seu Repertório.",
"Elemental Afinity III":"Você adicionou as Habilidades 'Erupção' e 'Golpe Incandescente' ao seu Repertório.",
"Elemental Afinity IV":"Você adicionou as Habilidades 'Tremores' e 'Corpo de Pedra' ao seu Repertório.",
"Wild Surge": "No final de seu turno, seus Totens causam 1 de Dano a todos os inimigos.",
"Totem Carver": "Após usar uma Magia Elemental, invoque um Totem do mesmo Elemento. Ao Invocar um Totem, aprimore-o.",
"Elementalist": "Se você controla pelo menos um de cada Totem, aumento o Dado de Dano de sua Arma para um d20.",
"Nimble Fingers": "Durante o combate, você ganha 15% mais Ouro ao derrotar inimigos. Além disso, você pode roubar de personagens da história (NPCs).",
"Lethality": "Ataques contra alvos com saúde total causam 1d10 de Dano extra.",
"Gambler": "Reduza um dos seus dados de teste para 1d4, mas aumente o outro para 1d10.",
"Sneaky": `Você começa cada combate <b>Escondido</b>. Enquanto estiver escondido, seu próximo ataque causa 1d8 de dano extra`,
"Lethality II": `Ataques contra alvos com saúde total causam 1d10 de dano extra e aplicam tanto <b>Veneno</b>.`,
"Into the Shadows": `Se um ataque matar um inimigo, fique <b>Escondido</b>`,
"Sure-Death": `Inimigos não perdem mais acumulações de <b>Veneno</b>.`,
"Deep Pockets": "Sempre que utilizar a Habilidade 'Disarm', você tem a chance de roubar o item.",
"Professional Robber": `Você adiciona seu nível nos Testes de Destreza de Mãos e Furtividade. (${char.level})`,
"Hoarder": `Aumente seu Dano em 1/3 do seu Ouro. ${Math.round((char.Gold / 3))}`,
"Spell Thief": "Sempre que um inimigo usa uma Habilidade, você tem a chance de aprender a Habilidade.",
"Eye for Detail": "Você sempre encontra segredos",
"Secret Stash": "Você sempre será considerado ter a ferramenta certa para o trabalho. Como uma corda, lanterna ou gazua",
"Hidden Machinations": "Durante testes, você rola 1d6 e adiciona ao resultado. Caso a Perícia do teste seja Destreza de Mãos, Conhecimento do Mundo ou Discernimento, você rola outro 1d6 e escolhe o maior resultado",
"Faceless Shadow": "Você sempre obtêm sucesso em testes de Furtividade",
"Phalanx Training": "Postura Defensiva: Você ganha +3 de Defesa adicional com base no número de inimigos vivos. Além disso, quando você faz um ataque com arma enquanto empunha um escudo na sua mão secundária, você realiza um ataque com seu escudo, causando 1d4 de dano e ganhando o atributo 'Contundente'.",
"Weapon Mastery": `Suas armas aplicam efeitos adicionais com base no tipo de dano delas. (Contundente - Aplica Confusão no alvo. | Cortante - Aplica Sangramento por 2 turnos. | Perfurante - Diminui a defesa do alvo em 5. | Arma de Fogo - têm 30% de chance de causar 75% de Dano Adicional)`,
"Shielded Assault": "Postura Ofensiva: Você ganha +3 de Chance de Acerto adicional com base no número de inimigos vivos. Além disso, quando você acerta um inimigo com seu escudo, você aumenta o dano causado pela sua Defesa.",
"Tactical Genius": "Suas Habilidades que custam três ou mais Pontos de Ação custam um ponto a menos.",
"Survivalist": `Aumenta o bônus da sua <b>Postura Defensiva</b> e <b>Postura Ofensiva</b> e aumenta o dado de dano do seu Escudo para 2d4`,
"Second Wind": "Durante cada combate, na primeira vez que você atinge abaixo de 25% da sua Força Vital, você se cura em 35% da sua Força Vital perdida.",
"Arcane Aegis": "Reduz o dano recebido por Magias em 20% enquanto empunha um Escudo.",
"Shield wall": "Dobra a Defesa fornecida pelo seu Escudo.",
"Spare Arrows": "Após matar um inimigo com uma arma de longo alcance, reduza o tempo de recarga da sua arma em 1.",
"Follow-up": `Após usar uma habilidade ofensiva, cause 1d4 de dano a um inimigo aleatório. Isso é afetado por <b>Pontos Frapadas<b> e <b>Flechas Perfurantes de Dragão</b>. Se você possuir uma arma de longo alcance com o atributo Leve em sua mão secundária, faça um ataque com essa arma, em vez disso.`,
"Barbed Points": "Quando calculando Dano, aumente o número de dados das suas armas de longo alcance em 1.",
"Dragon Piercing Arrows": "Quando calculando Dano, aumente o dado de dano das suas armas de longo alcance em 1 estágio",
"Headshot": "Seus ataques com armas de longo alcance têm 20% de chance de executar inimigos não-Chefes e não-Mortos-Vivos",
"Natural Reflexes": "No final do seu turno, ganhe Riposte",
"Graceful": "Ao empunhar apenas uma arma de uma mão nas suas mãos, aumente sua Defesa e Chance de Acerto em 10.",
"Bon Mot": "Após matar um inimigo, cure-se em 10% da sua Força Vital perdida.",
"Firm Hand": "Ao empunhar apenas uma arma de uma mão, sempre que você fizer um ataque com arma, faça um ataque adicional.",
"Masterful Efficiency": "Riposte não desaparece mais depois de você atingir um inimigo.",
"Penitent Strike": `Ao atacar um inimigo, causa 50% de dano extra a você e ao alvo. Se você ou o alvo estiverem afetados por <b>Sangramento</b>, cure-se em 6% de sua Força Vital máxima. (${Math.round((char.MAXLIFE * 0.06))})`,
"Bloody Embrace": `Ao ser atacado por um inimigo, reduz o dano recebido em 50%. Converta o dano em <b>Sangramento</b> (para cada 6 pontos de dano, ganhe 1 acúmulo de Sangramento) e depois ganhe uma acúmulo de Piedade. Você não pode mais morrer devido a <b>Sangramento</b>.`,
"Pious Resilience": "Aumenta seu Lifeblood máximo em 25%. No início do seu turno, enquanto seu Sangeu Vital estiver abaixo de 50%, ganhe 3 acúmulos de Piety.",
"Divine Atonement": "Sempre que você for afetado por um efeito de status, ganhe uma acúmulo de Piedade.",
"Zealous Reckoning": "Sempre que um inimigo ataca você, você reflete 30 + (+1% para cada acúmulo de Piedade)% do Dano recebido de volta ao atacante.",
"Martyrdom": "Os ataques inimigos não podem mais errar você. Em compensação, dobre sua força vital máxima.",
"Lay-in-wait": "Para cada ponto de ação não gasto, aumente sua chance de acerto em +6 com armas de longo alcance. e +3 com armas brancas.",
"Trapsmith": "No início de cada combate, você coloca 3 armadilhas aleatórias ativadas quando o inimigo ataca você. Apenas 1 armadilha pode ser ativada a cada turno.",
"Poacher": "Quando um inimigo ativar uma Armadilha, faça um ataque com arma contra ele. Se sua arma estiver em Tempo de Recarga, recarregue-a primeiro.",
"Master trapper": "Master trapper: Melhore suas armadilhas.",
"Hit-and-Run": "Depois de causar dano a um inimigo com um ataque, recue uma armadilha que foi ativada.",
"Sniper Shot": "Ao atacar com uma Arma de Longo Alcance, gaster todos os Pontos de Ação, para cada gasto, aumente o Dado de sua Arma em um estágio. Se o Dado de Arma já é igual ou maior que um d12, aumente o número de Dados em 1.",
"Shredder Stance": "Você ganha acesso à habilidade 'Postura do Retalhador'.",
"Flurry": "Sempre que você fizer um ataque com arma com a mão improvisada, faça um ataque adicional sem custo, este ataque tem -15 de Chance de Acerto, -30 se a arma for pesada. Se a arma estiver em Cooldown, reduza seu Recarga em 1, em vez disso.",
"Momentum": "Sempre que você errar um inimigo com um ataque com arma, aumente sua chance de acerto em 7. Reinicia sempre que você acertar um inimigo.",
"Lunging Stance": "Você ganha acesso à habilidade 'Postura de Assalto'",
"Impossible Flurry": "Sempre que você fizer um ataque com arma com a mão principal ou secundária, faça um ataque adicional sem custo, este ataque tem -15 na Chance de Acerto, -30 se a arma for pesada. Se a arma estiver em Cooldown , reduza seu Tempo de Recarga em 1.",
"Stance Master": "Enquanto estiver na Postura do Retalhador, você faz um ataque adicional por arma em mão sem custo, mas reduz sua chance de acerto em 10. Se a arma estiver em cooldown, reduza-a em 1. Enquanto estiver na Postura de Assalto, seus dois primeiros ataques com arma serão beneficiados pelo bônus.",
"Arcane Weapon": `Você adicionou a 'Invocar Lâmina Arcana' ao seu Repertório, o dano da arma aumenta em 1d8 nos níveis 5, 10 e 15. Enquanto empunha a Lâmina Arcana, lançar um Feitiço concede a você um Ataque Aprimorado que causa 1/2 de sua Inteligência como Dano adicional. (${Math.round((char.INT / 2))})`,
"Arcane Armory": `Enquanto empunhar a Lâmina Arcana, aumente sua Defesa para ser igual à sua Inteligência, se não for maior. (${char.INT})`,
"Mystical Arts": "Você adicionou as habilidades 'Surto de Lâminas' e 'Golpe Espectral' ao seu repertório. Enquanto empunha a Lâmina Arcana, sempre que você fizer um ataque com arma, recupere 5 Essências.",
"Eldritch Knight": "Armadura Pesada não aumenta mais o custo de Essência de Habilidades Mágicas.",
"Runic Mastery": "Agora você pode encantar seu próprio equipamento do seu inventário, são necessárias 3 horas e 35 Essência para encantar um equipamento.",
"Mage Slayer": "Enquanto empunha a Lâmina Arcana, sempre que um inimigo lançar um Feitiço contra você, faça um ataque com arma contra ele.",
"Cirurgic Precision": "Reduza a quantidade necessária para realizar um ataque Crítico para ser pelo menos 1,75X a Defesa do alvo.",
"Bloody mess": `Sempre que você realizar um ataque Crítico, aplique <b>Sangramento</b> no alvo por 3 turnos. Você adiciona 1/2 de sua Carisma à Chance de Acerto contra alvos <b>Sangrando</b>. (${Math.round((char.CHA / 2))})`,
"Battle-Medic": "Sempre que você for atingido, ganhe Regeneração(2). Aumente toda a cura recebida em 5.",
"Precisão Cirúrgica Melhorada": "Reduza a quantidade necessária para realizar um ataque Crítico para 1,5X a Defesa do alvo.",
},
};
var classie = "";
switch (char.Specialization) {
case "Gladiator":
classie = selectedLanguage === "EN" ? "Gladiator" : "Gladiador";
case "Unknown":
classie = selectedLanguage === "EN" ? "Unknown" : "Desconhecido";
break;
case "Berserker":
case "Feral":
case "Juggernaut":
case "Shaman":
classie = selectedLanguage === "EN" ? "Barbarian" : "Bárbaro";
break;
case "Paladin":
case "Cleric":
case "Inquisitor":
case "Flagellant":
classie = selectedLanguage === "EN" ? "Devotee" : "Devoto";
break;
case "Vanguard":
case "Archer":
case "Duelist":
case "Shredder":
classie = selectedLanguage === "EN" ? "Warrior" : "Guerreiro";
break;
case "Assassin":
case "Spy":
case "Thief":
case "Trapper":
classie = selectedLanguage === "EN" ? "Rogue" : "Ladino";
break;
case "Wizard":
case "Warlock":
case "Invoker":
case "Spellblade":
classie = selectedLanguage === "EN" ? "Mage" : "Mago";
break;
case "Dancer":
case "Bard":
case "Scholar":
case "Barber Surgeon":
classie = selectedLanguage === "EN" ? "Artist" : "Artista";
}
const Spec = {
EN: {
"Gladiator": "Gladiator",
"Unknown": "Unknown",
"Vanguard": "Vanguard",
"Archer": "Archer",
"Duelist": "Duelist",
"Shredder": "Shredder",
"Thief": "Thief",
"Spy": "Spy",
"Assassin": "Assassin",
"Trapper": "Trapper",
"Berseker": "Berseker",
"Juggernaut": "Juggernaut",
"Shaman": "Shaman",
"Feral": "Feral",
"Wizard": "Wizard",
"Warlock": "Warlock",
"Invoker": "Invoker",
"Spellblade":"Spellblade",
"Dancer": "Dancer",
"Bard": "Bard",
"Scholar": "Scholar",
"Barber Surgeon": "Barber Surgeon",
"Cleric": "Cleric",
"Paladin": "Paladin",
"Inquisitor": "Inquisitor",
"Flagellant": "Flagellant",
},
"PT-BR": {
"Gladiator": "Gladiador",
"Unknown": "Desconhecido",
"Vanguard": "Vanguarda",
"Archer": "Aqueiro",
"Duelist": "Duelista",
"Shredder": "Retalhador",
"Thief": "Ladrão",
"Spy": "Espião",
"Assassin": "Assassino",
"Trapper": "Caçador",
"Berseker": "Berserker",
"Juggernaut": "Juggernaut",
"Feral": "Selvagem",
"Shaman": "Xamâ",
"Wizard": "Feiticeiro",
"Warlock": "Bruxo",
"Invoker": "Invocador",
"Spellblade": "Lâmina Feiticeira",
"Dancer": "Dançarino",
"Bard": "Bardo",
"Barber Surgeon": "Cirugião-Barbeiro",
"Scholar": "Erudito",
"Cleric": "Clérigo",
"Paladin": "Paladino",
"Inquisitor": "Inquisidor",
"Flagellant": "Flagellante",
},
}
const Anc = {
EN: {
"Unknown": "Unknown",
"Elf": "Elf",
"Herald": "Herald",
"Draconian": "Draconian",
"Dwarf": "Dwarf",
"Human": "Human",
"Vanadi": "Vanadi",
"Orc": "Orc",
"Goblin": "Goblin",
"Vampyre": "Vampyre",
},
"PT-BR": {
"Unknown": "Desconhecido",
"Elf": "Elfo",
"Herald": "Arauto",
"Draconian": "Dracôniano",
"Dwarf": "Anão",
"Human": "Humano",
"Vanadi": "Vanadi",
"Orc": "Orc",
"Goblin": "Goblin",
"Vampyre": "Vampiro",
},
}
const translatedSpec = Spec[selectedLanguage][char.Specialization];
const translatedAncestry = Anc[selectedLanguage][char.Ancestry];
var charpageContent = `
<div id="charthingies">
<div align="center">
<p><h1>Character's Page:</h1></p>
<hr>
<p><b>${selectedLanguage === "EN" ? "Name" : "Nome"}:</b> ${char.Name} | <b>${selectedLanguage === "EN" ? "Ancestry" : "Ancestrialidade"}:</b> ${selectedLanguage === "EN" ? char.Ancestry : translatedAncestry}</div></p>
<p><b>${selectedLanguage === "EN" ? "Class and Specialization" : "Classe e Especialização"}:</b> ${classie} - ${selectedLanguage === "EN" ? char.Specialization : translatedSpec} (${char.level}). <b>${selectedLanguage === "EN" ? "Experience" : "Experiência"}:</b> ${char.experience} | ${State.variables.xpToLevelUp}</p>
<hr>
<div align="center"><p><b>${selectedLanguage === "EN" ? "Lifeblood" : "Força Vital"}:</b> <i>${char.currentLife} / ${char.MAXLIFE}</i> | <b>${selectedLanguage === "EN" ? "Essence" : "Essência"}:</b> <i>${char.currentMana} / ${char.MAXMANA}</i></p></div>
</div>`;
if (char.experience > State.variables.xpToLevelUp) {
charpageContent += `<div align="center"><button onClick="window.levelCharUp()">${selectedLanguage === "EN" ? "Level Up" : "Subir de Nível"}</button></div>`;
}
charpageContent += `<hr>
<h2>${selectedLanguage === "EN" ? "Traits" : "Traços"}</h2>`;
for (let i = 0; i < char.traits.length; i++) {
let trait = char.traits[i];
let translatedTraits = traitlist[selectedLanguage][trait]
const translatedTraitText = traitText[selectedLanguage][trait];
charpageContent += `<p><b>${translatedTraits}:</b> <i>${translatedTraitText}</i></p>`;
}
charpageContent += `<hr>
<h2>${selectedLanguage === "EN" ? "Skills" : "Habilidades"}</h2>
<div id="skillContainer">
<ul>`;
const nameLabel = selectedLanguage === "EN" ? "Name" : "Nome";
const categoriesLabel = selectedLanguage === "EN" ? "Categories" : "Categôrias";
const descriptionLabel = selectedLanguage === "EN" ? "Description" : "Descrição";
const APCostLabel = selectedLanguage === "EN" ? "AP Cost" : "Custo de AP";
const essenceCostLabel = selectedLanguage === "EN" ? "Essence Cost" : "Custo de Essência";
const cooldownLabel = selectedLanguage === "EN" ? "Cooldown" : "Tempo de Recarga";
const translations = {
EN: {
Unwise: "Unwise",
Technique: "Technique",
Spell: "Spell",
AOE: "AOE",
Ballad: "Ballad",
"Arcane": "Arcane",
"Melee": "Melee",
"Ranged": "Ranged",
"Pact Magic": "Pact Magic",
"Dark Magic": "Dark Magic",
"Vampyr": "Vampyr",
"Necromancy": "Necromancy",
"Hemomancy": "Hemomancy",
"Daemon-touched": "Daemon-touched",
General: "General",
Ancestral: "Ancestral",
Vanadi: "Vanadi",
Shapeshifit: "Shapeshift",
Buff: "Buff",
Holy: "Holy",
Offensive: "Offensive",
Debuff: "Debuff",
Healing: "Healing",
Luck: "Luck",
Defensive: "Defensive",
Summon: "Summon",
Elemental: "Elemental",
Crime: "Crime",
"Combat Test": "Combat Test",
Shamanic: "Shamanic",
Stance: "Stance",
},
"PT_BR": {
Unwise: "Insensato",
Technique: "Técnica",
Spell: "Magia",
AOE: "Área",
Ballad: "Balada",
"Melee": "Corpo-a-Corpo",
"Ranged": "Longa Distância",
"Pact Magic": "Magia de Pacto",
"Dark Magic": "Mágia Negra",
"Vampyr": "Vampírico",
"Necromancy": "Necromância",
"Hemomancy": "Hemomância",
"Daemon-touched": "Tocado por Demônio",
General: "General",
Ancestral: "Ancestral",
Vanadi: "Vanadi",
Shapeshifit: "Mudança de Forma",
Buff: "Buff",
Holy: "Sagrado",
Offensive: "Offensiva",
Debuff: "Debuff",
Healing: "Cura",
Luck: "Sorte",
Defensive: "Defensiva",
Summon: "Invocação",
Elemental: "Elemental",
Crime: "Crime",
"Combat Test": "Teste de Combate",
Shamanic: "Xamânico",
Stance: "Postura",
},
// Add more languages and translations as needed
};
// Loop through char.skills
for (let i = 0; i < char.skills.length; i++) {
let skill = char.skills[i];
const translatedName = selectedLanguage === "EN" ? skill.name : skill.Name_pt;
const translatedDescription = selectedLanguage === "EN" ? skill.description : skill.desc_pt;
const translatedCategories = skill.categories.map((category) => translations[selectedLanguage][category] || category);
const joinedTranslatedCategories = translatedCategories.join(", ");
const translatedturns = selectedLanguage === "EN" ? "turns" : "turnos"
// Add the skill details to charpageContent
charpageContent += `
<li>
<b>${nameLabel}:</b> ${translatedName}.
<b>${categoriesLabel}:</b> ${joinedTranslatedCategories}.
<b>${descriptionLabel}:</b> ${translatedDescription}
<b>${APCostLabel}:</b> ${skill.APCost} | <b>${essenceCostLabel}:</b> ${skill.Manacost} | <b>${cooldownLabel}:</b> ${skill.cooldown} ${translatedturns}.
</li>`;
}
if (selectedLanguage === "EN") {
charpageContent +=`</div>
<hr>
<div align='center'>
<h2>Attributes</h2>
<table>
<tr>
<td> STRENGTH: </td>
<td> DEXTERITY: </td>
<td> RESILIENCE: </td>
<td> INTELLIGENCE: </td>
<td> CHARISMA: </td>
<td> PERCEPTION: </td>
</tr>
<tr>
<td>${char.STR}</td>
<td>${char.DEX}</td>
<td>${char.RES}</td>
<td>${char.INT}</td>
<td>${char.CHA}</td>
<td>${char.PER}</td>
</tr>
</table>
<hr>
<h2>Epertises</h2>
<table>
<tr>
<td>Athletics:</td>
<td>Acrobatics:</td>
<td>Stealth: </td>
<td>Sleight of Hands:</td>
<td>World Knowledge:</td>
<td>Mystical Knowledge:</td>
<td>Arcane Knowledge:</td>
<td>Speech:</td>
<td>Arts:</td>
<td>Intimidation:</td>
<td>Insight: </td>
<td>Awareness: </td>
</tr>
<tr>
<td>${char.Athletics}</td>
<td>${char.Acrobatics}</td>
<td>${char.Stealth}</td>
<td>${char.SleightofHands}</td>
<td>${char.WorldKnowledge}</td>
<td>${char.MysticalKnowledge}</td>
<td>${char.ArcaneKnowledge}</td>
<td>${char.Speech}</td>
<td>${char.Arts}</td>
<td>${char.Intimidation}</td>
<td>${char.Insight}</td>
<td>${char.Awareness}</td>
</tr>
</table>
</div>
<hr>
`;
} else if (selectedLanguage === "PT_BR") {
charpageContent +=`</div>
<hr>
<div align='center'>
<h2>Atributos</h2>
<table>
<tr>
<td> FORÇA: </td>
<td> DESTREZA: </td>
<td> RESILIÊNCIA: </td>
<td> INTELIGÊNCIA: </td>
<td> CARISMA: </td>
<td> PERCEPÇÃO: </td>
</tr>
<tr>
<td>${char.STR}</td>
<td>${char.DEX}</td>
<td>${char.RES}</td>
<td>${char.INT}</td>
<td>${char.CHA}</td>
<td>${char.PER}</td>
</tr>
</table>
<hr>
<h2>Perícias</h2>
<table>
<tr>
<td>Atletismo:</td>
<td>Acrobacia:</td>
<td>Furtividade: </td>
<td>Destreza de Mãos:</td>
<td>Conhecimento do Mundo:</td>
<td>Conhecimento Místico:</td>
<td>Conhecimento Arcano:</td>
<td>Fala:</td>
<td>Artes:</td>
<td>Intimidação:</td>
<td>Discernimento:</td>
<td>Conciência: </td>
</tr>
<tr>
<td>${char.Athletics}</td>
<td>${char.Acrobatics}</td>
<td>${char.Stealth}</td>
<td>${char.SleightofHands}</td>
<td>${char.WorldKnowledge}</td>
<td>${char.MysticalKnowledge}</td>
<td>${char.ArcaneKnowledge}</td>
<td>${char.Speech}</td>
<td>${char.Arts}</td>
<td>${char.Intimidation}</td>
<td>${char.Insight}</td>
<td>${char.Awareness}</td>
</tr>
</table>
</div>
<hr>
`;
}
charPage.innerHTML = charpageContent;
}
window.levelCharUp = function() {
let char = SugarCube.State.variables.character[1];
char.level++;
let originalXpToLevelUp = 45
originalXpToLevelUp += Math.round(2.75 * char.level);
let xp = originalXpToLevelUp;
let growth = 0.005 + (0.035 * char.level);
// Adjust the XP required for the next level
xp = Math.round((xp * growth) + (-50 + (xp * (char.level + 1)))) + xp - 15;
if (char.level < 10) {
xp -= 25 * char.level
}
SugarCube.State.variables.xpToLevelUp += Math.round(xp * 0.60);
let xpneed = SugarCube.State.variables.xpToLevelUp
char.availableAttribute += 3;
if (char.traits.includes("Unlimited Potential")) {
char.availableExpertise += 4;
} else {
char.availableExpertise += 3;
}
};
window.updateInventoryDisplay = function () {
var inventoryDiv = document.getElementById('inventory');
var inventoryContent = '<h3>Inventory</h3>'; // Initialize with the heading
for (let i = 0; i < State.variables.character[1].inventory.length; i++) {
let item = State.variables.character[1].inventory[i];
let defense = item.Defense || "No Defense";
let damage = State.variables.language === "PT-BR" ? "Sem Dano" : "No Damage";
if (item.Damage !== null) {
damage = item.Damage;
}
if (State.variables.language === "EN") {
if (item.Slot && !item.Type.includes("bornwith")) { // Checking for equippable items
inventoryContent += `
<table>
<tr>
<td>
<img src="${item.icon}" style="float:left; margin-right:5px;">
</td>
<td>
[${item.count > 1 ? item.Plural : item.Singular} | x ${item.count}] ${item.Type.map(function(type, index) {
var title = {
"bornwith": "This is not a gear, you have been born with this.",
"medium armor": "This gear is good against piercing weapons, but not as effective against blunt or slashing weapons.",
"light armor": "This gear is good against blunt weapons, but terrible against slashing weapons.",
"heavy armor": "This gear is good against slashing weapons, but terrible against blunt weapons. Increases the cost of Essence of Skills for each equipped Heavy armored gear.",
"wearable": "This is a gear to be worn at some body part.",
"weapon": "This is a weapon to be wielded at either your Mainhand or your Offhand.",
"non-armor": "This is not a armor equipment. Increase damage received by 7%.",
"draconic": "Made from Dragon's scales. Reduce damage received by 7%.",
"naked": "Just like as you were born. Add +2 to Athletics and Acrobatics Tests. Remove -2 from Intimidation and Speech Tests.",
"divine": "When a Test would result in failure, add +2. If it is a Mystical Knowledge test, add +3, instead.",
"holy": "When a Test would result in failure, add +1. If it is a Mystical Knowledge test, add +2, instead.",
"arcane": "Reduces necessary time to learn new skills by 1 hour.",
"secretive": "Add +2 to Stealth Tests.",
"instrument": "Add +2 to Art Tests.",
"sturdy": "Increase damage reduction from Ranged weapons by 5%.",
"composite": "Increase damage reduction from Melee weapons by 5%.",
"enchanted": "This gear is enchanted, giving it properties to benefit the wielder.",
"cursed": "This gear is cursed, giving it properties to harm the wielder.",
"elegant": "Add +2 to Speech tests.",
"esoteric": "Improve your Spells.",
"light": "Can be wielded on the offhand without penalty. Attacks made with Light weapons on the offhand, does not cost Action Points.",
"melee": "This weapon uses your Strength (STR) and Dexterity (DEX) to calculate the Hit-Chance.",
"ranged": "This weapon uses your Perception (PER) to calculate the Hit-chance.",
"agile": "Add 1/3 of your Dexterity (DEX) to the weapon's damage.",
"throwing": "Your first 6 attacks with this weapon add 1/2 your Strength and Perception to the Hit-chance.",
"scatter": "Deal half of the damage dealt to the target to all enemies.",
"1-handed": "This gear takes a single space to wield. Cost 1 Action Point to use this weapon.",
"2-handed": "This gear takes two spaces to wield. Cost 2 Action Points to use this weapon.",
"heavy": "Add 1/3 of your Strength (STR) to the weapon's damage. -15 to Hit-Chance while on the Offhand.",
"precision": "Add 1/3 of your Perception (PER) to the weapon's damage.",
"imprecise": "Reduce your Hit-Chance by 15.",
"versatile": "Add 1/3 of your Strength (STR) or Dexterity (DEX) to the weapon's damage, whichever is higher.",
"blunt": "This weapon deals Blunt damage.",
"slashing": "This weapon deals Slashing damage.",
"piercing": "This weapon deals Piercing damage.",
"visceral": "Add 7% of the target's current Lifeblood to the weapon's damage.",
"firearm": "This weapon ignores damage reduction from most gears.",
"unique": "This weapon uses special rules.",
"draconian": "Of Draconian origin.",
"dwarven": "Of Dwarven orign.",
"elven": "Of Elven orign.",
"vanaen": "Of Vanadi orign.",
"cult": "Cultists uses these type of equipment.",
}[type.toLowerCase()]; // Convert type to lowercase for case-insensitive matching
return '<abbr title="' + title + '">' + type.charAt(0).toUpperCase() + type.slice(1) + '</abbr>'; // Capitalize the first letter of each type
}).join(', ')}<br>
<p> <b>Defense:</b> ${defense} | <b>Damage:</b> ${damage}</p>
<div>
<i>${item.Description}</i>
</div>
<div>
<a onclick="window.equipAndNotify('${item.Name}')">Equip ${item.Name}</a>
</div>
</td>
</tr>
</table>
`;
} else { // For items meant to be used
inventoryContent += `
<table>
<tr>
<td>
<img src="${item.icon}" style="float:left; margin-right:10px;">
</td>
<td>
[${item.count > 1 ? item.Plural : item.Singular} | x ${item.count}] ${item.Type.map(function(type, index) {
var title = {
"potion": "Made to be drank.",
"food": "Made to be eaten.",
"consumable": "Made to be placed at your upper mouth.",
"alchemy": "A type of science. Almost.",
"adventure gear": "Useful for many things, a must-have.",
"crime gear": "Self implyed name.",
"worthless": "Just like you. For real.",
}[type.toLowerCase()]; // Convert type to lowercase for case-insensitive matching
return '<abbr title="' + title + '">' + type.charAt(0).toUpperCase() + type.slice(1) + '</abbr>'; // Capitalize the first letter of each type
}).join(', ')}<br>
<div>
<i>${item.Description}</i>
</div>
<div>
<<link "Use ${item.Name}">>
<<notify 2s "Inventory">>You used ${item.Name}<</notify>>
<<run ${item.onUse}>> // Execute item-specific action
<</link>> - <i>${item.Description}</i>
</div>
</td>
</tr>
</table>
`;
}
} else if (State.variables.language === "PT-BR") {
if (item.Slot && !item.Type.includes("bornwith")) { // Checking for equippable items
inventoryContent += `
<table>
<tr>
<td>
<img src="${item.icon}" style="float:left; margin-right:5px;">
</td>
<td>
[${item.count > 1 ? item.Plural_pt : item.Singular_pt} | x ${item.count}] ${item.Type.map(function(type, index) {
var title = {
"medium armor": "Esta armadura é eficaz contra armas perfurantes, mas não tão eficaz contra armas contundentes ou cortantes.",
"light armor": "Esta armadura é eficaz contra armas contundentes, mas terrível contra armas cortantes.",
"heavy armor": "Esta armadura é eficaz contra armas cortantes, mas terrível contra armas contundentes. Aumenta o custo de Essência de Habilidades em 1 para cada peça de Armadura Pesada.",
"wearable": "Este é um equipamento para ser usado em alguma parte do corpo.",
"weapon": "Esta é uma arma para ser empunhada na sua Mão Principal ou Secundária.",
"non-armor": "Não é uma peça de armadura. Aumenta o Dano recebido em 7%.",
"draconic": "Feita de escamas de Dragão. Reduz o Dano recebido em 7%.",
"naked": "Assim como você nasceu. Adiciona +2 aos Testes de Atletismo e Acrobacia. Remove -2 dos Testes de Intimidação e Fala.",
"divine": "Quando um Teste resultaria em falha, adicione +2. Se for um teste de Conhecimento Místico, adicione +3, em vez disso.",
"holy": "Quando um Teste resultaria em falha, adicione +1. Se for um teste de Conhecimento Místico, adicione +2, em vez disso.",
"arcane": "Reduz o tempo necessário para aprender novas habilidades em 1 hora.",
"secretive": "Adiciona +2 aos Testes de Furtividade.",
"instrument": "Adiciona +2 aos Testes de Arte.",
"sturdy": "Aumenta a redução de dano de armas de longo alcance em 5%.",
"composite": "Aumenta a redução de dano de armas de curto alcance em 5%.",
"enchanted": "Este equipamento é encantado, dando-lhe propriedades para beneficiar o usuário.",
"cursed": "Este equipamento é amaldiçoado, dando-lhe propriedades para prejudicar o usuário.",
"elegant": "Adiciona +2 aos Testes de Oratória.",
"esoteric": "Melhora seus Feitiços.",
"light": "Pode ser empunhado na mão secundária sem penalidade. Ataques na mão secundária feitos com armas Leves não custam Pontos de Ação.",
"melee": "Esta arma utiliza sua Força (FOR) e Destreza (DES) para calcular a Chance de Acerto.",
"ranged": "Esta arma utiliza sua Percepção (PER) para calcular a Chance de Acerto.",
"agile": "Adiciona 1/3 da sua Destreza (DES) ao dano da arma.",
"throwing": "Seus primeiros 6 ataques com esta arma adicionam 1/2 da sua Força e Percepção à Chance de Acerto.",
"scatter": "Causa metade do dano causado ao alvo a todos os inimigos.",
"1-handed": "Este equipamento ocupa um único espaço para ser empunhado. Custa 1 Ponto de Ação para usar esta arma.",
"2-handed": "Este equipamento ocupa dois espaços para ser empunhado. Custa 2 Pontos de Ação para usar esta arma.",
"heavy": "Adiciona 1/3 da sua Força (FOR) ao dano da arma. -15 na Chance de Acerto enquanto na Mão Secundária.",
"precision": "Adiciona 1/3 da sua Percepção (PER) ao dano da arma.",
"imprecise": "Reduz sua Chance de Acerto em 15.",
"versatile": "Adiciona 1/3 da sua Força (FOR) ou Destreza (DES) ao dano da arma, o que for maior.",
"blunt": "Esta arma causa dano Contundente.",
"slashing": "Esta arma causa dano Cortante.",
"piercing": "Esta arma causa dano Perfurante.",
"visceral": "Adiciona 7% da Força Vital atual do alvo ao dano da arma.",
"firearm": "Esta arma ignora a redução de dano da maioria dos equipamentos.",
"unique": "Esta arma utiliza regras especiais.",
"draconian": "De origem Draconiana.",
"cult": "Cultistas usão esse tipo de equipmento.",
}[type.toLowerCase()];
var translatedType = {
"bornwith": "cascido com",
"medium armor": "armadura Média",
"light armor": "armadura Leve",
"heavy armor": "armadura Pesada",
"wearable": "vestimenta",
"weapon": "arma",
"non-armor": "não-armadura",
"draconic": "araconiano",
"naked": "nu",
"divine": "divino",
"holy": "sagrado",
"arcane": "arcano",
"secretive": "secreto",
"instrument": "instrumento",
"sturdy": "robusto",
"composite": "composto",
"enchanted": "encantado",
"cursed": "amaldiçoado",
"elegant": "elegante",
"esoteric": "Esotérico",
"light": "leve",
"melee": "corpo-a-corpo",
"ranged": "à Distância",
"agile": "agil",
"throwing": "arremesso",
"scatter": "Espalhado",
"1-handed": "1-Mão",
"2-handed": "2-Mãos",
"heavy": "pesado",
"precision": "precisão",
"imprecise": "impreciso",
"versatile": "Versátil",
"blunt": "contundente",
"slashing": "cortante",
"piercing": "perfurante",
"visceral": "visceral",
"firearm": "arma de Fogo",
"unique": "único",
"draconian": "draconiano",
"cult": "culto",
}[type.toLowerCase()]; // Convert type to lowercase for case-insensitive matching
return '<abbr title="' + title + '">' + translatedType.charAt(0).toUpperCase() + translatedType.slice(1) + '</abbr>'; // Capitalize the first letter of each type
}).join(', ')}<br>
<p> <b>Defesa:</b> ${defense} | <b>Dano:</b> ${damage}</p>
<div>
<i>${item.Description_pt}</i>
</div>
<div>
<a onclick="window.equipAndNotify('${item.Name}')">Equipar ${item.Name_pt}</a>
</div>
</td>
</tr>
</table>
`;
} else { // For items meant to be used
inventoryContent += `
<table>
<tr>
<td>
<img src="${item.icon}" style="float:left; margin-right:10px;">
</td>
<td>
[${item.count > 1 ? item.Plural_pt : item.Singular_pt} | x ${item.count}] ${item.Type.map(function(type, index) {
var title = {
"potion": "Feito para ser bebido.",
"food": "Feito para ser comido.",
"consumable": "Feito para ser colocado na sua boca superior.",
"alchemy": "Um tipo de ciência. Quase.",
"adventure gear": "Útil para muitas coias, algo que se deve ter.",
"crime gear": "Nome auto-implicado.",
"worthless": "Assim como você. Sem zoas..",
}
var translatedType = {
"potion": "Poção",
"food": "Comida",
"consumable": "Consúmivel",
"alchemy": "Alquímia",
"adventure gear": "Equipamento de Aventura",
"crima gear": "Equipamento Criminoso",
"worthless": "Sem-valor",
}
[type.toLowerCase()]; // Convert type to lowercase for case-insensitive matching
return '<abbr title="' + title + '">' + translatedType.charAt(0).toUpperCase() + type.slice(1) + '</abbr>'; // Capitalize the first letter of each type
}).join(', ')}<br>
<div>
<i>${item.Description}</i>
</div>
<div>
<a onclick="window.useItemAndNotify('${item.Name}')"> Usar ${item.Name_pt}</a> - <i>${item.Description_pt}</i>
</div>
</td>
</tr>
</table>
`;
}
}
}
inventoryDiv.innerHTML = inventoryContent; // Set the updated content to the inventory display
}
window.useItemAndNotify = function (itemName) {
itemName.onUse
if (State.variables.language === "EN") {
setup.notify(`You used: ${itemName}.`);
} else if (State.variables.language === "PT-BR") {
setup.notify(`Você usou: ${itemName}.`);
}
window.updateInventoryDisplay();
}
// Function to equip an item and notify
window.equipAndNotify = function (itemName) {
equipItem(itemName)
// Update gear display and inventory display...
updateGearDisplay();
window.updateInventoryDisplay();
}
window.unequipItem = function (slot) {
const equipment = State.variables.character[1].equipment;
if (equipment[slot]) {
const item = equipment[slot];
if (item) {
if (item.Type.includes("2-handed")) {
if (equipment["offhand"] && equipment["offhand"].Name === "Handle") {
equipment["offhand"] = null;
}
equipment["mainhand"] = null;
if (state.variables.character[1].ancesty === "Draconian") {
equipment["mainhand"] = State.variables.Items["Draconian claw"];
equipment["offhand"] = State.variables.Items["Other Draconian claw"];
} else {
equipment["mainhand"] = State.variables.Items["Fist"];
equipment["offhand"] = State.variables.Items["Other hand"];
}
updateGearDisplay();
} else {
// Create a copy of the item to prevent it from becoming the macro reference
const itemCopy = Object.assign({}, item);
if (item.countedForIronSuit !== undefined && item.countedForIronSuit) {
item.countedForIronSuit = false;
State.variables.character[1].additionalDefense -= 1;
}
if (equipment["mainhand"].countedfortrustworthyInstrument) {
const index = equipment.traits.indexOf("esoteric");
equipment["mainhand"].traits.splice(index, 1)
equipment["mainhand"].countedfortrustworthyInstrument = false
} else if (equipment["offhand"].countedfortrustworthyInstrument) {
const index = equipment.traits.indexOf("esoteric");
equipment["offhand"].traits.splice(index, 1)
equipment["offhand"].countedfortrustworthyInstrument = false
}
if (equipment["mainhand"].countedforBladeDancer !== undefined && equipment["mainhand"].countedforBladeDancer) {
equipment["mainhand"].countedforBladeDancer = false;
const index = equipment.traits.indexOf("instrument");
equipment["mainhand"].traits.splice(index, 1)
}
// Unequip the item in the specified slot
State.variables.character[1].equipment[slot] = null;
addItemToInventory(item.Name);
window.updateInventoryDisplay();
updateGearDisplay();
if (State.variables.language === "EN") {
setup.notify(`${item.Name} was unequipped and returned to your inventory.`);
} else if (State.variables.language === "PT-BR") {
setup.notify(`${item.Name_pt} foi desquipado e retornou para seu inventório.`);
}
item.equipped = false;
switch (slot) {
case "head":
equipment["head"] = State.variables.Items["Empty Head"];
break;
case "torso":
equipment["torso"] = State.variables.Items["Empty Torso"];
break;
case "waist":
equipment["waist"] = State.variables.Items["Empty Waist"];
break;
case "legs":
equipment["legs"] = State.variables.Items["Empty Legs"];
break;
case "feet":
equipment["feet"] = State.variables.Items["Empty Feet"];
break;
case "mainhand":
if (State.variables.character[1].Ancestry === "Draconian") {
equipment["mainhand"] = State.variables.Items["Draconian claw"];
} else {
equipment["mainhand"] = State.variables.Items["Fist"];
}
break;
case "offhand":
if (State.variables.character[1].Ancestry === "Draconian") {
equipment["offhand"] = State.variables.Items["Other Draconian claw"];
} else {
equipment["offhand"] = State.variables.Items["Other hand"];
}
break;
default:
break;
}
window.updateInventoryDisplay();
updateGearDisplay();
}
}
}
};
/////////////////////
//Skills and Status//
/////////////////////
//Status
//Poison (x), an character that is poisoned takes (x) of damage at the start of their turn, and halves the status
//Bleed (x), an character that is bledding looses 5% of their Lifeblood at the start of their turn, the effect lasts for (x) turns.
//Regeneration (X) an character that is regenerating, heals by (x) and reduce the value by 1, the effect lasts for (x) turns
//Stunned (x) an character that is stunned cannot attack for (x) turns.
//Confusion (x) While Confused, a character has to have a lower hitchance than the enemies defense to hit it
//Hindered (X) an character that is confused cannot use skills for (x) turns.
//Burn (x), an character that is burning takes 6 damage whenever it uses an Action Point.
//Blind, an character that is blind has -100 to Hit Chance, bound to miss unless it is Confused.
class Skill {
constructor(name, options) {
this.name = name || "Unnamed Skill";
this.categories = options.categories;
this.description = options.description || "yet to add";
this.duration = options.duration || 0;
this.APCost = options.APCost || 0;
this.Manacost = options.Manacost || 0;
this.cooldown = options.cooldown || 0;
this.inCooldown = 0;
this.buff = options.buff || [];
this.debuff = options.debuff || [];
this.onUse = options.onUse || null;
this.learned = options.learned || false;
//portuguese
this.name_pt = options.name_pt || "Que?"
this.desc_pt = options.desc_pt || "A adicionar";
// Add other skill-specific properties as needed
}
use(entity) {
if (this.inCooldown <= 0) {
// Execute skill logic
this.onUse(entity);
// Set cooldown separately for each entity
this.inCooldown = this.cooldwon;
return true; // Skill used successfully
} else {
return false; // Skill is on cooldown
}
}
}
window.reduceCooldownForSkills = function (skill) {
if (skill.incooldown > 0) {
skill.incooldown -= 1;
}
}
function createSkill(name, options) {
options.name = name;
options.description = options.description;
options.learned = options.learned;
State.variables.skill.push(new Skill(name, options));
}
//non-specific skills
var howl = createSkill("Howl", {
name_pt: "Uivo",
desc_pt: "Invoque um Lobo Selvagem, então aumente o dano de cada inimigo do tipo Lobo por sua Carisma + nível.",
description: "Summon a Wild Wolf, then increase the damage of each Wolf type enemy by your Charisma + level.",
categories: ["Technique", "General", "Buff", "Wolf", "Summon"],
APCost: 2,
cooldown: 8,
onUse: function(attacker) {
window.addEnemiesToBattle(WildWolf, 1);
// Apply Warcry effect to self
State.variables.enemyInstances.forEach(enemy => {
if (enemy.traits.includes("Wolf")) {
enemy.additionalDamage += attacker.CHA + attacker.level;
}
});
if (State.variables.language === "EN") {
addToBattleLog(`AWOOOOO! ${attacker.Name} released a ferocious Howl, increasing their numbers and the damage of their attacksby ${attacker.CHA + attacker.level}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`AWOOOOO! ${attacker.Name_pt} solta um feroz Uivo, aumentando seus números e o dano de seus ataques em ${attacker.CHA + attacker.level}.`);
}
}
})
var rest = createSkill("Rest", {
name_pt: "Descanso",
desc_pt: "Faça uma breve pausa no combate enquanto os outros tentam te matar, por quê não? Restaura 5% do seu Sangue Vital e Essência.",
description: "Take a brief respite of combat while others try to kill you, why not? Restore 5% of your Lifeblood and Essence.",
categories: ["Unwise", "General", "Healing"],
APCost: 1,
cooldown: 0,
onUse: function(attacker) {
let healing = Math.round((attacker.MAXLIFE * 0.05));
if (attacker.traits.includes("Battle-Medic")) {
healing += 5
}
attacker.currentLife += healing
attacker.currentMana += Math.round((attacker.MAXMANA * 0.05));
}
});
//Twin Vipers: Make a singular weapon strike, if hit, damage the target with both weapons in hand. [Requires a 1-handed weapon in each hand]
var twinViper = createSkill("Dual Weapon Rush", {
name_pt: "Investida de Duas Armas",
categories: ["Technique", "Offensive"],
descp_pt: "Faça um golpe armado com cada uma de suas arma, em qualquer acerto, causa o dano de cada arma contra o alvo. Em um erro, recupera um Ponto de Ação. [Requer uma arma de 1-mão em cada mão]",
description: "Make weapon strike with both your weapon, if any hits, deal the damage of each weapon against the target. On a miss, regain a Action Point. [Requires a 1-handed weapon in each hand]",
APCost: 3,
cooldown: 6,
onUse: function(attacker, target) {
if (attacker.equipment.mainhand.Type.includes("1-handed") && attacker.equipment.mainhand.Type.includes("weapon") && attacker.equipment.offhand.Type.includes("1-handed") && attacker.equipment.offhand.Type.includes("weapon")) {
let hit1 = calculateHitChance(attacker, target, attacker.equipment.mainhand)
let hit2 = calculateHitChance(attacker, target, attacker.equipment.offhand)
if (hit1 || hit2) {
let damage = 0
damage += calculateDamage(attacker, target, attacker.equipment.mainhand)
damage += calculateDamage(attacker, target, attacker.equipment.offhand)
applyDamage(attacker, target, damage, attacker.equipment.mainhand)
} else {
attacker.AP++
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} attempt of Twin Viper ends in a miss, thankfully, they were able to regain an Action Point from it.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} tentativa de Golpe Gêmoeos terminou em um erro, felizmente, eles foram capazes de recuperar um Ponto de Ação disso.`);
}
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} has not been equipped with enough weapons for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} não está equipado armas o suficiente para essa Habilidade.`);
}
}
}
})
//Gain Defense equal to twice your weapon's damage and activate Riposte. If your are wielding a weapon in each hand, gain Defense equal to the sum of the weapons damages. While Parry is active, Riposte does not suffer from reduced Hit-Chance.
var parry = createSkill("Parry",{
name_pt: "Aparar",
descp_pt:"Ganhe Defesa igual a duas vezes o Dano de sua arma e ative Riposte. Caso esteja equipado com uma arma em cada mão, ganhe Defesa igual a soma do Dano de suas armas. Enquanto Aparar está ativo, Riposte não sofre from Chance de Acerto reduzido.",
description: "Gain Defense equal to twice your weapon's damage and activate Riposte. If you are wielding a weapon in each hand, gain Defense equal to the sum of the weapons damages. While Parry is active, Riposte does not suffer from reduced Hit-Chance.",
categories: ["Technique", "Defensive"],
APCost: 2,
cooldown: 6,
onUse: function(attacker) {
let value = 0
if (attacker.equipment.offhand.Type.includes("weapon") && attacker.equipment.mainhand.Type.includes("weapon")) {
value += rollDice(attacker.equipment.mainhand.Damage)
value += rollDice(attacker.equipment.offhand.Damage)
} else if (!attacker.equipment.offhand.Type.includes("weapon") && attacker.equipment.mainhand.Type.includes("weapon")) {
value += (rollDice(attacker.equipment.mainhand.Damage) * 2)
}
attacker.additionalDefense += value
attacker.riposteactive = true
attacker.statusEffects.parry = {
active: true,
value: value,
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} prepares to Parry the next attack.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} se prepare para Aparar o próximo ataque.`)
}
}
})
var Mcflurry = createSkill("Onslaught", {
name_pt: "Arremetida",
desc_pt: "Faça dois golpes armados com cada arma em sua mãoes com -10 de Chance de Acerto (-20 se a arma é Pesada). Para cada acerto, aumente o dano da outra arma em 20%. [Requer uma arma de 1-mão em cada mão]",
description: "Make two weapon strikes with each weapon in hands with -10 to Hit Chance (-20 if a weapon is Heavy). For each hit, increase the damage of the other weapon by 20%. [Requires a 1-handed weapon in each hand]",
categories: ["Technique", "Offensive"],
APCost: 3,
cooldown: 7,
onUse: function(attacker, target) {
if (attacker.equipment.mainhand.Type.includes("1-handed") && attacker.equipment.mainhand.Type.includes("weapon") && attacker.equipment.offhand.Type.includes("1-handed") && attacker.equipment.offhand.Type.includes("weapon")) {
let damage1 = 0;
let damage2 = 0;
let damage3 = 0;
let damage4 = 0
let miss = 0;
if (attacker.equipment.mainhand.Type.includes('heavy')) {
attacker.additionalHiChance -= 20
} else {
attacker.additionalHiChance -= 10
}
if (attacker.equipment.offhand.Type.includes('heavy')) {
attacker.additionalHiChance -= 20
} else {
attacker.additionalHiChance -= 10
}
let hitChance1 = calculateHitChance(attacker, target, attacker.equipment.mainhand)
if (hitChance1) {
damage1 += calculateDamage(attacker, target, attacker.equipment.mainhand)
applyDamage(attacker, target, damage1, attacker.equipment.mainhand)
} else {
miss += 1
}
let hitChance2 = calculateHitChance(attacker, target, attacker.equipment.offhand)
if (hitChance2) {
damage2 += calculateDamage(attacker, target, attacker.equipment.offhand)
if (hitChance1) {
damage2 += Math.round((damage2 * 0.2))
}
applyDamage(attacker, target, damage2, attacker.equipment.offhand)
} else {
miss += 1
}
let hitChance3 = calculateHitChance(attacker, target, attacker.equipment.mainhand)
if (hitChance3) {
damage2 += calculateDamage(attacker, target, attacker.equipment.mainhand)
if (hitChance2) {
damage3 += Math.round((damage3 * 0.2))
}
applyDamage(attacker, target, damage3, attacker.equipment.mainhand)
} else {
miss += 1
}
let hitChance4 = calculateHitChance(attacker, target, attacker.equipment.offhand)
if (hitChance4) {
damage4 += calculateDamage(attacker, target, attacker.equipment.offhand)
if (hitChance3) {
damage4 += Math.round((damage3 * 0.2))
}
applyDamage(attacker, target, damage3, attacker.equipment.offhand)
} else {
miss += 1
}
if (attacker.equipment.mainhand.Type.includes('heavy')) {
attacker.additionalHiChance += 20
} else {
attacker.additionalHiChance += 10
}
if (attacker.equipment.offhand.Type.includes('heavy')) {
attacker.additionalHiChance += 20
} else {
attacker.additionalHiChance += 10
}
if (miss > 0 && miss <4) {
if (State.variables.language === "EN") {
addTobattleLog(`${attacker.Name} missed ${miss} strike(s). Dealing ${damage1 + damage2 + damage3 + damage4} total of against ${target.Name}.`)
} else if (State.variables.language === "PT-BR") {
addTobattleLog(`${attacker.Name} errou ${miss} golpe(s). Dando um total ${damage1 + damage2 + damage3 + damage4} de dano contra ${target.Name}.`)}
} else if (miss === 4) {
if (State.variables.language === "EN") {
addTobattleLog(`${attacker.Name} missed all four strikes. That should be illegal.`)
} else if (State.variables.language === "PT-BR") {
addTobattleLog(`${attacker.Name} errou todos os quatro golpes. Isso deveria ser ilegal.`)}
} else if (miss === 0) {
if (State.variables.language === "EN") {
addTobattleLog(`${attacker.Name} hit all strikes! Dealing ${damage1 + damage2 + damage3 + damage4} total of damage against ${target.Name}.`)
} else if (State.variables.language === "PT-BR") {
addTobattleLog(`${attacker.Name_pt} acertou todos os golpes! Dando um total de ${damage1 + damage2 + damage3 + damage4} de dano contra ${target.Name_pt}.`)
}
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} has not been equipped with enough weapons for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} não está equipado armas o suficiente para essa Habilidade.`);
}
}
}
})
var shredderStace = createSkill("Shredder Stance",{
name_pt: "Postura do Retalhador",
desc_pt: "Enquanto ativo, você rola o Dano duas vezes e utiliza o resultado mais alto, mas tem -15 na Chance de Acerto para seus ataques. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate",
description: "While active, you roll Damage twice and utilize the highest result, but you have a -15 to Hit-Chance for your attacks. Cost 3 Essence per turn to maintain your Stance. Only one Stance is permitted per combat.",
categories: ["Technique", "Stance", "General"],
APCost: 0,
Manacost: 3,
onUse: function(attacker) {
if (attacker.traits.includes("Stance Master")) {
this.description = "While active, you make one additional attack per weapon and roll Damage twice and utilizes the highest result, but you have a -25 to Hit-Chance for your attacks. Cost 3 Essence per turn to maintain your Stance. Only one Stance is permited per combat.";
desc_pt = "Enquanto ativo, você faz um ataque aditional por arma e rola o Dano duas vezes e utiliza o resultado mais alto, mas tem -25 na Chance de Acerto para seus ataques. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate";
}
if (!attacker.statusEffects.stance && !attacker.statusEffects.stance.active === true) {
attacker.statusEffects.stance = {
active: true,
type: "Shredder"
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} enters the Shredder Stance.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} entra na Postura do Retalhador.`);
}
} else {
attacker.currentEssence += 3
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is already in an stance.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} já está em uma postura.`);
}
}
}
})
var lungingStance = createSkill("Lunging Stance",{
name_pt: "Postura de Investida",
descp_pt: "Enquanto ativo, seu primeiro ataque com arma tem um Acerto garantido e adiciona +2 Dados ao Dano de sua arma, mas você tem sua Defesa reduzida em -15. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate.",
description: "While active, your first weapon strike has a garanteed hit and adds +2 Weapon Dice, but your Defense is reduced by -15. Costs 3 Essênce per turn to keep your Stance. Only one Stance is permitted per combat.",
categories: ["Technique", "Stance", "General"],
APCost: 0,
Manacost: 3,
onUse: function(attacker) {
if (attacker.traits.includes("Stance Master")) {
this.description = "While active, your first two weapon attacks have guaranteed Hits and adding +2 Dice to the damage, but you have a -15 to your Defense. Cost 3 Essence per turn to maintain your Stance. Only one Stance is permited per combat.";
this.descp_pt = "Enquanto ativo, seu primeiros dois ataque com arma tem um Acerto garantido e adiciona +2 Dados ao Dano de sua arma, mas você tem sua Defesa reduzida em -15. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate.";
}
if (!attacker.statusEffects.stance && !attacker.statusEffects.stance.active === true) {
attacker.statusEffects.stance = {
active: true,
type: "Lunging"
}
} else {
attacker.currentEssence += 3
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is already in an stance.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} já está em uma postura.`);
}
}
}
})
var ScopingStance = createSkill("Scoping Stance",{
name_pt: "Postura de Escopo",
descp_pt: "Enquanto ativo, seus ataques armados de Longa Distância adicionam +25 a Chance de acerto, mas ataques não podem mais causar dano crítico. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate",
description: "While active, your Ranged weapon strikes have +25 to the Hit-Chance, but strikes can no longer deal critical damage. Costs 3 Essênce per turn to keep your Stance. Only one Stance is permitted per combat.",
categories: ["Technique", "Stance", "General"],
APCost: 0,
Manacost: 3,
onUse: function(attacker) {
if (attacker.traits.includes("Stance Master")) {
this.description = "While active, your Ranged weapon strikes have +25 to the Hit-Chance. Costs 3 Essênce per turn to keep your Stance. Only one Stance is permitted per combat.";
this.descp_pt = "Enquanto ativo, seus ataques armados de Longa Distância adicionam +25 a Chance de acerto. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate";
}
if (!attacker.statusEffects.stance && !attacker.statusEffects.stance.active === true) {
attacker.statusEffects.stance = {
active: true,
type: "Scoping"
}
} else {
attacker.currentEssence += 3
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is already in an stance.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} já está em uma postura.`);
}
}
}
})
var defensiveStance = createSkill("Defensive Stance",{
name_pt: "Postura Defensiva",
descp_pt: "Enquanto ativo, você recebe +15 de Defesa, mas seus ataques armados recebem -15 de Chance de Acerto. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate",
description: "While active, your receive +15 Defense, but your armed strikes have -15 to Hit Chance. Costs 3 Essênce per turn to keep your Stance. Only one Stance is permitted per combat.",
categories: ["Technique", "Stance", "Defensive"],
APCost: 0,
Manacost: 3,
onUse: function(attacker) {
if (attacker.traits.includes("Stance Master")) {
this.description = "While active, your receive +15 Defense, but your armed srtikes have -15 to Hit Chance, while equipped with a Shield, you gain permanent Riposte during the Combat. Only one Stance is permitted per combat.";
this.descp_pt = "Enquanto ativo, você recebe +15 de Defesa, mas seus ataques armados recebem -15 de Chance de Acerto, enquanto equipado com um Escudo, você têm Resposta permanente durante o Combate. Custa 3 Essência por turno para manter sua Postura. Apenas uma Postura é permitida por combate";
}
if (!attacker.statusEffects.stance && !attacker.statusEffects.stance.active === true) {
attacker.statusEffects.stance = {
active: true,
type: "Defensive"
}
} else {
attacker.currentEssence += 3
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is already in an stance.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} já está em uma postura.`);
}
}
}
})
var heavyStrike = createSkill("Heavy Strike", {
name_pt: "Golpe Pesado",
desc_pt: "Faça um ataque com arma principal contra um inimigo com uma penalidade de -15, em um acerto, causa 250% do dano da arma. [Requer uma arma de combate corpo a corpo]",
description: "Make a weapon attack with your mainhand against an enemy with -15 penalty, on a hit, deal 250% of the weapon's damage. [Requires a Melee weapon]",
categories: ["Technique", "Melee", "Offensive"],
APCost: 2,
cooldown: 5,
onUse: function(attacker, target) {
if (attacker.equipment.mainhand.Type.includes("melee")) {
attacker.additionalHitChance -= 15;
let attackHits = calculateHitChance(attacker, target, attacker.equipment.mainhand);
const slot = attacker.equipment.mainhand;
if (attackHits) {
let damage = Math.round((calculateDamage(attacker, target, slot) * 2.5));
applyDamage(attacker, target, damage, attacker.equipment.mainhand);
}
attacker.additionalHitChance += 15;
} else {
attacker.AP += this.APCost;
this.inCooldown = 0
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
});
var bite = createSkill("Bite", {
name_pt: "Mordida",
desc_pt: "Morda um inimigo, o que é rude e anti-higiênico. Mas, causa 1d6 de dano com chance de causar dano extra. Quando abaixo de 50% de sua Força Vital, se cure por metade do dano causaso. Nos níveis 5, 10 e 15, aumente o Dado em um passo.",
description: "Bite off a enemy, which is rude and unhegienic. But, it deal 1d6 of damage with a chance to deal extra damage. When below 50% of your Lifeblood, heal yourself by half of the damage dealt. At level 5, 10 and 15, increase the damage Dice by 1 step.",
categories: ["Technique", "Melee", "Offensive"],
APCost: 1,
cooldown: 3,
onUse: function(attacker, target) {
const critvalue = rollDice('1d20');
let damage = 0
if (attacker.level < 5) {
damage += rollDice('1d6')
} else if (attacker.level >= 5 && attacker.level < 10) {
damage += rollDice('1d8')
} else if (attacker.level >= 10 && attacker.level < 15) {
damage += rollDice('1d10')
} else {
damage += rollDice('1d12')
}
damage+ attacker.additionalDamage + Math.max(Math.round(attacker.DEX / 3), Math.round(attacker.STR / 3));;
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (critvalue >= 18) {
damage *= 2
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} performs a ferocious Bite!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} realiza uma feroz Mordida!`);
}
}
target.currentLife -= damage;
if (attacker.currentLife <= Math.round((attacker.MAXLIFE * 0.5))) {
let healing = Math.round((damage * 0.5));
if (attacker.traits.includes("Battle-Medic")) {
healing += 5
}
attacker.currentLife += healing
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name}'s bite damages ${target.Name} by ${damage}. The strike also healed ${attacker.Name} by ${healing}`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`A mordida de ${attacker.Name_pt} causa à ${target.Name_pt} ${damage} de Dano. O golpe curou ${attacker.Name_pt} por ${healing}`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name}'s bite damages ${target.Name} by ${damage}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`A mordida de ${attacker.Name_pt} causa à ${target.Name_pt} ${damage} de dano.`);
}
}
if (attacker.traits.includes("Venomous")) {
target.statusEffects.poison += 6;
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} got Poisoned(6) due to the bite.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${target.Name_pt} foi Envenenado(6) devido a mordida.`);
}
} else {
tarte.statusEffects.bleed += 3;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} opens a wound. ${target.Name} now Bleeds for 3 turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} abre uma ferida. ${target.Name_pt} agora Sangra por 3 turns.`);
}
}
}
});
var quickFix = createSkill("Quick Fix", {
name_pt: "Tratamento Rápido",
desc_pt: `Rapidamente cuide de seus ferimentos, curando 2d10 de Força Vital. Caso sobre-cure, ganhe o valor extra como <b>Sangramento</b>.`,
description: `Quicly tend to your wounds, healing 2d10 of Lifeblood. In case your overheal, gain the extra amount as <b>Bleeding</b>.`,
categories: ["Technique", "Healing", "Defensive"],
APCost: 1,
cooldown: 10,
onUse: function(attacker) {
let healing = rollDice('2d10')
if (attacker.traits.includes("Battle-Medic")) {
healing += 5
}
const bleedtext = ``;
attacker.currentLife += healing
if (attacker.currentLife > attacker.MAXLIFE) {
let bleedamount = attacker.currentLife - attacker.MAXLIFE
bleedtext = `But, the healing was so effective, that start to bleed for ${bleedamount} turns.`;
attacker.statusEffects.bleed += bleedamount
attacker.currentLife = attacker.MAXLIFE
}
addToBattleLog(`${attacker.Name} tends to their wounds, healing ${healing} of its Lifeblood back. ${bleedtext}`)
}
})
var rend = createSkill("Rend", {
name_pt: "Rasgar",
desc_pt: "Faça um ataque armado contra um inimigo com sua arma principal, então faça-o sangrar por 3/4/5 turnos, dependendo da arma. Se o alvo já estiver sangrando, dobre a duração dele.",
description: "Make a weapon strike against an enemy with your mainhand, then make it bleed for 3/4/5 turns, depending on the weapon. If the target is already bleeding, double it's duration instead.",
categories: ["Technique", "Melee", "Offensive"],
APCost: 1,
cooldown: 4,
onUse: function(attacker, target) {
if (attacker.equipment.mainhand.Type.includes("melee")) {
let bleedvalue = 0;
let attackHits = calculateHitChance(attacker, target, attacker.equipment.mainhand); // Pass mainhand item to calculateHitChance
attacker.AP -= 1;
if (attackHits > 0) {
let damage = calculateDamage(attacker, target, attacker.equipment.mainhand); // Pass mainhand item to calculateDamage
applyDamage(attacker, target, damage, attacker.equipment.mainhand);
if (attacker.equipment.mainhand.Type.includes("Slashing")) {
bleedvalue = 5;
} else if (attacker.equipment.mainhand.Type.includes("Piercing")) {
bleedvalue = 4;
} else {
bleedvalue = 3;
}
if (target.statusEffects.bleeding > 0) {
if (attacker.equipment.mainhand.Type.includes("Slashing")) {
bleedvalue = 10;
} else if (attacker.equipment.mainhand.Type.includes("Piercing")) {
bleedvalue = 8;
} else {
bleedvalue = 6;
}
} else {
target.statusEffects.bleeding += bleedvalue;
}
updatePlayerDetails();
updateEnemyDetails();
if (State.variables.language === "EN") {
addToBattleLog(`Blood splashes from ${attacker.Name}'s strike. ${target.Name} will Bleed for ${bleedvalue} turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Sangue espirra do golpe de ${attacker.Name_pt}. ${target.Name_pt} irá Sangrar por ${bleedvalue} turnos.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} missed... somehow.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} errou... de alguma forma.`);
}
}
} else {
attacker.AP += 2
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
})
var drain = createSkill("Drain", {
name_pt: "Drenar",
desc_pt: "Drene 7% da Força Vital do alvo, se o alvo estiver sangrando, drene mais 7%.",
description: "Drain 7% of the target's Lifeblood, if the target is bleeding, drain 7% more.",
categories: ["Technique", "Melee", "Offensive", "Vampyr", "Healing"],
APCost: 1,
cooldown: 8,
onUse: function(attacker, target) {
let value = Math.round((target.MAXLIFE * 0.75))
if (target.statusEffects.bleeding > 0){
value *= 2
}
if (attacker.traits.includes("Battle-Medic")) {
value += 5
}
target.currentLife -= value;
attacker.currentLife += value;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} drains ${value} of blood from ${target.Name}'s Lifeblood.`)
}else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} drena ${value} de sangue da Força Vital de ${target.Name}.`)
}
}
});
var ThirstforBlood = createSkill("Thirst for Blood", {
name_pt: "Sede de Sangue",
desc_pt: "Seus próximos 4 ataques com armas corpo a corpo causam um dano adicional de 1d4 e curam você em 30% do dano causado. Se desarmado, aumente o dano em mais 1d4.",
description: "Your next 4 melee weapon strikes deal an additional 1d4 of damage and heal you for 30% of the damage dealt. If unnarmed, increase the damage by an additional 1d4.",
categories: ["Technique", "Melee", "General", "Vampyr", "Buff", "Healing"],
APCost: 1,
cooldonw: 10,
onUse: function (attacker) {
attacker.statusEffects.improvedAttacks += 4;
attacker.statusEffects.thirstbuff = true;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} gives in to their bloodlust`);
}else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} concede para sua sede de sangue.`);
}
}
})
//Make it bleed.
//Apply bleeding to a target for 10 turns.
//Enssanguinate
//Convert all status effects on self into bleeding.
var enssanguinate = createSkill("Enssanguinate", {
name_pt: "Enssanguinar",
desc_pt: "Converta todos os efeitos de status que você está sofrendo em Sangramento.",
description: "Convert all status effects you are being afflicted with into Bleeding.",
categories: ["Technique", "General", "Debuff"],
APCost: 0,
Manacost: 7,
cooldown: 7,
onUse: function(attacker) {
let bleedingamount = 0
if (attacker.statusEffects.burning.duration > 0) {
bleedingamount += attacker.statusEffects.burning.duration
attacker.statusEffects.burning.duration = 0
}
if (attacker.statusEffects.poison > 0) {
bleedingamount += attacker.statusEffects.poison
attacker.statusEffects.poison = 0
}
if (attacker.statusEffects.confused > 0) {
bleedingamount += attacker.statusEffects.confused
attacker.statusEffects.confused = 0
}
if (attacker.statusEffects.stun > 0) {
bleedingamount += attacker.statusEffects.stun
attacker.statusEffects.stun = 0
}
attacker.statusEffects.bleed += bleedingamount;
window.updatePlayerDetails()
}
});
//Intimidate
//Reduce the target damage and hitchance by 10. S
var intimidate = createSkill("Intimidate", {
name_pt: "Intimidar",
desc_pt: "Intimide todos os inimigos.",
description: "Intimidate all enemies.",
categories: ["Technique", "General", "Combat Test", "Debuff"],
APCost: 1,
cooldown: 7,
onUse: function(attacker) {
let intimidatingquotes = [
"I WILL KILL YOU!",
"GIVE ME YOUR BONES!",
"PREPARE TO DIE!",
"I'll break you in half!",
"I will enjoy squashing you!",
"DIE!",
"Surrender or perish!",
"Boo!",
"Let me teach you a lesson!",
"I'm going to make omelette with your balls!",
"I'm going to fuck you up!",
"I am going to bang your corpse!",
"YOUR FINGERS LOOK TASTY!",
"HAHAHAHAHAHAHAH! HAHAHAHaHA!",
"Time to die!",
"Weaklings!",
"I enjoy killing worms like you!",
"This is too easy!",
"[Inser here intimidating quote]",
"*Gibberish*",
];
let intimidação = [
"EU VOU MATAR VOCÊ!",
"Me DÊ SEUS OSSOS!",
"SE PREPARE PARA MORRER!",
"Eu vou quebrar você ao meio!",
"Eu vou adorar esmagar você!",
"MORRA!",
"Desista ou pereça",
"Boo!",
"Deixe-me lhe ensinar uma lição",
"Eu vou fazer uma omelete com suas bolas",
"Eu vou te fuder todo!",
"Eu vou trepar com seu corpo!",
"SEUS DEDOS PARECEM GOSTOSOS!",
"HAHAHAHAHAHAHAH! HAHAHAHAHA!",
"Hora de morrer!",
"Fracotes!",
"Eu vou adorar matar vermes como você!",
"Isso é muito fácil!",
"[Insira aqui uma frase inimidadora]",
"*Algaraviada*",
];
let test = 10;
let number = [Math.floor(Math.random() * intimidatingquotes.lentgh)];
let dices = ['1d6', '1d6']
if (attacker.trait.includes("Gambler")) {
dices = ['1d4', '1d10']
} else if (attacker.trait.includes("Novice")) {
dices = ['1d8', '1d6']
} else if (attacker.trait.includes("Expert")) {
dices = ['1d10', '1d8']
} else if (attacker.trait.includes("Master")) {
dices = ['1d12', '1d12']
}
let result = rollDice(dices[1]) + rollDice(dices[2]) + attacker.Speech;
if (State.variables.arena === true) {
result += Math.round(((attacker.level + 4) / 2))
}
if (attacker.traits.includes("Winning Smile") && result < 10) {
result += Math.round((attacker.CHA / 3))
}
if (attacker.traits.includes("Jack-of-All-Trades")) {
if (attacker.level >= 7 && attacker.level < 15) {
result += 4
} else if (attacker.level >= 15) {
result += 6
} else {
result += 2
}
}
if (attacker.traits.includes("Hidden Machinations")) {
result += rollice('1d6');
}
if (attacker === State.variables.character[1]) {
let value = 7
if (State.variables.difficulty === "easy") {
value = 5
} else if (State.variables.difficulty === "hard") {
value = 10
}
if (State.variables.language === "EN") {
addToBattleLog(`<b>${attacker.Name}:</b> ${intimidatingquotes[number]}!`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`<b>${attacker.Name_pt}:</b> ${intimidação[number]}!`)
}
State.variables.enemyInstances.forEach(enemy => {
test = value + Math.round((enemy.level / 2)) + Math.round((enemy.RES / 3));
if (result > test) {
enemy.additionalDamage -= attacker.Intimidation;
enemy.additionalHitChance -= attacker.Intimidation;
enemy.statusEffects.intimidated = 4;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} intimidates ${enemy.Name}, reducing their Hit Chance and Damage by ${attacker.Intimidation} for 4 turns.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} intimida ${enemy.Name_pt}, reduzindo sua Chance de Acerto e Dano em ${attacker.Intimidation} por 4 turnos.`)
}
} else {
enemy.additionalDamage -= Math.round((attacker.Intimidation /2));
enemy.additionalHitChance -= Math.round((attacker.Intimidation /2));
enemy.statusEffects.intimidated = 2;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} tries to intimidates ${enemy.Name}, reducing their Hit Chance and Damage by only ${Math.round((attacker.Intimidation /2))} for 2 turns.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} tenta intimidar ${enemy.Name_pt}, reduzindo sua Chance de Acerto e Dano em apenas ${Math.round((attacker.Intimidation /2))} por 2 turnos.`)
}
}
})
} else {
result += Math.round((attacker.level / 2))
test += Math.round((State.variables.character[1].RES / 3))
if (result > test) {
State.variables.character[1].additionalDamage -= attacker.CHA + 3
State.variables.character[1].additionalHitChance -= attacker.CHA + 3
State.variables.character[1].statusEffects.intimidated = { time: 4,
value: attacker.CHA,
};
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} intimidates ${State.variables.character[1].Name}, reducing their Hit Chance and Damage by ${attacker.CHA + 3} for 4 turns.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} intimida ${State.variables.character[1].Name_pt}, reduzindo sua Chance de Acerto e Dano em ${attacker.CHA + 3} por 4 turnos.`)
}
} else {
State.variables.character[1].additionalDamage -= Math.round(((attacker.CHA + 3) / 2))
State.variables.character[1].additionalHitChance -= Math.round(((attacker.CHA + 3) / 2))
State.variables.character[1].statusEffects.intimidated = { time: 2,
value: Math.round(((attacker.CHA + 3) / 2)),
};
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} tries to intimidates ${State.variables.character[1].Name}, reducing their Hit Chance and Damage by only ${Math.round(((attacker.CHA + 3) /2))} for 2 turns.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} tenta intimidar ${State.variables.character[1].Name_pt}, reduzindo sua Chance de Acerto e Dano em apenas ${Math.round(((attacker.CHA + 3) /2))} por 2 turnos.`)
}
}
}
}
})
//Heabutt
//Stun and confuse an enemy, 2AP
var headbutt = createSkill("Heabutt", {
name_pt: "Cabeçada",
desc_pt: "Bata sua cabeça com a cabeça de outro combatente. Pode te machucar em 3% do seu Sangue Vital atual, mas irá atordoar e confundir a outra parte.",
description: "Bash your head with another combatent's head. It may hurt you for 3% of your current Lifeblood, but it will stun and confuse the other part.",
categories: ["Technique", "Defensive"],
APCost: 2,
cooldown: 4,
onUse: function(attacker, target) {
attacker.currentLife -= Math.round((attacker.MAXLIFE * 0.03));
target.currentLife -= attacker.STR + Math.round((attacker.MAXLIFE * 0.03));
target.statusEffects.stun += 1;
target.statusEffects.confused += 2;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} heabutts ${target.Name}, damaging them for ${attacker.STR + Math.round((attacker.MAXLIFE * 0.03))}, stunning and Confusing them for 2 turns.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} manda uma Cabeçada contra ${target.Name_pt}, os danificando por ${attacker.STR + Math.round((attacker.MAXLIFE * 0.03))} dano Atordoando e Confudindo ele por 2 turnos.`)
}
}
});
//Dodge
//Increase your defense by 20, AP 1 turn.
var dodge = createSkill("Dodge", {
name_pt: "Esquiva",
desc_pt: "Esquive-se do próximo ataque.",
description: "Dodge the next attack.",
categories: ["Technique", "Defensive"],
APCost: 2,
cooldown: 3,
onUse: function(attacker) {
attacker.additionalDefense += 40;
attacker.statusEffects.dodge = true;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} prepares themselves to dodge the next strike.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} se prepara para desviar do próximo ataque.`)
}
}
});
var sneak = createSkill("Sneak", {
name_pt: "Furtividade",
desc_pt: "Fique oculto.",
description: "Become hidden.",
categories: ["Technique", "Defensive"],
APCost: 2,
cooldown: 5,
onUse: function(attacker) {
attacker.statusEffects.hidden = true
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} hides themselves midst the shadows.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} se esconde entre as sombras.`)
}
}
});
var trueStrike = createSkill("True Strike", {
desc_pt: "Realize um ataque armado garantido contra um inimigo. A partir do nível 5, adicione 1d10 ao dano.",
name_pt: "Golpe Verdadeiro",
description: "Make a guaranteed strike against an enemy. Starting at level 5, add 1d10 to the damage",
categories: ["Technique", "Offensive"],
APCost: 2,
learned: false,
cooldown: 7,
onUse: function(attacker, target) {
let damage = rollDice('1d10');
if (attacker.level >= 5) {
attacker.additionalDamage += damage;
}
if (attacker.statusEffects.confused) {
attacker.additionalHitChance -= 100;
} else {
attacker.additionalHitChance += 100;
}
attacker.statusEffects.trueStrike = true;
const slot = attacker.equipment.mainhand;
if (slot.Type.includes("1-handed")) {
attacker.AP++
} else if (slot.Type.includes("2-handed")) {
attacker.AP += 2
}
windows.triggerAttack(attacker, target, slot);
attacker.statusEffects.trueStrike = false;
if (attacker.statusEffects.confused) {
attacker.additionalHitChance += 100;
} else {
attacker.additionalHitChance -= 100;
}
}
});
var disarm = createSkill("Disarm", {
name_pt: "Desarmar",
desc_pt: "Desarme seu oponente.",
description: "Disarms your opponnent.",
categories: ["Technique", "Offensive", "Debuff"],
APCost: 2,
cooldown: 7,
onUse: function(attacker, target) {
let dicevalue = rollDice('2d6')
let stealChance = dicevalue > 20 - attacker.SleightofHands
let thing = target.equipment.mainhand ;
if (target.equipment.mainhand.Name === "Arcane Blade") {
attacker.AP += 1;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} fais to disarm the ${thing.Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} falha em desarmar a ${thing.Name_pt}.`)
}
} else if (!target.equipment.mainhand.Type.includes("bornwith")) {
if (target.equipment.mainhand.Type.includes("2-handed")) {
target.equipment.offhand = State.variables.Items.otherhand;
}
if (target.ancestry === "Draconian") {
target.equipment.mainhand = State.variables.Items["Draconian Claws"];
} else {
target.equipment.mainhand = State.variables.Items.Fist
}
if (attacker.traits.includes("Deep Pockets") && stealChance) {
addItemToInventory(thing.Name)
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} snatched ${target.Name}'s ${thing.Name} from their hand.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} agarra a ${thing.Name_pt} ${target.Name} de suas mãos.`)
}
} else {
target.statusEffects.disarmedItem = thing
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} disarmed ${target.Name}'s ${thing.Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} desarma a ${thing.Name_pt} de ${target.Name_pt}.`)}
}
} else {
attacker.AP += 2;
this.inCooldown = 0;
if (State.variables.language === "EN") {
addToBattleLog(`There was nothing to disarm. No, you can't disarm someone else's arms.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Não ha nada para desarmar. Não, você não pode desarmar o braço de alguém.`)
}
}
}
})
//Bribe: Spend gold equal to the target's current Life, and make a Speech test, on a success, the target is removed from combat. Does not work on Bosses.
var bribe = createSkill("Bribe", {
name_pt: "Suborno",
desc_pt: `Tente subornar um inimigo, perdendo uma quantidade de ouro igual ao sua Força Vital atual. (${State.variables.character[1].Gold})`,
description: `Attempt to bribe an enemy, loosing an amount of gold equal to it's current Lifeblood. (${State.variables.character[1].Gold})`,
categories: ["Crime", "Combat Test", "Offensive"],
APCost: 1,
onUse: function(attacker, target) {
if (target.Ancestry !== "Vampyre" || target.Ancestry !== "Beast" || target.Ancestry !== "Undead" || target.Ancestry !== "Construct" || target.Ancestry !== "Daemon" ||target.Ancestry !== "Dragon" ||target.Ancestry !== "Orc" || target.Ancestry !== "Ogre") {
if (attacker.gold >= target.currentLife) {
attacker.gold -= target.currentLife
let value = 7
if (State.variables.difficulty === "easy") {
value = 5
} else if (State.variables.difficulty === "hard") {
value = 10
}
let dices = ['1d6', '1d6']
if (attacker.trait.includes("Gambler")) {
dices = ['1d4', '1d10']
} else if (attacker.trait.includes("Novice")) {
dices = ['1d8', '1d6']
} else if (attacker.trait.includes("Expert")) {
dices = ['1d10', '1d8']
} else if (attacker.trait.includes("Master")) {
dices = ['1d12', '1d12']
}
let result = rollDice(dices[1]) + rollDice(dices[2]) + attacker.Speech;
if (attacker.traits.includes("Winning Smile") && result < 10) {
result += Math.round((attacker.CHA / 3))
}
if (attacker.traits.includes("Jack-of-All-Trades")) {
if (attacker.level >= 7 && attacker.level < 15) {
result += 4
} else if (attacker.level >= 15) {
result += 6
} else {
result += 2
}
}
if (attacker.traits.includes("Silver Tongue")) {
result += 3 + attacker.level
}
if (attacker.traits.includes("Hidden Machinations")) {
result += rollice('1d6');
}
let test = value + Math.round((target.level / 2)) + Math.round((target.RES / 3));
if (result >= test) {
let enemies = State.variables.enemyInstances
const index = enemies.indexOF(target);
if (index !== -1) {
enemies.splice(index, 1)
}
if (State.variables.language === "EN") {
addToBattleLog(`With you handing over your money, ${target.Name} hold their part of the deal and get off.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Com você passando seu dinheiro, ${target.Name_pt} cumpre sua parte do acordo e se manda.`)
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`Now that you handed over your money... ${target.Name} decides to continue to kill of you. What a nice fella.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Agora que você passa seu dinheiro... ${target.Name_pt} decide continuar a te matar. Que pessoa legal..`)
}
}
} else {
attacker.AP += 1
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} does not have enough gold.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} não têm ouro suficiente.`)
}
}
} else {
attacker.AP += 1
if (State.variables.language === "EN") {
addToBattleLog(`Invalid target. ${target.Name} does not care for gold.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Alvo inválido. ${target.Name_pt} Não se importa com dinheiro.`)
}
}
}
})
//Call of the Hunt: Summon a enemy of your group, of level up to half of your own (Goblins summon Goblins, Wolfs summon Wild Wolf, Humans summon either a Hired Muscle or Hired Spellcaster)
//Pack Tactics: Make each ally attack the player
//Vanguard
var bash = createSkill("Bash", {
name_pt: "Pancada",
desc_pt: "Golpeie um inimigo, aplicando Confusão. Se estiver empunhando um escudo, Atordoe-o, e danifique o alvo por sua Defesa.",
description: "Smack an enemy, applying Confuson on an enemy. If you are wielding a shield, Stun it, instead, and damage the target by its Defense.",
categories: ["Technique", "Melee", "Offensive"],
APCost: 1,
learned: false,
cooldown: 1,
onUse: function(attacker, target) {
// If attacker is wielding a shield, damage the target by its defense bonus
if (attacker.equipment.offhand && attacker.equipment.offhand.Type.includes("Shield")) {
target.statusEffects.stun += 1;
let damage = attacker.equipment.offhand.Defense;
target.currentLife -= damage;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} bashed ${target.Name}, dealing ${damage} damage.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} manda uma Pancada contra ${target.Name_pt}, causando ${damage} de dano.`);
}
} else {
target.statusEffects.confusion += 1;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} used Bash on ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} manda uma Pancada contra ${target.Name_pt}.`);
}
}
// Log skill usage
// Set skill in cooldown
this.inCooldown = this.cooldown;
}
});
//Shields up: Increase your defense by 5, If you are wielding a Shield, increase it by 10, instead. this bonus last until the end of the battle. (Can only be used once per battle)
var shieldsUp = createSkill("Shields Up", {
name_pt: "Erguer o Escudo",
description: "Increase your defense by 10. If you are wielding a Shield, double the amount, instead. This bonus lasts until the end of the battle. (Can only be used once per battle)",
desc_pt: "Aumenta sua defesa em 10. Se estiver empunhando um Escudo, dobre o valor, em vez disso. Este bônus dura até o final da batalha. (Pode ser usado apenas uma vez por batalha)",
categories: ["Technique", "Melee", "Defensive"],
APCost: 2,
learned: false,
cooldown: 99,
onUse: function(attacker) {
// Check if the skill is not already in cooldown
if (this.inCooldown === 0 && !attacker.statusEffects.shieldUpused) {
// Increase defense based on shield presence
let defenseBonus = 10;
if (attacker.equipment.offhand && attacker.equipment.offhand.Type.includes("Shield")) {
defenseBonus = 20;
}
// Apply defense bonus
attacker.additionalDefense += defenseBonus;
shieldUpused === true;
// Log skill usage
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} Shields Up, increasing their defense by ${defenseBonus}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} Ergue seu Escudo, aumentando suas Defesas por ${defenseBonus}.`);
}
// Set skill in cooldown
this.inCooldown = this.cooldown;
} else {
attacker.AP++
addToBattleLog("Shields Up can only be used once per battle.");
}
}
});
//Archer
//powershot: Expend all AP, roll damage for each point expent
var powerShot = createSkill("Power Shot", {
name_pt: "Disparo Poderoso",
desc_pt: "Gaste todos os Pontos de Ação restantes, para cada ponto gasto, role o dano de uma de suas arma contra um alvo, e então coloque a arma em recarga. [Requer: Arma de Longo Alcance]",
description: "Expend all remaining Action Points, for each expent point, roll damage of one your weapons for each, then place the weapon on cooldown. [Require: Ranged Weapon]",
categories: ["Technique", "Ranged", "Offensive"],
APCost: 0,
cooldown: 5,
onUse: function (attacker, target) {
if (attacker.equipment.mainhand.Type.includes("ranged") || attacker.equipment.offhand.Type.includes("ranged")) {
const weapon = attacker.equipment.mainhand
if (attacker.equipment.mainhand.Type.includes("ranged")) {
weapon = attacker.equipment.mainhand
} else if (attacker.equipment.offhand.Type.includes("ranged")) {
weapon = attacker.equipment.offhand
}
let damage = 0
for (let i = attacker.AP; i > 0; i--) {
damage += calculateDamage(attacker, target, weapon);
}
applyDamage(attacker, target, damage, attacker.equipment.mainhand);
weapon.incooldown = weapon.Cooldown;
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
})
var quickShot = createSkill("Quick Shot", {
name_pt: "Tiro Rápido",
desc_pt: "Com pressa, você carrega e dispara um projétil de uma de suas armas, realizando um ataque armado em uma única ação. [Requer: Arma de Longo Alcance]",
description: "With haste, you load and release a bolt from one of your weapons, making a weapon attackn in a single action. [Require: Ranged Weapon]",
categories: ["Technique", "Ranged", "Offensive"],
duration: 0,
APCost: 1,
Manacost: 0,
cooldown: 1,
learned: false,
inCooldown: 0,
onUse: function (attacker, target) {
if (attacker.equipment.mainhand.Type.includes("ranged") || attacker.equipment.offhand.Type.includes("ranged")) {
const weapon = attacker.equipment.mainhand
if (attacker.equipment.mainhand.Type.includes("ranged")) {
weapon = attacker.equipment.mainhand
} else if (attacker.equipment.offhand.Type.includes("ranged")) {
weapon = attacker.equipment.offhand
}
attacker.additionalHitChance -= 15;
let attackHits = calculateHitChance(attacker, target, weapon); // Pass mainhand item to calculateHitChance
attacker.AP -= 1;
if (attackHits > 0) {
let damage = calculateDamage(attacker, target, weapon); // Pass mainhand item to calculateDamage
applyDamage(attacker, target, damage, weapon);
updatePlayerDetails();
updateEnemyDetails();
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} missed, perhaps they should work on improving their aiming...`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} missed, perhaps they should work on improving their aiming...`);
}
}
attacker.additionalHitChance += 15;
} else {
attacker.AP++
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
});
var tripleShot = createSkill("Triple Shot", {
name_pt: "Triplo Disparo",
desc_pt: "Faça três ataques armado de longo alcance contra um único inimigo com sua mão principal. Cada disparo têm -10 de Chance de Acerto [Requer: Arma de Longo Alcance]",
description: "Make three ranged weapon attacks against a single enemy with your mainhand. Each shot has -10 Hit Chance [Require: Ranged Weapon]",
categories: ["Technique", "Ranged", "Offensive"],
APCost: 3,
Manacost: 0,
learned: false,
cooldown: 5,
onUse: function (attacker, target, slot) {
if (attacker.AP >= this.APCost && attacker.equipment.mainhand.Type.includes("ranged")) {
attacker.additionalHitChance -= 15;
for (let i = 0; i < 3; i++) {
let hit = calculateHitChance(attacker, target, attacker.equipment.mainhand)
if (hit) {
let damage = calculateDamage(attacker, target, attacker.equipment.mainhand);
applyDamage(attacker, target, damage, attacker.equipment.mainhand);
} else {
if (State.variables.language === "EN") {
addToBattleLog(`A miss agains ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Um erro contra ${target.Name_pt}.`);
}
}
}
attacker.additionalHitChance += 15;
} else {
attacker.AP +=2
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
});
// Arrow Barrage: For each enemy, make a ranged attack against it.
var arrowBarrage = createSkill("Arrow Barrage", {
name_pt: "Barragem de Flechas",
desc_pt: "Para cada inimigo, faça um ataque armado de longo alcance contra um inimigo alátorio. A partir do nível 10, faça dois ataques armados por inimigo.",
description: "For each enemy, make a ranged attack against a random enemy. Startign at level 10, make 2 weapon attacks for each enemy.",
categories: ["Technique", "Ranged", "Offensive", "AOE"],
APCost: 4,
learned: false,
Manacost: 0,
cooldown: 8,
incooldown: 0,
onUse: function(attacker) {
if (attacker.AP >= this.APCost && attacker.equipment.mainhand.Type.includes("ranged")) {
let enemyInstances = State.variables.enemyInstances;
for (let i = 0; i < enemyInstances.length; i++) {
let target = enemyInstances[Math.floor(Math.random() * enemyInstances.length)];
let hitchance = calculateHitChance(attacker, target, attacker.equipment.mainhand);
let damage = 0;
if (hitchance) {
damage += calculateDamage(attacker, target, damage, attacker.equipment.mainhand);
applyDamage(attacker, target, damage, attacker.equipment.mainhand);
if (attacker.level >= 10) {
// Make two weapon attacks for each enemy if attacker's level is at least 10
for (let j = 0; j < 2; j++) {
damage = 0;
if (hitchance) {
damage += calculateDamage(attacker, target, attacker.equipment.mainhand);
applyDamage(attacker, target, damage, damage, attacker.equipment.mainhand);
}
}
}
}
}
this.inCooldown = this.cooldown;
} else {
attacker.AP +=3
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
});
//Duelist
var feint = createSkill("Feint", {
name_pt: "Finta",
desc_pt: "Um movimento para enganar os inimigos em sua derrota: Aumenta sua defesa em 10 e ativa a Riposte. [Requer uma arma de combate corpo a corpo]",
description: "A maneuver to trick the enemies into their defeat: Increase your defense by 10 and activate Riposte. [Requires a Melee weapon]",
categories: ["Technique", "Melee", "Defensive"],
buff: ["Defense"],
duration: 2,
APCost: 1,
Manacost: 0,
cooldown: 3,
inCooldown: 0,
learned: false,
onUse: function (attacker) {
if (this.inCooldown === 0 && attacker.equipment.mainhand.Type.includes("melee")) {
if (attacker.AP >= this.APCost) {
attacker.additionalDefense += 10;
attacker.statusEffects.riposte = true;
attacker.statusEffects.feintDuration = 1;
this.inCooldown = this.cooldown
}
} else {
attacker.AP++
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
});
var enGarde = createSkill("En Garde!", {
name_pt: "En Garde!",
desc_pt: "Faça um ataque armado com uma arma corpo a corpo, então ganhe Riposte. Nos níveis 5 e 10, aumente sua Chance de Acerto nesse ataque em 15.",
description: "Make a weapon attack with a melee weapon, then gain Riposte.",
categories: ["Technique", "Melee", "Offensive"],
APCost: 2,
learned: false,
cooldown: 2,
Manacost: 0,
incooldown: 0,
onUse: function(attacker, target) {
if (attacker.AP >= this.APCost) {
if (attacker.level >=5) {
attacker.additionalHitChance += 15
}
if (attacker.level > 10) {
attacker.additionalHitChance += 15
}
let slot = attacker.equipment.mainhand;
let hitchance = calculateHitChance(attacker, target, slot)
if (hitchance) {
let damage = calculateDamage(attacker, target, attacker.equipment.mainhand);
applyDamage(attacker, target, damage, slot);
// Apply Riposte
attacker.statusEffects.riposte = true;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} gained Riposte.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} ganhou Riposte.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} used En Garde! but missed ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} usou En Garde! Mas errou ${target.Name}.`);
}
}
if (attacker.level >=5) {
attacker.additionalHitChance -= 15
}
if (attacker.level > 10) {
attacker.additionalHitChance -= 15
}
this.inCooldown = this.cooldown;
} else {
attacker.AP += 2
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is equipped with a invalid weapon for this Skill.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está equipado com uma arma inválida para essa Habilidade.`);
}
}
}
});
// Disengage: Expend all your Action Points, for each you've expended, increase your Defense by 15 for 1 turn.
var disengage = createSkill("Disengage", {
name_pt: "Desengajar",
desc_pt: "Gaste todos os seus Pontos de Ação, para cada um que você gastou, aumente sua Defesa em 15 por 1 turno.",
description: "Expend all your Action Points, for each you've expended, increase your Defense by 15 for 1 turn.",
categories: ["Technique", "Melee", "Defensive"],
APCost: 0,
learned: false,
Manacost: 0,
incooldown: 0,
cooldown: 3,
onUse: function(attacker) {
let defenseBonus = attacker.AP * 15;
attacker.additionalDefense += defenseBonus;
attacker.statusEffects.disengageDuration = 1;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} used Disengage, increasing their Defense by ${defenseBonus} for 1 turn.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} usou Desengajar, aumentando sua Defesa por ${defenseBonus} por 1 turno.`);
}
// Consume all Action Points
attacker.AP = 0;
this.inCooldown = this.cooldown;
}
});
//Assassin
var backstab = createSkill("Backstab", {
name_pt: "Apunhalar",
desc_pt: `Faça um golpe armado contra um inimigo, causando 1d8 de Dano extra. Se <b>Escondido</b>, aumente o dano para 1d10, você não quebra seu status <b>Escondido</b>. Nos níveis 5, 10 e 15, aumente o número de Dados em 1.`,
description: `Make a weapon attack against an enemy, dealing extra 1d8 Damage. If <b>Hidden</b>, increase the damage to a 1d10, you don't loose the <b>Hidden</b> status. At level 5, 10 and 15, increase the number o Dices by 1.`,
categories: ["Technique", "Melee", "Offensive"],
APCost: 1,
learned: false,
Manacost: 0,
cooldown: 3,
onUse: function(attacker, target) {
let language = State.variables.language;
let damage = 0
let number = 1
let washidden = false
let dice = 8
if (attacker.level >= 5 && attacker.level < 10) {
number = 2
} else if (attacker.level >= 10 && attacker.level < 15) {
number = 3
} else if (attacker.level >= 15) {
number = 4
}
if (attacker.statusEffects.hidden === true) {
washidden = true;
dice += 2;
}
damage = rollDice(number + 'd' + dice)
attacker.additionalDamage += damage
window.triggerAttack(attacker, target, attacker.equipment.mainhand)
attacker.additionalDamage -= damage
if (washidden === true) {
attacker.statusEffects.hidden = true
if (language === "EN") {
addToBattleLog(`${attacker.Name} returns to the shadows.`);
} else if (language === "PT-BR") {
addToBattleLog(`${attacker.Name} retorna para as sombras.`);
}
}
}
});
var applyVenom = createSkill("Apply Venom", {
name_pt: "Aplicar Veneno",
desc_pt: "Seu próximo ataque armado aplicará Veneno(5). Se for uma arma de longo alcance, também reduza seu tempo de recarga em 1. Nos nívels 5 e 10, aumente o número de ataques que aplicam Veneno em 1.",
description: "Your next weapon attack will apply poison(5). If it's a ranged weapon, also reduce its cooldown by 1. At level 5 and 10, increase the number of attacks that apply poison by 1.",
categories: ["Technique", "General", "Buff", "Debuff"],
APCost: 1, // Corrected property name
cooldown: 2,
Manacost: 0,
inCooldown: 0, // Corrected property name
onUse: function(attacker) {
if (attacker.level < 5) {
attacker.statusEffects.improvedAttacks += 1;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} applied a vicious venom to their weapon. Their next weapon attack attack will cause Poison(5) against the target.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} aplicou um cruel veneo em sua arma. Seu próximo ataque armado irá aplicar Veneno(5) contra o alvo.`);
}
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.statusEffects.improvedAttacks += 2;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} applied a vicious venom to their weapon. Their next two weapon attack attack will cause Poison(5) against the target.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} aplicou um cruel veneo em sua arma. Seus próximos dois ataque armado irá aplicar Veneno(5) contra o alvo.`);
}
} else if (attacker.level >= 10) {
attacker.statusEffects.improvedAttacks += 3;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} applied a vicious venom to their weapon. Their next three weapon attack attack will cause Poison(5) against the target.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} aplicou um cruel veneo em sua arma. Seus próximos três ataque armado irá aplicar Veneno(5) contra o alvo.`);
}
}
attacker.statusEffects.applyVenom = true;
if (attacker.equipment.mainhand.Type.includes("Ranged")) {
reduceCooldown(attacker);
}
}
});
var venomAura = createSkill("Poisonous Gas", {
name_pt: "Bomba Venenosa",
desc_pt: "No inicio de seu Turno, aplique Veneno(3) para TODOS os combatetnts. Custa 3 de Essência para manter essa Habilidade ativada. Reconjurar essa habilidade a desativa.",
description: "At the start of your turn, apply Venom(3) to ALL combatents. Cost 3 Essence to keep this Skill active. Recasting this skill turns it off.",
categories: ["Technique", "AOE", "General", "Debuff"],
APCost: 0,
Manacost: 3,
cooldown: 1,
onUse: function(attacker) {
if (attacker.statusEffects.poisonGas && attacker.statusEffects.poisonGas = true) {
attacker.statusEffects.poisonGas = false;
} else {
attacker.statusEffects.poisonGas = true;
}
}
})
var poisonousBomb = createSkill("Poisonous Bomb", {
name_pt: "Bomba Venenosa",
desc_pt: "Aplica Veneno(10) a um inimigo e Veneno(5) a todos os outros inimigos. A partir do nível 10, dobre o Veneno aplicado.",
description: "Apply Venom(10) to an enemy and Venom(5) to all other enemies. Starting at level 10, double the applyed venom",
categories: ["Technique", "AOE", "Offensive", "Debuff"],
APCost: 2,
Manacost: 0,
cooldown: 8,
onUse: function(attacker, target) {
let value1 = 5
let value2 = 10
if (attacker.level >=10) {
value1 *= 2
value2 *= 2
}
if (attacker === State.variables.character[1]) {
State.variables.enemyInstances.forEach(function(enemy) {
if (enemy !== target) {
enemy.statusEffects.poison += value1;
} else {
enemy.statusEffects.poison += value2;
}
});
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} used Poisonous Bomb, applying Poison(${value2}) against ${target.Name} and Poison(${value1}) to all other enemies.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} usou Bomba Venenosa, aplicando Veneno(${value2}) contra ${target.Name_pt} e Veneno(${value1}) à todos os outros inimigos.`);
}
} else {
target.statusEffects.poison += value2
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} used Poisonous Bomb, applying Poison(${value2}) against ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} usou Bomba Venenosa, aplicando Poison(${value2}) conta ${target.Name_pt}.`);
}
}
});
var assassinate = createSkill("Assassinate", {
name_pt: "Assassinar",
description: "Kill an enemy under 30% of its maximum Lifeblood. You may target bosses if their Lifeblood is below 10%.",
desc_pt: "Mata um inimigo com menos de 30% de sua Força Vital máxima. Você pode mirar em chefes se sua Força Vital estiver abaixo de 10%.",
categories: ["Technique", "Offensive"],
APCost: 3,
Manacost: 0,
cooldown: 12,
onUse: function(attacker, target) {
if (target.currentLife <= 0) {
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} has already been defeated.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${target.Name_pt} já foi derrotado.`);
}
attacker.AP += 3;
return;
}
var healthThreshold = 0.3;
var bossHealthThreshold = 0.1;
if (target.isBoss && target.currentLife / target.MAXLIFE <= bossHealthThreshold) {
target.currentLife = 0;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} assassinated ${target.Name}!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} assassinou ${target.Name_pt}!`);
}
} else if (target.currentLife / target.MAXLIFE <= healthThreshold) {
target.currentLife = 0;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} assassinated ${target.Name}!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} assassinou ${target.Name_pt}!`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`Assassinate failed. ${target.Name} has too much Lifeblood.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Assassinato falhou. ${target.Name_pt} tem muita Força Vital.`);
}
}
}
});
//Thief
//Pickpocket: Steal from your opponent gold amount (cost 0 AP, cooldown: 6, categories: "Technique", "Offensive", "Crime")
var pickpocketSkill = createSkill("Pickpocket", {
name_pt: "Bater-carteira",
description: "Steal gold from your opponent's pocket.",
desc_pt: "Roube ouro do bolso de seu oponente.",
categories: ["Technique", "Offensive", "Crime"],
APCost: 0,
Manacost: 0,
cooldown: 6,
inCooldown: 0,
onUse: function(attacker, target) {
// Check if the skill is off cooldown
if (this.inCooldown <= 0) {
// Calculate stolen gold amount (replace this with your calculation logic)
if (target.Gold > 1) {
attacker.Gold += target.Gold;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} has successfully pickpocketed ${target.Gold} gold from ${target.name}!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} com sucesso roubou ${target.Gold} de ouro do bolso de ${target.name_pt}!`);
}
target.Gold = Math.round(target.Gold / 2);
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} doesn't have enough gold to steal.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${target.Name} não tem ouro o suficiente para roubar.`);
}
}
// Set cooldown for the skill
this.inCooldown = this.cooldown;
}
}
});
var stealEssence = createSkill("Steal Soul", {
name_pt: "Roubar Atributos",
desc_pt: "Roube a Defesa, Chance de Acerto e Dano do alvo.",
description: "Steal the target's Defense, Hit Chance and Damage.",
categories: ["Spell", "Offensive", "Crime", "Buff", "Debuff"],
APCost: 2,
Manacost: 12,
cooldown: 12,
onUse: function(attacker, target) {
let value1 = 0
if (target.additonalDamage > 0) {
attacker.additionalDamage += target.additionalDamage;
target.additionalDamage = Math.round((target.additionalDamage / 2));
value1 += target.additionalDamage
} else {
attacker.additionalDamage += 5;
target.additionalDamage -= 5
value1 += 5
}
let value2 = 0
if (target.additionalHitChance > 0) {
attacker.additionalHitChance += target.additionalHitChance;
target.additionalHitChance = Math.round((target.additionalHitChance / 2));
value2 += target.additionalHitChance
} else {
attacker.additionalHitChance += 5
target.additionalHitChance -= 5
value2 += 5
}
let value3 = 0
if (attacker.additionalDefense > 0) {
attacker.additionalDefense += target.additionalDefense;
target.additionalDefense = Math.round((target.additionalDefense / 2));
value3 = target.additionalDefense
} else {
attacker.additionalDefense +=5
target.additionalDefense -= 5
value3 += 5
}
attacker.statusEffects.stolenAttr = {
damage: value1,
hitchance: value2,
defense: value3,
};
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} stole ${target.Name}'s soul. (Stolen Damage: ${value1}, Stolen Hit-Chance: ${value2}, Stolen Defense: ${value3})`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} roubou a alma de ${target.Name_pt}. (Dano Roubado: ${value1}, Chance de Acerto Roubado: ${value2}, Defesa Roubada: ${value3}`)
}
}
});
var escapeSkill = createSkill("Escape", {
name_pt: "Fuga",
desc_pt: "Tentar escapar do combate. 60% de chance de sucesso.",
description: "Attempt to escape from combat. 60% chance to succeed.",
categories: ["Technique", "General"],
APCost: 0, // Set the AP cost to 0 since it's an escape attempt
cooldown: 1, // Set a cooldown of 1 turn to prevent spamming escape attempts
inCooldown: 0,
onUse: function(attacker) {
// Check if the skill is off cooldown
if (this.inCooldown <= 0) {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is attempting to flee from combat like a coward.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está tentando fugir do combate como um covarde.`);
}
attacker.statusEffects.EscapeAttempt = true;
if (attacker.level >= 5 && attacker.level < 10) {
attacker.additionalDefense += 5;
} else if (attacker.level >= 10) {
attacker.additionalDefense += attacker.level;
}
// Set cooldown for the skill
}
}
});
var taunt = createSkill("Taunt", {
name_pt: "Provocar",
desc_pt: "Aumenta sua defesa em +15 e força cada inimigo a atacá-lo. Para cada ataque que errar você, faça um ataque armado contra o atacante.",
description: "Increase your defense by +15, then force each enemy to attack you. For each attack that misses you, make a weapon attack against the attacker.",
categories: ["Technique", "Defensive", "Buff", "AOE"],
APCost: 3,
cooldown: 8,
onUse: function(attacker) {
const char = State.variables.character[1];
const tauntquotes = ["[No taunt was found]",];
const randomquote = tauntquotes[Math.floor(Math.random() * tauntquotes.length)];
addToBattleLog(`<b>${attacker.Name} :</b> ${randomquote}`);
attacker.additionalDefense += 15
for (let i = 0; i < enemyInstances.length; i++) {
let enemy = enemyInstances[i];
const attackhits = calculateHitChance(enemy, char)
if (!attackhits) {
windows.triggerAttack(char, enemy, char.equipment.mainhand);
} else {
let damage = calculateDamage(enemy, char, enemy.equipment.mainhand);
applyDamage(enemy, char, damage);
}
}
attacker.additionalDefense -= 15
}
});
var sacrificeArmor = createSkill("Sacrifice Armor", {
name_pt: "Sacrificar Armadura",
desc_pt: "Sacrifica todas as defesas para adicioná-las ao seu dano. Dura até o final da batalha.",
description: "Sacrifices all Defenses to add them to your Damage. Lasts for the whole battle.",
categories: ["Techique", "Offensive", "Buff", "Debuff"],
APCost: 0,
cooldown: 99,
onUse: function(attacker) {
let value = attacker.additionalDefense
attacker.statusEffects.lostArmor = true;
attacker.additionalDefense = 0;
attacker.additionalDamage += value;
attacker.statusEffects.lostValue = value
}
});
//Berseker
var warcry = createSkill("War Cry", {
name_pt: "Grito de Guerra",
desc_pt: "Para cada inimigo, aumente seu dano em 4. Quando lançado novamente, redefina a duração.",
description: "For each enemy, increase your damage by 3. When cast again, reset its duration.",
categories: ["Technique", "General", "Buff"],
APCost: 1,
cooldown: 4,
onUse: function(attacker) {
let raiseddamage = 0;
// Apply Warcry effect to self
if (attacker === State.variables.character[1]) {
if (!attacker.statusEffects.warcryDuration || attacker.statusEffects.warcryDuration === 0) {attacker.statusEffects.raisedDamage = 0;
State.variables.enemyInstances.forEach(enemy => {
enemy.additionalDamage += 4;
attacker.statusEffects.raisedDamage += 4;
});
raiseddamage = attacker.statusEffects.raisedDamage; // Initialize raised damage counter
if (State.variables.language === "EN") {
addToBattleLog(`WAAAAARGH! ${attacker.Name} released a ferocious War cry, increasing their damage by ${raiseddamage} for 5 turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`WAAAAARGH! ${attacker.Name_pt} solta um feroz Grito de Guerra, aumentando seu dano em ${raiseddamage} por 5 turnos.`);
}
attacker.statusEffects.warcryDuration = 5;
} else {
if (State.variables.language === "EN") {
addToBattleLog(`WAAAAARGH! ${attacker.Name} released another potent War cry.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`WAAAAARGH! ${attacker.Name_pt} solta outro potente Grito de Guerra.`);
}
attacker.statusEffects.warcryDuration = 5; // Reset the duration when cast again
}
} else { // Apply Warcry effect to enemies
State.variables.enemyInstances.forEach(enemy => {
enemy.additionalDamage += 3;
enemy.statusEffects.raisedDamage += 3 + Math.round((attacker.CHA / 3));
enemy.statusEffects.warcryDuration = 5;
});
this.cooldown = 5; // Set the cooldown for the skill
if (State.variables.language === "EN") {
addToBattleLog(`WAAAAARGH! ${attacker.Name} released a ferocious War cry, increasing the damage of each ally by ${3 + Math.round((attacker.CHA / 3))} for 5 turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`WAAAAARGH! ${attacker.Name_pt} solta um feroz Grito de Guerra, aumentando o dano de cada aliado em ${3 + Math.round((attacker.CHA / 3))} por 5 turnos.`);
}
}
}
});
var cleave = createSkill("Cleave", {
name_pt: "Fender",
desc_pt: "Ataque um inimigo com sua arma principal, se acertar, também cause dano aos inimigos adjacentes pela metade do dano.",
description: "Strike an enemy with your mainhand weapon, if it hits, also damage its adjacent enemies by half of the damage.",
categories: ["Technique", "Melee", "Offensive"],
APCost: 2,
cooldown: 8,
onUse: function(attacker, target) {
if (attacker.equipment.mainhand.Type.includes("melee")) {
let attackHits = calculateHitChance(attacker, target, attacker.equipment.mainhand);
const slot = attacker.equipment.mainhand;
if (attackHits) {
let damage = calculateDamage(attacker, target, slot);
applyDamage(attacker, target, damage, slot)
if (target.currentLife < 0) {
target.currentLife = 0;
checkGameOver();
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} struck ${target.Name} for ${damage} damage.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} antingiu ${target.Name_pt} por ${damage} de dano.`);
}
// Damage adjacent enemies if there are any
let adjacentTargets = [];
const enemyInstances = State.variables.enemyInstances;
let targetIndex = enemyInstances.indexOf(target);
if (targetIndex > 0) {
adjacentTargets.push(enemyInstances[targetIndex - 1]);
}
if (targetIndex < enemyInstances.length - 1) {
adjacentTargets.push(enemyInstances[targetIndex + 1]);
}
for (let adjacentTarget of adjacentTargets) {
if (adjacentTarget) {
let adjacentDamage = Math.round(damage / 2);
applyDamage(attacker, adjacentTarget, adjacentDamage, slot)
if (adjacentTarget.currentLife < 0) {
adjacentTarget.currentLife = 0;
checkGameOver();
updateEnemyDetails(adjacentTarget);
}
if (adjacentTargets.length === 1) {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} struck ${target.Name} by ${damage} damage, cleaving through ${adjacentTarget.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} atingiu ${target.Name_pt} por ${damage} de dano, atravessando ${adjacentTarget.Name_pt}.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} struck ${target.Name} by ${damage} damage, cleaving through ${adjacentTarget.Name.join(' and ')}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} atingiu ${target.Name_pt} por ${damage} de dano, atravessando ${adjacentTarget.Name.join(' e ')}.`);
}
}
}
}
updateEnemyDetails(target);
checkGameOver();
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} missed ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} errou ${target.Name_pt}.`);
}
}
updatePlayerDetails(attacker);
}
}
});
var feelThePain = createSkill("Feel the Pain", {
name_pt: "Sinta a Dor",
desc_pt: "Cause 10 de dano a si mesmo, ganhe regeneração (10).",
description: "Damage self by 10, gain regeneration (10).",
categories: ["Technique", "General", "Buff"],
APCost: 0,
cooldown: 15,
onUse: function(attacker) {
if (attacker.currentLife > 10) {
attacker.currentLife -= 10;
attacker.statusEffects.regeneration = 10;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} Felt the Pain as they damage themselves by 10 to gain Regeneration(10).`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} Sentiu a Dor ao se danificar em 10 para ganhar Regeneração(10).`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} cannot Feel the Pain, for it's Lifeblood is too low.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} Não pode Sentir a Dor, sua Força Vital é muito baixa.`);
}
}
}
});
//Feral
var adrenalineRush = createSkill("Adrenaline Rush", {
name_pt: "Impulso de Adrenalina",
desc_pt: "Aumenta a quantidade de seus Pontos de Ação em 2 no início do seu próximo turno.",
description: "Increase your Action Points amount by 2 at the start of your next turn.",
categories: ["Technique","General", "Buff"],
APCost: 1,
cooldown: 8,
onUse: function(attacker) {
// Apply Adrenaline Rush effect
attacker.statusEffects.adrenalineRushDuration = true;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} used Adrenaline Rush, which will increase their Action Points by 2 at the start of the next turn.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} usou Impulso de Adrenalina, que irá aumentar seus Pontos de Ação em 2 no início de seu próximo turno.`);
}
}
});
var mutilate = createSkill("Mutilate", {
name_pt: "Mutilar",
desc_pt: "Realiza cinco ataques armado contra inimigos aleatórios.",
description: "Make five weapon attacks against random enemis.",
categories: ["Technique", "Melee", "Offensive", "AOE"],
APCost: 3,
cooldown: 12,
onUse: function(attacker) {
let enemyInstances = State.variables.enemyInstances;
for (let i = 0; i < 5; i++) {
// Select a random enemy target
let randomIndex = Math.floor(Math.random() * enemyInstances.length);
let target = enemyInstances[randomIndex];
let mainhand = State.variables.character[1].equipment.mainhand
// Perform an attack against the selected target
if (mainhand.Type.includes('1-handed')) {
attacker.AP += 1;
} else if (mainhand.Type.includes('2-handed')) {
attacker.AP += 2;
}
if (State.variables.character[1].equipment.offhand.Type.includes("weapon")) {
attacker.AP += 1;
}
triggerAttack(attacker, target, mainhand);
}
}
});
var primalRage = createSkill("Primal Rage", {
name_pt: "Fúria Primal",
desc_pt: "Entra em um estado de fúria primal por 10 turnos, sempre que você é atacado, faça um ataque armado contra um inimigo aleatório. Enquanto estiver em Fúria Primal, você tem +20 de Dano e não pode usar Habilidades.",
description: "Enter an state of primal rage for 10 turns, whenever you are attacked, make a weapon attack against a random enemy. While in Primal Rage, you have +20 to Damage and you cannot use Skills.",
categories: ["Technique", "General", "Buff"],
APCost: 2,
cooldown: 30,
onUse: function(attacker) {
attacker.statusEffects.naturesCallDuration = 10.
attacker.additionalDamage += 20;
attacker.statusEffects.hindered += 10
}
});
//Mage
var freeze = createSkill("Freeze", {
name_pt: "Congelar",
desc_pt: "Causa 1d8 de dano a um único inimigo e reduz sua Defesa e Chance de Acerto em 10 por 2 turnos. Nos niveis 5, 10 e 15, aumente o número de dados em 1.",
description: "Deal 1d8 damage to a single enemy and reduce their Defense and Hit Chance by 10 for 2 turns. At levels 5, 10 and 15, increase the number of dices by 1.",
categories: ["Spell", "Elemental", "Offensive"],
APCost: 1,
cooldown: 3,
Manacost: 6,
onUse: function(attacker, target) {
var damage = 0
if (attacker.traits.includes("Arcane Intiation")) {
this.Manacost = 6 - 3
}
if (attacker.level < 5) {
damage = rollDice('1d8');
} else if (attacker.level >= 5 && attacker.level < 10) {
damage = rollDice('2d8');
} else if (attacker.level > 10 && attacker.level < 15) {
damage = rollDice('3d8');
} else {
damage = rollDice('4d8')
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage;
}
if (damage < 0) {
damage = 1
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
target.statusEffects.freezeDuration += 2;
target.additionalDefense -= 10;
target.additionalHitChance -= 10;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Freeze, dealing ${damage} damage and reducing ${target.Name}'s defense and Hit Chance by 10 for 2 turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} conjura Congelear, causando ${damage} de dano e reduzindo a Defesa de ${target.Name_pt}'s defense and Hit Chance by 10 for 2 turns.`);
}
const totem = State.variables.summons.find(summon => summon.Name === "Improved Water Totem");
State.variables.allyInstances.push(totem)
}
});
var blizzard = createSkill("Blizzard", {
name_pt: "Nevasca",
desc_pt: "Causa 3d8 de dano a todos os inimigos e reduz a Defesa e Chance de Acerto deles em 15 por 2 turnos.",
description: "Deal 3d8 damage to all enemies and reduce their Defense and Hit Chance by 15 for 2 turns.",
categories: ["Spell", "Elemental", "Offensive", "Debuff", "AOE"],
APCost: 1,
cooldown: 5,
Manacost: 9,
onUse: function(attacker) {
var damage = rollDice('3d8');
if (attacker.traits.includes("Arcane Mastery")) {
let secondResult = rolDice('3d8')
if (secondResult > damage) {
damage = secondResult
}
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage;
if (damage < 0) {
damage = 1
}
}
var Manacost = Math.floor(attacker.MAXMANA * this.Manacost);
let enemyInstances = State.variables.enemyInstances
enemyInstances.forEach(enemy => {
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage;
enemy.statusEffects.freezeDuration += 2;
enemy.additionalDefense -= 10;
enemy.additionalHitChance -= 10;
})
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summons a freezing Blizzard, dealing ${damage} damage to all enemies and reducing their Defenses and Hit Chance by 10 for 2 turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invoca uma congelate Nevasca, causando ${damage} de dano a todos os inimigos e reduzindo suas Defesas e Chance de Acerto em 10 por 2 turnos.`);
}
const totem = State.variables.summons.find(summon => summon.Name === "Improved Water Totem");
State.variables.allyInstances.push(totem)
}
});
var fireBolt = createSkill("Fire Bolt", {
name_pt: "Raio de Fogo",
desc_pt: "Causa 1d10 de dano a um único inimigo. Nos niveis 5, 10 e 15, aumente o número de dados em 1.",
description: "Deal 1d10 damage to a single enemy. At levels 5, 10 and 15, increase the number of dices by 1.",
categories: ["Spell", "Elemental", "Offensive"],
APCost: 2,
cooldown: 4,
Manacost: 12,
onUse: function(attacker, target) {
if (attacker.traits.includes("Arcane Intiation")) {
this.Manacost = 12 - 3
}
var damage = 0
if (attacker.level < 5) {
damage = rollDice('1d10');
} else if (attacker.level >= 5 && attacker.level < 10) {
damage = rollDice('2d10');
} else if (attacker.level > 10 && attacker.level < 15) {
damage = rollDice('3d10');
} else {
damage = rollDice('4d10')
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += + attacker.additionalDamage;
if (damage < 0) {
damage = 1
}
target.statusEffets.burning.duration += 2
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} lanches a Fire Bolt, dealing ${damage} damage to ${target.Name} and Burning them for 2 Actions.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} lança um Raio de Fogo, causando ${damage} contra ${target.Name_pt} e o Queimando por 2 Ações.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} lanches a Fire Bolt, dealing ${damage} damage to ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} lança um Raio de Fogo, causando ${damage} contra ${target.Name_pt}.`);
}
}
if (damage < 0) {
damage = 1
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Fire Totem");
State.variables.allyInstances.push(totem)
}
}
});
var inferno = createSkill("Inferno", {
name_pt: "Inferno",
desc_pt: "Causa 3d10 de dano a todos os inimigos.",
description: "Deal 3d10 damage to all enemies.",
categories: ["Spell", "Elemental", "Offensive", "AOE"],
APCost: 2,
cooldown: 6,
Manacost: 18,
onUse: function(attacker) {
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summoned a blazing Inferno, dealing ${damage} damage to all enemies and Burning them by 2 Actions.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invoca um Ardente Inferno, causando ${damage} contra todos os inimigos e os Queimando por 2 Ações.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summoned a blazing Inferno, dealing ${damage} damage to all enemies.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invoca um Ardente Inferno, causando ${damage} contra todos os inimigos.`);
}
}
var damage = rollDice('3d10');
if (attacker.traits.includes("Arcane Mastery")) {
let secondResult = rolDice('3d10')
if (secondResult > damage) {
damage = secondResult
}
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage;
if (damage < 0) {
damage = 1
}
}
let enemyInstances = State.variables.enemyInstances
enemyInstances.forEach(enemy => {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage;
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
enemy.statusEffets.burning.duration += 2
}
})
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Fire Totem");
State.variables.allyInstances.push(totem)
}
}
});
var lightningStrike = createSkill("Lightning Strike", {
name_pt: "Golpe de Relâmpago",
desc_pt: "Causa 1d6 de dano a um único inimigo e o atordoe. Nos niveis 5, 10 e 15, aumente o número de dados em 1.",
description: "Deal 1d6 of damage to a single enemy and Stun them. At levels 5, 10 and 15, increase the number of dices by 1.",
categories: ["Spell", "Elemental", "Offensive", "Debuff"],
APCost: 1,
cooldown: 3,
Manacost: 9,
onUse: function(attacker, target) {
if (attacker.traits.includes("Arcane Intiation")) {
this.Manacost = 9 - 3
}
var damage = 0
if (attacker.level < 5) {
damage = rollDice('1d6');
} else if (attacker.level >= 5 && attacker.level < 10) {
damage = rollDice('2d6');
} else if (attacker.level > 10 && attacker.level < 15) {
damage = rollDice('3d6');
} else {
damage = rollDice('4d6')
}
target.statusEffects.stunned += 1;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Lightning Strike, dealing ${damage} damage and Stunning ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} conjura Golpe de Relâmpago causando ${damage} de dano e Atordoando ${target.Name_pt}.`);
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage;
if (damage < 0) {
damage = 1
}
target.statusEffects.stunned += 1;
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} was hit by a second lightning, Stunning them for an additional turn.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${target.Name_pt} foi atingido por um segundo relâmpago, sendo Atordoado por um turno adicional.`)
}
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Air Totem");
State.variables.allyInstances.push(totem)
}
}
});
var storm = createSkill("Storm", {
name_pt: "Tempestade",
desc_pt: "Aplica atordoamento e causa 3d6 de dano a todos os inimigos.",
description: "Apply stun and deal 3d6 damage to all enemies.",
categories: ["Spell", "Elemental", "Offensive", "Debuff", "AOE"],
APCost: 1,
cooldown: 5,
Manacost: 13,
onUse: function(attacker) {
var damage = rollDice('3d6');
if (attacker.traits.includes("Arcane Mastery")) {
let secondResult = rolDice('3d6')
if (secondResult > damage) {
damage = secondResult
}
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage;
if (damage < 0) {
damage = 1
}
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summoned a terrible Storm, dealing ${damage} damage and stunning all enemies.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invocou uma terrivel Tempestade, causando ${damage} de dano e Atordoando a todos os inimigos.`);
}
let enemyInstances = State.variables.enemyInstances
enemyInstances.forEach(enemy => {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage;
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
enemy.statusEffects.stunned += 1;
}
})
const totem = State.variables.summons.find(summon => summon.Name === "Improved Air Totem");
State.variables.allyInstances.push(totem)
}
});
//Arcane Blade
var bladeSurge = createSkill("Blade Surge", {
name_pt: "Surto de Lâminas",
desc_pt: "Invoque 3 lâminas espectrais ao seu lado e realize um ataque armado. Sempre que você atacar, consuma uma lâmina para que as outras invistam contra o alvo, causando 1d6 de dano. A cada 5 níveis, invoque 2 lâminas a mais.",
description: "Summon 3 spectral blades at your sides and make an weapon attack. Whenever you make an attack, consume a blades so the others charge against the target, dealing 1d6 damage. Every 5 levels, summons 2 additional blades.",
categories: ["Spell", "Arcane", "Offensive", "Spell-strike"],
APCost: 1,
Manacost: 12,
cooldown: 8,
onUse: function(attacker, target) {
attacker.statusEffects.spectralBlades += attacker.level < 5 ? 3 : attacker.level < 10 ? 5 : attacker.level < 15 ? 7 : attacker.level < 20 ? 9 : 11;
let totalbladeDamage = 0
let hitchance = calculateHitChance(attacker, target, attacker.equipment.mainhand);
let damage = calculateDamage(attacker, target, attacker.equipment.mainhand);
if (attacker.statusEffects.spectralBlades && attacker.statusEffects.spectralBlades > 0) {
spectralBlades--;
for (let i = attacker.statusEffects.spectralBlades; i > 0; i++) {
let bladedamage = rollDice('1d6')
target.currentLife -= bladedamage
totalbladeDamage += bladedamage
}
}
if (hitchance) {
applyDamage(attacker, target, damage, attacker.equipment.mainhand)
} else {
addToBattleLog(`${attacker.Name} missed his Blade Surge attack, but his Spectral blades follow trough, dealing ${totalbladeDamage} damage against ${target.Name}.`);
}
}
})
var specStrik = createSkill("Spectral Strike", {
name_pt: "Golpe Escpectral",
desc_pt: "Faça um ataque armado contra um inimigo. Caso erre, invoque laminas espectrais que danificam todos os outros inimigos pelo Dano de sua arma. A partir do nível 10, você adiciona 1/2 de sua Inteligência ao Dano.",
description: "Make a weapon attack against an enemy. if it misses, summon spectral blades that damages all others enemies by your weapon's Damage. Starting at level 10, you add 1/2 of your Intelligence to the Damage.",
categories: ["Technique", "Spell", "Arcane", "Offensive", "Spell-strike"],
APCost: 2,
cooldown: 6,
Manacost: 8,
onUse: function(attacker, target) {
let hitchance = calculateHitChance(attacker, target, attacker.equipment.mainhand);
let damage = calculateDamage(attacker, target, attacker.equipment.mainhand);
if (attacker.level > 10) {
damage += Math.round((attacker.INT / 2));
}
if (hitchance) {
applyDamage(attacker, target, damage, attacker.equipment.mainhand)
} else {
if (attacker === State.variables.character[1]) {
State.variables.enemyInstances.forEach(enemy=>{
if (enemy !== target) {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
enemy.currentLife -= damage;
}
})
} else {
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
target.currentLife -= damage
}
}
}
})
//Wizard
var EldritchSurge = createSkill("Eldritch Surge", {
name_pt: "Surto Sobrenatural",
desc_pt: "Cause 1d4 de Dano contra um inimigo, caso relançar essa habilidade durante seu turno, aumente o Dado em um estágio, até d20. Nos níveis 5, 10 e 15, aumente o número de Dados em 1.",
description: "Deal 1d4 Damage against an enemy, in case you re-cast this skill during your turn, increase the Dice by one step, up to a d20. At level 4, 10 and 15, increase the number of Dice by 1.",
categories: ["Spell", "Arcane", "Offensive"],
APCost: 1,
cooldown: 0,
Manacost: 6,
onUse: function(attacker, target) {
let num = 0
if (attacker.level >= 15) {
num = 4
} else if (attacker.level >= 10 && attacker.level < 15) {
num = 3
} else if (attacker.level >= 5 && attacker.level < 10) {
num = 2
} else {
num = 1
}
let damage = 0
let side = 4
if (attacker.statusEffects.recastArc && attacker.statusEffects.recastArc > 0) {
for (let i = 0; i < attacker.statusEffects.recastArc && side < 20; i++) {
side += 2;
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage+= 2
}
}
}
damage += rollDice(num+'d'+side);
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (attacker.traits.includes("Battle-Medic")) {
healing += 5
}if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
attacker.statusEffects.recastArc = 1
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name}'s Eldritch Surge deals ${damage} of Damage against ${target.Name}. You have cast this Spell ${attacker.statusEffects.recastArc} times this turn.`);
} else if (State.variables.language === "PT-BR")
addToBattleLog(` O Surto Sobrenatural de ${attacker.Name} causa ${damage} de Dano contra ${target.Name_pt}. Você lançou essa Magia ${attacker.statusEffects.recastArc} vezes nesse turno.`);
}
})
var dazzle = createSkill("Dazzle", {
name_pt: "Deslumbrar",
desc_pt: "Aplica confusão a um inimigo por 3 ações. No nível 10, afeta todos os inimigos.",
description: "Apply confusion to an enemy for 3 actions. At level 10, targets all enemies",
categories: ["Spell", "Arcane", "Debuff"],
APCost: 1,
cooldown: 2,
Manacost: 6,
onUse: function(attacker, target) {
if (attacker.level < 10) {
target.statusEffects.confusion += 3;
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
target.statusEffects.hindered +=1
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name}'s Dazzle, was more powerful than expected, applying Confusion and also Hindering ${target.Name} of using Skills.`);
} else if (State.variables.language === "PT-BR")
addToBattleLog(`O Deslumbrar de ${attacker.Name_pt} foi mais poderoso do que esperado, aplicando Confusão e Impedindo ${target.Name_pt} de utilizar Habilidades.`);{
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Dazzle, applying Confusion to ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} conjura Deslumbrar, aplicando Confusão para ${target.Name_pt}.`);
}
}
} else if (attacker === State.variables.character[1] && attacker.level >= 10) {
if (!this.categories.includes("AOE")) {
this.categories.push("AOE")
}
let enemyInstances = State.variables.enemyInstances
enemyInstances.forEach(enemy=> {
enemy.statusEffects.confusion += 3;
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
target.statusEffects.hindered +=1
}
})
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} 's Dazzle, was more powerful than expected, applying Confusion and Hindering all enemis.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} 's Dazzle, was more powerful than expecte, applying Confusion and Hindering all enemis.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Dazzle, applying Confusion to all enemies.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} conjura Deslumbrar, aplicando Confusão contra todos os Inimigos.`);
}
}
}
});
var arcaneBeam = createSkill("Arcane Beam", {
name_pt: "Raio Arcano",
desc_pt: "Causa dano igual à sua Inteligência a um inimigo. Se isso matar o alvo, cause o dano restante a um inimigo aleatório.",
description: "Deal damage equal to your Intelligence to an enemy. If it kills the target, deal remaining damage to a random enemy.",
categories: ["Spell", "Arcane", "Offensive"],
APCost: 1,
cooldown: 3,
Manacost: 20,
onUse: function(attacker, target) {
var damage = 0
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.Intelligence + attacker.additionalDamage;
} else {
damage += Math.round((attacker.Intelligence / 2)) + attacker.additionalDamage;
}
if (damage < 0) {
damage = 1
}
if (attacker.level >= 5 && attacker.level < 10) {
damage *= 1.5;
} else if (attacker.level >= 10 && attacker.level < 15) {
damage *= 2;
} else if (attacker.level >= 15) {
damage *= 2.5;
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
if (target.currentLife < 0) {
var remainingDamage = Math.abs(target.currentLife);
var randomEnemyIndex = Math.floor(Math.random() * enemyInstances.length);
if (enemyInstances[randomEnemyIndex].statusEffects.WraithCurse) {
remainingDamage
+= rollDice(enemyInstances[randomEnemyIndex].statusEffects.WraithCurse +'d4')
}
if (enemyInstances[randomEnemyIndex].traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
remainingDamage = Math.round((damage * 0.8))
}
if (enemyInstances[randomEnemyIndex].equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
remainingDamage = Math.round((damage * 0.9))
}
for (let slot in enemyInstances[randomEnemyIndex].equipment) {
if (randomEnemyIndex.equipment[slot].categories.includes("draconic")) {
remainingDamage -= Math.round((damage * 0.07))
}
}
for (let slot in enemyInstances[randomEnemyIndex].equipment) {
if (randomEnemyIndex.equipment[slot].categories.includes("naked")) {
remainingDamage += Math.round((damage * 0.07))
}
}
if (enemyInstances[randomEnemyIndex].traits.includes("Hardy")) {
remainingDamage = Math.round((damage * 0.85))
}
enemyInstances[randomEnemyIndex].currentLife -= remainingDamage;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Arcane Beam, annihilating ${target.Name} and dealing ${remainingDamage} damage against ${enemyInstances[randomEnemyIndex].Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} conjura Raio Arcano, aniquilando ${target.Name_pt}. A magia continua seu caminho, causando ${remainingDamage} de dano contra ${enemyInstances[randomEnemyIndex].Name_pt}.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Arcane Beam, dealing ${damage} damage to ${target.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} conjura Raio Arcano, causando ${damage} de dano contra ${target.Name_pt}.`);
}
}
}
});
var arcaneBlade = createSkill("Summon Arcane Blade", {
name_pt: "Invocar Lâmina Arcana",
desc_pt: "Invoque em suas mãos a Lâmina Arcana para o resto do combate. Você usa sua inteligência para calcular a Chance de Arcerto e Dano de seus ataques. (Sua arma principal retorna para seu inventário)",
description: "Summon in your hands the Arcane Blade to the rest of combat. You utilizes your intelligence to calculate your Hit-Chance and Damage of your attacks. (Your mainhand eeapon returns to your inventory)",
categories: ["Spell", "Arcane", "General", "Summon"],
APCost: 0,
cooldown: 100,
Manacost: 4,
onUse: function(attacker) {
unequipItem(mainhand)
attacker.equipment.mainhand = State.variables.Items["Arcane Blade"]
attacker.equipment.mainhand.equipped = true;
attacker.equipment.mainhand.Damage = attacker.level < 5 ? '2d8' : attacker.level < 10 ? '3d8' : attacker.level < 15 ? '4d8' : '5d8';
addToBattleLog(`${attacker.Name} summons the Arcane Blade to their hands! Weapon damage dice: ${attacker.equipment.mainhand.Damage}.`)
}
})
var arcaneArmor = createSkill("Arcane Armor", {
name_pt: "Armadura Arcana",
desc_pt: "Aumenta sua defesa pela sua Inteligência para o combate.",
description: "Increase your defense by your Intelligence for the combat.",
categories: ["Spell", "Arcane", "Defensive", "Buff"],
APCost: 1,
cooldown: 100,
Manacost: 8,
onUse: function(attacker) {
var defenseBonus = attacker.Intelligence;
if (!attacker.statusEffects.arcaneArmor) {
if (attacker.level >= 5 && attacker.level < 10) {
defenseBonus += 5;
} else if (attacker.level >= 10 && attacker.level < 15) {
defenseBonus += 10;
} else if (attacker.level >= 15) {
defenseBonus += 15;
}
attacker.additionalDefense += defenseBonus;
attacker.statusEffects.arcaneArmor = true;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} cast Arcane Armor, increasing defense by ${defenseBonus}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} conjura Armadura Arcana, aumentando sua defesa em ${defenseBonus}.`);
}
} else {
attacker.AP += 1;
attacker.currentMana += 8;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} already casted Arcane Armor this combat.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} já conjurou Armadura Arcana nesse combate.`);
}
}
}
});
//Warlock
var soulSyphon = createSkill("Soul Syphon", {
name_pt: "Sifão de Almas",
desc_pt: "Causa 1d8 de dano a um inimigo e se cura por 1d4. Nos níveis 6 e 12, aumente os Dados em um passo.",
description: "Deal 1d8 of damage to an enemy and heal yourself by 1d4. At level 5 and 10, increase both Dices by 1 step.",
categories: ["Spell", "Necromancy", "Offensive", "Healing", "Pact"],
APCost: 1,
cooldown: 3,
Manacost: 7,
onUse: function(attacker, target) {
let damageDice = '1d8';
let healingDice = '1d4';
if (attacker.level >= 6) {
damageDice = '1d10';
healingDice = '1d6';
}
if (attacker.level >= 12) {
damageDice = '1d12';
healingDice = '1d8';
}
var damage = 0
var healing = 0
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage = rollDice(damageDice) + attacker.additionalDamage;
healing = rollDice(healingDice) + attacker.additionalDamage;
if (damage < 0) {
damage = 1
}
if (healing < 0) {
healing = 1
}
} else {
damage = rollDice(damageDice);
healing = rollDice(healingDice);
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (attacker.traits.includes("Battle-Medic")) {
healing += 5
}if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
attacker.currentLife += healing;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} cast Soul Syphon against ${target.Name}, dealing ${damage} damage and healing itself for ${healing} of its Lifeblood.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} conjura Sifão de Alma contra ${target.Name_pt}, causando ${damage} de dano e se curando por ${healing} de sua Força VItal.`);
}
}
});
var deathSpyral = createSkill("Death Spiral", {
name_pt: "Espiral da Morte",
desc_pt: "Causa 2d10 de dano a todos os seus inimigos. Se algum morrer, repita a habilidade.",
description: "Damage all your enemies by 2d10. If any dies, repeat the skill.",
categories: ["Spell", "Offensive", "Necromancy", "Pact", "AOE"],
APCost: 3,
cooldown: 8,
Manacost: 12,
onUse: function(attacker) {
let damage = rollDice("2d10")
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage
if (damage < 0) {
damage = 1
}
}
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage
if (enemy.currentLife <= 0) {
window.disableDeadEnemies();
this.onUse
if (State.variables.language === "EN") {
addToBattleLog(`A soul refuels the Death Spiral.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Uma alma rabastece a Espiral da Morte.`);
}
}
})
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summons a Death Spyral upon their enemies.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invoca uma Espiral da Morte sobre seus inimigos.`);
}
}
})
var reap = createSkill("Reap", {
name_pt: "Colheita",
desc_pt: "Causa dano a todos os seus inimigos igual à vida que está faltando.",
description: "Damage all your enemies by their misisng health.",
categories: ["Spell", "Offensive", "Necromancy", "Pact", "AOE"],
APCost: 2,
cooldown: 10,
Manacost: 9,
onUse: function(attacker) {
State.variables.enemyInstances.forEach(enemy => {
let missing = enemy.MAXLIFE - enemy.currentLife;
if (enemy.statusEffects.WraithCurse) {
missing += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
missing = Math.round((missing * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("draconic")) {
missing -= Math.round((missing * 0.07))
}
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("naked")) {
missing += Math.round((missing * 0.07))
}
}
if (enemy.traits.includes("Hardy")) {
missing = Math.round((missing * 0.85))
}
enemy.currentLife -= missing;
})
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} reaps their enemies.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Nam_pt} colhe seus inimigos.`);
}
}
})
var cursedSouls = createSkill("Summon Cursed Souls", {
name_pt: "Invocar Almas Amaldiçoadas",
desc_pt: "Invoque 3 Almas Amaldiçoadas no Cemitério, para cada Alma invocada, se cure por 3.5% de sua Força Vital perdida, e aumente seu Dano, Defesa e Chance de Acerto em 2.",
description: "Summon 3 Cursed Souls at the Graveyard, for each summoned Soul, heal yourself by 3.5% of your missing Lifeblood, and increase your Damage, Defense and Hit Chance by 2.",
categories: ["Spell", "Necromancy", "Buff", "Summon"],
APCost: 1,
Manacost: 9,
cooldown: 6,
onUse: function(attacker) {
let missingLife = attacker.MAXLIFE - attacker.currentLife;
let totallife = 0
let totalDam = 0
let totalDef = 0
let totalHC = 0
const soul = State.variables.summons.find(summon => summon.Name === "Cursed Soul");
for (let i = 0; i < 3;i++) {
State.variables.Graveyard.push(soul);
}
State.variables.Graveyard.forEach(enemy => {
if (enemy.Name === "Cursed Soul") {
attacker.currentLife += Math.round((0.035 * missingLife))
totallife += Math.round((0.035 * missingLife))
Math.clamp(attacker.currentLife, 0, attacker.MAXLIFE)
attacker.additionalDamage += 2
attacker.additionalDefense += 2
attacker.additionalHitChance += 2
totalDam += 2
totalDef += 2
totalHC += 2
}
})
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summons 3 Cursed Souls, regaining ${totallife} Lifeblood back and gaining ${totalDam} Damage, ${totalDef} Defense and ${totalHC} Hit Chance.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} invoca 3 Almas Amaldiçoadas, ganhando ${totallife} de Força Vital de volta e ganhando ${totalDam} de Dano, ${totalDef} de Defesa e ${totalHC} de Chance de Acerto.`)
}
}
})
var boneMissile = createSkill("Bone Missile", {
name_pt: "Míssel Ósseo",
desc_pt: "Lance um osso contra um inimigo, causando 2d4 de Dano. Repita a habilidade duas vezes para cada inimigo no Cémitério (Daemons, Constructs and Totens do not count toward this skill).",
description: "Launches a bone against an enemy, dealing 2d4 Daage. Repeat the skill twice for each enemy on the Graveyard (Demônios, Constructos e Totems não contâm para essa habilidade).",
categories: ["Spell", "Necromancy", "Offensive"],
APCost: 2,
Manacost: 9,
cooldown: 7,
onUse: function(attacker, target){
let damage = rollDice('2d4');
let secondDamage = 0
let graveyard = State.variables.Graveyard;
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
if (graveyard > 0) {
graveyard.forEach(enemy => {
if (!(enemy.Ancestry === "Daemon" || enemy.Ancestry === "Construct" || enemy.Ancestry === "Totem")) {
secondDamage = rollDice('4d4');
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
secondDamage = Math.round((secondDamage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
secondDamage = Math.round((secondDamage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
secondDamage -= Math.round((secondDamage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
secondDamage += Math.round((secondDamage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
secondDamage = Math.round((secondDamage * 0.85))
}
target.currentLife -= secondDamage;
}
})
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} launches a bone against ${target.Name}, dealing ${damage + secondDamage} damage against it.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} lança um osso contra ${target.Name_pt}, causando ${damage + secondDamage} de Dano a ele(a).`)
}
}
})
var corpseExplosion = createSkill("Corpse Explosion", {
name_pt: "Cadáver Explosivo",
desc_pt: "Exploda um cadáver inimigo caso haja um, causando 50% de sua Força Vital máxima a todos os inimigos (Daemons, Constructs and Totens do not count toward this skill).",
description: "Explode an enemy corpse in case there is one, dealing 50% of its maximum Lifeblood to all enemies (Demônios, Constructos e Totems não contâm para essa habilidade).",
categories: ["Spell", "Necromancy", "AOE", "Offensive"],
APCost: 2,
Manacost: 13,
cooldown: 7,
onUse: function(attacker){
let graveyard = State.variables.Graveyard;
if (graveyard.length > 0) {
let nonundead = graveyard.filter(enemy => !(enemy.Ancestry === "Undead" || enemy.Ancestry === "Daemon" || enemy.Ancestry === "Construct" || enemy.Ancestry === "Totem"));
// Check if there are any non-undead enemies in the graveyard
if (nonundead.length > 0) {
// Remove one non-undead enemy from the graveyard
let indexToRemove = graveyard.indexOf(nonundead[0]); // Assuming you want to remove the first non-undead enemy found
if (indexToRemove !== -1) {
let damage = Math.round((graveyard.indexOf(nonundead[0]).MAXLIFE / 2))
let name = graveyard.indexOf(nonundead[0]).Name
let name_pt = graveyard.indexOf(nonundead[0]).Name_pt
graveyard.splice(indexToRemove, 1);
if (attacker === State.variables.character[1]) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage;
})
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} explodes ${name}'s corpse, dealing ${damage} to all enemies.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} explode o cadáver de ${name_pt}, causando ${damage} para todos os inimigos.`)
}
} else {
State.variables.character[1].currentLife -= damage;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} explodes ${name}'s corpse, dealing ${damage} to ${State.variables.character[1].Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} explode o cadáver de ${name_pt}, causando ${damage} para ${State.variables.character[1].Name}.`)
}
}
}
}
} else {
attacker.currentMana += this.Manacost;
attacker.AP += this.APCost;
}
}
})
var boneArmor = createSkill("Bone Armor", {
name_pt: "Armadura de Ossos",
desc_pt: "Aumente sua defesa em +10, mais +4 para cada inimigo no Cemitério por 3 turnos, enquanto ativo, sempre que um inimigo lhe atacar, cause 2d4 de Dano a ele. No nível 5 e 10, aumente o número de Dados em 2.",
description: "Increase your Defense by +10 plus +4 for each enemy on the Graveyard for 3 turns, while active, whenever an enemy attacks you, deal 2d4 Damage to it. At level 5 and 10, increase the number of Dice by 2.",
categories: ["Spell", "Defensive", "Necromancy"],
APCost: 1,
cooldown: 5,
Manacost: 8,
onUse: function(attacker) {
attacker.additionalDefense += 5;
let value = 3 * State.variables.Graveyard.length;
let damage = '2d4';
if (attacker.level >= 5 && attacker.level < 10) {
damage = '4d4';
} else if (attacker.level >= 10) {
damage = '6d4';
}
attacker.statusEffects.bonearmor = {
duration: 3,
damage: damage,
value: (5 + value),
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} raises a Bone Armor, increasing their Defenses by ${5 + value} for 3 turns. Now, when attacked, they will reflect ${damage} Damage back.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} levanta uma Armadura de Ossos, aumentando sua Defesa em ${5 + value} por 3 turnos. Agora, quando atacado, irá refletir ${damage} de Dano de volta`)
}
}
});
var darkBargain = createSkill("Dark Bargain", {
name_pt: "Barganha Sombria",
desc_pt: "Converta 15% de sua Força Vital em Essência.",
description: "Convert 15% of your Lifeblood into Essence.",
categories: ["Spell", "Defensive", "Hemomancy"],
APCost: 1,
cooldown: 4,
Manacost: 0,
onUse: function(attacker) {
let value = Math.round((attacker.currentLife * 0.15))
attacker.currentLife -= value;
attacker.currentMana += value;
Math.clamp(attacker.currentMana, 0, attacker.MAXMANA);
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} converts ${value} of its Lifeblood into Essence.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} converte ${value} de sua Força Vital em Essência.`)
}
}
});
var sanguineArmor = createSkill("Sanguine Armor", {
name_pt: "Armadura Sanguínea",
desc_pt: "Causa dano a um inimigo igual a 15% de sua Força Vital, adicionando esse valor como Defesa por 1 turno.",
description: "Damage a enemy by 15% of their current Lifblood, add this value as Defense for 1 turn.",
categories: ["Spell", "General", "Hemomancy", "Pact"],
APCost: 1,
cooldown: 8,
Manacost: 12,
onUse: function(attacker, target) {
let value = Math.round((target.currentLife * 0.15));
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
value = Math.round((value * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
value = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
value -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
value += Math.round((damage * 0.07))
}
}
target.currentLife -= value;
attacker.additionalDefense += value;
attacker.statusEffects.bloodArmor = {
defense: value,
active: true
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} drains ${target.Name}'s blood by ${value}, manifesting a bloody armor around them with it.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} drena ${value} pontos do sangue de ${target.Name_pt}, manifestando uma armadura de sangue.`)
}
}
})
var bloodsurge = createSkill("Bloodsurge",{
name_pt: "Surto de Sangue",
desc_pt: "Na próxima vez que você morrer, restaure-se completamente. Só pode ser usado uma vez por combate.",
description: "The next time you would die, restore yourself to full. Can only be cast once per combat",
categories: ["Spell", "Defensive", "Hemomancy", "Pact"],
APCost: 0,
Manacost: 20,
cooldown: 99,
onUse: function(attacker) {
attacker.statusEffects.bloodsurge = true
}
});
var bloodcast = createSkill("Blood Cast", {
name_pt: "Derrame de Sangue",
description: "Apply Bleeding(2) to an enemy, then deal 1d6 Damage for each Bleeding stack. At level, 5, 10 and 15, increase the inital Bleeding by 2.",
desc_pt: "Aplique Sangramento(2) a um inimigo, e então cause 1d6 de Dano para cada ácumulo de Sangramento. No nível 5, 10 e 15, aumente o Sangramento initial em 2.",
categories: ["Spell", "Offensive", "Hemomancy", "Debuff"],
APCost: 1,
Manacost: 10,
cooldown: 6,
onUse: function(attacker, target) {
if (!(target.traits.includes("Inorganic") || target.Ancestry === "Undead")) {
let damage = 0 ;
target.statusEffects.bleed += 2
if (attacker.level >= 5 && attacker.level < 10) {
target.statusEffects.bleed += 2
} else if (attacker.level >= 10 && attacker.level < 15) {
target.statusEffects.bleed += 4
} else if (attacker.level >= 15) {
target.statusEffects.bleed += 6
}
for (let i=0; i < target.statusEffects.bleed;i++) {
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage = 6;
} else {
damage += rollDice('1d6');
}
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
target.currentLife -= damage;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Blood Cast, applying <b>Bleeding</b>(${target.statusEffects.bleed}) and dealing ${damage} Damage to ${target.Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} usa Derramende Sangue, aplicando <b>Sangramento</b>(${target.statusEffects.bleed}) e causando ${damage} de Dano à ${target.Name_pt}.`)
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} casts Blood Cast, but ${target.Name} is immune to <b>Bleeding</b>.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} usa Derramende Sangue, mas ${target.Name_pt} é imne à <b>Sangramento</b>.`)
}
}
}
}
});
var shadowBolt = createSkill("Shadow Bolt",{
name_pt: "Raio Sombrio",
desc_pt: "Libera um raio de escuridão, causando 1d8 de dano e cegando o alvo. Nos niveis 5, 10 e 15, aumente o número de dados em 1",
description: "Releases a bolt of darkness, dealing 1d8 damage and Blinding the target. Nos niveis 5, 10 e 15, aumente o número de dados em 1",
categories: ["Spell", "Offensive", "Dark Magic", "Pact", "Debuff"],
APCost: 1,
Manacost: 8,
cooldown: 2,
onUse: function(attacker, target) {
let damage = 0
if (attacker.level < 5) {
damage = rollDice('1d8');
} else if (attacker.level >= 5 && attacker.level < 10) {
damage = rollDice('2d8');
} else if (atacker.level >= 10 && attacker.level < 15) {
damage = rollDice('3d8');
} else if (attacker.level > 15) {
damage = rollDice('4d8');
}
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage;
if (damage < 0) {
damage = 1
}
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage
target.statusEffects.blind = true;
}
});
var puppeteering = createSkill("Puppeteering",{
name_pt: "Marionetismo",
desc_pt: "Tome o controle das sombras de seus inimigos. Pelo resto do combate, sempre que eles atacarem você, devem fazer um teste de Resiliência, se falharem, atacam a si mesmos.",
description: "Take control of your enemies shadows. For the rest of combat, whenever they would attack you they must make a Resilience test, if they fail, they attack themselves.",
categories: ["Spell", "Offensive", "Dark Magic", "Pact", "Debuff", "AOE"],
APCost: 3,
Manacost: 15,
cooldown: 7,
onUse: function(attacker) {
if (attacker === State.variables.character[1]) {
State.variables.enemyInstances.forEach(enemy => {
enemy.statusEffects.puppet = true;
})
} else {
State.variables.character[1].statusEffects.puppet = true;
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} takes control of their enemies shadows.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} toma controle das sombras de seus inimigos.`)
}
}
});
var consumeLight = createSkill("Consume Light",{
name_pt: "Consumir Luz",
desc_pt: "Cerca seus inimigos na mais completa escuridão, cegando-os por um turno e os danificando por 2d10.",
description: "Surround your enemies in pitch black darkness, blinding them for a turn and damaging them for 2d10.",
categories: ["Spell", "General", "Dark Magic", "Pact", "Debuff", "AOE"],
APCost: 2,
Manacost: 12,
cooldown: 2,
onUse: function(attacker) {
let damage = rollDice('2d10')
if (attacker.equipment.mainhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage
if (damage < 0) {
damage = 1
}
}
State.variables.enemyInstances.forEach(enemy => {
enemy.statusEffects.blind = true;
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage
})
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} consumes the light, leaving their enemies Blind and dealing to them ${damage} damage.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} consome a luz, deixando seus inimigos Cegos e os causando ${damage} de dano.`)
}
}
});
//Relay Damage: Damage and confuse an enemy, at the end of their turn, damage them again.
//Delay Damage: For 3 turns, negate all damage taken. When the effect dissipates, damage yourself by the combined value.
var infuseWeapon = createSkill("Infuse Weapon", {
name_pt: "Infundir Arma",
desc_pt: "Adiciona dano extra aos seus ataques. Quando lançado novamente, aumente o Dado em 1 passo e o Custo em 3.",
description: "Add extra 1d4 damage to your attacks. When cast again, increase the Dice by 1 step and the Cost by 3.",
categories: ["Spell", "Buff", "Defensive"],
APCost: 1,
cooldown: 1,
Manacost: 5,
onUse: function(attacker) {
var damageDice = '1d4';
if (attacker.statusEffects.infuseWeapon.Dice === '1d4') {
damageDice = '1d6';
} else if (attacker.statusEffects.infuseWeapon.Dice === '1d6') {
damageDice = '1d8';
attacker.currentMana -= 3
} else if (attacker.statusEffects.infuseWeapon.Dice === '1d8') {
damageDice = '1d10';
attacker.currentMana -= 6
} else if (attacker.statusEffects.infuseWeapon.Dice === '1d10') {
damageDice = '1d12';
attacker.currentMana -= 9
} else if (attacker.statusEffects.infuseWeapon.Dice === '1d12'){
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} cannot infuse more power to their weapon.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} não pode infudir mais poder em sua arma.`);
}
attacker.currentMana += 7;
attacker.AP += 1;
}
attacker.statusEffects.infuseWeapon = {
active: true,
Dice: damageDice,
};
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} infused their weapon, adding extra ${damageDice} of damage to their attacks.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} infude sua arma, adicionando ${damageDice} de dano extra para seus ataques.`);
}
}
})
//Shaman skills
var CallElements = createSkill("Call the Elements", {
name_pt: "Chamar os Elementos",
desc_pt: "Invoque um Totem Elemental aleatório. A partir do nível 5, 10 e 15, invoque um Totem adicional de um Elemento aleatório.",
description: "Summon a random Elemental totem. Starting at level 5, 10 and 15, summon one additional Totem of a random Element.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 10,
cooldown: 2,
onUse: function(attacker) {
let totem
let times = 0
attacker.level < 5 ? times = 1 : attacker.level < 10 ? times = 2 : attacker.level < 15 ? times = 3 : times = 4
for (let i = 0; i < times; i++) {
let rand = rollDice('1d4');
switch (rand) {
case 1:
if (attacker.traits.includes("Totem Carver")) {
totem = State.variables.summons.find(summon => summon.Name === "Improved Water Totem");
} else {
totem = State.variables.summons.find(summon => summon.Name === "Water Totem");
}
break;
case 2:
if (attacker.traits.includes("Totem Carver")) {
totem = State.variables.summons.find(summon => summon.Name === "Improved Air Totem");
} else {
totem = State.variables.summons.find(summon => summon.Name === "Air Totem");
}
break;
case 3:
if (attacker.traits.includes("Totem Carver")) {
totem = State.variables.summons.find(summon => summon.Name === "Improved Earth Totem");
} else {
totem = State.variables.summons.find(summon => summon.Name === "Earth Totem");
}
break;
case 4:
if (attacker.traits.includes("Totem Carver")) {
totem = State.variables.summons.find(summon => summon.Name === "Improved Fire Totem");
} else {
totem = State.variables.summons.find(summon => summon.Name === "Fire Totem");
}
break;
}
}
State.variables.allyInstances.push(totem)
}
})
var stormsurge = createSkill("Stormsurge", {
name_pt: "Surto de Relâmpagos",
desc_pt: "Invoque Relâmpagos para atacar um inimigo aleátorio, dando 1d10 de dano. Para cada Totem do Ar que você controla, invoque outro relâmpago contra um inimigo aleátorio.",
description: "Invoke Lightings to strike a random enemy, dealing 1d10 damage. For each Air Totem you control, invoke another lighting against a random enemy.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 10,
cooldown: 4,
onUse: function(attacker) {
let times = 1;
for (let i = 0; i < State.variables.allyInstances.length; i++) {
const summon = State.variables.allyInstances[i];
if (summon.traits.includes("Air Totem")) {
times++;
}
}
let totalDamage = 0;
for (let i = 0; i < times; i++) {
const enemies = State.variables.enemyInstances;
let poorsoul = enemies[Math.floor(Math.random() * enemies.length)];
let damage = rollDice('1d10');
if (poorsoul.statusEffects.WraithCurse) {
damage += rollDice(poorsoul.statusEffects.WraithCurse +'d4')
}
if (poorsoul.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
poorsoul.currentLife -= damage;
totalDamage += damage;
}
addToBattleLog(`${attacker.Name} calls the power of the storms, summoning ${times} lightning bolts, dealing a total of ${totalDamage} damage.`);
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Air Totem");
State.variables.allyInstances.push(totem);
}
}
});
var galeWinds = createSkill("Gale winds", {
name_pt: "Ventos Fortes",
desc_pt: "Enquanto ativo, todos ataque armado de Longa Distância irão errar você. Custa 6 Essência por turno.",
description: "While active, all Ranged weapon attacks will miss you. Cost 6 Essence per turn.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 6,
onUse: function(attacker){
attacker.statusEffects.galewinds = true
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Air Totem");
State.variables.allyInstances.push(totem)
}
}
})
var Rainfall = createSkill("Rainfall", {
name_pt: "Chuva",
desc_pt: "Abençoe a terra com a chuva, dividindo 1d6 pontos como cura para você mesmo ou como dano para seus inimigos. Adicione +1d6 pontos para cada Totem da Água que você controla.",
description: "Bless the land with rain, splitting 1d6 points as either healing to yourself or as damage to your enemies. Add +1d6 point for each Water Totem you control.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 10,
cooldown: 4,
onUse: function(attacker) {
let numDice = 1
let numSides = 6
for (let i = 0; i < State.variables.allyInstances.length; i++) {
const summon = State.variables.allyInstances[i];
if (summon.traits.includes("Water Totem")) {
numDice++
}
}
let points = rollDice(numDice + "d" + numSides)
let healing = 0
let damage = 0
for (let i = 0; i < points; i++) {
let chance = rollDice('1d4')
if (chance >= 3) {
const enemies = State.variables.enemyInstances
let poorsoul = enemies[Math.floor(Math.random() * enemies.length)];
if (attacker === State.variables.character[1]) {
poorsoul = enemies[Math.floor(Math.random() * enemies.length)];
} else {
poorsoul = State.variables.character[1];
}
if (poorsoul.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
poorsoul.currentLife--
damage++
} else {
attacker.currentLife++
healing++
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
}
addToBattleLog(`${attacker.Name} calls the power of the waters, summoning a rainfall to bless the land, healing themselves by ${healing} and damaging their enemies by ${damage}.}`)
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Water Totem");
State.variables.allyInstances.push(totem)
}
}
})
var tidealshift = createSkill("Shift the Tides", {
name_pt: "Mudança de Marés",
desc_pt: `Remova todos os efeitos de status negativos de si mesmo (<b>Sangramento</b>, <b>Envenenamento</b>, <b>Cegueira</b>, etc) e os aplique a todos os inimigos.`,
description: `Remove all negative status effect from self (<b>Bleeding</b>, <b>Poison</b>, <b>Stun</b>, <b>Blindness</b>, etc) and apply them to all enemies.`,
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 15,
coodown: 5,
onUse: function(attacker){
let burn = 0
let blind = false
let poison = 0
let bleed = 0
let stun = 0
let confused = 0
if (attacker.statusEffects.burn.duration > 0) {
burn = attacker.statusEffects.burn.duration
attacker.statusEffects.burn.duration = 0
}
if (attacker.statusEffects.poison > 0) {
poison = attacker.statusEffects.poison
attacker.statusEffects.poison = 0
}
if (attacker.statusEffects.bleed > 0) {
bleed = attacker.statusEffects.bleed
attacker.statusEffects.bleed = 0
}
if (attacker.statusEffects.stun > 0) {
stun = attacker.statusEffects.stun
attacker.statusEffects.stun = 0
}
if (attacker.statusEffects.confused > 0) {
confused = attacker.statusEffects.confused
attacker.statusEffects.confused = 0
}
if (attacker.statusEffects.blind === true) {
blind = true
attacker.statusEffects.blind = false
}
State.variables.enemyInstances.forEach(enemy => {
enemy.statusEffects.confused += confused
enemy.statusEffects.stun += stun
enemy.statusEffects.bleed += bleed
enemy.statusEffects.poison += poison
enemy.statusEffects.burn.duration += burn
enemy.statusEffects.blind = true
})
addToBattleLog(`${attacker.Name} Shifts the Tides, removing it's ${attacker.burn.duration > 0 ? "Burn," : ""} ${attacker.statusEffects.poison > 0 ? "Poison," : ""} ${attacker.statusEffects.bleed > 0 ? "Bleed," : ""} ${attacker.statusEffects.stun > 0 ? "Stun," : ""} ${attacker.statusEffects.confused > 0 ? "Confusion," : ""} ${attacker.statusEffects.blind === true ? "Blindness," : ""} and applying it to all enemies.`)
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Water Totem");
State.variables.allyInstances.push(totem)
}
}
})
var stonebody = createSkill("Turn to Stone", {
name_pt: "Corpo de Pedra",
desc_pt: "Até o começo de seu próximo turno, reduça todo dano recebido para 1.",
description: "Until the start of your next turn, reduce all damage taken to 1.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 15,
coodown: 9,
onUse: function(attacker){
attacker.statusEffects.stonebody = true
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Earth Totem");
State.variables.allyInstances.push(totem)
}
addToBattleLog(`${attacker.Name} skin roughens up, taking a rocky appearance.`)
}
})
var Tremors = createSkill("Tremors", {
name_pt: "Tremores",
desc_pt: "Pisoteie o chão duas vezes, balançando o campo de batalha e danificando seus inimigos por 1d4 de dano. Para cada Totem da Terra sobre seu controle, aumento o dano em 1d4.",
description: "Stomp the ground twice, shaking the battlefield and damaging your enemies by 1d4 damage. For each Earth Totem under your control, increase the damage by additional 1d4 damage.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 10,
cooldown: 4,
onUse: function(attacker) {
let numDice = 1
let numSides = 4
for (let i = 0; i < State.variables.allyInstances.length; i++) {
const summon = State.variables.allyInstances[i];
if (summon.traits.includes("Earth Totem")) {
numDice++
}
}
let damage = rollDice(numDice + "d" + numSides)
const enemies = State.variables.enemyInstances
enemies.forEach(enemy => {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage
})
shakeScreen()
addToBattleLog(`${attacker.Name} call the powers of the Earth to make the grounds tremble, dealing ${damage} to all enemies.`)
damage = rollDice(numDice + "d" + numSides)
enemies.forEach(enemy => {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage
})
shakeScreen()
addToBattleLog(`The grounds tremble again, dealing ${damage} to all enemies.`)
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Earth Totem");
State.variables.allyInstances.push(totem)
}
}
})
var Eruption = createSkill("Eruption", {
name_pt: "Erupção",
desc_pt: "Libere a fúria ardente contra um único inimigo, causando 1-30 de dano. O dano mínimo aumenta em 1 para cada Totem do Fogo sob seu controle.",
description: "Unleash the fiery fury upon a single enemy, dealing 1-30 damage. The minimum damage increases by 1 for each Fire Totem under your control.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 10,
cooldown: 4,
onUse: function(attacker, target) {
let min = 1
let max = 30
for (let i = 0; i < State.variables.summons.length; i++) {
const summon = State.variables.summons[i];
if (summon.traits.includes("Fire Totem") && min <= max) {
min++;
}
}
const damage = Math.round(Math.random(max, min));
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
addToBattleLog(`${attacker.Name} calls the fiery powers to unleashes an eruption upon ${target.Name}, dealing ${damage} damage.`);
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Fire Totem");
State.variables.allyInstances.push(totem)
}
}
})
var blazeStrike = createSkill("Blazing Strike", {
name_pt: "Golpe Incandescente",
desc_pt: "Imbua sua arma com chamas ardentes em seus próximos 2 ataques. Seus ataques aprimorados aplicarão Queima(2) ao alvo e adicionarão 1d4 acúmulos. Se o alvo já estiver em Queimando, aumente seus acúmulos em 4, em vez disso",
description: "Imbue your weapon with fiery flames for your next 2 attacks. Your improved attacks will apply Burn(2) to the target, and add 1d4 stacks. If the target is already Burning, increase it's stacks by 4, instead.",
categories: ["Spell", "Elemental", "Shamanic", "General"],
APCost: 2,
Manacost: 11,
coodown: 2,
onUse: function(attacker){
attacker.statusEffects.improvedAttack += 3;
attacker.statusEffects.molten = true
addToBattleLog(`${attacker.Name}'s ${attacker.equipment.mainhand.Name} combusts, your next 2 attacks surely will do the same to your opponents.`)
if (attacker.traits.includes("Totem Carver")) {
const totem = State.variables.summons.find(summon => summon.Name === "Improved Fire Totem");
State.variables.allyInstances.push(totem)
}
}
})
//Summons are a helpers to the character, they act at the start of your turn, each do a special feature and last until a new summon is called.
State.variables.summons = [];
class Summon extends character {
constructor(Name, Name_pt, stats, Ancestry, Specialization, AP, APregen, BaseDefense, Danger, STR, DEX, RES, INT, CHA, PER, traits, skills, equipment, additionalDefense, additionalDamage, additionalHitChance) {
super(Name, equipment, Ancestry, AP, APregen, STR, DEX, RES, INT, CHA, PER);
this.Name = Name;
this.Name_pt = Name_pt;
this.Ancestry = stats.Ancestry || "Unknown";
this.AP = stats.AP || 0;
this.APregen = stats.APregen || 0;
this.equipment = stats.equipment || {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
offhand: State.variables.Items["Other hand"],
mainhand: State.variables.Items["Fist"],
};
this.INT = stats.INT || 3;
this.DEX = stats.DEX || 3;
this.PER = stats.PER || 3;
this.STR = stats.STR || 3;
this.CHA = stats.CHA || 3;
this.RES = stats.RES || 3;
this.MAXLIFE = stats.MAXLIFE || 0;
this.MAXMANA = stats.MAXMANA || 0;
this.currentLife = stats.MAXLIFE;
this.currentMana = stats.MAXMANA;
this.baseDefense = stats.baseDefense || 0;
this.additionalDamage = stats.additionalDamage || 0;
this.additionalDefense = stats.additionalDefense || 0;
this.additionalHitChance = stats.additionalHitChance || 0;
this.skills = stats.skills || [];
this.traits = stats.traits || [];
this.behavior = stats.behavior || null;
}
}
function createSummon(Name, stats) {
const newSummon = new Summon(Name, stats.Name_pt, stats);
State.variables.summons.push(newSummon);
}
createSummon("Cursed Soul", {
Name_pt: "Alma Amaldiçoada",
Ancestry: "Undead",
Maxlife: 6,
traits: ["Undead", "Necromancy", "Summon"],
})
createSummon("Earth Totem", {
Name_pt: "Totem da Terra",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Earth Totem", "Summon", "Elemental"],
behavior: function() {
//For each Earth totem Increase Defense 3.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
//if player has ??? trait, then this totem deals 1 damage to all enemies
}
});
createSummon("Improved Earth Totem", {
Name_pt: "Totem da Terra Melhorado",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Earth Totem", "Summon", "Elemental"],
behavior: function() {
//For each Earth totem Increase Defense 3.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
//Improved Earth totem increases the player's maximum Lifeblood by 2 at the end of the turn.
let value = 2
State.variables.character[1].MAXLIFE += value
State.variables.character[1].statusEffects.earthvalue += value
}
});
// Fire Totem
createSummon("Fire Totem", {
Name_pt: "Totem do Fogo",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Fire Totem", "Summon", "Elemental"],
behavior: function() {
//For each Fire Totem, increase your Damage dealt by 3.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
}
});
createSummon("Improved Fire Totem", {
Name_pt: "Totem do Fogo Melhorado",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Fire Totem", "Summon", "Elemental"],
behavior: function() {
//For each Fire Totem, increase your Damage dealt by 3.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
//Improved Fire totem applies 1 burning to a random enemy, if the enemy is already burning, increase its stack.
const enemies = State.variables.enemyInstances
let poorsoul = enemies[Math.floor(Math.random() * enemies.length)]
poorsoul.statusEffects.burn.duration += 1
if (poorsoul.statusEffects.burn.duration > 0) {
poorsoul.statusEffects.burn.stacks += 1
}
}
});
// Water Totem
createSummon("Water Totem", {
Name_pt: "Totem da Água",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Water Totem", "Summon", "Elemental"],
behavior: function() {
//For each Water totem, decrease damage taken by 3.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
//if player has Wild Surge trait, then this totem deals 1 damage to all enemies
}
});
createSummon("Improved Water Totem", {
Name_pt: "Totem da Água",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Water Totem", "Summon", "Elemental"],
behavior: function() {
// Cleanse a random status at the start of your turn. For each Water totem, decrease damage taken by 3.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
State.variables.character[1].currentLife += Math.round((State.variables.character[1].MAXLIFE * 0.02))
if (State.variables.character[1].currentLife > State.variables.character[1].MAXLIFE) {
const enemies = State.variables.enemyInstances
let poorsoul = enemies[Math.floor(Math.random() * enemies.length)]
poorsoul.currentLife -= (State.variables.character[1].currentLife - State.variables.character[1].MAXLIFE)
State.variables.character[1].currentLife = State.variables.character[1].MAXLIFE
}
//if player has Wild Surge trait, then this totem deals 1 damage to all enemies
}
});
// Air Totem
createSummon("Air Totem", {
Name_pt: "Totem do Ar",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Air Totem", "Summon", "Elemental"],
behavior: function() {
// Gain 1 AP at the start of your turn. For each Air Totem increase Hit-Chance by 3.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
//if player has Wild Surge trait, then this totem deals 1 damage to all enemies
}
});
createSummon("Improved Air Totem", {
Name_pt: "Totem do Ar",
Ancestry: "Totem",
MAXLIFE: 99,
traits: ["Air Totem", "Summon", "Elemental"],
behavior: function() {
// Gain 1 AP at the start of your turn.
// Implement the behavior logic here if needed
if (State.variables.character[1].traits.includes("Wild Surge")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= 1
})
}
if (State.variables.character[1].statusEffects.castElement && State.variables.character[1].statusEffects.castElement === true) {
const enemies = State.variables.enemyInstances
let poorsoul = enemies[Math.floor(Math.random() * enemies.length)]
poorsoul.currentLife - rollDice('1d10')
}
//if player has Wild Surge trait, then this totem deals 1 damage to all enemies
}
});
createSummon("Undead Slave", {
Name_pt: "Escravo Morto-vivo",
Ancestry: "Undead",
MAXLIFE: 10,
STR: 12,
RES: 6,
INT: 1,
PER: 3,
CHA: 1,
DEX: 4,
AP: 0,
equipment: {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
offhand: State.variables.Items["Other hand"],
mainhand: State.variables.Items["Rusty sword"],
},
APregen: 1,
baseDefense: 5,
additionalDamage: 10,
additionalHitChance: 10,
additionalDefense: 5,
traits: ["Summon", "Undead"],
behavior: function() {
let attacker = State.variables.character[1];
if (attacker.level >= 5 && attacker.level < 10) {
this.RES = 8;
this.CHA = 3;
this.DEX = 6;
this.INT = 3;
this.PER = 5;
this.STR = 14;
this.equipment.mainhand = State.variables.Items["Short sword"];
} else if (attacker.level >= 10 && attacker.level < 15) {
this.RES = 10;
this.CHA = 5;
this.DEX = 8;
this.INT = 5;
this.PER = 7;
this.STR = 16;
this.equipment.mainhand = State.variables.Items["Sword"];
} else if (attacker.level >= 15) {
this.RES = 12;
this.CHA = 7;
this.DEX = 10;
this.INT = 7;
this.PER = 9;
this.STR = 18;
this.equipment.mainhand = State.variables.Items["Greatsword"];
this.equipment.offhand = State.variables.Items["Handle"];
this.APregen = 2;
}
// Find the weakest enemy
var enemies = State.variables.enemyInstances;
let weakestEnemy = enemies[0];
for (let i = 1; i < enemies.length; i++) {
if (enemies[i].currentLife < weakestEnemy.currentLife) {
weakestEnemy = enemies[i];
}
}
// Use the triggerAttack function for the Undead helper's attack
this.additionalDamage = 10 + State.variables.Graveyard.length;
this.AP += this.APregen;
window.triggerAttack(this, weakestEnemy, this.equipment.mainhand);
// Check if the attack killed the weakest enemy
if (weakestEnemy.currentLife <= 0 && enemies.length > 0) {
// If it killed the enemy, make another strike
const availableEnemies = State.variables.enemyInstances.filter(enemy => enemy !== weakestEnemy);
if (availableEnemies.length > 0) {
// Select a random index withi the availableEnemies array
const randomIndex = Math.floor(Math.random() * availableEnemies.length);
let nextEnemy= enemies[randomIndex];
// Use the triggerAttack function for the Undead helper's second attack
this.AP += this.APregen;
this.additionalDamage = 10 + State.variables.Graveyard.length;
window.triggerAttack(this, nextEnemy, this.equipment.mainhand);
}
}
}
});
createSummon("False Lich", {
Name_pt: "Lich Falso",
Ancestry: "Undead",
MAXLIFE: 4,
MAXMANA: 999,
STR: 2,
RES: 3,
INT: 12,
PER: 3,
CHA: 1,
DEX: 3,
APregen: 3,
AP: 0,
baseDefense: 5,
additionalDamage: 10,
additionalHitChance: 10,
additionalDefense: 5,
skills: [],
traits: ["Summon", "Undead"],
equipment: {
head: State.variables.Items["Hood"],
torso: State.variables.Items["Robes"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
offhand: State.variables.Items["Speelbook"],
mainhand: State.variables.Items["Wand"],
},
behavior: function() {
let attacker = State.variables.character[1];
if (attacker.level >= 5 && attacker.level < 10) {
this.RES = 5;
this.CHA = 3;
this.DEX = 5;
this.INT = 14;
this.PER = 5;
this.STR = 4;
} else if (attacker.level >= 10 && attacker.level < 15) {
this.RES = 7;
this.CHA = 5;
this.DEX = 7;
this.INT = 16;
this.PER = 7;
this.STR = 6;
} else if (attacker.level >= 15) {
this.RES = 9;
this.CHA = 7;
this.DEX = 9;
this.INT = 18;
this.PER = 9;
this.STR = 8;
}
this.AP = this.APregen;
this.currentMana = this.MAXMANA;
// Cast a spell
const spells = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost < this.currentMana && skill.AP < this.AP);
const selectedSpell = spells[Math.floor(Math.random() * spells.length)];
// Find a random enemy target
const enemies = State.variables.enemyInstances;
const randomEnemy = enemies[Math.floor(Math.random() * enemies.length)];
this.additionalDamage = this.INT + State.variables.Graveyard.length;
// Apply the selected spell to the random enemy target
window.useSkill(this, selectedSpell, randomEnemy);
if (randomEnemy.currentLife < 0) {
this.currentLife += 2;
this.skills.forEach(skill => {
skill.inCooldown = 0;
});
}
}
})
const falseLichSummon = State.variables.summons.find(summon => summon.Name === "False Lich");
falseLichSummon.addSkill("Freeze");
falseLichSummon.addSkill("Bone Missile");
falseLichSummon.addSkill("Soul Syphon");
falseLichSummon.addSkill("Reap");
// Create the summon
createSummon("Elemental Anomaly", {
Name_pt: "Anomália Elemental",
Ancestry: "Elemental",
MAXMANA: 10000,
MAXLIFE: 5,
INT: 9,
PER: 6,
baseDefense: 5,
additionalDamage: 0,
additionalHitChance: 0,
additionalDefense: 10,
skills: [],
traits: ["Summon", "Elemental"],
equipment: {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
offhand: State.variables.Items["Speelbook"],
mainhand: State.variables.Items["Fist"],
},
behavior: function() {
this.AP = this.APregen;
this.currentMana = this.MAXMANA;
let attacker = State.variables.character[1];
if (attacker.level >= 5 && attacker.level < 10) {
this.RES = 5;
this.CHA = 5;
this.DEX = 5;
this.INT = 11;
this.PER = 8;
this.STR = 5;
} else if (attacker.level >= 10 && attacker.level < 15) {
this.RES = 7;
this.CHA = 7;
this.DEX = 7;
this.INT = 13;
this.PER = 10;
this.STR = 7;
} else if (attacker.level >= 15) {
this.RES = 9;
this.CHA = 9;
this.DEX = 9;
this.INT = 15;
this.PER = 12;
this.STR = 9;
}
// Check if a spell has been cast this turn
if (attacker.statusEffects.castASpellthisTurn) {
// Reset cooldown for all skills
this.skills.forEach(skill => {
if (skill.inCooldown > 0)
skill.inCooldown = 0;
});
// Filter available spells based on cooldown, mana, and action points
this.additionalDamage = this.INT;
const spells = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost < this.currentMana && skill.AP < this.AP);
// Randomly select a spell from available spells
const selectedSpell = spells[Math.floor(Math.random() * spells.length)];
// Find a random enemy target
const enemies = State.variables.enemyInstances;
const randomEnemy = enemies[Math.floor(Math.random() * enemies.length)];
// Apply the selected spell to the random enemy target
window.useSkill(this, selectedSpell, randomEnemy);
}
}
})
// Add skills to the summon
const elementalSummoned = State.variables.summons.find(summon => summon.Name === "Elemental Anomaly");
elementalSummoned.addSkill("Freeze");
elementalSummoned.addSkill("Fire Bolt");
elementalSummoned.addSkill("Lightning Strike");
createSummon("Spiritual Helper", {
Name_pt: "Auxiliar Espiritual",
Ancestry: "Daemon",
MAXLIFE: 10,
RES: 9,
CHA: 6,
baseDefense: 10,
additionalDamage: 0,
additionalHitChance: 0,
additionalDefense: 15,
traits: ["Summon", "Spirit"],
behavior: function() {
// Recover a bit of Lifeblood and Essence for the summoner (attacker)
let attacker = State.variables.character[1];
if (attacker.level >= 5 && attacker.level < 10) {
this.RES = 11;
this.CHA = 8;
this.DEX = 5;
this.INT = 5;
this.PER = 5;
this.STR = 5;
} else if (attacker.level >= 10 && attacker.level < 15) {
this.RES = 13;
this.CHA = 10;
this.DEX = 7;
this.INT = 7;
this.PER = 7;
this.STR = 7;
} else if (attacker.level >= 15) {
this.RES = 15;
this.CHA = 12;
this.DEX = 9;
this.INT = 9;
this.PER = 9;
this.STR = 9;
}
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= this.RES
enemy.currentEssence -= this.CHA
})
let healing = this.RES
if (attacker.traits.includes("Battle-Medic")) {
healing += 5
}
attacker.currentLife += healing; // Adjust the amount as needed
attacker.currentEssence += this.CHA; // Adjust the amount as needed
}
});
createSummon("Shadow Daemon", {
Name_pt: "Demônio Sombrio",
Ancestry: "Daemon",
MAXLIFE: 20,
STR: 3,
DEX: 3,
RES: 9,
INT: 3,
PER: 6,
CHA: 3,
turnsAlive: 0,
storedMana : 0,
traits: ["Summon", "Pact Creature", "Daemon"],
behavior: function() {
let summoner = State.variables.character[1];
if (summoner.level >= 5 && summoner.level < 10) {
this.RES = 11;
this.CHA = 5;
this.DEX = 5;
this.INT = 5;
this.PER = 8;
this.STR = 5;
} else if (summoner.level >= 10 && summoner.level < 15) {
this.RES = 13;
this.CHA = 7;
this.DEX = 7;
this.INT = 7;
this.PER = 10;
this.STR = 7;
} else if (summoner.level >= 15) {
this.RES = 15;
this.CHA = 9;
this.DEX = 9;
this.INT = 9;
this.PER = 12;
this.STR = 9;
}
this.turnsAlive += 1;
if (this.turnsAlive >= 0 && summoner.currentMana >= 2) {
summoner.currentMana -= 2;
this.consumedMana += 2
} else {
this.currentLife -= 5;
if (State.variables.language === "EN") {
addToBattleLog(`${summoner.Name} cannot keep their daemon under their control for much more time`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${summoner.Name} não será capaz de manter seu demônio sobre seu controle por muito tempo.`)
}
}
if (this.currentLife <= 1) {
summoner.currentMana += this.storedMana + Math.round((summoner.INT /3));
if (State.variables.language === "EN") {
addToBattleLog(`${summoner.Name}'s demon has returned to your shadow, you were able to reclaim ${this.storedMana + Math.round((summoner.INT /3))} of the consumed Essence back.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`O demônio de ${summoner.Name} retornou para sua sombra, você foi capaz de resgater ${this.storedMana + Math.round((summoner.INT /3))} de sua Essência consuminda`)
}
this.consumedMana = 0;
}
}
})
createSummon("Cat Familiar", {
Name_pt: "Gato Familiar",
Ancestry: "Construct",
MAXLIFE: 5,
INT: 3,
DEX: 3,
PER: 3,
STR: 3,
CHA: 3,
RES: 3,
traits: ["Summon", "Arcane", "Familiar"],
behavior: function () {
let attacker = State.variables.character[1];
if (attacker.level >= 5 && attacker.level < 10) {
this.RES = 4;
this.CHA = 4;
this.DEX = 4;
this.INT = 4;
this.PER = 4;
this.STR = 4;
} else if (attacker.level >= 10 && attacker.level < 15) {
this.RES = 5;
this.CHA = 5;
this.DEX = 5;
this.INT = 5;
this.PER = 5;
this.STR = 5;
} else if (attacker.level >= 15) {
this.RES = 6;
this.CHA = 6;
this.DEX = 6;
this.INT = 6;
this.PER = 6;
this.STR = 6;
}
let value1 = this.DEX * State.variables.allyInstances;
let value2 = this.INT * State.variables.allyInstances;
if (State.variables.character[1].statusEffects.castASpellthisTurn) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= value1
enemy.statusEffects.bleed = Math.round((value2 / 3))
})
if (State.variables.language === "EN") {
addToBattleLog(`Your ${this.Name} scrathes all enemies, damaging them for ${value1}, making them bleed for ${Math.round((value2 / 3))} turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Seu ${this.Name_pt} irrita seus inimigos, redugindo sua Chance de Acerto por ${value1 + value2}.`)
}
}
}
})
createSummon("Raven Familiar", {
Name_pt: "Corvo Familiar",
Ancestry: "Construct",
MAXLIFE: 5,
INT: 3,
DEX: 3,
PER: 3,
STR: 3,
CHA: 3,
RES: 3,
traits: ["Summon", "Arcane", "Familiar"],
behavior: function () {
let attacker = State.variables.character[1];
if (attacker.level >= 5 && attacker.level < 10) {
this.RES = 4;
this.CHA = 4;
this.DEX = 4;
this.INT = 4;
this.PER = 4;
this.STR = 4;
} else if (attacker.level >= 10 && attacker.level < 15) {
this.RES = 5;
this.CHA = 5;
this.DEX = 5;
this.INT = 5;
this.PER = 5;
this.STR = 5;
} else if (attacker.level >= 15) {
this.RES = 6;
this.CHA = 6;
this.DEX = 6;
this.INT = 6;
this.PER = 6;
this.STR = 6;
}
let value1 = this.DEX * State.variables.allyInstances;
let value2 = this.INT * State.variables.allyInstances;
if (State.variables.character[1].statusEffects.castASpellthisTurn) {
State.variables.enemyInstances.forEach(enemy => {
enemy.additionalHitChance -= value1 + value2;
})
if (State.variables.language === "EN") {
addToBattleLog(`Your ${this.Name} annoys your enemies, reducing their hit chance by ${value1 + value2}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Seu ${this.Name_pt} irrita seus inimigos, redugindo sua Chance de Acerto por ${value1 + value2}.`)
}
}
}
})
createSummon("Snake Familiar", {
Name_pt: "Cobra Familiar",
Ancestry: "Construct",
MAXLIFE: 5,
INT: 3,
DEX: 3,
PER: 3,
STR: 3,
CHA: 3,
RES: 3,
traits: ["Summon", "Arcane", "Familiar"],
behavior: function () {
let attacker = State.variables.character[1];
if (attacker.level >= 5 && attacker.level < 10) {
this.RES = 4;
this.CHA = 4;
this.DEX = 4;
this.INT = 4;
this.PER = 4;
this.STR = 4;
} else if (attacker.level >= 10 && attacker.level < 15) {
this.RES = 5;
this.CHA = 5;
this.DEX = 5;
this.INT = 5;
this.PER = 5;
this.STR = 5;
} else if (attacker.level >= 15) {
this.RES = 6;
this.CHA = 6;
this.DEX = 6;
this.INT = 6;
this.PER = 6;
this.STR = 6;
}
let value1 = this.DEX * State.variables.allyInstances;
let value2 = this.INT * State.variables.allyInstances;
if (State.variables.character[1].statusEffects.castASpellthisTurn) {
var randomEnemy = enemies[Math.floor(Math.random() * enemies.length)];
randomEnemy.statusEffects.poison += value2;
randomEnemy.currentLife -= value1 * 2
if (State.variables.language === "EN") {
addToBattleLog(`Your ${this.Name} bites ${randomEnemy.Name}, damaging them for ${value1 * 2} and <b>poisoning</b> them for ${value2}.`)
//When you cast a spell during your turn, poison a random enemy for 2 turns.
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Your ${this.Name_pt} morde ${randomEnemy.Name_pt}, os danificando por ${value1 * 2} e os <b>envenenando</b> por ${value2}.`)
}
}
}
})
var familiarSummon = createSkill("Summon: Familiar", {
name_pt: "Invocar: Familiar",
desc_pt: "Invoca um familiar Gato, Cobra ou Corvo para ajudá-lo. Eles agem se você lançar um feitiço durante seu turno.",
description: "Summon a Cat, Snake or Raven familiar to help you. They act if you have cast a Spell during your turn.",
categories: ["Spell", "Summon", "Arcane"],
APCost: 2,
Manacost: 8,
onUse: function (attacker) {
let availableFamiliars = [];
let fam = ""
if (!State.variables.allyInstances.some(instance => instance.Name === "Cat Familiar")) {
availableFamiliars.push("Cat Familiar");
if (State.variables.language === "EN") {
fam = "Cat"
} else if (State.variables.language === "PT-BR") {
fam = "Gato"
}
}
if (!State.variables.allyInstances.some(instance => instance.Name === "Raven Familiar")) {
availableFamiliars.push("Raven Familiar");
if (State.variables.language === "EN") {
fam = "Raven"
} else if (State.variables.language === "PT-BR") {
fam = "Corvo"
}
}
if (!State.variables.allyInstances.some(instance => instance.Name === "Snake Familiar")) {
availableFamiliars.push("Snake Familiar");
if (State.variables.language === "EN") {
fam = "Snake"
} else if (State.variables.language === "PT-BR") {
fam = "Cobra"
}
}
if (availableFamiliars.length > 0) {
const randomIndex = Math.floor(Math.random() * availableFamiliars.length);
const randomFamiliar = availableFamiliars[randomIndex];
const summonedFamiliar = State.variables.summons.find(summon => summon.Name === randomFamiliar);
State.variables.allyInstances.push(summonedFamiliar);
if (State.variables.language === "EN") {
addToBattleLog(`A familiar has been summoned! Surges forth a ${fam} to aid you in combat.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Um familiar foi invocado! Surge um ${fam} para ajuda-lo em combate.`);
}
} else {
// Refund AP and Manacost if no familiar is available
attacker.AP += this.APCost;
attacker.MP += this.Manacost;
if (State.variables.language === "EN") {
addToBattleLog(`No familiar answered your call, since they are all in the battlefield. Your Action points and Essence has been refunded.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Nenhum familiar atendeu a seu chamado, já que todos já estão presentes no compo de batalha. Seus Pontos de Ação e Essência foram restaurados.`);
}
}
}
});
var shadowSummon = createSkill("Summon: Shadow", {
name_pt: "Invocar: Sombra",
desc_pt: "Invoca o demônio ligado à sua sombra para lutar e morrer em seu nome.",
description: "Summons the daemon bounded in your Shadow to fight and die in your name.",
categories: ["Spell", "Summon", "Pact", "Daemon-touched"],
APCost: 2,
cooldown: 10,
Manacost: 4,
onUse: function(attacker) {
State.variables.summons[3].turnsAlive = 0;
State.variables.summons[3].consumedMana = 0;
let invoked = State.variables.summons.find(summon => summon.Name === "Shadow Daemon");
State.variables.allyInstances.push(invoked);
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summoned forth a daemon from their shadow to aid them in battle.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invocou o demonio de sua sombra para ajuda-lo em batalha.`)
}
}
})
//Summon: Undead.
var undeadSummon = createSkill("Summon: Undead", {
name_pt: "Invocar: Morto-vivo",
desc_pt: "Invoca um escravo morto-vivo para lutar e morrer em seu nome.",
description: "Summons an Undead slave to fight and die in your name.",
categories: ["Spell", "Summon", "Necromancy"],
APCost: 2,
cooldown: 10,
Manacost: 10,
onUse: function(attacker) {
let invoked = State.variables.summons.find(summon => summon.Name ==="Undead Slave");
State.variables.allyInstances.push(invoked);
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summoned forth an Undead slave to fight for them in battle.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invocou um Escravo Morto-vivo para lutar por ele em combate.`)
}
}
});
//Summon: Elemental
var elementalSummon = createSkill("Summon: Elemental", {
name_pt: "Invocar: Elemental",
desc_pt: "Invoca uma Anomalia Elemental para desencadear sua fúria sobre teus inimigos. Se você lançar um feitiço durante seu turno, ele lança aleatoriamente Raio de Fogo, Congelar ou Golpe de Relâmpago.",
description: "Summons a Elemental Anomaly to unleash its fury upon thy enemies. If you cast a spell during your turn, it ramdoly casts Fire Bolt, Freeze or Lighting Strike",
categories: ["Spell", "Summon", "Elemental"],
APCost: 2,
cooldown: 10,
Manacost: 10,
onUse: function(attacker) {
let invoked = State.variables.summons.find(summon => summon.Name === "Elemental Anomaly");
State.variables.allyInstances.push(invoked);
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summoned forth an Elemental Anomaly to aid them in battle.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invocou uma Anomalia Elemental para ajuda-lo em combate.`)
}
}
});
//Summon: Spirit.
var spiritSummon = createSkill("Summon: Spirit", {
name_pt: "Invocar: Espírito",
desc_pt: "Invoca um místico Auxiliar Espiritual para ajudá-lo no combate, ele drena a Força Vital e a Essência dos inimigos.",
description: "Summons a mystical Spiritual Helper to aid you in combat, they drains enemies lifeblood and essence.",
categories: ["Spell", "Summon", "Arcane"],
APCost: 2,
cooldown: 10,
Manacost: 10,
onUse: function(attacker) {
let invoked = State.variables.summons.find(summon => summon.Name === "Spiritual Helper");
State.variables.allyInstances.push(invoked);
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} summoned forth a Spiritual Helper to aid them in battle.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} invocou um Auxiliar Espiritual para ajuda-lo em combate.`)
}
}
});
//Artist
var earworm = createSkill("Earworm", {
name_pt: "Música Colante",
desc_pt: "Diminui o dano e a chance de acerto de todos os inimigos por 2 (+ 1/3 de sua Carisma) turnos.",
categories: ["Spell", "Ballad", "General", "AOE"],
description: "Decreases damage and hit chance of all enemies for 2 (+ 1/3 of your Charisma) turns.",
debuff: ["Damage", "Hit Chance"],
APCost: 1,
duration: 3,
cooldown: 4,
learned: false,
Manacost: 8,
onUse: function(attacker) {
// Decrease damage and hit chance of all enemies for 5 turns.
if (attacker === State.variables.character[1]) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.earwormDuration && enemy.statusEffects.earwormDuration > 0) {
if (attacker.traits.includes("Magnum Opus")) {
enemy.statusEffects.earwormDuration += 1
attacker.currentLife += enemy.statusEffects.earwormDuration
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
} else {
enemy.statusEffects.earwormDuration += 2 + Math.round((attacker.CHA / 3));
}
} else {
enemy.statusEffects.earwormDuration = 2 + Math.round((attacker.CHA / 3));
if (attacker.level < 5) {
enemy.additionalDamage -= 5;
enemy.additionalHitChance -= 10;
enemy.statusEffects.earwormValue = [5,10]
} else if (attacker.level >= 5 && attacker.level < 10) {
enemy.additionalDamage -= 10;
enemy.additionalHitChance -= 15;
enemy.statusEffects.earwormValue = [10,15]
} else {
enemy.additionalDamage -= 15;
enemy.additionalHitChance -= 20;
enemy.statusEffects.earwormValue = [15,20]
}
}
if (attacker.traits.includes("Magnum Opus")) {
enemy.statusEffects.earwormDuration += 1
attacker.currentLife += enemy.statusEffects.earwormDuration
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
} else {
enemy.statusEffects.earwormDuration += 2 + Math.round((attacker.CHA / 3));
}
});
} else {
if (State.variables.character[1].statusEffects.earwormDuration && State.variables.character[1].statusEffects.earwormDuration > 0) {
if (attacker.traits.includes("Magnum Opus")) {
State.variables.character[1].statusEffects.earwormDuration += 1
attacker.currentLife += State.variables.character[1].statusEffects.earwormDuration
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
} else {
State.variables.character[1].statusEffects.earwormDuration += 2 + Math.round((attacker.CHA / 3));
}
} else {
if (attacker.level < 5) {
State.variables.character[1].additionalDamage -= 5;
State.variables.character[1].additionalHitChance -= 10;
State.variables.character[1].statusEffects.earwormValue = [5,10]
} else if (attacker.level >= 5 && attacker.level < 10) {
State.variables.character[1].additionalDamage -= 10;
State.variables.character[1].additionalHitChance -= 15;
State.variables.character[1].statusEffects.earwormValue = [10,15]
} else {
State.variables.character[1].additionalDamage -= 15;
State.variables.character[1].additionalHitChance -= 20;
State.variables.character[1].statusEffects.earwormValue = [15,20]
}
if (attacker.traits.includes("Magnum Opus")) {
State.variables.character[1].statusEffects.earwormDuration += 1
attacker.currentLife += State.variables.character[1].statusEffects.earwormDuration
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
} else {
State.variables.character[1].statusEffects.earwormDuration += 2 + Math.round((attacker.CHA / 3));
}
}
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} sang a Earworm, decreasing damage and hit chance of all enemies while the song keeps repeating over and over again in their ears.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} cantou uma Música Colante, diminuindo o dano e a chance de acerto de todos os inimigos enquanto a música se repetia continuamente em seus ouvidos`)
}
}
});
var healingSong = createSkill("Healing Song", {
name_pt: "Canção de Cura",
desc_pt: "Ganhe regeneração(5). Nos níveis 5, 10 e 15, aumente o valor em 2.",
categories: ["Spell", "Ballad", "Defensive", "Healing", "Buff"],
APCost: 1,
description: "Gain regeneration (5). At level 5, 10 and 15, increase the value by 2.",
cooldown: 4,
learned: false,
Manacost: 11,
onUse: function(attacker) {
// Gain regeneration for a certain number of turns based on attacker's level
let regenerationDuration;
if (attacker.level < 5) {
regenerationDuration = 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
regenerationDuration = 7;
} else if (attacker.level >= 10 && attacker.level < 15) {
regenerationDuration = 9;
} else if (attacker.level >= 15) {
regenerationDuration = 11;
}
if (attacker.traits.includes("Magnum Opus")) {
regenerationDuration += 1
attacker.currentLife += regenerationDuration
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
let totalLifeRecovered = 0;
for (let i = regenerationDuration; i > 0; i--) {
totalLifeRecovered += i;
}
attacker.statusEffects.regeneration = regenerationDuration;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} sang the Healing Song, starting to regenerate ${totalLifeRecovered} of its Lifeblood over ${regenerationDuration} turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} cantou a Canção da Cura começando a regenerar ${totalLifeRecovered} de sua Força Vital perdida durante ${regenerationDuration} tunos.`);
}
}
});
var warSong = createSkill("War Song", {
name_pt: "Canção de Guerra",
desc_pt: "Adiciona metade da sua Carisma ao seu Dano por 3 (+ 1/3 da sua Carisma) turnos.",
categories: ["Spell", "Ballad", "Buff"],
description: "Add half of your Charisma to your Damage for 3 (+ 1/3 of your Charisma) turns.",
buff: ["Damage"],
APCost: 1,
cooldown: 7,
learned: false,
Manacost: 7,
onUse: function(attacker) {
// Add half of attacker's Charisma to damage for 6 turns when attacking
attacker.statusEffects.warSongDuration = 3 + Math.round((attacker.CHA / 3));
if (attacker.traits.includes("Magnum Opus")) {
attacker.statusEffects.warSongDuration += 1
attacker.currentLife += attacker.statusEffects.warSongDuration
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} sang the War Song, increasing their damage by half of their Charisma (${Math.round((attacker.CHA / 2))}) for ${4 + Math.round((attacker.CHA / 3))} turns.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} cantou a Canção da Guerra, aumentando seu dano por metade de sua Carisma (${Math.round((attacker.CHA / 2))}) por ${4 + Math.round((attacker.CHA / 3))} turnos.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} sang the War Song, increasing their damage by half of their Charisma (${Math.round((attacker.CHA / 2))}) for ${3 + Math.round((attacker.CHA / 3))} turns.`);
} else if (State.variables.language === "PT-BR") {addToBattleLog(`${attacker.Name_pt} cantou a Canção da Guerra, aumentando seu dano por metade de sua Carisma (${Math.round((attacker.CHA / 2))}) por ${3 + Math.round((attacker.CHA / 3))} turnos.`);
}
}
}
});
var inspire = createSkill("Inspire", {
name_pt: "Inspirar",
desc_pt: "Aumenta sua capacidade de combate, aumentando sua Defesa e Chance de Acerto pela metade da sua Carisma. Dura a batalha inteira.",
categories: ["Spell", "Ballad", "Buff", "Defensive"],
description: "Bolster you combat prowess, increasing your Defense and Hit Chance by your 1/2 of your Charima. Lasts for the whole combat",
buff: ["HitChance", "Defense"],
APCost: 1,
cooldown: 30,
Manacost: 6,
onUse: function(attacker) {
if (attacker === State.variables.character[1]) {
attacker.additionalDefense += Math.round((attacker.CHA / 3));
attacker.additionalHitChance += Math.round((attacker.CHA / 3));
attacker.statusEffects.inspire = true
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} inspres their allies!`);
} else if (State.variables.language === "PT-BR") {addToBattleLog(`${attacker.Name_pt} inspira seus aliados!`);
}
State.variables.enemyInstances.forEach(enemy => {
enemy.additionalDefense += Math.round((attacker.CHA / 3));
enemy.additionalHitChance += Math.round((attacker.CHA / 3));
enemy.statusEffects.inspire = true
})
}
}
});
var boom = createSkill("BOOM!", {
name_pt: "BOOM!",
desc_pt: "Cria uma explosão trovejante que desabilita um inimigo. A partir do nível 10, atinge todos os inimigos.",
categories: ["Spell", "Ballad", "Offensive", "Debuff"],
description: "Create a thunderous blast of sound that disables an enemy. Starting at level 10, it hits all enemies.",
debuff: ["Hindered", "Stunned"],
APCost: 2,
cooldown: 8,
Manacost: 7,
onUse: function(attacker, target) {
if (attacker.equipment.mainhand.Type.includes("instrument") || attacker.equipment.offhand.Type.includes("instrument")) {
var damage = 8 + rollDice('1d8');
} else {
var damage = rollDice('2d8');
}
if (attacker.level > 10) {
if (!this.categories.includes("AOE")) {
this.categories.push("AOE")
}
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in enemy.equipment) {
if (enemy.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage
enemy.statusEffects.stunned += 1.
enemy.statusEffectst.hindered += 1.
if (attacker.traits.includes("Magnum Opus")) {
attacker.currentLife += 4
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
enemy.statusEffects.stunned += 1.
enemy.statusEffectst.hindered += 1.
}
})
} else {
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage
target.statusEffects.stunned += 1.
target.statusEffectst.hindered += 1.
if (attacker.traits.includes("Magnum Opus")) {
attacker.currentLife += 4
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
target.statusEffects.stunned += 1.
target.statusEffectst.hindered += 1.
}
}
}
}
});
var odeDead = createSkill("Ode to the Dead", {
name_pt: "Ode aos Mortos",
desc_pt: "Cante uma canção que faz os mortos levantarem mais uma vez para atacar seus inimigos. Cada inimigo on Cemitério realiza um ataque armado contra um inimigo aleátorio.",
categories: ["Spell", "Ballad","Offensive", "Necromancy"],
description: "Sing a song that makes the dead rise once again to attack your enemies. Each enemy on the Graveyard makes a weapon strike against a random enemy.",
APCost: 3,
cooldown: 8,
Manacost: 18,
onUse: function(attacker) {
let graveyard = State.variables.Graveyard
if (graveyard.length > 0) {
for (let i = 0; i < graveyard.length;i++) {
let enemy = State.variables.enemyInstances[Math.floor(Math.random() * State.variables.enemyInstances)]
let hit = calculateHitChance(graveyard[i], enemy, graveyard[i].equipment.mainhand)
if (hit) {
let damage = calculateDamage(graveyard[i], enemy, graveyard[i].equipment.mainhand);
applyDamage(graveyard[i], enemy, damage, graveyard[i].equipment.mainhand);
}
if (enemy.equipment.offhand.Type.includes("weapon")) {
hit = calculateHitChance(graveyard[i], enemy, graveyard[i].equipment.offhand)
if (hit) {
damage = calculateDamage(graveyard[i], enemy, graveyard[i].equipment.offhand);
applyDamage(graveyard[i], enemy, damage, graveyard[i].equipment.offhand);
}
}
}
} else {
attacker.currentMana += this.Manacost;
attacker.AP += this.APCost;
if (State.variables.language === "EN") {
addToBattleLog(`There are no dead to sing to.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Não há mortos para cantar.`);
}
}
}
});
var dragonSong = createSkill("Dragon's Hym", {
name_pt: "Hino dos Dragões",
desc_pt: "Enquanto ativa, seus ataques aplicam Queimadura(2) ao alvo, custa 5 de Essência por turno. No nível 5, ativar a habilidade novamente ativa a Queimadura de todos os inimigos.",
categories: ["Spell", "Ballad", "Debuff", "General", "Hym"],
description: "While active, your attacks apply Burn(2) to the target, cost 5 Essence per turn. At level 5, activatin the skill again triggers the Burn of all enemies.",
APCost: 1,
cooldown: 0,
Manacost: 12,
onUse: function(attacker) {
if (attacker.level >= 5) {
if (attacker.statusEffects.hym && attacker.statusEffects.hym.active && attacker.statusEffects.hym.name === "Dragon's Hym") {
let damage = 0
let burndamage
if (attacker === State.variables.character[1]) {
State.variables.enemyInstance.forEach(enemy =>{
if (enemy.statusEffects.burn.duration > 0) {
damage = enemy.statusEffects.burn.damage * enemy.statusEffects.burn.stacks
enemy.currentLife -= damage
burndamage += damage
}
})
} else {
damage = State.variables.character[1].statusEffects.burn.damage * State.variables.character[1].statusEffects.burn.stacks
State.variables.character[1].currentLife -= damage
burndamage += damage
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} sings the Dragon's Hym again, burning their enemies for ${burndamage} Damage.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} cante o Hino dos Dragões novamente, queimando seus inimigos em ${burndamage} de Dano.`);
}
}
}
attacker.statusEffects.hym = {name: "Dragon's Hym",
active: true,
}
}
});
var echo = createSkill("Echo", {
name_pt: "Eco",
desc_pt: "Na próxima vez que você fizer um ataque com arma, faça outro. A cada 5 níveis, aumente o número de ataques adicionais feitos.",
categories: ["Spell", "Ballad", "Buff", "General"],
description: "The next time you make an weapon attack, make another. Every 5 levels, increase the number of additional attacks made.",
APCost: 2,
cooldown: 10,
Manacost: 11,
onUse: function(attacker) {
attacker.statusEffects.echo.active = true
if (attacker.level < 5) {
attacker.statusEffects.echo.extra = 1;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.statusEffects.echo.extra = 2;
} else if (attacker.level >= 10 && attacker.level < 15) {
attacker.statusEffects.echo.extra = 3;
} else if (attacker.level >= 15 && attacker.level < 20) {
attacker.statusEffects.echo.extra = 4;
} else if (attacker.level === 20) {
attacker.statusEffects.echo.extra = 5;
}
}
});
var crescendo = createSkill("Crescendo", {
categories: ["Spell", "Ballad", "Defensive", "Buff"],
description: "For 3 turns, each subsequent attack increases the damage of the next attack by 5%. (Max of 65%)",
APCost: 2,
cooldown: 8,
learned: false,
Manacost: 12,
onUse: function (attacker) {
// Apply the Crescendo effect
attacker.statusEffects.crescendoDuration += 3;
attacker.statusEffects.crescendoBonus = 0; // Initialize the bonus
if (attacker.traits.includes("Magnum Opus")) {
attacker.statusEffects.crescendoDuration += 1.
attacker.currentLife += attacker.statusEffects.crescendoDuration
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
}
});
var songOfHeroes = createSkill("Song of Heroes", {
name_pt: "Canção dos Heróis",
desc_pt: "Aumente sua Chance de Arcerto, Defesa e Dano em 15. Quando reconjurado, resete a duração.",
description: "Increase your Hit-chance, Defense and Damage by 15 for 10 turns. When cast again, reset the duration.",
categories: ["Spell", "Ballad", "Defensive", "Buff"],
APCost: 2,
cooldown: 10,
learned: false,
Manacost: 9,
onUse: function (attacker) {
// Increase hitchance, defense, additional damage, and duration of effects
if (!attacker.statusEffects.songOfHeroesDuration || attacker.statusEffects.songOfHeroesDuration === 0) {
attacker.additionalHitChance += 15;
attacker.additionaltDefense += 15;
attacker.additionalDamage += 15;
}
attacker.statusEffects.songOfHeroesDuration = 10;
if (attacker.traits.includes("Magnum Opus")) {
attacker.statusEffects.songOfHeroesDuration += 1.
attacker.currentLife += attacker.statusEffects.songOfHeroesDuration
}
addToBattleLog(`${attacker.Name} used Song of Heroes, increasing hitchance, defense, and damage for 10 turns.`);
}
});
//Initiated skills
var judgement = createSkill("Judgement", {
name_pt: "Julgamento",
desc_pt: "Causa 1d10 de dano a um inimigo; se o matar, recupere parte de sua Força Vida.",
categories: ["Spell", "Holy", "Offensive", "Healing"],
description: "Deal 1d10 against an enemy, if it kills it, regain part of your lost Lifeblood.",
APCost: 1,
cooldown: 3,
Manacost: 9,
onUse: function (attacker, target) {
var damage = rollDice('1d10');
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage += attacker.additionalDamage
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
addToBattleLog(`${attacker.Name} judged ${target.Name}'s soul, punishing them for ${damage} damage.`);
// Check if the target is defeated
if (target.currentLife <= 0) {
var lifebloodRegain = Math.round((attacker.PER / 2)) * target.level;
attacker.currentLife += lifebloodRegain;
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE; // Ensure lifeblood doesn't exceed MAXLIFE
}
addToBattleLog(`${attacker.Name} was blessed by regaining ${lifebloodRegain} of its Lifeblood back.`);
}
// Reduce attacker's mana
}
});
var smite = createSkill("Smite", {
name_pt: "Golpear",
desc_pt: "Causa dano a um inimigo em 20% de sua Vida máxima. Dobre a quantidade se a Vida do alvo estiver cheia.",
categories: ["Spell", "Holy", "Offensive"],
description: "Damage an enemy by 20% of it's maximum Lifeblood. Double the amount if the target's health is full",
APCost: 2,
cooldown: 0,
learned: false,
Manacost: 11,
onUse: function (attacker, target) {
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
var damage = Math.round((target.MAXLIFE * 0.2));
} else {
var damage = Math.round((target.MAXLIFE * 0.1));
}
// Double the damage if target's lifeblood is full
if (target.currentLife === target.MAXLIFE) {
damage *= 2;
}
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
if (target.traits.includes("Arcane Aegis") && target.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
target.currentLife -= damage;
addToBattleLog(`${attacker.Name} used Smite dealing ${damage} damage to ${target.Name}.`);
}
});
var shieldofthefaithful = createSkill("Shield of the Faithful", {
name_pt: "Escudo dos Fiéis",
desc_pt: "Chame os deuses para proteção. Dura por 2 turnos.",
categories: ["Spell", "Holy", "Defensive"],
description: "Call the gods for protection. Lasts for 2 trns.",
APCost: 2,
cooldown: 2,
learned: false,
Manacost: 6,
onUse: function (attacker) {
// Increase defense by attacker's Perception for 2 turns.
if (attacker.statusEffects.shieldofthefaithfulDuration > 0) {
attacker.statusEffects.shieldofthefaithfulDuration += 2.
} else {
attacker.statusEffects.shieldofthefaithfulDuration = 2;
attacker.additionalDefense += 10 + Math.round((attacker.PER / 2));
}
addToBattleLog(`${attacker.Name} used Shield of the Faithful, increasing their defense by ${10 + Math.round((attacker.PER / 2))}.`);
}
});
var sentence = createSkill("Sentence", {
name_pt: "Sentença",
desc_pt: "Reduz a defesa e a chance de acerto do alvo por 2 turnos.",
categories: ["Spell", "Holy", "Offensive"],
description: "Reduces target's defense and hit chance for 2 turns.",
APCost: 1,
cooldown: 3,
learned: false,
Manacost: 0.10,
debuff: ["additionalDefense", "additionalHitChance"],
onUse: function(attacker, target) {
if (attacker.level < 5) {
target.additionalDefense -= 10;
target.additionalHitChance -= 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
target.additionalDefense -= 15;
target.additionalHitChance -= 10;
} else {
target.additionalDefense -= 20;
target.additionalHitChance -= 15;
}
// Set a duration for the debuff (in turns)
var debuffDuration = 2;
target.statusEffects.sentenceDuration = debuffDuration;
addToBattleLog(`${attacker.Name} used Sentence, reducing ${target.Name}'s defense and hit chance by ${debuffAmount} for ${debuffDuration} turns.`);
}
});
var blessedStrikes = createSkill("Blessed Strikes", {
name_pt: "Golpes Abençoados",
desc_pt: "Fortalece seus próximos 4 ataques com sua fé, aumentando o dano de sua arma em 1d4 e curando você em 1d6.",
categories: ["Spell", "Holy", "General", "Buff", "Healing"],
description: "Strengthes your next 4 weapon strike with your faith, increasing your weapon damage by 1d4 and healing you for 1d6.",
APCost: 0,
cooldonw: 8,
Manacost: 9,
onUse: function(attacker) {
attacker.statusEffects.blessedStrikes = true
attacker.statusEffects.improvedAttacks += 5
}
})
var heal = createSkill("Heal", {
name_pt: "Cura",
desc_pt: "Cura você mesmo com base em sua vida perdida.",
categories: ["Spell", "Holy", "Defensive", "Healing"],
description: "Heals yourself based on your missing life.",
APCost: 2,
cooldown: 3,
learned: false,
Manacost: 10,
onUse: function(attacker) {
var missingLife = attacker.MAXLIFE - attacker.currentLife;
var healAmount;
if (attacker.level < 5) {
healAmount = Math.floor(0.25 * missingLife); // Heal by 25% of missing life
} else if (attacker.level >= 5 && attacker.level < 15) {
healAmount = Math.floor(0.45 * missingLife);
} else if (attacker.level >= 15) {
healAmount = Math.floor(0.55 * missingLife);
}
healAmount += Math.round((attacker.PER / 3))
if (attacker.equipment.offhand.includes("esoteric") || attacker.equipment.mainhand.includes("esoteric")) {
healAmount += attacker.additionalDamage;
}
if (attacker.traits.includes("Battle-Medic")) {
healAmount += 5
}
attacker.currentLife += healAmount;
addToBattleLog(`${attacker.Name} used Heal, healing ${healAmount} life.`);
}
});
var prayer = createSkill("Prayer", {
name_pt: "Oração",
desc_pt: "Rola um 1d4 e reza por um poder superior.",
categories: ["Technique", "Holy", "General", "Luck", "Buff", "Debuff"],
description: "Roll a 1d4 and pray for a higher power.",
APCost: 3,
cooldown: 6,
onUse: function(attacker) {
let action = rollDice('1d4');
switch (action) {
case 1: // Ellis (Restore 10% of your Maximum lifeblood and Essence, then regain 3 Action Points back)
attacker.currentLife += Math.round((0.1 * attacker.MAXLIFE))
if (attacker.currentLife >= attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
attacker.currentMana += Math.round((0.1 * attacker.MAXMANA))
if (attacker.currentMana >= attacker.MAXMANA) {
attacker.currentMana = attacker.MAXMANA
}
attacker.AP += 3;
addToBattleLog(`Ellis himself answers your call, his radiant presence bolsters your being.`)
break;
case 2: // Urahyahra (Your next 5 attacks apply a random status and deal 20% extra damage)
attacker.statusEffects.Hornedblessing = true
attacker.statusEffects.improvedAttacks += 5
addToBattleLog(`Urahyahra herself answers your call, her sinister presence bring madness unto all.`)
break;
case 3: //She of Three Faces (Decrease the Hitchance of all enemies (and yours as well) by 20-40, last for 3 turns.) Scales based on your lost health.
let missingLife = attacker.MAXLIFE - attacker.currentLife
State.variables.enemyInstances.forEach(enemy => {
if (missingLife >= Math.round((0.8 * attacker.MAXLIFE))) {
enemy.additionalHitChance -= 40
enemy.statusEffects.threeFacesCurse.time = 3
enemy.statusEffects.threeFacesCurse.value = 40
} else if (missingLife >= Math.round((0.65 * attacker.MAXLIFE))) {
enemy.additionalHitChance -= 35
enemy.statusEffects.threeFacesCurse.time = 3
enemy.statusEffects.threeFacesCurse.value = 35
} else if (missingLife >= Math.round((0.5 * attacker.MAXLIFE))) {
enemy.additionalHitChance -= 30
enemy.statusEffects.threeFacesCurse.time = 3
enemy.statusEffects.threeFacesCurse.value = 30
} else if (missingLife >= Math.round((0.35 * attacker.MAXLIFE))) {
enemy.additionalHitChance -= 25
enemy.statusEffects.threeFacesCurse.time = 3
enemy.statusEffects.threeFacesCurse.value = 25
} else if (missingLife >= Math.round((0.2 * attacker.MAXLIFE))) {
enemy.additionalHitChance -= 20
enemy.statusEffects.threeFacesCurse.time = 3
enemy.statusEffects.threeFacesCurse.value = 20
}
})
addToBattleLog(`She of Three Faces answers your call, filling the battlefield with uncertanty.`)
break;
case 4: //Uldrum (The next time you would die, be left with 1 Lifeblood left and gain 15 additionalDefense for the rest of combat.
attacker.statusEffects.Uldrumbless = true
addToBattleLog(`Uldrum himself answers your call, as despair grows, you feel safer.`)
break;
}
}
})
var sacredgrounds = createSkill("Sacred Grounds", {
name_pt: "Terrenos Sagrados",
desc_pt: "Santifica o chão ao seu redor, causando 2d6 de dano a cada inimigo e curando você em 4 para cada inimigo danificado.",
categories: ["Spell", "Holy", "Offensive", "Healing"],
description: "Sanctify the ground around you, damaging each enemy by 2d6 and healing yourself by 4 for each enemy damaged." ,
APCost: 2,
Manacost: 13,
cooldown: 4,
onUse: function(attacker) {
State.variables.enemyInstances.forEach(enemy => {
let damage = rollDice('2d6');
if (attacker.equipment.mainhand.Type.includes("esoteric") || attacker.equipment.offhand.Type.includes("esoteric")) {
damage = 6 + rollDice('1d6');
}
if (enemy.statusEffects.WraithCurse) {
damage += rollDice(enemy.statusEffects.WraithCurse +'d4')
}
if (enemy.traits.includes("Arcane Aegis") && enemy.equipment.offhand.Type.includes("Shield")) {
damage = Math.round((damage * 0.8))
}
if (enemy.equipment.offhand.Type.includes("shield") && enemy.equipment.offhand.enchantment === "Spell-hungry") {
damage = Math.round((damage * 0.9))
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("draconic")) {
damage -= Math.round((damage * 0.07))
}
}
for (let slot in target.equipment) {
if (target.equipment[slot].categories.includes("naked")) {
damage += Math.round((damage * 0.07))
}
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.curentLife -= damage;
attacker.currentLife += 4;
if (attacker.traits.includes("Battle-Medic")) {
attacker.currentLife += 5
}
})
}
});
var sacredFlame = createSkill("Sacred Flame", {
name_pt: "Chama Sagrada",
desc_pt: "Banhe um inimigo em chamas piedosas, aplicando Queimadura(5). Em seguida, ative-o duas vezes.",
categories: ["Spell", "Holy", "Offensive", "Debuff"],
description: "Bath an enemy in pious flames, apply Burning(5). Then, trigger it twice.",
APCost: 1,
Manacost: 9,
cooldown: 5,
onUse: function(attacker, target) {
if (!target.traits.includes("Fire Immunity")) {
target.statusEffects.burn.duration += 3
target.statusEffects.burn.stacks += 1
target.currentLife -= target.statusEffects.burn.damage;
target.statusEffects.burn.stacks += 1
target.currentLife -= target.statusEffects.burn.damage;
if (attacker.traits.includes("Fervorous Zeal")) {
attacker.currentLife += 8
attacker.statusEffects.Piety += 2;
}
if (attacker.traits.includes("Brazen Inquiry")) {
attacker.statusEffects.Piety += 2
}
if (attacker.traits.includes("Fiery Cleasing")) {
target.statusEffects.burn.stacks += 2
}
} else {
addToBattleLog(`${target.Name} is immune to burn. On the good side, at least it does not heal from it...`)
}
}
});
//Call for Ellis: Blinds all enemies for 1 turn (-100 hitChance for 2 turns) and damage them by 1d20. For the remainer of the combat, whenever an enemy makes an attack, reduce their hit chance by 15 and burn them.
//Curse for Uldrum: Damage a enemy by your missing Life. For the remainer of the combat, whenever an attack hits you, reflect half of the damage back to the attacker.
//Curse for Urahyahra: Force each enemy to attack itself. For the remainer of combat, you heal back 20% of all damage dealt.
//Curse for She of Three Faces: Divide 50 damage between all combatents. For the remainer of combat, whenever you damage an enemy, gain a piece of Gold.
var bearForm = createSkill("Form of the Bear", {
name_pt: "Forma do Urso",
desc_pt: "Assuma a forma de um urso inabalável, ganhando +6 de Resiliência e +3 de Carisma. Enquanto estiver nesta forma, você ganha +5 de Defesa adicional. Nos níveis 5 e 10, aumente o valor em 5.",
categories: ["Ancestral", "General", "Vanadi", "Shapeshifit", "Buff"],
description: "Take upon the form of a unyelding bear, gaining +6 Resilience and +3 Charisma. While in this form, you gain +5 additional Defense. At level 5 and 10, increase the value by 5.",
APCost: 0,
cooldown: 1,
learned: false,
Manacost: 0,
onUse: function(attacker) {
if (attacker.statusEffects.wolfForm) {
attacker.statusEffects.wolfForm = false;
addToBattleLog(`${attacker.Name} abbandons the form of an Wolf`);
attacker.STR -= 6;
attacker.DEX -= 3;
if (attacker.level < 5) {
attacker.additionalDamage -= 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.additionalDamage -= 10;
} else if (attacker.level >= 10) {
attacker.additionalDamage -= 15;
}
} else if (attacker.statusEffects.eagleForm) {
attacker.statusEffects.eagleForm = false
addToBattleLog(`${attacker.Name} abbandons the form of an Eagle`);
attacker.PER -= 6;
attacker.INT -= 3;
attacker.currentMana -= 3;
attacker.MAXMANA -= 3;
if (attacker.level < 5) {
attacker.additionalHitChance -= 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.additionalHitChance -= 10;
} else if (attacker.level >= 10) {
attacker.additionalHitChance -= 15;
}
}
if (!attacker.statusEffects.bearForm) {
attacker.currentLife += 6
attacker.MAXLIFE += 6
attacker.RES += 6;
attacker.CHA += 3;
if (attacker.level < 5) {
attacker.additionalDefense += 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.additionalDefense += 10;
} else if (attacker.level >= 10) {
attacker.additionalDefense += 15;
}
attacker.statusEffects.bearForm = true;
addToBattleLog(`${attacker.Name} takes the form of an Bear. Increasing their Resistence and Charisma.`);
} else {
addToBattleLog(`${attacker.Name} is already in the Bear form.`);
}
}
});
var wolfForm = createSkill("Form of the Wolf", {
name_pt: "Forma do Lobo",
desc_pt: "Assuma a forma de um lobo feroz, ganhando +6 de Força e +3 de Destreza. Enquanto estiver nesta forma, você causa +5 de Dano adicional. Nos níveis 5 e 10, aumente o valor em 5.",
categories: ["Ancestral", "General", "Vanadi", "Shapeshifit", "Buff"],
description: "Take upon the form of a vicious wolf, gaining +6 Strength and +3 Dexterity. While in this form, you deal +5 additional Damage. At level 5 and 10, increase the value by 5.",
APCost: 0,
cooldown: 1,
learned: false,
Manacost: 0,
onUse: function(attacker) {
if (attacker.statusEffects.bearForm) {
if (attacker.level < 5) {
attacker.additionalDefense -= 5;
attacker.RES -= 6;
attacker.CHA -= 3;
attacker.currentLife -= 6
attacker.MAXLIFE -= 6
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.RES -= 9;
attacker.CHA -= 6;
attacker.currentLife -= 9
attacker.MAXLIFE -= 9
attacker.additionalDefense -= 10;
} else if (attacker.level >= 10) {
attacker.RES -= 12;
attacker.CHA -= 9;
attacker.currentLife -= 12
attacker.MAXLIFE -= 12
attacker.additionalDefense -= 15;
}
attacker.statusEffects.bearForm = false;
addToBattleLog(`${attacker.Name} abbandons the form of an Bear`);
} else if (attacker.statusEffects.eagleForm) {
attacker.statusEffects.eagleForm = false
attacker.currentMana -= 3;
attacker.MAXMANA -= 3;
addToBattleLog(`${attacker.Name} abbandons the form of an Eagle`);
if (attacker.level < 5) {
attacker.PER -= 6;
attacker.INT -= 3;
attacker.additionalHitChance -= 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.PER -= 9;
attacker.INT -= 6;
attacker.additionalHitChance -= 10;
} else if (attacker.level >= 10) {
attacker.PER -= 12;
attacker.INT -= 9;
attacker.additionalHitChance -= 15;
}
}
if (!attacker.statusEffects.wolfForm) {
if (attacker.level < 5) {
attacker.STR += 6;
attacker.DEX += 3;
attacker.additionalDamage += 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.STR += 9;
attacker.DEX += 6;
attacker.additionalDamage += 10;
} else if (attacker.level >= 10) {
attacker.STR += 12;
attacker.DEX += 39
attacker.additionalDamage += 15;
}
attacker.statusEffects.wolfForm = true,
addToBattleLog(`${attacker.Name} takes the form of an Wolf, increasing their Strength and Dexterity.`);
} else {
addToBattleLog(`${attacker.Name} is already in the Wolf form.`);
}
}
});
var EagleForm = createSkill("Form of the Eagle", {
name_pt: "Forma da Águia",
desc_pt: "Assuma a forma de uma águia observadora e ágil, ganhando +6 de Percepção e +3 de Inteligência. Enquanto estiver nesta forma, você ganha +5 Chance de Acerto adicional. Nos níveis 5 e 10, aumente o valor em 5.",
categories: ["Ancestral", "General", "Vanadi", "Shapeshifit", "Buff"],
description: "Take upon the form of a obsevant and swift eagle hybrid, gaining +6 Perception and +3 Intelligence. While in this form, you gain +5 additional Hit Chance. At level 5 and 10, increase the value by 5.",
APCost: 0,
cooldown: 1,
learned: false,
Manacost: 0,
onUse: function(attacker) {
if (attacker.statusEffects.bearForm) {
if (attacker.level < 5) {
attacker.RES -= 6;
attacker.CHA -= 3;
attacker.currentLife -= 6
attacker.MAXLIFE -= 6
attacker.additionalDefense -= 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.RES -= 9;
attacker.CHA -= 6;
attacker.currentLife -= 9
attacker.MAXLIFE -= 9
attacker.additionalDefense -= 10;
} else if (attacker.level >= 10) {
attacker.RES -= 12;
attacker.CHA -= 9;
attacker.currentLife -= 12
attacker.MAXLIFE -= 12
attacker.additionalDefense -= 15;
}
attacker.statusEffects.bearForm = false;
addToBattleLog(`${attacker.Name} abbandons the form of an Bear`);
} else if (attacker.statusEffects.wolfForm) {
attacker.statusEffects.wolfForm = false,
addToBattleLog(`${attacker.Name} abbandons the form of an Wolf`);
if (attacker.level < 5) {
attacker.STR -= 6;
attacker.DEX -= 3;
attacker.additionalDamage -= 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.STR -= 9;
attacker.DEX -= 6;
attacker.additionalDamage -= 10;
} else if (attacker.level >= 10) {
attacker.STR -= 12;
attacker.DEX -= 9;
attacker.additionalDamage -= 15;
}
}
if (!attacker.statusEffects.eagleForm) {
attacker.statusEffects.eagleForm = true;
if (attacker.level < 5) {
attacker.PER += 6;
attacker.INT += 3;
attacker.currentMana += 3;
attacker.MAXMANA += 3;
attacker.additionalHitChance += 5;
} else if (attacker.level >= 5 && attacker.level < 10) {
attacker.PER += 8;
attacker.INT += 6;
attacker.currentMana += 6;
attacker.MAXMANA += 6;
attacker.additionalHitChance += 10;
} else if (attacker.level >= 10) {
attacker.PER += 12;
attacker.INT += 9;
attacker.currentMana += 9;
attacker.MAXMANA += 9;
attacker.additionalHitChance += 15;
}
addToBattleLog(`${attacker.Name} takes the form of an Eagle. Increasing it's Perception and Intelligence.`);
} else {
addToBattleLog(`${attacker.Name} is already in the Eagle form.`);
}
}
})
//////////////
//Enemy Data//
//////////////
class Enemy extends character {
constructor(Name, Name_pt, Ancestry, Specialization, AP, APregen, BaseDefense, Danger, STR, DEX, RES, INT, CHA, PER, traits, skills, equipment, statusEffects, additionalDefense, additionalDamage, additionalHitChance, Gold, image, behavior, broken) {
super(Name, Ancestry, Specialization, AP, APregen, BaseDefense, STR, DEX, RES, INT, CHA, PER, image);
this.traits = traits;
this.skills = skills || [];
this.broken = broken || [];
this.equipment = equipment;
this.statusEffects = {
hidden: false,
poison: 0,
bleed: 0,
regeneration: 0,
stunned: 0,
confusion: 0,
improvedAttacks: 0,
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
this.behavior = behavior || null;
this.additionalDefense = additionalDefense || 0;
this.additionalDamage = additionalDamage || 0;
this.additionalHitChance = additionalHitChance || 0;
this.Gold = Gold || 0;
this.image = image || "img/enemies/Unknown";
}
}
//Enemy traits
//opportunistic: Attacks back when opponent misses an strike
//follower; While alone, halved AP regen
//Deathless: WHen dropped to 0 health, drop to 1, instead, can only happen once per fight
//sneaky: 30% of Chance of becoming intangible for 1 turn at the end of its turn.
//ravenous: after 2 misses, the third attack is a hit.
//boss: This is a dangerous enemy.
//Idomitable: Status effects are halved when applied to this enemy.
//hardy: take 15% less damage
//desperate: when you would miss, roll a 1d10, take that much as damage and add it to the hit-chance
//resilient: add +1d4 Lifeblood for every level
//colossal: this enemy is huge, and so is its Lifeblood. You have +30 to Hitchance against Colossal enemies.
//STR = Strength - influences damage and hit chance on melee attacks
//DEX = Dexterity - influences damage and hit chance on melee attacks
//RES = Resilience - influence health
//INT = Intelligence - influence mana and spell damage
//CHA = Charisma - influences spell damage
//PER = Perception - influences damage and hit chance on ranged attacks and spell damage
//Base defense for most creatures is of 10. Draconians have base defense of 15 due to their hard scales, Constructs of 20.
//Life = 10 + enemy RES * enemy level
//Mana = 5 + enemy INT * enemy level
//attributes: 38 + 3 * enemy level
//ex.: a level 3 enemy has 50 points to distribute between RES, DEX, INT, CHA, STR and PER
//Use additionalHitChance if you want the enemy to be more or less precise with their attacks
//Use additionalDamage if you want the enemy to be more or less deadlier
//Use additionalDefense if you want the enemy to be easier or harder to hit
//behavior property gives the enemy an alternative set of actions during combat
const Ruffian = new Enemy();
Ruffian.Name = "Ruffian";
Ruffian.Name_pt = "Rufião";
Ruffian.Ancestry = "Human";
Ruffian.Specialization = "Bandit";
Ruffian.AP = 0;
Ruffian.APregen = 2;
Ruffian.BaseDefense = 10;
Ruffian.level = 1;
Ruffian.STR = 6;
Ruffian.RES = 4;
Ruffian.DEX = 12;
Ruffian.INT = 3;
Ruffian.CHA = 3;
Ruffian.PER = 5;
Ruffian.AP = 0;
Ruffian.level = 1;
Ruffian.traits = ["Opportunistic", "Follower", "Coward"];
Ruffian.skills = [];
Ruffian.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items['Leather armor'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items.Dagger,
offhand: State.variables.Items['Parrying Dagger'],
};
Ruffian.additionalDefense = 0;
Ruffian.additionalDamage = 0;
Ruffian.additionalHitChance = 0;
Ruffian.MAXLIFE = ((Ruffian.level + 1) * 5) + Ruffian.RES;
Ruffian.MAXMANA = ((Ruffian.level + 1) * 4) + Ruffian.INT;
Ruffian.currentLife = Ruffian.MAXLIFE;
Ruffian.currentMana = Ruffian.MAXMANA;
Ruffian.addSkill("Pickpocket");
Ruffian.addSkill("Escape");
Ruffian.image = "img/enemies/Ruffian.png";
State.variables.character.push(Ruffian);
// Create and register Bandit Leader instance
const banditLeader = new Enemy();
banditLeader.Name = "Bandit Leader";
banditLeader.Name_pt = "Líder dos Bandidos";
banditLeader.Ancestry = "Human";
banditLeader.Specialization = "Bandit";
banditLeader.BaseDefense = 15;
banditLeader.level = 3;
banditLeader.STR = 12;
banditLeader.RES = 11;
banditLeader.DEX = 7;
banditLeader.INT = 6;
banditLeader.CHA = 9;
banditLeader.PER = 6;
banditLeader.traits = ["Opportunistic", "Boss"];
banditLeader.skills = [];
banditLeader.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Leather armor'],
waist: State.variables.Items.Belt,
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items.Flail,
offhand: State.variables.Items.Gloves,
};
banditLeader.additionalDefense = 0;
banditLeader.additionalDamage = 5;
banditLeader.additionalHitChance = 5;
banditLeader.MAXLIFE = ((banditLeader.level + 1) * 6) + banditLeader.RES;
banditLeader.MAXMANA = ((banditLeader.level + 1) * 5) + banditLeader.INT;
banditLeader.currentLife = banditLeader.MAXLIFE;
banditLeader.currentMana = banditLeader.MAXMANA;
banditLeader.firsttime = false;
banditLeader.behavior = function () {
thi
//If there isn't a Ruffian at enemyInstances, summon a Ruffian, otherwise, make an attack against the character[1] (can summon up to 6 Ruffians)
if (!this.firsttime) {
this.callcd = 3;
this.summons = State.variables.event.bandits && State.variables.event.bandits > 0 ? State.variables.event.bandits : 6;
this.firsttime = true;
} else {
if (this.summons > 0 && this.callcd === 0) {
const ruffianIndex = State.variables.character.findIndex(char => char.Name === "Ruffian");
if (ruffianIndex !== -1) { // Check if a Ruffian was found
const ruffian = State.variables.character[ruffianIndex];
// Define Ruffian properties here
State.variables.enemyInstances.push(ruffian);
this.summons -= 1;
addToBattleLog(`The Bandit Leader calls for reinforcements! A new enemy enters the fray.`);
}
} else if (this.callcd > 0) {
this.callcd -= 1;
} else if (this.summons === 0) {
addToBattleLog(`The Bandit Leader calls for reinforcements! But it seems no one answers it...`);
}
}
//After that, if there is a Ruffian present, increase this and theirs additionalHitChance by 5. If there isn't, set this object additionalHitChante property to 0.
const ruffianPresent = State.variables.enemyInstances.some(enemy => enemy.Name === 'Ruffian');
if (ruffianPresent) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.Specialization === "Bandit") {
enemy.additionalHitChance += 5;
enemy.additionalDamage += 3;
}
})
addToBattleLog(`The Bandit Leader and its followers rally.`);
} else {
this.additionalHitChance = 0;
addToBattleLog(`The Bandit Leader searches for its followers in vain.`);
}
// Attack character[1] after behavior execution
if (State.variables.character[1].currentLife > 0) {
const slot = this.equipment.mainhand;
window.triggerAttack(this, State.variables.character[1], slot); // Assuming 'slot' is defined
}
};
banditLeader.image = "img/enemies/banditLeader.png";
State.variables.character.push(banditLeader);
//Armored Brigand
const ArmoredBrigand = new Enemy();
ArmoredBrigand.Name = "Armored Brigand";
ArmoredBrigand.Name_pt = "Bandido Blindado";
ArmoredBrigand.Ancestry = "Human";
ArmoredBrigand.Specialization = "Bandit";
ArmoredBrigand.AP = 0;
ArmoredBrigand.APregen = 2;
ArmoredBrigand.BaseDefense = 10;
ArmoredBrigand.level = 6;
ArmoredBrigand.STR = 17;
ArmoredBrigand.RES = 12;
ArmoredBrigand.DEX = 10;
ArmoredBrigand.INT = 8;
ArmoredBrigand.CHA = 5;
ArmoredBrigand.PER = 8;
ArmoredBrigand.traits = ["Opportunistic", "Follower"];
ArmoredBrigand.skills = [];
ArmoredBrigand.addSkill("Bash");
ArmoredBrigand.addSkill("Intimidate");
ArmoredBrigand.addSkill("Heavy Strike");
ArmoredBrigand.equipment = {
head: State.variables.Items.Helmet,
torso: State.variables.Items.Cuirass,
waist: State.variables.Items.Belt,
legs: State.variables.Items.Leggings,
feet: State.variables.Items.Boots,
mainhand: State.variables.Items.Sword,
offhand: State.variables.Items.Shield,
};
ArmoredBrigand.additionalDefense = 8;
ArmoredBrigand.additionalDamage = 0;
ArmoredBrigand.additionalHitChance = -15;
ArmoredBrigand.MAXLIFE = ((ArmoredBrigand.level + 1) * 5) + ArmoredBrigand.RES;
ArmoredBrigand.MAXMANA = ((ArmoredBrigand.level + 1) * 4) + ArmoredBrigand.INT;
ArmoredBrigand.currentLife = ArmoredBrigand.MAXLIFE;
ArmoredBrigand.currentMana = ArmoredBrigand.MAXMANA;
ArmoredBrigand.image = "img/enemies/ArmoredBrigand.png"; // Path to the image file for this enemy
State.variables.character.push(ArmoredBrigand);
//Brigand Falconeer: At the start of the battle, summon a Falcon
const brigandFalconeer = new Enemy();
brigandFalconeer.Name = "Falcon";
brigandFalconeer.Name_pt = "Falcão";
brigandFalconeer.Ancestry = "Human";
brigandFalconeer.Specialization = "Bandit";
brigandFalconeer.AP = 0;
brigandFalconeer.APregen = 2;
brigandFalconeer.BaseDefense = 5;
brigandFalconeer.level = 4;
brigandFalconeer.STR = 5;
brigandFalconeer.RES = 5;
brigandFalconeer.DEX = 5;
brigandFalconeer.INT = 5;
brigandFalconeer.CHA = 5;
brigandFalconeer.PER = 5;
brigandFalconeer.traits = ["Opportunistic"];
brigandFalconeer.skills = [];
brigandFalconeer.addSkill("Dodge");
brigandFalconeer.equipment = {
head: State.variables.Items.Helmet,
torso: State.variables.Items["Leather Armor"],
waist: State.variables.Items.Belt,
legs: State.variables.Items.Leggings,
feet: State.variables.Items.Boots,
mainhand: State.variables.Items.Crossbow,
offhand: State.variables.Items["Other hand"],
};
brigandFalconeer.MAXLIFE = ((brigandFalconeer.level + 1) * 5) + brigandFalconeer.RES;
brigandFalconeer.MAXMANA = ((brigandFalconeer.level + 1) * 4) + brigandFalconeer.INT;
brigandFalconeer.currentLife = brigandFalconeer.MAXLIFE;
brigandFalconeer.currentMana = brigandFalconeer.MAXMANA;
brigandFalconeer.hasfalcon = false;
brigandFalconeer.hasMarked = false;
brigandFalconeer.behavior = function() {
const falcon = State.variables.enemyInstances.filter(enemy => {enemy.name === "Trained Falcon"})
if (this.hasfalcon === false) {
window.addEnemiesToBattle(trainedFalcon, 1);
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} releases their Falcon.)`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} solta seu Falcão.`);
}
}
for (let i = 0; i < this.AP; i++) {
const filteredSkills = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
// Check if there are any skills left after filtering
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
if (this.hindered === 0) {
window.useSkill(this, randomSkill, State.variables.character[1])
}
}
if (this.hasMarked === false) {
State.variables.character[1].additionalDefense -= 15 + this.PER
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} marks ${State.variables.character[1].Name}, reducing their Defenses by ${15 + this.PER}.)`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} marca ${State.variables.character[1].Name}, reduzindo suas Defesas em ${15 + this.PER}.`);
}
} else {
if (this.stunned === 0) {
window.triggerAttack(this, State.variables.character[1], this.equipment.feet);
}
}
}
if (falcon.length > 1) {
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} commands ther Falcon to attack you.)`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} comanda seu Falcão para te atacar.`);
}
falcon[0].AP++
if (falcon[0].stunned === 0) {
window.triggerAttack(falcon[0], State.variables.character[1], falcon[0].equipment.feet);
if (falcon[0].hits < 3) {
falcon[0].hits++
} else if (falcon[0].hits === 3) {
falcon[0].hits = 0
State.variables.character[1].statusEffects.blind = true;
if (State.variables.language === "EN") {
addToBattleLog(`${falcon[0].Name} scratches your eyes, leaving you <b>Blind</b>.)`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${falcon[0].Name_pt} arranha seus olhos, deixando você <b>Cego</b>.`);
}
}
}
}
}
State.variables.character.push(brigandFalconeer);
const trainedFalcon = new Enemy();
trainedFalcon.Name = "Trained Falcon";
trainedFalcon.Name_pt = "Falcão Treinado";
trainedFalcon.Ancestry = "Beast";
trainedFalcon.Specialization = "Bandit";
trainedFalcon.AP = 0;
trainedFalcon.APregen = 2;
trainedFalcon.BaseDefense = 5;
trainedFalcon.level = 4;
trainedFalcon.STR = 7;
trainedFalcon.RES = 4;
trainedFalcon.DEX = 19;
trainedFalcon.INT = 5;
trainedFalcon.CHA = 2;
trainedFalcon.PER = 13;
trainedFalcon.traits = ["Precise Strikes"];
trainedFalcon.skills = [];
trainedFalcon.addSkill("Dodge");
trainedFalcon.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items.Talons,
mainhand: State.variables.Items["Mainhand Wing"],
offhand: State.variables.Items["Offhand Wing"],
};
trainedFalcon.additionalHitChance = 13;
trainedFalcon.MAXLIFE = ((trainedFalcon.level + 1) * 5) + trainedFalcon.RES;
trainedFalcon.MAXMANA = ((trainedFalcon.level + 1) * 4) + trainedFalcon.INT;
trainedFalcon.currentLife = trainedFalcon.MAXLIFE;
trainedFalcon.currentMana = trainedFalcon.MAXMANA;
trainedFalcon.hits = 0
trainedFalcon.behavior = function() {
for (let i = 0; i < this.AP; i++) {
if (this.stunned === 0) {
window.triggerAttack(this, State.variables.character[1], this.equipment.feet);
if (this.hits < 3) {
this.hits++
} else if (this.hits === 3) {
this.hits = 0;
State.variables.character[1].statusEffects.blind = true;
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} scratches your eyes, leaving you <b>Blind</b>.)`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} arranha seus olhos, deixando você <b>Cego</b>.`);
}
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} is <b>Stunned</b>, and cannot act..)`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} está <b>Atordoado</b>, não podendo agir..`);
}
}
}
if (this.skill[0].inCooldown = 0) {
this.AP += this.skill[0].APCost
window.useSkill(this, this.skill[0].Name, State.variables.character[1])
}
}
State.variables.character.push(trainedFalcon);
//Brigand Crossbowman
const BrigandCrossbowman = new Enemy();
BrigandCrossbowman.Name = "Brigand Crossbowman";
BrigandCrossbowman.Name_pt = "Bandido Besteiro";
BrigandCrossbowman.Ancestry = "Human";
BrigandCrossbowman.Specialization = "Bandit";
BrigandCrossbowman.AP = 0;
BrigandCrossbowman.APregen = 2;
BrigandCrossbowman.BaseDefense = 10;
BrigandCrossbowman.level = 6;
BrigandCrossbowman.STR = 12;
BrigandCrossbowman.RES = 9;
BrigandCrossbowman.DEX = 8;
BrigandCrossbowman.INT = 9;
BrigandCrossbowman.CHA = 5;
BrigandCrossbowman.PER = 17;
BrigandCrossbowman.traits = ["Opportunistic", "Follower"];
BrigandCrossbowman.skills = [];
BrigandCrossbowman.addSkill("Scoping Stance");
BrigandCrossbowman.addSkill("Power Shot");
BrigandCrossbowman.equipment = {
head: State.variables.Items.Helmet,
torso: State.variables.Items.Brestplate,
waist: State.variables.Items.Belt,
legs: State.variables.Items.Leggings,
feet: State.variables.Items.Boots,
mainhand: State.variables.Items["Heavy Crossbow"],
offhand: State.variables.Items["Handle"],
};
BrigandCrossbowman.additionalDamage = 9;
BrigandCrossbowman.additionalHitChance = -10;
BrigandCrossbowman.MAXLIFE = ((BrigandCrossbowman.level + 1) * 5) + BrigandCrossbowman.RES;
BrigandCrossbowman.MAXMANA = ((BrigandCrossbowman.level + 1) * 4) + BrigandCrossbowman.INT;
BrigandCrossbowman.currentLife = BrigandCrossbowman.MAXLIFE;
BrigandCrossbowman.currentMana = BrigandCrossbowman.MAXMANA;
State.variables.character.push(BrigandCrossbowman);
//Brigand Canoneer
const BrigandCanoneer = new Enemy();
BrigandCanoneer.Name = "Brigand Canoneer";
BrigandCanoneer.Name_pt = "Bandido Canhoneiro";
BrigandCanoneer.Ancestry = "Human";
BrigandCanoneer.Specialization = "Bandit";
BrigandCanoneer.AP = 0;
BrigandCanoneer.APregen = 2;
BrigandCanoneer.BaseDefense = 10;
BrigandCanoneer.level = 6;
BrigandCanoneer.STR = 12;
BrigandCanoneer.RES = 11;
BrigandCanoneer.DEX = 6;
BrigandCanoneer.INT = 10;
BrigandCanoneer.CHA = 4;
BrigandCanoneer.PER = 17;
BrigandCanoneer.traits = ["Hardy", "Resilient"];
BrigandCanoneer.skills = [];
BrigandCrossbowman.equipment = {
head: State.variables.Items.Helmet,
torso: State.variables.Items.Brestplate,
waist: State.variables.Items.Belt,
legs: State.variables.Items.Leggings,
feet: State.variables.Items.Boots,
mainhand: State.variables.Items["Hand Cannon"],
offhand: State.variables.Items["Handle"],
};
BrigandCanoneer.additionalHitChance = 15;
BrigandCanoneer.MAXLIFE = ((BrigandCanoneer.level + 1) * 5) + BrigandCanoneer.RES + ((BrigandCanoneer.level) * 2);
BrigandCanoneer.MAXMANA = ((BrigandCanoneer.level + 1) * 4) + BrigandCanoneer.INT;
BrigandCanoneer.currentLife = BrigandCanoneer.MAXLIFE;
BrigandCanoneer.currentMana = BrigandCanoneer.MAXMANA;
BrigandCanoneer.accumulatedDamage = 0;
BrigandCanoneer.behavior = function() {
let value1 = 5
if (State.variables.difficulty === "easy") {
value1 = 4
} else if (State.variables.difficulty === "hard") {
value1 = 7
}
if (this.equipment.mainhand.inCooldown > 0) {
this.equipment.mainhand.inCooldown -= 1
this.additionalDamage += value1
this.accumulatedDamage+= value1
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} takes care of their Handcannon, speeding up its recharge and increasing their next attack's damage by ${value1}. (${this.accumulatedDamage})`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} cuida de seu Canhão de Mão, apressando sua recarga e aumentando o Dano de seu proximo ataque em ${value1}. (${this.accumulatedDamage}).`);
}
} else if (this.statusEffects.stunned === 0 && this.equipment.mainhand.inCooldown === 0){
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
this.additionalDamage -= this.accumulatedDamage;
this.accumulatedDamage = 0;
}
}
State.variables.character.push(BrigandCrossbowman);
//One of thousands (Dismisses all false images and Strike at player, at the end of the turn summons 2 false images of self and shuffle the enemyInstances array (updating the display).
//King of Thousand Hands (Badit Specialization, Human Ancestry, Boss)
//ThousandHandKing.behaviour: When alone, throw sand at the player, reducing their additionalHitChance by 5, then make 2 attacks. Every 4 turns, summon 2 random bandits (Ruffian or a Brigands), while they are alive,does nothing.
//When skills are not in cooldown, use them.
const ThousandHandKing = new Enemy();
ThousandHandKing.Name = "King of Thousand Hands";
ThousandHandKing.Name_pt = "Rei das Mil Mãos";
ThousandHandKing.Ancestry = "Human";
ThousandHandKing.Specialization = "Bandit";
ThousandHandKing.AP = 0;
ThousandHandKing.APregen = 5;
ThousandHandKing.BaseDefense = 10;
ThousandHandKing.level = 8;
ThousandHandKing.STR = 8;
ThousandHandKing.RES = 6;
ThousandHandKing.DEX = 20;
ThousandHandKing.INT = 7;
ThousandHandKing.CHA = 6;
ThousandHandKing.PER = 15;
ThousandHandKing.traits = ["Sneaky", "Opportunistci", "Boss", "Hoarder"];
ThousandHandKing.skills = [];
ThousandHandKing.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items.Brestplate,
waist: State.variables.Items.Belt,
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items["Scimitar"],
offhand: State.variables.Items["Light Crossbow"],
};
ThousandHandKing.additionalHitChance = 15;
ThousandHandKing.MAXLIFE = ((ThousandHandKing.level + 1) * 6) + ThousandHandKing.RES;
ThousandHandKing.MAXMANA = ((ThousandHandKing.level + 1) * 5) + ThousandHandKing.INT;
ThousandHandKing.currentLife = ThousandHandKing.MAXLIFE;
ThousandHandKing.currentMana = ThousandHandKing.MAXMANA;
ThousandHandKing.accumulatedDamage = 0;
ThousandHandKing.CD = 2;
ThousandHandKing.CD2 = 0;
ThousandHandKing.CD3 = 3;
ThousandHandKing.addSkill("Dual Weapon Rush");
ThousandHandKing.addSkill("Onslaught");
ThousandHandKing.addSkill("Disengage");
ThousandHandKing.addSkill("Dodge");
ThousandHandKing.addSkill("Disarm");
ThousandHandKing.addSkill("Feint");
ThousandHandKing.addSkill("applyVenom");
ThousandHandKing.baitbonus= 0;
ThousandHandKing.behavior = function() {
let enemyInstances = State.variables.enemyInstances;
const bait = enemyInstances.filter(enemy => enemy.statusEffects.bait === true)
let bandits = ["BrigandCrossbowman", "BrigandCanoneer", "brigandFalconeer", "ArmoredBrigand", "Ruffian"]
if (this.CD > 0) {
this.CD--
}
if (this.CD2 > 0) {
this.CD2--
}
if (this.CD3 > 0) {
this.CD3--
}
if (bait.length === 0) {
this.additionalDefense -= this.baitbonus;
this.baitbonus = 0;
}
if (this.CD === 0) {
this.CD = 7;
this.AP -= 2;
for (let i = 0; i < 2; i++) {
addEnemyToBattle(bandits[Math.floor(Math.random() * bandits.length)], 1);
enemyInstances[enemyInstances.length].statusEffects.bait = true;
enemyInstances[(enemyInstances.length - 1)].statusEffects.bait = true;
}
enemyInstances.forEach(enemy => {
if (enemy.statusEffects.bait === true) {
enemy.additionalDefense -= 7;
this.additionalDefense += 7;
this.baitbonus += 7;
}
})
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} summons ${enemyInstances[enemyInstances.length].Name} and ${enemyInstances[enemyInstances.length-1].Name} to their side.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} convoca ${enemyInstances[enemyInstances.length].Name_pt} e ${enemyInstances[enemyInstances.length-1].Name_pt} para seu lado.`);
}
enemyInstances.shuffle
}
for (let j = 0; j < this.AP; j++) {
const filteredSkills = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
if (this.statusEffects.hindered > 0) {
filteredSkills = []
}
let action = rollDice('1d4')
if (action === 1) {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
//normal attack
} else if (action === 2 && this.CD2 === 0) {
this.CD2 = 4;
this.AP--
let value = rollDice('3d6');
State.variables.character[1].additionalHitChance -= value;
State.variables.character[1].blind = true;
//Sand on the eyes
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} throws sand in your eyes, reducing your Hit-Chance by ${value} and leaving your <b>Blind</b>.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} joga areia em seus olhos, reduzindo sua Chance de Acerto em ${value} e o deixando <b>Cego</b>.`);
}
} else if (action === 3 && filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
window.useSkill(this, randomSkill, State.variables.character[1])
//skill use
} else if (action === 4 && this.CD3 === 0) {
} else {
this.statusEffects.improvedAttacks++
this.statusEffects.markingAttack = true;
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
//mark the player, the next enemy attack will hit and crit.
}
}
}
State.variables.character.push(ThousandHandKing);
// Create and register Hired Muscle instance
const hiredMuscle = new Enemy();
hiredMuscle.Name = "Hired Muscle";
hiredMuscle.Name_pt = "Músculo Contratado";
hiredMuscle.Ancestry = "Human";
hiredMuscle.Specialization = "Mercenary";
hiredMuscle.AP = 0;
hiredMuscle.APregen = 2;
hiredMuscle.BaseDefense = 15;
hiredMuscle.level = 2;
hiredMuscle.STR = 14;
hiredMuscle.RES = 13;
hiredMuscle.DEX = 4;
hiredMuscle.INT = 3;
hiredMuscle.CHA = 3;
hiredMuscle.PER = 5;
hiredMuscle.traits = ["Opportunistic", "Unending Vigor"];
hiredMuscle.skills = [];
hiredMuscle.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items['Leather armor'],
waist: State.variables.Items.Belt,
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items['Short sword'],
offhand: State.variables.Items['Other hand'],
};
hiredMuscle.additionalDefense = 0;
hiredMuscle.additionalDamage = 0;
hiredMuscle.additionalHitChance = 0;
hiredMuscle.MAXLIFE = ((hiredMuscle.level + 1) * 5) + hiredMuscle.RES;
hiredMuscle.MAXMANA = ((hiredMuscle.level + 1) * 4) + hiredMuscle.INT;
hiredMuscle.currentLife = hiredMuscle.MAXLIFE;
hiredMuscle.currentMana = hiredMuscle.MAXMANA;
hiredMuscle.image = "img/enemies/HiredMuscle.png";
hiredMuscle.addSkill("Heavy Strike");
hiredMuscle.addSkill("Headbutt");
hiredMuscle.addSkill("Rend");
State.variables.character.push(hiredMuscle);
// Create and register Hired Spellcaster instance
const hiredSpellcaster = new Enemy();
hiredSpellcaster.Name = "Hired Spellcaster";
hiredSpellcaster.Name_pt = "Conjurador Contratado";
hiredSpellcaster.Ancestry = "Human";
hiredSpellcaster.Specialization = "Mercenary";
hiredSpellcaster.AP = 0;
hiredSpellcaster.APregen = 2;
hiredSpellcaster.BaseDefense = 15;
hiredSpellcaster.level = 2;
hiredSpellcaster.STR = 3;
hiredSpellcaster.RES = 6;
hiredSpellcaster.DEX = 7;
hiredSpellcaster.INT = 15;
hiredSpellcaster.CHA = 7;
hiredSpellcaster.PER = 5;
hiredSpellcaster.traits = ["Opportunistic"];
hiredSpellcaster.skills = [];
hiredSpellcaster.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items['Leather armor'],
waist: State.variables.Items.belt,
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items.Quaterstaff,
offhand: State.variables.Items.Handler,
};
hiredSpellcaster.additionalDefense = 0;
hiredSpellcaster.additionalDamage = 0;
hiredSpellcaster.additionalHitChance = 0;
hiredSpellcaster.MAXLIFE = ((hiredSpellcaster.level + 1) * 5) + hiredSpellcaster.RES;
hiredSpellcaster.MAXMANA = ((hiredSpellcaster.level + 1) * 4) + hiredSpellcaster.INT;
hiredSpellcaster.currentLife = hiredSpellcaster.MAXLIFE;
hiredSpellcaster.currentMana = hiredSpellcaster.MAXMANA;
hiredSpellcaster.addSkill("Freeze");
hiredSpellcaster.addSkill("Lightning Strike");
hiredSpellcaster.addSkill("Dazzle");
hiredSpellcaster.addSkill("Heal");
hiredMuscle.image = "img/enemies/HiredSpellcaster.png";
State.variables.character.push(hiredSpellcaster);
const bountyHunter = new Enemy();
bountyHunter.Name = "Bounty Hunter";
bountyHunter.Name_pt = "Caçador de Recompensas";
bountyHunter.Ancestry = "Human";
bountyHunter.Specialization = "Mercenary";
bountyHunter.AP = 0;
bountyHunter.APregen = 3;
bountyHunter.BaseDefense = 10;
bountyHunter.level = 3;
bountyHunter.STR = 6;
bountyHunter.RES = 9;
bountyHunter.DEX = 9;
bountyHunter.INT = 4;
bountyHunter.CHA = 6;
bountyHunter.PER = 13;
bountyHunter.AP = 0;
bountyHunter.level = 3;
bountyHunter.traits = ["Opportunistic", "Loner"];
bountyHunter.skills = [];
bountyHunter.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items['Leather armor'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items.Crossbow,
offhand: State.variables.Items['Light Crossbow'],
};
bountyHunter.additionalDefense = 0;
bountyHunter.additionalDamage = 0;
bountyHunter.additionalHitChance = 5;;
bountyHunter.MAXLIFE = ((bountyHunter.level + 1) * 5) + bountyHunter.RES;
bountyHunter.MAXMANA = ((bountyHunter.level + 1) * 4) + bountyHunter.INT;
bountyHunter.currentLife = bountyHunter.MAXLIFE;
bountyHunter.currentMana = bountyHunter.MAXMANA;
bountyHunter.addSkill("Combo");
bountyHunter.addSkill("Triple Shot");
bountyHunter.addSkill("Dodge");
State.variables.character.push(bountyHunter);
//Human Guard
const humanGuard = new Enemy();
humanGuard.Name = "Human Guard";
humanGuard.Name_pt = "Guarga Humano";
humanGuard.Ancestry = "Human";
humanGuard.Specialization = "Mercenary";
humanGuard.AP = 0;
humanGuard.APregen = 3;
humanGuard.BaseDefense = 10;
humanGuard.level = 4;
humanGuard.STR = 12;
humanGuard.RES = 19;
humanGuard.DEX = 10;
humanGuard.INT = 5;
humanGuard.CHA = 8;
humanGuard.PER = 4;
humanGuard.AP = 0;
humanGuard.level = 3;
humanGuard.traits = ["Phanlax Training", "Shielded Assault"];
humanGuard.skills = [];
humanGuard.equipment = {
head: State.variables.Items.Bascinet,
torso: State.variables.Items['Hauberk'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items["Short sword"],
offhand: State.variables.Items.Shield,
};
humanGuard.additionalDefense = 8;
humanGuard.additionalDamage = 0;
humanGuard.MAXLIFE = ((humanGuard.level + 1) * 5) + humanGuard.RES;
humanGuard.MAXMANA = ((humanGuard.level + 1) * 4) + humanGuard.INT;
humanGuard.currentLife = humanGuard.MAXLIFE;
humanGuard.currentMana = humanGuard.MAXMANA;
humanGuard.addSkill("Bash");
humanGuard.addSkill("Intimidate");
humanGuard.addSkill("Defensive Stance");
State.variables.character.push(humanGuard);
//Human Assassin
const humanAssassin = new Enemy();
humanAssassin.Name = "Human Assassin";
humanAssassin.Name_pt = "Assassino Humano";
humanAssassin.Ancestry = "Human";
humanAssassin.Specialization = "Mercenary";
humanAssassin.AP = 0;
humanAssassin.APregen = 3;
humanAssassin.BaseDefense = 10;
humanAssassin.level = 4;
humanAssassin.STR = 8;
humanAssassin.RES = 10;
humanAssassin.DEX = 19;
humanAssassin.INT = 8;
humanAssassin.CHA = 5;
humanAssassin.PER = 8;
humanAssassin.AP = 0;
humanAssassin.level = 3;
humanAssassin.traits = ["Sneaky", "Lethality II"];
humanAssassin.skills = [];
humanAssassin.equipment = {
head: State.variables.Items.Mask,
torso: State.variables.Items['Leather Armor'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items["Dagger"],
offhand: State.variables.Items['Other hand'],
};
humanAssassin.additionalDefense = 0;
humanAssassin.additionalDamage = 9;
humanAssassin.MAXLIFE = ((humanAssassin.level + 1) * 5) + humanAssassin.RES;
humanAssassin.MAXMANA = ((humanAssassin.level + 1) * 4) + humanAssassin.INT;
humanAssassin.currentLife = humanAssassin.MAXLIFE;
humanAssassin.currentMana = humanAssassin.MAXMANA;
humanAssassin.addSkill("Sneak");
humanAssassin.addSkill("Backstab");
humanAssassin.addSkill("Apply Venom");
State.variables.character.push(humanAssassin);
//Human Archer
const humanArcher = new Enemy();
humanArcher.Name = "Human Archer";
humanArcher.Name_pt = "Arqueiro Humano";
humanArcher.Ancestry = "Human";
humanArcher.Specialization = "Mercenary";
humanArcher.AP = 0;
humanArcher.APregen = 3;
humanArcher.BaseDefense = 10;
humanArcher.level = 4;
humanArcher.STR = 10;
humanArcher.RES = 7;
humanArcher.DEX = 6;
humanArcher.INT = 5;
humanArcher.CHA = 6;
humanArcher.PER = 16;
humanArcher.AP = 0;
humanArcher.level = 3;
humanArcher.traits = ["Opportunistic"];
humanArcher.skills = [];
humanArcher.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items['Leather armor'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items.Pants,
feet: State.variables.Items.Shoes,
mainhand: State.variables.Items.Longbow,
offhand: State.variables.Items.Handle,
};
humanArcher.additionalDefense = 0;
humanArcher.additionalDamage = 0;
humanArcher.additionalHitChance = 8;
humanArcher.MAXLIFE = ((humanArcher.level + 1) * 5) + humanArcher.RES;
humanArcher.MAXMANA = ((humanArcher.level + 1) * 4) + humanArcher.INT;
humanArcher.currentLife = humanArcher.MAXLIFE;
humanArcher.currentMana = humanArcher.MAXMANA;
humanArcher.addSkill("Quick Shot");
humanArcher.addSkill("Triple Shot");
humanArcher.addSkill("Scoping Stance");
State.variables.character.push(humanArcher);
//Slavemaster
const slaveMaster = new Enemy();
slaveMaster.Name = "Human Slavemaster";
slaveMaster.Name_pt = "Mestre de Escravos Humano";
slaveMaster.Ancestry = "Human";
slaveMaster.Specialization = "Commonfolk";
slaveMaster.AP = 0;
slaveMaster.APregen = 2;
slaveMaster.BaseDefense = 10;
slaveMaster.level = 3;
slaveMaster.STR = 8;
slaveMaster.RES = 6;
slaveMaster.DEX = 7;
slaveMaster.INT = 6;
slaveMaster.CHA = 14;
slaveMaster.PER = 8;
slaveMaster.traits = ["Follower", "Opportunistic"];
slaveMaster.skills = [];
slaveMaster.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Belt'],
legs: State.variables.Items['Pants'],
feet: State.variables.Items['Shoes'],
mainhand: State.variables.Items['Short sword'],
offhand: State.variables.Items['Wip'],
};
slaveMaster.additionalDefense = 0;
slaveMaster.additionalDamage = 0;
slaveMaster.additionalHitChance = 0;
slaveMaster.MAXLIFE = ((slaveMaster.level + 1) * 5) + slaveMaster.RES;
slaveMaster.MAXMANA = ((slaveMaster.level + 1) * 4) + slaveMaster.INT;
slaveMaster.currentLife = slaveMaster.MAXLIFE;
slaveMaster.currentMana = slaveMaster.MAXMANA;
slaveMaster.CD = 1;
slaveMaster.behavior = function () {
const slot = this.equipment.mainhand;
const enemyInstance = State.variables.enemyInstances;
const char = State.variables.character[1];
const language = State.variables.language;
const difficulty = State.variables.difficulty;
const slave = enemyInstance.filter(enemy => enemy.Specializaton === "Slave")
const enemies = enemyInstance.filter(enemy => enemy !== this)
let value = window.rollDice('1d4')
if (this.CD > 0) {
this.CD--
} else {
this.AP--
if (slave.length > 0) {
value = window.rollDice('2d4')
let randoSlave = slave[Math.floor(Math.random() * enemies.length)]
randoSlave.additionalDamage += value;
randoSlave.additionalHitChance += value;
value = Math.round(value * 0.85);
randoSlave.currentLife -= value;
if (language === "EN") {
addToBattleLog(`${this.Name} whips ${randoSlave.Name} into shape, raising their Damage and Hit Chance, while damaging by ${value}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} coloca ${randoSlave.Name_pt} em forma, aumentando seu Dano e Chance de Acerto, enquanto o Danifica em ${value}.`)
}
} else {
let rando = enemies[Math.floor(Math.random() * enemies.length)]
rando.additionalDamage += value
rando.currentLife -= value
if (language === "EN") {
addToBattleLog(`${this.Name} whips ${rando.Name} into shape, raising their Damage, while damaging by ${value}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} coloca ${rando.Name_pt} em forma, aumentando seu Dano, enquanto o Danifica em ${value}.`)
}
}
}
for (let i = 0; i < this.AP ; i++) {
if (this.stunned === 0 && char.statusEffects.hidden === false) {
window.triggerAttack(this, char, slot);
} else if (slave.length > 0 && char.statusEffects.hidden === false) {
this.AP--
slave[0].Ap++
window.triggerAttack(slave[0], char, slave[0].equipment.mainhand);
if (language === "EN") {
addToBattleLog(`${this.Name} commands a ${slave[0],Name} to attack in it place.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} comanda um ${slave[0],Name_pt} a atacar em seu lugar.`)
}
}
}
}
State.variables.character.push(slaveMaster);
//Human Slave
const slave = new Enemy();
slave.Name = "Human Slave";
slave.Name_pt = "Escravo Humano";
slave.Ancestry = "Human";
slave.Specialization = "Slave";
slave.AP = 0;
slave.APregen = 2;
slave.BaseDefense = 5;
slave.level = 2;
slave.STR = 3;
slave.RES = 16;
slave.DEX = 8;
slave.INT = 3;
slave.CHA = 6;
slave.PER = 8;
slave.traits = ["Follower", "Hardy", "Desperate"];
slave.skills = [];
slave.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Fist,
offhand: State.variables.Items['Other hand'],
};
slave.additionalDefense = 0;
slave.additionalDamage = 0;
slave.additionalHitChance = 0;
slave.MAXLIFE = ((slave.level + 1) * 5) + slave.RES;
slave.MAXMANA = ((slave.level + 1) * 4) + slave.INT;
slave.currentLife = slave.MAXLIFE;
slave.currentMana = slave.MAXMANA;
State.variables.character.push(slave);
//Freedom Figther
//Aryanna, The Free (Freedom Fighter+)
//Dwarf Gunner (hand cannon
//Dwarf Juggernaut
//Lawmother - While alive, all allied Dwarfs gain an additional Action. When damaged, the damage is halved betwen her and a random dwarf.
//Warfather - During it's turn, for each alive Dwarf, increase the number of dices of its weapon by 1. When an attack hits, recovers the life of all dwarfs by 2(+3 for each damage dice)%.
//Dwarf Protector (Very tanky Dwarf, only has 1 action which it uses to protect an ally)
//Dwarf Scholar
//Vanadi Protector
//Vanadi Druid
//Vanadi Savage
//Vanadi Godcaller
//Afflicted Elf (After 4 turns, become Urahyahra's Elf)
//Urahyahra's Elf
//Elf Tender
//Elf Druid
//Iruxian Scholar
//iruxian Savage
//Iruxian Defyer
//Iruxian Druid
//Iruxian Elder
//Draconian Elder
const DracoslaveMaster = new Enemy();
DracoslaveMaster.Name = "Draconian Slavemaster";
DracoslaveMaster.Name_pt = "Mestra de Escravos Draconiana";
DracoslaveMaster.Ancestry = "Draconian";
DracoslaveMaster.Specialization = "Commonfolk";
DracoslaveMaster.AP = 0;
DracoslaveMaster.APregen = 4;
DracoslaveMaster.BaseDefense = 15;
DracoslaveMaster.level = 8;
DracoslaveMaster.STR = 12;
DracoslaveMaster.RES = 9;
DracoslaveMaster.DEX = 9;
DracoslaveMaster.INT = 6;
DracoslaveMaster.CHA = 16;
DracoslaveMaster.PER = 10;
DracoslaveMaster.traits = ["Follower", "Opportunistic", "Sound Constitution", "Idomitable", "Though Skin", "Natural Warriors", "Apex Hunter"];
DracoslaveMaster.skills = [];
DracoslaveMaster.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Hauberk'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Pants'],
feet: State.variables.Items['Boots'],
mainhand: State.variables.Items["Long sword"],
offhand: State.variables.Items['Wip'],
};
DracoslaveMaster.additionalDefense = 0;
DracoslaveMaster.additionalDamage = 5;
DracoslaveMaster.additionalHitChance = 0;
DracoslaveMaster.MAXLIFE = ((DracoslaveMaster.level + 1) * 5) + DracoslaveMaster.RES;
DracoslaveMaster.MAXMANA = ((DracoslaveMaster.level + 1) * 4) + DracoslaveMaster.INT;
DracoslaveMaster.currentLife = DracoslaveMaster.MAXLIFE;
DracoslaveMaster.currentMana = DracoslaveMaster.MAXMANA;
DracoslaveMaster.CD = 1;
DracoslaveMaster.addSkill("Intimidate");
DracoslaveMaster.behavior = function () {
const slot = this.equipment.mainhand;
const enemyInstance = State.variables.enemyInstances;
const char = State.variables.character[1];
const language = State.variables.language;
const difficulty = State.variables.difficulty;
const slave = enemyInstance.filter(enemy => enemy.Specializaton === "Slave")
const enemies = enemyInstance.filter(enemy => enemy !== this)
let value = window.rollDice('2d4')
if (this.CD > 0) {
this.CD--
} else {
this.AP--
if (enemyInstance.length > 2) {
if (slave.length > 1) {
value = window.rollDice('3d4')
let randoSlave = slave[Math.floor(Math.random() * enemies.length)];
randoSlave.additionalDamage += value;
randoSlave.additionalHitChance += value;
let randoSlave2 = slave.filter(enemy => enemy !== randoSlave);
randoSlave2[0].additionalDamage += value;
randoSlave2[0].additionalHitChance += value;
value = Math.round(value * 0.85);
randoSlave.currentLife -= value;
randoSlave2[0].currentLife -= value;
if (language === "EN") {
addToBattleLog(`${this.Name} whips ${randoSlave.Name} and ${randoSlave2[0].Name} into shape, raising their Damage and Hit Chance, while damaging by ${value}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} coloca ${randoSlave.Name_pt} e ${randoSlave2[0].Name_pt }em forma, aumentando seu Dano e Chance de Acerto, enquanto os Danifica em ${value}.`)
}
} else {
let rando = enemies[Math.floor(Math.random() * enemies.length)]
rando.additionalDamage += value
rando.currentLife -= value
let rando2 = enemies.filter(enemy => enemy !== rando)
rando2[0].additionalDamage += value
rando2[0].currentLife -= value
if (language === "EN") {
addToBattleLog(`${this.Name} whips ${rando.Name} and ${rando2[0].Name} into shape, raising their Damage, while damaging them by ${value}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} coloca ${rando.Name_pt} e ${rando2[0].Name_pt} em forma, aumentando seu Dano, enquanto os Danifica em ${value}.`)
}
}
} else {
this.AP--;
window.addEnemiesToBattle(slave, 2);
if (language === "EN") {
addToBattleLog(`${this.Name} summons 2 more Slaves to fight for her.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} convoca mais 2 Escravos para lutarem para ela.`)
}
}
}
for (let i = 0; i < this.AP ; i++) {
if (this.stunned === 0 && char.statusEffects.hidden === false) {
window.triggerAttack(this, char, slot);
} else if (slave.length > 0 && char.statusEffects.hidden === false) {
slave.forEach(slav => {
this.AP--
slav.Ap++
window.triggerAttack(slav, char, slav.equipment.mainhand);
})
if (language === "EN") {
addToBattleLog(`${this.Name} commands all Slaves to attack in it place.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} comanda a todos os Escravos a atacarem em seu lugar.`)
}
} else if (this.skill[0].inCooldown === 0) {
window.useSkill(this, this.skill[0], char)
}
}
}
State.variables.character.push(DracoslaveMaster);
//Draconian fletchling
const Draconianfledgling = new Enemy();
Draconianfledgling.Name = "Draconian Fledgling";
Draconianfledgling.Name_pt = "Filhote Draconiano";
Draconianfledgling.Ancestry = "Draconian";
Draconianfledgling.Specialization = "CommonFolk";
Draconianfledgling.image = "img/enemies/DraconianHunter"
Draconianfledgling.AP = 0;
Draconianfledgling.APregen = 2;
Draconianfledgling.BaseDefense = 15;
Draconianfledgling.level = 3;
Draconianfledgling.STR = 8;
Draconianfledgling.RES = 8;
Draconianfledgling.DEX = 9;
Draconianfledgling.INT = 8;
Draconianfledgling.CHA = 5;
Draconianfledgling.PER = 9;
Draconianfledgling.traits = ["Desperate", "Coward", "Natural Warriors", "Apex Hunter"]
Draconianfledgling.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Belted Skirt'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Draconian claw'],
offhand: State.variables.Items['Other Draconian claw'],
};
Draconianfledgling.addSkill("War Cry");
Draconianfledgling.addSkill("Escape");
Draconianfledgling.MAXLIFE = ((Draconianfledgling.level + 1) * 5) + Draconianfledgling.RES;
Draconianfledgling.MAXMANA = ((Draconianfledgling.level + 1) * 4) + Draconianfledgling.INT;
Draconianfledgling.currentLife = Draconianfledgling.MAXLIFE;
Draconianfledgling.currentMana = Draconianfledgling.MAXMANA;
State.variables.character.push(Draconianfledgling);
const DraconianHunter = new Enemy();
DraconianHunter.Name = "Draconian Hunter";
DraconianHunter.Name_pt = "Caçador Draconiano";
DraconianHunter.Ancestry = "Draconian";
DraconianHunter.Specialization = "CommonFolk";
DraconianHunter.image = "img/enemies/DraconianHunter"
DraconianHunter.AP = 0;
DraconianHunter.APregen = 2;
DraconianHunter.BaseDefense = 15;
DraconianHunter.level = 5;
DraconianHunter.STR = 8;
DraconianHunter.RES = 8;
DraconianHunter.DEX = 9;
DraconianHunter.INT = 8;
DraconianHunter.CHA = 5;
DraconianHunter.PER = 9;
DraconianHunter.traits = ["Sound Constitution", "Idomitable", "Though Skin", "Natural Warriors", "Apex Hunter"]
DraconianHunter.additionalHitChance = 10;
DraconianHunter.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Belted Skirt'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Spear,
offhand: State.variables.Items.Handler,
};
DraconianHunter.addSkill("War Cry");
DraconianHunter.addSkill("Heay Strike");
DraconianHunter.MAXLIFE = ((DraconianHunter.level + 1) * 5) + DraconianHunter.RES;
DraconianHunter.MAXMANA = ((DraconianHunter.level + 1) * 4) + DraconianHunter.INT;
DraconianHunter.currentLife = DraconianHunter.MAXLIFE;
DraconianHunter.currentMana = DraconianHunter.MAXMANA;
State.variables.character.push(DraconianHunter);
//Scalebound Wyrm
const ScaleboundWyrm = new Enemy();
ScaleboundWyrm.Name = "Scalebound Wyrm";
ScaleboundWyrm.Name_pt = "Ancião Jurado Da Escama";
ScaleboundWyrm.image = "img/enemies/ScaleboundRavager"
ScaleboundWyrm.Ancestry = "Draconian";
ScaleboundWyrm.Specialization = "Scalebound Knight";
ScaleboundWyrm.BaseDefense = 20;
ScaleboundWyrm.APregen = 4;
ScaleboundWyrm.level = 13;
ScaleboundWyrm.STR = 11;
ScaleboundWyrm.RES = 21;
ScaleboundWyrm.DEX = 7;
ScaleboundWyrm.INT = 8;
ScaleboundWyrm.CHA = 17;
ScaleboundWyrm.PER = 13;
ScaleboundWyrm.traits = ["Boss", "Resilient", "Sound Constitution", "Idomitable", "Though Skin", "Natural Warriors", "Apex Hunter"]
ScaleboundWyrm.equipment = {
head: State.variables.Items['Dragon Scale helmet'],
torso: State.variables.Items['Dragon Scale armor'],
waist: State.variables.Items['Dragon Scale tassets '],
legs: State.variables.Items['Dragon Scale leggings '],
feet: State.variables.Items['Dragon Scale sabatons'],
mainhand: State.variables.Items['Flamethrower'],
offhand: State.variables.Items['Handle'],
};
ScaleboundWyrm.MAXLIFE = ((ScaleboundWyrm.level + 1) * 6) + ScaleboundWyrm.RES + ScaleboundWyrm.level * 2;
ScaleboundWyrm.MAXMANA = ((ScaleboundWyrm.level + 1) * 5) + ScaleboundWyrm.INT;
ScaleboundWyrm.currentLife = ScaleboundWyrm.MAXLIFE;
ScaleboundWyrm.currentMana = ScaleboundWyrm.MAXMANA;
ScaleboundWyrm.defenseUp = 0;
ScaleboundWyrm.CD = 4;
ScaleboundWyrm.CD2 = 1;
ScaleboundWyrm.CD3 = 2;
ScaleboundWyrm.Charges = 3;
ScaleboundWyrm.behavior = function () {
const slot = this.equipment.mainhand;
const enemyInstance = State.variables.enemyInstances;
const char = State.variables.character[1];
const language = State.variables.language;
const difficulty = State.variables.difficulty;
let regen = '2d4'
let bonus = '2d6'
this.AP = this.APregen
if (this.defenseUp > 0) {
this.additionalDefense -= this.defenseUp
this.defenseUp = 0
}
if (difficulty === "easy") {
regen = '1d4'
bonus = '1d6'
} else if (difficulty === "hard") {
regen = '3d4'
bonus = '3d6'
}
if (this.CD3 > 0) {
this.CD3--;
} else {
this.CD3 += 3;
if (difficulty === "easy") {
char.statusEffects.burn.damage += 1;
} else if (difficulty === "hard") {
char.statusEffects.burn.damage += 3;
} else {
char.statusEffects.burn.damage += 2;
}
this.statusEffects.burn.duration += 3;
this.statusEffects.burn.stacks++
if (language === "EN") {
addToBattleLog(`${this.Name} raises the heat. <b>Burn</b> in you now deals ${char.statusEffects.burn.damage} Damage per stack.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} aumenta o calor. <b>Queima</b> em você agora causa ${char.statusEffects.burn.damage} de Dano por ácumulo.`)
}
}
if (this.currentLife < this.MAXLIFE) {
regen = window.rollDice(regen);
this.currentLife += regen
Math.clamp(this.currentLife, 0, this.MAXLIFE)
if (language === "EN") {
addToBattleLog(`${this.Name} regains ${regen} Lifeblood back.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} reganha ${regen} de Força Vital de volta.`)
}
}
if (this.CD > 0) {
this.CD--
} else {
if (language === "EN") {
addToBattleLog(`${this.Name} commands all Scalebounds to attack you.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} comanda a todos os Jurados da Escama a lhe atacarem.`)
}
enemyInstances.forEach(enemy => {
if (enemy.Specialization === "Scalebound Knight" && enemy !== this) {
this.CD += 2;
enemy.AP +=2;
window.triggerAttack(enemy, char, enemy.equipment.mainhand);
}
})
if (this.statusEffects.burn.duration > 0) {
this.currentLife -= this.statusEffects.burn.damage * this.statusEffects.burn.stacks
}
}
if (this.CD2 > 2) {
this.CD2--
} else {
this.CD2 += 2;
bonus = window.rollDice(bonus);
const draconians = enemyInstance.filter(enemy => Specialization === "Scalebound Knight" && enemy.Name !== this.Name)
let randomEnemy = draconians[Math.floor(Math.random()*draconians.length)];
randomEnemy.additionalDamage += bonus;
randomEnemy.statusEffects.burn.duration += bonus;
randomEnemy.statusEffects.burn.stacks++
}
for (let i = 0; i < this.AP ; i++) {
if (this.stunned === 0 && char.statusEffects.hidden === false) {
window.triggerAttack(this, char, slot);
} else {
this.additionalDefense += 7 * this.AP;
this.defenseUp= 7 * this.AP;
this.AP = 0;
if (language === "EN") {
addToBattleLog(`${this.Name} prepares themselves, raising their Defense by ${this.defenseUp}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} se prepare, aumentando sua Defesa em ${this.defenseUp}.`)
}
}
}
}
//Scalebound Ravager (Draconian Ancestry)
const ScaleboundRavager = new Enemy();
ScaleboundRavager.Name = "Scalebound Ravager";
ScaleboundRavager.Name_pt = "Devastador Jurado Da Escama";
ScaleboundRavager.image = "img/enemies/ScaleboundRavager"
ScaleboundRavager.Ancestry = "Draconian";
ScaleboundRavager.Specialization = "Scalebound Knight";
ScaleboundRavager.BaseDefense = 20;
ScaleboundRavager.APregen = 4;
ScaleboundRavager.level = 11;
ScaleboundRavager.STR = 17;
ScaleboundRavager.RES = 11;
ScaleboundRavager.DEX = 17;
ScaleboundRavager.INT = 6;
ScaleboundRavager.CHA = 4;
ScaleboundRavager.PER = 10;
ScaleboundRavager.traits = ["Sound Constitution", "Idomitable", "Though Skin", "Natural Warriors", "Apex Hunter", "Savagery"]
ScaleboundRavager.additionalDamage = 8;
ScaleboundRavager.equipment = {
head: State.variables.Items['Dragon Scale helmet'],
torso: State.variables.Items['Dragon Scale armor'],
waist: State.variables.Items['Dragon Scale tassets '],
legs: State.variables.Items['Dragon Scale leggings '],
feet: State.variables.Items['Dragon Scale sabatons'],
mainhand: State.variables.Items['Draconian claw'],
offhand: State.variables.Items['Other Draconian claw'],
};
ScaleboundRavager.MAXLIFE = ((ScaleboundRavager.level + 1) * 5) + ScaleboundRavager.RES;
ScaleboundRavager.MAXMANA = ((ScaleboundRavager.level + 1) * 4) + ScaleboundRavager.INT;
ScaleboundRavager.currentLife = ScaleboundRavager.MAXLIFE;
ScaleboundRavager.currentMana = ScaleboundRavager.MAXMANA;
ScaleboundRavager.CD = 6;
ScaleboundRavager.defenseUp = 0;
ScaleboundRavager.CD2 = 0;
ScaleboundRavager.Charges = 3;
ScaleboundRavager.behavior = function () {
const slot = this.equipment.mainhand;
const enemyInstance = State.variables.enemyInstances;
const char = State.variables.character[1];
const language = State.variables.language;
const difficulty = State.variables.difficulty;
let atttackbouns = 3;
if (difficulty === "hard") {
atttackbouns = 5;
} else if (difficulty === "easy") {
atttackbouns = 2;
}
if (this.defenseUp > 0) {
this.additionalDefense -= this.defenseUp
this.defenseUp = 0
}
if (this.CD > 0) {
this.CD--
} else if (this.CD === 0 && this.Charges > 0) {
this.AP--
let bonus = 1;
if (this.Charges === 3) {
bonus = 0;
} else if (this.Charges === 1) {
bonus = 2;
}
this.Charges--
char.statusEffects.burn.stacks == bonus;
char.statusEffects.burn.duration += 3;
char.currentLife -= char.statusEffects.burn.damage;
enemyInstance.forEach(enemy => {
enemy.statusEffects.burn.stacks == bonus;
enemy.statusEffects.burn.duration += 3;
enemy.currentLife -= enemy.statusEffects.burn.damage;
})
if (this.Charges === 0) {
if (language === "EN") {
addToBattleLog(`${this.Name} throws their last incendiary bomb, inflicting <b>Burn(3)</b> to everyone. Everyone takes ${this.statusEffects.burn.damage} Damage.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} joga sua última bomba incendiária, causando <b>Queima(3)</b> a todos. Todo mundo toma ${this.statusEffects.burn.damage} de Dano.`)
}
} else {
if (language === "EN") {
addToBattleLog(`${this.Name} throws a incendiary bomb, inflicting <b>Burn(3)</b> to everyone. Everyone takes ${this.statusEffects.burn.damage} Damage.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} joga uma bomba incendiária, causando <b>Queima(3)</b> a todos. Todo mundo toma ${this.statusEffects.burn.damage} de Dano.`)
}
}
}
if (this.currentLife <= MAth.round((this.MAXLIFE * 0.45))) {
this.AP++
atttackbouns += 2;
}
for (let i = 0; i < this.AP; i++) {
if (char.statusEffects.hidden === false && this.statusEffects.stunned === 0) {
window.triggerAttack(this, char, this.equipment.mainhand);
} else {
this.additionalDefense += 5 * this.AP;
this.defenseUp= 5 * this.AP;
this.AP = 0;
if (language === "EN") {
addToBattleLog(`${this.Name} prepares themselves, raising their Defense by ${this.defenseUp}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} se prepare, aumentando sua Defesa em ${this.defenseUp}.`)
}
}
}
if (this.CD2 > 0) {
this.CD2--
} else {
this.CD2++
this.additionalDamage += atttackbouns;
if (language === "EN") {
addToBattleLog(`${this.Name} riles up, increasing their Damage by ${atttackbouns}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} se irrita, aumentando seu Dano em ${atttackbouns}.`)
}
}
//make 2 attacks against the character[1]. then increase this object additionalDamage by 3. If health is below 35% attack thrice
}
State.variables.character.push(ScaleboundRavager);
//Scalebound Defenser (Draconian Ancestry)
const ScaleboundDefender = new Enemy();
ScaleboundDefender.Name = "Scalebound Defender";
ScaleboundDefender.Name_pt = "Defensor Jurado Da Escama";
ScaleboundDefender.image = "img/enemies/ScaleboundDefender"
ScaleboundDefender.Ancestry = "Draconian";
ScaleboundDefender.Specialization = "Scalebound Knight";
ScaleboundDefender.AP = 0;
ScaleboundDefender.APregen = 3;
ScaleboundDefender.BaseDefense = 20;
ScaleboundDefender.level = 11; //8 + 33 = 0
ScaleboundDefender.STR = 12;
ScaleboundDefender.RES = 19;
ScaleboundDefender.DEX = 10;
ScaleboundDefender.INT = 5;
ScaleboundDefender.CHA = 12;
ScaleboundDefender.PER = 13;
ScaleboundDefender.traits = ["Sound Constitution", "Phalanx Training", "Idomitable", "Though Skin", "Natural Warriors", "Apex Hunter"]
ScaleboundDefender.equipment = {
head: State.variables.Items['Dragon Scale helmet'],
torso: State.variables.Items['Dragon Scale armor'],
waist: State.variables.Items['Dragon Scale tassets '],
legs: State.variables.Items['Dragon Scale leggings '],
feet: State.variables.Items['Dragon Scale sabatons'],
mainhand: State.variables.Items.Javelin,
offhand: State.variables.Items.Shield,
};
ScaleboundDefender.MAXLIFE = ((ScaleboundDefender.level + 1) * 5) + ScaleboundDefender.RES;
ScaleboundDefender.MAXMANA = ((ScaleboundDefender.level + 1) * 4) + ScaleboundDefender.INT;
ScaleboundDefender.currentLife = ScaleboundDefender.MAXLIFE;
ScaleboundDefender.currentMana = ScaleboundDefender.MAXMANA;
ScaleboundDefender.addSkill("Defensive Stance");
ScaleboundDefender.addSkill("Shields Up");
ScaleboundDefender.addSkill("Bash");
ScaleboundDefender.CD = 0;
ScaleboundDefender.CD3 = 1;
ScaleboundDefender.protecting = null;
ScaleboundDefender.defenseUp = 0;
ScaleboundDefender.behavior = function () {
const slot = this.equipment.mainhand;
const enemyInstance = State.variables.enemyInstances;
const char = State.variables.character[1];
const language = State.variables.language;
const difficulty = State.variables.difficulty;
this.AP = this.APregen
if (this.protecting !== null && this.protecting.currentLife && this.protecting.currentLife <= 0) {
this.protecting = null;
}
if (this.CD > 0) {
this.CD--
} else {
}
if (this.defenseUp > 0) {
this.additionalDefense -= this.defenseUp
this.defenseUp = 0
}
if (this.skill[0].inCooldown === 0 && this.statusEffects.stance && this.statusEffects.stance.active && this.statusEffects.stance.active === false) {
window.useSkill(this, this.skill[0], char)
}
if (this.skill[1].inCooldown === 0) {
window.useSkill(this, this.skill[1], char)
} else if (this.skill[2].inCooldown === 0) {
window.useSkill(this, this.skill[2], char)
}
for (let i = 0; i < this.AP; i++) {
if (char.statusEffects.hidden === false && this.statusEffects.stunned === 0) {
window.triggerAttack(this, char, this.equipment.mainhand);
} else {
this.additionalDefense += 9 * this.AP;
this.defenseUp= 9 * this.AP;
this.AP = 0;
if (language === "EN") {
addToBattleLog(`${this.Name} prepares themselves, raising their Defense by ${this.defenseUp}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} se prepare, aumentando sua Defesa em ${this.defenseUp}.`)
}
}
}
if (this.CD3 > 0) {
this.CD3--
} else if (this.CD3 === 0 && this.protecting === null) {
const protection = []
protection.push(State.variables.character[1]);
State.variables.enemyInstances.forEach(enemy => {
if (enemy !== this) {
protection.push(enemy)
}
})
this.CD = 5;
this.additionalDefense -= 10;
this.protecting = protection[Math.floor(Math.random() * protection.length)];
this.protecting.statusEffects.protectedby = this;
if (language === "EN") {
addToBattleLog(`${this.Name} takes the front to protect ${this.protecting.Name}.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} toma a frente para proteger ${this.protecting.Name_pt}.`)
}
}
}
State.variables.character.push(ScaleboundDefender);
//Scalebound Hunter (Draconian Ancestry)
const ScaleboundHunter = new Enemy();
ScaleboundHunter.Name = "Scalebound Slave Hunter";
ScaleboundHunter.Name_pt = "Caçador de Escravos Jurado Da Escama";
ScaleboundHunter.Ancestry = "Draconian";
ScaleboundHunter.Specialization = "Scalebound Knight";
ScaleboundHunter.AP = 0;
ScaleboundHunter.APregen = 3;
ScaleboundHunter.BaseDefense = 20;
ScaleboundHunter.level = 11;
ScaleboundHunter.STR = 11;
ScaleboundHunter.RES = 14;
ScaleboundHunter.DEX = 13;
ScaleboundHunter.INT = 8;
ScaleboundHunter.CHA = 6;
ScaleboundHunter.PER = 19;
ScaleboundHunter.traits = ["Though Skin", "Idomitable", "Natural Warriors", "Apex Hunter"]
ScaleboundDefender.addSkill("Heavy Strike");
ScaleboundDefender.addSkill("Parry");
ScaleboundDefender.addSkill("Intimidate");
ScaleboundDefender.addSkill("Lunging Stance");
ScaleboundHunter.equipment = {
head: State.variables.Items['Dragon Scale helmet'],
torso: State.variables.Items['Dragon Scale armor'],
waist: State.variables.Items['Dragon Scale tassets '],
legs: State.variables.Items['Dragon Scale leggings '],
feet: State.variables.Items['Dragon Scale sabatons'],
mainhand: State.variables.Items.Spear,
offhand: State.variables.Items.Handle,
};
ScaleboundHunter.MAXLIFE = ((ScaleboundHunter.level + 1) * 5) + ScaleboundHunter.RES;
ScaleboundHunter.MAXMANA = ((ScaleboundHunter.level + 1) * 4) + ScaleboundHunter.INT;
ScaleboundHunter.currentLife = ScaleboundHunter.MAXLIFE;
ScaleboundHunter.currentMana = ScaleboundHunter.MAXMANA;
ScaleboundHunter.CD = 3;
ScaleboundHunter.CD2 = 2;
ScaleboundHunter.CD3 = 3;
ScaleboundHunter.defenseUp = 0;
ScaleboundHunter.behavior = function () {
const slot = this.equipment.mainhand;
const slot2 = this.equipment.offhand;
const item = State.variables.Item;
const enemyInstance = State.variables.enemyInstances;
const char = State.variables.character[1];
const language = State.variables.language;
const difficulty = State.variables.difficulty;
if (this.defenseUp > 0) {
this.additionalDefense -= this.defenseUp
this.defenseUp = 0
}
if (this.CD > 0) {
this.CD--;
} else {
this.CD = 5;
this.AP--
if (slot = item.Spear) {
slot = item.Scimitar;
slot2 = item["Parrying Dagger"]
if (language === "EN") {
addToBattleLog(`${this.Name} changes weapon, equipping a Scimitar and a Parrying Dagger.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} muda de arma, equipando uma Cimitara e uma Adaga de Aparo.`)
}
} else if (slot = item.Scimitar) {
slot = item.Spear;
slot2 = item.Handle
if (language === "EN") {
addToBattleLog(`${this.Name} changes weapon, equipping a Spear.`)
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} muda de arma, equipando uma Lança.`)
}
}
}
if (this.CD2 > 0) {
this.CD2--;
} else {
if (char.statusEffects.hidden === true) {
if (language === "EN") {
ddToBattleLog(`${this.Name} points out your location to the others, you loose your <b>Hidden</b> status.`);
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} revela sua localização para os outros, você perde seu status <b>Escondido</b>.`);
}
char.statusEffects.hidden = false;
this.CD2 += 2
} else if (this.statusEffects.stunned > 0 || this.statusEffects.confused > 0 || this.statusEffects.hindered > 0) {
this.statusEffects.stunned = 0;
this.statusEffects.hindered = 0;
this.statusEffects.confused = 0;
if (language === "EN") {
addToBattleLog(`${this.Name} shakes off some of their negative effects.`);
} else if (language === "PT-BR") {
addToBattleLog(`${this.Name_pt} se livra de alguns de seus status negativos.`);
}
this.CD2 += 3;
} else {
this.AP++
window.triggerAttack(this, char, item['Other Draconian claw']);
this.CD2 += 1;
}
}
if (this.CD3 > 0) {
this.CD3--;
} else {
this.AP += 2;
this.CD += window.rollDice('1d4')
}
if (this.skill[3].inCooldown === 0 && this.statusEffects.stance && this.statusEffects.stance.active && this.statusEffects.stance.active === false) {
window.useSkill(this, this.skill[3], char)
}
for (let i = 0; i < this.AP; i++) {
if (slot === item.Spear && this.skills[0].inCooldown === 0) {
window.useSkill(this, this.skill[0], char)
} else if (slot === item.Scimitar && this.skills[1].inCooldown === 0) {
window.useSkill(this, this.skill[1], char)
} else if (this.skills[2].inCooldown === 0) {
window.useSkill(this, this.skill[2], char)
}
if (this.statusEffects.stunned === 0 && char.statusEffects.hidden === false) {
window.triggerAttack(this, char, slot);
} else {
this.additionalDefense += 7 * this.AP;
this.defenseUp= 7 * this.AP;
this.AP = 0;
this.AP = 0;
}
}
}
State.variables.character.push(ScaleboundHunter);
//Godchild
//Nature's Herald
//Destruction's Herald
//Cosmos Herald
//Creation Herald
//Animals
//Wild Wolf
const WildWolf = new Enemy();
WildWolf.Name = "Wild Wolf";
WildWolf.Name_pt = "Lobo Selvagem";
WildWolf.Ancestry = "Beast";
WildWolf.Specialization = "Wild";
WildWolf.BaseDefense = 5;
WildWolf.AP = 0;
WildWolf.APregen = 2;
WildWolf.level = 1;
WildWolf.STR = 12;
WildWolf.RES = 5;
WildWolf.DEX = 11;
WildWolf.INT = 2;
WildWolf.CHA = 3;
WildWolf.PER = 8;
WildWolf.traits = ["Follower", "Feral", "Wolf", "Savagery"];
WildWolf.skills = [];
WildWolf.addSkill("Bite");
WildWolf.additionalDefense = 0;
WildWolf.additionalDamage = 7;
WildWolf.additionalHitChance = 5;
WildWolf.MAXLIFE = ((WildWolf.level + 1) * 5) + WildWolf.RES;
WildWolf.MAXMANA = ((WildWolf.level + 1) * 4) + WildWolf.INT;
WildWolf.currentLife = WildWolf.MAXLIFE;
WildWolf.currentMana = WildWolf.MAXMANA;
WildWolf.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Claws,
offhand: State.variables.Items['Other hand'],
};
WildWolf.image = "img/enemies/WildWolf.png";
State.variables.character.push(WildWolf);
//Alpha Wolf
const AlphaWolf = new Enemy();
AlphaWolf.Name = "Alpha Wolf";
AlphaWolf.Name_pt = "Lobo Alpha";
AlphaWolf.Ancestry = "Beast";
AlphaWolf.Specialization = "Wild";
AlphaWolf.BaseDefense = 15;
AlphaWolf.AP = 0;
AlphaWolf.APregen = 3;
AlphaWolf.level = 6;
AlphaWolf.STR = 19;
AlphaWolf.RES = 8;
AlphaWolf.DEX = 11;
AlphaWolf.INT = 2;
AlphaWolf.CHA = 7;
AlphaWolf.PER = 9;
AlphaWolf.traits = ["Feral", "Ravenous", "Wolf", "Savagery",];
AlphaWolf.skills = [];
AlphaWolf.addSkill("Bite");
AlphaWolf.addSkill("Mutilate");
AlphaWolf.addSkill("Howl");
AlphaWolf.additionalDefense = 0;
AlphaWolf.additionalDamage = 12;
AlphaWolf.additionalHitChance = 14;
AlphaWolf.MAXLIFE = ((AlphaWolf.level + 1) * 5) + AlphaWolf.RES;
AlphaWolf.MAXMANA = ((AlphaWolf.level + 1) * 4) + AlphaWolf.INT;
AlphaWolf.currentLife = AlphaWolf.MAXLIFE;
AlphaWolf.currentMana = AlphaWolf.MAXMANA;
AlphaWolf.Gold = 0;
AlphaWolf.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Claws,
offhand: State.variables.Items['Other hand'],
};
State.variables.character.push(AlphaWolf);
//Bear
const Bear = new Enemy();
Bear.Name = "Bear";
Bear.Name_pt = "Urso";
Bear.Ancestry = "Beast";
Bear.Specialization = "Wild";
Bear.BaseDefense = 15;
Bear.AP = 0;
Bear.APregen = 3;
Bear.level = 4;
Bear.STR = 13;
Bear.RES = 19;
Bear.DEX = 4;
Bear.INT = 2;
Bear.CHA = 6;
Bear.PER = 6;
Bear.traits = ["Though Skin", "Feral", "Natural Fighter"];
Bear.skills = [];
Bear.addSkill("Bite");
Bear.addSkill("Rend");
Bear.addSkill("War Cry");
Bear.additionalDefense = 10;
Bear.additionalDamage = 0;
Bear.additionalHitChance = 0;
Bear.currentLife = 86;
Bear.currentMana = 13;
Bear.MAXLIFE = 86;
Bear.MAXMANA = 13;
Bear.Gold = 0;
Bear.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Bear hands'],
offhand: State.variables.Items['Other hand'],
};
State.variables.character.push(Bear);
//Snakes
const Snakes = new Enemy();
Snakes.Name = "Snake";
Snakes.Name_pt = "Cobra";
Snakes.Ancestry = "Beast";
Snakes.Specialization = "Wild";
Snakes.BaseDefense = 5;
Snakes.level = 2;
Snakes.STR = 5;
Snakes.RES = 4;
Snakes.DEX = 14;
Snakes.INT = 7;
Snakes.CHA = 3;
Snakes.PER = 9;
Snakes.traits = ["Venomous", "Feral", "Sneaky"];
Snakes.skills = [];
Snakes.addSkill("Bite");
Snakes.additionalDefense = 10;
Snakes.additionalDamage = 0;
Snakes.additionalHitChance = 0;
Snakes.MAXLIFE = ((Snakes.level + 1) * 5) + Snakes.RES;
Snakes.MAXMANA = ((Snakes.level + 1) * 4) + Snakes.INT;
Snakes.currentLife = Snakes.MAXLIFE;
Snakes.currentMana = Snakes.MAXMANA;
Snakes.statusEffects = {
hidden: true,
}
Snakes.Gold = 0;
Snakes.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Maw,
offhand: State.variables.Items['Other hand'],
};
Snakes.battleturns = 0;
Snakes.behavior = function (){
const target = State.variables.character[1];
if (this.statusEffects.hiden === true) {
if (State.variables.language === "EN") {
addToBattleLog(`The ${this.Name} lunges forth...`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`A ${this.Name} avança...`);
}
useSkill(this, "Bite", target);
this.statusEffects.hidden = false;
} else {
const slot = this.equipment.mainhand;
if (target.statusEffects.poison >= 1) {
this.additionalDamage += 5
}
window.triggerAttack(this, target, slot)
if (target.statusEffects.poison >= 1) {
this.additionalDamage -= 5
}
}
this.battleturns += 1;
if (this.battleturns === 4) {
this.statusEffects.hiden = true
this.battleturns = 0
}
}
State.variables.character.push(Snakes);
//Swarm of Rats
const RatSwarm = new Enemy();
RatSwarm.Name = "Rat Swarm";
RatSwarm.Name_pt = "Enxame de Ratos";
RatSwarm.Ancestry = "Beast";
RatSwarm.Specialization = "Wild";
RatSwarm.BaseDefense = 5;
RatSwarm.AP = 0;
RatSwarm.APregen = 4;
RatSwarm.level = 2;
RatSwarm.STR = 3;
RatSwarm.RES = 8;
RatSwarm.DEX = 11;
RatSwarm.INT = 8;
RatSwarm.CHA = 3;
RatSwarm.PER = 6;
RatSwarm.additionalDamage = -3;
RatSwarm.traits = ["Venomous", "Feral", "Sneaky", "Swarm"];
RatSwarm.skills = [];
RatSwarm.addSkill("Bite");
RatSwarm.additionalDefense = 10;
RatSwarm.additionalDamage = 0;
RatSwarm.additionalHitChance = 0;
RatSwarm.MAXLIFE = ((RatSwarm.level + 1) * 5) + RatSwarm.RES;
RatSwarm.MAXMANA = ((RatSwarm.level + 1) * 4) + RatSwarm.INT;
RatSwarm.currentLife = RatSwarm.MAXLIFE;
RatSwarm.currentMana = RatSwarm.MAXMANA;
RatSwarm.statusEffects = {
hidden: true,
}
RatSwarm.Gold = 0;
RatSwarm.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Maw,
offhand: State.variables.Items['Other hand'],
};
RatSwarm.image = "img/enemies/ratSwarm.png";
State.variables.character.push(RatSwarm);
//Rat King
const RatKing = new Enemy();
RatKing.Name = "Rat King";
RatKing.Ancestry = "Beast";
RatSwarm.Specialization = "Wild";
RatKing.BaseDefense = 5;
RatKing.AP = 0;
RatKing.APregen = 1;
RatKing.level = 3;
RatKing.STR = 9;
RatKing.RES = 4;
RatKing.DEX = 10;
RatKing.INT = 9;
RatKing.CHA = 11;
RatKing.PER = 4;
RatKing.traits = ["Venomous", "Feral", "Boss"];
RatKing.additionalDamage = 12;
RatKing.MAXLIFE = ((RatKing.level + 1) * 6) + RatKing.RES;
RatKing.MAXMANA = ((RatKing.level + 1) * 5) + RatKing.INT;
RatKing.currentLife = RatKing.MAXLIFE;
RatKing.currentMana = RatKing.MAXMANA;
RatKing.royalBuff = 0;
RatKing.behavior = function(){
let enemyInstances = State.variables.enemyInstances;
const hasRat = enemyInstances.some(enemy => enemy.Name === 'RatSwarm');
if (this.royalBuff === 0) {
window.addEnemiesToBattle(RatSwarm, 2);
enemyInstances.shuffle
this.statusEffects.hidden = true
this.royalBuff++
} else if (this.royalBuff !== 0 && hasRat) {
enemyInstances.forEach(rat =>{
if (rat.Name === "Rat Swarm") {
rat.additionalDamage += 2 + this.royalBuff;
rat.additionalDefense += 2 + this.royalBuff;
rat.additionalHitChance += 2 + this.royalBuff;
}
})
this.royalBuff++
this.statusEffects.hidden = true
} else {
let chance = random(1,10)
if (chance >= 8) {
window.addEnemiesToBattle(RatSwarm, 1);
enemyInstances.shuffle
} else {
const slot = this.equipment.mainhand;
window.triggerAttack(this, State.variables.character[1], slot);
}
}
}
RatKing.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Claws,
offhand: State.variables.Items['Other hand'],
};
State.variables.character.push(RatKing);
//Behaviour: At the start of the battle, summon 2 RatSwarms, every 4 turns, give them Hidden. During it's turn, buff the RatSwarms damage, hitchance and defense (randomly) by 1-10.
//Ogre (Ogroid Ancestry)
const Ogre = new Enemy();
Ogre.Name = "Ogre";
Ogre.Name_pt = "Ogro";
Ogre.Ancestry = "Ogroid";
//Orc (Ogroid Ancestry)
const Orc = new Enemy();
Orc.Name = "Orc";
Orc.Name_pt = "Orc";
Orc.Ancestry = "Ogroid";
//Orc Shaman - summons a totem
//Fire Totem - each turn increases the damage of all enemies and apply burn the player
//Water Totem - each turn heals all enemies and removes a random debuff.
//Earth Totem - each turn increases the defense of all enemies and increase their MAXLIFE by 4.
//Air Totem - each turn increases the hitchance of all enemies and increase their AP by 1.
//Orc Champion
//Goblin (Ogroid Ancestry)
const Goblin = new Enemy();
Goblin.Name = "Goblin";
Goblin.Name_pt = "Goblin";
Goblin.Ancestry = "Ogroid";
Goblin.Specialization = "GOBLIN!"
Goblin.image = "img/enemies/Goblin.png";
Goblin.BaseDefense = 10;
Goblin.AP = 0;
Goblin.APregen = 1;
Goblin.level = 1;
Goblin.STR = 6;
Goblin.RES = 5;
Goblin.DEX = 13;
Goblin.INT = 3;
Goblin.CHA = 9;
Goblin.PER = 5;
Goblin.traits = ["Sneaky", "Follower", "Annoying", "GOBLIN!"];
Goblin.MAXLIFE = ((Goblin.level + 1) * 5) + Goblin.RES;
Goblin.MAXMANA = ((Goblin.level + 1) * 4) + Goblin.INT;
Goblin.currentLife = Goblin.MAXLIFE;
Goblin.currentMana = Goblin.MAXMANA;
Goblin.behaviour = function() {
if (this.statusEffects.GOBLINSONG) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG) {
this.additionalDamage += 3;
this.additionalHitChance += 3;
this.additionalDefense += 3;
}
});
this.statusEffects.GOBLINSONG = false;
const message = State.variables.langage === "EN" ?
`${this.Name} continues to sing that terrible song, somehow growing stronger from it...` :
`${this.Name_pt} continua a cantar aquela terrível canção, de alguma forma, eles parecem ficar mais fortes...`;
addToBattleLog(message);
} else {
if (this.equipment.mainhand.ammo === 0) {
this.equipment.mainhand = State.variables.Items.Fist; // Fixed assignment operator
}
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
// Check if an allied goblin is singing
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG) {
this.statusEffects.GOBLINSONG = true;
}
});
}
};
Goblin.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Rock,
offhand: State.variables.Items['Other hand'],
};
State.variables.character.push(Goblin);
//Goblin hunt hunty
const GoblinHunter = new Enemy();
GoblinHunter.Name = "Hunty Goblin";
GoblinHunter.Name_pt = "Goblin Caça Dor";
GoblinHunter.Ancestry = "Ogroid";
GoblinHunter.Specialization = "GOBLIN!"
GoblinHunter.image = "img/enemies/HuntGoblin.png";
GoblinHunter.BaseDefense = 10;
GoblinHunter.AP = 0;
GoblinHunter.APregen = 2;
GoblinHunter.level = 3;
GoblinHunter.STR = 11;
GoblinHunter.RES = 6;
GoblinHunter.DEX = 16;
GoblinHunter.INT = 4;
GoblinHunter.CHA = 8;
GoblinHunter.PER = 5;
GoblinHunter.traits = ["Sneaky", "Follower", "Annoying", "GOBLIN!"];
GoblinHunter.MAXLIFE = ((GoblinHunter.level + 1) * 5) + GoblinHunter.RES;
GoblinHunter.MAXMANA = ((GoblinHunter.level + 1) * 4) + GoblinHunter.INT;
GoblinHunter.currentLife = GoblinHunter.MAXLIFE;
GoblinHunter.currentMana = GoblinHunter.MAXMANA;
GoblinHunter.behavior = function() {
if (this.statusEffects.GOBLINSONG) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG) {
this.additionalDamage += 2;
this.additionalHitChance += 4;
this.additionalDefense += 2;
}
});
this.statusEffects.GOBLINSONG = false;
const message = State.variables.langage === "EN" ?
`${this.Name} continues to sing that terrible song, somehow growing stronger from it...` :
`${this.Name_pt} continua a cantar aquela terrível canção, de alguma forma, eles parecem ficar mais fortes...`;
addToBattleLog(message);
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
// Check if an allied goblin is singing
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG) {
this.statusEffects.GOBLINSONG = true;
}
});
}
};
GoblinHunter.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Spear,
offhand: State.variables.Items.Handle,
};
State.variables.character.push(GoblinHunter);
//Goblin Spell Shoota
const SpellGoblin = new Enemy();
SpellGoblin.Name = "Goblin Spell Shoota";
SpellGoblin.Ancestry = "Ogroid";
SpellGoblin.Specialization = "GOBLIN!"
SpellGoblin.image = "img/enemies/WizzGoblin.png";
SpellGoblin.AP = 0;
SpellGoblin.APregen = 3;
SpellGoblin.BaseDefense = 10;
SpellGoblin.level = 3;
SpellGoblin.STR = 3;
SpellGoblin.RES = 4;
SpellGoblin.DEX = 11;
SpellGoblin.INT = 14;
SpellGoblin.CHA = 2;
SpellGoblin.PER = 6;
SpellGoblin.traits = ["Sneaky", "Follower", "Annoying", "GOBLIN!"];
SpellGoblin.MAXLIFE = ((SpellGoblin.level + 1) * 5) + SpellGoblin.RES;
SpellGoblin.MAXMANA = ((SpellGoblin.level + 1) * 4) + SpellGoblin.INT;
SpellGoblin.currentLife = SpellGoblin.MAXLIFE;
SpellGoblin.currentMana = SpellGoblin.MAXMANA;
SpellGoblin.behavior = function() {
//casts a spell from the
if (this.statusEffects.GOBLINSONG === true) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG) {
this.additionalDamage += 2;
this.additionalDefense += 2;
this.currentMana += 4
}
});
}
const filteredSkills = this.skills.filter(skill => skill.name !== "Escape" && skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
// Check if there are any skills left after filtering
if (filteredSkills.length > 0) {
this.statusEffects.GOBLINSONG = false;
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
const poorVictim = []
poorVictim.push(State.variables.character[1]);
State.variables.enemyInstances.forEach(enemy => {
if (enemy !== this) {
poorVictim.push(enemy)
}
})
// Use the selected randomSkill
window.useSkill(this, randomSkill, poorVictim[Math.floor(Math.random() * poorVictim.lenght)])
if (filteredSkills.length > 0) {
const randomSkill2 = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
if (this.currentMana > randomSkill2.Manacost) {
window.useSkill(this, randomSkill2, poorVictim[Math.floor(Math.random() * poorVictim.lenght)])
if (State.variables.character[1].traits.includes("Spell Thief")) {
let stealchance = rollDice('1d100') <= State.variables.character[1].DEX + State.variables.character[1].INT
if (stealchance) {
State.variables.character[1].addSkill(randomSkill.Name);
if (State.variables.language === "PT-BR") {
addToBattleLog(`Mas que patife! ${State.variables.character[1].Name} roubou a habilidade de ${this.Name_pt}`);
} else if (State.variables.language === "EN") {
addToBattleLog(`What a rascal! ${State.variables.character[1].Name} stole ${this.Name}'s skill!`)
}
}
}
} else {
if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} ficou sem Essência.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} ran out of Essence.`)
}
}
}
if (State.variables.character[1].traits.includes("Spell Thief")) {
let stealchance = rollDice('1d100') <= State.variables.character[1].DEX + State.variables.character[1].INT
if (stealchance) {
State.variables.character[1].addSkill(randomSkill.Name);
if (State.variables.language === "PT-BR") {
addToBattleLog(`Mas que patife! ${State.variables.character[1].Name} roubou a habilidade de ${this.Name_pt}`);
} else if (State.variables.language === "EN") {
addToBattleLog(`What a rascal! ${State.variables.character[1].Name} stole ${this.Name}'s skill!`)
}
}
}
} else {
this.statusEffects.GOBLINSONG = true
if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} tenta coletar mais Essência... mas não sabe como. Então apenas começa a gritar bem alto e mal entonado.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} tries to collect more Essence... but it does not know how. So they just start to scream real loud and badly tuned.`)
}
}
};
SpellGoblin.addSkill("Fire bolt");
SpellGoblin.addSkill("Freeze");
SpellGoblin.addSkill("Lightning Strike");
SpellGoblin.addSkill("Dazzle");
SpellGoblin.equipment = {
head: State.variables.Items['Wizzard Hat'],
torso: State.variables.Items['Wool shirt'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.wand,
offhand: State.variables.Items["Other hand"],
};
State.variables.character.push(SpellGoblin);
const LoudGoblin = new Enemy();
LoudGoblin.Name = "Very Loud Goblin";
LoudGoblin.Name_pt = "Goblin bem Barulhento";
LoudGoblin.Ancestry = "Ogroid";
LoudGoblin.Specialization = "GOBLIN!";
LoudGoblin.image = "img/enemies/LoudGoblin.png";
LoudGoblin.AP = 0;
LoudGoblin.APregen = 2;
LoudGoblin.BaseDefense = 10;
LoudGoblin.level = 3;
LoudGoblin.STR = 3;
LoudGoblin.RES = 4;
LoudGoblin.DEX = 9;
LoudGoblin.INT = 7;
LoudGoblin.CHA = 13;
LoudGoblin.PER = 5;
LoudGoblin.traits = ["Sneaky", "Follower", "Annoying", "GOBLIN!"];
LoudGoblin.MAXLIFE = ((LoudGoblin.level + 1) * 5) + LoudGoblin.RES;
LoudGoblin.MAXMANA = ((LoudGoblin.level + 1) * 4) + LoudGoblin.INT;
LoudGoblin.currentLife = LoudGoblin.MAXLIFE;
LoudGoblin.currentMana = LoudGoblin.MAXMANA;
LoudGoblin.behavior = function() {
//casts a spell from the
const filteredSkills = this.skills.filter(skill => skill.name !== "Escape" && skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
if (this.statusEffects.hindered > 0) {
filteredSkills = []
}
// Check if there are any skills left after filtering
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
// Use the selected randomSkill
window.useSkill(this, randomSkill, State.variables.character[1])
this.statusEffects.GOBLINSONG = true
if (State.variables.character[1].traits.includes("Spell Thief")) {
let stealchance = rollDice('1d100') <= State.variables.character[1].DEX + State.variables.character[1].INT
if (stealchance) {
State.variables.character[1].addSkill(randomSkill.Name);
if (State.variables.language === "PT-BR") {
addToBattleLog(`Mas que patife! ${State.variables.character[1].Name} roubou a habilidade de ${this.Name_pt}`);
} else if (State.variables.language === "EN") {
addToBattleLog(`What a rascal! ${State.variables.character[1].Name} stole ${this.Name}'s skill!`)
}
}
}
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG) {
this.additionalDamage += 2;
this.additionalHitChance += 2;
this.additionalDefense += 2;
}
});
};
LoudGoblin.addSkill("BOOM!");
LoudGoblin.addSkill("Earworm!");
LoudGoblin.addSkill("Inspire");
LoudGoblin.addSkill("War Song");
LoudGoblin.equipment = {
head: State.variables.Items.Coif,
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items.Fist,
offhand: State.variables.Items.Drums,
};
State.variables.character.push(LoudGoblin);
//Goblin King
const GoblinQueen = new Enemy();
GoblinQueen.Name = "Goblin Queen";
GoblinQueen.Name_pt = '"Rainha" Goblin';
GoblinQueen.Ancestry = "Ogroid";
GoblinQueen.Specialization = "GOBLIN!"
GoblinQueen.image = "img/enemies/GoblinQueen.png";
GoblinQueen.BaseDefense = 10;
GoblinQueen.AP = 0;
GoblinQueen.APregen = 3;
GoblinQueen.level = 5;
GoblinQueen.STR = 6;
GoblinQueen.RES = 8;
GoblinQueen.DEX = 18;
GoblinQueen.INT = 3;
GoblinQueen.CHA = 12;
GoblinQueen.PER = 6;
GoblinQueen.traits = ["Sneaky", "Boss", "Annoying", "GOBLIN!"];
GoblinQueen.MAXLIFE = ((GoblinQueen.level + 1) * 6) + GoblinQueen.RES;
GoblinQueen.MAXMANA = ((GoblinQueen.level + 1) * 5) + GoblinQueen.INT;
GoblinQueen.currentLife = GoblinQueen.MAXLIFE;
GoblinQueen.currentMana = GoblinQueen.MAXMANA;
GoblinQueen.behaviour = function() {
const message = ""
if (this.statusEffects.GOBLINSONG) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG && enemy !== this) {
this.currentLife += 8;
this.currentMana += 8;
this.additionalDamage += 3;
this.additionalHitChance += 3;
this.additionalDefense += 3;
}
});
Math.clamp(this.currentLife, 0, this.MAXLIFE);
Math.clamp(this.currentMana, 0, this.MAXMANA);
this.statusEffects.GOBLINSONG = false;
message = State.variables.langage === "EN" ?
`${this.Name} continues to sing that terrible song, somehow growing stronger from it...` :
`${this.Name_pt} continua a cantar aquela terrível canção, de alguma forma, eles parecem ficar mais fortes...`;
addToBattleLog(message);
}
let action = rollDice('1d6')
if (action <= 2 && State.variables.enemyInstances.length > 0) {
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} commands all Goblins to attack you.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} comanda a todos os Goblins para lhe atacar.`)
}
State.variables.enemyInstances.forEach(enemy => {
if (enemy !== this) {
window.triggerAttack(enemy, State.variables.character[1], enemy.equipment.mainhand);
}
});
} else if (action > 3) {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
message = State.variables.langage === "EN" ?
`${this.Name} stars to sing a terrible song while attacking you.` :
`${this.Name_pt} começa a cantar uma terrível canção enquanto o ataca.`;
addToBattleLog(message);
this.statusEffects.GOBLINSONG = true;
} else {
let goblins = ["LoudGoblin", "Goblin", "SpellGoblin", "SpellGoblin"]
let numb = rollDice('1d4')
for (let i = 0; i < numb; i++) {
let gob = goblins[Math.floor(Math.random() * goblins.length)];
window.addEnemiesToBattle(gob, 1);
}
message = State.variables.langage === "EN" ?
`${this.Name} summons more Goblins to fight for him.` :
`${this.Name_pt} convoca mais Goblins para lutar por ele..`;
addToBattleLog(message);
}
// Check if an allied goblin is singing
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.GOBLINSONG) {
this.statusEffects.GOBLINSONG = true;
}
});
};
GoblinQueen.equipment = {
head: State.variables.Items['Crown'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Belt'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Shoes'],
mainhand: State.variables.Items["Axe"],
offhand: State.variables.Items['Other hand'],
};
State.variables.character.push(GoblinQueen);
//Hobgoblin (Ogroid Ancestry)
const Hobgoblin = new Enemy();
Hobgoblin.Name = "Hobgoblin";
Hobgoblin.Name_pt = "Hobgoblin";
Hobgoblin.Ancestry = "Ogroid";
//Thrall (behaviour: Thralls don't attack, instead, they act as healing bloodbags for other vampires, if an vampyre is damaged, they will attack an thrall and heal of the damage dealt)
//Feral Vampyr (Attacks twice, one time against the player and another against a thrall, when it overheals, gains 1 action to attack the player again)
//Vampyr (Attacks the player and heals off from half the damage dealt, when the player is bleeding, the attack is a crit.)
//Vampyr Sorceror (Lots of vampyric spells)
//Vampyr Preacher (transform other non-vampyres into thralls. If alone with a thrall, looses a portion of lifeblood to transform it into a Feral Vampyr
//Vampyr Sire (BOSS When killed, kill all other vampires, heals each turn for each vampire alive. Damages and buff a random vampire ally, giving extra damage and applying bleed on attacks)
//Vampyric Daemon (Boss, increases the lifesteal of other vampyres by 10%. When it attacks, it applies bleeding for a number of turns equal the damage deal (2d4 damage).)
//Deathbound Slave (Damages self by 10-20 and increase the health of a random enemy by the same amount)
const deathCult = new Enemy();
deathCult.Name = "Deathchild's Inicated";
deathCult.Name_pt = "Iniciado dos Filhos da Morte";
deathCult.Ancestry = "Human";
deathCult.Specialization = "Cultist";
deathCult.AP = 0;
deathCult.APregen = 2;
deathCult.level = 8;
deathCult.BaseDefense = 10;
deathCult.STR = 9;
deathCult.RES = 26;
deathCult.DEX = 9;
deathCult.INT = 11;
deathCult.CHA = 3;
deathCult.PER = 7;
deathCult.traits = ["Resilient", "Sacrifice", "Follower"];
deathCult.MAXLIFE = ((deathCult.level + 1) * 5) + deathCult.RES;
deathCult.MAXMANA = ((deathCult.level + 1) * 4) + deathCult.INT;
deathCult.currentLife = deathCult.MAXLIFE;
deathCult.currentMana = deathCult.MAXMANA;
deathCult.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items["Cultist's Robes"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Sacrificial Dagger'],
offhand: State.variables.Items["Other hand"],
};
deathCult.behaviour = function() {
let action = rollDice('1d6')
const enemies = State.variables.enemyInstances;
if (action <= 3) {
let damage = rollDice('1d12');
if (this.currentLife > damage && enemies.length > 1) {
this.currentLife -= damage;
let randomEnemy = enemies[Math.floor(Math.random() * enemies.length)];;
while (randomEnemy.traits.includes("Sacrifice")) {
randomEnemy = enemies[Math.floor(Math.random() * enemies.length)];
}
randomEnemy.currentLife += damage;
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} performs a dark ritual, sacrificing ${damage} of its Lifeblood to ${randomEnemy.Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} performa um sombrio ritual, sacrificando ${damage} de sua Força Vital para ${randomEnemy.Name_pt}.`)
}
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
};
State.variables.character.push(deathCult);
const deathCult2 = new Enemy();
deathCult2.Name = "Deathchild's Disciple";
deathCult2.Name_pt = "Diciipulo dos Filhos da Morte";
deathCult2.Ancestry = "Human";
deathCult2.Specialization = "Cultist";
deathCult2.AP = 0;
deathCult2.APregen = 2;
deathCult2.level = 9;
deathCult2.BaseDefense = 10;
deathCult2.STR = 5;
deathCult2.RES = 9;
deathCult2.DEX = 16;
deathCult2.INT = 21;
deathCult2.CHA = 8;
deathCult2.PER = 6;
deathCult2.traits = ["Follower"];
deathCult2.MAXLIFE = ((deathCult2.level + 1) * 5) + deathCult2.RES;
deathCult2.MAXMANA = ((deathCult2.level + 1) * 4) + deathCult2.INT;
deathCult2.currentLife = deathCult2.MAXLIFE;
deathCult2.currentMana = deathCult2.MAXMANA;
deathCult2.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items["Cultist's Robes"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Sacrificial Dagger'],
offhand: State.variables.Items["Other hand"],
};
deathCult2.addSkill("Bone Missile");
deathCult2.addSkill("Bone Armor");
deathCult2.addSkill("Summon Cursed Souls");
deathCult2.behaviour = function() {
for (let i = 0;i < this.AP;i++) {
const sacrifice = State.variables.enemyInstances.filter(enemy => enemy.traits.includes("Sacrifice") && enemy.currentLife <= 20);
const filteredSkills = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
if (this.statusEffects.hindered > 0) {
filteredSkills = []
}
// Check if there are any skills left after filtering
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
window.useSkill(this, randomSkill, State.variables.character[1])
} else if (sacrifice.length > 0 && this.currentMana <= Math.round((this.MAXMANA * 0.4))) {
this.AP--
let target = State.variables.enemyInstances.indexOf(sacrifice[0]);
target.currentLife = 0;
this.currentMana += target.currentMana;
Math.clamp(this.currentMana, 0, this.MAXMANA);
this.skills.forEach(skill => {
if (skill.inCooldown > 0) {
skill.inCooldown = 0
}
})
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} sacrifices ${target.Name}, stealing ${target.currentMana} from their Essence. ${this.Name_pt}'s Skills were recharged.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} sacrifica ${target.Name_pt}, roubando ${target.currentMana} de sua Essência. As Habilidades de ${this.Name_pt} foram recarregadas.`)
}
window.disableDeadEnemies();
const soul = State.variables.summons.find(summon => summon.Name === "Cursed Soul");
State.variables.Graveyard.push(soul);
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
}
};
State.variables.character.push(deathCult2);
const deathCult3 = new Enemy();
deathCult3.Name = "Deathchild's Deacon";
deathCult3.Name_pt = "Diácono dos Filhos da Morte";
deathCult3.Ancestry = "Human";
deathCult3.Specialization = "Cultist";
deathCult3.AP = 0;
deathCult2.APregen = 4;
deathCult3.level = 10;
deathCult3.BaseDefense = 10;
deathCult3.STR = 10;
deathCult3.RES = 13;
deathCult3.DEX = 15;
deathCult3.INT = 8;
deathCult3.CHA = 17;
deathCult3.PER = 4;
deathCult3.traits = [];
deathCult3.MAXLIFE = ((deathCult3.level + 1) * 5) + deathCult3.RES;
deathCult3.MAXMANA = ((deathCult3.level + 1) * 4) + deathCult3.INT;
deathCult3.currentLife = deathCult3.MAXLIFE;
deathCult3.currentMana = deathCult3.MAXMANA;
deathCult3.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items["Cultist's Robes"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Quatterstaff'],
offhand: State.variables.Items["Handle"],
};
deathCult3.CD = 4;
deathCult3.behaviour = function() {
if (this.CD > 0) {
this.CD--;
}
let enemies = State.variables.enemyInstances
const cursesoul = State.variables.summons.find(summon => summon.Name === "Cursed Soul");
State.variables.Graveyard.push(cursesoul);
this.AP--
for (let i = 0;i < this.AP;i++) {
const targets = enemies.filter(enemy => enemy.traits.includes("Sacrifice") && enemy.Ancestry !== "Undead")
let graveyard = State.variables.Graveyard;
const soul = graveyard.filter(soul => soul.Name === "Cursed Soul");
let nonundead = graveyard.filter(enemy => !(enemy.Ancestry === "Undead" || enemy.Ancestry === "Daemon" || enemy.Ancestry === "Construct" || enemy.Ancestry === "Totem"));
if (soul.length >= 5 && nonundead.length > 0) {
let indexesToRemove = [];
for (let i = 0; i < 5; i++) {
indexesToRemove.push(graveyard.indexOf(souls[i]));
}
let indexToAdd = graveyard.indexOf(nonundead[0]);
// Remove 5 cursed souls from the graveyard
indexesToRemove.forEach(index => {
if (index !== -1) {
graveyard.splice(index, 1);
}
});
if (indexToAdd !== -1 && this.AP >= 2) {
this.AP -= 2;
nonundead[0].currentLife = Math.round(nonundead[0].MAXLIFE * 0.15) + this.CHA;
nonundead[0].Ancestry = "Undead";
nonundead[0].AP -= nonundead[0].APregen;
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} revives ${nonundead[0].Name} as an Undead.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} revive ${nonundead[0].Name_pt} como um Morto Vivo.`);
}
enemies.push(nonundead[0]); // Revive enemy
graveyard.splice(indexToAdd, 1); // Remove revived enemy from the graveyard
}
} else if (this.CD === 0 && targets.length > 0 && this.AP >= 2 && this.currentMana > Math.round((this.MAXMANA * 0.2))) {
this.AP -= 2;
this.currentMana -= Math.round((this.MAXMANA * 0.2));
this
let target = targets.indexOf(targets[0]);
const undeads = ["reanCorpse", "Wraith", "Ghoul", "DeathKnight"]
let undead = undeads[Math.floor(Math.random() * undeads.length)]
window.addEnemiesToBattle(undead, 1);
enemies[enemies.length].currentLife = targets[0].currentLife + this.CHA;
enemies[enemies.length].MAXLIFE = targets[0].MAXLIFE;
enemies[enemies.length].currentMana = targets[0].currentMana;
enemies[enemies.length].MAXMANA = targets[0].MAXMANA;
enemies[enemies.length].equipment = targets[0].equipment;
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} performs a twisted ritual and transforms ${targets[0].Name} into a ${enemies[enemies.length].Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} performa um perverso ritual e transforma ${targets[0].Name_pt} em um ${enemies[enemies.length].Name_pt}.`);
}
enemies.splice(target, 1)
this.CD = 6
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
}
};
State.variables.character.push(deathCult3);
//Reanimated Corpse (Low health, medium damage, no defense, but Deathless)
const reanCorpse = new Enemy();
reanCorpse.Name = "Reanimated Corpse";
reanCorpse.Name_pt = "Cadaver Reanimado";
reanCorpse.Ancestry = "Undead";
reanCorpse.Specialization = "Zombie";
reanCorpse.AP = 0;
reanCorpse.APregen = 2;
reanCorpse.BaseDefense = 0;
reanCorpse.level = 7;
reanCorpse.STR = 17;
reanCorpse.RES = 10;
reanCorpse.DEX = 14;
reanCorpse.INT = 2;
reanCorpse.CHA = 4;
reanCorpse.PER = 6;
reanCorpse.traits = ["Hardy", "Deathless"];
reanCorpse.MAXLIFE = ((reanCorpse.level + 1) * 5) + reanCorpse.RES;
reanCorpse.MAXMANA = ((reanCorpse.level + 1) * 4) + reanCorpse.INT;
reanCorpse.currentLife = reanCorpse.MAXLIFE;
reanCorpse.currentMana = reanCorpse.MAXMANA;
reanCorpse.additionalDamage = 10;
reanCorpse.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items["Cultist's Robes"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Claws'],
offhand: State.variables.Items["Other hand"],
};
State.variables.character.push(reanCorpse);
//Necromancer (banish a non-undead enemy from the graveyard to summon a Reanimated Corpse, if no enemy on graveyard, cast a necromancy spell or make an dagger attack)
const necromancer = new Enemy();
necromancer.Name = "Necromancer";
necromancer.Name_pt = "Necromante";
necromancer.Ancestry = "Human";
necromancer.Specialization = "Cultist";
necromancer.AP = 0;
necromancer.APregen = 2;
necromancer.level = 10;
necromancer.BaseDefense = 10;
necromancer.STR = 3;
necromancer.RES = 8;
necromancer.DEX = 16;
necromancer.INT = 23;
necromancer.CHA = 9;
necromancer.PER = 11;
necromancer.traits = [];
necromancer.skills = [];
necromancer.MAXLIFE = ((necromancer.level + 1) * 5) + necromancer.RES;
necromancer.MAXMANA = ((necromancer.level + 1) * 4) + necromancer.INT;
necromancer.currentLife = necromancer.MAXLIFE;
necromancer.currentMana = necromancer.MAXMANA;
necromancer.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items["Cultist's Robes"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Sacrificial Dagger'],
offhand: State.variables.Items["Spellbook"],
};
necromancer.addSkill("Soul Syphon");
necromancer.addSkill("Bone Missile");
necromancer.addSkill("Bone Armor");
necromancer.addSkill("Summon Cursed Souls");
necromancer.behavior = function() {
let graveyard = State.variables.graveyard;
const filteredSkills = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
if (this.statusEffects.hindered > 0) {
filteredSkills = []
}
// Check if there are any skills left after filtering
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
window.useSkill(this, randomSkill, State.variables.character[1])
} else {
if (this.statusEffects.stunned === 0) {
this.additionalDamage += graveyard.length;
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
this.additionalDamage -= graveyard.length;
} else {
this.AP--;
}
}
if (graveyard.length > 0) {
// Filter out enemies whose ancestry is not Undead, Daemon, Construct, or Totem
let nonundead = graveyard.filter(enemy => !(enemy.Ancestry === "Undead" || enemy.Ancestry === "Daemon" || enemy.Ancestry === "Construct" || enemy.Ancestry === "Totem"));
// Check if there are any non-undead enemies in the graveyard
if (nonundead.length > 0) {
// Remove one non-undead enemy from the graveyard
let indexToRemove = graveyard.indexOf(nonundead[0]); // Assuming you want to remove the first non-undead enemy found
if (indexToRemove !== -1) {
graveyard.splice(indexToRemove, 1);
// Add one reanimated corpse to the battle
window.addEnemiesToBattle(reanCorpse, 1);
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} reanimates a Corpse, summoning a new enemy for you to fight.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} reanima um Cadáver, invocando um novo inimigo para você lutar.`)
}
}
}
}
}
State.variables.character.push(necromancer);
//Death Knight (High health, no defense, damage increase each turn, the value is greater when near death.)
const DeathKnight = new Enemy();
DeathKnight.Name = "Death Knight";
DeathKnight.Name_pt = "Cavaleiro da Morte";
DeathKnight.Ancestry = "Undead";
DeathKnight.Specialization = "Knight";
DeathKnight.AP = 0;
DeathKnight.APregen = 3;
DeathKnight.level = 11;
DeathKnight.BaseDefense = 5;
DeathKnight.additionalDamage = 16;
DeathKnight.STR = 23;
DeathKnight.RES = 16;
DeathKnight.DEX = 10;
DeathKnight.INT = 3;
DeathKnight.CHA = 11;
DeathKnight.PER = 9;
DeathKnight.traits = ["Deathless", "Resilient"];
DeathKnight.skills = [];
DeathKnight.MAXLIFE = ((DeathKnight.level + 1) * 5) + DeathKnight.RES + (DeathKnight.level * 2);
DeathKnight.MAXMANA = ((DeathKnight.level + 1) * 4) + DeathKnight.INT;
DeathKnight.currentLife = DeathKnight.MAXLIFE;
DeathKnight.currentMana = DeathKnight.MAXMANA;
DeathKnight.equipment = {
head: State.variables.Items["Great helm"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Sword'],
offhand: State.variables.Items["Tower Shield"],
};
DeathKnight.addSkill("Shields Up");
DeathKnight.addSkill("Sacrifice Armor");
DeathKnight.addSkill("Drain");
DeathKnight.CD = 0;
DeathKnight.CD2 = 0;
DeathKnight.protecting = null;
DeathKnight.empowered = {
active: false,
value: 0
}
//DeathKnight.addSkill("Curse"); - curse skill curses a random piece of gear from the player.
DeathKnight.behavior = function() {
let missingLife = this.MAXLIFE -= this.currentLife;
if (this.CD > 0) {
this.CD--
}
if (this.CD2 > 0) {
this.CD2--
if (this.CD2 === 0 || this.protecting.currentLife <= 0) {
this.additionalDefense += 10;
this.protecting === null
}
}
for (let i = 0; i < this.AP; i++) {
if (this.CD = 0) {
this.CD++
if (this.empowered = true && this.statusEffects.stunned === 0) {
this.additionalDamage += this.empowered.value
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
this.additionalDamage -= this.empowered.value
this.empowered = false
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
} else {
const filteredSkills = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
// Check if there are any skills left after filtering
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
window.useSkill(this, randomSkill, State.variables.character[1])
} else if (this.AP > 0 && this.empowered === false) {
this.AP--
this.empowered.active = true;
this.empowered.value = Math.round((missingLife * 0.3));
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} empowers it next strike, it will deal ${this.empowered.value} extra Damage.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} empodera seu próximo golpe, irá causar ${this.empowered.value} de Dano exta.`)
}
} else if (State.variables.enemyInstances.length > 0 && this.protecting === null && this.CD === 0) {
const protection = []
protection.push(State.variables.character[1]);
State.variables.enemyInstances.forEach(enemy => {
if (enemy !== this) {
protection.push(enemy)
}
})
this.CD = 5;
this.additionalDefense -= 10;
this.protecting = protection[Math.floor(Math.random() * protection.length)];
this.protecting.statusEffects.protectedby = this;
this.AP--
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} takes the front to protect ${this.protecting.Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} toma a frente para proteger ${this.protecting.Name_pt}.`)
}
} else {
this.AP--
}
}
}
}
State.variables.character.push(DeathKnight);
//Wraith (Wraith applies a debuff that increases damage received on the player. On odd turns, it attacks the player and reduces its Defense)
const Wraith = new Enemy();
Wraith.Name = "Wraith";
Wraith.Name_pt = "Espectro";
Wraith.Ancestry = "Undead";
Wraith.Specialization = "Spirit";
Wraith.AP = 0;
Wraith.APregen = 1;
Wraith.level = 10;
Wraith.BaseDefense = 5;
Wraith.additionalDamage = 6;
Wraith.STR = 3;
Wraith.RES = 7;
Wraith.DEX = 25;
Wraith.INT = 9;
Wraith.CHA = 10;
Wraith.PER = 14;
Wraith.additionalHitChance = 11;
Wraith.traits = ["Deathless", "Inorganic"];
Wraith.skills = [];
Wraith.MAXLIFE = ((Wraith.level + 1) * 5) + Wraith.RES;
Wraith.MAXMANA = ((Wraith.level + 1) * 4) + Wraith.INT;
Wraith.currentLife = Wraith.MAXLIFE;
Wraith.currentMana = Wraith.MAXMANA;
Wraith.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Fist'],
offhand: State.variables.Items["Other Hand"],
};
Wraith.turns = 0;
Wraith.Behavior = function() {
if (this.turns > 0) {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
this.turns--
} else {
if (State.variables.character[1].statusEffects.WraithCurse && State.variables.character[1].statusEffects.WraithCurse > 0) {
State.variables.character[1].statusEffects.WraithCurse++
} else {
State.variables.character[1].statusEffects.WraithCurse = 1
}
this.turns++
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} cursed ${State.variables.character[1].Name}, all future Damage taken by them will be increased by ${State.variables.character[1].statusEffects.WraithCurse}d4.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} amaldiçoa ${State.variables.character[1].Name} todo Dano tomado no futuro irá ser aumentado em ${State.variables.character[1].statusEffects.WraithCurse}d4.`)
}
}
}
State.variables.character.push(Wraith);
//Banshee (Behaviour: 7 turns to kill this unit or insta-death)
const Banshee = new Enemy();
Banshee.Name = "Banshee";
Banshee.Name_pt = "Banshee";
Banshee.Ancestry = "Undead";
Banshee.Specialization = "Spirit";
Banshee.AP = 0;
Banshee.APregen = 1;
Banshee.level = 9; //3
Banshee.BaseDefense = 5;
Banshee.STR = 3;
Banshee.RES = 13;
Banshee.DEX = 8;
Banshee.INT = 5;
Banshee.CHA = 6;
Banshee.PER = 30;
Banshee.traits = ["Deathless", "Inorganic"];
Banshee.skills = [];
Banshee.MAXLIFE = ((Banshee.level + 1) * 5) + Banshee.RES;
Banshee.MAXMANA = ((Banshee.level + 1) * 4) + Banshee.INT;
Banshee.currentLife = Banshee.MAXLIFE;
Banshee.currentMana = Banshee.MAXMANA;
Banshee.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Fist'],
offhand: State.variables.Items["Other Hand"],
};
Banshee.curse = false;
Banshee.timer = 7;
Banshee.Behavior = function() {
if (this.timer > 0) {
this.timer--
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} foresees ${State.variables.character[1].Name}'s death in ${this.timer} turns.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} prevê a morte de ${State.variables.character[1].Name} em ${this.timer} turnos.`)
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`As it was foresaw...`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Como foi previsto...`)
}
State.variables.character[1].currentLife = 0;
}
}
State.variables.character.push(Banshee);
//Walking Graveyard ((Swarm) During its turn, consumes all non-undead enemies at the graveyard to add to its Lifeblood)
const Ghoul = new Enemy();
Ghoul.Name = "Ghoul";
Ghoul.Name_pt = "Ghoul";
Ghoul.Ancestry = "Undead";
Ghoul.Specialization = "Feral";
Ghoul.AP = 0;
Ghoul.APregen = 2;
Ghoul.level = 10;
Ghoul.BaseDefense = 5;
Ghoul.additionalDamage = 12;
Ghoul.STR = 23;
Ghoul.RES = 12;
Ghoul.DEX = 15;
Ghoul.INT = 2;
Ghoul.CHA = 2;
Ghoul.PER = 13;
Ghoul.traits = ["Deathless", "Savagery", "Blood Frenzy"];
Ghoul.skills = [];
Ghoul.MAXLIFE = ((Ghoul.level + 1) * 5) + Ghoul.RES;
Ghoul.MAXMANA = ((Ghoul.level + 1) * 4) + Ghoul.INT;
Ghoul.currentLife = Ghoul.MAXLIFE;
Ghoul.currentMana = Ghoul.MAXMANA;
Ghoul.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Claw'],
offhand: State.variables.Items["Other Hand"],
};
Ghoul.addSkill("Rend");
Ghoul.addSkill("Bite");
Ghoul.addSkill("Mutilate");
Ghoul.addSkill("Drain");
Ghoul.behavior = function() {
let graveyard = State.variables.graveyard;
const grave = graveyard.filter(corpse => corpse.Name !== "Cursed Soul")
for (let i = 0; i < this.AP; i++) {
if (grave.length > 0) {
// Remove one non-undead enemy from the graveyard
let indexToRemove = graveyard.indexOf(random() * graveyard.length); //remove a random enemy from the graveyard.
if (indexToRemove !== -1) {
this.AP-=2;
this.STR += Math.round((graveyard[indexToRemove].STR / 2))
this.DEX += Math.round((graveyard[indexToRemove].DEX / 2))
this.RES += Math.round((graveyard[indexToRemove].RES / 2))
this.CHA += Math.round((graveyard[indexToRemove].CHA / 2))
this.PER += Math.round((graveyard[indexToRemove].PER / 2))
this.INT += Math.round((graveyard[indexToRemove].INT / 2))
this.additionalDamage += 3;
this.additionalDefense += 3;
this.additionalHitChance += 3;
this.MAXLIFE = (this.RES * this.level) + 10
this.MAXMANA = (this.INT * this.level) + 5
zhis.currentLife += Math.round((graveyard[indexToRemove].MAXLIFE / 4))
this.MAXLIFE += Math.round((graveyard[indexToRemove].MAXLIFE / 2))
Math.clamp(this.currentLife, 0, this.MAXLIFE)
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} consumes a enemy Corpse, healing by ${Math.round((graveyard[indexToRemove].MAXLIFE / 4))} and boosting all of their attributes.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} consome um Cadáver inimigo, se curando em ${Math.round((graveyard[indexToRemove].MAXLIFE / 4))} e reenforçando todos os seus atributos.`)
}
graveyard.splice(indexToRemove, 1);
}
}
const filteredSkills = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
// Check if there are any skills left after filtering
if (this.statusEffects.hindered > 0) {
filteredSkills = []
}
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
window.useSkill(this, randomSkill, State.variables.character[1])
} else {
if (this.statusEffects.stunned > 0) {
this.AP--
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
}
}
}
State.variables.character.push(Ghoul);
//Liche (BOSS, cast Necromancy spell, and summon a Reanimated Corpse, whenever an undead ally dies, heal self by 10)
const demiLich = new Enemy();
demiLich.Name = "False Lich";
demiLich.Name_pt = "False Lich";
demiLich.Ancestry = "Undead";
demiLich.Specialization = "Cultist";
demiLich.AP = 0;
demiLich.APregen = 4;
demiLich.level = 11;
demiLich.BaseDefense = 5;
demiLich.additionalDamage = 12;
demiLich.STR = 16;
demiLich.RES = 12;
demiLich.DEX = 12;
demiLich.INT = 25;
demiLich.CHA = 4;
demiLich.PER = 2;
demiLich.traits = ["Boss","Hardy", "Deathless"];
demiLich.skills = [];
demiLich.MAXLIFE = ((demiLich.level + 1) * 6) + demiLich.RES;
demiLich.MAXMANA = ((demiLich.level + 1) * 5) + demiLich.INT;
demiLich.currentLife = demiLich.MAXLIFE;
demiLich.currentMana = demiLich.MAXMANA;
demiLich.equipment = {
head: State.variables.Items.Hood,
torso: State.variables.Items["Cultist's Robes"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Claw'],
offhand: State.variables.Items["Spellbook"],
};
demiLich.CD1 = 0;
demiLich.addSkill("Soul Syphon");
demiLich.addSkill("Bone Missile");
demiLich.addSkill("Summon Cursed Souls");
demiLich.addSkill("Bone Armor");
demiLich.addSkill("Rend");
demiLich.behavior = function() {
let graveyard = State.variables.graveyard;
const filteredSkills = this.skills.filter(skill => skill.inCooldown === 0 && skill.Manacost <= this.currentMana && skill.APCost <= this.AP);
if (this.statusEffects.hindered > 0) {
filteredSkills = []
}
let heal = rollDice('1d20');
const soultrue = graveyard.filter(soul => soul.Name === "Cursed Soul");
if (this.CD1 > 0) {
this.CD1--;
}
if (this.CD2 > 0) {
this.CD2--;
}
this.additionalDamage = graveyard.length;
this.additionalHitChance = graveyard.length;
this.additionalDefense = graveyard.length;
for (let i = 0; i < this.AP; i++) {
if (this.CD2 === 0 && State.variables.enemyInstances.length > 1 && soultrue.length > 0) {
State.variables.enemyInstances.forEach(enemy =>{
if (enemy.Ancestry === "Undead" && enemy.Name !== "Lich") {
enemy.additionalDamage += soultrue.length + 2;
enemy.additionalDefense += soultrue.length + 2;
enemy.additionalHitChance += soultrue.length + 2;
}
})
if (State.variables.language === "EN") {
addToBattleLog(`The Lich boosts all undeads nearby by ${soultrue.length + 2}, increasing their Damage, Defense and Hit Chance).`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`O Lich reenforça todos os Mortos Vivos próximos em ${soultrue.length + 2}, aumentando seu Dano, Defesa e Chance de Acerto).`);
}
this.AP--;
this.CD2 === 7
} else if ((this.currentLife < Math.round(this.MAXLIFE / 2) && this.currentMana > heal) && this.CD1 === 0) {
this.currentMana -= heal;
if (soultrue.length > 0) {
let indexToRemove = graveyard.indexOf(soultrue[0]);
if (indexToRemove !== -1) {
graveyard.splice(indexToRemove, 1);
}
heal += 10;
if (State.variables.language === "EN") {
addToBattleLog(`The Lich consumes a Cursed Soul to empower its Healing, increasing it to ${heal}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`O Lich consome uma Alma Amaldiçoada para empodera sua Cura, aumentando-a para ${heal}.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`The Lich heals himself for ${heal}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`O Lich cura a si mesmo por ${heal}.`);
}
}
this.AP--
this.CD1 = 4;
this.currentLife += heal;
// Clamp the current life to ensure it doesn't exceed the maximum life
this.currentLife = Math.min(this.currentLife, this.MAXLIFE);
} else {
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
window.useSkill(this, randomSkill, State.variables.character[1]);
if (randomSkill.Type.includes("Necromancy") && soultrue.length > 0) {
let indexToRemove = graveyard.indexOf(soultrue[0]);
if (indexToRemove !== -1) {
graveyard.splice(indexToRemove, 1);
let undeadList = ["reanCorpse", "Ghoul", "Banshee", "DeathKnight"]
window.addEnemiesToBattle(undeadList[Math.floor(random() * undeadList.length)], 1);
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} creates an Undead, summoning a new enemy for you to fight.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} cria um Morto Vivo, invocando um novo inimigo para você lutar.`);
}
}
}
} else {
if (this.statusEffects.stunned > 0) {
this.AP--
} else {
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
}
}
}
}
}
State.variables.character.push(demiLich);
var souls = new Enemy()
souls.Name = "Hauntings";
souls.Name_pt = "Assombrações";
souls.Ancestry = "Undead";
souls.Specialization = "Ghost";
souls.AP = 0;
souls.APregen = 0;
souls.level = 8;
souls.BaseDefense = 5;
souls.STR = 2;
souls.RES = 9;
souls.DEX = 22;
souls.INT = 6;
souls.CHA = 14;
souls.PER = 9;
souls.traits = ["Deathless", "Swarm", "Hardy"];
souls.skills = [];
souls.MAXLIFE = ((souls.level + 1) * 5) + souls.RES;
souls.MAXMANA = ((souls.level + 1) * 4) + souls.INT;
souls.currentLife = souls.MAXLIFE;
souls.currentMana = souls.MAXMANA;
souls.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Fist'],
offhand: State.variables.Items["Other Hand"],
};
souls.CD = 3;
souls.behavior = function() {
let damage = 4
if (State.variables.difficulty === "easy") {
damage -= 1;
} else if (State.variables.difficulty === "hard") {
damage += 2;
}
const cursesoul = State.variables.summons.find(summon => summon.Name === "Cursed Soul");
State.variables.Graveyard.push(cursesoul);
const soultrue = graveyard.filter(soul => soul.Name === "Cursed Soul");
this.RES = 6 + soultrue.length
this.currentLife += 2;
this.MAXLIFE = (this.RES * this.level) + 10
if (State.variables.difficulty === "easy") {
this.MAXLIFE = MAth.round((this.MAXLIFE * 0.75));
} else if (State.variables.difficulty === "hard") {
this.MAXLIFE = MAth.round((this.MAXLIFE * 1.35));
}
this.AP = soultrue.length
if (this.currentLife <= Math.round((this.MAXLIFE * 0.25))) {
this.AP -= 3;
} else if (this.currentLife <= Math.round((this.MAXLIFE * 0.5))) {
this.AP -= 2
} else if (this.currentLife <= Math.round((this.MAXLIFE * 0.75))) {
this.AP -= 1
}
Math.clamp(this.AP, 0, 10);
if (this.CD > 0) {
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} gathers the Cursed Souls around themselves, in ${this.CD} turns they will strike.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} reúne as Almas Amaldiçoadas em torno de si, em ${this.CD} turnos elas atacarão.`);
}
this.CD--
} else if (this.CD === 0) {
let totaldamage = 0
for (let i = 0;i < this.AP;i++) {
State.variables.character[1].currentLife -= damage
totaldamage += damage
}
if (State.variables.language === "EN") {
addToBattleLog(`${this.Name} releases the Souls, dealing ${totaldamage} of Damage to ${State.variables.character[1].Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${this.Name_pt} dispersa as Almas, causando ${totaldamage} de Dano a ${State.variables.character[1].Name}.`);
}
this.CD = 3;
}
}
State.variables.character.push(souls);
//Urayhara's Cultist (Cast spells, whenever it cast a spell gains a stack of Urayhara's attention, when 6 stacks are achieven, becomes an shapewarped
const HornedCultist = new Enemy();
HornedCultist.Name = "Horned Maw's Cultist";
HornedCultist.Name_pt = "Cultista da Gorja Chifruda";
//Shapewarped (
//Urayhara's Children
const HornedChildren = new Enemy();
HornedChildren.Name = "Urayhara's Children";
HornedChildren.Name_pt = "Criança de Urayhara";
HornedChildren.Ancestry = "Beast";
HornedChildren.Specialization = "Monster";
HornedChildren.AP = 0;
HornedChildren.APregen = 3;
HornedChildren.BaseDefense = 10;
HornedChildren.level = 8;
HornedChildren.STR = 12;
HornedChildren.RES = 18;
HornedChildren.DEX = 7;
HornedChildren.INT = 2;
HornedChildren.CHA = 3;
HornedChildren.PER = 10;
HornedChildren.additionalHitChance = 5;
HornedChildren.additionalDamage = 10;
HornedChildren.additionalDefense = 5;
HornedChildren.traits = ["Ravenous", "feral"];
HornedChildren.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Fist'],
offhand: State.variables.Items["Other Hand"],
};
HornedChildren.currentLife = 118;
HornedChildren.currentMana = 15;
HornedChildren.MAXLIFE = 118;
HornedChildren.MAXMANA = 15;
HornedChildren.Gold = 0;
State.variables.character.push(HornedChildren);
//Urayhara's Champion
const HornedChampion = new Enemy();
HornedChampion.Name = "Urayhara's Champion";
HornedChampion.Name = "Campeão de Urayhara";
HornedChampion.Ancestry = "Beast";
HornedChampion.Specialization = "Monster";
HornedChampion.AP = 0;
HornedChampion.APregen = 4;
HornedChampion.BaseDefense = 10;
HornedChampion.level = 8;
HornedChampion.STR = 16;
HornedChampion.RES = 21;
HornedChampion.DEX = 6;
HornedChampion.INT = 1;
HornedChampion.CHA = 2;
HornedChampion.PER = 9;
HornedChampion.traits = ["Boss", "Ravenous", "Idomitable", "feral"];
HornedChampion.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Fist'],
offhand: State.variables.Items["Other Hand"],
};
HornedChampion.currentLife = 178;
HornedChampion.currentMana = 13;
HornedChampion.MAXLIFE = 178;
HornedChampion.MAXMANA = 13;
HornedChampion.Gold = 0;
State.variables.character.push(HornedChampion);
//Urayhara's Broodmother
const HornedBroodmother = new Enemy();
HornedBroodmother.Name = "Urayhara's Broodmother";
HornedBroodmother.Name_pt = "Mãe de Ninhada de Urayhara";
HornedBroodmother.Ancestry = "Beast";
HornedBroodmother.Specialization = "Monster";
HornedBroodmother.BaseDefense = 5;
HornedBroodmother.level = 7; //29
HornedBroodmother.STR = 5;
HornedBroodmother.RES = 5;
HornedBroodmother.DEX = 5;
HornedBroodmother.INT = 5;
HornedBroodmother.CHA = 5;
HornedBroodmother.PER = 5;
HornedBroodmother.Gold = 1;
HornedBroodmother.traits = ["Sound Constitution"];
HornedBroodmother.image = "img/enemies/Broodmother"
HornedBroodmother.currentLife = 45;
HornedBroodmother.currentMana = 40;
HornedBroodmother.MAXLIFE = 45;
HornedBroodmother.MAXMANA = 40;
HornedBroodmother.equipment = {
head: State.variables.Items['Empty Head'],
torso: State.variables.Items['Empty Torso'],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs '],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Fist'],
offhand: State.variables.Items['Other hand'],
};
HornedBroodmother.behavior = function() {
if (!this.gestationInitiated) {
console.log(this.Name + " initiates gestation.");
addToBattleLog(`Something is afoul... it seems that Urahayahra has blessed one of her Broodmother's with a new aberration.`);
this.gestationInitiated = true;
this.turnsSinceInitiation = 0;
} else {
this.turnsSinceInitiation++;
window.triggerAttack(this, State.variables.character[1], this.equipment.mainhand);
if (this.turnsSinceInitiation >= 7) {
console.log(this.Name + " summons Urayhara's Children.");
addToBattleLog(`It is too late, the damned creature has cursed this world with their presence...`);
// Create and add HornedChildren to the game state
const summonnedchildren = HornedChildren;
summonnedchildren.MAXLIFE += this.currentLife;
summonnedchildren.currentLife += this.currentLife;
State.variables.enemyInstances.push(summonnedchildren)
// Destroy this creature
this.currentLife = Math.round((this.currentLife / 2));
} else {
console.log(this.Name + " is gestating (" + this.turnsSinceInitiation + " turns passed).");
addToBattleLog(`${this.Name}'s children will soon be brought upon this world. You must kill the Broodmother, NOW! (${this.turnsSinceInitiation}/7)`)
}
}
};
State.variables.character.push(HornedBroodmother);
//Urayhara's Idol
const HornedIdol = new Enemy();
HornedIdol.Name = "Urayhara's Idol";
HornedIdol.Name_pt = "Idolo de Urayhara";
HornedIdol.Ancestry = "Totem";
HornedIdol.Specialization = "Totem";
HornedIdol.level = 3;
HornedIdol.STR = 0;
HornedIdol.RES = 13;
HornedIdol.DEX = 0;
HornedIdol.INT = 0;
HornedIdol.CHA = 0;
HornedIdol.PER = 0;
HornedIdol.currentLife = 49;
HornedIdol.currentMana = 5;
HornedIdol.MAXLIFE = 49;
HornedIdol.MAXMANA = 5;
HornedIdol.Gold = 0;
HornedIdol.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items['Empty Waist'],
legs: State.variables.Items['Empty Legs'],
feet: State.variables.Items['Empty Feet'],
mainhand: State.variables.Items['Fist'],
offhand: State.variables.Items["Other Hand"],
};
HornedIdol.behaviour = function() {
const turnstaken = 0
if (turnstaken < 3) {
turnstaken += 1;
} else if (turnstaken = 3) {
enemyInstances.forEach((enemy) => {
if (enemy !== this) {
enemy.currentLife += this.RES;
Math.clamp(enemy.currentLife, 0, enemy.MAXLIFE);
enemy.additionalDamage += 3;
// Check if HornedBlessing property exists
if (!enemy.HornedBlessing) {
enemy.HornedBlessing = { value: 0, active: true };
}
// Update HornedBlessing properties
enemy.HornedBlessing.value += 3;
// Check if there's a HornedIdol in enemyInstances
const hornedIdolExists = enemyInstances.some(
(e) => e.Name === "Urayhara's Idol" && e !== this
);
addToBattleLog(`Urayhara bless thy enemies, mending their wounds and incinting their savagery.`);
if (!hornedIdolExists) {
enemy.additionalDamage -= enemy.HornedBlessing.value;
}
}
});
}
};
//Dragon
//Giant
//Reanimated Giant
//Witch
//Hag
//Imp - steal Essence, when the player has no more Essence, damages the player's lifeblood
//Possessed Warrior - When it attacks, adds 1d20 to the damage and deal the same amout to itself. High defense, medium health.
//Minor Daemon - whenever the player pays Essences, this enemy gets +5 damage
//Daemonic Abomination - when damaged by a spell, increase own maximum lifeblood by the damage received. at the end of its turn, regen 6% of its lifeblood back.
//Succubus - charms the player (Cannot attack this enemy until succed at a dc17 RES check). If the target is charmed, deals double damage against it.
//Greater Daemon - gets stronger the less Essence the player has (increases additionalDamage by 50% of the player missing essence)
//Incarnate
//Daemon Lord (Every round buffs the defense, damage and hitcahnce of other daemons
const enemyInstances = State.variables.enemyInstances;
const enemyTypes = {
Ruffian: Ruffian, // Register the Ruffian instance
HiredMuscle: hiredMuscle,
HiredSpellcaster: hiredSpellcaster,
BanditLeader: banditLeader,
bountyHunter: bountyHunter,
brigandFalconeer: brigandFalconeer,
trainedFalcon: trainedFalcon,
BrigandCanoneer: BrigandCanoneer,
ArmoredBrigand: ArmoredBrigand,
BrigandCrossbowman: BrigandCrossbowman,
ThousandHandKing: ThousandHandKing,
DraconianHunter: DraconianHunter,
ScaleboundWyrm: ScaleboundRavager,
ScaleboundRavager: ScaleboundRavager,
ScaleboundHunter: ScaleboundHunter,
ScaleboundDefender: ScaleboundDefender,
HornedChildren: HornedChildren,
HornedChampion: HornedChampion,
HornedBroodmother: HornedBroodmother,
HornedCultist: HornedCultist,
HornedIdol: HornedIdol,
WildWolf: WildWolf,
AlphaWolf: AlphaWolf,
Snakes: Snakes,
Bear: Bear,
RatSwarm: RatSwarm,
slave: slave,
Goblin: Goblin,
GoblinHunter: GoblinHunter,
LoudGoblin: LoudGoblin,
SpellGoblin: SpellGoblin,
GoblinQueen: GoblinQueen,
reanCorpse: reanCorpse,
deathCult: deathCult,
deathCult2: deathCult2,
deathCult3: deathCult3,
necromancer: necromancer,
Banshee: Banshee,
Wraith: Wraith,
DeathKnight: DeathKnight,
souls: souls,
demiLich: demiLich,
// Add other enemy types and instances as needed
};
window.createEnemyInstance = function(type) {
const difficulty = State.variables.difficulty;
// Check if the enemy type is registered
const enemyInstance = enemyTypes[type];
if (!enemyInstance) {
console.error(`Unknown enemy type: ${type}`);
return null;
}
// Create a new enemy instance based on the provided type
const enemy = new Enemy();
Object.assign(enemy, enemyInstance); // Copy properties from enemyInstance to the new enemy
if (enemy.Ancestry !== "Beast" && enemy.Ancestry === "Construct" && enemy.Ancestry !== "Totem" && enemy.Ancestry !== "Daemon" && enemy.Ancestry !== "Undead" && enemy.Specialization !== "Slave") {
if (difficulty === "easy") {
enemy.Gold = Math.round(Math.random((2*(enemy.level+1)), (12*(enemy.level+1)))) + (1 * (enemy.level-1));
} else if (difficulty === "hard") {
enemy.Gold = Math.round(Math.random((2*enemy.level), (10*(enemy.level-1)))) - (1 * (enemy.level-1));
} else {
enemy.Gold = Math.round(Math.random((2*(enemy.level+1)), (12*(enemy.level+1))))
}
Math.clamp(enemy.Gold, 0, 999999);
}
if (State.variables.arena === true) {
enemy.Gold = 0
}
let life = enemy.MAXLIFE
let mana = enemy.MAXMANA
if (difficulty === "easy") {
// Reduce enemy health and mana by 75%
if (enemy.traits.includes("Boss")) {
if (enemy.traits.includes("Colossal")) {
enemy.MAXLIFE = window.rollDice((enemy.level)+'d20') + enemy.RES * 2;
} else {
enemy.MAXLIFE = window.rollDice((enemy.level)+'d12') + enemy.RES;
}
enemy.MAXMANA = rollDice((enemy.level)+'d8') + enemy.INT;
} else {
if (enemy.traits.includes("Colossal")) {
enemy.MAXLIFE = window.rollDice((enemy.level)+'d20') + enemy.RES;
} else {
enemy.MAXLIFE = window.rollDice((enemy.level)+'d10') + enemy.RES;
}
enemy.MAXMANA = window.rollDice((enemy.level)+'d6') + enemy.INT;
}
if (enemy.traits.includes("Resilient")) {
enemy.MAXLIFE += window.rollDice(enemy.level + 'd4');
}
// Decrease enemy accuracy, defense and damage
enemy.additionalHitChance -= 4 + enemy.level;
enemy.additionalDamage -= 4 + enemy.level;
enemy.additionalDefense -= 4 + enemy.level;
} else if (difficulty === "hard") {
// Reduce enemy health and mana by 75%
if (enemy.traits.includes("Boss")) {
if (enemy.traits.includes("Colossal")) {
enemy.MAXLIFE = window.rollDice((enemy.level + 3)+'d20');
} else {
enemy.MAXLIFE = window.rollDice((enemy.level + 3)+'d12') + enemy.RES;
}
enemy.MAXMANA = window.rollDice((enemy.level + 3)+'d8') + enemy.INT;
} else {
if (enemy.traits.includes("Colossal")) {
enemy.MAXLIFE = window.rollDice((enemy.level + 3)+'d20') + enemy.RES * 2;
} else {
enemy.MAXLIFE = window.rollDice((enemy.level + 3)+'d10') + enemy.RES;
}
enemy.MAXMANA = window.rollDice((enemy.level + 3)+'d6') + enemy.INT;
}
if (enemy.traits.includes("Resilient")) {
enemy.MAXLIFE += rollDice((enemy.level + 1) +'d4')
}
if (enemy.MAXLIFE < life) {
enemy.MAXLIFE = life;
}
if (enemy.MAXMANA < mana) {
enemy.MAXMANA = mana;
}
// Decrease enemy accuracy, defense and damage
enemy.additionalHitChance += 8 + enemy.level;
enemy.additionalDamage += 8 + enemy.level;
enemy.additionalDefense += 8 + enemy.level;
} else {
if (enemy.traits.includes("Boss")) {
if (enemy.traits.includes("Colossal")) {
enemy.MAXLIFE = rollDice((enemy.level + 1)+'d20') + enemy.RES * 2;
} else {
enemy.MAXLIFE = rollDice((enemy.level)+'d12') + enemy.RES;
}
enemy.MAXMANA = rollDice((enemy.level + 1)+'d8') + enemy.INT;
} else {
if (enemy.traits.includes("Colossal")) {
enemy.MAXLIFE = rollDice((enemy.level + 1)+'d20') + enemy.RES;
} else {
enemy.MAXLIFE = rollDice((enemy.level)+'d10') + enemy.RES;
}
enemy.MAXLIFE = rollDice((enemy.level + 1)+'d10') + enemy.RES;
enemy.MAXMANA = rollDice((enemy.level + 1)+'d6') + enemy.INT;
}
if (enemy.traits.includes("Resilient")) {
enemy.MAXLIFE += rollDice(enemy.level + 'd4')
}
}
enemy.MAXLIFE += (3 * (enemy.level - 1));
enemy.currentLife = enemy.MAXLIFE;
enemy.currentMana = enemy.MAXMANA;
return enemy;
}
window.addEnemiesToBattle = function(enemyType, numberOfEnemies) {
for (let i = 0; i < numberOfEnemies; i++) {
const enemy = window.createEnemyInstance(enemyType);
if (enemy) {
State.variables.enemyInstances.push(enemy);
console.log(`${enemy.Name} was added`)
} else {
console.log(`${enemy.Name} was not added`)
}
}
}
Macro.add('battle', {
tags: null,
handler: function () {
const enemyType = this.args[0]; // Type of enemy to create
const numberOfEnemies = this.args[1]; // Number of enemies to create
if (!enemyType || !numberOfEnemies || numberOfEnemies <= 0) {
return this.error('Invalid arguments. Usage: <<Battle enemyType numberOfEnemies>>');
}
window.addEnemiesToBattle(enemyType, numberOfEnemies);
},
});
//////////
//Combat//
//////////
window.addToBattleLog = function (message) {
const logElement = document.getElementById('battle-log');
const newTime = new Date(Date.now());
// Create a line break element
const lineBreakElement = document.createElement('hr');
lineBreakElement.className = 'message-divider'; // Add a class for styling if needed
// Insert the line break before the message
logElement.insertBefore(lineBreakElement, logElement.firstChild);
// Create a message element
const messageElement = document.createElement('p');
const timestampElement = document.createElement('small');
timestampElement.textContent = `[${newTime.getHours()}:${newTime.getMinutes()}:${newTime.getSeconds()}]`;
timestampElement.setAttribute('class', 'italic');
messageElement.textContent = `${message} -`;
messageElement.appendChild(timestampElement);
if (isPlayerTurn) {
messageElement.classList.add('player-turn'); // Add a class for player's messages
} else {
messageElement.classList.add('enemy-turn'); // Add a class for enemy's messages
}
// Insert new messages after the line break
logElement.insertBefore(messageElement, lineBreakElement);
// Adjust the scroll to maintain visibility of the new message
logElement.scrollTop = messageElement.offsetTop;
};
window.getRandomInt = function (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
var crit = false;
window.calculateHitChance = function (attacker, target, slot) {
if (attacker.traits.includes("Mystical Arts") && slot.Name === "Arcane Blade") {
attacker.currentMana += 5;
if (attacker.currentMana > attacker.MAXMANA) {
attacker.currentMana = attacker.MAXMANA
}
}
crit = false;
let penalty = 4
if (slot.Type.includes("light")) {
penalty = 2
} else if (slot.Type.includes("heavy")) {
penalty = 6
}
if (attacker.statusEffects.numberofattacks === undefined || attacker.statusEffects.numberofattacks === null) {
attacker.statusEffects.numberofattacks = 0;
}
let hitChance = rollDice('1d100') - (20 + (penalty * attacker.statusEffects.numberofattacks));
attacker.statusEffects.numberofattacks += 1;
if (attacker.broken.includes(slot)) {
hitChance -= rollDice('1d10');
}
let attackHits = false;
const attackerEquipment = attacker.equipment;
const enemiesAlive = State.variables.enemyInstances.filter(enemy => enemy.currentLife > 0).length;
if (target.statusEffects.protectedby && target.statusEffects.protectedby.currentLife && target.statusEffects.protectedby.currentLife > 0) {
target = target.statusEffects.protectedby
} else if (target.statusEffects.protectedby && target.statusEffects.protectedby.currentLife <= 0) {
target.statusEffects.protectedby = null
}
if (slot && slot.Type) {
if (slot.Type.includes('melee') || (slot.Type.includes('throwing') && slot.ammo === 0)) {
hitChance += attacker.STR + attacker.DEX;
} else if (slot.Type.includes('throwing') && slot.ammo > 0) {
hitChance += attacker.PER + attacker.STR;
} else if (slot.Type.includes('ranged')) {
hitChance += attacker.PER * 2;
} else if (slot.Type.includes('unique')) {
hitChance = 90;
} else if (slot.Name === "Arcane Blade") {
hitChance += attacker.Int + attacker.DEX;
}
}
if (target.traits.includes("Colossal")) {
hitchance += 30;
}
if (attacker.statusEffects.stance && attacker.statusEffects.stance.active === true) {
if (target.statusEffects.stance.type === 'Defensive') {
hitChance -= 15
if (attacker.traits.includes("Stance Master")) {
target.statusEffects.riposte = true;
}
}
if (attacker.statusEffects.stance.type === 'Defensive') {
hitChance -= 15
}
if (attacker.statusEffects.stance.type === "Shredder") {
hitChance = -15
if (attacker.traits.includes("Stance Master")) {
hitChance = -10
}
} else if (attacker.statusEffects.stance.type === "Scoping" && slot.Type.includes("Ranged")) {
hitChance +=25;
} else if (attacker.statusEffects.stance.type === "Lunging") {
let max = 0
if (attacker.traits.includes("Stance Master")) {
max = 2
} else {
max = 1
}
if (attacker.statusEffects.numberofattacks <= max) {
hitChance += 100
}
}
}
if (attacker.statusEffects.annoyingEffect) {
hitChance -= attacker.statusEffects.annoyingEffect
}
if (attacker.statusEffects.momentumBonus) {
hitChance += attacker.statusEffects.momentumBonus;
}
if (attacker.traits.includes("Lay-in-wait")) {
if (slot.Type.includes("ranged")) {
hitChance += attacker.AP * 6;
} else if (slot.Type.includes("melee")) {
hitChance += attacker.AP * 3;
}
}
if (attacker.traits.includes("Follower") && enemiesAlive > 1) {
hitChance += (enemiesAlive * 3) - 3
}
if (target.traits.includes("Phalanx Training")) {
let extraDef = enemiesAlive * 2
if (target.traits.includes("Survivalist")) {
hitChance -=Math.round((enemiesAlive * 2) * 1.25);
} else {
hitChance -= enemiesAlive * 2;
}
}
if (attacker.traits.includes("Shielded Assault")) {
let extraHC = enemiesAlive * 2;
if (attacker.traits.includes("Survivalist")) {
hitChance += Math.round((enemiesAlive * 2) * 1.25);
} else {
hitChance += enemiesAlive * 2;
}
}
// Calculate combined defense of the target
let combinedDefense = calculateCombinedDefense(target) + Math.round((target.DEX / 2));
if (target.broken.includes("feet")) {
combinedDefense -= Math.round((target.DEF / 2))
}
if (target.broken.includes("legs")) {
combinedDefense -= Math.round((target.DEF / 2))
}
if (target.traits.includes("Arcane Armory") && target.equipment.mainhand.Name === "Arcane Blade") {
if (combinedDefense < target.INT) {
combinedDefense = target.INT
}
}
if (target.traits.includes("Divine Blessings II")) {
let holy = Math.floor((target.statusEffects.Piety / 6))
if (target.traits.includes("Divine Blessings III")) {
holy = Math.floor((target.statusEffects.Piety / 6)) * Math.floor((target.statusEffects.Piety / 12))
}
combinedDefense += holy
}
hitChance -= combinedDefense;
for (let i = 0; i < State.variables.summons.length; i++) {
const summon = State.variables.summons[i];
if (summon.traits.includes("Earth Totem") && target === State.variables.character[1]) {
hitChance -= 2;
}
if (summon.traits.includes("Air Totem") && attacker === State.variables.character[1]) {
hitChance += 2;
}
}
if (attacker.traits.includes("Loner")) {
hitChance += 15;
}
if (attacker.statusEffects.blind && attacker.statusEffects.blind === true) {
hitChance -= 100;
}
if (slot.Type.includes("AOE") && attacker !== State.variables.character[1]) {
hitChance += 15;
}
if (slot.Type.includes("Cursed")) {
if (attacker.slot.curse === "Cowardly") {
hitChance -= 10;
}
}
if (target.equipment.mainhand.Type.includes("Enchanted")) {
if (target.equipment.mainhand.enchantment === "Protective" || target.equipment.offhand.enchantment === "Protective") {
hitChance += 10;
}
}
// Log the hit chance and attack result
console.log(`Hit Chance: ${hitChance}, Combined Defense: ${combinedDefense}`);
if (attacker.traits.includes("Bloody Mess") && target.statusEffects.bleed > 0) {
hitChance += Math.round((attacker.CHA / 2));
}
if (attacker.statusEffects.confusion > 0) {
if (attacker.traits.includes("Precise Strikes")) {
hitChance -= Math.round((attacker.PER /2))
}
attackHits = (hitChance + attacker.additionalHitChance) <= combinedDefense;
} else {
if (attacker.traits.includes("Precise Strikes")) {
hitChance += Math.round((attacker.PER /2))
}
attackHits = (hitChance + attacker.additionalHitChance) >= combinedDefense;
}
if (attacker.traits.includes("Desperate") && !attackHits) {
let desperateroll = rollDice('1d10');
attacker.currentLife -= desperateroll;
if (State.variable.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} desesperadamente tenta te acertar, se machucando em ${desperateroll} de dano no processo.`)
} else if (State.variable.language === "EN") {
addToBattleLog(`${attacker.Name} desperately tries to hit you, hurting themselves by ${desperateroll} of damage in the process.`)
}
if (attacker.statusEffects.confusion > 0) {
if (attacker.traits.includes("Precise Strikes")) {
hitChance -= Math.round((attacker.PER /2))
}
hitChance -= desperateroll;
attackHits = (hitChance + attacker.additionalHitChance) <= combinedDefense;
} else {
if (attacker.traits.includes("Precise Strikes")) {
hitChance += Math.round((attacker.PER /2))
}
hitChance += desperateroll;
attackHits = (hitChance + attacker.additionalHitChance) >= combinedDefense;
}
}
if (hitChance + attacker.additionalHitChance >= combinedDefense * 2) {
crit = true;
} else if (attacker.traits.includes("Cirurgic Precision") && hitChance + attacker.additionalHitChance >= Math.round((combinedDefense * 1.75))) {
crit = true;
} else if (attacker.traits.includes("Improved Cirurgic Precision") && hitChance + attacker.additionalHitChance >= Math.round((combinedDefense * 1.5))) {
crit = true;
}
if (attacker.statusEffects.stance && attacker.statusEffects.stance.active === true) {
if (attacker.statusEffects.stance.type === "Scoping") {
crit = false
}
}
if (slot.Type.includes('unique')) {
crit = false;
}
if (attacker.statusEffects.trueStrike && attacker.statusEffects.trueStrike === true) {
crit = false
}
if (attacker.traits.includes("Bloody Mess") && crit === true) {
target.statusEffects.bleed += 3;
}
if (target.traits.includes("Martyrdom")) {
attackHits = true;
}
if (attacker.traits.includes("Ravenous") && attacker.statusEffects.ravenouscount === 2) {
attackHits = true
attacker.statusEffects.ravenouscount = 0
}
if (target.statusEffects.bonearmor && target.statusEffects.bonearmor.duration > 0) {
let returnDamage = rollDice(target.statusEffects.bonearmor.damage);
if (attacker.traits.includes("Hardy")) {
returnDamage = Math.round((returnDamage * 0.85));
}
}
if (target.statusEffects.marked && target.statusEffects.marked === true) {
attackHits = true;
crit = true
target.statusEffects.marked = false;
}
// Check if the attack hits and handle riposte and opportunistic attacks
if (attackHits) {
if (attacker.statusEffects.momentumBonus) {
attacker.statusEffects.momentumBonus = 0;
}
if (target.statusEffects.dodge && target.statusEffects.dodge === true) {
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} failed to dodge the attack.`)
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`${target.Name} falhou em desviar do ataque.`)
}
target.statusEffects.dodge = false;
} else {
if (crit) {
if (State.variables.language === "EN") {
addToBattleLog(`A tremendous blow is dealt!`);
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`Um golpe tremendo é dado!`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`A blow is dealt!`);
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`Um golpe é dado!`);
}
}
}
attackHits = true
handleRiposte(attacker, target, attackHits);
} else {
if (attacker.traits.includes("Ravenous")) {
if (!attacker.statusEffects.ravenouscount) {
attacker.statusEffects.ravenouscount = 1
} else {
attacker.statusEffects.ravenouscount++
}
}
State.variables.enemyInstances.forEach(enemy => {
if (enemy.traits.includes("annoying")) {
if (attacker.statusEffects.annoyingEffect === null || attacker.statusEffects.annoyingEffect === undefined) {
attacker.statusEffects.annoyingEffect = 0;
}
attacker.statusEffects.annoyingEffect += 2;
if (State.variables.language === "EN") {
addToBattleLog(`<b>${enemy.Name}:</b> HAHAHAHA! DEY MIZS! DEY BAD! LOL.`)
} else if (State.variables.Language === "PT-BR") {
addToBattleLog(`<b>${enemy.Name}:</b> HAHAHAHA! ELE ERRAR! ELE RUIM! LOL.`)
}
}
})
if (attacker.traits.includes("Momemtum")) {
if (attacker.statusEffects.momentumBonus === null || attacker.statusEffects.momentumBonus === undefined) {
attacker.statusEffects.momentumBonus = 0;
}
attacker.statusEffects.momentumBonus += 7;
}
if (target.statusEffects.dodge && target.statusEffects.dodge === true) {
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} dodges the attack.`)
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`${target.Name} desvia do ataque.`)
}
target.statusEffects.dodge = false;
} else {
if (State.variables.language === "EN") {
addToBattleLog(`A miss, a fumble, missfortune strikes.`);
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`Um erro, um desastre, um infortúnio acontece.`);
}
}
handleRiposte(attacker, target, attackHits);
handleOpportunisticAttack(attacker, target, attackHits);
}
if (slot.Type.includes('ranged') && attacker.statusEffects.galewinds && attacker.statusEffects.galewinds === true) {
attackHits = false
}
return attackHits;
}
function calculateCombinedDefense(target) {
const equipmentSlots = ['head', 'torso', 'waist', 'legs', 'feet', 'offhand', 'mainhand'];
let combinedDefense = target.BaseDefense + target.additionalDefense;
equipmentSlots.forEach(slot => {
const equippedItem = target.equipment[slot];
if (equippedItem && equippedItem.Defense && equippedItem.Defense !== null) {
combinedDefense += equippedItem.Defense;
}
if (target.traits.includes("Natural Figther") && equippedItem.Type.includes("bornwith")) {
if (target.level < 8) {
combinedDefense++;
} else if (target.level >= 8 && target.level < 14) {
combinedDefense += 2;
} else if (target.level > 14) {
combinedDefense += 3;
}
}
});
return combinedDefense;
}
window.handleRiposte = function (attacker, defender, attackHits) {
let riposteHits = false;
if (defender.statusEffects.riposte) {
if (!defender.statusEffects.parry.active && !defender.statusEffects.parry.active === true) {
defender.additionalHitChance -= 10;
}
let main = defender.equipment.mainhand
let off = defender.equipment.offhand
riposteHits = calculateHitChance(defender, attacker, main);
if (riposteHits) {
let riposteDamage = 0
riposteDamage = calculateDamage(defender, attacker, main);
if (State.variables.language === "EN") {
addToBattleLog(`${defender.Name}'s Riposte ${attacker.Name}'s strike.`);
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`${defender.Name_pt} Responde ao ataque de ${attacker.Name_pt}.`);
}
applyDamage(defender, attacker, riposteDamage, main)
if (off.Type.includes("weapon") && off.Type.includes("light")) {
riposteHits = calculateHitChance(defender, attacker, off);
if (riposteHits) {
riposteDamage = calculateDamage(defender, attacker, off);
applyDamage(defender, attacker, riposteDamage, off)
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${defender.Name}'s second Riposte ends in a misses.`);
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`A segunda Resposta de ${defender.Name_pt} acaba em um erro.`);
}
}
}
if (!defender.traits.includes("Masterful Efficiency")) {
defender.statusEffects.riposte = false;
}
updateEnemyDetails(attacker);
updatePlayerDetails();
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${defender.Name}'s Riposte attempt misses.`);
} else if (State.variable.language === "PT-BR") {
addToBattleLog(`A tentativa de Resposta de ${defender.Name_pt} erra.`);
}
}
if (!defender.statusEffects.parry.active && !defender.statusEffects.parry.active === true) {
defender.additionalHitChance += 10;
}
}
return attackHits;
}
window.handleOpportunisticAttack = function (attacker, defender, attackHits) {
let opportunisticHits = false;
let slot1 = defender.equipment.mainhand
let slot2 = defender.equipment.offhand
if (defender.traits.includes("Opportunistic") && !attackHits) {
if (State.variables.language === "EN") {
addToBattleLog(`${defender.Name} takes the opportunity and attacsk ${attacker.Name}!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${defender.Name_pt} toma a oportunidade e ataca ${attacker.Name_pt}!`);
}
defender.additionalHitChance -= 15;
opportunisticHits = calculateHitChance(defender, attacker, slot1);
if (opportunisticHits) {
const opportunisticDamage = calculateDamage(defender, attacker, slot1);
applyDamage(defender, attacker, opportunisticDamage, slot1)
updatePlayerDetails(character);
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${defender.Name}'s attempt ends in failure.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`A tentativa de ${defender.Name_pt} termina numa falha`);
}
}
if (slot2.Type.includes("weapon") && slot2.Type.includes("light")) {
opportunisticHits = calculateHitChance(defender, attacker, slot2);
if (opportunisticHits) {
const opportunisticDamage = calculateDamage(defender, attacker, slot2);
applyDamage(defender, attacker, opportunisticDamage, slot2)
updatePlayerDetails(character);
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${defender.Name}'s second attempt ends in failure.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`A segunda tentativa de ${defender.Name_pt} termina numa falha`);
}
}
}
defender.additionalHitChance += 15;
}
return false; // Always return false if the attack missed
}
window.rollDice = function (diceString) {
// Split the dice string into parts (e.g., "5d4" => ["5", "4"])
const [numDice, numSides] = diceString.split('d').map(Number);
// Roll the dice and calculate the total damage
let roll = 0;
for (let i = 0; i < numDice; i++) {
roll += Math.floor(Math.random() * numSides) + 1;
}
return roll;
}
//Non-Armor: Increase all damage taken by 7% for each slot with this trait.
//Naked: -2 to Speech and Intimidation tests.
//Sacred: While equipped, whenever you would fail a test, add +2 to the result. If the test is of Mystical Knowledge, add +4, instead.
//Arcane: When adding new Spells to your Repertoire, a Spellbook reduces the time require by 2 hour.
//Elegant: Add to +3 to Speech tests.
//Instrument: While equipped with an instrument, add +3 to Art tests. During combat, whenever you cast a Ballad Spell, restore Lifeblood equal to your Art Expertise.
//Draconic: Reduce all damage by extra 7%.
//Sturdy: Reduce damage taken from ranged weapons by extra 5% for each equipped item with this trait.
//Compost: Reduce damage taken from melee weapons by extra 5% for each equipped item with this trait.
function calculateArmorModifier(combinedSlots, weaponType) {
let armorModifier = 0;
for (const slot of combinedSlots) {
if (weaponType.includes('slashing')) {
if (slot.includes('light armor')) {
armorModifier += 0.095;
} else if (slot.includes('heavy armor')) {
armorModifier -= 0.075;
}
} else if (weaponType.includes('piercing')) {
if (slot.includes('medium armor')) {
armorModifier += 0.075;
} else if (slot.includes('light armor') || slot.includes('heavy armor')) {
armorModifier -= 0.05;
}
} else if (weaponType.includes('blunt')) {
if (slot.includes('heavy armor')) {
armorModifier += 0.095;
} else if (slot.includes('light armor')) {
armorModifier -= 0.075;
}
}
if (weaponType.includes('ranged')) {
if (slot.includes('sturdy')) {
armorModifier -= 0.075;
}
} else if (weaponType.includes('melee')) {
if (slot.includes('composite')) {
armorModifier -= 0.075;
}
} else if (weaponType.includes('esoteric') || weaponType.includes('melee') || weaponType.includes('ranged')) {
if (slot.includes('draconic')) {
armorModifier -= 0.095;
}
if (slot.includes('non-armor')) {
armorModifier -= 0.095;
}
}
}
return armorModifier;
}
window.calculateDamage = function (attacker, target, slot) {
let damageDiceString = slot.Damage;
let [numDice, numSides] = damageDiceString.split('d').map(Number);
if (slot && slot.Damage) {
if (slot.Type.includes("bornwith") && attacker.traits.includes("Savagery")) {
damageDiceString = `${numDice}d${numSides + 2}`;
}
if (attacker.traits.includes("Sniper Shot")) {
for (let i = attacker.AP; i > 0; i++) {
if (!numSides > 12) {
numSides += 2;
} else {
numSides = 12;
numDice++;
}
}
damageDiceString = `${numDice}d${numSides}`;
attacker.AP = 0;
}
if (slot.Type.includes("ranged")) {
if (attacker.traits.includes("Barbed points")) {
damageDiceString = `${numDice + 1}d${numSides}`;
}
if (attacker.traits.includes("Dragon Piercing Arrows")) {
if (numSides < 12) {
damageDiceString = `${numDice}d${numSides + 2}`;
}
}
}
if (slot.Name === "Arcane Blade" && attacker.traits.includes("Arcane Weapon")) {
if (attacker.level >= 5 && atacker.level < 10) {
damageDiceString = `${numDice + 1}d${numSides}`;
} else if (attacker.level >= 10 && atacker.level < 15) {
damageDiceString = `${numDice + 2}d${numSides}`;
} else if (attacker.level >= 15) {
damageDiceString = `${numDice + 3}d${numSides}`;
}
}
if (attacker.traits.includes("Elementalist")) {
let air = false;
let fire = false;
let earth = false;
let water = false;
for (let i = 0; i < State.variables.allyInstances.length; i++) {
const summon = State.variables.allyInstances[i];
if (summon.traits.includes("Air Totem")) {
air = true;
}
if (summon.traits.includes("Fire Totem")) {
fire = true;
}
if (summon.traits.includes("Earth Totem")) {
earth = true;
}
if (summon.traits.includes("Water Totem")) {
water = true;
}
}
if (air && fire && earth && water) {
numSides = 20;
damageDiceString = `${numDice}d${numSides}`;
}
}
if (crit) {
if (slot.Type.includes("Heavy")) {
damageDiceString = `${numDice * 3}d${numSides}`;
} else {
damageDiceString = `${numDice * 2}d${numSides}`;
}
let testDices = ['1d6','1d6']
let value1 = 12
if (State.variables.difficulty === "easy") {
if (target === State.variables.character[1]) {
value1 = 15
} else {
value1 = 10
}
} else if (State.variables.difficulty === "hard") {
if (target === State.variables.character[1]) {
value1 = 10
} else {
value1 = 15
}
}
let places = ["torso", "mainhand", "offhand", "waist", "feet", "head"];
if (target.broken.length > 0) {
target.broken.forEach(place => {
let index = places.indexOf(place);
if (index !== -1) {
places.splice(index, 1);
}
});
}
if (target.Ancestry !== "Totem" || target.Ancestry !== "Daemon"|| target.Ancestry !== "Construct" || target.Specialization !== "Ghost" || !target.traits.includes("inorganic")) {
let result = rollDice(testDices[0]) + rollDice(testDices[1]) + Math.round((target.RES / 3))
let resTest = result > value1
if (!resTest) {
let chosenPlace = places[Math.floor(Math.random() * places.length)];
target.broken.push(chosenPlace)
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} inflicts a deep wound on ${target.Name}'s ${chosenPlace}.`)
} else if (State.variables.language === "PT-BR") {
let translation = ''
if (chosenPlace === 'torso') {
translation = 'no torso de';
} else if (chosenPlace === 'mainhand') {
translation = 'na mão principal de';
} else if (chosenPlace === 'offhand') {
translation = 'na mão secundária de';
} else if (chosenPlace === 'waist') {
translation = 'na cintura de';
} else if (chosenPlace === 'feet') {
translation = 'nos pés de';
} else if (chosenPlace === 'head') {
translation = 'na cabeça de';
}
addToBattleLog(`${attacker.Name_pt} inflige um ferida profunda ${translation} ${target.Name_pt}.`)
}
}
}
}
console.log(`${damageDiceString}`);
let rawDamage = rollDice(damageDiceString);
if (attacker.broken.includes(slot)) {
const secondDamage = rollDice(damageDiceString);
if (secondDamage < rawDamage) {
rawDamage = secondDamage
}
}
if (attacker.statusEffects.stance && attacker.statusEffects.stance.active === true) {
if (attacker.statusEffects.stance.type === "Shredder") {
const secondroll = rollDice(damageDiceString);
if (secondroll > rawDamage) {
rawDamage = secondroll
}
}
}
if (attacker.traits.includes("Feral")) {
const feralRoll = rollDice(damageDiceString);
if (feralRoll > rawDamage) {
rawDamage = feralRoll
}
}
let damageModifier = 0;
if (slot.Name === "Arcane Blade") {
damageModifier += Math.round(attacker.INT / 3);
} else if (slot.Type.includes('versatile')) {
damageModifier += Math.max(Math.round(attacker.DEX / 3), Math.round(attacker.STR / 3));
} else if (slot.Type.includes('heavy')) {
damageModifier += Math.round(attacker.STR / 3);
} else if (slot.Type.includes('esoteric')) {
damageModifier += Math.round((attacker.INT + attacker.CHA) / 3);
} else if (slot.Type.includes('agile')) {
damageModifier += Math.round(attacker.DEX / 3);
} else if (slot.Type.includes('visceral')) {
const targetMissingLife = (target.MAXLIFE - target.currentLife);
damageModifier += Math.round(targetMissingLife * 0.15);
} else if (slot.Type.includes('firearm')) {
damageModifier += Math.round(attacker.PER / 3)
} else if (slot.Type.includes("throwing")) {
if (slot.ammo > 0) {
slot.ammo--;
damageModifier += Math.round(((attacker.STR + attacker.PER) / 3))
}
}
// Calculate armor modifier based on the target's armor type
const combinedSlots = [
target.equipment.head,
target.equipment.torso,
target.equipment.waist,
target.equipment.legs,
target.equipment.feet,
target.equipment.mainhand,
target.equipment.offhand,
].join('');
const armorModifier = calculateArmorModifier(combinedSlots, slot.Type);
console.log(`Raw Damage: ${rawDamage}`);
console.log(`Damage Modifier: ${damageModifier}`);
console.log(`Armor Modifier: ${armorModifier}`);
let totalDamage = rawDamage + damageModifier;
for (let i = 0; i < State.variables.summons.length; i++) {
const summon = State.variables.summons[i];
if (summon.traits.includes("Water Totem") && target === State.variables.character[1]) {
totalDamage -= 2
}
if (summon.traits.includes("Fire Totem") && attacker === State.variables.character[1]) {
totalDamage += 2
}
}
if (attacker.traits.includes("Natural Fighter")) {
attacker.equipment.forEach(slot => {
if (slot.Type.includes("bornwith")) {
totalDamage += attacker.level < 8 ? 2 : attacker.level < 14 ? 4 : 6
}
})
}
if (attacker.statusEffects.annoyingEffect) {
totalDamage += attacker.statusEffects.annoyingEffect
attacker.statusEffects.annoyingEffect = 0;
}
let finalDamage = Math.round(totalDamage * (1 + armorModifier) + attacker.additionalDamage);
if (isNaN(finalDamage) || finalDamage < 0) {
finalDamage = 1;
}
console.log(`Damage dealt (${slot.Damage}): ${finalDamage}.`);
if (target === State.variables.character[1]) {
shakeScreen()
}
return finalDamage;
} else {
console.log(`No damage calculated.`);
return 0;
}
};
function translateTerm(term) {
let language = State.variables.language
if (language === "PT-BR") {
const PTBR_translations = {
Ancestry: {
Human: 'Humano',
Draconian: 'Draconiano',
Ogroid: 'Ogróide',
Elf: 'Elfo',
Dwarf: 'Anão',
Herald: 'Arauto',
Vanadi: 'Vanadi',
Beast: 'Fera',
Vampyr: "Vampiro",
Undead: "Morto-Vivo",
Daemon: 'Demônio',
Construct: 'Constructo',
},
Specialization: {
Mercenary: "Mercenário",
Shaman: "Xamã",
Shredder: "Retalhador",
"Barber Surgeon": "Barbeiro-Cirurgião",
Trapper: "Caçador",
Spellblade: "Lâmina Mágica",
Flagellant: "Flagellante",
Vanguard: "Vanguarda",
Archer: "Arqueiro",
Duelist: "Duelista",
Assassin: "Assassino",
Thief: "Ladrão",
Spy: "Espião",
Juggernaut: "Juggernaut",
Berserker: "Berserker",
Wizard: "Feiticeiro",
Warlock: "Bruxo",
Invoker: "Invocador",
Dancer: "Dançarino",
Bard: "Bardo",
Scholar: "Erudito",
Paladin: "Paladino",
Cleric: "Clerigo",
Inquisitor: "Inquisidor",
"Scaledbound Knight": 'Cavalheiro Jurado da Escama',
Bandit: 'Bandido',
Monster: 'Monstro',
Feral: 'Selvagem',
'GOBLIN!': 'GOBLIN!',
Totem: 'Totêm',
Cultist: "Cultista",
Zombie: 'Zumbi',
Knight: 'Cavalheiro',
Ghost: "Fantasma",
Slave: "Escravo",
Commonfolk: "Gente comum",
},
Traits: {
Inorganic: "Inorgânico",
Wolf: "Lobo",
Hardy: "Durável",
'GOBLIN!': "GOBLIN!",
Boss: 'Chefe',
Ravenous: 'Voraz',
'Natural Warriror': 'Guerreios Naturais',
'Apex Hunter': 'Caçador Apex',
'Vampyric Hunger': 'Fome Vampirica',
"Sound Consitution": 'Forte Constituição',
Feral: 'Selvagem',
Behavioral: 'Comportamental',
"Though Skin": 'Resistente',
Desesperate: 'Deseperado',
Follower: 'Seguidor',
Sneaky: 'Furtivo',
Annoying: 'Irritante',
Poisonous: 'Venenoso',
Swarm: 'Enxame',
Opportunistic: 'Oportunista',
Deathless: "Eterno",
Sacrifice: "Sacrifício",
Loner: "Solitário",
"Resilient:": "Resiliente",
"Precise Strikes": "Golpes Precisos",
}
}
}
};
window.updatePlayerDetails = function() {
let character = State.variables.character[1];
let Burning = ``;
let Confused = ``;
let Stunned = ``;
let Hindered = ``;
let Poisoned = ``;
let Bleeding = ``;
let Regenerating = ``;
let Blind = ``;
let Improved = ``;
let Hidden = ``;
if (State.variables.language === "EN") {
if (character.statusEffects.hidden === true) {
Hidden = `You are <b>Hidden</b>.`
}
if (character.statusEffects.burn.duration > 0) {
Burning = `You are <b>Burning</b> for ${character.statusEffects.burn.duration} actions.`
}
if (character.statusEffects.confused > 0) {
Confused = `<b>Confused</b> for ${character.statusEffects.confused} attacks.`
}
if (character.statusEffects.stun > 0) {
Stunned = `You are <b>Stunned</b> for ${character.statusEffects.stun} turns.`
}
if (character.statusEffects.hindered > 0) {
Hindered = `You are <b>Hindered</b> for ${character.statusEffects.hindered} turns.`
}
if (character.statusEffects.poison > 0) {
Poisoned = `You are <b>Poisoned</b>, taking ${character.statusEffects.poison} damage.`
}
if (character.statusEffects.bleed > 0) {
Bleeding = `You are <b>Bleeding</b> for ${character.statusEffects.bleed} turns.`
}
if (character.statusEffects.regeneration > 0) {
Regenerating = `You are <b>Regenerating</b> for ${character.statusEffects.regeneration}.`
}
if (character.statusEffects.improvedAttacks > 0) {
Improved = `You have ${character.statusEffects.improvedAttacks} <b>Improved attacks</b>`
}
if (character.statusEffects.blind === true) {
Blind = `You are <b>Blind</b>`;
}
} else if (State.variables.language === "PT-BR") {
if (character.statusEffects.hidden === true) {
Hidden = `Você está <b>Oculto</b>.`;
}
if (character.statusEffects.burn.duration > 0) {
Burning = `Você está <b>Queimando</b> por ${character.statusEffects.burn.duration} ações.`;
}
if (character.statusEffects.confused > 0) {
Confused = `<b>Confuso</b> por ${character.statusEffects.confused} ataques.`;
}
if (character.statusEffects.stun > 0) {
Stunned = `Você está <b>Atordoado</b> por ${character.statusEffects.stun} turnos.`;
}
if (character.statusEffects.hindered > 0) {
Hindered = `Você está <b>Impedido</b> por ${character.statusEffects.hindered} turnos.`;
}
if (character.statusEffects.poison > 0) {
Poisoned = `Você está <b>Envenenado</b>, sofrendo ${character.statusEffects.poison} de dano.`;
}
if (character.statusEffects.bleed > 0) {
Bleeding = `Você está <b>Sangrando</b> por ${character.statusEffects.bleed} turnos.`;
}
if (character.statusEffects.regeneration > 0) {
Regenerating = `Você está <b>Regenerando</b> por ${character.statusEffects.regeneration} turnos.`;
}
if (character.statusEffects.improvedAttacks > 0) {
Improved = `Você tem ${character.statusEffects.improvedAttacks} <b>Ataques melhorados</b>.`;
}
if (character.statusEffects.blind === true) {
Blind = `Você está <b>Cego</b>.`;
}
}
const translatedAncestry = translateTerm(character.Ancestry);
const translatedSpecialization = translateTerm(character.Specialization);
let statusDetails = `<i>${Burning}</i> <i>${Confused}</i> <i>${Burning}</i> <i>${Stunned}</i> <i>${Hindered}</i> <i>${Poisoned}</i> <i>${Bleeding}</i> <i>${Regenerating}</i> <i>${Improved}</i> <i>${Hidden}</i> <i>${Blind}</i>
`;
let topleftContent = ``;
// Update the 'topleft' element with the character's details
if (State.variables.language === "PT-BR") {
topleftContent = `
<p>${character.Name} - ${translatedAncestry} ${translatedSpecialization} (${character.level}) | ${statusDetails}</p>`;
} else if (State.variables.language === "EN") {
topleftContent = `
<p>${character.Name} - ${character.Ancestry} ${character.Specialization} (${character.level}) | ${statusDetails}</p>
`;
}
document.getElementById('topleft').innerHTML = topleftContent;
// Update the 'values' element with the character's lifeblood, essence, and AP
let valuesContent = `
<p><b>Lifeblood:</b> <i>${character.currentLife} / ${character.MAXLIFE}</i><br></p>
<p><b>AP:</b> <i>${character.AP}</i></p>
<p><b>Essence:</b> <i>${character.currentMana} / ${character.MAXMANA}</i><p>
`;
document.getElementById('values').innerHTML = valuesContent;
};
window.updateEnemyDetails = function (enemy) {
const enemyDetailsContainer = document.getElementById('selected-enemy-details')
initializeEnemyList()
let Burning = ``;
let Confused = ``;
let Stunned = ``;
let Hindered = ``;
let Blind = ``;
let Poisoned = ``;
let Bleeding = ``;
let Regenerating = ``;
let Improved = ``;
let Hidden = ``;
if (State.variables.language === "EN") {
if (enemy.statusEffects.hidden === true) {
Hidden = `This enemy is <b>Hidden</b>.`
}
if (enemy.statusEffects.burn.duration > 0) {
Burning = `<b>Burning</b> for ${enemy.statusEffects.burn.duration} actions.`
}
if (enemy.statusEffects.confused > 0) {
Confused = `<b>Confused</b> for ${enemy.statusEffects.confused} attacks.`
}
if (enemy.statusEffects.stun > 0) {
Stunned = `<b>Stunned</b> for ${enemy.statusEffects.stun} turns.`
}
if (enemy.statusEffects.blind === true) {
Blind = `This enemy is <b>Blinded</b>.`
}
if (enemy.statusEffects.hindered > 0) {
Hindered = `<b>Hindered</b> for ${enemy.statusEffects.hindered} turns.`
}
if (enemy.statusEffects.poison > 0) {
Poisoned = `<b>Poisoned</b> for ${enemy.statusEffects.poison} turns.`
}
if (enemy.statusEffects.bleed > 0) {
Bleeding = `<b>Bleeding</b> for ${enemy.statusEffects.bleed} turns.`
}
if (enemy.statusEffects.regeneration > 0) {
Regenerating = `<b>Regenerating</b> for ${enemy.statusEffects.regeneration} turns.`
}
if (enemy.statusEffects.improvedAttacks > 0) {
Improved = `<b>Improved attacks</b>: ${enemy.statusEffects.improvedAttacks}`
}
} else if (State.variables.language === "PT-BR") {
if (enemy.statusEffects.hidden === true) {
Hidden = `Este inimigo está <b>Oculto</b>.`;
}
if (enemy.statusEffects.burn.duration > 0) {
Burning = `<b>Queimando</b> por ${enemy.statusEffects.burn.duration} ações.`;
}
if (enemy.statusEffects.confused > 0) {
Confused = `<b>Confuso</b> por ${enemy.statusEffects.confused} ataques.`;
}
if (enemy.statusEffects.stun > 0) {
Stunned = `<b>Atordoado</b> por ${enemy.statusEffects.stun} turnos.`;
}
if (enemy.statusEffects.blind === true) {
Blind = `Este inimigo está <b>Cego</b>.`;
}
if (enemy.statusEffects.hindered > 0) {
Hindered = `<b>Impedido</b> por ${enemy.statusEffects.hindered} turnos.`;
}
if (enemy.statusEffects.poison > 0) {
Poisoned = `<b>Envenenado</b> por ${enemy.statusEffects.poison} turnos.`;
}
if (enemy.statusEffects.bleed > 0) {
Bleeding = `<b>Sangrando</b> por ${enemy.statusEffects.bleed} turnos.`;
}
if (enemy.statusEffects.regeneration > 0) {
Regenerating = `<b>Regenerando</b> por ${enemy.statusEffects.regeneration} turnos.`;
}
if (enemy.statusEffects.improvedAttacks > 0) {
Improved = `<b>Ataques melhorados</b>: ${enemy.statusEffects.improvedAttacks}`;
}
}
let statusDetails = `<nobr><i>${Burning}</i> - <i>${Confused}</i> - <i>${Burning}</i> - <i>${Stunned}</i> - <i>${Hindered}</i> - <i>${Poisoned}</i> - <i>${Bleeding}</i> - <i>${Regenerating}</i> - <i>${Improved}</i> - <i>${Hidden}</i></nobr>
`;
const translatedAncestry = translateTerm(enemy.Ancestry);
const translatedSpecialization = translateTerm(enemy.Specialization);
let detailsHtml = ''
let deadHtml = ''
enemyDetailsContainer.innerHTML = '';
if (State.variables.language === "EN") {
detailsHtml = `
<h3>Enemy: ${enemy.Name}</h3>
<p><b>Type:</b><i> ${enemy.Specialization}</i> | <b>Ancestry:</b><i> ${enemy.Ancestry}</i></p>
<p><b>Lifeblood:</b><i> ${enemy.currentLife} / ${enemy.MAXLIFE} </i> | <b>Essence:</b><i> ${enemy.currentMana} / ${enemy.MAXMANA}</i></p>
<p><b>Traits:</b><i> ${enemy.traits.map(function(trait, index) {
var title = {
"Hardy": "This character takes 15% less damage.",
"Feral": "This character rolls Damage twice and chooses the highest result.",
"Sneaky": "Every 4 turns, this character will become Hidden, not able to be attacked, and its next attack will deal 1d8 additional damage.",
"Sound Constitution" : "Reduce Bleed and Poison damage received by half.",
"Follower" : "For each enemy other than self, increase this character's Hit-Chance by 3. When alone halves AP regen, instead.",
"Swarm": "Loses Action Points the closest to its death",
"Deathless" : "The first two times this character is killed, revive it with 1 Lifeblood.",
"Desperate": "Whenever this character would miss an attacke, damage self by 1d10 and add the result to the Hit Chance.",
"Ravenous" : "After this character misses 2 attacks, the next one has a guaranteed hit.",
"Inorganic" : "This character is Immune to all Status Effects.",
"Sacrifice" : "This character is meant to be used for other's abilities.",
"Annoying" : "Whenever the opponent misses an attack, laugh at him, reducing their Hit-chance by 1 but increasing their damage by 1 as well. Both values are reset when they make a hit.",
"Coward": "When below 30% of its Lifeblood, this character will attempt to Escape from battle.",
"Boss" : "This is a Boss. (Scawy)",
"Loner": "When this is the only enemy in the battlefield, increase its Hit-Chance by 15.",
"Resilient": "Adds 1d4 extra Lifeblood per level.",
"Precise Strikes": "Adds 1/2 of your Perception to your Hit Chance. While Confused, subtract, instead.",
"Colossal": "THis enemy is huge, and so it is its Lifeblood",
}[trait];
return '<abbr title="' + title + '">' + trait + '</abbr>';
}).join(', ')}</i></p>
${statusDetails}
`;
deadHtml = `
<h3>Enemy: ${enemy.Name} (<b>Dead</b>)</h3>
<p><b>Lifeblood:</b><i> ${enemy.currentLife}</b></p>
`;
} else if (State.variables.language === "PT-BR") {
detailsHtml = `
<h3>Inimigo: ${enemy.Name_pt}</h3>
<p><b>Tipo:</b> <i>${translatedSpecialization}</i> | <b>Ancestralidade:</b><i> ${translatedAncestry}</i></p>
<p><b>Força Vital:</b><i> ${enemy.currentLife} / ${enemy.MAXLIFE} </i> | <b>Essência:</b><i> ${enemy.currentMana} / ${enemy.MAXMANA}</i></p>
<p><b>Traços:</b><i> ${enemy.traits.map(function(trait, index) {
var title = {
"Hardy": "Este personagem recebe 15% menos Dano.",
"Feral": "Este personagem rola Dano duas vezes e escolhe o maior resultado.",
"Sneaky": "A cada 4 turnos, este personagem ficará Oculto, incapaz de ser atacado, e seu próximo ataque causará 1d8 de Dano adicional.",
"Sound Constitution": "Reduz pela metade o dano recebido de Sangramento e Veneno.",
"Follower": "Para cada inimigo além de si, aumente a Chance de Acerto deste personagem em 3. Quando sozinho, reduz pela metade a regeneração de AP.",
"Swarm": "Perde Pontos de Ação o mais próximo de sua morte.",
"Deathless": "Nas duas primeiras vezes que este personagem for morto, reviva-o com 1 de Força Vital.",
"Desperate": "Sempre que está a errar um ataque, se danifique por 1d10 e adicione o resultado a Chance de Acerto.",
"Ravenous": "Depois que este personagem errar 2 ataques, o próximo terá um acerto garantido.",
"Inorganic": "Este personagem é imune a Efeitos de Status.",
"Sacrifice": "Este personagem foi feito para ser usado nas habilidades de outros.",
"Annoying": "Sempre que o oponente errar um ataque, ria dele, reduzindo sua chance de acerto em 1, mas aumentando seu dano em 1 também. Ambos os valores são redefinidos quando eles acertam.",
"Coward": "Quando estiver abaixo de 30% de sua Força Vital, este personagem tentará escapar da batalha.",
"Boss": "Este é um chefe. (Awustadow)",
"Loner": "Quando esse é o unico inimigo no campo de batalha, aumente sua Chance de Acerto em 15",
"Resilient": "Adiciona 1d4 de Força Vital extra por nível.",
"Precise Strikes": "Adiciona 1/2 de sua Percepção para sua Chance de Acerto. Quando Confuso, subtraia.",
"Colossal": "Esse inimigo é gigante. Assim como sua vida.",
}[trait];
return '<abbr title="' + title + '">' + translateTerm(trait) + '</abbr>';
}).join(', ')}</i></p>
${statusDetails}
`;
deadHtml = `
<h3>Inimigo: ${enemy.Name_pt} (<b>Morto</b>)</h3>
<p><b>Força Vital:</b><i> ${enemy.currentLife}</b></p>
`;
}
const enemyDetails = document.createElement('div');
enemyDetails.className = 'enemy-details';
if (enemy.currentLife > 0) {
enemyDetails.innerHTML = detailsHtml;
} else {
enemyDetails.innerHTML = deadHtml;
}
enemyDetailsContainer.appendChild(enemyDetails);
window.initializeEnemyList();
}
let isPlayerTurn = true;
window.createAttackButtons = function() {
const attackButtonsContainer = document.getElementById('attack-buttons');
const generateButton = document.getElementById('generate-button');
let character = State.variables.character[1];
const equippedWeapon = character.equipment.mainhand;
let enemyInstances = State.variables.enemyInstances;
// Clear the innerHTML of attack-buttons container
attackButtonsContainer.innerHTML = '';
// Create attack buttons for enemies
for (let i = 0; i < enemyInstances.length; i++) {
const enemy = enemyInstances[i];
const button = document.createElement('button');
button.id = `attack-button-enemy-${i}`;
if (character.statusEffects.stunned === 0 || character.traits.includes("Champion of Liberty")) {
// Check if the enemy is intangible
if (enemy.statusEffects.hidden === true) {
// Enemy is hiding and cannot be attacked
button.textContent = State.variables.language === "PT-BR" ? `${enemy.Name_pt} está oculto` : `${enemy.Name} is hidden`;
button.disabled = true; // Disable the button
} else {
// Enemy can be attacked
button.textContent = State.variables.language === "PT-BR" ? `Atacar ${enemy.Name_pt} (Inimigo ${i+1})` : `Attack ${enemy.Name} (Enemy ${i+1})`;
// Attach an onclick event handler to trigger the 'attack' macro
let label = State.variables.language === "PT-BR" ? "Atacar" : "Attack";
button.onclick = function() {
if (equippedWeapon.incooldown === 0) {
window.triggerAttack(character, enemy, equippedWeapon);
window.updatePlayerDetails();
window.checkPlayerAP(); // Call the checkPlayerAP function after each attack
equippedWeapon.incooldown += equippedWeapon.Cooldown; // Increase cooldown turns
attackButtonsContainer.innerHTML = '';
attackButtonsContainer.style.display = 'none';
// Change the button text back to "Generate Attack Buttons"
generateButton.textContent = label;
}
};
}
// Disable the button if the weapon is on cooldown
if (equippedWeapon.incooldown > 0) {
button.disabled = true;
console.log(`Your ${equippedWeapon.Name} needs to be recharged, it will take ${equippedWeapon.incooldown} turn(s)`);
}
} else if (character.statusEffects.stunned > 0) {
button.textContent = `You are stunned, thus cannot attack.`
button.disabled = true
}
attackButtonsContainer.appendChild(button);
}
// Show attack buttons and the container
attackButtonsContainer.style.display = 'block';
// Change the button text to "Cancel"
generateButton.textContent = 'Cancel';
// Attach an onclick event handler to the "Cancel" button
generateButton.onclick = function() {
// Clear attack buttons and hide the container
attackButtonsContainer.innerHTML = '';
attackButtonsContainer.style.display = 'none';
// Change the button text back to "Generate Attack Buttons"
generateButton.textContent = 'Attack';
// Attach the original onclick event handler to the "Generate Attack Buttons" button
generateButton.onclick = window.createAttackButtons;
};
};
// Attach an onclick event handler to the "Generate Attack Buttons" button
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('generate-button').onclick = window.createAttackButtons;
});
window.checkPlayerAP = function () {
const playerAP = State.variables.character[1].AP;
const endTurnButton = document.getElementById('end-turn-button');
if (playerAP < State.variables.character[1].APregen || (State.variables.character[1].statusEffects.stunned > 0 || State.variables.character[1].statusEffects.hindered > 0)) {
endTurnButton.removeAttribute('disabled');
}
};
window.handleCooldowns = function (user) {
if (user.equipment.mainhand.incooldown > 0) {
window.reduceCooldown(user, user.equipment.mainhand);
}
if (user.equipment.offhand.incooldown > 0) {
window.reduceCooldown(user, user.equipment.offhand);
}
user.skills.forEach(skill => {
if (skill.inCooldown > 0) {
skill.inCooldown -= 1;
}
});
};
window.reduceCooldown = function(user, weapon) {
if (weapon.incooldown > 0) {
weapon.incooldown -= 1;
console.log(`${user.Name} is using ${weapon.Name}, it requires ${weapon.incooldown} turns`);
if (weapon.incooldown === 0) {
console.log(`${user.Name}'s ${weapon.Name} was recharged.`)
}
}
}
window.triggerAttack = function(attacker, target, slot) {
let attackHits = calculateHitChance(attacker, target, slot);
let damage = 0;
let cost = 0;
if (slot.Type.includes('2-handed') && !(slot.Type.includes('unique'))) {
cost = 2;
} else if (slot.Type.includes('1-handed') && !(slot.Type.includes('unique'))) {
cost = 1;
}
if (attacker.AP < cost) {
console.log("Not enough Action Points to attack!");
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} does not have enough Action Point to perform an attack with it's ${slot.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} não tem Pontos de Ação suficientes para realizar um ataque com sua ${slot.Name_pt}.`);
}
} else {
if (slot.Name === "Flamethrower") {
if (attacker === State.variables.character[1]) {
State.variables.enemyInstances.forEach(enemy => {
for (let i = 0; i < attacker.AP; i++) {
enemy.statusEffects.burn.duration += 1;
if (enemy.statusEffects.burn.duration > 2) {
enemy.statusEffects.burn.stacks += 1;
}
}
});
} else {
for (let i = 0; i < attacker.AP; i++) {
target.statusEffects.burn.duration += 1;
if (target.statusEffects.burn.duration > 2) {
target.statusEffects.burn.stacks += 1;
}
}
}
attacker.AP = 0;
} else {
attacker.AP -= cost;
}
if (slot.Type.includes("cursed")) {
if (slot.curse === "Essence Draining") {
if (State.variables.language === "EN") {
addToBattleLog(`Your ${slot.Name}'s drains ${Math.round((attacker.MAXMANA * 0.03))} of essence from you.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Sua ${slot.Name_pt} drena ${Math.round((attacker.MAXMANA * 0.03))} de sua Essência.`);
}
attacker.currentMana -= Math.round((attacker.MAXMANA * 0.03));
} else if (slot.curse === "Burning") {
attacker.currentLife -= attacker.statusEffects.burn.damage;
} else if (slot.curse === "Possessed") {
let randomEnemy = State.variables.enemyInstances[Math.floor(Math.random() * State.variables.enemyInstances.length)];
target = randomEnemy;
if (State.variables.language === "EN") {
addToBattleLog(`Your ${slot.Name} forces you to attack ${randomEnemy.Name}.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Sua ${slot.Name_pt} força a atacar ${randomEnemy.Name_pt}.`);
}
} else if (slot.curse === "Vampyric") {
if (State.variables.language === "EN") {
addToBattleLog(`Your ${slot.Name}'s drains ${Math.round((attacker.MAXLIFE * 0.03))} of your Lifeblood.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Sua ${slot.Name} drena ${Math.round((attacker.MAXLIFE * 0.03))} de sua Força Vital.`);
}
attacker.currentLife -= Math.round((attacker.MAXLIFE * 0.03));
} else if (slot.curse === "Hungry") {
if (!attackHits) {
let hungrydamage = Math.round((rollDice(slot.Damage) / 2));
attacker.currentLife -= hungrydamage;
if (State.variables.language === "EN") {
addToBattleLog(`Your ${slot.Name}'s hunger is too much,with your miss, your weapon betrays you, feeding off for ${hungrydamage} of your Lifeblood.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`A fome de ${slot.Name} é tamanha, com seu erro, sua arma o trai, se alimentando de ${hungrydamage} de sua Força Vital.`);
}
}
}
}
if (attacker.traits.includes("Faith in Arms") && attacker.statusEffects.improvedAttacks > 0) {
if (attacker.Oath === "Selfishness") {
attacker.currentMana += Math.round((attacker.MAXMANA * 0.03));
if (attacker.currentMana > attacker.MAXMANA) {
attacker.currentMana = attacker.MAXMANA;
}
} else if (attacker.Oath === "Conquest") {
target.additionalDefense -= 3;
} else if (attacker.Oath === "Liberty") {
if (attacker.statusEffects.burn.duration > 1) {
attacker.statusEffects.burn.duration -= 1;
}
if (attacker.statusEffects.stunned > 1) {
attacker.statusEffects.stunned -= 1;
}
if (attacker.statusEffects.hindered > 1) {
attacker.statusEffects.hindered -= 1;
}
if (attacker.statusEffects.confusion > 1) {
attacker.statusEffects.confused -= 1;
}
if (attacker.statusEffects.poison > 1) {
attacker.statusEffects.poison -= 1;
}
if (attacker.statusEffects.bleed > 1) {
attacker.statusEffects.bleed -= 1;
}
} else if (attacker.Oath === "Justice") {
attacker.statusEffects.justiceBuff += 3;
attacker.additionalDefense += 3;
}
}
if (attacker.statusEffects.improvedAttacks > 0 && attacker.traits.includes("Double Time")) {
attacker.skills.forEach(skill => {
if (skill.inCooldown > 0) {
skill.inCooldown -= 1;
}
});
}
if (attacker.statusEffects.improvedAttack > 0 && attacker.traits.includes("Triple Time")) {
let improvedattackHits = calculateHitChance(attacker, target, slot);
if (improvedattackHits) {
damage = calculateDamage(attacker, target, slot);
damage = Math.round((damage * 0.5));
applyDamage(attacker, target, damage, slot);
} else {
let TTtext = Math.random(1,2);
if (TTtext === 1) {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} missed their extra attack.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} errou seu ataque extra.`);
}
} else if (TTtext === 2 && target.equipment.offhand.Type.includes("Shield")) {
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} blocks ${attacker.Name}'s extra attack.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${target.Name_pt} bloqueou o ataque extra de ${attacker.Name_pt}.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} dodges from ${attacker.Name}'s extra attack.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${target.Name_pt} desviou do ataque extra de ${attacker.Name_pt}.`);
}
}
}
}
if (target.statusEffects.trap && target.statusEffects.trap.isArray) {
if (!target.statusEffects.trap.hastriggered) {
if (target.statusEffects.trap.trap1.up === true) {
triggertrap(attacker, target);
target.statusEffects.trap.trap1.up = false;
} else if (target.statusEffects.trap.trap2.up === true) {
triggertrap(attacker, target);
target.statusEffects.trap.trap2.up = false;
} else if (target.statusEffects.trap.trap3.up === true) {
triggertrap(attacker, target);
target.statusEffects.trap.trap3.up = false;
}
target.statusEffects.trap.hastriggered = true
}
}
if (attacker.statusEffects.burn.duration > 0 && attacker !== State.variables.character[1]) {
let holy = 0
if (attacker !== State.variables.character[1]) {
if (State.variables.character[1].traits.includes("Blessed Flames")) {
holy = Math.floor((State.variables.character[1].statusEffects.Piety / 6));
}
if (State.variables.character[1].traits.includes("Fervous Zeal")) {
let heal = 4 * attacker.statusEffects.burn.stacks;
State.variables.character[1].currentLife += heal;
State.variables.character[1].statusEffects.Piety += 1;
}
}
const burndamage = (attacker.statusEffects.burn.damage + holy) * attacker.statusEffects.burn.stacks;
attacker.currentLife -= burndamage;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} burns, suffering ${burndamage} damage.`);
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`${attacker.Name} queima, sofrendo ${burndamage} de dano.`);
}
attacker.statusEffects.burn.duration--; // Decrease burning duration
}
// Consume appropriate AP based on the weapon type
if (attacker.statusEffects.echo && attacker.statusEffects.echo.active) {
attacker.statusEffects.echo.active = false; // Reset the echo status after using it
for (let i = 0; i < attacker.statusEffects.echo.extra; i++) {
if (attacker.equipment.mainhand.Type.includes('1-handed')) {
attacker.AP++;
} else if (attacker.equipment.mainhand.Type.includes('2-handed')) {
attacker.AP += 2;
}
let EchoattackHits = calculateHitChance(attacker, target, slot);
if (EchoattackHits) {
damage = calculateDamage(attacker, target, slot);
applyDamage(attacker, target, damage, slot);
if (target === State.variables.character[1]) {
updatePlayerDetails(character);
updateEnemyDetails(attacker);
shakeScreen();
} else {
updateEnemyDetails(target);
updatePlayerDetails(character);
}
}
}
}
if (attacker.statusEffects.spectralBlades && attacker.statusEffects.spectralBlades > 0) {
spectralBlades--;
for (let i = attacker.statusEffects.spectralBlades; i > 0; i++) {
let bladedamage = rollDice('1d6');
target.currentLife -= bladedamage;
}
}
// Apply status effects and bonuses
if (attacker.traits.includes("Precise Movement")) {
target.currentLife -= Math.round((attacker.CHA / 3));
updatePlayerDetails();
updateEnemyDetails(target);
}
if (attacker.statusEffects.puppet === true) {
let resTest = rollDice('1d20') >= (20 - Math.round((attacker.RES / 3)));
if (resTest) {
attackHits = false;
let selfHarm = calculateHitChance(attacker, attacker, slot);
if (selfHarm) {
let selfdamage = calculateDamage(attacker, attacker, slot);
applyDamage(attacker, attacker, selfdamage, slot);
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} fails to control itself as their own shadows plan to strike their own self.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} falha em controlar a si mesmo, enquanto sua própria sombra planeja atacar a seu eu.`)
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} manages to take hold of itself.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} maneja se controlar.`);
}
}
}
}
if (attacker.equipment.offhand.Type.includes("bornwith") && attacker.traits.includes("Savagery")) {
if (!attacker.equipment.offhand.Type.includes("weapon")) {
attacker.equipment.offhand.Type.push("weapon")
}
}
if (slot.Slot === "mainhand" && !slot.Type.includes("2-handed")) {
if (attacker.equipment.offhand.Type.includes("weapon") && attacker.AP > 0 && slot !== attacker.equipment.offhand) {
if (!attacker.equipment.offhand.Type.includes("light")) {
attacker.AP -= 1;
}
extraAttack(attacker, target)
}
if (attacker.traits.includes("Impossible Flurry")) {
if (attacker.equipment.mainhand.incooldown === 0) {
if (attacker.equipment.mainhand.Type.includes("heavy")) {
attacker.additionalHitChance -= 30;
} else {
attacker.additionalHitChance -= 15;
}
let flurryattack = calculateHitChance(attacker, target, slot);
if (flurryattack) {
let flurryDamage = calculateDamage(attacker, target, slot);
applyDamage(attacker, target, flurryDamage, slot);
}
if (attacker.equipment.mainhand.Type.includes("heavy")) {
attacker.additionalHitChance += 30;
} else {
attacker.additionalHitChance += 15;
}
} else {
attacker.equipment.mainhand.incooldown--;
addToBattleLog(`${attacker.Name}'s ${slot.Name} is in cooldown.`);
}
}
if (attacker.statusEffects.stance && attacker.statusEffects.stance.active === true) {
if (attacker.statusEffects.stance.type === "Shredder" && attacker.traits.includes("Stance Master")) {
if (attacker.equipment.mainhand.inCooldown === 0) {
let extraAttack = calculateHitChance(attacker, target, slot);
if (extraAttack) {
let damage2 = calculateDamage(attacker, target, slot);
applyDamage(attacker, target, damage2, slot);
}
} else {
attacker.equipment.mainhand.inCooldown--;
addToBattleLog(`${attacker.Name}'s ${slot.Name} is in cooldown.`);
}
}
}
if (attacker.equipment.offhand.Type.includes("shield") && attacker.traits.includes("Phalanx Training")) {
if (!attacker.equipment.offhand.Type.includes("blunt")) {
attacker.equipment.offhand.Type.push("blunt");
}
if (attacker.traits.includes("Survivalist")) {
attacker.equipment.offhand.Damage = '2d4';
} else {
attacker.equipment.offhand.Damage = '1d4';
}
extraAttack(attacker, target);
}
}
if (attacker.traits.includes("Firm Hand") && attacker.equipment.mainhand.Type.includes("1-handed") && attacker.equipment.offhand.Type.includes("bornwith")) {
let secondHit = calculateHitChance(attacker, target, slot);
if (secondHit) {
damage = calculateDamage(attacker, target, slot);
applyDamage(attacker, target, damage, slot);
if (target === State.variables.character[1]) {
updatePlayerDetails();
updateEnemyDetails(attacker);
shakeScreen();
} else {
updateEnemyDetails(target);
updatePlayerDetails(character);
}
} else {
addToBattleLog(`A miss.`);
}
}
if (attackHits && attacker.currentLife > 0) {
if (slot.Name === "Flamethrower") {
damage += target.statusEffects.burn.damage;
applyDamage(attacker, target, damage, slot);
} else {
damage += calculateDamage(attacker, target, slot);
if (slot.Type.includes("Enchanted") && slot.echantment === "Dancing") {
const randomEnemyIndex = Math.floor(Math.random() * State.variables.enemyInstances.length);
const randomEnemy = State.variables.enemyInstances[randomEnemyIndex];
let dancingHits = calculateHitChance(attacker, randomEnemy, slot);
if (dancingHits) {
let dancingDamage = Math.round((calculateDamage(attacker, randomEnemy, slot) / 2));
applyDamage(attacker, target, dancingDamage);
updateEnemyDetails(target);
updatePlayerDetails(character);
} else {
let Dancingtext = Math.random(1,2);
if (Dancingtext === 1) {
if (State.variables.language ==="EN") {
addToBattleLog(`${attacker.Name}'s ${slot.Name} tried to strike ${randomEnemy.Name}, but it missed.`);
} else if (State.variables.language ==="PT-BR")
{addToBattleLog(`A ${slot.Name_pt} de ${attacker.Name_pt} tentou atacar ${randomEnemy.Name_pt}, mas errou.`);
}
} else if (Dancingtext === 2 && randomEnemy.equipment.offhand.Type.includes("Shield")) {
if (State.variables.language ==="EN") {
addToBattleLog(`${randomEnemy.Name} blocks ${attacker.Name}'s ${slot.Name} strike.`);
} else if (State.variables.language ==="PT-BR"){
addToBattleLog(`${randomEnemy.Name_pt} bloqueia o ataque da ${slot.Name_pt} de ${attacker.Name_pt}.`);
}
} else {
if (State.variables.language ==="EN") {
addToBattleLog(`${randomEnemy.Name} dodges from ${attacker.Name}'s ${slot.Name} strike}.`);
} else if (State.variables.language ==="PT-BR"){
addToBattleLog(`${randomEnemy.Name_pt} desvia do ataque da ${slot.Name_pt} de ${attacker.Name_pt}.`);
}
}
}
}
if (attacker.statusEffects.hidden === true) {
attacker.statusEffects.hidden = false;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} reveals themselves to strike.`);
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`${attacker.Name_pt} se revela para atacar.`);
}
if (attacker.traits.includes("Sneaky")) {
damage += rollDice("1d8");
}
}
applyDamage(attacker, target, damage, slot);
if (target === State.variables.character[1]) {
updatePlayerDetails();
updateEnemyDetails(attacker);
shakeScreen();
} else {
window.checkPlayerAP()
updateEnemyDetails(target);
updatePlayerDetails();
}
}
} else if (attackHits && attacker.currentLife <= 0) {
attacker.currentLife = 0;
if (State.variables.language ==="EN") {
addToBattleLog(`Sadly, it seems that ${attacker.Name} died before it could strike... trully sad.`);
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`Infelizmente, parece que ${attacker.Name_pt} faleceu antes que pudesse atacar... realmente triste.`);
}
updateEnemyDetails(attacker);
updatePlayerDetails();
} else if (!attackHits) {
addToBattleLog(`${attacker.Name} missed ${target.Name}.`);
if (target.traits.includes("Graceful Steps")) {
target.AP += 1;
if (State.variables.language ==="EN") {
addToBattleLog(`${target.Name} gracefully dogdes the attack and move themselves to a more advantegeous positioning.`);
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`${target.Name_pt} graciosamente desvia do ataca e se move para uma posição mais vantajosa.`);
}
}
if (attacker.traits.includes("Overwhelming Strength")) {
damage = Math.round((calculateDamage(attacker, target, slot) / 3));
applyDamage(attacker, target, damage, slot);
if (target === State.variables.character[1]) {
updatePlayerDetails();
updateEnemyDetails(attacker);
} else {
window.checkPlayerAP()
updateEnemyDetails(target);
updatePlayerDetails();
}
}
}
}
};
function triggertrap(attacker, target) {
addToBattleLog(`${attacker.Name} trigger ${target.Nmame}'s trap!`)
const trap1 = target.statusEffects.trap.trap1.type
if (trap1 === "Decoy") {
attackHits = false
if (target.traits.includes("Master Trapper")) {
target.statusEffects.hidden = true
}
} else if (trap1 === "Explosive") {
let damage = rollDice('2d6')
if (target.traits.includes("Master Trapper")) {
let damage = rollDice('4d6')
}
State.variables.enemyInstances.forEach(enemy => {
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage;
})
} else if (trap1 === "Smoking") {
State.variables.enemyInstances.forEach(enemy => {
if (target.traits.includes("Master Trapper")) {
enemy.statusEffects.blind = true
} else {
enemy.statusEffects.blind.confused += 1
}
})
} else if (trap1 === "Stinky") {
if (target.traits.includes("Master Trapper")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.statusEffects.poison += 10
})
} else {
attacker.statusEffects.poison += 10
}
} else if (trap1 === "Stunning") {
if (target.traits.includes("Master Trapper")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.statusEffects.stun += 1
})
} else {
attacker.statusEffects.stun += 1
}
} else if (trap1 === "Caltrops") {
State.variables.enemyInstances.forEach(enemy => {
if (target.traits.includes("Master Trapper")) {
damage -= rollDice('1d4')
enemy.statusEffects.bleed += 4
} else {
damage -= rollDice('2d4')
enemy.statusEffects.bleed += 6
}
if (enemy.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
enemy.currentLife -= damage;
})
}
if (target.traits.includes("Skirmish Tactics")) {
if (target.equipment.mainhand.incooldown > 0) {
target.equipment.mainhand.incooldown = 0
}
if (target.equipment.mainhand.Type.includes("1-handed")) {
target.AP++
} else {
target.AP+=2
}
window.triggerAttack(target, attacker, attacker.equipment.mainhand);
addToBattleLog(`${target.Name} takes this opportunity to attack ${attacker.Name}.`)
}
return
}
function shakeScreen() {
const shakeAnimation = document.createElement('style');
shakeAnimation.type = 'text/css';
shakeAnimation.innerHTML = `
@keyframes shake {
0% { transform: translate(0, 0); }
10%, 30%, 50%, 70%, 90% { transform: translate(-10px, 0); }
20%, 40%, 60%, 80%, 100% { transform: translate(10px, 0); }
}
body {
animation: shake 0.5s;
}
`;
document.head.appendChild(shakeAnimation);
setTimeout(() => {
document.head.removeChild(shakeAnimation);
}, 500); // Remove the animation after 0.5 seconds (adjust as needed)
}
function extraAttack(attacker, target) {
const randomEnemyIndex = Math.floor(Math.random() * State.variables.enemyInstances.length);
const randomEnemy =
State.variables.enemyInstances[randomEnemyIndex];
let character = State.variables.character[1];
const secondSlot = attacker.equipment.offhand;
let damage = 0
let attackHits = false
if (secondSlot.includes("heavy")) {
attacker.additionalHitchance -= 30
attackHits = calculateHitChance(attacker, target, secondSlot);
attacker.additionalHitchance += 30
} else if (secondSlot.includes("light")) {
attackHits = calculateHitChance(attacker, target, secondSlot);
} else {
attacker.additionalHitchance -= 15
attackHits = calculateHitChance(attacker, target, secondSlot);
attacker.additionalHitchance += 15
}
if (secondSlot.Type.includes("cursed")) {
if (secondSlot.curse === "Essence Draining") {
attacker.currentMana -= Math.round((attacker.MAXMANA * 0.03))
target.currentMana -= Math.round((target.MAXMANA * 0.03))
} else if (secondSlot.curse === "Burning") {
attacker.currentLife -= attacker.statusEffects.burn.damage
target.statusEffects.burn.duration += 1
} else if (secondSlot.curse === "Possessed") {
target = State.variables.enemyInstance[Math.floor(Math.random * State.variables.enemyInstance.length)]
} else if (secondSlot.curse === "Vampyric") {
attacker.currentLife -= Math.round((attacker.MAXLIFE * 0.03))
target.currentLife -= Math.round((target.MAXLIFE * 0.03))
} else if (secondSlot.curse === "Hungry") {
if (!attackHits) {
attacker.currentLife -= Math.round((rollDice(secondSlot.Damage) / 2))
}
}
}
if (attacker.traits.includes("Impossible Flurry") || attacker.traits.includes("Flurry")) {
if (attacker.equipment.offhand.incooldown === 1) {
if (attacker.equipment.offhand.Type.includes("heavy")) {
attacker.additionalHitChance -= 30
} else {
attacker.additionalHitChance -= 15
}
let flurryattack = calculateHitChance(attacker, target, secondSlot);
if (flurryattack) {
let flurryDamage = calculateDamage(attacker, target, secondSlot);
applyDamage(attacker, target, flurryDamage, secondSlot)
}
if (attacker.equipment.offhand.Type.includes("heavy")) {
attacker.additionalHitChance -= 30
} else {
attacker.additionalHitChance -= 15
}
} else {
attacker.equipment.mainhand.incooldown--
addToBattleLog(`${attacker.Name}'s ${secondSlot.Name} is in cooldown.`)
}
}
if (attacker.statusEffects.stance && attacker.statusEffects.stance.active === true) {
if (attacker.statusEffects.stance.type === "Shredder" && attacker.traits.includes("Stance Master")) {
if (attacker.equipment.offhand.inCooldown === 1) {
let extraAttack = calculateHitChance(attacker, target, secondSlot);
if (extraAttack) {
let damage2 = calculateDamage(attacker, target, secondSlot);
applyDamage(attacker, target, damage2, secondSlot)
}
} else {
attacker.equipment.mainhand.inCooldown--
addToBattleLog(`${attacker.Name}'s ${secondSlot.Name} is in cooldown.`)
}
}
}
if (attackHits) {
damage += calculateDamage(attacker, target, secondSlot);
applyDamage(attacker, target, damage, secondSlot)
} else if (!attackHits) {
if (attacker.traits.includes("Overwhelming Strength")) {
damage = Math.round((calculateDamage(attacker, target, secondSlot) / 3));
applyDamage(attacker, target, damage, secondSlot);
if (target === State.variables.character[1]) {
updatePlayerDetails();
updateEnemyDetails(attacker);
} else {
updateEnemyDetails(target);
updatePlayerDetails();
}
} else {
if (State.variables.language ==="EN") {
addToBattleLog(`What a shame... ${attacker.Name} missed ${target.Name}.`);
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`Mas que pena... ${attacker.Name_pt} errou ${target.Name_pt}.`);
}
}
}
if (attacker === State.variables.character[1]) {
updateEnemyDetails(target);
updatePlayerDetails();
} else {
updateEnemyDetails(attacker);
updatePlayerDetails();
shakeScreen()
}
if (secondSlot.Type.includes("Enchanted") && secondSlot.echantment === "Dancing") {
const randomEnemyIndex = Math.floor(Math.random() * State.variables.enemyInstances.length);
const randomEnemy =
State.variables.enemyInstances[randomEnemyIndex];
let dancingHits = calculateHitChance(attacker, randomEnemy);
if (dancingHits) {
let dancingDamage = Math.round((calculateDamage(attacker, randomEnemy, secondSlot) / 2))
applyDamage(attacker, target, dancingDamage)
updateEnemyDetails(target);
updatePlayerDetails(character);
} else {
if (State.variables.language ==="EN") {
addToBattleLog(`${attacker.Name}'s ${secondSlot.Name} tried to strike ${randomEnemy.Name}, but it missed.`);
} else if (State.variables.language ==="PT-BR") {addToBattleLog(`A ${secondSlot.Name_pt} de ${attacker.Name_pt} tentou atacar ${randomEnemy.Name_pt}, mas errou.`);
}
}
}
}
function applyDamage(attacker, target, damage, slot) {
const shadowSlaveIndex = State.variables.allyInstances.findIndex(ally => ally.traits.includes("Pact Creature"));
if (attacker.traits.includes("Hit-and-Run")) {
if (attacker.statusEffects.trap && attacker.statusEffects.trap.isArray) {
if (target.statusEffects.trap.trap1.up === false) {
target.statusEffects.trap.trap1.up = true
} else if (target.statusEffects.trap.trap2.up === false) {
target.statusEffects.trap.trap2.up = true
} else if (target.statusEffects.trap.trap3.up === false) {
target.statusEffects.trap.trap3.up = true
}
addToBattleLog(`${attacker.Name} lays back a trap.`)
}
}
if (target.traits.includes("Battle-Medic")) {
target.statusEffects.regeneration += 2
}
if (attacker.statusEffects.hym && attacker.statusEffects.hym.active && attacker.statusEffects.hym.name === "Dragon's Hym") {
target.statusEffects.burn.duration += 2;
}
//assassin
if (attacker.statusEffects.applyVenom && attacker.statusEffects.applyVenom === true) {
if (attacker.statusEffects.improvedAttacks === 0) {
attacker.statusEffects.applyVenom = false;
} else {
target.statusEffects.poison += 5; // Apply Poison (5) status to the target
}
if (State.variables.language ==="EN") {
addToBattleLog(`${attacker.Name} applied a potent Poison to ${target.Name}.`);
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`${attacker.Name_pt} aplicou um potente Veneno a ${target.Name_pt}.`);
}
}
//Spellblade
if (attacker.statusEffects.improvedAttacks > 0) {
if (attacker.statusEffects.spellblade && attacker.statusEffects.spellblade === true) {
if (attacker.statusEffects.improvedAttacks === 0) {
attacker.statusEffects.spellblade = false
} else {
damage += Math.round((attacker.INT / 2))
}
}
//Paladin
if (attacker.traits.includes("Embezoned Armaments")) {
damage += rollDice('1d6')
if (target.Ancestry === "Daemon" || target.Ancestry === "Vampyr" || target.Ancestry === "Undead") {
damage += rollDice('1d6')
}
}
if (attacker.statusEffects.blessedStrikes && attacker.statusEffects.blessedStrikes === true) {
damage += rollDice('1d4');
attacker.currentLife += rollDice('1d6');
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
if (attacker.statusEffects.improvedAttacks === 0) {
attacker.statusEffects.blessedStrikes = false
}
}
//Cleric
if (attacker.statusEffects.HornedBless) {
if (attacker.statusEffects.HornedBless === true && attacker.statusEffects.improvedAttacks === 0) {
attacker.statusEffects.HornedBless = false
} else {
let effect = rollDice('1d6');
switch (effect) {
case 1: target.statusEffects.poison += 3;
break;
case 2: target.statusEffects.bleed += 3;
break;
case 3: target.statusEffects.stun += 1;
break;
case 4: target.statusEffects.hindered += 1;
break;
case 5: target.statusEffects.confusion += 2;
break;
case 6: target.statusEffects.burn += 3;
break;
default:
target.statusEffects.blind = true;
}
}
}
//Shaman
if (attacker.statusEffects.molten && attacker.statusEffects.molten === true) {
if (attacker.statusEffects.improvedAttacks === 0) {
attacker.statusEffects.molten = false
} else {
if (target.statusEffects.burn.duration > 0) {
target.statusEffects.burn.stacks += 4
} else {
target.statusEffects.burn.stacks += rollDice('1d4')
}
target.statusEffects.burn.duration += 2
}
}
//Wraith
if (target.statusEffects.WraithCurse) {
damage += rollDice(target.statusEffects.WraithCurse +'d4')
}
//vampyr
if (attacker.statusEffects.thirstbuff) {
if (attacker.statusEffects.improvedAttacks === 0) {
attacker.statusEffects.thirstbuff = false
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} controls themselves`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} controla a si mesmo.`)
}
} else {
damage += rollDice('1d4')
if (attacker.equipment.mainhand.includes("bornwith")) {
damage += rollDice('1d4')
}
attacker.currentLife += Math.round((damage * 0.3))
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
}
attacker.statusEffects.improvedAttack--
}
if (slot.Type.includes("shield") && attacker.traits.includes("Shielded Assault")) {
damage += slot.Defense
}
if (attacker.statusEffects.infuseWeapon && attacker.statusEffects.infuseWeapon.active) {
damage += rollDice(attacker.statusEffects.infuseWeapon.damageDice);
}
if (attacker.traits.includes("Divine Blessings II")) {
let holy = Math.floor((attacker.statusEffects.Piety / 6))
if (attacker.traits.includes("Divine Blessings III")) {
holy = Math.floor((attacker.statusEffects.Piety / 6)) * Math.floor((attacker.statusEffects.Piety / 12))
}
damage += holy
}
if (attacker.traits.includes("venomous")) {
target.statusEffects.poison+=3;
}
if (target.traits.includes("poisonous")) {
attacker.statusEffects.poison+=3;
}
if (attacker.traits.includes("Weapon Mastery")) {
if (slot.type.includes("Blunt")) {
target.statusEffects.confusion += 1;
} else if (slot.type.includes("Slashing")) {
target.statusEffects.bleed += 2;
} else if (slot.type.includes("Piercing")) {
target.additionalDefense -= 5;
}
}
if (attacker.traits.includes("Hoarder")) {
damage += Math.round((attacker.Gold / 3))
}
if (attacker.statusEffects.warSongDuration > 0) {
const bonusDamage = Math.round(attacker.CHA * 0.25);
damage += bonusDamage;
attacker.statusEffects.warSongDuration--;
}
if (attacker.statusEffects.crescendoDuration > 0) {
const bonusMultiplier = 0.05 * attacker.statusEffects.crescendoBonus;
damage += Math.round(damage * bonusMultiplier);
attacker.statusEffects.crescendoDuration--;
if (attacker.statusEffects.crescendoBonus < 13) {
attacker.statusEffects.crescendoBonus++;
}
}
// Ensure target's currentLife is a valid number
if (isNaN(target.currentLife)) {
if (damage <= 0) {
damage = 1;
if (State.variables.language === "EN") {
addToBattleLog(`A terrible hit!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Um golpe horroso!`);
}
}
// If currentLife is NaN, set it to target's MAXLIFE
target.currentLife = target.MAXLIFE;
// Use damageSuffered as a backup value for tracking total damage
if (!target.damageSuffered) {
target.damageSuffered = 0;
}
target.currentLife -= target.damageSuffered;
}
if (attacker.traits.includes("Lethality") && target.currentLife >= target.MAXLIFE) {
damage += rollDice('1d10');
} else if (attacker.traits.includes("Lethality II") && target.currentLife >= target.MAXLIFE) {
let value = rollDice('1d10');
damage += value;
target.statusEffects.poison += value;
}
if (slot.Type.includes("ranged") && attacker.traits.includes("Headshot")) {
let headshot = Math.floor(Math.random() * 100) + 1;
if (headshot <= 20 && !target.traits.includes("Boss")) {
target.currentLife = 0;
if (State.variables.language === "EN") {
addToBattleLog(`As the arrow is set loose... a body falls.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Quando a flecha é lançada... um corpo cai.`);
}
}
}
if (attacker.traits.includes("Brand the Heretic")) {
target.statusEffects.burn.duration += 1;
if (attacker.traits.includes("Blessed Flames")) {
target.statusEffects.burn.damage = 6 + Math.round((attacker.PER / 3));
}
if (attacker.traits.includes("Fiery Cleasing")) {
target.statusEffects.burn.stacks += 2;
}
if (attacker.traits.includes("Brazen Inquiry")) {
attacker.statusEffects.Piety += 2
}
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} burns ${target.Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} queima ${target.Name_pt}.`)
}
}
if (attacker.traits.includes("Champion's Might")) {
damage += Math.round((attacker.RES /2));
}
if (attacker.traits.includes("Bloodthirst")){
damage += Math.round((0.1 * target.currentLife));
}
if (attacker.traits.includes("Blood Frenzy")) {
attacker.currentLife += Math.round((damage * 0.125))
}
if (attacker.traits.includes("Zealous Fevor")) {
damage += Math.round(attacker.PER / 3);
}
if (target.traits.includes("Though Skin") && target.currentLife <= Math.round(target.MAXLIFE / 2)) {
if (target.level < 5){
damage -= 3;
} else if (target.level >= 5 && target.level < 10) {
damage -= 5;
} else if (target.level >= 10 && target.level < 15) {
damage -= 7;
} else {
damage -= 9;
}
if (State.variables.language === "EN") {
addToBattleLog(`You shrug off part of the damage.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`você ignora parte do dano.`);
}
}
let totalDefense = calculateCombinedDefense(target)
if (attacker.traits.includes("Body Slam") && damage < totalDefense) {
damage = totalDefense;
if (State.variables.language === "EN") {
addToBattleLog(`Colossal size has its merits.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Tamanho colossal têm seus méritos.`)
}
}
if (attacker.traits.includes("Apex Hunter") && crit === true) {
damage += Math.round((attacker.PER / 3))
if (slot === "Draconian Claw" || slot === "Other Draconian claw") {
target.statusEffects.bleed += 3;
}
}
if (slot.Type.includes("holy") && (target.traits.includes("Vampyr") || target.traits.includes("Daemon") || target.traits.includes("Undead"))) {
damage *= 1.5
}
if (attacker.traits.includes("Vampyr") || attacker.traits.includes("Daemon") || attacker.traits.includes("Undead")) {
target.equipment.forEach(slot => {
if (slot.includes("holy")) {
damage -= Math.round((damage * 0.07));
}
})
}
if (slot.Type.includes("holy")) {
target.equipment.forEach(slot => {
if (slot.includes("unholy")) {
damage += Math.round((damage * 0.07))
}
})
}
if (slot.Type.includes("unholy") && (target.traits.includes("Vampyr") || target.traits.includes("Daemon") || target.traits.includes("Undead"))) {
damage = Math.round((damage / 2))
}
if (target.traits.includes("Champion of Justice")) {
damage -= Math.round((damage * 0.05))
} else if (target.traits.includes("Champion of Liberty")) {
} else if (target.traits.includes("Champion of Selfishness")) {
if (target.skills.Smite.inCooldown === 0) {
window.useSkill(target, "Smite", attacker)
}
}
if (target.traits.includes("Sacred Cause") && damage > 25) {
let holydefense = Math.round((target.statusEffects.Piety / 6))
if (target.traits.includes("Divine Blessings III")) {
holydefense = Math.round((target.statusEffects.Piety / 6)) * Math.round((target.statusEffects.Piety / 12))
}
damage -= 5 + holydefense;
}
if (attacker.traits.includes("Primal Fury") && damage > 20) {
target.statusEffects.confusion = true
}
if (target.equipment.offhand.Type.includes("shield") && target.equipment.offhand.enchantment === "Reflective") {
attacker.currentLife -= Math.round((damage * 0.1));
}
if (target.statusEffects.stonebody && target.statusEffects.stonebody === true) {
damage = 1
}
if (attacker.traits.includes("Penitent Strike")) {
let penitentdamage = Math.round((damage * 0.5))
attacker.currentLife -= penitentdamage
damage += penitentdamage
if (attacker.statusEffects.bleed > 0 || target.statusEffects.bleed) {
attacker.currentLife += Math.round((attackerMAXLIFE * 0.06))
}
}
if (target.traits.includes("Bloody Embrace")) {
let reduceddamage = ((damage * 0.5))
damage -= reduceddamage
let bleedingAmount = Math.floor(reduceddamage / 6);
target.statusEffects.bleed += bleedingAmount
target.statusEffects.piety++
}
if (target.traits.includes("Zealous Reckoning")) {
let value = 30 + (Math.round((target.statusEffects.piety / 12)) * target.statusEffects.piety);
let reflectedDamage = Math.round(damage * (value / 100));
attacker.currentLife -= reflectedDamage;
}
if (target.traits.includes("Hardy")) {
damage = Math.round((damage * 0.85))
}
if (attacker.statusEffects.improvedAttacks > 0 && attacker.statusEffects.markingAttack && attacker.statusEffects.markingAttack === true) {
attacker.statusEffects.markingAttack = false;
attacker.statusEffects.improvedAttacks--
target.statusEffects.marked = true;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} Marks ${target.Name_pt}, the next strike against them will be a Hit and a Critical.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} Marca ${target.Name_pt}, o próximo ataque contra ele será um Acerto e um Crítico.`);
}
}
// Apply damage
if (shadowSlaveIndex !== -1 && target === State.variables.character[1]) {
State.variables.allyInstances[shadowSlaveIndex].currentLife -= damage;
if (State.variables.language === "EN") {
addToBattleLog(`Your daemon served you as a meat shield, denying ${damage} damage to be inflicted upon you.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Seu demônio lhe serviu como um escudo de carne, negando ${damage} de dano a ser infligido a você`)
}
} else if (slot.Type.includes("AOE") && attacker === State.variables.character[1]) {
target.currentLife -= damage
State.variables.enemyInstances.forEach(enemy => {
if (enemy !== target) {
enemy.currentLife -= Math.round((damage / 2));
}
})
} else {
target.currentLife -= damage;
}
if (target.statusEffects.Uldrumbless && !target.statusEffects.Uldrumblessed && target.currentLife <= 0) {
target.currentLife = 1;
target.additionalDefense += 15
target.statusEffects.Uldrumblessed = true
}
if (target.currentLife <= 0 && target.statusEffects.bloodsurge) {
target.currentLife = target.MAXLIFE
target.statusEffects.bloodsurge = false;
}
if (target.currentLife <= 0 && target.level !== undefined) {
addToBattleLog(`${target.Name} has been reaped.`)
}
// Update individualistic damageSuffered for the target
if (!target.damageSuffered) {
target.damageSuffered = 0;
}
target.damageSuffered += damage;
if (attacker.traits.includes("Spare Arrows")) {
if (target.currentLife <= 0 && attacker.equipment.mainhand.inCooldown > 0) {
attacker.equipment.mainhand.inCooldown -= 1
}
}
if (attacker.pact && attacker.pact === "Soul" && target.currentLife <= 0) {
attacker.additionalDamage += 1;
attacker.additionalDefense += 1;
}
if (attacker.traits.includes("Into the Shadows") && target.currentLife <= 0) {
attacker.statusEffects.Hidden = true;
if (State.variables.language === "EN") {
addToBattleLog(`${target.Name} has took advantage of the moment and entered the shadows.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${target.Name_pt} se aproveitou do momento e andentrou as sombras.`);
}
}
if (attacker.traits.includes("Eternal Hunger") && target.currentLife <= 0) {
attacker.currentMana += 3 + target.level;
if (attacker.currentMana >= attacker.MAXMANA) {
attacker.currentMana = attacker.MAXMANA;
}
updatePlayerDetails();
}
if (target.traits.includes("Unyielding") && target.currentLife <= 0 && !target.statusEffects.Unyielding) {
window.triggerAttack(target, attacker, target.equipment.mainhand);
target.statusEffects.Unyielding = true;
}
if (
attacker.traits.includes("Unyielding") &&
target.currentLife <= 0 &&
attacker.statusEffects.Unyielding &&
!attacker.statusEffects.Unyieldinghappened
) {
const MissingLife = attacker.MAXLIFE - attacker.currentLife;
attacker.currentLife += Math.round(0.15 * MissingLife);
attacker.statusEffects.Unyieldinghappened = true
}
if (target.traits.includes("Second Wind") && target.currentlife <= Math.round((0.25 * target.MAXLIFE))) {
target.currentLife += Math.round((0.25 * (target.MAXLIFE - target.currentLife)));
}
if (target === State.variables.character[1] && target.traits.includes("Arcane Core")) {
if (target.currentLife <= Math.round(target.MAXLIFE * 0.1) && target.currentMana > 0) {
// Damage each enemy in enemyInstances by target.currentMana and set target's currentMana to 0
for (let enemy of State.variables.enemyInstances) {
enemy.currentLife -= target.currentMana;
if (enemy.currentLife < 0) {
enemy.currentLife = 0;
}
}
if (State.variables.language ==="EN") {
addToBattleLog(`${target.Name}'s core destabilizes and thus, an explosion engulfs all nearby, damaging them by ${target.currentMana}.`)
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`O núcleo de ${target.Name_pt} destabiliza e uma explosão consome a todos próximo, os danificando por ${target.currentMana}`)
}
target.currentMana = 0;
}
} else if (target !== State.variables.character[1] && target.traits.includes("Arcane Core") && target.currentLife <= 0) {
// Reduce attacker's currentLife by half of target's currentMana and set target's currentMana to 0
attacker.currentLife -= Math.round(target.currentMana * 0.5);
if (State.variabkes.language === "EN") {
addToBattleLog(`${target.Name}'s core destabilizes and thus, an explosion engulfs all nearby, damaging them by ${target.currentMana}.`)
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`O núcleo de ${target.Name_pt} destabiliza e uma explosão consome a todos próximo, os danificando por ${target.currentMana * 0.5}`)
}
target.currentMana = 0;
}
if (attacker.traits.includes("Bon Mot") && target.currentLife < 0) {
let attackermissingLife = attacker.MAXLIFE - attacker.currentLife
attacker.currentLife += Math.round((attackermissingLife * 0.1))
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
// Ensure currentLife doesn't go below 0
if (target.currentLife < 0) {
target.currentLife = 0;
}
// Log attack result
const attackType = slot.Type.includes('blunt')
? 'maiming'
: slot.Type.includes("firearmr")
? 'shooting'
: slot.Type.includes('piercing')
? 'penetrating'
: slot.Type.includes('slashing')
? 'cutting'
: slot.Type.includes('unique') && slot.Name === "Flamethrower"
? 'burning'
: '';
addToBattleLog(`${attacker.Name} hit ${target.Name}, ${attackType} them for ${damage} damage!`);
window.disableDeadEnemies()
}
window.useSkill = function(attacker, skill, target) {
let enemyInstances = State.variables.enemyInstances;
let heavyArmorCount = 0;
if (skill.categories.includes("Spell") && !attacker.traits.includes("Eldritch Knight")) {
for (let slot in attacker.equipment) {
if (attacker.equipment[slot].Type.includes("Heavy Armor")) {
heavyArmorCount++;
}
}
}
let skillcost = skill.Manacost + heavyArmorCount
let bloodcost = (skill.Manacost * 2) + heavyArmorCount
// Check if the skill is usable (not on cooldown and enough AP)
if (attacker !== State.variables.character[1] && attacker.statusEffects.hindered > 0) {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} is <b>Hindered</b>, thus cannot use Skills.`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} está <b>Impedido</b>, não podendo usar Habildades.}`);
}
} else {
// Execute the skill's onUse function
if (skill.inCooldown > 0) {
if (State.variables.language === "EN") {
addToBattleLog(`${skill.name} is on cooldown for ${skill.inCooldown}
turns!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${skill.name_pt} está em recarga por ${skill.inCooldown} turnos.}`);
}
} else {
if (attacker.AP < skill.APCost) {
if (State.variables.language === "EN") {
addToBattleLog(`Not enough Action Points to use ${skill.name}!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`Sem Pontos de Ação suficientes para usar ${skill.name_pt}.`);
}
} else {
if (attacker.currentMana < skillcost || (attacker.Pact && attacker.Pact === "Blood" && attacer.currentLife < bloodcost)) {
if (attacker.Pact && attacker.Pact === "Blood") {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} does not enough Lifeblood to use ${skill.name}!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} não tem Força Vital suficiente para usar ${skill.name_pt}.`);
}
} else {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} does not enough Essence to use ${skill.name}!`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name} não tem Essência suficiente para usar ${skill.name_pt}.`);
}
}
} else {
if (skill.onUse) {
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} used ${skill.name}`);
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} usou ${skill.name_pt}`);
}
skill.onUse(attacker, target); // Pass attacker and target to the onUse function
if (skill.categories.includes("Spell") && !State.variables.character[1].statusEffects.castASpellthisTurn){
State.variables.character[1].statusEffects.castASpellthisTurn = true;
let randomIndex = Math.floor(Math.random() * enemyInstances.length);
let randomTarget = enemyInstances[randomIndex];
const weapon = State.variables.character[1].equipment.mainhand;
if (State.variables.character[1].traits.includes("Tempo I")) {
// Perform an attack against the selected target
triggerAttack(attacker, randomTarget, weapon);
} else if (State.variables.character[1].traits.includes("Tempo II")) {
triggerAttack(attacker, randomTarget, weapon);
if (skill.categories.includes("Ballad")) {
State.variables.character[1].statusEffects.castASpellthisTurn = false;
}
}
}
skill.inCooldown = skill.cooldown;
if (skill.categories.includes("Spell") && attacker.equipment.mainhand.Name ==="Arcane Blade") {
attacker.statusEffects.improvedAttacks++
attacker.statusEffects.spellblade = true
}
if (skill.categories.includes("Spell") && target.traits.includes("Mage Slayer")) {
let extraAttack = calculateHitChance(attacker, target, attacker.equipment.mainhand);
if (extraAttack) {
let damageblade = calculateDamage(attacker, target, attacker.equipment.mainhand);
applyDamage(attacker, target, damageblade, attacker.equipment.mainhand)
}
}
if (skill.categories.includes("Ballad") && (attacker.equipment.offhand.Type.includes("instrument") || attacker.equipment.mainhand.Type.includes("instrument"))) {
attacker.currentLife += Math.round((attacker.Arts / 5));
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
if (attacker.traits.includes("Mystical Arsenal") && skill.categories.includes("Arcane")) {
attacker.statusEffects.arcanebonus += 5;
attacker.additionalDamage += 5;
}
if (attacker.traits.includes("Tactical Genius") && skill.APCost >= 3) {
attacker.AP -= (skill.APCost - 1);
} else {
attacker.AP -= skill.APCost;
}
if (attacker.traits.includes("Totem Carver") && skill.categories.includes("Elemental")) {
attacker.statusEffects.castElement = true;
}
if (attacker.statusEffects.burn.duration > 0 && attacker !== State.variables.character[1]) {
let holy = 0
if (attacker !== State.variables.character[1]) {
if (State.variables.character[1].traits.includes("Blessed Flames")) {
holy = Math.floor((State.variables.character[1].statusEffects.Piety / 6))
}
if (State.variables.character[1].traits.includes("Fervous Zeal")) {
let heal = 4 * attacker.statusEffects.burn.stacks
State.variables.character[1].currentLife += heal
State.variables.character[1].statusEffects.Piety += 1
}
}
const burndamage = (attacker.statusEffects.burn.damage + holy) * attacker.statusEffects.burn.stacks;
attacker.currentLife -= burndamage;
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} burns, suffering ${burndamage} damage.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} queima, sofrendo ${burndamage} de dano.`)
}
attacker.statusEffects.burn.duration--; // Decrease burning duration
}
checkPlayerAP();
let slot = ["head", "torso", "waist", "legs", "feet"]
if (skill.categories.includes("Spell") && target.equipment[slot].Type.includes("Enchanted")) {
if (target.equipment[slot].Enchantment === "Reaver") {
target.currentMana += Math.round((skill.Manacost / 3))
if (target.currentMana > target.MAXMANA) {
target.currentMana = target.MAXMANA
}
}
}
if (skill.categories.includes("Spell") && attacker === State.variables.character[1]) {
State.variables.enemyInstances.forEach(enemy =>{
if (enemy.Name === "Minor Daemon") {
enemy.additionalDamage += 5;
if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} is enpowered by your spell, gaining +5 to it's Damage.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} é empoderado por sua magia, ganhando +5 para seu Dano.`)
}
} else if (enemy.Name === "Greater Daemon") {
enemy.additionalDamage += skill.Manacost + heavyArmorCount;
if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} is enpowered by your spell, gaining +${skill.Manacost + heavyArmorCount} to it's Damage.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} é empoderado por sua magia, ganhando +${skill.Manacost + heavyArmorCount} para seu Dano.`)
}
}
})
}
if (skill.categories.includes("Holy") && attacker.traits.includes("Divine Blessings I")) {
let pious = 2;
if (attacker.traits.includes("Pious Devotion")) {
pious += 2
}
attacker.statusEffects.piety += pious;
} else if (!skill.categories.includes("Holy") && attacker.traits.includes("Divine Blessings I")) {
if (State.variables.character[1].traits.includes("Oathkeeper")) {
if (attacker.Oath === "Selfishness") {
attacker.statusEffects.piety = State.variables.alignment.evilChaos;
} else if (attacker.Oath === "Conquest") {
attacker.statusEffects.piety = State.variables.alignment.evilOrder;
} else if (attacker.Oath === "Justice") {
attacker.statusEffects.piety = State.variables.alignment.goodOrder;
} else if (attacker.Oath === "Liberty") {
attacker.statusEffects.piety = State.variables.alignment.goodChaos;
}
} else {
attacker.statusEffects.piety = 0
}
}
if (skill.categories.includes('Summon')){
let i = State.variables.allyInstances.length - 1
let summon = State.variables.allyInstances[i];
if (attacker.traits.includes("Improved Summons")) {
summon.currentLife += Math.round((attacker.INT / 2));
summon.MAXLIFE += Math.round((attacker.INT / 2));
summon.INT += 3;
summon.DEX += 3;
summon.PER += 3;
summon.STR += 3;
summon.CHA += 3;
summon.RES += 3;
} else if (attacker.traits.includes("Masterful Summons")) {
summon.currentLife += attacker.INT;
summon.MAXLIFE += attacker.INT;
summon.INT += 6;
summon.DEX += 6;
summon.PER += 6;
summon.STR += 6;
summon.CHA += 6;
summon.RES += 6;
}
if (attacker.traits.includes("Master Summoner")) {
if (!summon.storedMana) {
summon.storedMana = 0;
}
summon.storedMana += skill.Manacost;
// Modify the skill's Manacost property for future uses
skill.Manacost = Math.round(skill.Manacost / 2);
}
if (attacker.traits.includes("Bonded Existence")) {
attacker.additionalDamage += 3;
attacker.statusEffects.bondedExistencebonus += 3;
if (State.variables.allyInstances.length > 0) {
for (let i = State.variables.allyInstances.length - 1; i >= 0; i--) {
const summonedCreature = State.variables.allyInstances[i];
const lostEssence = attacker.MAXMANA - attacker.currentMana;
attacker.currentMana += Math.round(lostEssence * 0.07);
}
}
}
}
}
if (attacker.traits.includes("Masterful Dark Magic")) {
attacker.currentLife -= 3
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= Math.round((attacker.RES / 3))
})
} else if (attacker.traits.includes("Masterful Hemomancy")) {
State.variables.enemyInstances.forEach(enemy => {
if (enemy.statusEffects.bleeding > 0) {
attacker.currentLife += 3
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
enemy.statusEffects.bleeding += 3;
})
} else if (attacker.traits.includes("Masterful Necromancy")) {
State.variables.allyInstances.push(State.variables.summons[1])
}
if (skill.categories.includes('Offensive')) {
let randomTarget = enemyInstances[Math.floor(Math.random() * enemyInstances.length)]
if (attacker.traits.includes("Follow-up") && !attacker.equipment.offhand.Type.includes("Ranged") && !attacker.equipment.offhand.Type.includes("light") || attacker.equipment.offhand.inCooldown > 0) {
let Dnumber = 1;
let Dsides = 4;
if (attacker.traits.includes("Barbed Points")) {
Dnumber += 1;
}
if (attacker.traits.includes("Dragon Piercing Arrows")) {
Dsides += 2;
}
randomTarget.currentLife -= rollDice(`${Dnumber}d${Dsides}`);
if (target.currentLife < 0) {
target.currentLife = 0;
}
} else if (attacker.traits.includes("Follow-up") && attacker.equipment.offhand.Type.includes("Ranged") && attacker.equipment.offhand.Type.includes("light") && attacker.equipment.offhand.inCooldown === 0) {
extraAttack(attacker, randomTarget)
}
if (attacker.traits.includes("Intellect Empowerment") && skill.categories.includes("Spell")) {
target.currentLife -= Math.round((attacker.INT / 2));
if (State.variables.language === "EN") {
addToBattleLog(`${attacker.Name} empowers their ${skill.name} Spell, dealing ${Math.round((attacker.INT / 2))} as extra damage against ${target.Name}.`)
} else if (State.variables.language === "PT-BR") {
addToBattleLog(`${attacker.Name_pt} empodera a magia ${skill.name_pt}, causando ${Math.round((attacker.INT / 2))} como dano extra contra ${target.Name_pt}`)
}
}
if (target === State.variables.character[1] && target.traits.includes("Arcane Core")) {
if (target.currentLife <= Math.round(target.MAXLIFE * 0.1) && target.currentMana > 0) {
// Damage each enemy in enemyInstances by target.currentMana and set target's currentMana to 0
for (let enemy of State.variables.enemyInstances) {
enemy.currentLife -= target.currentMana;
if (enemy.currentLife < 0) {
enemy.currentLife = 0;
}
}
if (State.variables.language ==="EN") {
addToBattleLog(`${target.Name}'s core destabilizes and thus, an explosion engulfs all nearby, damaging them by ${target.currentMana}.`)
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`O núcleo de ${target.Name_pt} destabiliza e uma explosão consome a todos próximo, os danificando por ${target.currentMana}`)
}
target.currentMana = 0;
}
} else if (target !== State.variables.character[1] && target.traits.includes("Arcane Core") && target.currentLife <= 0) {
// Reduce attacker's currentLife by half of target's currentMana and set target's currentMana to 0
attacker.currentLife -= Math.round(target.currentMana * 0.5);
if (State.variabkes.language === "EN") {
addToBattleLog(`${target.Name}'s core destabilizes and thus, an explosion engulfs all nearby, damaging them by ${target.currentMana}.`)
} else if (State.variables.language ==="PT-BR") {
addToBattleLog(`O núcleo de ${target.Name_pt} destabiliza e uma explosão consome a todos próximo, os danificando por ${target.currentMana * 0.5}`)
}
target.currentMana = 0;
}
if (target.currentLife <= 0 && target.level !== undefined) {
addToBattleLog(`${target.Name} has been reaped.`)
}
if (attacker.traits.includes("Spare Arrows")) {
if (target.currentLife <= 0 && attacker.equipment.mainhand.inCooldown > 0) {
attacker.equipment.mainhand.inCooldown -= 1
}
}
if (attacker.traits.includes("Eternal Hunger")) {
if (target.currentLife <= 0) {
attacker.currentMana += 3 + target.level
if (attacker.currentMana >= attacker.MAXMANA) {
attacker.currentMana = attacker.MAXMANA;
}updatePlayerDetails(character);
}
}
}
if (attacker.Pact && attacker.Pact === "Blood") {
attacker.currentLife -= bloodcost;
} else {
attacker.currentMana -= skillcost;
}
if (attacker.traits.includes("Essence Renewal")) {
attacker.currentLife += skill.Manacost;
if (attacker.currentLife > attacker.MAXLIFE) {
attacker.currentLife = attacker.MAXLIFE
}
}
updatePlayerDetails();
enemyInstances.forEach(foes => {
updateEnemyDetails(foes);
})
window.disableDeadEnemies()
// Clear attack buttons (assuming you want to clear them after using a skill)
const targetsGrid = document.getElementById('attack-buttons');
targetsGrid.innerHTML = '';
const attackButtonsContainer = document.getElementById('attack-buttons');
attackButtonsContainer.innerHTML = '';
attackButtonsContainer.style.display = 'none';
return;
}
}
}
}
}
window.battleStart = function () {
State.variables.remember = State.variables.character[1];
if (State.variables.language === "PT-BR") {
State.variables.character[1].Name_pt = State.variables.character[1].Name;
}
if (State.variables.character[1].traits.includes("Trappersmith")) {
const possibletraps = ["Decoy", "Explosive", "Smoking", "Stinky", "Stunning", "Caltrops"];
let trap1Index = Math.floor(Math.random() * possibletraps.length);
let trap1 = possibletraps.splice(trap1Index, 1)[0];
let trap2Index = Math.floor(Math.random() * possibletraps.length);
let trap2 = possibletraps.splice(trap2Index, 1)[0];
let trap3Index = Math.floor(Math.random() * possibletraps.length);
let trap3 = possibletraps.splice(trap3Index, 1)[0];
State.variables.character[1].statusEffects.traps = {
hastriggered: false,
trap1: {
type: trap1,
up: true
},
trap2: {
type: trap2,
up: true
},
trap3: {
type: trap3,
up: true
}
};
}
if (State.variables.character[1].traits.includes("Sneaky")) {
State.variables.character[1].statusEffects.hidden = true;
}
if (State.variables.character[1].traits.includes("Oathkeeper")) {
if (State.variables.character[1].Oath === "Selfishness") {
State.variables.character[1].statusEffects.Piety += State.variables.alignment.evilChaos;
} else if (State.variables.character[1].Oath === "Conquest") {
State.variables.character[1].statusEffects.Piety += State.variables.alignment.evilOrder;
} else if (State.variables.character[1].Oath === "Justice") {
State.variables.character[1].statusEffects.Piety += State.variables.alignment.goodOrder;
} else if (State.variables.character[1].Oath === "Liberty") {
State.variables.character[1].statusEffects.Piety += State.variables.alignment.goodChaos;
}
}
if (State.variables.whosturn === "ambush") {
window.startEnemyTurn();
} else {
window.startCharacterTurn();
}
if (State.variables.character[1].traits.includes("Holy Ardor")) {
State.variables.character[1].statusEffects.Piety += 20;
}
updatePlayerDetails();
};
window.checkGameOver= function () {
if (State.variables.character[1].currentLife <= 0) {
State.variables.character[1].currentLife = 0;
// If the player's currentLife is 0 or below, trigger the game over scene
document.getElementById('end-turn-button').style.display = 'none'; // Hide the "End Turn" button
document.getElementById('game-over-button').style.display = 'block'; // Show the "Game Over" button
document.getElementById('victory-button').style.display = 'none'; // Hide the "Victory" button
} else if (State.variables.enemyInstances.length === 0) {
if (State.variables.character[1].damageSuffered > 0) {
State.variables.character[1].damageSuffered = 0;
}
if (State.variables.language === "PT-BR") {
addToBattleLog(`Sucesso! Sozinho na vitória`);
} else if (State.variables.language === "EN") {
addToBattleLog(`Success! Alone in victory.`);
}
console.log("All enemies defeated."); // Add this line for debugging
// If there are no more enemy instances, trigger the victory scene
document.getElementById('end-turn-button').style.display = 'none'; // Hide the "End Turn" button
document.getElementById('game-over-button').style.display = 'none'; // Hide the "Game Over" button
document.getElementById('victory-button').style.display = 'block'; // Show the "Victory" button
} else {
// If neither game over nor victory conditions are met, hide both buttons
document.getElementById('end-turn-button').style.display = 'block'; // Show the "End Turn" button
document.getElementById('game-over-button').style.display = 'none'; // Hide the "Game Over" button
document.getElementById('victory-button').style.display = 'none'; // Hide the "Victory" button
}
}
window.disableDeadEnemies = function () {
let enemyInstances = State.variables.enemyInstances;
let graveyard = State.variables.Graveyard
for (let i = enemyInstances.length - 1; i >= 0; i--) {
const enemy = enemyInstances[i];
graveyard.push(enemy)
// Check if the enemy is disabled (currentLife <= 0)
if (enemy.currentLife <= 0) {
let character = State.variales.character[1];
if (State.variables.difficulty === "easy") {
State.variables.character[1].experience += Math.round((State.variables.xpToLevelUp * 0.045) * enemy.level) + window.rollDice(enemy.level +'d6');
} else if (State.variables.difficulty === "normal") {
State.variables.character[1].experience += Math.round((State.variables.xpToLevelUp * 0.03) * enemy.level) + window.rollDice(enemy.level +'d6');
} else {
State.variables.character[1].experience += Math.round((State.variables.xpToLevelUp * 0.015) * enemy.level) + window.rollDice(enemy.level +'d6');
}
if (character.traits.includes("Nimble Fingers")) {
character.Gold +=Math.round((enemy.Gold * 1.15));
} else {
character.Gold += enemy.Gold;
}
const possibleLoot = [];
// Populate possibleLoot with non-bornwith equipment
for (const item of enemy.equipment) {
if (!item.Type.includes("bornwith")) {
possibleLoot.push(item.Name); // Assuming item has a Name property
}
}
let howmany = rollDice('1d3');
for (let i = howmany; i > 0; i--) {
if (possibleLoot.length > 0) {
let lootIndex = Math.floor(Math.random() * possibleLoot.length);
let loot = possibleLoot[lootIndex];
possibleLoot.splice(lootIndex, 1); // Remove the loot from possibleLoot
addItemtoInventory(loot); // Add the loot to the inventory
} else {
// Handle the case where there is no more loot to be taken
break;
}
}
enemyInstances.splice(i, 1);
// Remove the corresponding cell element from the array
const removedCell = enemyCells.splice(i, 1)[0];
// Ensure the cell element exists and has a parent node before removing it
if (removedCell && removedCell.parentNode) {
removedCell.parentNode.removeChild(removedCell);
}
// Update enemy details (you may need to pass the updated enemyInstances to the updateEnemyDetails function)
updateEnemyDetails(enemy);
// Optionally, you can perform other actions like adding to a defeated enemies list
console.log(`${enemy.Name}'s body has been removed from combat.`);
}
}
// After removing defeated enemies, reinitialize the enemy list in the UI
initializeEnemyList();
};
window.startEnemyTurn = function() {
const character = State.variables.character[1];
let enemyInstances = State.variables.enemyInstances
checkGameOver();
if (isPlayerTurn) {
isPlayerTurn = false;
}
window.disableDeadEnemies()
enemyInstances.forEach((enemy, index) => {
if (enemy.broken.includes("torso")) {
enemy.statusEffects.bleed += 1;
}
if (enemy.broken.includes("waist")) {
enemy.statusEffects.bleed += 1;
}
if (enemy.broken.includes("head")) {
enemy.statusEffects.confusion += 1;
}
if (enemy.statusEffects.bonearmor && enemy.statusEffects.bonearmor.duration > 0) {
enemy.statusEffects.bonearmor.duration--
if (enemy.statusEffects.bonearmor.duration == 0) {
enemy.additionalDefense -= enemy.statusEffects.bonearmor.value;
}
}
if (enemy.statusEffects.stance && enemy.statusEffects.stance.active === true) {
if (enemy.currentMana > 3) {
enemy.currentMana -= 3
} else {
enemy.statusEffects.stance.active = false;
}
}
if (enemy.statusEffects.hym && enemy.statusEffects.hym.active === true) {
if (enemy.currentMana > 5) {
enemy.currentMana -= 5
} else {
enemy.statusEffects.stance.active = false;
}
}
if (enemy.statusEffects.recastArc && enemy.statusEffects.recastArc > 0) {
enemy.statusEffects.recastArc = 0
}
if (enemy.statusEffects.EscapeAttempt !== undefined && enemy.statusEffects.EscapeAttempt) {
let escapeChance = Math.floor(Math.random() * 100) + 1;
// Check if the escape attempt is successful (60% chance)
if (escapeChance <= 40) {
enemy.statusEffects.EscapeAttempt = false;
enemy.currentLife = 0;
window.disableDeadEnemies();
// Successful escape: Send the character to their last visited passage
if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} conseguiu com sucesso fugir do combate como um covarde.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} successfully fled from combat like a coward.`);
}
} else {
// Failed escape
enemy.statusEffects.EscapeAttempt = false;
if (State.variables.language === "PT-BR") {
addToBattleLog(`A tentativa de fuga de ${enemy.Name_pt} falhou. Como se elhes pudessem fugir tão facilmente.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} escape attempt failed. As if they could run off so easily.`);
}
}
}
handleCooldowns(enemy);
if (enemy.behavior !== null) {
enemy.behavior();
} else {
enemy.AP += enemy.APregen;
while (enemy.AP > 0) {
const action = Math.floor(Math.random() * 3);
if (action === 0) {
// Use a skill
if (enemy.statusEffects.hindered === 0 && enemy.skills.length > 0) {
// Skip using a skill if confused
let availableSkills = enemy.skills
if (enemy.traits.includes("Coward") && enemy.currentLife < 0.3 * enemy.MAXLIFE) {
const escapeSkill = enemy.skills.find(skill => skill.name === "Escape");
if (escapeSkill && escapeSkill.learned && escapeSkill.inCooldown <= 0) {
escapeSkill.onUse(enemy);
}
} else {
const filteredSkills = availableSkills.filter(skill => skill.name !== "Escape" && skill.inCooldown === 0);
// Check if there are any skills left after filtering
if (filteredSkills.length > 0) {
// Select a random skill from the filteredSkills array
const randomSkill = filteredSkills[Math.floor(Math.random() * filteredSkills.length)];
// Use the selected randomSkill
window.useSkill(enemy, randomSkill, State.variables.character[1])
if (State.variables.character[1].traits.includes("Spell Thief")) {
let stealchance = rollDice('1d100') <= State.variables.character[1].DEX + State.variables.character[1].INT
if (stealchance) {
State.variables.character[1].addSkill(randomSkill.Name);
if (State.variables.language === "PT-BR") {
addToBattleLog(`Mas que patife! ${State.variables.character[1].Name} roubou a Habilidade de ${enemy.Name_pt}`);
} else if (State.variables.language === "EN") {
addToBattleLog(`What a rascal! ${State.variables.character[1].Name} stole ${enemy.Name}'s Skill!`)
}
}
}
}
}
} else {
// Perform a basic attack
if (enemy.equipment.mainhand) {
if (State.variables.character[1].hidden !== true) {
window.triggerAttack(enemy, State.variables.character[1], enemy.equipment.mainhand);
}
} else {
console.log("Enemy has no mainhand weapon!");
}
}
} else if (action === 1) {
if (enemy.statusEffects.stunned > 0) {
// Skip performing a basic attack if stunned
if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} está atordoado, não podendo realizar ataques.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} is stunned and cannot perform attacks.`);
}
} else {
// Perform a basic attack
if (enemy.equipment.mainhand) {
if (State.variables.character[1].hidden !== true) {
window.triggerAttack(enemy, State.variables.character[1], enemy.equipment.mainhand);
}
} else {
console.log("Enemy has no mainhand weapon!");
}
}
} else {
// If action is 2, rest
if (enemy.currentLife < enemy.MAXLIFE) {
enemy.currentLife += Math.round((enemy.MAXLIFE * 0.05));
if (enemy.currentLife > enemy.MAXLIFE) {
enemy.currentLife = enemy.MAXLIFE
}
}
if (enemy.currentMana < enemy.MAXMANA) {
enemy.currentMana += Math.round((enemy.MAXMANA * 0.05));
if (enemy.currentMana > enemy.MAXMANA) {
enemy.currentMana = enemy.MAXMANA
}
}
if (enemy.statusEffects.burn.duration > 0) {
let holy = 0
if (State.variables.character[1].traits.includes("Blessed Flames")) {
holy = Math.floor((State.variables.character[1].statusEffects.Piety / 6))
}
const burndamage = (enemy.statusEffects.burn.damage + holy) * enemy.statusEffects.burn.stacks;
enemy.currentLife -= burndamage;
if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} queima, sofrendo ${burndamage} de dano.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} burns, suffering ${burndamage} damage.`)
}
enemy.statusEffects.burn.duration--; // Decrease burning duration
if (State.variables.character[1].traits.includes("Fervous Zeal")) {
let heal = 4 * enemy.statusEffects.burn.stacks
State.variables.character[1].currentLife += heal
}
}
}
enemy.AP--; // Deduct 1 AP per action
setTimeout(() => {
// Continue with the next iteration or any other logic after the delay
// This code will be executed after 100 milliseconds
}, index * 100);
}
}
if (enemy.riposteActive) {
enemy.riposteActive = false;
}
window.handleEnemystatusEffects(enemy);
if (enemy.statusEffects.disarmedItem) {
enemy.equipment.mainhand = enemy.statusEffects.disarmedItem
if (enemy.equipment.mainhand.Type.includes("2-handed")) {
enemy.equipment.offhand = State.variables.Items.Handler
}
}
});
window.startCharacterTurn();
}
window.handleEnemystatusEffects = function (enemy) {
let character = sState.variables.character[1]
let enemyInstances = State.variables.enemyInstances;
if (enemy.statusEffects.burn.duration > 0) {
enemy.statusEffects.burn.duration = 0
}
if (enemy.statusEffects.burn.stacks > 1) {
enemy.statusEffects.burn.stacks = 1
}
if (enemy.traits.includes("Swarm")) {
if (enemy.currentLife <= Math.round((enemy.MAXLIFE * 0.25))) {
enemy.APregen -3;
} else if (enemy.currentLife <= Math.round((enemy.MAXLIFE * 0.5))) {
tarenemyget.APregen -2;
} else if (enemy.currentLife <= Math.round((enemy.MAXLIFE * 0.75))) {
enemy.APregen -1;
}
}
if (enemy.statusEffects.poisonGas && enemy.statusEffects.poisonGas === true) {
if (enemy.currentMana > 3) {
char.currentMana -3;
character.statusEffects.poison += 3;
State.variables.enenmyInstances.forEach(enemy => { enemy.statusEffects.poison += 3
})
} else {
enemy.statusEffects.poisonGas = false;
}
}
if (enemy.statusEffects.threeFacesCurse && enemy.statusEffects.threeFacesCurse.time > 0) {
enemy.statusEffects.threeFacesCurse.time --
} else if (enemy.statusEffects.threeFacesCurse && enemy.statusEffects.threeFacesCurse.time === 0) {
enemy.additionalHitChance += enemy.statusEffects.threeFacesCurse.value
}
if (enemy.statusEffects.earwormDuration && enemy.statusEffects.earwormDuration > 0) {
enemy.statusEffects.earwormDuration--;
if (enemy.statusEffects.earwormDuration === 0) {
enemy.additionalDamage += enemy.statusEffects.earwormValue[1];
enemy.additionalHitChance += enemy.statusEffects.earwormValue[2];
}
}
if (enemy.statusEffects.freezeDuration && enemy.statusEffects.freezeDuration > 0) {
enemy.statusEffects.freezeDuration--;
if (enemy.statusEffects.freezeDuration === 0) {
enemy.additionalHitChance += 10
enemy.additionalDefense += 10
}
}
if (enemy.traits.includes("Inorganic")) {
enemy.statusEffects.poison = 0;
enemy.statusEffects.bleed = 0;
enemy.statusEffects.regeneration = 0;
enemy.statusEffects.stunned = 0;
enemy.statusEffects.hindered = 0;
}
if (enemy.Ancesty === "Undead") {
enemy.statusEffects.poison = 0;
enemy.statusEffects.bleed = 0;
enemy.statusEffects.regeneration = 0;
}
// Apply poison damage to the enemy and decrease poison duration
if (enemy.statusEffects.poison > 0) {
const poisonDamage = enemy.statusEffects.poison;
if (enemy.traits.includes("Sound Constitution")) {
enemy.currentLife -= Math.round((poisonDamage / 2))
} else {
enemy.currentLife -= poisonDamage;
}
enemy.statusEffects.poison = Math.round((enemy.statusEffects.poison / 2));
if (enemy.statusEffects.poison <= 1) {
enemy.statusEffects.poison = 0
}
if (enemy.currentLife <= 0) {
if (State.variables.language === "PT-BR") {
addToBattleLog(`Pelo o que parece, o sistema imunológico de ${enemy.Name_pt} não foi forte o suficiente para salva-lo das toxinas.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`It seems that ${enemy.Name}'s immunological system was not strong enough to save them from the toxins.`);
}
} else {
if (State.variables.language === "PT-BR") {
addToBattleLog(`O veneno enfraquecceu ${enemy.Name_pt} por ${poisonDamage} de sua Força Vital.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`The poison has weakened ${enemy.Name} for ${poisonDamage} of its lifeblood.`);
}
}
}
if (enemy.statusEffects.bleed > 0) {
// Apply bleed damage to the enemy and decrease bleed duration
const bleedDamage = Math.round(enemy.MAXLIFE * 0.005);
if (enemy.traits.includes("Sound Constitution")) {
enemy.currentLife -= Math.round((bleedDamage / 2))
} else {
enemy.statusEffects.bleed--;
}
if (enemy.currentLife <= 0) {
if (State.variables.language === "PT-BR") {
addToBattleLog(`Ao que parece, ${enemy.Name_pt} sangrou até a morte...`);
} else if (State.variables.language === "EN") {
addToBattleLog(`It seems that ${enemy.Name}'s bled themselves to death...`);
}
} else {
if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} sangrou por ${bleedDamage} de dano.`);
} else if (State.variables.language === "EN") { addToBattleLog(`${enemy.Name} has bled for ${bleedDamage} damage.`); }
}
}
if (enemy.HornedBlessing && enemy.HornedBlessing.active === true) {
enemy.additionalDamage -= enemy.HornedBlessing.value;
enemy.HornedBlessing.active = false;
}
if (enemy.statusEffects.regeneration > 0) {
// Apply regeneration to the enemy and decrease regeneration duration
const regenerationAmount = enemy.statusEffects.regeneration;
enemy.currentLife += regenerationAmount;
enemy.statusEffects.regeneration = Math.max(0, enemy.statusEffects.regeneration - 1);
if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} recuperou ${regenerationAmount} pontos de sua Força Vital.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} has recovered ${regenerationAmount} points of its lifeblood.`);
}
}
// Decrease stunned and confused durations for the enemy
if (enemy.statusEffects.stunned > 0) {
enemy.statusEffects.stunned--;
}
if (enemy.statusEffects.hindered > 0) {
enemy.statusEffects.hindered--;
if (State.variables.language === "PT-BR") {
addToBattleLog(`${enemy.Name_pt} está impedido de utilizar Habilidades.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${enemy.Name} is hindered of using Skills.`);
}
}
if (enemy.traits && enemy.traits.includes('Sneaky')) {
if (enemy.statusEffects.hiddenTrait === 0) {
enemy.statusEffects.hidden = true;
enemy.statusEffects.hiddenTrait = 4;
} else if (enemy.statusEffects.hiddenTrait > 0) {
enemy.statusEffects.hiddenTrait--
} else if (!enemy.statusEffects.hiddenTrait) {
enemy.statusEffects.hiddenTrait = 3
}
}
const isAlone = enemyInstances.length === 1 && enemyInstances[0] === enemy;
if (enemy.traits.includes('follower') && isAlone) {
enemy.AP = Math.round((enemy.APregen / 2));
if (enemy.AP < 1) {
enemy.AP = 1;
}
} else {
enemy.AP = enemy.APregen;
}
updateEnemyDetails(enemy);
}
window.applystatusEffects = function (character) {
if (character.statusEffects.bonearmor && character.statusEffects.bonearmor.duration > 0) {
character.statusEffects.bonearmor.duration--;
if (character.statusEffects.bonearmor.duration == 0) {
character.additionalDefense -= character.statusEffects.bonearmor.value;
}
}
if (character.statusEffects.poison > 0) {
if (character.traits.includes("Divine Atonement")) {
character.statusEffects.piety++
}
character.currentLife -= character.statusEffects.poison;
if (State.variables.language === "PT-BR") {
addToBattleLog(`${character.Name} tomou ${character.statusEffects.poison} de dano do veneno.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${character.Name} took ${character.statusEffects.poison} damage from the poison.`);
}
character.statusEffects.poison = Math.round((character.statusEffects.poison / 2));
if (character.statusEffects.poison < 1) {
character.statusEffects.poison = 0
}
}
const bleedDamage = Math.round(character.MAXLIFE * 0.05);
if (character.statusEffects.bleed > 0) {
if (character.traits.includes("Divine Atonement")) {
character.statusEffects.piety++
}
if (character.traits.includes("Bloody Embrace") && character.currentLife - bleedDamage <= 0) {
chacter.currentLife += bleedDamage;
}
character.currentLife -= bleedDamage;
if (State.variables.language === "PT-BR") {
addToBattleLog(`${character.Name} sangrou por ${Math.round(character.MAXLIFE * 0.05)} de sua Força Vital.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${character.Name} bled for ${Math.round(character.MAXLIFE * 0.05)} of its Lifeblood.`);
}
character.statusEffects.bleed--;
}
if (character.statusEffects.stunned > 0) {
if (character.traits.includes("Divine Atonement")) {
character.statusEffects.piety++
}
character.statusEffects.stunned--;
document.getElementById("generate-button").disabled = true;
if (State.variables.language === "PT-BR") {
addToBattleLog(`${character.Name} está atordoado, não podendo atacar.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${character.Name} is stunned and cannot attack.`);
}
}
if (character.statusEffects.intimidated && character.statusEffects.intimidated.time > 0) {
character.statusEffects.intimidated.time--;
if (character.statusEffects.intimidated.time === 0) {
character.statusEffects.additionalDamage += character.statusEffects.intimidated.value;
character.statusEffects.additionalHitChance += character.statusEffects.intimidated.value;
}
};
if (character.statusEffects.hindered > 0) {
if (character.traits.includes("Divine Atonement")) {
character.statusEffects.piety++
}
character.statusEffects.hindered--;
document.getElementById('generateSkillbox').disabled = true;
if (State.variables.language === "PT-BR") {
addToBattleLog(`${character.Name} está impedido de utilizar habilidades.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${character.Name} is hindered of using Skills.`);
}
}
}
window.startCharacterTurn = function () {
const character = State.variables.character[1];
if (!isPlayerTurn) {
isPlayerTurn = true;
}
if (character.broken.includes("torso")) {
character.statusEffects.bleed += 1;
}
if (character.broken.includes("waist")) {
character.statusEffects.bleed += 1;
}
if (character.broken.includes("head")) {
character.statusEffects.confusion += 1;
}
if (character.statusEffects.stance && character.statusEffects.stance.active === true) {
if (character.currentMana > 3) {
character.currentMana -= 3
} else {
character.statusEffects.stance.active = false;
}
}
if (character.statusEffects.poisonGas && character.statusEffects.poisonGas === true) {
if (character.currentMana > 3) {
char.currentMana -3;
character.statusEffects.poison += 3;
State.variables.enenmyInstances.forEach(enemy => { enemy.statusEffects.poison += 3
})
} else {
character.statusEffects.poisonGas = false;
}
}
if (character.statusEffects.hym && character.statusEffects.hym.active === true) {
if (character.currentMana > 5) {
character.currentMana -= 5
} else {
character.statusEffects.stance.active = false;
}
}
if (character.statusEffects.recastArc && character.statusEffects.recastArc > 0) {
character.statusEffects.recastArc = 0
}
if (character.statusEffects.trap && character.statusEffects.trap.isArray) {
if (target.statusEffects.trap.hastriggered === false) {
target.statusEffects.trap.hastriggered = true
}
}
if (character.statusEffects.galewinds && character.statusEffects.galewinds === true) {
if (character.currentMana > 6) {
character.currentMana -= 6
} else {
if (character.currentMana <= 0) {
character.currentMana = 0
}
character.statusEffects.galewinds = false
addToBattleLog(`${character.Name} does not have enough Essence to keep Gale Winds active.`);
}
}
character.statusEffects.numberofattacks = 0;
if (character.statusEffects.adrenalineRushDuration) {
character.AP += 2;
}
if (character.traits.includes("Embezoned Armaments")) {
character.statusEffects.improvedAttack++
}
if (character.statusEffects.stonebody && character.statusEffects.stonebody === true) {
character.statusEffects.stonebody = false;
}
if (character.traits.includes("Pious Resilience") && character.currentLife <= Math.round((character.MAXLIFE * 0.5))) {
character.statusEffects.piety += 3;
}
if (character.traits.includes("Magic Drainer")) {
State.variables.enemyInstances.forEach(enemy => {
let value1 = Math.round((enemy.currentMana * 0.05));
let value2 = Math.round((enemy.currentLife * 0.05));
enemy.currentLife -= value2
character.currentLife += value2
enemy.currentMana -= value1
character.currentMana += value1
if (character.currentMana > character.MAXMANA) {
character.currentMana = character.MAXMANA
}
if (character.currentLife > character.MAXLIFE) {
character.currentLife = character.MAXLIFE
}
})
}
if (character.statusEffects.bloodArmor && character.statusEffects.bloodArmor.active) {
character.additionalDefense -= character.statusEffects.bloodArmor.defense
character.statusEffects.bloodArmor.active = false
}
if (character.traits.includes("Overflow")) {
character.currentMana += Math.round(character.INT / 3);
if (character.currentMana > character.MAXMANA) {
character.currentMana = character.MAXMANA;
}
} else if (character.traits.includes("Overflow II")) {
character.currentMana += Math.round(character.INT / 2);
if (character.currentMana > character.MAXMANA) {
character.currentMana = character.MAXMANA;
}
} else if (character.traits.includes("Overflow III")) {
character.currentMana += character.INT;
if (character.currentMana > character.MAXMANA) {
character.currentMana = character.MAXMANA;
}
}
if (character.statusEffects.castASpellthisTurn) {
character.statusEffects.castASpellthisTurn = false;
}
window.applystatusEffects(character);
if (character.statusEffects.EscapeAttempt !== undefined && character.statusEffects.EscapeAttempt) {
let escapeChance = Math.floor(Math.random() * 100) + 1;
if (character.statusEffects.shieldofthefaithfulDuration && character.statusEffects.shieldofthefaithfulDuration > 0) {
character.statusEffects.shieldofthefaithfulDuration -= 1;
if (character.statusEffects.shieldofthefaithfulDuration == 0) {
character.additionalDefense =- 5 + Math.round((character.PER / 2));
if (State.variables.language === "PT-BR") {
addToBattleLog(`Seu Fiel Escudo se dissipou.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`Your Faithful Shield has faded.`)
}
}
}
if (character.statusEffects.feintDuration > 0) {
character.statusEffects.feintDuration -= 1;
if (character.statusEffects.feintDuration == 0) {
attacker.additionalDefense -= 10;
}
}
// Check if the escape attempt is successful (60% chance)
if (escapeChance <= 60) {
character.statusEffects.EscapeAttempt = false;
// Successful escape: Send the character to their last visited passage
if (State.variables.language === "PT-BR") {
addToBattleLog(`${character.Name} com sucesso escapou do combate como um covarde.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${character.Name} successfully fled from combat like a coward.`);
}
goToPassage(State.variables.return);
} else {
// Failed escape
character.statusEffects.EscapeAttempt = false;
if (State.variables.language === "PT-BR") {
addToBattleLog(`Sua tentaiva de fuga falhou. Como se você pudesse correr tão facilmente...`);
} else if (State.variables.language === "EN") {
addToBattleLog(`Your escape attempt failed. As if you could run off so easily...`);
}
}
}
if (State.variables.language === "PT-BR") {
addToBattleLog(`É turno de ${character.Name}, se prepare.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`It's ${character.Name}'s turn, prepare yourself.`);
}
character.AP += character.APregen;
window.checkPlayerAP();
checkGameOver();
if (character.riposteActive) {
character.riposteActive = false;
}
document.addEventListener('DOMContentLoaded', function() {
// Your JavaScript code here
window.updatePlayerDetails(character);
});
checkGameOver();
}
State.variables.allyInstances = [ ];
window.endPlayerTurn = function() {
const character = State.variables.character[1];
const summons = State.variables.allyInstances;
if (summons.length > 0) {
for (let i = summons.length - 1; i >= 0; i--) {
const summon = summons[i];
summon.behavior();
summon.currentLife--;
if (summon.currentLife <= 0) {
// Remove the summon from the array if its life is zero or less
summons.splice(i, 1);
if (character.traits.includes("Master Summoner")) {
character.currentMana += summon.storedMana;
addToBattleLog(`Your regained ${summon.storedMana} Essence back.`);
if (character.currentMana > character.MAXMANA) {
character.currentMana = character.MAXMANA;
}
}
}
}
}
if (character.statusEffects.regeneration > 0) {
character.currentLife += character.statusEffects.regeneration;
if (attacker.traits.includes("Battle-Medic")) {
character.currentLife += 5
}
character.statusEffects.regeneration--;
}
if (character.statusEffects.stunned > 0) {
character.statusEffects.stunned--;
}
if (character.statusEffects.burn.duration > 0) {
character.statusEffects.burn.duration = 0
}
if (character.statusEffects.burn.stacks > 1) {
character.statusEffects.burn.stacks = 1
}
if (character.statusEffects.confusion > 0) {
character.statusEffects.confusion--;
}
if (character.statusEffects.hindered > 0) {
character.statusEffects.hindered--;
// Handle confusion logic here
}
if (character.traits.includes("Divine Blessings I") && character.statusEffects.Piety) {
let turnheal = Math.floor((character.statusEffects.Piety / 6))
if (character.traits.includes("Divine Blessings III")) {
turnheal = Math.floor((character.statusEffects.Piety / 6)) * Math.floor((character.statusEffects.Piety / 12))
}
if (character.traits.includes("Champion of Conquest")) {
State.variables.enemyInstances.forEach(enemy => {
enemy.currentLife -= turnheal
})
} else {
character.currentLife += turnheal
if (character.currentLife > character.MAXLIFE) {
character.currentLife = character.MAXLIFE
}
}
}
handleCooldowns(character);
if (State.variables.language === "PT-BR") {
addToBattleLog(`O turno de ${character.Name} acabou, agora seus inimigos se preparam para atacar.`);
} else if (State.variables.language === "EN") {
addToBattleLog(`${character.Name}'s turn is over, your enemies prepare themselves to strike`);
}
startEnemyTurn();
}
window.toggleSkillsDisplay = function () {
let character = State.variables.character[1];
const skills = character.skills;
const skillButton = document.getElementById('generateSkillbox');
// Create a dialog element
const dialog = document.createElement('dialog');
dialog.style.width = '400px'; // Adjust the width as needed
dialog.style.height = '500px';
dialog.style.backgroundColor = '#222';
dialog.style.color = '#eee';
dialog.style.borderColor = '#444';
dialog.style.textAlign = 'center';
dialog.style.fontStyle = 'normal';
dialog.style.fontWeight = '400';
dialog.style.fontVariant = 'normal';
dialog.style.textTransform = 'none';
dialog.style.lineHeight = '1';
// Create a div to hold the skills
const skillsContainer = document.createElement('div');
const skillHeader = document.createElement('div');
skillHeader.innerHTML = State.variables.language === "EN" ? `<h2>Skills</h2>` : `<h2>Habilidades</h2>`
skillsContainer.appendChild(skillHeader);
skills.forEach((skill, index) => {
if (skill.Name == "Bribe") {
skill.description = `Attempt to bribe an enemy, loosing an amount of gold equal to it's current Lifeblood. (${State.variables.character[1].Gold})`;
skill.desc_pt = `Tente subornar um inimigo, perdendo uma quantidade de ouro igual ao sua Força Vital atual. (${State.variables.character[1].Gold})`
}
const skillContainer = document.createElement('div');
skillContainer.classList.add('skill-container');
skillContainer.style.fontSize = '16px';
skillContainer.style.padding = '7px 0px 0px 7px';
const skillName = document.createElement('div');
const skillInfo = document.createElement('div');
const skillButtonElement = document.createElement('button');
// Set the skill name and info based on the language
skillName.innerHTML = State.variables.language === "EN" ? `<strong>${skill.name}:</strong> AP: ${skill.APCost} | Essence: ${skill.Manacost} | Cooldown: ${skill.cooldown}` : `<strong>${skill.name_pt}:</strong> AP: ${skill.APCost} | Essence: ${skill.Manacost} | Cooldown: ${skill.cooldown}`;
skillInfo.innerHTML = State.variables.language === "EN" ? `<em>${skill.description}</em>` : `<em>${skill.desc_pt}</em>`;
skillButtonElement.textContent = State.variables.language === "EN" ? 'Use Skill' : 'Usar Habilidade';
skillButtonElement.onclick = function () {
window.showSkillTargets(skill);
dialog.close(); // Close the dialog after selecting a skill
};
// Check if the character is hindered
if (character.statusEffects.hindered > 0) {
skillButtonElement.textContent = State.variables.languages === "PT-BR" ? "Você está Impedido" : "You are Hindered";
skillButtonElement.disabled = true;
}
skillContainer.appendChild(skillName);
skillContainer.appendChild(skillInfo);
skillContainer.appendChild(skillButtonElement);
skillsContainer.appendChild(skillContainer);
});
dialog.appendChild(skillsContainer); // Append the skills container to the dialog
// Create a close button for the dialog
const closeButton = document.createElement('button');
closeButton.textContent = State.variables.language === "EN" ? 'Close' : 'Fechar';
closeButton.onclick = function () {
dialog.close(); // Close the dialog when the close button is clicked
};
dialog.appendChild(closeButton); // Append the close button to the dialog
// Append the dialog to the document body
document.body.appendChild(dialog);
// Show the dialog
dialog.showModal();
};
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('generateSkillbox').onclick = window.toggleSkillsDisplay;
});
window.showSkillTargets = function (skill) {
console.log(`Selected skill: ${skill.name}`);
let enemyInstances = State.variables.enemyInstances;
const targetsGrid = document.getElementById('attack-buttons');
targetsGrid.innerHTML = ''; // Clear previous targets
// If the skill is Offensive, show targets
if (skill.categories.includes('Offensive') && !skill.categories.includes("AOE")) {
targetsGrid.style.display = 'block';
// Iterate through the enemyInstances and create buttons for each enemy
enemyInstances.forEach((enemy, index) => {
if (enemy.statusEffects.hidden !== true) {
let buttonLabel = State.variables.language === "PT-BR" ? `${enemy.Name_pt} (Inimigo ${index + 1})` : `${enemy.Name} (Enemy ${index + 1})`;
const targetButton = window.createTargetButton(buttonLabel, () => {
console.log(`Button clicked: Target Enemy ${index + 1}`);
// Handle offensive skill activation logic with selected skill and target
window.useSkill(State.variables.character[1], skill, enemy);
targetsGrid.innerHTML = ''; // Clear skill targets after use
});
targetsGrid.appendChild(targetButton);
} else {
let hiddenlabel;
hiddenlabel.textContent = State.variables.language === "PT-BR" ? `${enemy.Name_pt} está oculto` : `${enemy.Name} is hidden`;
const hiddenbutton = window.createTargetButton(hiddenlabel.textContent, () => {});
hiddenbutton.disabled = true; // Disable the button
targetsGrid.appendChild(hiddenbutton);
}
});
console.log('Buttons created successfully');
}
// If the skill is Defensive, target the user (attacker)
else if (skill.categories.includes('Defensive') || skill.categories.includes('Summon') || skill.categories.includes('General') || skill.categories.includes("AOE")) {
// Handle summon or general skill activation logic without targets
window.useSkill(State.variables.character[1], skill);
}
}
window.createTargetButton = function (label, onClickFunction) {
const targetButton = document.createElement('button');
targetButton.textContent = label;
targetButton.onclick = onClickFunction;
return targetButton;
}
///////////////////////////////////////////////////////////////////
//////////"Stolen codes"
// css-macro.min.js, for SugarCube 2, by Chapel
// v1.0.0, 2022-07-21, 3bdbdfbe5ae47a46e4f4e52766d78701939ae9a6
;!function(){"use strict";function t(t){if(t.length%2!=0)return"Style rules should be a list of key/value pairs; you've passed an odd number.";var r={};return t.forEach((function(e,n){n%2==0&&(r[e]=t[n+1])})),r}function r(t,r){try{return"string"==typeof r?r:(t instanceof jQuery||(t=$(t)),t.css(r))}catch(t){return t.message}}Macro.add("css",{handler:function(){var e=function(){try{var e,n=[].slice.call(arguments).flatten(),s=n.shift();return"string"==typeof n[0]?e=t(n):"object"==typeof n[0]&&(e=clone(n[0])),r(s,e)}catch(t){return t.message}}(this.args);if("string"==typeof e)return this.error(e)}})}();
// end css-macro.min.js
// fading-macro-set.min.js, for SugarCube 2, by Chapel
// v1.1.0, 2022-07-21, 3bdbdfbe5ae47a46e4f4e52766d78701939ae9a6
;Macro.add("fadein",{tags:null,handler:function(){var t,a,s=$(document.createElement("span")),e=this.payload[0].contents;if(0===this.args.length)return this.error("no arguments given");t=Util.fromCssTime(this.args[0]),a=this.args.length>1?Util.fromCssTime(this.args[1]):0,s.wiki(e).addClass("macro-"+this.name).appendTo(this.output).hide().delay(a).fadeIn(t)}}),Macro.add("fadeout",{tags:null,handler:function(){var t,a,s=$(document.createElement("span")),e=this.payload[0].contents;if(0===this.args.length)return this.error("no arguments given");t=Util.fromCssTime(this.args[0]),a=this.args.length>1?Util.fromCssTime(this.args[1]):0,s.wiki(e).addClass("macro-"+this.name).appendTo(this.output).delay(a).fadeOut(t)}});
// end fading-macro-set.min.js
// articles.min.js, for SugarCube 2, by Chapel
// v1.0.0, 2022-07-21, 3bdbdfbe5ae47a46e4f4e52766d78701939ae9a6
;!function(){"use strict";var e=new Map,r=["eunuch","eucalyptus","eugenics","eulogy","euphemism","euphony","euphoria","eureka","european","euphemistic","euphonic","euphoric","euphemistically","euphonically","euphorically","heir","heiress","herb","homage","honesty","honor","honour","hour","honest","honorous","honestly","hourly","one","ouija","once","ubiquitous","ugandan","ukrainian","unanimous","unicameral","unified","unique","unisex","universal","urinal","urological","useful","useless","usurious","usurped","utilitarian","utopic","ubiquitously","unanimously","unicamerally","uniquely","universally","urologically","usefully","uselessly","usuriously"],i=["a","an"],t=/[aeiou8]/i,n=/[A-Z]+$/,u=/[UFHLMNRSX]/,a=/[.,\/#!$%\^&\*;:{}=\-_`~()]/g;function o(e){return"a"===e?"an":"a"}function s(r,t,n){var u;return State.length>0?(u="cannot add article override -> needs to be run in StoryInit special passage or earlier",console.error(u),u):t&&"string"==typeof t?(r&&"string"==typeof r&&(r=r.toLowerCase().trim()),i.includes(r)?(t=t.trim(),void(n?e.set(t,{article:r,caseSensitive:!!n}):e.set(t.toLowerCase(),{article:r,caseSensitive:!!n}))):(u='cannot add article override -> invalid article, must be "a" or "an"',console.error(u),u)):(u="cannot add article override -> invalid word",console.error(u),u)}function l(e){var i;return i=t.test(e.first())?"an":"a",function(e,i){return!!r.includes(e.toLowerCase())&&o(i)}(e,i)||function(e,r){return!(!n.test(e)||!u.test(e.first()))&&o(r)}(e,i)||i}function c(r){if(r&&"string"==typeof r){var i=r.trim().split(" ")[0].trim();return function(r){var i=(r=r.trim()).toLowerCase();if(e.has(i)||e.has(r)){var t=e.get(i)||e.get(r);return t.caseSensitive&&!e.has(r)?null:t.article}return null}(i=i.replace(a,""))||l(i)}}function h(e,r){if(!e||"string"!=typeof e)return e;var i=c(e);return(r?i.toUpperFirst():i)+" "+e}setup.articles={find:c,output:h,override:s},Macro.add("setarticle",{handler:function(){var e=s(this.args[0],this.args[1],this.args[2]);e&&"string"==typeof e&&this.error(e)}}),Macro.add(["a","an","A","An"],{handler:function(){var e=this.name.first()===this.name.first().toUpperCase();this.output.append(h(String(this.args[0]),e))}})}();
// end articles.min.js
// disable.js, by chapel, for sugarcube 2
// v1.0.0
(function () {
'use strict';
var cls = 'disabled';
var interactive = ['button', 'fieldset', 'input', 'menuitem', 'optgroup', 'option', 'select', 'textarea'];
function getEl (self) {
// get the first interactive element
var $el = $(self).find(interactive.join(',')).first();
if (!$el[0]) {
$el = $(self).children().eq(0);
if (!$el[0]) {
return $(self);
}
}
return $el;
}
function changeCls ($el) {
if ($el.ariaIsDisabled()) {
$el.addClass(cls);
} else {
$el.removeClass(cls);
}
}
function disable ($el, bool) {
if (!($el instanceof $)) {
$el = $($el);
}
$el.ariaDisabled((bool === undefined) ? true : !!bool);
changeCls($el);
return $el;
}
// no need for JS API as there us a built-in jQuery extension
Macro.add('disable', {
tags : null,
handler : function () {
var bool, $wrapper = $(document.createElement('span'))
.addClass('macro-' + this.name)
.wiki(this.payload[0].contents);
try {
bool = this.args.raw.trim() ? !!Scripting.evalJavaScript(this.args.full) : undefined;
} catch (err) {
return this.error("bad evaluation: " + err.message);
}
disable(getEl($wrapper), bool);
// output
$(this.output).append($wrapper);
}
});
}());
// operations.min.js, for SugarCube 2, by Chapel
// v1.1.0, 2022-07-21, 3bdbdfbe5ae47a46e4f4e52766d78701939ae9a6
;!function(){"use strict";var e=e||{},r=!0,t=!0,n=[0,100];function o(e,r){var t,n=[],o=0,i=1;if("string"==typeof e)n=e.split("d");else if("number"==typeof e&&r)n=[e,r];else{if(!(Array.isArray(e)&&e.length>=2))throw new TypeError("dice(): could not process arguments...");e.length=2,n=e}if(n[0]=Number(n[0]),"string"==typeof n[1]&&"F"===n[1].trim().toUpperCase()?(n[1]=3,i=-1):n[1]=Number(n[1]),n.some((function(e){return Number.isNaN(e)})))throw new TypeError("dice(): could not process arguments...");for(t=0;t<n[0];t++){o+=Math.floor(State.random()*n[1])+i}return o}function i(e,r){if("string"==typeof e){var t=[(n=e.trim().replace(/\s/g,"").match(/(\d+[d][\df]\d*)(.*)/i))[1],Number(n[2])];return o(t[0])+t[1]}return o(e,r);var n}e.dice={roll:i},r&&(window.dice=window.dice||i),Number.prototype.dice||Object.defineProperty(Number.prototype,"dice",{configurable:!0,writable:!0,value:function(e){if(0===this)return 0;if(this<0)throw new TypeError("Number.prototype.dice: cannot roll a negative number of dice!");if(("string"!=typeof e||"F"!==e.trim().toUpperCase())&&(null==e||"number"!=typeof e||e<=0||!Number.isInteger(e)))throw new TypeError("Number.prototype.dice: error in argument");if(!Number.isInteger(this))throw new TypeError("Number.prototype.dice: cannot roll partial dice!");return i(this,e)}}),Number.prototype.fairmath||Object.defineProperty(Number.prototype,"fairmath",{configurable:!0,writable:!0,value:function(e){var r=n;if(this<r[0]||this>r[1])throw new TypeError("Number.prototype.fairmath called on a number that is out of the defined range (the number was "+this+").");if(null==e||"number"!=typeof e||e>100||e<-100||arguments.length<1)throw new TypeError("Number.prototype.fairmath given incorrect argument or an argument that is out of the valid 0-100 range.");if(0===e)return Math.clamp(Math.trunc(this),r[0],r[1]);if(e<0)return e*=-1,Math.clamp(Math.trunc(this-(this-r[0])*(e/r[1])),r[0],r[1]);if(e>0)return Math.clamp(Math.trunc(this+(r[1]-this)*(e/r[1])),r[0],r[1]);throw new Error("Number.prototype.fairmath encountered an unspecified error.")}}),Number.prototype.between||Object.defineProperty(Number.prototype,"between",{configurable:!0,writable:!0,value:function(e,r){if("number"!=typeof e||"number"!=typeof r)throw new TypeError("Number.between() -> both values must be numbers");var t=Number(this);if(e===r)return t===e;if(r<e){var n=r;r=e,e=n}return t>=e&&t<=r}}),Math.fairmath||Object.defineProperty(Math,"fairmath",{configurable:!0,writable:!0,value:function(e,r){return e.fairmath(r)}}),Math.between||Object.defineProperty(Math,"between",{configurable:!0,writable:!0,value:function(e,r,t){return e.between(r,t)}}),t&&(Math.fm||Object.defineProperty(Math,"fm",{configurable:!0,writable:!0,value:function(e,r){return e.fairmath(r)}}),Number.prototype.fm||Object.defineProperty(Number.prototype,"fm",{configurable:!0,writable:!0,value:function(e){return this.fairmath(e)}}),Number.prototype.d||Object.defineProperty(Number.prototype,"d",{configurable:!0,writable:!0,value:function(e){return this.dice(e)}}))}();
// end operations.min.js
// pronouns.min.js, for SugarCube 2, by Chapel
// v1.1.0, 2022-07-21, 3bdbdfbe5ae47a46e4f4e52766d78701939ae9a6
;!function(){"use strict";if(Template&&Template.add&&"function"==typeof Template.add){var e={name:"gender",showSetting:!0,label:"Gender",desc:"",storyVar:"gender",default:"female"},t="#setting-control-"+e.name,r={subjective:["she","he","they"],objective:["her","him","them"],possessive:["hers","his","theirs"],determiner:["her","his","their"],reflexive:["herself","himself","themself"],noun:["woman","man","person"]};e.showSetting&&(Setting.addToggle(e.name,{label:e.label,desc:e.desc&&"string"==typeof e.desc&&e.desc.trim()?e.desc.trim():void 0}),$(document).on(":dialogopen :dialogopened",(function(){$("#ui-dialog-body").hasClass("settings")&&$(t).parent("div").empty().append($(document.createElement("button")).append("Configure...").ariaClick((function(){h()})))})));var a=/^is$/i,n=/^was$/i,s=/^has$/i,i=/oes$/i,o=/^[dl]ies$/i,l=/ies$/i,u=/sses$/i,c=/hes$/i,d=/s$/i,p=/they/i;Template.add(["he","she","they","He","She","They"],(function(){return S(this.name,g().subjective)})),Template.add(["him","her","them","Him","Her","Them"],(function(){return S(this.name,g().objective)})),Template.add(["his","hers","theirs","His","Hers","Theirs"],(function(){return S(this.name,g().possessive)})),Template.add(["his_","her_","their","His_","Her_","Their"],(function(){return S(this.name,g().determiner)})),Template.add(["himself","herself","themself","Himself","Herself","Themself"],(function(){return S(this.name,g().reflexive)})),Template.add(["man","woman","person","Man","Woman","Person"],(function(){return S(this.name,g().noun)})),Template.add(["he-s","she-s","they-re","He-s","She-s","They-re"],(function(){return S(this.name,g().subjective+T("'s","'re",y()))})),Macro.add("pronouns",{skipArgs:!0,handler:function(){h()}}),Macro.add("verb",{handler:function(){var e=y();if(this.args.length<1)return this.error("Please pass at least a singular third person pronoun to this macro.");this.args.includes("plural")&&(e=!0),this.output.append(T(String(this.args[0]),this.args[1]?String(this.args[1]):null,!!e))}}),setup.gender={pronouns:g,setPronouns:function(t){return"string"==typeof t?v(t):"object"==typeof t?function(t){if("object"==typeof t)return State.variables[e.storyVar]=v("male"===e.default?1:0),Object.assign(State.variables[e.storyVar],t)}(t):void 0},dialog:h,pluralize:b},window.gender=window.gender||setup.gender}else alert("Warning, this version of SugarCube does not include the Template API. Please upgrade to v2.29.0 or higher.");function m(){var t=$(document.createElement("div"));var a=Object.keys(r).map((function(t){var a=2;"male"===e.default?a=1:"female"===e.default&&(a=0);var n=State.variables,s=r[t][a];return n[e.storyVar]&&n[e.storyVar][t]&&(s=n[e.storyVar][t]),function(e,t,r){return $(document.createElement("label")).append(e).css("display","block").append($(document.createElement("input")).attr({type:"text",name:t}).css({float:"right","margin-left":"0.2em"}).val(r))}(t.toUpperFirst()+": ","gender-"+t,s)})),n=function(e,t,r){var a=$(document.createElement("select")).attr("name",t).css("float","right");return r.forEach((function(e,t){console.log(t),$(document.createElement("option")).attr("value",String(t)).append(e).appendTo(a)})),$(document.createElement("label")).css("display","block").append(e,a)}("Presets: ","gender-preset",["She/Her","He/Him","They/Them"]).on("change",(function(){var e=Number($(this).find("select").val());Number.isNaN(e)||a.forEach((function(t){var a=t.find("input"),n=a.attr("name").split("-")[1];a.val(r[n][e])}))})),s=n.find("select");State.variables[e.storyVar]?s.val(""):"male"===e.default?s.val("1"):"female"===e.default?s.val("0"):s.val("2");var i,o=$(document.createElement("button")).wiki("Confirm").addClass("gender-confirm").ariaClick({label:"Confirm pronoun selection."},(function(){var t=State.variables;t[e.storyVar]={},a.forEach((function(r){var a=r.find("input"),n=a.attr("name").split("-")[1];t[e.storyVar][n]=a.val().trim().toLowerCase()})),$("#ui-dialog-body").hasClass("reopen")&&UI.settings(),Dialog.close()})),l=(i=[n,"<br>"],a.forEach((function(e){i.push(e),i.push("<br>")})),i.push(o),i);return t.append(l)}function h(){var e,t,r,a;e="Customize Gender",t=m(),r="custom-gender",a=!1,Dialog.isOpen()&&$("#ui-dialog-body").hasClass("settings")&&(a=!0),Dialog.close(),Dialog.setup(e,a?r+" reopen":r),Dialog.append(t),Dialog.open()}function f(e){("number"!=typeof e||Number.isNaN(e)||e>2||e<0)&&(e=0);var t={};return Object.keys(r).forEach((function(a){t[a]=r[a][e]})),t}function g(){return State.variables[e.storyVar]&&State.variables[e.storyVar].subjective?State.variables[e.storyVar]:f("male"===e.default?1:0)}function v(t){var r;switch(t){case"female":r=f(0);break;case"male":r=f(1);break;default:r=f(2)}return State.variables[e.storyVar]=clone(r),r}function b(e){return e&&"string"==typeof e?(e=e.trim(),a.test(e)?e.replace(a,"are"):n.test(e)?e.replace(n,"were"):s.test(e)?e.replace(s,"have"):i.test(e)?e.replace(i,"o"):o.test(e)?e.replace(l,"ie"):l.test(e)?e.replace(l,"y"):u.test(e)?e.replace(u,"ss"):c.test(e)?e.replace(c,"h"):d.test(e)?e.replace(d,""):e):e}function y(){return p.test(g().subjective.trim())}function T(e,t,r){return r?t&&"string"==typeof t?t:b(e):e}function S(e,t){return e.first()===e.first().toUpperCase()?t.toUpperFirst():t}}();
// end pronouns.min.js
// notify.min.js, for SugarCube 2, by Chapel
// v1.1.1, 2022-07-21, 3bdbdfbe5ae47a46e4f4e52766d78701939ae9a6
;!function(){var s=/\d+m?s$/;function e(s,e,t){"string"==typeof s&&("number"!=typeof e&&(e=!1),$(document).trigger({type:":notify",message:s,delay:e,class:t||""}))}$(document.body).append("<div id='notify'></div>"),$(document).on(":notify",(function(s){s.message&&"string"==typeof s.message&&(s.message.trim(),s.class?"string"==typeof s.class?s.class="open macro-notify "+s.class:Array.isArray(s.class)?s.class="open macro-notify "+s.class.join(" "):s.class="open macro-notify":s.class="open macro-notify",s.delay?("number"!=typeof s.delay&&(s.delay=Number(s.delay)),Number.isNaN(s.delay)&&(s.delay=2e3)):s.delay=2e3,$("#notify").empty().wiki(s.message).addClass(s.class),setTimeout((function(){$("#notify").removeClass()}),s.delay))})),Macro.add("notify",{tags:null,handler:function(){var t=this.payload[0].contents,a=!1,n=!1;if(this.args.length>0){var i=s.test(this.args[0]);"number"==typeof this.args[0]||i?(a=i?Util.fromCssTime(this.args[0]):this.args[0],n=this.args.length>1&&this.args.slice(1).flatten()):n=this.args.flatten().join(" ")}e(t,a,n)}}),setup.notify=e}();
// end notify.min.js
// dialog API macro set, by chapel; for sugarcube 2
// version 1.3.0
// see the documentation: https://github.com/ChapelR/custom-macros-for-sugarcube-2#dialog-api-macros
// <<dialog>> macro
Macro.add('dialog', {
tags : ['onopen', 'onclose'],
handler : function () {
// handle args (if any)
var errors = [];
var content = '', onOpen = null, onClose = null;
var title = (this.args.length > 0) ? this.args[0] : '';
var classes = (this.args.length > 1) ? this.args.slice(1).flatten() : [];
this.payload.forEach( function (pl, idx) {
if (idx === 0) {
content = pl.contents;
} else {
if (pl.name === 'onopen') {
onOpen = onOpen ? onOpen + pl.contents : pl.contents;
} else {
onClose = onClose ? onClose + pl.contents : pl.contents;
}
}
});
// add the macro- class
classes.push('macro-' + this.name);
// dialog box
Dialog.setup(title, classes.join(' '));
Dialog.wiki(content);
// should these be shadowWrapper-aware?
if (onOpen && typeof onOpen === 'string' && onOpen.trim()) {
$(document).one(':dialogopened', function () {
$.wiki(onOpen);
});
}
if (onClose && typeof onClose === 'string' && onClose.trim()) {
$(document).one(':dialogclosed', function () {
$.wiki(onClose);
});
}
Dialog.open();
}
});
// <<popup>> macro
Macro.add('popup', {
handler : function () {
// errors
if (this.args.length < 1) {
return this.error('need at least one argument; the passage to display');
}
if (!Story.has(this.args[0])) {
return this.error('the passage ' + this.args[0] + 'does not exist');
}
// passage name and title
var psg = this.args[0];
var title = (this.args.length > 1) ? this.args[1] : '';
var classes = (this.args.length > 2) ? this.args.slice(2).flatten() : [];
// add the macro- class
classes.push('macro-' + this.name);
// dialog box
Dialog.setup(title, classes.join(' '));
Dialog.wiki(Story.get(psg).processText());
Dialog.open();
}
});
// <<dialogclose>> macro
Macro.add('dialogclose', {
skipArgs : true,
handler : function () {
Dialog.close();
}
});
// message macro, by chapel (with help from T.M. Edwards); for sugarcube 2
// version 1.0.1
// see the documentation: https://github.com/ChapelR/custom-macros-for-sugarcube-2#message-macro
//intialize namespace
setup.messageMacro = {};
// default text option:
setup.messageMacro.default = 'Help';
// <<message>> macro
Macro.add('message', {
tags : null,
handler : function () {
var message = this.payload[0].contents;
var $wrapper = $(document.createElement('span'));
var $link = $(document.createElement(this.args.includes('btn') ? 'button' : 'a'));
var $content = $(document.createElement('span'));
$link
.wiki(this.args.length > 0 && this.args[0] !== 'btn' ? this.args[0] : setup.messageMacro.default)
.ariaClick( this.createShadowWrapper( function () {
if ($wrapper.hasClass('open')) {
$content
.css('display', 'none')
.empty();
}
else {
$content
.css('display', 'block')
.wiki(message);
}
$wrapper.toggleClass('open');
}));
$wrapper
.attr('id', 'macro-' + this.name + '-' + this.args.join('').replace(/[^A-Za-z0-9]/g, ''))
.addClass('message-text')
.append($link)
.append($content)
.appendTo(this.output);
}
});
//Arena
window.arena = function() {
var arenapage = document.getElementById('Arena');
let char = State.variables.character[1];
let selectedLanguage = State.variables.language;
var traits = {
EN: {
"Architect of Reality":"Architect of Reality",
"Eternal Hunger":"Eternal Hunger",
"Astral Connection":"Astral Connection",
"Nature's Blessing":"Nature's Blessing",
"Arcane Core":"Arcane Core",
"Ancestral Knowledge": "Ancestral Knowledge",
"Reforger":"Reforger",
"Harmonious Existence": "Harmonious Existence",
"Favored":"Favored",
"Unlimited Potential": "Unlimited Potential",
"Adaptable":"Adaptable",
"Natural Warriors": "Natural Warriors",
"Underwater Marauder":"Underwater Marauder",
"Animal senses" : "Animal senses",
"Feral Mask" : "Feral Mask",
"Divine Blessings": "Divine Blessings",
"Divine Blessings II": "Divine Blessings II",
"Divine Blessings III": "Divine Blessings III",
"Brand the Heretic": "Brand the Heretic",
"Brazen Inquiry": "Brazen Inquiry",
"Blessed Flames": "Blessed Flames",
"Fervorous Zeal": "Fervorous Zeal",
"Fiery Cleasing": "Fiery Cleasing",
"Divine Foundation": "Divine Foundation",
"Divine Grace": "Divine Grace",
"Pious Devotion": "Pious Devotion",
"True Calling": "True Calling",
"Holy Ardor": "Holy Ardor",
"Aura of the Uncaring": "Aura of the Uncaring",
"Aura of Tyrants": "Aura of Tyrants",
"Aura of the Dauntless": "Aura of the Dauntless",
"Aura of Heroism": "Aura of Heroism",
"Oathkeeper": "Oathkeeper",
"Blessed Armaments": "Blessed Armaments",
"Faith of Arms": "Faith of Arms",
"Sacred Cause": "Sacred Cause",
"Embezoned Armaments": "Embezoned Armaments",
"Champion of Selfishness": "Champion of Selfishness",
"Champion of Conquest": "Champion of Conquest",
"Champion of Liberty": "Champion of Liberty",
"Champion of Justice": "Champion of Justice",
"Novice": "Novice",
"Genius Mind": "Genius Mind",
"Jack-of-All-Trades": "Jack-of-All-Trades",
"Trustworthy Instrument": "Trustworthy Instrument",
"Expert": "Expert",
"Quick-learner": "Quick-learner",
"Master": "Master",
"Transcendance": "Transcendance",
"Ascencion": "Ascencion",
"Wide Range": "Wide Range",
"Well-versed": "Well-versed",
"Double Time": "Double Time",
"Legendary Performace": "Legendary Performace",
"Winning Smile": "Winning Smile",
"Triple Time": "Triple Time",
"Magnum Opus": "Magnum Opus",
"Blade Dancer": "Blade Dancer",
"Tempo I": "Tempo I",
"Graceful Steps": "Graceful Steps",
"Tempo II": "Tempo II",
"Rythimic Strike": "Rythimic",
"Arcane Initiation": "Arcane Initiation",
"Arcane Mastery": "Arcane Mastery",
"Overflow": "Overflow I",
"Mystical Arsenal": "Mystical Arsenal",
"Overflow II": "Overflow II",
"Intellect Empowerment": "Intellect Empowerment",
"Overflow III": "Overflow III",
"Essence Renewal": "Essence Renewal",
"Great Sacrifice": "Great Sacrifice",
"Masterful Dark Magic": "Masterful Dark Magic",
"Masterful Hemomancy": "Masterful Hemomancy",
"Masterful Necromancy": "Masterful Necromancy",
"Second Deal": "Second Deal",
"Magic Drainer": "Drenador de Magia",
"Bonded Existence": "Bonded Existence",
"Improved Summons": "Improved Summons",
"Master Summoner": "Master Summoner",
"Masterful Summons": "Masterful Summons",
"Iron Suit": "Iron Suit",
"Titanic": "Titanic",
"Champion's Might": "Champion's Might",
"Spiked": "Spiked",
"Unending Vigor": "Unending Vigor",
"Body Slam": "Body Slam",
"Though Skin": "Though Skin",
"Bloodthirst": "Bloodthirst",
"Primal Fury": "Primal Fury",
"Overwhelming Strength": "Overwhelming Strength",
"Unyelding": "Unyelding",
"Natural Fighter": "Natural Fighter",
"Savagery": "Savagery",
"Elemental Afinity I":"Elemental Afinity I",
"Elemental Afinity II":"Elemental Afinity II",
"Elemental Afinity III":"Elemental Afinity III",
"Elemental Afinity IV":"Elemental Afinity IV",
"Wild Surge": "Wild Surge",
"Totem Carver": "Totem Carver",
"Blood Frenzy": "Blood Frenzy",
"Primal Fury:": "Primal Fury",
"Nimble Fingers": "Nimble Fingers",
"Lethality": "Lethality",
"Gambler": "Gambler",
"Sneaky": "Sneaky",
"Lethality II": "Lethality II",
"Into the Shadows": "Into the Shadows",
"Sure-Death": "Sure-Death",
"Deep Pockets": "Deep Pockets",
"Professional Robber": "Professional Robber",
"Hoarder": "Hoarder",
"Spell Thief": "Spell Thief",
"Phalanx Training": "Phalanx Training",
"Weapon Mastery": "Weapon Mastery",
"Shielded Assault": "Shielded Assault",
"Tactical Genius": "Tactical Genius",
"Survivalist": "Survivalist",
"Second Wind": "Second Wind",
"Arcane Aegis": "Arcane Aegis",
"Shield wall": "Shield wall",
"Spare Arrows": "Spare Arrows",
"Follow-up": "Follow-up",
"Barbed Points": "Barbed Points",
"Dragon Piercing Arrows": "Dragon Piercing Arrows",
"Headshot": "Headshot",
"Natural Reflexes": "Natural Reflexes",
"Graceful": "Graceful",
"Bon Mot": "Bon Mot",
"Firm Hand": "Firm Hand",
"Masterful Efficiency": "Masterful Efficiency",
"Lay-in-wait" : "Lay-in-wait",
"Trapsmith" : "Trapsmith",
"Hit-and-Run": "Hit-and-Run",
"Skirmish Tactics" : "Skirmish Tactics",
"Master trapper" : "Master trapper",
"Sniper Shot" : "Sniper Shot",
"Shredder Stance": "Shredder Stance",
"Lunging Stance": "Lunging Stance",
"Flurry": "Flurry",
"Momentum": "Momentum",
"Impossible Flurry": "Impossible Flurry",
"Stance Master": "Stance Master",
"Penitent Strike" : "Penitent Strike",
"Pious Resilience" : "Pious Resilience",
"Divine Atonement" : "Divine Atonement",
"Zealous Reckoning" : "Zealous Reckoning",
"Martyrdom" : "Martyrdom",
"Arcane Weapon" : "Arcane Weapon",
"Arcane Armory" : "Arcane Armory",
"Mystical Arts" : "Mystical Arts",
"Eldritch Knight" : "Eldritch Knight",
"Mage Slayer" : "Mage Slayer",
"Arcane Weapon" : "Arcane Weapon",
"Cirurgic Precision" : "Cirurgic Precision",
"Bloody mess" : "Bloody mess",
"Battle-Medic" : "Battle-Medic",
"Improved Cirurgic Precision" : "Improved Cirurgic Precision",
},
"PT-BR":{
"Architect of Reality":"Arquiteto da Realidade",
"Eternal Hunger":"Fome Eterna",
"Astral Connection":"Conecção Astral",
"Nature's Blessing":"Bença da Naturaza",
"Arcane Core":"Núcleo Arcano",
"Ancestral Knowledge": "Conhecimento Ancestral",
"Reforger":"Reforjadores",
"Harmonious Existence": "Existência Harmônica",
"Favored":"Favoritos",
"Unlimited Potential": "Potêncial Ilitimitado",
"Adaptable":"Adaptáveis",
"Natural Warriors": "Guerreiros Naturais",
"Underwater Marauder":"Saqueadores Subaquático",
"Animal senses" : "Sentidos Animais",
"Feral Mask" : "Mascara Feroz",
"Divine Blessings I": "Bênçãos Divinas I",
"Divine Blessings II": "Bênçãos Divinas II",
"Divine Blessings III": "Bênçãos Divinas III",
"Brand the Heretic": "Brandai os Hereges",
"Brazen Inquiry": "Inquérito Descarado",
"Blessed Flames": "Chamas Abençoadas",
"Fervorous Zeal": "Zelo Fervoroso",
"Fiery Cleasing": "Purificação Ardente",
"Divine Foundation": "Fundação Divina",
"Divine Grace": "Graça Divina",
"Pious Devotion": "Devoção Piedosa",
"True Calling": "Verdadeira Vocação",
"Holy Ardor": "Ardor Sagrado",
"Aura of the Uncaring": "Aura do Desinteresse",
"Aura of Tyrants": "Aura dos Tiranos",
"Aura of the Dauntless": "Aura do Intrépido",
"Aura of Heroism": "Aura do Heroísmo",
"Oathkeeper": "Guardião do Juramento",
"Blessed Armaments": "Armamentos Abençoados",
"Faith of Arms": "Fé nas Armas",
"Sacred Cause": "Causa Sagrada",
"Embezoned Armaments": "Armamentos Embelezados",
"Champion of Selfishness": "Campeão do Egoísmo",
"Champion of Conquest": "Campeão da Conquista",
"Champion of Liberty": "Campeão da Libertação",
"Champion of Justice": "Campeão da Justiça",
"Novice": "Novato",
"Genius Mind": "Mente Genial",
"Jack-of-All-Trades": "Faz-Tudo",
"Trustworthy Instrument": "Instrumento Confiável",
"Expert": "Especialista",
"Quick-learner": "Aprendiz Rápido",
"Winning Smile": "Sorriso Vencedor",
"Master": "Mestre",
"Transcendance": "Transcendência",
"Ascencion": "Ascensão",
"Wide Range": "Amplo Alcance",
"Well-versed": "Bem-Versado",
"Double Time": "Tempo Duplo",
"Legendary Performace": "Performance Lendária",
"Winning Smile": "Sorriso Vencedor",
"Triple Time": "Tempo Triplo",
"Magnum Opus": "Magnum Opus",
"Blade Dancer": "Dançarino de Lâminas",
"Tempo I": "Andamento I",
"Graceful Steps": "Passos Graciosos",
"Tempo II": "Andamento II",
"Rythimic Strike": "Golpe Rítmico",
"Overflow": "Transbordamento",
"Arcane Initiation": "Iniciação Arcana",
"Arcane Mastery": "Maestria Arcana",
"Mystical Arsenal": "Arsenal Místico",
"Overflow II": "Transbordamento II",
"Intellect Empowerment": "Potencialização Intelectual",
"Overflow III": "Transbordamento III",
"Essence Renewal": "Renovação de Essência",
"Great Sacrifice": "Grande Sacrifício",
"Masterful Dark Magic": "Magia Negra Maestral",
"Masterful Hemomancy": "Hemomancia Maestral",
"Masterful Necromancy": "Necromancia Maestral",
"Second Deal": "Segundo Pacto",
"Magic Drainer": "Drenador de Magia",
"Bonded Existence": "Existência Vinculada",
"Improved Summons": "Invocações Aprimoradas",
"Master Summoner": "Mestre Invocador",
"Masterful Summons": "Invocação Maestrais",
"Iron Suit": "Armadura de Ferro",
"Titanic": "Titânico",
"Champion's Might": "Poder do Campeão",
"Spiked": "Espetado",
"Unending Vigor": "Vigor Infinito",
"Body Slam": "Arremesso de Corpo",
"Though Skin": "Pele Grossa",
"Bloodthirst": "Sede de Sangue",
"Overwhelming Strength": "Força Avassaladora",
"Unyelding": "Inabalável",
"Natural Fighter": "Lutador Natural",
"Savagery": "Selvageria",
"Blood Frenzy": "Frenesi Sanguinário",
"Primal Fury": "Fúria Primal",
"Elemental Afinity I":"Afinidade Elemental I",
"Elemental Afinity II":"Afinidade Elemental II",
"Elemental Afinity III":"Afinidade Elemental III",
"Elemental Afinity IV":"Afinidade Elemental IV",
"Wild Surge": "Onda Selvagem",
"Totem Carver": "Escultor de totens",
"Nimble Fingers": "Dedos Ágeis",
"Lethality": "Letalidade",
"Gambler": "Apostador",
"Sneaky": "Furtivo",
"Lethality II": "Letalidade II",
"Poisonous Bomb": "Bomba Venenosa",
"Into the Shadows": "Nas Sombras",
"Sure-Death": "Morte Certa",
"Deep Pockets": "Bolsos Fundos",
"Professional Robber": "Ladrão Profissional",
"Hoarder": "Acumulador",
"Spell Thief": "Ladrão de Magia",
"Phalanx Training": "Treinamento de Falânge",
"Weapon Mastery": "Maestria com Armas",
"Shielded Assault": "Assaulto de Escudo",
"Tactical Genius": "Gênio Tático",
"Survivalist": "Sobrevivencialista",
"Second Wind": "Segundo Fôlego",
"Arcane Aegis": "Escudo Arcano",
"Shield wall": "Muralha de Escudos",
"Spare Arrows": "Flechas Sobressalentes",
"Follow-up": "Acompanhamento",
"Arrow Barrage": "Chuva de Flechas",
"Barbed Points": "Pontas Farpadas",
"Dragon Piercing Arrows": "Flechas Perfurantes de Dragão",
"Headshot": "Tiro na Cabeça",
"Natural Reflexes": "Reflexos Naturais",
"Graceful": "Gracioso",
"Bon Mot": "Bon Mot",
"Firm Hand": "Mão Firme",
"Masterful Efficiency": "Eficiência Magistral",
"Lay-in-wait" : "Espera Oculta",
"Trapsmith" : "Armadilheiro",
"Hit-and-Run": "Bater e Correr",
"Skirmish Tactics" : "Táticas de Escaramuças",
"Master trapper" : "Mestre Armadilheiro",
"Sniper Shot" : "Tiro de Francotirador",
"Shredder Stance": "Postura do Retalhador",
"Lunging Stance": "Postura de Investida",
"Flurry": "Frenesi",
"Momentum": "Momento",
"Impossible Flurry": "Frenesi Impossível",
"Stance Master": "Mestre de Posturas",
"Penitent Strike" : "Golpe Penitente",
"Pious Resilience" : "Resiliência Piedosa",
"Divine Atonement" : "Expiáo Divina",
"Zealous Reckoning" : "Acerto de Contas Zeloso",
"Martyrdom" : "Martírio",
"Bloody Embrace": "Abraço Sangrento",
"Arcane Weapon" : "Arma Arcana",
"Arcane Armory" : "Armaria Arcana",
"Mystical Arts" : "Artes Místicas",
"Eldritch Knight" : "Cavaleiro Sobrenatural",
"Mage Slayer" : "Cortador Mágico",
"Cirurgic Precision" : "Precisão Cirúrgica",
"Bloody mess" : "Confusão Sangrenta",
"Battle-Medic" : "Medico de Batalha",
"Improved Cirurgic Precision" : "Precisão Cirúrgica Aprimorada",
},
};
var OathArm = ""
if (selectedLanguage === "EN") {
if (char.Oath === "Selfishness") {
OathArm = `Whenever you make an improved weapon attack, regain 3% of your total Essence. (${Math.round((char.MAXMANA * 0.03))})`
} else if (char.Oath === "Conquest") {
OathArm = "Whenever you make an improved weapon attack, decrease the target's defense by 3."
} else if (char.Oath === "Justice") {
OathArm = "Whenever you make an improved weapon attack, reduce your status effects (Burning, Confusion, Hindered, etc...) by 1 turn."
} else if (char.Oath === "Liberty") {
OathArm = "Whenever you make an improved weapon attack, increase your Defense by 3."
}
} else if (selectedLanguage === "PT-BR") {
if (char.Oath === "Selfishness") {
OathArm = `Sempre que você realizar um ataque aprimorado com arma, recupere 3% do seu total de Essência. (${Math.round((char.MAXMANA * 0.03))})`
} else if (char.Oath === "Conquest") {
OathArm = "Sempre que você realizar um ataque aprimorado com arma, diminua a Defesa do alvo em 3."
} else if (char.Oath === "Justice") {
OathArm = "Sempre que você realizar um ataque aprimorado com arma, reduza seus efeitos de status (Queimadura, Confusão, Impedimento, etc.) em 1 turno."
} else if (char.Oath === "Liberty") {
OathArm = "Sempre que você realizar um ataque aprimorado com arma, aumente sua Defesa em 3>"
}
}
var textForSecondPact = ""
if (selectedLanguage === "EN") {
if (char.secondPact === "Blood") {
textForSecondPact = `Masterful Hemomancy: Whenever you cast a Pact magic, heal yourself by 3 for each <b>Bleeding</b> enemy, then apply <b>Bleeding</b> to all enemies for 3 turns.`
} else if (char.secondPact === "Shadow") {
textForSecondPact = `Masterful Dark Magic: Whenever you cast a Pact magic, damage yourself by 3 to damage all enemies by your 1/3 of your Resillience. (${Math.round((char.RES / 3))})`
} else if (char.secondPact === "Soul") {
textForSecondPact = "Masterful Necromancy: Whenever you cast a Pact magic, summon an Undead Slave."
}
} else if (selectedLanguage === "PT-BR") {
if (char.secondPact === "Blood") {
textForSecondPact = `Hemomancia Maestral: Sempre que lançar uma magia de Pacto, cure-se em 3 para cada inimigo <b>Sangrando</b>, depois aplique <b>Sangramento</b> a todos os inimigos que não estejam <b>Sangrando</b> por 2 turnos.`
} else if (char.secondPact === "Shadow") {
textForSecondPact = `Magia Negra Maestral: Sempre que lançar uma magia de Pacto, se machuque em 3 para machucar todos os inimigos em 1/3 da sua Resiliência. (${Math.round((char.RES / 3))})`
} else if (char.secondPact === "Soul") {
textForSecondPact = "Necromancia Maestral: Sempre que lançar uma magia de Pacto, invoque um Escravo Morto-Vivo."
}
}
let totalDefense = calculateCombinedDefense(char);
const traitText = {
EN: {
"Apex Hunter": `On a Critical Strike, Draconians add 1/3 of their Perception to their Damage. When using their Claws, they also inflict <b>Bleeding</b>(3). (${Math.round((char.PER / 3))})`,
"Natural Warriors": "Draconians have natural Claws instead of Fists. As well as durable scales instead of skin, increasing their Defense",
"Reforger": "Dwarfs are able to improve their wearings any armor has a higher defense value based on its type",
"Ancestral Knowledge": "Dwarfs start with +10 points to distribute among their expertise.",
"Harmonious Existence": "The gods give easier trials and tests for the Elfs.",
"Favored": "The gods give easier trials and tests for the Elfs.",
"Arcane Core": "When near death, Heralds release all their remaining Essence to damage nearby enemies",
"Eternal Hunger": "During combat, when a Herald slays an enemy, regain a part of your lost Essence.",
"Architect of Reality": "A Herald may pay part of their Essence to create 'Object' items.",
"Astral Connection": "When near Secrets, you may expend a bit of your Essence to reveal them.",
"Nature's Blessing": "Your maximum Essence is halved. Add your Esence to your Lifeblood.",
"Adaptable": "Humans start with +5 points to distribute among their Attributes.",
"Unlimited Potential":"Whenever a Human levels up, they gain +1 point to distribute among their Expertises",
"Animal senses": "The Vanadi can see in the dark. Additionally, they have a +5 to their Hit-Chance.",
"Feral Mask": "The Vanadi gain the ability to shapeshift during combat.",
"Divine Foundation": "You have added the 'Heal', 'Judgement' and 'Shield of the Faithfull' Skills to your Repertoire.",
"Divine Blessings I": `Whenever you cast a Holy Spell, gain 2 stacks of <b>Piety</b>, at the end of your turn, you heal yourself by 1 for each 6 stack of <b>Piety</b>. Casting a non-Holy Spell, reset all points of <b>Piety</b>`,
"Divine Blessings II": `<b>Piety</b> increases your Defense and Damage by 1 for every 6 points.`,
"Divine Blessings III": `Increases by 1 all values given due <b>Piety</b> for every 12 stacks of <b>Piety</b>.`,
"Brand the Heretic": `Whenever you hit an enemy with an weapon attack, apply <b>Burn</b> to the target`,
"Brazen Inquiry": `Add 1/3 of your Perception to Intimidation and Speech tests. Additionally, applying <b>Burn</b> to an enemy gives 2 stacks of <b>Piety</b>. )${Math.round((char.PER / 3))})`,
"Blessed Flames": `<b>Burning</b> enemies take 1 additional damage for every 6 stacks of your <b>Piety</b>`,
"Fervorous Zeal": `Whenever an enemy takes damage due to <b>Burn</b>, heal yourself by 4 for each stack of <b>Burn</b> and increase your <b>Piety</b> by 1.`,
"Fiery Cleasing": `Whenever you apply <b>Burn</b> to an enemy, add 2 more stacks.`,
"Divine Grace": "You may re-roll a failed test once per level.",
"Pious Devotion": `Whenever you gain <b>Piety</b> gain 2 additional stacks.`,
"True Calling": `Whenever you cast a Divine Call, regain 50 Lifeblood. You have chosen to follow ${char.GOD}.`,
"Holy Ardor": `Holy Ardor: Start each combat with 20 stacks of <b>Piety</b>.`,
"Aura of the Uncaring": `Increase your Damage by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Sleight of Hands by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Aura of Tyrants": `Increase your Damage by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Intimidation by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Aura of the Dauntless": `Increase your Defense by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Acrobatics by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Aura of Heroism": `Increase your Defense by ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} and your Athletics by 1/3 of your Perception. ${Math.round((char.PER / 3))}`,
"Oathkeeper": `You gain 3 stacks of <b>Piety</b> at the start of each combat per Stage level.`,
"Faith of Arms": `${OathArm}`,
"Sacred Cause": `Whenever you would take more than 25 damage in a single strike, reduce the damage taken by 5 + 1 for each 6 stacks of <b>Piety</b>`,
"Embezoned Armaments": "At the start of your turn, gain a Improved Attack. Additionally, your improved weapon attacks deal 1d6 additional damage, add another 1d6 if the target is a Daemon, Vampyr or Undead ",
"Champion of Selfishness": "When you are attacked, cast Smite on the attacker if available.",
"Champion of Conquest": `Instead of Healing at the end of your turn, your <b>Divine Blessing I</b> now deals damage to each enemy.`,
"Champion of Liberty": "You are immune to Stunned and Hindered status.",
"Champion of Justice": "Increase your total Lifeblood by 50%, whenever you are attacked, reduce the damage received by 5%",
"Novice": "Increase your first test dice to a 1d8.",
"Genius Mind": "Increase the gains of Experience due tests by 50%.",
"Jack-of-All-Trades": `During tests, add +${char.level < 7 ? 2 : char.level < 15 ? 4 : 6} to any Expertise.`,
"Trustworthy Instrument": "While equipped with an Instrument, mark it as Esoteric. Additionally, you gain +5 to Art tests",
"Expert": "Increase your first test dice to a 1d10 and your second test dice to a 1d8.",
"Quick-learner": "Adding Skills and Spells to your Repertoire takes only 1 hour",
"Winning Smile": `When making a test and the result would be lower than 10, add 1/3 of your Charisma to the result ${Math.round((char.CHA / 3))})`,
"Master": "Increase both of your test dice to 1d12's",
"Transcendance": "You gained +10 Attribute points",
"Ascencion": "You add your Intelligence to your damage and your Charisma to your defense.",
"Well-versed": "Whenever you learn a new Ballad, reduce the time taken to 2 hours. Additionally you may use Arts to World Knowledge tests.",
"Double Time": "When attacking with a Improved Attack, reduce all skill cooldowns by 1.",
"Legendary Performace": "Increase your Art expertise by 10, then increase your Essence by your Art expertise.",
"Triple Time": "Your Improved Attacks deal more damage, and gain an additional charge.",
"Magnum Opus": "Your buffs and debuffs last and additional turn and heal yourself by the duration.",
"Blade Dancer": `Slashing weapons count as instruments for you. While wielding one, increase your Defense by 1/3 of your Charisma. Additionally, you may use Arts to Acrobatic tests. ${Math.round((char.CHA / 2))})`,
"Tempo I": "The first time you cast an spell each turn, make a weapon attack against a random enemy",
"Graceful Steps": "After you are missed by an attack, gain an Action point.",
"Tempo II": "The first time you cast a spell each turn, make a weapon attack against a random enemy. Refresh whenever you cast a Ballad.",
"Arcane Initiation": "You have added the skills 'Fire Bolt', 'Lightning Strike' and 'Freeze to your Repertoire. These skills cost 3 less.",
"Arcane Mastery":"You have added the skills 'Inferno', 'Storm' and 'Blizzard to your Repertoire. When these skills are cast, you roll their Damage twice and chooses the highest result.",
"Rythimic Strike": `Whenever you make an weapon attack, deal 1/2 of your charisma as damage to the target. (${Math.round((char.CHA / 2))})`,
"Overflow": `At the start of each turn, regain Essence equal to 1/3 of your Intelligence. (${Math.round((char.INT / 3))})`,
"Mystical Arsenal": "Whenever you cast an Arcane Spell, increase your Damage by 5.",
"Overflow II": `At the start of each turn, regain Essence equal to 1/2 of your Intelligence. (${Math.round((char.INT / 2))})`,
"Intellect Empowerment": "Whenever you cast a spell against a single enemy, deal 1/2 of your Intelligence as damage on the same target.",
"Overflow III": `At the start of each turn, regain Essence equal to your your Intelligence. (${char.INT})`,
"Essence Renewal": "Whenever you cast a spell, regain Lifeblood equal to it's cost.",
"Great Sacrifice": `Reduce your total Lifeblood by 10%, add ${2 * char.level} to your Damage`,
"Masterful Dark Magic": `Whenever you cast a Pact magic, damage yourself by 3 to damage all enemies by your 1/3 of your Resillience. (${Math.round((char.RES / 3))})`,
"Masterful Hemomancy": `Whenever you cast a Pact magic, heal yourself by 3 for each <b>Bleeding</b> enemy, then apply <b>Bleeding</b> to all non-<b>Bleeding</b> enemies for 3 turns.`,
"Masterful Necromancy": "Whenever you cast a Pact magic, summon an Undead Slave.",
"Second Deal": `Second Chosen Pact: ${char.secondPact} ${textForSecondPact}`,
"Magic Drainer": "At the start of your turn, drain 5% of all enemies current Essence and Lifeblood.",
"Bonded Existence": "Whenever you invoke a Summon, regain 7% of your lost Essence, additionally, for each invoked Summon, increase your Damage by 3.",
"Improved Summons": `When you invoke a summon, increase their Lifeblood by 1/2 of your Intelligence and their attributes by 3. (${Math.round((char.INT / 2))})`,
"Master Summoner": "Decrease the cost of your summons by half. Additionally, when a summon would be destroyed, regain Essence equal to it's original cost.",
"Masterful Summons": "When you invoke a summon, Increase their Lifeblood by your Intelligence and their attributes by 6.",
"Iron Suit": "For each equipped slot, increase your Defense by 1.",
"Titanic": `While above of 70% of your Lifeblood, increase your Damage and Hit chance by ${char.level < 5 ? 5 : char.level > 10 ? 10 : 15}.`,
"Champion's Might": `Add 1/2 of your resilience to your Damage and to your Athletics. (${Math.round((char.RES / 2))})`,
"Spiked": `When you are attacked, deal damage equal to 10% of your Defense back to your attacker. ${Math.round(((char.Defense + char.additionalDefense) * 0.1))}`,
"Unending Vigor": "At the start of each turn, regain 3% of your missing Lifeblood.",
"Body Slam": `During combat, if your damage is lower than your Defense, increase your damage to your Defense. ${totalDefense}`,
"Though Skin": `When under 50% of your health, reduce all damage taken by ${char.level < 5 ? 3 : char.level < 10 ? 5 : char.level < 15 ? 7 : 9}.`,
"Bloodthirst": "You weapon attacks deal additional damage equal to 5% of the target's current Lifeblood. If they have the Visceral trait, increase the damage to 7%.",
"Overwhelming Strength": "When you make an attack and misses, damage the target by 1/3 of the Damage.",
"Unyelding": "When you would be killed by an attack, make a weapon attack, if you kill your attacker, recover 15% of your missing life. Can only happen once per battle.",
"Natural Fighter": `For each unequipped slot, increase your Damage by ${char.level < 8 ? 2 : char.level < 14 ? 3 : 4} and Defense by ${char.level < 8 ? 1 : char.level < 14 ? 2 : 3}.`,
"Savagery": "Increase the damage of your mainhand and offhand by 1 step when unnequiped. Additionally, your offhand gains the weapon trait.",
"Blood Frenzy": "You recover 12.5% of the damage dealt as Lifeblood",
"Primal Fury": "When unarmed, when dealing 20 or more damage on a attack, apply <b>Confusion</b> to the target.",
"Elemental Afinity I":"You have added the 'Rainfall' and 'Turn the Tides' Skills to your Repertoire.",
"Elemental Afinity II":"You have added the 'Stormsurge' and 'Gale Winds' Skills to your Repertoire.",
"Elemental Afinity III":"You have added the 'Eruption' and 'Blazing Strike' Skills to your Repertoire.",
"Elemental Afinity IV":"You have added the 'Tremors' and 'Turn to Stone' Skills to your Repertoire.",
"Wild Surge": "At the end of your turn, your Totems damage each enemy by 1..",
"Totem Carver": "Whenever you Summon a Totem, empower it.",
"Nimble Fingers": "During combat, you gain 15% more Gold from defeating enemies. Additionally, you may steal from story characters (NPCs).",
"Lethality": "Attacks against full health targets deal 1d10 of extra damage.",
"Gambler": "Reduce one of your test dice to a 1d4, but increase the other to a 1d10.",
"Sneaky": `You start each combat <b>Hidden</b>. While hidden, your next attack deal 1d8 of extra damage`,
"Lethality II": "Attacks against full health targets deal 1d10 extra damage and apply as much Poison",
"Into the Shadows": `If an attack kills an enemy, become <b>Hidden</b>`,
"Sure-Death": "Enemies no longer loses stacks of Poison",
"Deep Pockets": "Whenever you cast the skill 'Disarm', you have the chance to steal the item.",
"Professional Robber": `You add your level to Sleight of Hand and Stealth Test. (${char.level})`,
"Hoarder": `Increase your Damage by your 1/3 of your Gold. ${Math.round((char.Gold / 3))}`,
"Spell Thief": "Whenever an enemy uses an Skill, you have a chance to learn that Skill.",
"Eye for Detail": "You always find secrets",
"Secret Stash": "You are considered to always have the right tool for the job. Like a rope, lantern, or lockpick",
"Hidden Machinations": "During test, you roll an aditional 1d6 dice and add to the result. If the test expertise is of Sleitght of Hands, World Knowledge or Insight, you roll another 1d6 and choose the highest result.",
"Faceless Shadow": "You always succeed at Stealth tests",
"Phalanx Training": "You gain +3 Defense for each of enemies alive. Additionally, when you make a weapon attack while wielding a Shield in your offhand, you make a weapon attack with your Shield, it deal 1d4 of damage and gains the 'Blunt' trait.",
"Weapon Mastery": `Your weapons apply additional effects based on their damage type. (Blunt - Apply <b>Confusion</b> on the Target | Slashing - Applies <b>Bleed</b> for 2 turns | Piercing - Decreases the target's Defense by 5 | Firearm - Has 35% to deal 75% extra damage)`,
"Shielded Assault": "You gain additional Hit-Chance based upon the number of enemies alive. Additionally, when you hit an enemy with your Shield, you increase the damage dealt by its Defense.",
"Tactical Genius": "Your Skills that cost three or more Action Points cost 1 point less.",
"Survivalist": `Increase the bonus given by <b>Phalanx Training</b> and <b>Shielded Assault</b> by 2 and increase your Shield damage dice to 2d4`,
"Second Wind": "During each combat, the first time you hit below 25% of your maximum health, heal yourself by 35% of your lost health.",
"Arcane Aegis": "Reduce the damage taken by Spells by 20% while wielding a Shield.",
"Shield wall": "Double the Defense given by your Shield.",
"Spare Arrows": "After killing a enemy with a ranged weapon, reduce the cooldown of your weapon by 1.",
"Follow-up": `After using an Offensive skill, deal 1d4 against a random enemy. This is affected by <b>Barbed Points</b> and <b>Dragon Piercing Arrows</b>. If you possess a Ranged weapon with the Light trait in your offhand, make a weapon attack with that weapon, instead.`,
"Barbed Points": "When calculating Damage, increase the number of dices of your ranged weapons by 1.",
"Dragon Piercing Arrows": "When calculating Damage, increase the damage dice of your ranged weapons by 1 step",
"Headshot": "Your ranged weapon attacks have a 20% chance to execute non-Bosses or Undead enemies",
"Natural Reflexes": "At the end of your turn, gain Riposte",
"Graceful": "While wielding only a 1-handed weapon in your hands, increase your Defense and Hit-Chance by 10.",
"Bon Mot": "After killing an enemy, heal yourself by 10% of your lost Lifeblood.",
"Firm Hand": "While wielding a single 1-handed weapon, whenever you make a weapon attack, you make an additional attack.",
"Masterful Efficiency": "Riposte no longer fades after you hit an enemy.",
"Penitent Strike": `When attacking an enemy, deal 50% extra damage to yourself and the target. If you or the target are afflicted with <b>Bleeding</b>, heal yourself by ${Math.round((char.MAXLIFE * 0.06))}% of your maximum Lifeblood.`,
"Bloody Embrace": `When being attacked by an enemy, reduce the damage taken by 50%. Convert the damage as <b>Bleeding</b> (For every 6 points of damage, gain 1 stack of Bleeding), then gain a stack of Piety. You no longer can die due to <b>Bleeding</b>.`,
"Pious Resilience": "Increase your maximum Lifeblood by 25%. At the start of your turn, while your Lifeblood is below 50%, gain 3 stacks of Piety.",
"Divine Atonement": "Whenever you are affected by a status effect, gain a stack of Piety.",
"Zealous Reckoning": "Whenever an enemy attacks you, you reflect 30 + (+1 % for each stack of Piety)% of the received Damage back to the attacker.",
"Martyrdom": "Enemy Attacks can no longer miss you. In compensation, Double your Maximum Lifeblood.",
"Lay-in-wait": "For each unexpended Action Point, increase your Hit-Chance by +6 with Ranged Weapons. and +3 with Melee weapons.",
"Trapsmith": "At the start of each combat, you lay 3 random Traps activated when the enemy attacks you. Only 1 trap can be activated each turn.",
"Poacher": "When an enemy triggers a Trap, make a weapon attack against it. If your weapon is on Cooldown, recharge it, first.",
"Master trapper": "Your traps are improved.",
"Hit-and-Run": "After damaging an enemy with an attack, lay back a trap that has been activated.",
"Sniper Shot": "For each unexpended Action Point, increase your weapon Damage dice by 1 step. If the weapon damage dice is already higher than a d12, increase the number of Dice by 1, instead. After that, expend all of your Action Points.",
"Shredder Stance": "You gain access to the 'Shredder Stance' Skill.",
"Flurry": "Whenever you make a weapon attack with your offhand, make one additional attack without cost, this attack has a -15 to Hit-Chance, -30 if the weapon is heavy. If the weapon it in Cooldown, reduce its Cooldown by 1, instead.",
"Momentum": "Whenever you miss an enemy with a weapon attack, increase your Hit-Chance by 7. Resets whenever you hit an enemy.",
"Lunging Stance": "You gain access to the 'Lunging Stance' Skill",
"Impossible Flurry" : "Whenever you make a weapon attack with your mainhand or offhand, make one additional attack without cost, this attack has a -15 to Hit-Chance, -30 if the weapon is heavy. If the weapon it in Cooldown, reduce its Cooldown by 1, instead.",
"Stance Master": "While in the Shredder Stance, you make one additional attack per weapon in hand without cost, but reduce your Hit-Chance by 10. If the weapon is in Cooldown, reduce it by 1, instead. While in Lunging Stance, your first two weapon strikes are benefited from the bonus.",
"Arcane Weapon": `You have added the 'Summon Arcane Blade' to your Repertoire, the weapon's damage increases by 1d8 at levels 5, 10, and 15. While wielding the Arcane Blade, casting a Spell grants you an Improved Attack that deals 1/2 of your Intelligence as additional Damage. (${Math.round((char.INT / 2))})`,
"Arcane Armory": `While wielding the Arcane Blade, increase your Defense to be equal to your Intelligence, if it isn't higher. (${char.INT})`,
"Mystical Arts": "You have added the 'Blade Surge', and 'Spectral Strike' Skills to your Repertoire. While wielding the Arcane Blade, whenever you make a weapon attack, recover 5 Essence.",
"Eldritch Knight": "Heavy Armor no longers increases the Essence cost of Spell Skills.",
"Runic Mastery": "You are now able to Enchant your own gear from your inventory, it takes 3 hours and 35 Essence to Enchant a gear.",
"Mage Slayer": "While wielding the Arcane Blade, whenever an enemy casts a Spell against you, make a weapon attack against it .",
"Cirurgic Precision": "Reduce the necessary amount to make a Critical Strike to be at least 1.75X the target's Defense.",
"Bloody mess": `Whenever you make a Critical Strike, apply <b>Bleeding</b> to the target for 3 turns. You add 1/2 of your Charisma to the Hit-Chance against <b>Bleeding</b> targets. (${Math.round((char.CHA / 2))})`,
"Battle-Medic": "Whenever you are hit, gain Regeneration(2). Increase all healing received by 5.",
"Improved Cirurgic Precision": "Reduce the necessary amount to make a Critical Strike to 1.5X the target's Defense.",
},
//Portuguese Down here
"PT-BR": {
"Apex Hunter": `Em um Ataque Crítico, Draconianos adicionam 1/3 de suas Percepções ao Dano. Quando usando suas Garras, eles também aplicam <b>Sangramento</b>(3). (${Math.round((char.PER / 3))})`,
"Natural Warriors": "Draconianos possuem Garras naturais ao invés de Punhos. Além de uma durável escamas ao invés de pele, aumentando sua Defensa.",
"Reforger": "Anões são capazes de melhorar a qualidade de suas armaduras. concebendo uma maior Defesa dependedo de seu tipo",
"Ancestral Knowledge": "Anões começam com +10 pontos para distribuir entre suas Perícias.",
"Harmonious Existence": "Elfos adicionam metade de sua Percepção para sua Força Vital e Essência.",
"Favored": "Os deuses concebem testes e desafios mais fáceis para os Elfos.",
"Arcane Core": "Quando próximo da morte, Arautos dispersam toda Essência restante para danificar todos os inimigos",
"Eternal Hunger": "Durante Combate, quando um inimigo é morto, recupera parte de sua Essência perdida.",
"Architect of Reality": "Você pode criar items do tipo 'Objeto' gastando parte de sua Essência.",
"Astral Connection": "Quando perto de segredos, você oferecer parte de sua Essência para revela-los.",
"Nature's Blessing": "Sua Essência máxima é reduzida pela metada. Aumente sua Força Vital por sua Essência.",
"Adaptable": "Humanos começam com +5 pontos para distribuir entre seus Atributos.",
"Unlimited Potential":"Sempre que um Humano sobe de nível, eles ganham +1 ponto para distribuir entre suas Perícias.",
"Animal senses": "Os Vanadi podem ver no escuro. Além disso, eles têm uma +5 para suas Chânces de Acerto.",
"Divine Foundation": "Você adicionou as Habilidades 'Cura', 'Juízo' e 'Escudo dos Fiéis' ao seu Repertório.",
"Feral Mask": "Os Vanadi tem a habilidade de se transformarem durante o combate.",
"Divine Blessings I": `Sempre que lançar um Feitiço Sagrado, ganhe 2 acúmulos de <b>Piedade</b>, ao final de seu turno, cure-se em 1 para cada 6 acúmulos de <b>Piedade</b>. Ao lançar um Feitiço não Sagrado, resete todos os pontos de <b>Piedade</b>.`,
"Divine Blessings II": `<b>Piedade</b> aumenta sua Defesa e Dano em 1 a cada 6 pontos.`,
"Divine Blessings III": `Aumenta em 1 todos os valores dados devido à <b>Piedade</b> para cada 12 acúmulos de <b>Piedade</b>.`,
"Brand the Heretic": `Sempre que acertar um inimigo com um ataque armado, aplique <b>Queimadura</b> no alvo`,
"Brazen Inquiry": ` Adicione 1/3 da sua Percepção aos testes de Intimidação e Persuasão. Além disso, aplicar <b>Queimadura</b> a um inimigo dá 2 acúmulos de <b>Piedade</b>. (${Math.round((char.PER / 3))})`,
"Blessed Flames": `Inimigos <b>Queimando</b> recebem 1 dano adicional para cada 6 acúmulos de sua <b>Piedade</b>.`,
"Fervorous Zeal": `Sempre que um inimigo sofre dano devido a <b>Queimadura</b>, cure-se em 4 para cada acúmulo de <b>Queimadura</b> e aumente sua <b>Piedade</b> em 1.`,
"Fiery Cleasing": `Sempre que aplicar <b>Queimadura</b> a um inimigo, adicione +2 acúmulos a mais.`,
"Divine Grace": "Você pode relançar um teste falho uma vez por nível.",
"Pious Devotion": `Sempre que ganhar <b>Piedade</b>, ganhe 2 acúmulos adicionais.`,
"True Calling": `Sempre que lançar uma Chamada Divina, recupere 50 de Força Vital. Você escolhou servir ${char.GOD}.`,
"Holy Ardor": `Comece cada combate com 20 acúmulos de <b>Piedade</b>.`,
"Aura of the Uncaring": `Aumenta seu Dano em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Destreza de Mãos em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Aura of Tyrants": `Aumenta seu Dano em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Intimidação em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Aura of the Dauntless": `Aumenta sua Defesa em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Acrobacia em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Aura of Heroism": `Aumenta sua Defesa em ${char.level < 5 ? 5 : char.level < 10 ? 8 : char.level < 15 ? 11 : 14} e sua Atletismo em 1/3 de sua Percepção. ${Math.round((char.PER / 3))}`,
"Oathkeeper": `Você ganha 3 acúmulos de <b>Piedade</b> pelo nível do Estágio no inicio de cada combate.`,
"Faith of Arms": `${OathArm}`,
"Sacred Cause": `Sempre que você receber mais de 25 de dano em um único golpe, reduza o dano recebido em 5 + 1 para cada 6 acúmulos de <b>Piedade</b>.`,
"Embezoned Armaments": "No inicio de cada turno, ganhe um Ataque Aprimorado. Além disso, seu ataque aprimorado com arma causa 1d6 de dano adicional, adicione outro 1d6 se o alvo for um Demônio, Vampiro ou Morto-Vivo ",
"Champion of Selfishness": "Quando você é atacado, conjure Golpear no atacante se disponível.",
"Champion of Conquest": `Em vez de se curar no final de seu turno, sua <b>Bênção Divina I</b> agora causa dano a cada inimigo.`,
"Champion of Liberty": "Você é imune aos status Atordoado e Impedimento.",
"Champion of Justice": "Aumenta o seu total de Força Vital em 50%, sempre que você é atacado, reduza o dano recebido em 5%",
"Novice": "Aumente seu primeiro dado de teste para um 1d8.",
"Genius Mind": "Aumente os ganhos de Experiência devido a testes em 50%.",
"Jack-of-All-Trades": `Durante testes, adicione +${char.level < 7 ? 2 : char.level < 15 ? 4 : 6} a qualquer Perícia.`,
"Trustworthy Instrument": "Ao equipar um Instrumento, marque-o como Esotérico. Além disso, você ganha +5 em testes de Arte",
"Expert": "Aumente seu primeiro dado de teste para um 1d10 e seu segundo dado de teste para um 1d8.",
"Quick-learner": "Adicionar Habilidades e Feitiços ao seu Repertório leva apenas 1 hora.",
"Winning Smile": `Ao fazer um teste e o resultado seria inferior a 10, adicione 1/3 do seu Carisma ao resultado ${Math.round((char.CHA / 3))})`,
"Master": "Aumente ambos os seus dados de teste para 1d12",
"Transcendance": "Você ganhou +10 pontos de Atributos.",
"Ascencion": "Adicione sua Inteligência ao seu dano e sua Carisma à sua defesa.",
"Well-versed": "Sempre que aprender uma nova Balada, reduza o tempo necessário para 2 horas. Additionally, você pode usar Artes para testes de Conhecimento do Mundo",
"Double Time": "Ao atacar com um Ataque Melhorado, reduza todos os tempos de recarga de habilidades em 1.",
"Legendary Performace": "Aumente sua perícia em Arte em 10, em seguida, aumente sua Essência pela sua perícia em Arte.",
"Triple Time": "Seus Ataques Melhorados causam mais dano e realizam um ataque adicional.",
"Magnum Opus": "Suas Habilidades do Tipo 'Buff' e 'Debuff' duram um turno adicional e você se cura pela duração.",
"Blade Dancer": `Armas Cortantes contam como instrumentos para você. Ao empunhar uma, aumente sua Defesa em 1/3 do seu Carisma. Adicionalmente, você pode utilizar Artes para testes de Acrobacia. ${Math.round((char.CHA / 2))})`,
"Tempo I": "Na primeira vez que lançar um feitiço a cada turno, faça um ataque com arma contra um inimigo aleatório.",
"Graceful Steps": "Depois de desviar de um ataque, ganhe um ponto de Ação.",
"Tempo II": "Na primeira vez que lançar um feitiço a cada turno, faça um ataque com arma contra um inimigo aleatório. Atualize sempre que lançar uma Balada.",
"Rythimic Strike": `Sempre que realizar um ataque armado, cause 1/2 do seu Carisma como dano ao alvo. (${Math.round((char.CHA / 2))})`,
"Arcane Initiation": "Você adicionou as Habilidades 'Raio de Fogo', 'Golpe de Relâmpago' e 'Congelar' ao seu Repertório. Essas habilidades custam 3 de Essência a menos.",
"Arcane Mastery": "Você adicionou as Habilidades 'Inferno', 'Tempestade' e 'Nevasca' ao seu Repertório. Ao conjurar uma dessas habilidades, você rola o Dano duas vezes e escolhe o maior resultado.",
"Overflow": `No início de cada turno, recupere Essência igual a 1/3 da sua Inteligência. (${Math.round((char.INT / 3))})`,
"Mystical Arsenal": "Sempre que lançar uma Magia Arcana, aumente seu Dano em 5.",
"Overflow II": `No início de cada turno, recupere Essência igual a 1/2 da sua Inteligência. (${Math.round((char.INT / 2))})`,
"Intellect Empowerment": "Sempre que lançar uma magia contra um unico inimigo, cause metade da sua Inteligência como dano no mesmo alvo.",
"Overflow III": `No início de cada turno, recupere Essência igual a sua Inteligência. (${char.INT})`,
"Essence Renewal": "Sempre que lançar uma magia, recupere Força Vital igual ao seu custo.",
"Great Sacrifice": `Reduza seu total de Força Vital em 10%, adicione ${2 * char.level} ao seu Dano.`,
"Masterful Dark Magic": `Sempre que lançar uma magia de Pacto, se machuque em 3 para machucar todos os inimigos em 1/3 da sua Resiliência. (${Math.round((char.RES / 3))})`,
"Masterful Hemomancy": `Sempre que lançar uma magia de Pacto, cure-se em 3 para cada inimigo <b>Sangrando</b>, depois aplique <b>Sangramento</b> a todos os inimigos que não estejam <b>Sangrando</b> por 2 turnos.`,
"Masterful Necromancy": "Sempre que lançar uma magia de Pacto, invoque um Escravo Morto-Vivo.",
"Second Deal": `Segundo Pacto Escolhido: ${char.secondPact} ${textForSecondPact}`,
"Magic Drainer": "No início de seu turno, drene 5% da Essência e da Força Vital de todos os inimigos.",
"Bonded Existence": "Sempre que você invoca uma Invocação, aumente seu Dano em 3, além disso, para cada Invocação feita, recupere 7% de sua Essência perdida.",
"Improved Summons": `Quando você invoca uma nova invocação, aumente a Força Vital dela em 1/2 de sua Inteligência e seus atributos em 3. (${Math.round((char.INT / 2))})`,
"Master Summoner": "Diminua pela metade o custo de suas invocações. Além disso, quando uma invocação seria destruída, recupere Essência igual ao seu custo original.",
"Masterful Summons": `Aumente a Força Vital de suas Invocações pela sua Inteligência e seus atributos em 6. (${char.INT})`,
"Iron Suit": "Para cada slot equipado, aumente sua Defesa em 1.",
"Titanic": `Quando acima de 70% da sua Vida, aumente seu Dano e Chance de Acerto em ${char.level < 5 ? 5 : char.level > 10 ? 10 : 15}.`,
"Champion's Might": `Adicione 1/2 da sua resiliência ao seu Dano e à sua Atletismo. (${Math.round((char.RES / 2))})`,
"Spiked": `Quando você é atacado, cause dano igual a 10% da sua Defesa contra seu atacante. ${Math.round(((char.Defense + char.additionalDefense) * 0.1))}`,
"Unending Vigor": "No início de cada turno, recupere 3% de sua Força Vital perdida.",
"Body Slam": `Durante o combate, se seu Dano for menor que sua Defesa, aumente seu Dano para o valor da sua Defesa. ${totalDefense}`,
"Though Skin": `Quando estiver com menos de 50% da sua vida, reduza todo o dano recebido em ${char.level < 5 ? 3 : char.level < 10 ? 5 : char.level < 15 ? 7 : 9}.`,
"Bloodthirst": "Seus ataques armados causam dano adicional igual a 5% da Força Vital atual do alvo. Caso sua arma possua o traço Visceral, aumente o dano para 7%.",
"Overwhelming Strength": "Quando você faz um ataque e erra, cause dano ao alvo igual a 1/3 do Dano.",
"Unyelding": "Quando você seria morto por um ataque, faça um ataque, se matar seu atacante, recupere 15% da sua vida perdida. Só pode acontecer uma vez por batalha.",
"Natural Fighter": `Para cada slot de equipamento desequipado, aumente seu Dano em ${char.level < 8 ? 2 : char.level < 14 ? 3 : 4} e sua Defesa em ${char.level < 8 ? 1 : char.level < 14 ? 2 : 3}.`,
"Savagery": "Aumente o dano do seu punho principal e do punho/secundário em 1 passo. Além disso, sua mão sêcundária ganha o traço de arma mesmo quando desequipada.",
"Blood Frenzy": "Você recupera 12.5% do Dano causado como Força Vital",
"Primal Fury": "Quando desarmado, ao causar 20 ou mais de Dano com Ataques aplique <b>Confusão</b> ao alvo.",
"Elemental Afinity I":"Você adicionou as Habilidades 'Chuva' e 'Mudança de Marés' ao seu Repertório.",
"Elemental Afinity II":"Você adicionou as Habilidades 'Surto de Relâmpagos' e 'Ventos Fortes' ao seu Repertório.",
"Elemental Afinity III":"Você adicionou as Habilidades 'Erupção' e 'Golpe Incandescente' ao seu Repertório.",
"Elemental Afinity IV":"Você adicionou as Habilidades 'Tremores' e 'Corpo de Pedra' ao seu Repertório.",
"Wild Surge": "No final de seu turno, seus Totens causam 1 de Dano a todos os inimigos.",
"Totem Carver": "Ao Invocar um Totem, aprimore-o.",
"Nimble Fingers": "Durante o combate, você ganha 15% mais Ouro ao derrotar inimigos. Além disso, você pode roubar de personagens da história (NPCs).",
"Lethality": "Ataques contra alvos com saúde total causam 1d10 de Dano extra.",
"Gambler": "Reduza um dos seus dados de teste para 1d4, mas aumente o outro para 1d10.",
"Sneaky": `Você começa cada combate <b>Escondido</b>. Enquanto estiver escondido, seu próximo ataque causa 1d8 de dano extra`,
"Lethality II": `Ataques contra alvos com saúde total causam 1d10 de dano extra e aplicam tanto <b>Veneno</b>.`,
"Into the Shadows": `Se um ataque matar um inimigo, fique <b>Escondido</b>`,
"Sure-Death": `Inimigos não perdem mais acumulações de <b>Veneno</b>.`,
"Deep Pockets": "Sempre que utilizar a Habilidade 'Disarm', você tem a chance de roubar o item.",
"Professional Robber": `Você adiciona seu nível nos Testes de Destreza de Mãos e Furtividade. (${char.level})`,
"Hoarder": `Aumente seu Dano em 1/3 do seu Ouro. ${Math.round((char.Gold / 3))}`,
"Spell Thief": "Sempre que um inimigo usa uma Habilidade, você tem a chance de aprender a Habilidade.",
"Eye for Detail": "Você sempre encontra segredos",
"Secret Stash": "Você sempre será considerado ter a ferramenta certa para o trabalho. Como uma corda, lanterna ou gazua",
"Hidden Machinations": "Durante testes, você rola 1d6 e adiciona ao resultado. Caso a Perícia do teste seja Destreza de Mãos, Conhecimento do Mundo ou Discernimento, você rola outro 1d6 e escolhe o maior resultado",
"Faceless Shadow": "Você sempre obtêm sucesso em testes de Furtividade",
"Phalanx Training": "Postura Defensiva: Você ganha +3 de Defesa adicional com base no número de inimigos vivos. Além disso, quando você faz um ataque com arma enquanto empunha um escudo na sua mão secundária, você realiza um ataque com seu escudo, causando 1d4 de dano e ganhando o atributo 'Contundente'.",
"Weapon Mastery": `Suas armas aplicam efeitos adicionais com base no tipo de dano delas. (Contundente - Aplica Confusão no alvo. | Cortante - Aplica Sangramento por 2 turnos. | Perfurante - Diminui a defesa do alvo em 5. | Arma de Fogo - têm 30% de chance de causar 75% de Dano Adicional)`,
"Shielded Assault": "Postura Ofensiva: Você ganha +3 de Chance de Acerto adicional com base no número de inimigos vivos. Além disso, quando você acerta um inimigo com seu escudo, você aumenta o dano causado pela sua Defesa.",
"Tactical Genius": "Suas Habilidades que custam três ou mais Pontos de Ação custam um ponto a menos.",
"Survivalist": `Aumenta o bônus da sua <b>Postura Defensiva</b> e <b>Postura Ofensiva</b> e aumenta o dado de dano do seu Escudo para 2d4`,
"Second Wind": "Durante cada combate, na primeira vez que você atinge abaixo de 25% da sua Força Vital, você se cura em 35% da sua Força Vital perdida.",
"Arcane Aegis": "Reduz o dano recebido por Magias em 20% enquanto empunha um Escudo.",
"Shield wall": "Dobra a Defesa fornecida pelo seu Escudo.",
"Spare Arrows": "Após matar um inimigo com uma arma de longo alcance, reduza o tempo de recarga da sua arma em 1.",
"Follow-up": `Após usar uma habilidade ofensiva, cause 1d4 de dano a um inimigo aleatório. Isso é afetado por <b>Pontos Frapadas<b> e <b>Flechas Perfurantes de Dragão</b>. Se você possuir uma arma de longo alcance com o atributo Leve em sua mão secundária, faça um ataque com essa arma, em vez disso.`,
"Barbed Points": "Quando calculando Dano, aumente o número de dados das suas armas de longo alcance em 1.",
"Dragon Piercing Arrows": "Quando calculando Dano, aumente o dado de dano das suas armas de longo alcance em 1 estágio",
"Headshot": "Seus ataques com armas de longo alcance têm 20% de chance de executar inimigos não-Chefes e não-Mortos-Vivos",
"Natural Reflexes": "No final do seu turno, ganhe Riposte",
"Graceful": "Ao empunhar apenas uma arma de uma mão nas suas mãos, aumente sua Defesa e Chance de Acerto em 10.",
"Bon Mot": "Após matar um inimigo, cure-se em 10% da sua Força Vital perdida.",
"Firm Hand": "Ao empunhar apenas uma arma de uma mão, sempre que você fizer um ataque com arma, faça um ataque adicional.",
"Masterful Efficiency": "Riposte não desaparece mais depois de você atingir um inimigo.",
"Penitent Strike": `Ao atacar um inimigo, causa 50% de dano extra a você e ao alvo. Se você ou o alvo estiverem afetados por <b>Sangramento</b>, cure-se em ${Math.round((char.MAXLIFE * 0.06))}% de sua Força Vital máxima.`,
"Bloody Embrace": `Ao ser atacado por um inimigo, reduz o dano recebido em 50%. Converta o dano em <b>Sangramento</b> (para cada 6 pontos de dano, ganhe 1 acúmulo de Sangramento) e depois ganhe uma acúmulo de Piedade. Você não pode mais morrer devido a <b>Sangramento</b>.`,
"Pious Resilience": "Aumenta seu Lifeblood máximo em 25%. No início do seu turno, enquanto seu Sangeu Vital estiver abaixo de 50%, ganhe 3 acúmulos de Piety.",
"Divine Atonement": "Sempre que você for afetado por um efeito de status, ganhe uma acúmulo de Piedade.",
"Zealous Reckoning": "Sempre que um inimigo ataca você, você reflete 30 + (+1% para cada acúmulo de Piedade)% do Dano recebido de volta ao atacante.",
"Martyrdom": "Os ataques inimigos não podem mais errar você. Em compensação, dobre sua força vital máxima.",
"Lay-in-wait": "Para cada ponto de ação não gasto, aumente sua chance de acerto em +6 com armas de longo alcance. e +3 com armas brancas.",
"Trapsmith": "No início de cada combate, você coloca 3 armadilhas aleatórias ativadas quando o inimigo ataca você. Apenas 1 armadilha pode ser ativada a cada turno.",
"Poacher": "Quando um inimigo ativar uma Armadilha, faça um ataque com arma contra ele. Se sua arma estiver em Tempo de Recarga, recarregue-a primeiro.",
"Master trapper": "Master trapper: Melhore suas armadilhas.",
"Hit-and-Run": "Depois de causar dano a um inimigo com um ataque, recue uma armadilha que foi ativada.",
"Sniper Shot": "Para cada Ponto de Ação não gasto, aumente os dados de Dano da arma em 1 estágio. Se os dados de dano da arma já forem maiores que um d12, aumente o número de Dados em 1. Depois disso, gaste todos os seus Pontos de ação.",
"Shredder Stance": "Você ganha acesso à habilidade 'Postura do Retalhador'.",
"Flurry": "Sempre que você fizer um ataque com arma com a mão improvisada, faça um ataque adicional sem custo, este ataque tem -15 de Chance de Acerto, -30 se a arma for pesada. Se a arma estiver em Cooldown, reduza seu Recarga em 1, em vez disso.",
"Momentum": "Sempre que você errar um inimigo com um ataque com arma, aumente sua chance de acerto em 7. Reinicia sempre que você acertar um inimigo.",
"Lunging Stance": "Você ganha acesso à habilidade 'Postura de Assalto'",
"Impossible Flurry": "Sempre que você fizer um ataque com arma com a mão principal ou secundária, faça um ataque adicional sem custo, este ataque tem -15 na Chance de Acerto, -30 se a arma for pesada. Se a arma estiver em Cooldown , reduza seu Tempo de Recarga em 1.",
"Stance Master": "Enquanto estiver na Postura do Retalhador, você faz um ataque adicional por arma em mão sem custo, mas reduz sua chance de acerto em 10. Se a arma estiver em cooldown, reduza-a em 1. Enquanto estiver na Postura de Assalto, seus dois primeiros ataques com arma serão beneficiados pelo bônus.",
"Arma Arcana": `Você adicionou a 'Invocar Lâmina Arcana' ao seu Repertório, o dano da arma aumenta em 1d8 nos níveis 5, 10 e 15. Enquanto empunha a Lâmina Arcana, lançar um Feitiço concede a você um Ataque Aprimorado que causa 1/2 de sua Inteligência como Dano adicional. (${Math.round((char.INT / 2))})`,
"Arcane Armory": `Enquanto empunhar a Lâmina Arcana, aumente sua Defesa para ser igual à sua Inteligência, se não for maior. (${char.INT})`,
"Mystical Arts": "Você adicionou as habilidades 'Surto de Lâminas' e 'Golpe Espectral' ao seu repertório. Enquanto empunha a Lâmina Arcana, sempre que você fizer um ataque com arma, recupere 5 Essências.",
"Eldritch Knight": "Armadura Pesada não aumenta mais o custo de Essência de Habilidades Mágicas.",
"Runic Mastery": "Agora você pode encantar seu próprio equipamento do seu inventário, são necessárias 3 horas e 35 Essência para encantar um equipamento.",
"Mage Slayer": "Enquanto empunha a Lâmina Arcana, sempre que um inimigo lançar um Feitiço contra você, faça um ataque com arma contra ele.",
"Cirurgic Precision": "Reduza a quantidade necessária para realizar um ataque Crítico para ser pelo menos 1,75X a Defesa do alvo.",
"Bloody mess": `Sempre que você realizar um ataque Crítico, aplique <b>Sangramento</b> no alvo por 3 turnos. Você adiciona 1/2 de sua Carisma à Chance de Acerto contra alvos <b>Sangrando</b>. (${Math.round((char.CHA / 2))})`,
"Battle-Medic": "Sempre que você for atingido, ganhe Regeneração(2). Aumente toda a cura recebida em 5.",
"Precisão Cirúrgica Melhorada": "Reduza a quantidade necessária para realizar um ataque Crítico para 1,5X a Defesa do alvo.",
},
};
let specialtraits = [];
let traitlist = ["Divine Foundation", "Divine Blessings I", "Brand the Heretic", "Brazen Inquiry", "Fervorous Zeal", "Fiery Cleasing", "Pious Devotion", "Holy Ardor", "Aura of the Uncaring", "Aura of Tyrants", "Aura of the Dauntless", "Aura of Heroism", "Oathkeeper", "Faith of Arms","Embezoned Armaments", "Trustworthy Instrument", "Ascencion", "Double Time", "Magnum Opus", "Blade Dancer", "Tempo I", "Graceful Steps", "Arcane Initiation", "Arcane Mastery", "Rythimic Strike", "Overflow", "Mystical Arsenal", "Intellect Empowerment", "Essence Renewal", "Great Sacrifice", "Masterful Dark Magic", "Masterful Hemomancy", "Masterful Necromancy", "Magic Drainer", "Bonded Existence", "Improved Summons", "Master Summoner", "Iron Suit", "Titanic", "Champion's Might", "Spiked", "Unending Vigor", "Body Slam", "Though Skin", "Bloodthirst", "Overwhelming Strength", "Unyelding", "Natural Fighter", "Savagery", "Blood Frenzy", "Primal Fury", "Elemental Afinity I", "Elemental Afinity II", "Elemental Afinity III", "Elemental Afinity IV", "Wild Surge", "Totem Carver", "Nimble Fingers", "Lethality", "Sneaky", "Into the Shadows", "Sure-Death", "Hoarder", "Spell Thief", "Phalanx Training", "Weapon Mastery", "Shielded Assault", "Tactical Genius", "Second Wind", "Arcane Aegis", "Shield wall", "Spare Arrows", "Follow-up", "Barbed Points", "Dragon Piercing Arrows", "Headshot", "Natural Reflexes", "Graceful", "Bon Mot", "Firm Hand", "Masterful Efficiency", "Penitent Strike", "Bloody Embrace", "Pious Resilience", "Zealous Reckoning", "Martyrdom", "Lay-in-wait", "Trapsmith", "Sniper Shot", "Flurry", "Momentum", "Arcane Weapon", "Eldritch Knight", "Cirurgic Precision", "Bloody mess", "Battle-Medic"]
if (char.traits.includes("Improved Summons")) {
traitlist.push("Masterful Summons");
}
if (char.traits.includes("Arcane Weapon")) {
traitlist.push("Arcane Armory", "Mage Slayer", "Mystical Arts");
}
if (char.traits.includes("Flurry")) {
traitlist.push("Impossible Flurry");
}
if (char.traits.includes("Cirurgic Precision")) {
traitlist.push("Improved Cirurgic Precision");
}
if (char.skills.includes("Lunging Stance") || char.skills.includes("Shredder Stance") || char.skills.includes("Scoping Stance")) {
traitlist.push("Stance Master");
}
if (char.traits.includes("Trapsmith")) {
traitlist.push("Skirmish Tactics", "Master trapper", "Hit-and-Run");
}
if (char.traits.includes("Divine Blessings I")) {
traitlist.push("Divine Blessings II");
if (!(traitlist.includes("Sacred Cause") && traitlist.includes("Blessed Flames"))) {
traitlist.push("Sacred Cause", "Blessed Flames")
}
} else if (char.traits.includes("Divine Blessings II")) {
traitlist.push("Divine Blessings III");
if (!(traitlist.includes("Sacred Cause") && traitlist.includes("Blessed Flames"))) {
traitlist.push("Sacred Cause", "Blessed Flames")
}
}
if (char.traits.includes("Oathkeeper")) {
if (!(traitlist.includes("Sacred Cause") && traitlist.includes("Blessed Flames"))) {
traitlist.push("Sacred Cause", "Blessed Flames")
}
}
if (char.traits.includes("Phalanx Training") || char.traits.includes("Shielded Assault")) {
traitlist.push("Survivalist");
}
if (char.traits.includes("Overflow")) {
traitlist.push("Overflow II");
} else if (char.traits.includes("Overflow II")) {
traitlist.push("Overflow III");
}
if (char.traits.includes("Tempo I")) {
traitlist.push("Tempo II");
}
if (char.traits.includes("Lethality")) {
traitlist.push("Lethality II");
}
if (char.traits.includes("Double Time")) {
traitlist.push("Triple Time");
}
let remove = [];
if (char.traits.includes("Aura of the Uncaring")) {
remove.push("Aura of Tyrants", "Aura of the Dauntless", "Aura of Heroism");
traitlist.push("Champion of Selfishness");
} else if (char.traits.includes("Aura of Tyrants")) {
remove.push("Aura of the Uncaring", "Aura of the Dauntless", "Aura of Heroism");
traitlist.push("Champion of Conquest");
} else if (char.traits.includes("Aura of the Dauntless")) {
remove.push("Aura of the Uncaring", "Aura of Tyrants", "Aura of Heroism");
traitlist.push("Champion of Liberty");
} else if (char.traits.includes("Aura of Heroism")) {
remove.push("Aura of the Uncaring", "Aura of Tyrants", "Aura of the Dauntless");
traitlist.push("Champion of Justice");
}
let index = null
if (char.traits.length > 0) {
char.traits.forEach(trait=>{
index = traitlist.indexOf(trait);
if (index !== -1) {
traitlist.splice(index, 1);
}
})
}
// Remove traits
remove.forEach(trait => {
index = traitlist.indexOf(trait);
if (index !== -1) {
traitlist.splice(index, 1);
}
});
let stage = State.variables.arenaStage;
let numbers = [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38];
let numbers2 = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40];
let choosing = traitlist.randomMany(5);
let arenatext = arenapage.innerHTML;
let page = State.temporary.page;
if (numbers2.includes(stage)) {
arenatext = `
<table>
<tr>
<th></th>
<th></th>
<th>Choose a Trait</th>
<th></th>
<th></th>
</tr>
<tr>
<td><a onClick="addFighter('${choosing[0]}', 'trait')">${traits[selectedLanguage][choosing[0]]}</a></td>
<td><a onClick="addFighter('${choosing[1]}', 'trait')">${traits[selectedLanguage][choosing[1]]}</a></td>
<td><a onClick="addFighter('${choosing[2]}', 'trait')">${traits[selectedLanguage][choosing[2]]}</a></td>
<td><a onClick="addFighter('${choosing[3]}', 'trait')">${traits[selectedLanguage][choosing[3]]}</a></td>
<td><a onClick="addFighter('${choosing[4]}', 'trait')">${traits[selectedLanguage][choosing[4]]}</a></td>
</tr>
<tr>
<td>${traitText[selectedLanguage][choosing[0]]}</td>
<td>${traitText[selectedLanguage][choosing[1]]}</td>
<td>${traitText[selectedLanguage][choosing[2]]}</td>
<td>${traitText[selectedLanguage][choosing[3]]}</td>
<td>${traitText[selectedLanguage][choosing[4]]}</td>
</tr>
</table>`;
arenapage.innerHTML = arenatext;
} else if (numbers.includes(stage)) {
let skillChoices = [];
for (let skillName in State.variables.skill) {
let skill = State.variables.skill[skillName];
if (skill.Name !== "Howl" && skill.Name !== "Escape" && skill.Name !== "Pickpocket" && skill.Name !== "Bribe") {
skillChoices.push(skill);
}
}
if (char.skills.length > 0) {
char.skills.forEach(skill => {
let index = skillChoices.findIndex(choice => choice.Name === skill.Name);
if (index !== -1) {
skillChoices.splice(index, 1);
}
});
}
let chosenSkills = skillChoices.randomMany(5);
arenatext = `<table>
<tr>
<th></th>
<th></th>
<th>Choose a Skill</th>
<th></th>
<th></th>
</tr>
<tr>
<td><a onClick="addFighter('${chosenSkills[0].name}', 'skill')">${chosenSkills[0].name}</a></td>
<td><a onClick="addFighter('${chosenSkills[1].name}', 'skill')">${chosenSkills[1].name}</a></td>
<td><a onClick="addFighter('${chosenSkills[2].name}', 'skill')">${chosenSkills[2].name}</a></td>
<td><a onClick="addFighter('${chosenSkills[3].name}', 'skill')">${chosenSkills[3].name}</a></td>
<td><a onClick="addFighter('${chosenSkills[4].name}', 'skill')">${chosenSkills[4].name}</a></td>
</tr>
<tr>
<td>${chosenSkills[0].categories}</td>
<td>${chosenSkills[1].categories}</td>
<td>${chosenSkills[2].categories}</td>
<td>${chosenSkills[3].categories}</td>
<td>${chosenSkills[4].categories}</td>
</tr>
<tr>
<td>AP cost: ${chosenSkills[0].APCost} | Essence cost: ${chosenSkills[0].Manacost}</td>
<td>AP cost: ${chosenSkills[1].APCost} | Essence cost: ${chosenSkills[1].Manacost}</td>
<td>AP cost: ${chosenSkills[2].APCost} | Essence cost: ${chosenSkills[2].Manacost}</td>
<td>AP cost: ${chosenSkills[3].APCost} | Essence cost: ${chosenSkills[3].Manacost}</td>
<td>AP cost: ${chosenSkills[4].APCost} | Essence cost: ${chosenSkills[4].Manacost}</td>
</tr>
<tr>
<td>${chosenSkills[0].description}</td>
<td>${chosenSkills[1].description}</td>
<td>${chosenSkills[2].description}</td>
<td>${chosenSkills[3].description}</td>
<td>${chosenSkills[4].description}</td>
</tr>
</table>`;
arenapage.innerHTML = arenatext;
} else {
window.showItemDetails();
}
}
window.addFighter = function(name, type) {
let char = State.variables.character[1];
if (type === 'skill') {
char.addSkill(name);
} else if (type === 'trait') {
char.addTrait(name);
}
window.showItemDetails();
}
window.showItemDetails = function() {
let char = State.variables.character[1];
var arenapage = document.getElementById('Arena');
let stage2 = `
<table>
<tr>
<th></th>
<th></th>
<th>Shop</th>
<th></th>
<th></th>
</tr>
`;
for (let itemName in State.variables.Items) {
let item = State.variables.Items[itemName];
if (!(item.Type.includes("bornwith") || item.Type.includes("consumable") || item.Type.includes("object") || item.Type.includes("food") || item.Name === "Handle" || item.Name == "Rations" ||item.Name === "Rock") && item.Price < char.Gold) {
stage2 += `
<tr>
<td>${item.Name}</td>
`
if (item.Defense !== null) {
stage2 += `<td>Defense: ${item.Defense}</td>`
} else {
stage2 += `<td>Defense: - </td>`
}
if (item.Damage !== null) {
stage2 += `<td>Damage: ${item.Damage}</td>`
} else {
stage2 += `<td>Damage: - </td>`
}
stage2 +=`<td>Price: ${item.Price}</td>
<td><a onClick="window.buyEquip('${item.Name}')">Buy it</a></td>
</tr>`
;
}
}
stage2 += `
</table>
`;
arenapage.innerHTML = stage2;
}
window.buyEquip = function(itemname) {
let char = State.variables.character[1];
let item = State.variables.Items[itemname];
char.Gold -= item.Price;
addItemToInventory(itemname);
equipItem(itemname);
window.showItemDetails();
var equipmentShow = document.getElementById('arenaequip');
let text = `
Gold: ${char.Gold}
`;
equipmentShow.innerHTML = text
}
State.variables.gladiators = []
const OrcGladiator = new character();
OrcGladiator.Name = "Kahmmurge";
OrcGladiator.Pact = "";
OrcGladiator.secondPact = "";
OrcGladiator.Oath = "Conquest",
OrcGladiator.GOD = "",
OrcGladiator.STR = 15;
OrcGladiator.DEX = 6;
OrcGladiator.RES = 9;
OrcGladiator.INT = 5;
OrcGladiator.CHA = 6;
OrcGladiator.PER = 3;
OrcGladiator.Ancestry = "Orc";
OrcGladiator.Specialization = "Gladiator";
OrcGladiator.Origin = "Unknown";
OrcGladiator.AP = 0;
OrcGladiator.APregen = 2;
OrcGladiator.BaseDefense = 10;
OrcGladiator.level = 2;
OrcGladiator.experience = 0;
OrcGladiator.MAXLIFE = 20 + 12 + OrcGladiator.RES;
OrcGladiator.MAXMANA = 10 + 10 + OrcGladiator.INT ;
OrcGladiator.currentLife = OrcGladiator.MAXLIFE
OrcGladiator.currentMana =OrcGladiator.MAXMANA
OrcGladiator.experience = 0;
OrcGladiator.availableAttribute = 3;
OrcGladiator.traits = [];
OrcGladiator.skills = [];
OrcGladiator.addTrait("Second Wind")
OrcGladiator.addTrait("Hardy")
OrcGladiator.addSkill("War Cry")
OrcGladiator.inventory = [];
OrcGladiator.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
mainhand: State.variables.Items.Fist,
offhand: State.variables.Items["Other hand"]
};
OrcGladiator.Gold = 0;
OrcGladiator.statusEffects = {
hidden: false,
blind: false,
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
improvedAttacks: 0,
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
State.variables.gladiators.push(OrcGladiator);
const GoblinGladiator = new character();
GoblinGladiator.Name = "Stahb";
GoblinGladiator.Pact = "";
GoblinGladiator.secondPact = "";
GoblinGladiator.Oath = "Selfishness",
GoblinGladiator.GOD = "",
GoblinGladiator.STR = 6;
GoblinGladiator.DEX = 18;
GoblinGladiator.RES = 3;
GoblinGladiator.INT = 4;
GoblinGladiator.CHA = 6;
GoblinGladiator.PER = 9;
GoblinGladiator.Ancestry = "Goblin";
GoblinGladiator.Specialization = "Gladiator";
GoblinGladiator.Origin = "Unknown";
GoblinGladiator.AP = 0;
GoblinGladiator.APregen = 2;
GoblinGladiator.BaseDefense = 10;
GoblinGladiator.level = 2;
GoblinGladiator.experience = 0;
GoblinGladiator.MAXLIFE = 20 + 12 + GoblinGladiator.RES;
GoblinGladiator.MAXMANA = 10 + 10 + GoblinGladiator.INT;
GoblinGladiator.currentLife = GoblinGladiator.MAXLIFE;
GoblinGladiator.currentMana = GoblinGladiator.MAXMANA;
GoblinGladiator.experience = 0;
GoblinGladiator.availableAttribute = 3;
GoblinGladiator.traits = [];
GoblinGladiator.skills = [];
GoblinGladiator.addTrait("Annoying")
GoblinGladiator.addTrait("Sneaky")
GoblinGladiator.addSkill("Sneak")
GoblinGladiator.inventory = [];
GoblinGladiator.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
mainhand: State.variables.Items.Fist,
offhand: State.variables.Items["Other hand"]
};
GoblinGladiator.Gold = 0;
GoblinGladiator.statusEffects = {
hidden: false,
blind: false,
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
improvedAttacks: 0,
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
State.variables.gladiators.push(GoblinGladiator);
const HumanGladiator = new character();
HumanGladiator.Name = "Kalal";
HumanGladiator.Pact = "";
HumanGladiator.secondPact = "";
HumanGladiator.Oath = "Liberty", //3
HumanGladiator.GOD = "",
HumanGladiator.STR = 8;
HumanGladiator.DEX = 8;
HumanGladiator.RES = 6;
HumanGladiator.INT = 8;
HumanGladiator.CHA = 7;
HumanGladiator.PER = 8;
HumanGladiator.Ancestry = "Human";
HumanGladiator.Specialization = "Gladiator";
HumanGladiator.Origin = "Unknown";
HumanGladiator.AP = 0;
HumanGladiator.APregen = 2;
HumanGladiator.BaseDefense = 10;
HumanGladiator.level = 2;
HumanGladiator.experience = 0;
HumanGladiator.MAXLIFE = 20 + 12 + HumanGladiator.RES;
HumanGladiator.MAXMANA = 10 + 10 + HumanGladiator.INT;
HumanGladiator.currentLife = HumanGladiator.MAXLIFE;
HumanGladiator.currentMana = HumanGladiator.MAXMANA;
HumanGladiator.experience = 0;
HumanGladiator.availableAttribute = 3;
HumanGladiator.traits = [];
HumanGladiator.skills = [];
HumanGladiator.addTrait("Opportunistic")
HumanGladiator.addTrait("Desperate")
HumanGladiator.addSkill("Disarm")
HumanGladiator.inventory = [];
HumanGladiator.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
mainhand: State.variables.Items.Fist,
offhand: State.variables.Items["Other hand"]
};
HumanGladiator.Gold = 0;
HumanGladiator.statusEffects = {
hidden: false,
blind: false,
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
improvedAttacks: 0,
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
State.variables.gladiators.push(HumanGladiator);
const DraconianGladiator = new character();
DraconianGladiator.Name = "Varsh'ai";
DraconianGladiator.Pact = "";
DraconianGladiator.secondPact = "";
DraconianGladiator.Oath = "Justice",
DraconianGladiator.GOD = "",
DraconianGladiator.STR = 9;
DraconianGladiator.DEX = 6;
DraconianGladiator.RES = 12;
DraconianGladiator.INT = 6;
DraconianGladiator.CHA = 3;
DraconianGladiator.PER = 9;
DraconianGladiator.Ancestry = "Draconian";
DraconianGladiator.Specialization = "Gladiator";
DraconianGladiator.Origin = "Unknown";
DraconianGladiator.AP = 0;
DraconianGladiator.APregen = 2;
DraconianGladiator.BaseDefense = 15;
DraconianGladiator.level = 2;
DraconianGladiator.experience = 0;
DraconianGladiator.MAXLIFE = 20 + 12 + DraconianGladiator.RES;
DraconianGladiator.MAXMANA = 10 + 10 + DraconianGladiator.INT;
DraconianGladiator.currentLife = DraconianGladiator.MAXLIFE;
DraconianGladiator.currentMana = DraconianGladiator.MAXMANA;
DraconianGladiator.experience = 0;
DraconianGladiator.availableAttribute = 3;
DraconianGladiator.traits = [];
DraconianGladiator.skills = [];
DraconianGladiator.addTrait("Natural Warriors")
DraconianGladiator.addTrait("Apex Hunter")
DraconianGladiator.addSkill("Bite")
DraconianGladiator.inventory = [];
DraconianGladiator.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
mainhand: State.variables.Items["Draconian claw"],
offhand: State.variables.Items["Other Draconian claw"]
};
DraconianGladiator.Gold = 0;
DraconianGladiator.statusEffects = {
hidden: false,
blind: false,
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
improvedAttacks: 0,
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
State.variables.gladiators.push(DraconianGladiator);
const VampireGladiator = new character();
VampireGladiator.Name = "Karina";
VampireGladiator.Pact = "";
VampireGladiator.secondPact = "";
VampireGladiator.Oath = "Selfishness",
VampireGladiator.GOD = "",
VampireGladiator.STR = 4;
VampireGladiator.DEX = 9;
VampireGladiator.RES = 6;
VampireGladiator.INT = 12;
VampireGladiator.CHA = 8;
VampireGladiator.PER = 6;
VampireGladiator.Ancestry = "Vampyre";
VampireGladiator.Specialization = "Gladiator";
VampireGladiator.Origin = "Unknown";
VampireGladiator.AP = 0;
VampireGladiator.APregen = 2;
VampireGladiator.BaseDefense = 10;
VampireGladiator.level = 2;
VampireGladiator.experience = 0;
VampireGladiator.MAXMANA = 10 + 10 + VampireGladiator.INT;
VampireGladiator.MAXLIFE = 20 + 12 + VampireGladiator.RES + VampireGladiator.MAXMANA;
VampireGladiator.currentLife = VampireGladiator.MAXLIFE;
VampireGladiator.currentMana = VampireGladiator.MAXMANA;
VampireGladiator.experience = 0;
VampireGladiator.availableAttribute = 3;
VampireGladiator.traits = [];
VampireGladiator.skills = [];
VampireGladiator.addTrait("Bloodthirst")
VampireGladiator.addTrait("Vampyric Hunger")
VampireGladiator.addSkill("Blood Cast")
VampireGladiator.inventory = [];
VampireGladiator.equipment = {
head: State.variables.Items["Empty Head"],
torso: State.variables.Items["Empty Torso"],
waist: State.variables.Items["Empty Waist"],
legs: State.variables.Items["Empty Legs"],
feet: State.variables.Items["Empty Feet"],
mainhand: State.variables.Items["Fist"],
offhand: State.variables.Items["Other hand"]
};
VampireGladiator.Gold = 0;
VampireGladiator.statusEffects = {
hidden: false,
blind: false,
poison: 0, // Turns remaining for Poison effect
bleed: 0, // Turns remaining for Bleed effect
regeneration: 0, // Turns remaining for Regeneration effect
stunned: 0, // Turns remaining for Stunned effect
confusion: 0, // Turns remaining for Confusion effect
improvedAttacks: 0,
hindered: 0,
burn: {
stacks: 1,
damage: 6,
duration: 0,
}
};
State.variables.gladiators.push(VampireGladiator);<div id="Arena"><<set _page = 0>>
<h2>Attributes:</h2>
You have <span id="current-avlb-attr"><<print $character[1].availableAttribute>></span> Points remaining.
<hr>
<table>
<tr>
<td> <abbr title="Affects hit chance for Melee weapons, as well as damage on Heavy or Versatile weapons.">STRENGTH:</abbr> </td>
<td> <abbr title="Affects hit chance for Melee weapons, as well as damage on Agile or Versatile weapons.">DEXTERITY:</abbr> </td>
<td> <abbr title="Affects only your Lifeblood (Life).">RESILIENCE:</abbr> </td>
<td> <abbr title="Mainly used for its expertises, it also affects your Essence (Mana) and the majority of abilities.">INTELLIGENCE:</abbr> </td>
<td> <abbr title="Mainly used for its expertise, it also affects some abilities.">CHARISMA:</abbr> </td>
<td> <abbr title="Affects hitchance for Ranged weapons, as well as some abilities.">PERCEPTION:</abbr> </td>
</tr>
<tr>
<td><span id="current-attr-STR"><<print $character[1].STR>></span> </td>
<td><span id="current-attr-DEX"><<print $character[1].DEX>></span></td>
<td><span id="current-attr-RES"><<print $character[1].RES>></span> </td>
<td><span id="current-attr-INT"><<print $character[1].INT>></span> </td>
<td><span id="current-attr-CHA"><<print $character[1].CHA>></span> </td>
<td><span id="current-attr-PER"><<print $character[1].PER>></span> </td>
</tr>
</table>
<hr>
<table>
<tr>
<td>
<<button "Increase Strength">>
<<if ($character[1].availableAttribute >= 1 && $character[1].STR < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].STR += 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Strength">>
<<if $character[1].STR > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].STR -= 1>>
<<replace "#current-attr-STR">><<print $character[1].STR>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Dexterity">>
<<if ($character[1].availableAttribute >= 1 && $character[1].DEX < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].DEX += 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Dexterity">>
<<if $character[1].DEX > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].DEX -= 1>>
<<replace "#current-attr-DEX">><<print $character[1].DEX>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Resilience">>
<<if ($character[1].availableAttribute >= 1 && $character[1].RES < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].RES += 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Resilience">>
<<if $character[1].RES > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].RES -= 1>>
<<replace "#current-attr-RES">><<print $character[1].RES>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Intelligence">>
<<if ($character[1].availableAttribute >= 1 && $character[1].INT < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].INT += 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Intelligence">>
<<if $character[1].INT > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].INT -= 1>>
<<replace "#current-attr-INT">><<print $character[1].INT>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Charisma">>
<<if ($character[1].availableAttribute >= 1 && $character[1].CHA < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].CHA += 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Charisma">>
<<if $character[1].CHA > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].CHA -= 1>>
<<replace "#current-attr-CHA">><<print $character[1].CHA>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
<tr>
<td>
<<button "Increase Perception">>
<<if ($character[1].availableAttribute >= 1 && $character[1].PER < 30)>>
<<set $character[1].availableAttribute -= 1>>
<<set $character[1].PER += 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
<td>
<<button "Decrease Perception">>
<<if $character[1].PER > 1>>
<<set $character[1].availableAttribute += 1>>
<<set $character[1].PER -= 1>>
<<replace "#current-attr-PER">><<print $character[1].PER>><</replace>>
<<replace "#current-avlb-attr">><<print $character[1].availableAttribute>><</replace>>
<<else>>
<</if>><</button>>
</td>
</tr>
</table>
<<link "Continue">>
<<run window.arena()>>
<</link>>
</div>
<div align="center">
<<link "Fight">>
<<run UIBar.stow();>><<run UIBar.hide();>>
<<if $character.level < 20>>
<<set $character[1].level += 1>> <<set $character[1].availableAttribute to 3>>
<<for _i = 0; _i < $character[1].level;_i++>>
<<set $character[1].MAXLIFE to 20>><<set $character[1].MAXMANA to 10>>
<<set _liferoll to window.rollDice('1d12')>> <<set _manaroll to window.rollDice('1d10')>>
<<if _liferoll < 6>><<set _liferoll = 6>><</if>>
<<if _manaroll < 5>><<set _manaroll = 5>><</if>>
<<set $character[1].MAXLIFE += _liferoll>>
<<set $character[1].MAXMANA += _manaroll>>
<</for>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].PER>>
<<set $character[1].MAXMANA += $character[1].INT + $character[1].PER>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<elseif $character[1].Ancestry === 'Herald' && $character[1].traits.includes("Nature's Blessing")>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].MAXMANA = Math.round(($character[1].MAXMANA / 2))>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].MAXMANA >>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<else>>
<<set $character[1].MAXLIFE += $character[1].RES>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<</if>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += $character[1].MAXMANA>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<</if>>
<<if $character[1].traits.includes("Ultimate Sacrifice")>>
<<set $character[1].MAXLIFE = Math.round(($character[1].MAXLIFE * 0.9))>>
<<set $character[1].currentLife = $character[1].MAXLIFE
<<set $character.additionalDamage += 2>>
<</if>>
<<if $character[1].traits.includes("Pious Resilience")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.25))>>
<</if>>
<<if $character[1].traits.includes("Martyrdom")>>
<<set $character[1].MAXLIFE *=2>>
<</if>>
<<if $character[1].traits.includes("Champion of Justice")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.5))>>
<</if>>
<</if>>
<<set $return to "MidArena">>
<<goto "Combatpage">>
<<set $arenaStage += 1>>
<</link>>
</div>
<<silently>>
<<switch $arenaStage>>
<<case 1>>
<<battle "slave" 2>><</battle>>
<<case 2>>
<<battle "Ruffian" 2>><</battle>>
<<case 3>>
<<battle "Ruffian" 1>><</battle>>
<<battle "hiredSpellcaster" 1>><</battle>>
<<battle "Ruffian" 1>><</battle>>
<<case 4>>
<<battle "hiredMuscle" 2>><</battle>>
<<case 5>>
<<battle "Ruffian" 1>><</battle>>
<<battle "banditLeader" 1>><</battle>>
<<battle "Ruffian" 1>><</battle>>
<<case 6>>
<<battle "Bear" 2>><</battle>>
<<case 7>>
<<battle "WildWolf" 2>><</battle>>
<<battle "AlphaWolf" 1>><</battle>>
<<battle "WildWolf" 2>><</battle>>
<<case 8>>
<<battle "Goblin" 3>><</battle>>
<<battle "LoudGoblin" 1>><</battle>>
<<battle "Goblin" 3>><</battle>>
<<case 9>>
<<battle "Goblin" 2>><</battle>>
<<battle "SpellGoblin" 1>><</battle>>
<<battle "LoudGoblin" 1>><</battle>>
<<battle "SpellGoblin" 1>><</battle>>
<<battle "Goblin" 2>><</battle>>
<<case 10>>
<<battle "GoblinHunter" 2>><</battle>>
<<battle "GoblinQueen" 1>><</battle>>
<<battle "GoblinHunter" 2>><</battle>>
<<case 11>>
<<battle "ArmoredBrigand" 2>><</battle>>
<<case 12>>
<<battle "ArmoredBrigand" 1>><</battle>>
<<battle "brigandFalconeer" 1>><</battle>>
<<battle "ArmoredBrigand" 1>><</battle>>
<<case 13>>
<<battle "BrigandCrossbowman" 3>><</battle>>
<<case 14>>
<<battle "brigandFalconeer" 1>><</battle>>
<<battle "BrigandCanoneer" 1>><</battle>>
<<battle "ArmoredBrigand" 1>><</battle>>
<<battle "BrigandCrossbowman" 1>><</battle>>
<<case 15>>
<<battle "BrigandCrossbowman" 1>><</battle>>
<<battle "ThousandHandKing" 1>><</battle>>
<<battle "BrigandCrossbowman" 1>><</battle>>
<<case 16>>
<<battle "deathCult" 1>><</battle>>
<<battle "deathCult2" 1>><</battle>>
<<battle "deathCult3" 1>><</battle>>
<<case 17>>
<<battle "reanCorpse" 1>><</battle>>
<<battle "DeathKnight" 1>><</battle>>
<<battle "Wraith" 1>><</battle>>
<<battle "reanCorpse" 1>><</battle>>
<<case 18>>
<<battle "Wraith" 3>><</battle>>
<<case 19>>
<<battle "reanCorpse" 2>><</battle>>
<<battle "Banshee" 1>><</battle>>
<<battle "reanCorpse" 2>><</battle>>
<<case 20>>
<<battle "necromancer" 1>><</battle>>
<<battle "demiLich" 1>><</battle>>
<<battle "necromancer" 1>><</battle>>
<<case 21>>
<<goto "ArenaWin">>
<</switch>>
<<if $arenaStage >= 2 && $arenaStage < 20>>
<<if $character.level < 20>>
<<set $character[1].level += 1>> <<set $character[1].availableAttribute to 3>>
<<for _i = 0; _i < $character[1].level;_i++>>
<<set $character[1].MAXLIFE to 20>><<set $character[1].MAXMANA to 10>>
<<set _liferoll to window.rollDice('1d12')>> <<set _manaroll to window.rollDice('1d10')>>
<<if _liferoll < 6>><<set _liferoll = 6>><</if>>
<<if _manaroll < 5>><<set _manaroll = 5>><</if>>
<<set $character[1].MAXLIFE += _liferoll>>
<<set $character[1].MAXMANA += _manaroll>>
<</for>>
<<if $character[1].Ancestry === 'Elf'>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].PER>>
<<set $character[1].MAXMANA += $character[1].INT + $character[1].PER>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<elseif $character[1].Ancestry === 'Herald' && $character[1].traits.includes("Nature's Blessing")>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].MAXMANA = Math.round(($character[1].MAXMANA / 2))>>
<<set $character[1].MAXLIFE += $character[1].RES + $character[1].MAXMANA >>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<<else>>
<<set $character[1].MAXLIFE += $character[1].RES>>
<<set $character[1].MAXMANA += $character[1].INT>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<<set $character[1].currentMana = $character[1].MAXMANA>>
<</if>>
<<if $character[1].Pact === "Blood">>
<<set $character[1].MAXLIFE += $character[1].MAXMANA>>
<<set $character[1].currentLife = $character[1].MAXLIFE>>
<</if>>
<<if $character[1].traits.includes("Ultimate Sacrifice")>>
<<set $character[1].MAXLIFE = Math.round(($character[1].MAXLIFE * 0.9))>>
<<set $character[1].currentLife = $character[1].MAXLIFE
<<set $character.additionalDamage += 2>>
<</if>>
<<if $character[1].traits.includes("Pious Resilience")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.25))>>
<</if>>
<<if $character[1].traits.includes("Martyrdom")>>
<<set $character[1].MAXLIFE *=2>>
<</if>>
<<if $character[1].traits.includes("Champion of Justice")>>
<<set $character[1].MAXLIFE += Math.round(($character[1].MAXLIFE * 0.5))>>
<</if>>
<<set $character[1].availableAttribute += 3>>
<</if>>
<<elseif $arenaStage >= 20>>
<<set _missingLife = $character[1].MAXLIFE - $character[1].currentLife>>
<<set _missingMana = $character[1].MAXMANA - $character[1].currentMana>>
<<set $character[1].currentLife += Math.round((_missingLife * (1 - ($arenaStage/100))))>>
<<set $character[1].currentMana += Math.round((_missingMana * (1 - ($arenaStage/100))))>>
<</if>>
<<if $character[1].traits.includes("Oathkeeper")>>
<<set $alignment.goodChaos += 3>>
<<set $alignment.evilChaos += 3>>
<<set $alignment.goodOrder += 3>>
<<set $alignment.evilOrder += 3>>
<</if>>
<</silently>><div id="Gladiators" align="center">
<h2>FIghters</h2>
<<for _i = 0; _i < $gladiators.length; _i++>>
<<capture _i>>
<table>
<tr>
<td><b>Strength:</b> </td>
<td><b>Dexterity:</b> </td>
<td><b>Resilience:</b> </td>
<td><b>Intelligence:</b> </td>
<td><b>Charisma</b>: </td>
<td><b>Perception:</b> </td>
</tr><tr>
<td> $gladiators[_i].STR</td>
<td> $gladiators[_i].DEX</td>
<td> $gladiators[_i].RES</td>
<td> $gladiators[_i].INT</td>
<td> $gladiators[_i].CHA</td>
<td> $gladiators[_i].PER</td>
</tr><tr>
<td><b>Name:</b> </td>
<td><b>Action Points:</b> </td>
<td><b>Lifeblood:</b> </td>
<td><b>Essence:</b> </td>
<td><b>Starting Skill(s):</b> </td>
<td><b>Starting Traits:</b></td>
</tr><tr>
<td>$gladiators[_i].Name</td>
<td>$gladiators[_i].APregen</td>
<td>$gladiators[_i].MAXLIFE</td>
<td>$gladiators[_i].MAXMANA</td>
<td> <<for _j = 0; _j < $gladiators[_i].skills.length; _j++>> <<capture _j>><b><<message $gladiators[_i].skills[_j].name>>
<i><b>Categories:</b> [<<print $gladiators[_i].skills[_j].categories>>]</i>
<i><b>Description:</b> <<print $gladiators[_i].skills[_j].description>> </i>
<</message>></b><</capture>> <</for>> </td>
<td><<print $gladiators[_i].traits>> </td>
</tr>
</table>
<<link "Choose this Fighter">>
<<set $arenaStage to 1>>
<<set $character[1] = $gladiators[_i]>>
<<set $character[1].Gold += 50>>
<<goto "MidArena">><<run UIBar.unstow();>> <<run UIBar.show();>>
<</link>>
<hr>
<</capture>>
<</for>>
</div><div align='center'>
<h2>Victory</h2>
By surviving each stage of the Arena, you earned your freedom.
<<button "At long last">><<run Engine.restart()>><<set $arena to false>><<set $arnaStage to 0>><</button>>
</div>
<style>
#battle-log {
display: block;
overflow-y: auto;
width: 100%;
color: #ccc;
padding: 10px;
background-color: #222;
border: 1px solid #555;
border-radius: 5px;
margin-top: 20px;
position: relative;
}
.message-divider {
border: none;
height: 1px;
background-color: rgba(169, 169, 169, 0.3);
margin: 10px 0;
width: 100%;
}
.player-turn {
text-align: left;
float: left;
clear: left;
color: white;
border-radius: 5px;
padding: 5px;
margin: 5px 0;
max-width: 70%;
}
.enemy-turn {
text-align: right;
float: right;
clear: right;
color: silver;
border-radius: 5px;
padding: 5px;
margin: 5px 0;
max-width: 70%;
}
</style>
<div align="center"><h2>Battle-Log</h2>
<div id="battle-log"></div></div>