Add region stage selection, eligible sweeps and daily rewards

This commit is contained in:
AttilaNet
2026-11-07 22:41:55 +08:00
parent 657f5f33b5
commit 42edc111d1
13 changed files with 1071 additions and 94 deletions
+31 -5
View File
@@ -4,6 +4,29 @@ Implemented in `ranch_assistant`; launch `Start_Ranch_Helper.cmd`.
See `ranch_assistant/README.md` for login, strategies and page screenshots.
The successful V4 combat package was not modified or rebuilt.
## Stage tree, built-in sweep and daily rewards
The stage page now groups the shipped 1178 stages by region, with account-specific
unlocked difficulty choices, stars, possible drops, per-stage checkboxes and local
daily attempt limits. Wire progress is a list of difficulty IDs, not a boolean
array. The previous search missed the pinyin `saodang` methods: ordinary stages
with all three difficulties cleared have an official sweep branch that reuses
stageStart/battleEnd/recordBattleResult without battle simulation. This branch is
implemented only with the original eligibility conditions. Events and uncertain
writes stop with a persisted pending record; no automatic replay occurs.
每日事务 groups sign-in gifts, seven-day check-ins, cumulative rewards, eligible
VIP daily gifts and mail attachment claims. Refreshes remain read-only; explicit
selection and execution are required. Null VIPs, millisecond/second timestamps,
JSON mail rewards and stale reads are handled. New policy and budget files remain
role-isolated. Full local suite: 100 tests passed. Live reward/sweep use is still
unverified; no real account or phone was operated during this work.
The screenshot page remains necessary for ADB real battles such as special
pudding stages; it is not required for the eligible API sweeps. Its content is
now scrollable and table rows fit native buttons, preventing overlap when the log
is enlarged. See `STAGES_DAILY.md` for source evidence and endpoint details.
## Current workflow
- The compact native page is named 自动孵蛋. The backpack table has per-species
@@ -98,9 +121,9 @@ The successful V4 combat package was not modified or rebuilt.
resources, advance satisfied steps and claim rewards. Needed eggs/monster
types are reserved against ranch actions. Battles and subsequent story steps
wait for the game; automatic navigation to each quest battle is not implemented.
- The map view shows stage/difficulty unlock and pass records from the account
snapshot, and can choose a normal ADB farming target. There is no claimed
standalone instant-sweep endpoint or headless battle simulator.
- The map tree shows account difficulty unlocks, stars and possible rewards.
The official eligible-stage sweep reuses the existing stage endpoints;
special stages can instead choose a normal ADB farming target.
- The incubation view includes closed positions and the separate VIP slot.
Real snapshots use monsterId=-1 for an empty slot; <=0 values now count as
empty and negative IDs never enter the managed-monster set. Offline replay of
@@ -158,7 +181,8 @@ The successful V4 combat package was not modified or rebuilt.
- `NetStage.as`, `BattleData.as`, `BattlePanel.as`: ordinary stage start,
local simulation and `battleEnd` containing kills, damage, time, formation
and other fields. This is not merely a success flag. Server-side validation
remains unknown. No sweep endpoint was found in the inspected network classes.
remains unknown. `StageStartPanel.doSaodangBattle` separately implements the
built-in all-difficulties-cleared sweep using the same network endpoints.
- `MYRCryptor.as` and `tools/extract_ranch_catalog.py`: MD5 resource paths,
zlib/AMF3 table decoding. Extracted 749 monsters, 1,178 stages, 78 special-stage
entries and 83 recurring task definitions, plus rooms, server and game settings.
@@ -169,7 +193,9 @@ method informs the configurable strategy; numeric values come from the APK.
## Validation and remaining inputs
88 unit/integration tests pass: local encrypted HTTP and inventory actions,
100 unit/integration tests pass: eligible-stage sweep and daily claim workflows,
pending writes and role/day budgets, stage tree/rule restoration and scroll
geometry, plus local encrypted HTTP and inventory actions,
SDK password form/headers -> two Android regions -> selected region entry ->
snapshot, verification/limited-login stops, recurring tasks and protections,
map unlocks per difficulty, screenshot/profile storage and invalidation, fake
+63
View File
@@ -0,0 +1,63 @@
# 地图、内置扫荡与每日事务
数据来源:用户提供的 1.9.68 APK、已反编译 AS3,以及现有本地日志的只读回放。
新流程由本地假客户端与 Qt 测试验证,未连接官方账号执行领奖、开战或扫荡。
## 地图状态
- `element/master/HistoryVo.as:415`:`unlockStage`、`passStage` 的网络格式是
`{ "0101": ["1", "2"] }`;AS3 转成每难度布尔字段。不能把原列表的数组下标当难度标记。
- `element/stage/StageVo.as:20`:星级是最高已通关难度,0~3;全通要求1、2、3都存在。
- `element/city/CityVo.as:46`:难度2/3还需通过地区的 `openHardModeStage` /
`openExtraModeStage` 指定关卡;空配置不设额外门槛。
- `levelLock`、`closed`、`stage_sp.condition` 继续限制可选难度和当前开放状态。
- `stage_info` 的 `tagname` 是界面编号,例如1-1;内部编号为0101。
- 地区名来自 `game_setting.cityInfo`,不另有 `city_info.json` 文件。
- 每个难度的 `reward` 保存金币/经验和随机物品/魔物池。界面列出可能奖励,
物品名来自 `item_info`;随机池不意味着每件必掉。原先裁剪资料丢弃了这些字段,现已保留。
## 内置扫荡
此前“未发现独立扫荡接口”不足以判断没有扫荡功能;拼音 `saodang` 才是实际方法名。
- `panel/stage/StagePanel.as:421`:按钮开放条件严格为
`!curstage.special && !curstage.posmode && curstage.getAllLevelPass()`。
- `panel/stage/StageStartPanel.as:81`:`startSaodang()` 设置扫荡模式后复用 `start()`。
当前难度有任务或触发随机事件时退出扫荡分支,不能直接继续普通扫荡结算。
- `StageStartPanel.as:183`:`doSaodangBattle()` 使用当前所选战队ID和默认战斗统计,
不运行实际战斗模拟。辅助仅在上述条件满足时复用该官方分支。
| 顺序 | 请求 | 参数/处理 |
|---|---|---|
| 1 | `stageService/stageStart` | `stageTypeId`, `stageLevel`;检查`triggerEvent`,遇事件停止 |
| 2 | `battleService/battleEnd` | `battleData`;结构见`BattleData.as`、`BattlePosition.as`,阵容取实际战队 |
| 3 | `battleService/recordBattleResult` | `stageId`, `cityId`(原客户端取编号第二个字符), `result` |
| 4 | `masterService/masterQueryDetail` | 重读体力、物品、魔物经验、进度等权威状态 |
辅助不向未全通关关卡使用此分支;特殊活动仍通过手机实战。
本地次数按角色/北京时间日期/关卡/难度记账,发请求前预留;它不代表官方每日剩余次数。
异常或事件保留本地pending记录,禁止自动重发;用户在游戏内处理后可清除。
手机实战与接口扫荡互斥,其他牧场/每日/委托操作在同一worker里串行。
## 每日与邮件
| 项目 | 状态来源 | 领取请求 | 条件 |
|---|---|---|---|
| 每日签到礼包 | `activityHistory.dailyGift` | `dailyGiftService/dailyGiftSign` | 本日未领 |
| 七日签到 | `activityHistory.dailyCheck` | `dailyCheckService/dailyCheck` | `checkDay<7`且本日未领 |
| 累计签到奖励 | `dailyGift`及`activity_info.loopCheckReward` | `dailyGiftService/dailyLoopReward` | 活动开放且累计天数达标 |
| VIP日奖 | `activityHistory.vipInfo` | `vipService/getReward` | 已有有效资格且本日未领 |
| 邮件附件 | 快照的`mails` | `mailService/mailGetReward` | `mailId`;有附件、未领、未过期 |
- `NetActi.as`、`center/ActiCenter.as`、`element/master/ActivityHistoryVo.as`是签到请求及字段证据。
- `dailyGiftCheckTime`、`checkTime`、`getTime`等统一兼容毫秒/秒,日期按北京时间比较。
`None`不参与`int(None)`转换。VIP为空显示无资格。
- `ActivityHistoryVo.loopCheckRewardDayNum()`取连续签到数、距上次累计领奖日差、活动目标的最小值。
- `center/MailCenter.as:44`:`reward`是JSON字符串,`isGetReward==1`为已领,`createTime`为毫秒。
`element/msg/MailVo.as`按日历日计算普通邮件七天期限。
- 刷新只读已有快照字段;领取必须点按钮或启用自动策略。不会发送
`dailyGiftUpdate`、付费开通VIP、邮件删除/已读请求。
- 每次写请求前持久化本日尝试标记;响应旧数据或网络结果不明时不会反复领取。
截图页仍用于ADB手机实战,使用可滚动容器和符合按钮实际高度的行高;
接口扫荡和每日事务不依赖截图。保持原生Qt样式,未修改窗口边框。