Use ranch feeding priorities and current breakthrough caps
This commit is contained in:
@@ -274,8 +274,8 @@ class Policy:
|
||||
protect_quality: int = 3
|
||||
reserved_types: list[int] = field(default_factory=list)
|
||||
reserved_eggs: dict[str, int] = field(default_factory=dict)
|
||||
feed_target: int = 0
|
||||
target_level: int = 70
|
||||
feed_target: int = 0 # Legacy single-target policies; the GUI migrates to feed_targets.
|
||||
target_level: int = 70 # Legacy file compatibility; automatic feeding uses the current cap.
|
||||
room_id: int = 0
|
||||
coins_per_exp: float = 5.0
|
||||
fill: bool = True
|
||||
@@ -388,12 +388,12 @@ class Planner:
|
||||
if cap is None:
|
||||
reason = "目标突破上限未知,暂停喂养"
|
||||
continue
|
||||
limit = min(policy.target_level, cap)
|
||||
limit = cap
|
||||
level = int(target.get("level", 1))
|
||||
reason = f"目标 #{mid} Lv.{level};当前突破上限 {cap};喂养停止等级 {limit}"
|
||||
reason = f"目标 {self.catalog.monster_label(target)} Lv.{level};当前突破上限 {cap}"
|
||||
if level < limit:
|
||||
if self.catalog.feed_remaining(target, limit) == 0:
|
||||
reason = f"目标 #{mid} 经验已达到停止等级,等待服务器同步"
|
||||
reason = f"目标 {self.catalog.monster_label(target)} 经验已达到当前突破上限,等待服务器同步"
|
||||
continue
|
||||
return target, reason
|
||||
return None, reason
|
||||
@@ -597,7 +597,7 @@ class Planner:
|
||||
return actions
|
||||
target_id = feeds[0].payload["targetId"]
|
||||
target = monsters[target_id]
|
||||
stop_level = min(policy.target_level, self.catalog.max_level(target))
|
||||
stop_level = self.catalog.max_level(target)
|
||||
need = self.catalog.feed_remaining(target, stop_level)
|
||||
ids, experience = [], 0
|
||||
for action in feeds:
|
||||
|
||||
Reference in New Issue
Block a user