Add in safety check when performing a skill. Prevent durability breaking.

main
Nic0Nic0Nii 3 years ago
parent a347839022
commit 49fb371d9a
  1. 3
      SigCrafter/src/sig/SigCraft.java

@ -44,7 +44,7 @@ public class SigCraft {
public static boolean GUARANTEED = true; public static boolean GUARANTEED = true;
public static int DURABILITY = 80; public static int DURABILITY = 80;
public static List<String> VALID_TOUCH_ACTIONS = Arrays.asList("Basic Touch","Standard Touch","Byregot's Blessing"); public static List<String> VALID_TOUCH_ACTIONS = Arrays.asList("Basic Touch","Standard Touch","Byregot's Blessing","Brand of the Elements");
public static Map<String,Buff> BUFFLIST = new HashMap<String,Buff>(); public static Map<String,Buff> BUFFLIST = new HashMap<String,Buff>();
public static Map<String,Skill> SKILLLIST = new HashMap<String,Skill>(); public static Map<String,Skill> SKILLLIST = new HashMap<String,Skill>();
@ -283,6 +283,7 @@ public class SigCraft {
System.exit(1); System.exit(1);
} }
if (checkForMaxQuality&&MaxQuality()) {return;} if (checkForMaxQuality&&MaxQuality()) {return;}
if (VALID_TOUCH_ACTIONS.contains(string)&&!IsThereEnoughTurns(CURRENT_CRAFT.craft_durability,CURRENT_CRAFT.BuffList,1)) {return;}
if (s.modifier!=-1) { if (s.modifier!=-1) {
PressKeyWithModifier(s.modifier,s.key); PressKeyWithModifier(s.modifier,s.key);
} else { } else {

Loading…
Cancel
Save