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
+5 -1
View File
@@ -117,8 +117,12 @@ class BreakthroughTests(unittest.TestCase):
def test_independent_targets_replace_feed_targets_and_empty_is_empty(self):
other = copy.deepcopy(self.snapshot.monsters[900])
other["id"] = 901
row = self.catalog.monster(1003010)
caps = self.catalog.data["potential_info"]["potential"][str(row["job"])][str(row["star"])]
other.update(id=901, typeId=1003010,
**{"p" + stat.capitalize(): caps[stat] for stat in ("atk", "def", "hp", "dex")})
self.snapshot.raw["monsters"].append(other)
self.assertEqual(self.planner.plan(self.snapshot, self.policy).payload["monId"], 900)
action = self.planner.plan(self.snapshot, self.policy, targets={"901": 1})
self.assertEqual(action.payload["monId"], 901)
self.assertIsNone(self.planner.plan(self.snapshot, self.policy, targets={}))