Remove ref passing, but keep devirtualizations

This commit is contained in:
Asriel Camora
2024-03-16 13:24:26 -07:00
parent 3223bdcbfb
commit ec77f1d021
48 changed files with 411 additions and 787 deletions
+10 -17
View File
@@ -1,26 +1,19 @@
namespace Craftimizer.Simulator.Actions;
internal sealed class Groundwork : BaseAction
internal sealed class Groundwork() : BaseAction(
ActionCategory.Synthesis, 72, 100403,
increasesProgress: true,
durabilityCost: 20,
defaultCPCost: 18,
defaultEfficiency: 300
)
{
public Groundwork()
{
Category = ActionCategory.Synthesis;
Level = 72;
ActionId = 100403;
IncreasesProgress = true;
DurabilityCost = 20;
}
public override void CPCost(Simulator s, ref int cost)
{
cost = 18;
}
public override void Efficiency(Simulator s, ref int eff)
public override int Efficiency(Simulator s)
{
// Groundwork Mastery Trait
eff = s.Input.Stats.Level >= 86 ? 360 : 300;
var eff = s.Input.Stats.Level >= 86 ? 360 : 300;
if (s.Durability < s.CalculateDurabilityCost(DurabilityCost))
eff /= 2;
return eff;
}
}