From b5d9bd89a1fcf86c75d98718b31f5bddb0d24e16 Mon Sep 17 00:00:00 2001 From: Antonio Tessier <147963318+thegreatzoidberg@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:52:56 -0700 Subject: [PATCH 1/4] Slightly Random Damage in player.gd Line 20 --- Game/LifeQuest/player.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Game/LifeQuest/player.gd b/Game/LifeQuest/player.gd index 5d9919e9..5a03a045 100644 --- a/Game/LifeQuest/player.gd +++ b/Game/LifeQuest/player.gd @@ -17,7 +17,7 @@ func on_hit(): print("Player is being hit.") attackCooldown = true # cooldown timer is active, cannot take another hit until timer is up $cooldown.start() # Player cannot be hit for another 3 seconds - playerHealthStat = playerHealthStat - enemyAttack + playerHealthStat = playerHealthStat - (enemyAttack + randi_range(-(enemyAttack / 10), (enemyAttack / 10))) # Attack range is enemyAttack +/- 10% or +/-1 if too small print("Player health is: " + str(playerHealthStat)) if playerHealthStat <= 0: # If player health is less than or equal to 0, player is no longer alive From 12b96471fdf10c9e78e08e8ab2dc4a69cfd5ec06 Mon Sep 17 00:00:00 2001 From: Antonio Tessier <147963318+thegreatzoidberg@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:54:33 -0700 Subject: [PATCH 2/4] Slightly Random Damage in enemy.gd line 21 --- Game/LifeQuest/enemy.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Game/LifeQuest/enemy.gd b/Game/LifeQuest/enemy.gd index 38b84adb..05123cad 100644 --- a/Game/LifeQuest/enemy.gd +++ b/Game/LifeQuest/enemy.gd @@ -18,7 +18,7 @@ func on_hit(): print("Enemy is being hit.") attackCooldown = true $enemyCooldown.start() - enemyHealthStat = enemyHealthStat - playerAttack + enemyHealthStat = enemyHealthStat - playerAttack - (playerAttack + randi_range(-(playerAttack / 10), (playerAttack / 10))) # Attack range is playerAttack +/- 10% or +/-1 if too small print("Enemy health is: " + str(enemyHealthStat)) if enemyHealthStat <= 0: From 275892d4e55a8707b9710c1a582ed46fb3968870 Mon Sep 17 00:00:00 2001 From: Antonio Tessier <147963318+thegreatzoidberg@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:58:02 -0700 Subject: [PATCH 3/4] Removed extra playerAttack enemy.gd line 21 --- Game/LifeQuest/enemy.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Game/LifeQuest/enemy.gd b/Game/LifeQuest/enemy.gd index 05123cad..4339a5ce 100644 --- a/Game/LifeQuest/enemy.gd +++ b/Game/LifeQuest/enemy.gd @@ -18,7 +18,7 @@ func on_hit(): print("Enemy is being hit.") attackCooldown = true $enemyCooldown.start() - enemyHealthStat = enemyHealthStat - playerAttack - (playerAttack + randi_range(-(playerAttack / 10), (playerAttack / 10))) # Attack range is playerAttack +/- 10% or +/-1 if too small + enemyHealthStat = enemyHealthStat - playerAttack - randi_range(-(playerAttack / 10), (playerAttack / 10))) # Attack range is playerAttack +/- 10% or +/-1 if too small print("Enemy health is: " + str(enemyHealthStat)) if enemyHealthStat <= 0: From 32d5f787b86798584db07a2d5f0e5cac67a32e14 Mon Sep 17 00:00:00 2001 From: Antonio Tessier <147963318+thegreatzoidberg@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:02:42 -0700 Subject: [PATCH 4/4] Fixed extra ')' and changed '-' to '+' in enemy.gd line 21 --- Game/LifeQuest/enemy.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Game/LifeQuest/enemy.gd b/Game/LifeQuest/enemy.gd index 4339a5ce..7cbca4c6 100644 --- a/Game/LifeQuest/enemy.gd +++ b/Game/LifeQuest/enemy.gd @@ -18,7 +18,7 @@ func on_hit(): print("Enemy is being hit.") attackCooldown = true $enemyCooldown.start() - enemyHealthStat = enemyHealthStat - playerAttack - randi_range(-(playerAttack / 10), (playerAttack / 10))) # Attack range is playerAttack +/- 10% or +/-1 if too small + enemyHealthStat = enemyHealthStat - (playerAttack + randi_range(-(playerAttack / 10), (playerAttack / 10))) # Attack range is playerAttack +/- 10% or +/-1 if too small print("Enemy health is: " + str(enemyHealthStat)) if enemyHealthStat <= 0: