Fix macro durations and trained perfection

This commit is contained in:
Asriel Camora
2024-07-04 09:18:35 -07:00
parent 06ff82a8ca
commit 65d01aeed0
11 changed files with 27 additions and 25 deletions
+1 -2
View File
@@ -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)
{
-1
View File
@@ -2,7 +2,6 @@ namespace Craftimizer.Simulator.Actions;
internal sealed class ImmaculateMend() : BaseAction(
ActionCategory.Durability, 98, 100467,
macroWaitTime: 2,
durabilityCost: 0,
defaultCPCost: 112
)
+2 -2
View File
@@ -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);
}
}
-1
View File
@@ -2,7 +2,6 @@ namespace Craftimizer.Simulator.Actions;
internal sealed class MastersMend() : BaseAction(
ActionCategory.Durability, 7, 100003,
macroWaitTime: 2,
durabilityCost: 0,
defaultCPCost: 88
)
+2 -2
View File
@@ -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);
}
}
+3
View File
@@ -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);
}
+2 -2
View File
@@ -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);
}
}