Remove ref passing, but keep devirtualizations
This commit is contained in:
@@ -1,33 +1,13 @@
|
||||
namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class FocusedTouch : BaseAction
|
||||
internal sealed class FocusedTouch() : BaseAction(
|
||||
ActionCategory.Quality, 68, 100243,
|
||||
increasesQuality: true,
|
||||
defaultCPCost: 18,
|
||||
defaultEfficiency: 150,
|
||||
defaultSuccessRate: 0.50f
|
||||
)
|
||||
{
|
||||
public int CP = 18;
|
||||
public int Eff = 150;
|
||||
public float SuccessNormal = 0.50f;
|
||||
public float SuccessObserved = 1.00f;
|
||||
|
||||
public FocusedTouch()
|
||||
{
|
||||
Category = ActionCategory.Quality;
|
||||
Level = 68;
|
||||
ActionId = 100243;
|
||||
IncreasesQuality = true;
|
||||
}
|
||||
|
||||
|
||||
public override void CPCost(Simulator s, ref int cost)
|
||||
{
|
||||
cost = CP;
|
||||
}
|
||||
|
||||
public override void Efficiency(Simulator s, ref int eff)
|
||||
{
|
||||
eff = Eff;
|
||||
}
|
||||
|
||||
public override void SuccessRate(Simulator s, ref float success)
|
||||
{
|
||||
success = s.ActionStates.Observed ? SuccessObserved : SuccessNormal;
|
||||
}
|
||||
public override float SuccessRate(Simulator s) =>
|
||||
s.ActionStates.Observed ? 1.00f : 0.50f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user