Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Craftimizer/SimulatorUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ private static (uint Name, uint Description) AddonIds(this Condition me) =>
Condition.Malleable => (13455, 14208),
Condition.Primed => (13454, 14207),
Condition.GoodOmen => (14214, 14215),
Condition.Robust => (14218, 14219),
_ => (226, 14200) // Unknown
};

Expand Down
2 changes: 2 additions & 0 deletions Simulator/Condition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public enum Condition : byte
Malleable,
Primed,
GoodOmen,
Robust,
}

public static class ConditionUtils
Expand All @@ -31,6 +32,7 @@ private enum ConditionMask : ushort
Malleable = 1 << 7, // 0x0080
Primed = 1 << 8, // 0x0100
GoodOmen = 1 << 9, // 0x0200
Robust = 1 << 10, // 0x0400
}

public static Condition[] GetPossibleConditions(ushort conditionsFlag) =>
Expand Down
4 changes: 3 additions & 1 deletion Simulator/Simulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ private static float GetConditionChance(SimulationInput input, Condition conditi
Condition.Malleable => 0.13f,
Condition.Primed => 0.15f,
Condition.GoodOmen => 0.12f, // https://github.com/ffxiv-teamcraft/simulator/issues/77
Condition.Robust => 0.10f, // https://github.com/ffxiv-teamcraft/simulator/commit/4b2949f935450d54324cba84f9214fcb945ecbcb
_ => 0.00f
};

Expand All @@ -166,6 +167,7 @@ public void StepCondition()
Condition.Good => Condition.Normal,
Condition.Excellent => Condition.Poor,
Condition.GoodOmen => Condition.Good,
Condition.Robust => Condition.Sturdy,
_ => GetNextRandomCondition()
};
}
Expand Down Expand Up @@ -214,7 +216,7 @@ public int CalculateDurabilityCost(int amount, bool dryRun = true)
var amt = (double)amount;
if (HasEffect(EffectType.WasteNot) || HasEffect(EffectType.WasteNot2))
amt /= 2;
if (Condition == Condition.Sturdy)
if (Condition == Condition.Sturdy || Condition == Condition.Robust)
amt /= 2;
return (int)Math.Ceiling(amt);
}
Expand Down