Optimizations (from @wolfcomp)
This commit is contained in:
@@ -2,19 +2,24 @@ namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class TricksOfTheTrade : BaseAction
|
||||
{
|
||||
public override ActionCategory Category => ActionCategory.Other;
|
||||
public override int Level => 13;
|
||||
public override uint ActionId => 100371;
|
||||
public TricksOfTheTrade()
|
||||
{
|
||||
Category = ActionCategory.Other;
|
||||
Level = 13;
|
||||
ActionId = 100371;
|
||||
DurabilityCost = 0;
|
||||
}
|
||||
|
||||
public override int DurabilityCost => 0;
|
||||
public override void CPCost(Simulator s, ref int cost)
|
||||
{
|
||||
cost = 0;
|
||||
}
|
||||
|
||||
public override int CPCost(Simulator s) => 0;
|
||||
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
public override bool CouldUse(Simulator s, ref int cost) =>
|
||||
(s.Condition == Condition.Good || s.Condition == Condition.Excellent || s.HasEffect(EffectType.HeartAndSoul))
|
||||
&& base.CouldUse(s);
|
||||
&& base.CouldUse(s, ref cost);
|
||||
|
||||
public override void UseSuccess(Simulator s)
|
||||
public override void UseSuccess(Simulator s, ref int eff)
|
||||
{
|
||||
s.RestoreCP(20);
|
||||
if (s.Condition != Condition.Good && s.Condition != Condition.Excellent)
|
||||
|
||||
Reference in New Issue
Block a user