Default egg restocking to ten draws and add single-draw opt-in

This commit is contained in:
AttilaNet
2026-11-09 07:44:41 +08:00
parent d7ca68b5f9
commit df0259febf
7 changed files with 79 additions and 16 deletions
@@ -58,7 +58,7 @@ class ManualRuleTests(unittest.TestCase):
self.snapshot.raw["stacks"] = []
self.snapshot.raw["monsters"] = []
self.snapshot.raw["items"] = [{"id": 502, "typeId": 1002010, "num": 100}]
policy = Policy(manual_eggs=True, buy=True, fill=False, buy_ten=False, buy_batch=2,
policy = Policy(manual_eggs=True, buy=True, fill=False, buy_ten=False, allow_single_draw=True, buy_batch=2,
egg_rules={"1001010": self.rule(refill_below=1, refill_target=5, market_id="sc_city1")})
self.assertEqual(self.planner.plan(self.snapshot, policy)[0].payload["num"], 2)
self.snapshot.raw["items"].append({"id": 501, "typeId": 1001010, "num": 2})