diff --git a/SigCrafter/src/sig/SigCraft.java b/SigCrafter/src/sig/SigCraft.java index 5aefcd9..3a64b36 100644 --- a/SigCrafter/src/sig/SigCraft.java +++ b/SigCrafter/src/sig/SigCraft.java @@ -24,12 +24,12 @@ import sig.skills.WasteNotII; public class SigCraft { public static int LEVEL = 48; - public static int RECIPE_LEVEL = 45; + public static int RECIPE_LEVEL = 41; public static int CP = 282; - public static int BASE_PROGRESS = 51; + public static int BASE_PROGRESS = 57; public static int CONTROL = 185; - public static int PROGRESS_GOAL = 158; - public static int QUALITY_GOAL = 2309; + public static int PROGRESS_GOAL = 143; + public static int QUALITY_GOAL = 2109; public static boolean GUARANTEED = true; public static int DURABILITY = 80; @@ -79,15 +79,23 @@ public class SigCraft { BUFFLIST.put("Name of the Elements Has Been Used",new Buff("Name of the Elements Has Been Used",0)); BUFFLIST.put("Inner Quiet",new Buff("Inner Quiet", 0)); BUFFLIST.put("Waste Not",new Buff("Waste Not",0)); - BUFFLIST.put("Waste Not II",new Buff("Waste Not II",0)); SetupCraft(); } + public static boolean IsThereEnoughTurns(int durability,Map bufflist,int turnsRequired) { + Buff wasteNot = bufflist.get("Waste Not"); + int turnsRemaining = (int)(durability%2==1&&wasteNot.stackCount%2==1?Math.ceil(((double)wasteNot.stackCount/2))-1:Math.ceil((double)wasteNot.stackCount/2))+(int)Math.ceil(durability/10); + int maxHalfTurnsRemaining = durability/5; + turnsRemaining = Math.min(maxHalfTurnsRemaining,turnsRemaining); + return turnsRemaining>turnsRequired; + } + public static void SetupCraft() { List progress_rotation1 = new ArrayList(); int progressSteps = 0; + int PROGRESS_FINAL_STEPS = 0; List progress_rotation2 = new ArrayList(); int qualityCPRemaining = 0; @@ -119,10 +127,12 @@ public class SigCraft { if (progressSteps quality_rotation1 = new ArrayList(); Craft c3 = new Craft(CONTROL,LEVEL,CP,BASE_PROGRESS,PROGRESS_GOAL,QUALITY_GOAL,GUARANTEED,DURABILITY,CRAFT_PROGRESS,CRAFT_QUALITY,DURABILITY,qualityCPRemaining,1,1,1,RECIPE_LEVEL,Status.NORMAL,BUFFLIST); boolean combo=false; - while (c3.craft_qualityprogressSteps*10) { + while (c3.craft_qualityprogressSteps*10) { + while (c4.craft_qualityprogressSteps*10) { + while (current_craft.craft_qualityprogressSteps*10) { + while (current_craft.craft_quality quality_rotation5 = new ArrayList(); @@ -218,13 +236,14 @@ public class SigCraft { s.useSkill(current_craft); current_rotation.add(s); combo=false; - while (current_craft.craft_qualityprogressSteps*10) { + while (current_craft.craft_qualityprogressSteps*10) { + while (current_craft.craft_quality quality_rotation7 = new ArrayList(); @@ -267,13 +288,14 @@ public class SigCraft { s.useSkill(current_craft); current_rotation.add(s); combo=false; - while (current_craft.craft_qualityprogressSteps*10) { + while (current_craft.craft_quality quality_rotation8 = new ArrayList(); @@ -286,8 +308,8 @@ public class SigCraft { s = SKILLLIST.get("Waste Not II"); s.useSkill(current_craft); current_rotation.add(s); - while (current_craft.craft_qualityprogressSteps*10) { - if (current_craft.BuffList.get("Waste Not II").stackCount==0) { + while (current_craft.craft_qualityprogressSteps*10) { + while (current_craft.craft_qualityprogressSteps*10) { + while (current_craft.craft_qualityprogressSteps*10) { + while (current_craft.craft_qualityprogressSteps*10) { - if (current_craft.BuffList.get("Waste Not II").stackCount==0) { + while (current_craft.craft_quality quality_rotation1, Craft c3, + boolean combo) { + Skill s; + if (!IsThereEnoughTurns(c3.craft_durability,c3.BuffList,PROGRESS_FINAL_STEPS)) { + if (c3.craft_cp>=SKILLLIST.get("Master's Mend").CPCost) { + s = SKILLLIST.get("Master's Mend"); + s.useSkill(c3); + quality_rotation1.add(s); + combo=!combo; + System.out.println("Master's Mend is used."); + } + } + return combo; + } + } diff --git a/SigCrafter/src/sig/Skill.java b/SigCrafter/src/sig/Skill.java index 6581aa1..ddc2c26 100644 --- a/SigCrafter/src/sig/Skill.java +++ b/SigCrafter/src/sig/Skill.java @@ -52,7 +52,8 @@ public class Skill implements SkillInterface{ c.progress_mult += c.BuffList.get("Veneration").stackCount>0?0.5:0; c.quality_mult += c.BuffList.get("Great Strides").stackCount>0?1:0; c.quality_mult += c.BuffList.get("Innovation").stackCount>0?0.5:0; - c.durability_mult = c.BuffList.get("Waste Not").stackCount>0||c.BuffList.get("Waste Not II").stackCount>0?0.5:1; + c.durability_mult = c.BuffList.get("Waste Not").stackCount>0?0.5:1; + c.SkillList.add(this); } @Override public boolean canBeUsed(Craft c) { diff --git a/SigCrafter/src/sig/skills/WasteNotII.java b/SigCrafter/src/sig/skills/WasteNotII.java index 4ae5845..9111e9f 100644 --- a/SigCrafter/src/sig/skills/WasteNotII.java +++ b/SigCrafter/src/sig/skills/WasteNotII.java @@ -12,6 +12,6 @@ public class WasteNotII extends Skill { @Override public void useSkill(Craft c) { super.useSkill(c); - c.BuffList.put("Waste Not II",new Buff("Waste Not II",8)); + c.BuffList.put("Waste Not",new Buff("Waste Not",8)); } }