From 438da9fcf745e4ff48b7779803484ee776c075c1 Mon Sep 17 00:00:00 2001
From: python-nerd-3 <117922845+python-nerd-3@users.noreply.github.com>
Date: Sat, 11 Feb 2023 15:43:17 -0500
Subject: [PATCH] bug fixes Homburger
---
index.html | 2 +-
index.js | 14 ++++++---
mods.html | 11 +++++++
out/linecounter.json | 75 --------------------------------------------
out/linecounter.txt | 25 ---------------
5 files changed, 21 insertions(+), 106 deletions(-)
create mode 100644 mods.html
delete mode 100644 out/linecounter.json
delete mode 100644 out/linecounter.txt
diff --git a/index.html b/index.html
index 29f66e1..dd40668 100644
--- a/index.html
+++ b/index.html
@@ -6,7 +6,7 @@
-
Brokemon v1.3.1
+ Brokemon Beta 01.4.0
Brokemon
diff --git a/index.js b/index.js
index 19fd761..2757579 100644
--- a/index.js
+++ b/index.js
@@ -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}`)
}
@@ -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)
@@ -249,7 +253,7 @@ class Move {
break;
case "saiyan":
display("SUPER SAIYAN!!!", "*insert japanese here*")
- break;
+ break;
}
}
@@ -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);
diff --git a/mods.html b/mods.html
new file mode 100644
index 0000000..b5152d4
--- /dev/null
+++ b/mods.html
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+ hi this is wip how u find
+
+
\ No newline at end of file
diff --git a/out/linecounter.json b/out/linecounter.json
deleted file mode 100644
index 2c9338c..0000000
--- a/out/linecounter.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
- "extension": "linecounter",
- "version": "0.2.7",
- "linecount": [
- {
- "version": "0.2.7",
- "counttime": "2023-02-10 18:58:05",
- "filesum": 6,
- "codesum": 391,
- "commentsum": 3,
- "blanksum": 46,
- "statistics": {
- ".css": {
- "code": 80,
- "comment": 0,
- "blank": 18
- },
- ".js": {
- "code": 226,
- "comment": 2,
- "blank": 24
- },
- ".md": {
- "code": 17,
- "comment": 0,
- "blank": 4
- },
- ".html": {
- "code": 68,
- "comment": 1,
- "blank": 0
- }
- },
- "filelist": [
- {
- "blank": 0,
- "code": 68,
- "comment": 1,
- "filename": "index.html"
- },
- {
- "blank": 24,
- "code": 226,
- "comment": 2,
- "filename": "index.js"
- },
- {
- "filename": "pekachu.ico",
- "isbinaryfile": true,
- "blank": 0,
- "code": 0,
- "comment": 0
- },
- {
- "blank": 3,
- "code": 7,
- "comment": 0,
- "filename": "README.md"
- },
- {
- "blank": 1,
- "code": 10,
- "comment": 0,
- "filename": "ROADMAP.md"
- },
- {
- "blank": 18,
- "code": 80,
- "comment": 0,
- "filename": "styles.css"
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/out/linecounter.txt b/out/linecounter.txt
deleted file mode 100644
index 4c4ddd2..0000000
--- a/out/linecounter.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-===============================================================================
-EXTENSION NAME : linecounter
-EXTENSION VERSION : 0.2.7
--------------------------------------------------------------------------------
-count time : 2023-02-10 18:58:05
-total files : 6
-total code lines : 391
-total comment lines : 3
-total blank lines : 46
-
- statistics
- | extension| total code| total comment| total blank|percent|
- -------------------------------------------------------------------------
- | .css| 80| 0| 18| 20|
- | .js| 226| 2| 24| 58|
- | .md| 17| 0| 4| 4.3|
- | .html| 68| 1| 0| 17|
- -------------------------------------------------------------------------
-index.html, code is 68, comment is 1, blank is 0.
-index.js, code is 226, comment is 2, blank is 24.
-pekachu.ico, it is a binary file.
-README.md, code is 7, comment is 0, blank is 3.
-ROADMAP.md, code is 10, comment is 0, blank is 1.
-styles.css, code is 80, comment is 0, blank is 18.
-===============================================================================