From ec3058b511f13bae18f03c2e340eb98709fba083 Mon Sep 17 00:00:00 2001 From: lightheel Date: Tue, 5 Aug 2025 20:03:50 -0400 Subject: [PATCH] Adjusted dodge trigger. --- .../com/github/nacabaro/vbhelper/screens/BattlesScreen.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/github/nacabaro/vbhelper/screens/BattlesScreen.kt b/app/src/main/java/com/github/nacabaro/vbhelper/screens/BattlesScreen.kt index 891bd20..9aba1e8 100644 --- a/app/src/main/java/com/github/nacabaro/vbhelper/screens/BattlesScreen.kt +++ b/app/src/main/java/com/github/nacabaro/vbhelper/screens/BattlesScreen.kt @@ -116,8 +116,8 @@ fun BattleScreen( progress += 0.016f // 60 FPS battleSystem.setAttackProgress(progress) - // Trigger animation when attack reaches the enemy (around 55% progress for enemy dodge) - if (progress >= 0.55f && !battleSystem.isOpponentHit && !battleSystem.isOpponentDodging) { + // Trigger animation when attack reaches the enemy (around 40% progress for enemy dodge) + if (progress >= 0.50f && !battleSystem.isOpponentHit && !battleSystem.isOpponentDodging) { if (battleSystem.attackIsHit) { // Player attack hits enemy println("Player attack hits enemy at progress $progress") @@ -155,8 +155,8 @@ fun BattleScreen( progress += 0.016f // 60 FPS battleSystem.setAttackProgress(progress) - // Trigger animation when attack reaches the player (around 75% progress for player dodge) - if (progress >= 0.75f && !battleSystem.isPlayerHit && !battleSystem.isPlayerDodging) { + // Trigger animation when attack reaches the player (around 60% progress for player dodge) + if (progress >= 0.50f && !battleSystem.isPlayerHit && !battleSystem.isPlayerDodging) { println("Phase 3: Checking player animation at progress $progress, opponentAttackIsHit=${battleSystem.opponentAttackIsHit}") println("Phase 3: Player animation decision - opponentAttackIsHit=${battleSystem.opponentAttackIsHit}, will ${if (battleSystem.opponentAttackIsHit) "HIT" else "DODGE"}") if (battleSystem.opponentAttackIsHit) {