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
+25 -7
View File
@@ -2,13 +2,31 @@ namespace Craftimizer.Simulator.Actions;
internal sealed class FocusedSynthesis : BaseAction
{
public override ActionCategory Category => ActionCategory.Synthesis;
public override int Level => 67;
public override uint ActionId => 100235;
public int CP = 5;
public int Eff = 200;
public float SuccessNormal = 0.50f;
public float SuccessObserved = 1.00f;
public override bool IncreasesProgress => true;
public FocusedSynthesis()
{
Category = ActionCategory.Synthesis;
Level = 67;
ActionId = 100235;
IncreasesProgress = true;
}
public override int CPCost(Simulator s) => 5;
public override int Efficiency(Simulator s) => 200;
public override float SuccessRate(Simulator s) => s.ActionStates.Observed ? 1.00f : 0.50f;
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;
}
}