API10 updates
This commit is contained in:
@@ -21,9 +21,10 @@ internal abstract class BaseBuffAction(
|
||||
// Non-instanced properties
|
||||
public readonly EffectType Effect = effect;
|
||||
public readonly int Duration = duration;
|
||||
private readonly int trueDuration = increasesStepCount ? duration + 1 : duration;
|
||||
|
||||
public override void UseSuccess(Simulator s) =>
|
||||
s.AddEffect(Effect, Duration);
|
||||
s.AddEffect(Effect, trueDuration);
|
||||
|
||||
public override string GetTooltip(Simulator s, bool addUsability)
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace Craftimizer.Simulator.Actions;
|
||||
|
||||
internal sealed class FinalAppraisal() : BaseBuffAction(
|
||||
ActionCategory.Other, 42, 19012,
|
||||
EffectType.FinalAppraisal, duration: 4,
|
||||
EffectType.FinalAppraisal, duration: 5,
|
||||
increasesStepCount: false,
|
||||
defaultCPCost: 1)
|
||||
{
|
||||
|
||||
@@ -8,5 +8,11 @@ internal sealed class HastyTouch() : BaseAction(
|
||||
defaultSuccessRate: 60
|
||||
)
|
||||
{
|
||||
public override void UseSuccess(Simulator s)
|
||||
{
|
||||
base.UseSuccess(s);
|
||||
|
||||
if (s.Input.Stats.Level >= 96)
|
||||
s.AddEffect(EffectType.Expedience, 1 + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,6 @@ internal sealed class MuscleMemory() : BaseAction(
|
||||
public override void UseSuccess(Simulator s)
|
||||
{
|
||||
base.UseSuccess(s);
|
||||
s.AddEffect(EffectType.MuscleMemory, 5);
|
||||
s.AddEffect(EffectType.MuscleMemory, 5 + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ internal sealed class QuickInnovation() : BaseBuffAction(
|
||||
base.IsPossible(s) && s.Input.Stats.IsSpecialist && !s.ActionStates.UsedQuickInnovation;
|
||||
|
||||
public override bool CouldUse(Simulator s) =>
|
||||
!s.ActionStates.UsedQuickInnovation;
|
||||
!s.ActionStates.UsedQuickInnovation && !s.HasEffect(EffectType.Innovation);
|
||||
|
||||
public override string GetTooltip(Simulator s, bool addUsability) =>
|
||||
$"{GetBaseTooltip(s, addUsability)}Specialist Only\n";
|
||||
$"{base.GetTooltip(s, addUsability)}Specialist Only\n";
|
||||
}
|
||||
|
||||
+10
-9
@@ -16,8 +16,8 @@ public record struct Effects
|
||||
public byte WasteNot2;
|
||||
public byte MuscleMemory;
|
||||
public byte Manipulation;
|
||||
public bool Expedience;
|
||||
public bool TrainedPerfection;
|
||||
public byte Expedience;
|
||||
public byte TrainedPerfection;
|
||||
public bool HeartAndSoul;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
@@ -54,10 +54,10 @@ public record struct Effects
|
||||
Manipulation = duration;
|
||||
break;
|
||||
case EffectType.Expedience:
|
||||
Expedience = duration != 0;
|
||||
Expedience = duration;
|
||||
break;
|
||||
case EffectType.TrainedPerfection:
|
||||
TrainedPerfection = duration != 0;
|
||||
TrainedPerfection = duration;
|
||||
break;
|
||||
case EffectType.HeartAndSoul:
|
||||
HeartAndSoul = duration != 0;
|
||||
@@ -86,8 +86,8 @@ public record struct Effects
|
||||
EffectType.WasteNot2 => WasteNot2,
|
||||
EffectType.MuscleMemory => MuscleMemory,
|
||||
EffectType.Manipulation => Manipulation,
|
||||
EffectType.Expedience => (byte)(Expedience ? 1 : 0),
|
||||
EffectType.TrainedPerfection => (byte)(TrainedPerfection ? 1 : 0),
|
||||
EffectType.Expedience => Expedience,
|
||||
EffectType.TrainedPerfection => TrainedPerfection,
|
||||
EffectType.HeartAndSoul => (byte)(HeartAndSoul ? 1 : 0),
|
||||
_ => 0
|
||||
};
|
||||
@@ -127,8 +127,9 @@ public record struct Effects
|
||||
MuscleMemory--;
|
||||
if (Manipulation > 0)
|
||||
Manipulation--;
|
||||
|
||||
Expedience = false;
|
||||
TrainedPerfection = false;
|
||||
if (Expedience > 0)
|
||||
Expedience--;
|
||||
if (TrainedPerfection > 0)
|
||||
TrainedPerfection--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,9 +105,6 @@ public class Simulator
|
||||
if (Condition == Condition.Primed)
|
||||
duration += 2;
|
||||
|
||||
// Duration will be decreased in the next step, so we need to add 1
|
||||
duration++;
|
||||
|
||||
ActiveEffects.SetDuration(effect, (byte)duration);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user