From e2cd50b92224e76eee48994a5c5ac873a66dac14 Mon Sep 17 00:00:00 2001 From: yschl <ys037@hdm-stuttgart.de> Date: Fri, 23 Feb 2024 22:36:05 +0100 Subject: [PATCH] Update: Time of Player attackRate adjusted, that is now equal to our downtime the player can receive damage --- .../de/hdm_stuttgart/battlearena/Model/Entity/Player.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java index dc4d51fe..b3f7b025 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java @@ -631,7 +631,7 @@ class Player implements IEntity { if (inputHandler.isAttack() && PLAYER_MODE == PlayerMode.PLAYER_ONE && attackRate == 0 || inputHandler.isSdAttack() && PLAYER_MODE == PlayerMode.PLAYER_TWO && attackRate == 0) { - attackRate = 50; + attackRate = 75; SfxOnce sfx = new SfxOnce(); sfx.startSound(SFX.SWORD_SWING); @@ -732,7 +732,7 @@ class Player implements IEntity { health -= damageDone; SfxOnce t = new SfxOnce(); t.startSound(SFX.DAMAGETAKEN); - iFrameCounter = 100; + iFrameCounter = 75; } else { if (!isDead) { SfxOnce t = new SfxOnce(); @@ -741,7 +741,7 @@ class Player implements IEntity { } isDead = true; health = 0; - iFrameCounter = 100; + iFrameCounter = 75; runtimeInfo.setDeaths(runtimeInfo.getDeaths() + 1); runtimeInfo.setKills(runtimeInfo.getKills() + 1); runtimeInfo.setGameWon(true); -- GitLab