Fix Trained Perfection while crafting & other bad pruning
This commit is contained in:
+24
-23
@@ -67,7 +67,7 @@ internal sealed class Simulator : SimulatorNoRandom
|
|||||||
if (action == ActionType.TrainedEye)
|
if (action == ActionType.TrainedEye)
|
||||||
return baseAction.CouldUse(this);
|
return baseAction.CouldUse(this);
|
||||||
|
|
||||||
var isDifficult = Input.Recipe.ClassJobLevel >= Input.Stats.Level;
|
var isDifficult = Input.Stats.Level - Input.Recipe.ClassJobLevel < 10;
|
||||||
|
|
||||||
// don't allow quality moves under Muscle Memory for difficult crafts
|
// don't allow quality moves under Muscle Memory for difficult crafts
|
||||||
if (isDifficult &&
|
if (isDifficult &&
|
||||||
@@ -88,11 +88,8 @@ internal sealed class Simulator : SimulatorNoRandom
|
|||||||
(action is ActionType.StandardTouchCombo or ActionType.AdvancedTouchCombo or ActionType.RefinedTouchCombo))
|
(action is ActionType.StandardTouchCombo or ActionType.AdvancedTouchCombo or ActionType.RefinedTouchCombo))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// don't allow observe actions if the combo (or observe itself) is already in progress
|
// only allow Advanced Touch when Observing
|
||||||
if (ActionStates.ObserveCombo && action is ActionType.ObservedAdvancedTouchCombo)
|
if (ActionStates.ObserveCombo && action is not ActionType.AdvancedTouch)
|
||||||
return false;
|
|
||||||
|
|
||||||
if (action is ActionType.Observe && CP < 25)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// don't allow pure quality moves under Veneration
|
// don't allow pure quality moves under Veneration
|
||||||
@@ -107,10 +104,6 @@ internal sealed class Simulator : SimulatorNoRandom
|
|||||||
if (!baseAction.IncreasesProgress && durability >= Durability)
|
if (!baseAction.IncreasesProgress && durability >= Durability)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// don't allow 0 durability moves under Trained Perfection
|
|
||||||
if (HasEffect(EffectType.TrainedPerfection) && durability < 10)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (baseAction.IncreasesProgress)
|
if (baseAction.IncreasesProgress)
|
||||||
{
|
{
|
||||||
var progressIncrease = CalculateProgressGain(baseAction.Efficiency(this));
|
var progressIncrease = CalculateProgressGain(baseAction.Efficiency(this));
|
||||||
@@ -132,35 +125,39 @@ internal sealed class Simulator : SimulatorNoRandom
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action == ActionType.ByregotsBlessing &&
|
if (action is ActionType.ByregotsBlessing &&
|
||||||
GetEffectStrength(EffectType.InnerQuiet) <= 1)
|
GetEffectStrength(EffectType.InnerQuiet) <= 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((action == ActionType.WasteNot || action == ActionType.WasteNot2) &&
|
// use of Waste Not should be efficient
|
||||||
|
if ((action is ActionType.WasteNot or ActionType.WasteNot2) &&
|
||||||
(HasEffect(EffectType.WasteNot) || HasEffect(EffectType.WasteNot2)))
|
(HasEffect(EffectType.WasteNot) || HasEffect(EffectType.WasteNot2)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (action == ActionType.MastersMend &&
|
// don't Observe when Advanced Touch is impossible (7 + 18)
|
||||||
Input.Recipe.MaxDurability - durability < 25)
|
if (action is ActionType.Observe && CP < 25)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (action == ActionType.ImmaculateMend &&
|
// don't allow Refined Touch without a combo
|
||||||
Input.Recipe.MaxDurability - durability < 45)
|
if (action is ActionType.RefinedTouch &&
|
||||||
return false;
|
|
||||||
|
|
||||||
if (action == ActionType.RefinedTouch &&
|
|
||||||
ActionStates.TouchComboIdx != 1)
|
ActionStates.TouchComboIdx != 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (action == ActionType.QuickInnovation &&
|
// don't allow Immaculate Mends that are too inefficient
|
||||||
(Quality - Input.StartingQuality) < Input.Recipe.MaxQuality / 2)
|
if (action is ActionType.ImmaculateMend &&
|
||||||
|
(Input.Recipe.MaxDurability - durability <= 45 || HasEffect(EffectType.Manipulation)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (action == ActionType.Manipulation &&
|
// don't allow buffs too early
|
||||||
|
if (action is ActionType.MastersMend &&
|
||||||
|
Input.Recipe.MaxDurability - durability < 25)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (action is ActionType.Manipulation &&
|
||||||
HasEffect(EffectType.Manipulation))
|
HasEffect(EffectType.Manipulation))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (action == ActionType.GreatStrides &&
|
if (action is ActionType.GreatStrides &&
|
||||||
HasEffect(EffectType.GreatStrides))
|
HasEffect(EffectType.GreatStrides))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -168,6 +165,10 @@ internal sealed class Simulator : SimulatorNoRandom
|
|||||||
(GetEffectDuration(EffectType.Veneration) > 1 || GetEffectDuration(EffectType.Innovation) > 1))
|
(GetEffectDuration(EffectType.Veneration) > 1 || GetEffectDuration(EffectType.Innovation) > 1))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (action is ActionType.QuickInnovation &&
|
||||||
|
Quality <= Input.Recipe.MaxQuality / 3)
|
||||||
|
return false;
|
||||||
|
|
||||||
return baseAction.CouldUse(this);
|
return baseAction.CouldUse(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user