Fix advisor craft count when skill is already ready to level up.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-22 15:48:34 +02:00
parent 43751ac7de
commit abdeab59e7
3 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -38,8 +38,8 @@ def missing_materials(
def crafts_to_next_level(xp_remaining: int, xp_per_item: float) -> int:
if xp_remaining <= 0 or xp_per_item <= 0:
return 1
return max(1, int((xp_remaining + xp_per_item - 1) // xp_per_item))
return 0
return int((xp_remaining + xp_per_item - 1) // xp_per_item)
def advise_skill(