Improve task filters, exploration rewards and V4 battle simulation
This commit is contained in:
@@ -614,17 +614,19 @@ class ExplorePlanner:
|
||||
if account["pending"]:
|
||||
return [self._blocked(account["pending"])]
|
||||
self._issued.pop(scope, None)
|
||||
if not policy.enabled:
|
||||
return []
|
||||
if not self.open(snapshot):
|
||||
return [Action("explore_blocked", "探险功能尚未解锁", "", {})]
|
||||
teams = [team for team in snapshot.raw.get("exploreTeams") or [] if isinstance(team, dict)]
|
||||
# The host's global automation switch authorizes reward claims.
|
||||
# This policy's global/per-team switches only authorize a restart.
|
||||
for team in teams:
|
||||
team_id = _integer(team.get("id"), -1)
|
||||
if (team_id > 0 and _integer(team.get("status")) == 1
|
||||
and self.remaining(snapshot, team) == 0):
|
||||
return [self._issue(scope, Action("explore_finish", f"领取探险队 {team_id} 的奖励",
|
||||
"exploreService/finish", {"exploreTeamId": team_id}))]
|
||||
if not policy.enabled:
|
||||
return []
|
||||
if not self.open(snapshot):
|
||||
return [Action("explore_blocked", "探险功能尚未解锁", "", {})]
|
||||
stamina = _integer((snapshot.raw.get("master") or {}).get("ti"))
|
||||
occupied = self._occupied(snapshot)
|
||||
for team in teams:
|
||||
|
||||
Reference in New Issue
Block a user