fix: keep automatic cultivation on one stable primary per species

This commit is contained in:
AttilaNet
2026-11-13 08:51:03 +08:00
parent 01ad2e3ab9
commit 4fbe895999
35 changed files with 2069 additions and 322 deletions
@@ -41,7 +41,10 @@ class ManualRuleTests(unittest.TestCase):
self.planner.managed.add(food["id"])
primary = self.snapshot.monsters[900]
primary.update(potentialLevel=2, level=20)
secondary = dict(primary, id=901, level=9, potentialLevel=1)
row = self.catalog.monster(primary["typeId"])
for stat in ("atk", "def", "hp", "dex"):
primary["g" + stat.capitalize()] = row[stat + "_grow_min"] + .6 * (row[stat + "_grow_max"] - row[stat + "_grow_min"])
secondary = dict(primary, id=901, typeId=1002010, level=9, potentialLevel=1)
self.snapshot.raw["monsters"].append(secondary)
policy = Policy(manual_eggs=True, strategy="gold", fill=False, protect_star=6, protect_quality=5,
egg_rules={str(food["typeId"]): self.rule(action="feed", keep_count=0)}, feed_targets={"900": 1, "901": 2})