ffxiv-teamcraft / simulator

Crafting simulator for FINAL FANTASY XIV
MIT License
24 stars 18 forks source link

Bug: Rotation Simulator does not properly handle 10 durability loss when less than 10 durability remains #10

Closed Faedelity closed 5 years ago

Faedelity commented 5 years ago

Describe the bug There are a few ways to end up with 5 durability remaining on your last action, with the last action causing 10 durability loss. Waste Not, Waste Not II, and a few wonky recipes that I think are meant to encourage you to use those abilities can all create this situation. Comfort Zone can also take you off of round tens, and there might be more I haven't noticed.

In-game, you can use a 10 durability loss action on your last action, and even though there are only 5 (or whatever other number under 10) left, the crafting finishes correctly. In the simulator, it throws an error, saying that the rotation will not be completed because durability will run out before the rotation is done.

To Reproduce Steps to reproduce the behavior: One of many ways, but this is what I used to confirm that yes, the crafting definitely finishes.

  1. Get on Culinarian, at high enough level to craft Rolanberry Cheese, with at least Careful Synthesis and Waste Not as available actions. I also used Steady Hand and Hasty Touch, but any durability-using action and non-durability-using action, neither of which add Progress, so that you can make sure your ending number is 5, will work.
  2. Begin crafting, and activate Waste Not.
  3. Perform appropriate non-progress-adding actions to bring the Durability to 5 (if one hit of Careful Synthesis will not complete the Rolanberry Cheese on your build, do all but the last Careful Synthesis as part of this).
  4. Use Careful Synthesis as your last action.
  5. Receive your three Rolanberry Cheese, demonstrating that this works.
  6. Put the precise same set of actions you just took to make cheese into the Simulator.
  7. Get error indicating durability runs out before the rotation is completed.

Expected behavior I expected the simulator to match the game behavior, which is apparently to process Progress before deducting durability, thus not failing if the last action would cause more durability loss than there is durability left.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Supamiu commented 5 years ago

Can you add a screenshot of the error with the simulation please? This error is supposed to show only if the durability is < 0 and craft isn't finished. So if your last action completed progression, it shouldn't display an error.

Having the error with the simulation would help reproduce the issue inside a unit test.

Faedelity commented 5 years ago

Hm. I tested this three times at the time I posted it, but it appears to be working as intended now. Maybe one of the updates in the meantime fixed it. At any rate, it's working now. Thank you!