Fix macro durations and trained perfection
This commit is contained in:
@@ -67,8 +67,7 @@ public abstract class BaseAction(
|
||||
UseSuccess(s);
|
||||
|
||||
s.ReduceCP(CPCost(s));
|
||||
if (!s.HasEffect(EffectType.TrainedPerfection))
|
||||
s.ReduceDurability(DurabilityCost);
|
||||
s.ReduceDurability(DurabilityCost);
|
||||
|
||||
if (IncreasesStepCount)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@ namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class ImmaculateMend() : BaseAction(
|
||||
ActionCategory.Durability, 98, 100467,
|
||||
macroWaitTime: 2,
|
||||
durabilityCost: 0,
|
||||
defaultCPCost: 112
|
||||
)
|
||||
|
||||
@@ -8,13 +8,13 @@ internal sealed class IntensiveSynthesis() : BaseAction(
|
||||
)
|
||||
{
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
(s.Condition == Condition.Good || s.Condition == Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
(s.Condition is Condition.Good or Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
&& base.CouldUse(s);
|
||||
|
||||
public override void UseSuccess(Simulator s)
|
||||
{
|
||||
base.UseSuccess(s);
|
||||
if (s.Condition != Condition.Good && s.Condition != Condition.Excellent)
|
||||
if (s.Condition is not (Condition.Good or Condition.Excellent))
|
||||
s.RemoveEffect(EffectType.HeartAndSoul);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class MastersMend() : BaseAction(
|
||||
ActionCategory.Durability, 7, 100003,
|
||||
macroWaitTime: 2,
|
||||
durabilityCost: 0,
|
||||
defaultCPCost: 88
|
||||
)
|
||||
|
||||
@@ -8,14 +8,14 @@ internal sealed class PreciseTouch() : BaseAction(
|
||||
)
|
||||
{
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
(s.Condition == Condition.Good || s.Condition == Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
(s.Condition is Condition.Good or Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
&& base.CouldUse(s);
|
||||
|
||||
public override void UseSuccess(Simulator s)
|
||||
{
|
||||
base.UseSuccess(s);
|
||||
s.StrengthenEffect(EffectType.InnerQuiet);
|
||||
if (s.Condition != Condition.Good && s.Condition != Condition.Excellent)
|
||||
if (s.Condition is not (Condition.Good or Condition.Excellent))
|
||||
s.RemoveEffect(EffectType.HeartAndSoul);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,7 @@ internal sealed class TrainedPerfection() : BaseBuffAction(
|
||||
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
!s.ActionStates.UsedTrainedPerfection;
|
||||
|
||||
public override string GetTooltip(Simulator s, bool addUsability) =>
|
||||
GetBaseTooltip(s, addUsability);
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ internal sealed class TricksOfTheTrade() : BaseAction(
|
||||
)
|
||||
{
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
(s.Condition == Condition.Good || s.Condition == Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
(s.Condition is Condition.Good or Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
&& base.CouldUse(s);
|
||||
|
||||
public override void UseSuccess(Simulator s)
|
||||
{
|
||||
s.RestoreCP(20);
|
||||
if (s.Condition != Condition.Good && s.Condition != Condition.Excellent)
|
||||
if (s.Condition is not (Condition.Good or Condition.Excellent))
|
||||
s.RemoveEffect(EffectType.HeartAndSoul);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user