Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
Homburger
  • Loading branch information
python-nerd-3 committed Feb 11, 2023
1 parent 4bb049c commit 438da9f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 106 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<script src="index.js" defer></script>
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="pekachu.ico">
<title>Brokemon v1.3.1</title>
<title>Brokemon Beta 01.4.0</title>
</head>
<body>
<h1>Brokemon</h1>
Expand Down
14 changes: 9 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ $('#button-4').prop("disabled", true);
function setDifficulty() {
let diffBoost = $("#enemy-boost-input").val();
let diffHp = $("#enemy-hp-input").val();
diffBoost = Math.max(0, Math.min(100000, Math.round(diffBoost)))
diffHp = Math.max(1, Math.min(10000000, Math.round(diffHp)))
console.log(diffBoost + diffHp)
window.location.replace(`index.html?hp=${diffHp}&boost=${diffBoost}`)
}
Expand Down Expand Up @@ -194,8 +196,10 @@ class Move {
let randomDamageBoost = Math.random() / 5
randomDamageBoost += 0.9
pDamageDealt *= randomDamageBoost
pDamageDealt -= enemyDef
pDamageDealt = Math.max(pDamageDealt, (pDamageDealt + enemyDef) / 2)
if (this.dmg > 0) {
pDamageDealt -= enemyDef
pDamageDealt = Math.max(pDamageDealt, (pDamageDealt + enemyDef) / 2)
}
enemyHp -= pDamageDealt;
playerHp += this.heal * playerExtraDmg;
console.log(this.codeName)
Expand Down Expand Up @@ -249,7 +253,7 @@ class Move {
break;
case "saiyan":
display("SUPER SAIYAN!!!", "*insert japanese here*")
break;
break;
}
}

Expand All @@ -261,8 +265,8 @@ class Move {
let eRandomDamageBoost = Math.random() / 5
eRandomDamageBoost += 0.9
eDamageDealt *= eRandomDamageBoost
eDamageDealt -= playerDef;
eDamageDealt = Math.max(eDamageDealt, (eDamageDealt + playerDef) / 2)
eDamageDealt -= playerDef;
eDamageDealt = Math.max(eDamageDealt, (eDamageDealt + playerDef) / 2)
playerHp -= eDamageDealt;
enemyHp += this.heal * enemyExtraDmg;
enemyHp = Math.min(enemyHp, enemyMaxHp);
Expand Down
11 changes: 11 additions & 0 deletions mods.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js" defer></script>
<script src="mods.js" defer></script>
</head>
<body>
hi this is wip how u find
</body>
</html>
75 changes: 0 additions & 75 deletions out/linecounter.json

This file was deleted.

25 changes: 0 additions & 25 deletions out/linecounter.txt

This file was deleted.

0 comments on commit 438da9f

Please sign in to comment.