feat(battle): custom command card selection - #2196
Conversation
|
Could you also update the wiki with the new entry? Around here https://github.com/Fate-Grand-Automata/FGA/blob/master/wiki/scripts/Battle.md#card-priority-optional |
|
Added an entry in wiki. Not sure if it's clear enough, let me know if I missed anything. btw, I didn't notice there's a wiki page until today, would've been a great help for me when I started using the app. I wonder why there isn't an in-app button/link to the wiki page? |
lmao, yea forgot. But personally would love to just have a github pages though |
|
How would this work with #2087 ? |
Personally I think, that is out of scope of this PR when the other PR haven't been merged nor reviewed by reconman yet |
I didn't know abt the other PR so I only had a quick look. Correct me if I'm wrong. Based on the implementation of pickCards() in their Card.kt and the one in Card.kt here, (if both were merged successfully) I think the custom selection feature here would have the highest priority when there is a selection setting and those cards are available, otherwise it would fall back to their implementation. |
|
Let's worry about the other PR once it got reviewed by reconman and merged. The simpler this PR be, the more faster this could get merged. |
# FGA v3032 + PR Fate-Grand-Automata#2196 Extended 本分支以官方 FGA v3032 与 PR Fate-Grand-Automata#2196 为基础,保留并扩展自定义出卡策略、能放就放、令咒复活、岸波白野洗牌和自动使用梦火。 ## 已实现内容 ### 自定义出卡策略 - 原 `Custom Card Selection` 中文名改为“自定义出卡策略”。 - 结构为 `Wave → Turn → 有序候选组合`;Wave1、Turn1 固定保留,其余项目可增删。 - 超出已配置 Wave/Turn 时沿用最后一个 Wave/Turn。 - 每个 Turn 可配置多套候选组合,并可长按候选项上下拖动调整顺序。 - 支持 `N1/N2/N3`、任意颜色 `B/A/Q`、指定从者颜色卡 `B1/A1/Q1` 等,以及任意未占用非宝具卡 `X`。 - 同一组合中的每个符号必须匹配不同的实体卡。例如 `X,A1,B1` 中,X 不能再次占用已匹配的 A1 或 B1。 - 所有候选组合均无法完整匹配时,回退到从者优先级(若启用),再使用颜色优先级。 - 已删除“开局等牌”模式。 ### 能放就放 - 条件恢复为原版三种:无、能放就放、危险敌人时释放。 - 删除敌人数与 NP 条件及独立检查目标,只保留技能施放目标。 - 保留御主礼装技能 j/k/l。 - 同一回合会继续检查并释放所有满足条件、冷却完成的技能。 - Wave4 及以后沿用 Wave3 设置。 ### 令咒复活 - 团灭出现“续关”弹窗后,在限定区域内使用灰度模板检测可点击的“使用令咒”按钮。 - 检测成功才点击令咒复活并确认;按钮不可用时不消耗圣晶石,转入原有撤退流程。 - 不使用 OCR,也不识别“三划令咒”文字。 - 指令卡兜底保证不会因不足三张而卡在选卡页面。 ### 岸波白野洗牌 - 洗牌固定在全部预设技能释放完毕、最终选卡之前执行。 - 自动模式在前排 1/2/3 号位的固定姓名区域内,以灰度模板寻找“岸波白野”;手动模式可直接指定 1/2/3 号位。 - 可多选 Wave1/Wave2/Wave3;选中的 Wave 内每个 Turn 都会判断当前手牌是否满足当前候选组合。 - 不满足时循环使用对应位置的一技能重新发牌,直到匹配成功或识别到能量不足弹窗。 - 能量不足时识别并点击“关闭”,本 Turn 停止洗牌;后续启用洗牌的 Turn 仍会重新尝试。 - 自动识别失败时提示更新模板,并按普通从者/颜色优先级出牌。 ### 自动使用梦火 v2 - 全流程仅使用限定坐标范围内的灰度模板匹配,不使用 OCR,也不识别或记录从者头像。 - 牵绊结算页通过“最大值”模板判断是否存在满牵绊从者。 - 选择从者页只在队伍五人区域内寻找紧贴文字边缘的“可以开放”模板,重复开放直到找不到。 - 点击“开放”后若未出现“决定”模板,立即停止脚本,提示“材料不足”并使用掉落礼装同款震动提醒。 - 使用完毕后依靠左上角固定区域的灰度模板逐级返回,以“通知”模板确认已回到主页面。 - 用户在 FGA 根目录的 `access` 文件夹中手动放置入口图片。一级入口必选,二级入口可为空;软件加载后转为灰度模板。 - 一级/二级入口均只搜索屏幕右半区。先向下滑三次回到列表顶部,再逐次向上滑并匹配;通过右侧滑块的底部特征判断已经遍历到底。 - 到底仍找不到时安全停止,分别提示“未找到一级入口”或“未找到二级入口”。 - 可选择“有地图/无地图”。有地图时等待 5 秒后寻找“横向双菱形 + 上一次”紧凑模板,再按固定偏移点击关卡;无地图时直接进入确认关卡。 - 进入确认关卡前另等待 5 秒,在限定区域内寻找紧凑的“上次执行”模板,并按固定偏移点击关卡入口。 - 体力不足时交回原战斗模块,继续使用用户已有的苹果设置。 ## 构建要求 - JDK 17 - Android SDK 35 - Gradle 9.5.1(或兼容的项目 Gradle Wrapper)
Pull Request Type
Related Issue
Description
Screenshots
Entry on Config Screen with preview



Selection interface designed after card priority interface
Servants ordered as their position on battle field, can select one each time
Up to 3 cards can be selected each turn