Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
the_potato_plus
d069c73616
Merge pull request #1 from potato-plus-plus/the-potato_rogue-potato
add the actual game itself
2023-11-16 21:13:18 -05:00
the potato
1cd4318cac add game 2023-11-16 21:11:08 -05:00

View file

@ -1,2 +1,36 @@
<h1> test</h1>
<p> hi guys</p>
<script>
let floor = 1;
let maxHealth = 10;
let currentHealth = 10;
let minDamageMult = 0.75;
let maxDamageMult = 1.25;
let strength = 3;
let defense = 0;
let damageTakenMult = 1;
let enemyType = "Slime";
let enemyHealth = 10;
let enemyStrength = 2;
let enemyDefense = -1;
let enemyDamageMult = 1;
let enemiesDefeated = 0;
let causeUpdate = () => {
if (enemyHealth <= 0) {
enemiesDefeated += 1
enemyHealth = 5
}
};
</script>
<h1>Floor {floor}</h1>
<h3>Enemy: {enemyType}</h3>
<p>Enemy Health: {enemyHealth}</p>
<a
on:click={() => {
enemyHealth -= Math.round((strength - enemyDefense) * enemyDamageMult)
causeUpdate
}}>Click to Attack
</a>
<p>Your Health: {currentHealth}/{maxHealth}</p>
<p>Strength: {strength}</p>
<p>Defense: {defense}</p>
<p>Damage Taken: {damageTakenMult * 100}%</p>
<p>Enemies Defeated: {enemiesDefeated}</p>