Optimizations (from @wolfcomp)
This commit is contained in:
@@ -2,22 +2,31 @@ namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class IntensiveSynthesis : BaseAction
|
||||
{
|
||||
public override ActionCategory Category => ActionCategory.Synthesis;
|
||||
public override int Level => 78;
|
||||
public override uint ActionId => 100315;
|
||||
|
||||
public override bool IncreasesProgress => true;
|
||||
|
||||
public override int CPCost(Simulator s) => 6;
|
||||
public override int Efficiency(Simulator s) => 400;
|
||||
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
(s.Condition == Condition.Good || s.Condition == Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
&& base.CouldUse(s);
|
||||
|
||||
public override void UseSuccess(Simulator s)
|
||||
public IntensiveSynthesis()
|
||||
{
|
||||
base.UseSuccess(s);
|
||||
Category = ActionCategory.Synthesis;
|
||||
Level = 78;
|
||||
ActionId = 100315;
|
||||
IncreasesProgress = true;
|
||||
}
|
||||
|
||||
public override void CPCost(Simulator s, ref int cost)
|
||||
{
|
||||
cost = 6;
|
||||
}
|
||||
|
||||
public override void Efficiency(Simulator s, ref int eff)
|
||||
{
|
||||
eff = 400;
|
||||
}
|
||||
|
||||
public override bool CouldUse(Simulator s, ref int cost) =>
|
||||
(s.Condition == Condition.Good || s.Condition == Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
&& base.CouldUse(s, ref cost);
|
||||
|
||||
public override void UseSuccess(Simulator s, ref int eff)
|
||||
{
|
||||
base.UseSuccess(s, ref eff);
|
||||
if (s.Condition != Condition.Good && s.Condition != Condition.Excellent)
|
||||
s.RemoveEffect(EffectType.HeartAndSoul);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user