diff --git a/runelite-plugin.properties b/runelite-plugin.properties index bc5a347..44d3dea 100644 --- a/runelite-plugin.properties +++ b/runelite-plugin.properties @@ -1,7 +1,7 @@ displayName=AttackTimer author=ngraves95,Lexer747 build=standard -version=1.2.1 +version=1.2.2 description=A plugin to countdown until your next attack tags=pvm,timer,attack,combat,weapon plugins=com.attacktimer.AttackTimerMetronomePlugin \ No newline at end of file diff --git a/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java b/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java index 6e1fcc1..400a950 100644 --- a/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java +++ b/src/main/java/com/attacktimer/AttackTimerMetronomePlugin.java @@ -659,10 +659,11 @@ private StringBuilder getState() public void onRender() { int delta = 0; - delta = VariableSpeed.SHADOW_CRASH.onRender(client, attackDelayHoldoffTicks, isUsingMagic); + delta = VariableSpeed.SHADOW_CRASH.onRender(client, attackDelayHoldoffTicks, isUsingMagic, config.debugLogs()); if (delta != 0) { + logStateTrace("onRender"); attackDelayHoldoffTicks += delta; // if a change in attack delay would cause the delay to be less than 0 we hide the display if (attackDelayHoldoffTicks < 0) diff --git a/src/main/java/com/attacktimer/VariableSpeed/ShadowCrash.java b/src/main/java/com/attacktimer/VariableSpeed/ShadowCrash.java index 855f06d..1ef9430 100644 --- a/src/main/java/com/attacktimer/VariableSpeed/ShadowCrash.java +++ b/src/main/java/com/attacktimer/VariableSpeed/ShadowCrash.java @@ -33,6 +33,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; +import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; import net.runelite.api.GraphicsObject; import net.runelite.api.Player; @@ -40,6 +41,7 @@ import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; +@Slf4j public class ShadowCrash { private static final int FIREBALL_ID = 3262; @@ -87,7 +89,7 @@ public class ShadowCrash // // This function will adjust the attackDelayHoldoffTicks if the player successfully dodges the shadowcrash // in the sweet spot. - public int onRender(final Client client, final int attackDelayHoldoffTicks, final boolean isUsingMagic) + public int onRender(final Client client, final int attackDelayHoldoffTicks, final boolean isUsingMagic, final boolean debugLogs) { // if mark of darkness isn't active then no speed up can be gained. if (!yama.inYamaRegion || yama.phase() != YamaPhase.P3 || !mod.isActive()) @@ -100,12 +102,20 @@ public int onRender(final Client client, final int attackDelayHoldoffTicks, fina // improved by a tick. consumed = tickCount.get(); // theres a bug/feature in the yama mechanic, if you are using a mage weapon then the speed up - // doesn't apply if the global cooldown is 2 or less. It might also affect range but no-one uses + // doesn't apply if the global cooldown is 1 or less. It might also affect range but no-one uses // that at yama so IDC. Another reason to prefer melee P3. - if (attackDelayHoldoffTicks <= 2 && isUsingMagic) + if (attackDelayHoldoffTicks <= 1 && isUsingMagic) { + if (debugLogs) + { + log.debug("shadowCrash success, but magic and low CD"); + } return 0; } + if (debugLogs) + { + log.debug("shadowCrash success"); + } return -1; } return 0;