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
+9 -22
View File
@@ -1,27 +1,14 @@
namespace Craftimizer.Simulator.Actions;
internal sealed class PrudentTouch : BaseAction
internal sealed class PrudentTouch() : BaseAction(
ActionCategory.Quality, 66, 100227,
increasesQuality: true,
durabilityCost: 5,
defaultCPCost: 25,
defaultEfficiency: 100
)
{
public PrudentTouch()
{
Category = ActionCategory.Quality;
Level = 66;
ActionId = 100227;
IncreasesQuality = true;
DurabilityCost /= 2;
}
public override void CPCost(Simulator s, ref int cost)
{
cost = 25;
}
public override void Efficiency(Simulator s, ref int eff)
{
eff = 100;
}
public override bool CouldUse(Simulator s, ref int cost) =>
public override bool CouldUse(Simulator s) =>
!(s.HasEffect(EffectType.WasteNot) || s.HasEffect(EffectType.WasteNot2))
&& base.CouldUse(s, ref cost);
&& base.CouldUse(s);
}