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,22 +2,29 @@ namespace Craftimizer.Simulator.Actions;
internal sealed class CarefulObservation : BaseAction
{
public override ActionCategory Category => ActionCategory.Other;
public override int Level => 55;
public override uint ActionId => 100395;
public override int MacroWaitTime => 3;
public int CP = 0;
public override int DurabilityCost => 0;
public override bool IncreasesStepCount => false;
public CarefulObservation()
{
Category = ActionCategory.Other;
Level = 55;
ActionId = 100395;
MacroWaitTime = 3;
DurabilityCost = 0;
IncreasesStepCount = false;
}
public override int CPCost(Simulator s) => 0;
public override void CPCost(Simulator s, ref int cost)
{
cost = CP;
}
public override bool IsPossible(Simulator s) =>
base.IsPossible(s) && s.Input.Stats.IsSpecialist && s.ActionStates.CarefulObservationCount < 3;
public override bool CouldUse(Simulator s) => s.ActionStates.CarefulObservationCount < 3;
public override bool CouldUse(Simulator s, ref int cost) => s.ActionStates.CarefulObservationCount < 3;
public override void UseSuccess(Simulator s) => s.StepCondition();
public override void UseSuccess(Simulator s, ref int eff) => s.StepCondition();
public override string GetTooltip(Simulator s, bool addUsability) =>
$"{base.GetTooltip(s, addUsability)}Specialist Only\n";