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
+16 -9
View File
@@ -2,18 +2,25 @@ namespace Craftimizer.Simulator.Actions;
internal sealed class Groundwork : BaseAction
{
public override ActionCategory Category => ActionCategory.Synthesis;
public override int Level => 72;
public override uint ActionId => 100403;
public Groundwork()
{
Category = ActionCategory.Synthesis;
Level = 72;
ActionId = 100403;
IncreasesProgress = true;
DurabilityCost = 20;
}
public override bool IncreasesProgress => true;
public override int DurabilityCost => 20;
public override void CPCost(Simulator s, ref int cost)
{
cost = 18;
}
public override int CPCost(Simulator s) => 18;
public override int Efficiency(Simulator s)
public override void Efficiency(Simulator s, ref int eff)
{
// Groundwork Mastery Trait
var ret = s.Input.Stats.Level >= 86 ? 360 : 300;
return s.Durability < s.CalculateDurabilityCost(DurabilityCost) ? ret / 2 : ret;
eff = s.Input.Stats.Level >= 86 ? 360 : 300;
if (s.Durability < s.CalculateDurabilityCost(DurabilityCost))
eff /= 2;
}
}