Add manipulation action flag and starting quality field
This commit is contained in:
+12
-2
@@ -18,7 +18,16 @@ internal static class Program
|
|||||||
//return;
|
//return;
|
||||||
|
|
||||||
var input = new SimulationInput(
|
var input = new SimulationInput(
|
||||||
new CharacterStats { Craftsmanship = 4041, Control = 3905, CP = 609, Level = 90 },
|
new CharacterStats {
|
||||||
|
Craftsmanship = 4041,
|
||||||
|
Control = 3905,
|
||||||
|
CP = 609,
|
||||||
|
Level = 90,
|
||||||
|
CanUseManipulation = true,
|
||||||
|
HasSplendorousBuff = true,
|
||||||
|
IsSpecialist = true,
|
||||||
|
CLvl = 560,
|
||||||
|
},
|
||||||
new RecipeInfo()
|
new RecipeInfo()
|
||||||
{
|
{
|
||||||
IsExpert = false,
|
IsExpert = false,
|
||||||
@@ -32,7 +41,8 @@ internal static class Program
|
|||||||
QualityDivider = 115,
|
QualityDivider = 115,
|
||||||
ProgressModifier = 80,
|
ProgressModifier = 80,
|
||||||
ProgressDivider = 130,
|
ProgressDivider = 130,
|
||||||
}
|
},
|
||||||
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
var config = new SolverConfig()
|
var config = new SolverConfig()
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ internal sealed class Manipulation : BaseBuffAction
|
|||||||
public override byte Duration => 8;
|
public override byte Duration => 8;
|
||||||
|
|
||||||
public override int CPCost(Simulator s) => 96;
|
public override int CPCost(Simulator s) => 96;
|
||||||
|
public override bool CanUse(Simulator s) => s.Input.Stats.CanUseManipulation && base.CanUse(s);
|
||||||
|
|
||||||
public override void Use(Simulator s)
|
public override void Use(Simulator s)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ public sealed record CharacterStats
|
|||||||
public int Control { get; init; }
|
public int Control { get; init; }
|
||||||
public int CP { get; init; }
|
public int CP { get; init; }
|
||||||
public int Level { get; init; }
|
public int Level { get; init; }
|
||||||
|
public bool CanUseManipulation { get; init; }
|
||||||
public bool HasSplendorousBuff { get; init; }
|
public bool HasSplendorousBuff { get; init; }
|
||||||
public bool IsSpecialist { get; init; }
|
public bool IsSpecialist { get; init; }
|
||||||
public int CLvl { get; init; }
|
public int CLvl { get; init; }
|
||||||
|
|||||||
@@ -6,14 +6,16 @@ public sealed class SimulationInput
|
|||||||
public RecipeInfo Recipe { get; }
|
public RecipeInfo Recipe { get; }
|
||||||
public Random Random { get; }
|
public Random Random { get; }
|
||||||
|
|
||||||
|
public int StartingQuality { get; }
|
||||||
public int BaseProgressGain { get; }
|
public int BaseProgressGain { get; }
|
||||||
public int BaseQualityGain { get; }
|
public int BaseQualityGain { get; }
|
||||||
|
|
||||||
public SimulationInput(CharacterStats stats, RecipeInfo recipe, int? seed = null)
|
public SimulationInput(CharacterStats stats, RecipeInfo recipe, int startingQuality = 0, int? seed = null)
|
||||||
{
|
{
|
||||||
Stats = stats;
|
Stats = stats;
|
||||||
Recipe = recipe;
|
Recipe = recipe;
|
||||||
Random = seed == null ? new() : new(seed.Value);
|
Random = seed == null ? new() : new(seed.Value);
|
||||||
|
StartingQuality = startingQuality;
|
||||||
|
|
||||||
// https://github.com/NotRanged/NotRanged.github.io/blob/0f4aee074f969fb05aad34feaba605057c08ffd1/app/js/ffxivcraftmodel.js#L88
|
// https://github.com/NotRanged/NotRanged.github.io/blob/0f4aee074f969fb05aad34feaba605057c08ffd1/app/js/ffxivcraftmodel.js#L88
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public struct SimulationState
|
|||||||
|
|
||||||
StepCount = 0;
|
StepCount = 0;
|
||||||
Progress = 0;
|
Progress = 0;
|
||||||
Quality = 0;
|
Quality = input.StartingQuality;
|
||||||
Durability = Input.Recipe.MaxDurability;
|
Durability = Input.Recipe.MaxDurability;
|
||||||
CP = Input.Stats.CP;
|
CP = Input.Stats.CP;
|
||||||
Condition = Condition.Normal;
|
Condition = Condition.Normal;
|
||||||
|
|||||||
Reference in New Issue
Block a user