From 49fb371d9a575f2bc7713e3d0001176b22b80d6e Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii Date: Wed, 6 Oct 2021 01:30:32 +0000 Subject: [PATCH] Add in safety check when performing a skill. Prevent durability breaking. --- SigCrafter/src/sig/SigCraft.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SigCrafter/src/sig/SigCraft.java b/SigCrafter/src/sig/SigCraft.java index 964c4c4..44c5fc5 100644 --- a/SigCrafter/src/sig/SigCraft.java +++ b/SigCrafter/src/sig/SigCraft.java @@ -44,7 +44,7 @@ public class SigCraft { public static boolean GUARANTEED = true; public static int DURABILITY = 80; - public static List VALID_TOUCH_ACTIONS = Arrays.asList("Basic Touch","Standard Touch","Byregot's Blessing"); + public static List VALID_TOUCH_ACTIONS = Arrays.asList("Basic Touch","Standard Touch","Byregot's Blessing","Brand of the Elements"); public static Map BUFFLIST = new HashMap(); public static Map SKILLLIST = new HashMap(); @@ -283,6 +283,7 @@ public class SigCraft { System.exit(1); } if (checkForMaxQuality&&MaxQuality()) {return;} + if (VALID_TOUCH_ACTIONS.contains(string)&&!IsThereEnoughTurns(CURRENT_CRAFT.craft_durability,CURRENT_CRAFT.BuffList,1)) {return;} if (s.modifier!=-1) { PressKeyWithModifier(s.modifier,s.key); } else {