New 7.0 actions and updates
This commit is contained in:
@@ -11,14 +11,14 @@ public enum ActionType : byte
|
||||
ByregotsBlessing,
|
||||
CarefulObservation,
|
||||
CarefulSynthesis,
|
||||
DaringTouch,
|
||||
DelicateSynthesis,
|
||||
FinalAppraisal,
|
||||
FocusedSynthesis,
|
||||
FocusedTouch,
|
||||
GreatStrides,
|
||||
Groundwork,
|
||||
HastyTouch,
|
||||
HeartAndSoul,
|
||||
ImmaculateMend,
|
||||
Innovation,
|
||||
IntensiveSynthesis,
|
||||
Manipulation,
|
||||
@@ -29,11 +29,14 @@ public enum ActionType : byte
|
||||
PreparatoryTouch,
|
||||
PrudentSynthesis,
|
||||
PrudentTouch,
|
||||
QuickInnovation,
|
||||
RapidSynthesis,
|
||||
RefinedTouch,
|
||||
Reflect,
|
||||
StandardTouch,
|
||||
TrainedEye,
|
||||
TrainedFinesse,
|
||||
TrainedPerfection,
|
||||
TricksOfTheTrade,
|
||||
Veneration,
|
||||
WasteNot,
|
||||
@@ -41,8 +44,8 @@ public enum ActionType : byte
|
||||
|
||||
StandardTouchCombo,
|
||||
AdvancedTouchCombo,
|
||||
FocusedSynthesisCombo,
|
||||
FocusedTouchCombo,
|
||||
ObservedAdvancedTouchCombo,
|
||||
RefinedTouchCombo,
|
||||
}
|
||||
|
||||
public static class ActionUtils
|
||||
@@ -68,47 +71,4 @@ public static class ActionUtils
|
||||
|
||||
public static ActionCategory Category(this ActionType me) =>
|
||||
me.Base().Category;
|
||||
|
||||
public static string IntName(this ActionType me) =>
|
||||
me switch
|
||||
{
|
||||
ActionType.AdvancedTouch => "Advanced Touch",
|
||||
ActionType.BasicSynthesis => "Basic Synthesis",
|
||||
ActionType.BasicTouch => "Basic Touch",
|
||||
ActionType.ByregotsBlessing => "Byregot's Blessing",
|
||||
ActionType.CarefulObservation => "Careful Observation",
|
||||
ActionType.CarefulSynthesis => "Careful Synthesis",
|
||||
ActionType.DelicateSynthesis => "Delicate Synthesis",
|
||||
ActionType.FinalAppraisal => "Final Appraisal",
|
||||
ActionType.FocusedSynthesis => "Focused Synthesis",
|
||||
ActionType.FocusedTouch => "Focused Touch",
|
||||
ActionType.GreatStrides => "Great Strides",
|
||||
ActionType.Groundwork => "Groundwork",
|
||||
ActionType.HastyTouch => "Hasty Touch",
|
||||
ActionType.HeartAndSoul => "Heart And Soul",
|
||||
ActionType.Innovation => "Innovation",
|
||||
ActionType.IntensiveSynthesis => "Intensive Synthesis",
|
||||
ActionType.Manipulation => "Manipulation",
|
||||
ActionType.MastersMend => "Master's Mend",
|
||||
ActionType.MuscleMemory => "Muscle Memory",
|
||||
ActionType.Observe => "Observe",
|
||||
ActionType.PreciseTouch => "Precise Touch",
|
||||
ActionType.PreparatoryTouch => "Preparatory Touch",
|
||||
ActionType.PrudentSynthesis => "Prudent Synthesis",
|
||||
ActionType.PrudentTouch => "Prudent Touch",
|
||||
ActionType.RapidSynthesis => "Rapid Synthesis",
|
||||
ActionType.Reflect => "Reflect",
|
||||
ActionType.StandardTouch => "Standard Touch",
|
||||
ActionType.TrainedEye => "Trained Eye",
|
||||
ActionType.TrainedFinesse => "Trained Finesse",
|
||||
ActionType.TricksOfTheTrade => "Tricks Of The Trade",
|
||||
ActionType.Veneration => "Veneration",
|
||||
ActionType.WasteNot => "Waste Not",
|
||||
ActionType.WasteNot2 => "Waste Not II",
|
||||
ActionType.StandardTouchCombo => "Standard Touch Combo",
|
||||
ActionType.AdvancedTouchCombo => "Advanced Touch Combo",
|
||||
ActionType.FocusedSynthesisCombo => "Focused Synthesis Combo",
|
||||
ActionType.FocusedTouchCombo => "Focused Touch Combo",
|
||||
_ => me.ToString(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class AdvancedTouch() : BaseAction(
|
||||
ActionCategory.Quality, level: 84, actionId: 100411,
|
||||
ActionCategory.Quality, level: 68, actionId: 100411,
|
||||
increasesQuality: true,
|
||||
defaultCPCost: 46, defaultEfficiency: 150)
|
||||
{
|
||||
public override int CPCost(Simulator s) =>
|
||||
s.ActionStates.TouchComboIdx == 2 ? 18 : 46;
|
||||
(s.ActionStates.TouchComboIdx == 2 || s.ActionStates.ObserveCombo) ? 18 : 46;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@ public abstract class BaseAction(
|
||||
UseSuccess(s);
|
||||
|
||||
s.ReduceCP(CPCost(s));
|
||||
s.ReduceDurability(DurabilityCost);
|
||||
if (!s.HasEffect(EffectType.TrainedPerfection))
|
||||
s.ReduceDurability(DurabilityCost);
|
||||
|
||||
if (IncreasesStepCount)
|
||||
{
|
||||
|
||||
@@ -18,11 +18,14 @@ public abstract class BaseComboAction(
|
||||
|
||||
private static bool VerifyDurability2(int durabilityA, int durability, in Effects effects)
|
||||
{
|
||||
var wasteNots = effects.HasEffect(EffectType.WasteNot) || effects.HasEffect(EffectType.WasteNot2);
|
||||
// -A
|
||||
durability -= (int)MathF.Ceiling(durabilityA * (wasteNots ? .5f : 1f));
|
||||
if (durability <= 0)
|
||||
return false;
|
||||
if (!effects.HasEffect(EffectType.TrainedPerfection))
|
||||
{
|
||||
var wasteNots = effects.HasEffect(EffectType.WasteNot) || effects.HasEffect(EffectType.WasteNot2);
|
||||
// -A
|
||||
durability -= (int)MathF.Ceiling(durabilityA * (wasteNots ? .5f : 1f));
|
||||
if (durability <= 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
// If we can do the first action and still have durability left to survive to the next
|
||||
// step (even before the Manipulation modifier), we can certainly do the next action.
|
||||
@@ -36,10 +39,14 @@ public abstract class BaseComboAction(
|
||||
{
|
||||
var wasteNots = Math.Max(effects.GetDuration(EffectType.WasteNot), effects.GetDuration(EffectType.WasteNot2));
|
||||
var manips = effects.HasEffect(EffectType.Manipulation);
|
||||
var perfection = effects.HasEffect(EffectType.TrainedPerfection);
|
||||
|
||||
durability -= (int)MathF.Ceiling(durabilityA * wasteNots > 0 ? .5f : 1f);
|
||||
if (durability <= 0)
|
||||
return false;
|
||||
if (!perfection)
|
||||
{
|
||||
durability -= (int)MathF.Ceiling(durabilityA * wasteNots > 0 ? .5f : 1f);
|
||||
if (durability <= 0)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (manips)
|
||||
durability += 5;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class DaringTouch() : BaseAction(
|
||||
ActionCategory.Quality, 96, 100451,
|
||||
increasesQuality: true,
|
||||
defaultCPCost: 0,
|
||||
defaultEfficiency: 150,
|
||||
defaultSuccessRate: 60
|
||||
)
|
||||
{
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
s.HasEffect(EffectType.Expedience) && base.CouldUse(s);
|
||||
}
|
||||
@@ -7,5 +7,11 @@ internal sealed class DelicateSynthesis() : BaseAction(
|
||||
defaultEfficiency: 100
|
||||
)
|
||||
{
|
||||
|
||||
public override void UseSuccess(Simulator s)
|
||||
{
|
||||
// Delicate Synthesis Mastery Trait
|
||||
var hasTrait = s.Input.Stats.Level >= 94;
|
||||
s.IncreaseProgress(hasTrait ? 150 : 100);
|
||||
s.IncreaseQuality(100);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class FocusedSynthesis() : BaseAction(
|
||||
ActionCategory.Synthesis, 67, 100235,
|
||||
increasesProgress: true,
|
||||
defaultCPCost: 5,
|
||||
defaultEfficiency: 200,
|
||||
defaultSuccessRate: 50
|
||||
)
|
||||
{
|
||||
public override int SuccessRate(Simulator s) =>
|
||||
s.ActionStates.Observed ? 100 : 50;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class FocusedSynthesisCombo() : BaseComboAction<Observe, FocusedSynthesis>(
|
||||
ActionType.Observe, ActionType.FocusedSynthesis
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class FocusedTouch() : BaseAction(
|
||||
ActionCategory.Quality, 68, 100243,
|
||||
increasesQuality: true,
|
||||
defaultCPCost: 18,
|
||||
defaultEfficiency: 150,
|
||||
defaultSuccessRate: 50
|
||||
)
|
||||
{
|
||||
public override int SuccessRate(Simulator s) =>
|
||||
s.ActionStates.Observed ? 100 : 50;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class FocusedTouchCombo() : BaseComboAction<Observe, FocusedTouch>(
|
||||
ActionType.Observe, ActionType.FocusedTouch
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class ImmaculateMend() : BaseAction(
|
||||
ActionCategory.Durability, 98, 100467,
|
||||
macroWaitTime: 2,
|
||||
durabilityCost: 0,
|
||||
defaultCPCost: 112
|
||||
)
|
||||
{
|
||||
public override void UseSuccess(Simulator s) =>
|
||||
s.RestoreAllDurability();
|
||||
}
|
||||
@@ -2,6 +2,7 @@ namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class MastersMend() : BaseAction(
|
||||
ActionCategory.Durability, 7, 100003,
|
||||
macroWaitTime: 2,
|
||||
durabilityCost: 0,
|
||||
defaultCPCost: 88
|
||||
)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class ObservedAdvancedTouchCombo() : BaseComboAction<Observe, AdvancedTouch>(
|
||||
ActionType.StandardTouchCombo, ActionType.AdvancedTouch, 7 + 18
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class QuickInnovation() : BaseBuffAction(
|
||||
ActionCategory.Other, 96, 100459,
|
||||
EffectType.Innovation, duration: 1,
|
||||
macroWaitTime: 3,
|
||||
increasesStepCount: false
|
||||
)
|
||||
{
|
||||
public override bool IsPossible(Simulator s) =>
|
||||
base.IsPossible(s) && s.Input.Stats.IsSpecialist && !s.ActionStates.UsedQuickInnovation;
|
||||
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
!s.ActionStates.UsedQuickInnovation;
|
||||
|
||||
public override string GetTooltip(Simulator s, bool addUsability) =>
|
||||
$"{GetBaseTooltip(s, addUsability)}Specialist Only\n";
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class RefinedTouch() : BaseAction(
|
||||
ActionCategory.Quality, 92, 100443,
|
||||
increasesQuality: true,
|
||||
defaultCPCost: 24,
|
||||
defaultEfficiency: 100
|
||||
)
|
||||
{
|
||||
public override void UseSuccess(Simulator s)
|
||||
{
|
||||
base.UseSuccess(s);
|
||||
if (s.ActionStates.TouchComboIdx == 1)
|
||||
s.StrengthenEffect(EffectType.InnerQuiet);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class RefinedTouchCombo() : BaseComboAction<BasicTouch, RefinedTouch>(
|
||||
ActionType.BasicTouch, ActionType.RefinedTouch
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ internal sealed class Reflect() : BaseAction(
|
||||
ActionCategory.FirstTurn, 69, 100387,
|
||||
increasesQuality: true,
|
||||
defaultCPCost: 6,
|
||||
defaultEfficiency: 100
|
||||
defaultEfficiency: 300
|
||||
)
|
||||
{
|
||||
public override bool IsPossible(Simulator s) => s.IsFirstStep && base.IsPossible(s);
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class TrainedPerfection() : BaseBuffAction(
|
||||
ActionCategory.Durability, 100, 100475,
|
||||
EffectType.TrainedPerfection, duration: 1
|
||||
)
|
||||
{
|
||||
public override bool IsPossible(Simulator s) =>
|
||||
base.IsPossible(s) && !s.ActionStates.UsedTrainedPerfection;
|
||||
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
!s.ActionStates.UsedTrainedPerfection;
|
||||
}
|
||||
Reference in New Issue
Block a user