Optimizations (from @wolfcomp)

This commit is contained in:
Asriel Camora
2024-03-15 09:49:03 -07:00
parent ea963f9e1b
commit 3223bdcbfb
43 changed files with 691 additions and 354 deletions
+19 -9
View File
@@ -2,17 +2,27 @@ namespace Craftimizer.Simulator.Actions;
internal sealed class PrudentSynthesis : BaseAction
{
public override ActionCategory Category => ActionCategory.Synthesis;
public override int Level => 88;
public override uint ActionId => 100427;
public override bool IncreasesProgress => true;
public override int DurabilityCost => base.DurabilityCost / 2;
public PrudentSynthesis()
{
Category = ActionCategory.Synthesis;
Level = 88;
ActionId = 100427;
IncreasesProgress = true;
DurabilityCost /= 2;
}
public override int CPCost(Simulator s) => 18;
public override int Efficiency(Simulator s) => 180;
public override void CPCost(Simulator s, ref int cost)
{
cost = 18;
}
public override bool CouldUse(Simulator s) =>
public override void Efficiency(Simulator s, ref int eff)
{
eff = 180;
}
public override bool CouldUse(Simulator s, ref int cost) =>
!(s.HasEffect(EffectType.WasteNot) || s.HasEffect(EffectType.WasteNot2))
&& base.CouldUse(s);
&& base.CouldUse(s, ref cost);
}