Skip to content

Handle Storm Pod dialogues#2008

Merged
reconman merged 3 commits intomasterfrom
ordeal-call
Dec 22, 2025
Merged

Handle Storm Pod dialogues#2008
reconman merged 3 commits intomasterfrom
ordeal-call

Conversation

@reconman
Copy link
Copy Markdown
Collaborator

  • Confirms starting Bleached Earth quests
  • Handle Out of Pods messages in non-JP servers

Fixes #1598

- Confirms starting Bleached Earth quests
- Handle Out of Pods messages in non-JP servers
@reconman reconman requested a review from Copilot May 18, 2025 09:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds handling for the pod confirmation dialog when starting Bleached Earth quests and ensures the out-of-pods message is handled on non-JP servers.

  • Introduces a new region and detection for the “Start Quest” confirmation dialog.
  • Updates AutoBattle to click the confirm button and include the new branch in its decision logic.
  • Registers the StartQuest image in Images and ImageLoader, and fixes a scoping issue in DroidCvPattern.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/src/main/java/io/github/fate_grand_automata/scripts/locations/Locations.kt Added ordealCallConfirmPodUseRegion for the confirm dialog.
scripts/src/main/java/io/github/fate_grand_automata/scripts/entrypoints/AutoBattle.kt Created isInOrdealCallConfirmPodUseScreen(), added confirmPodUsage branch, and updated exception catch.
scripts/src/main/java/io/github/fate_grand_automata/scripts/Images.kt Added new enum value StartQuest.
app/src/main/java/io/github/fate_grand_automata/util/ImageLoader.kt Mapped Images.StartQuest to its PNG.
app/src/main/java/io/github/fate_grand_automata/imaging/DroidCvPattern.kt Moved Mat instantiation inside branch but removed outer scope declaration.
Comments suppressed due to low confidence (3)

scripts/src/main/java/io/github/fate_grand_automata/scripts/entrypoints/AutoBattle.kt:524

  • The new confirmPodUsage branch isn't covered by existing tests. Add a test that simulates the StartQuest dialog on both JP and non-JP servers and verifies the click behavior.
var confirmPodUsage = false

app/src/main/java/io/github/fate_grand_automata/imaging/DroidCvPattern.kt:81

  • The match function removes the outer result declaration and only declares result inside the if block, but there's no return of result at the end. This will cause a compilation error and break template matching. Consider declaring val result = Mat() at the method start and returning it after matchTemplate.
val result = Mat()

scripts/src/main/java/io/github/fate_grand_automata/scripts/entrypoints/AutoBattle.kt:535

  • After clicking the pod usage confirmation, the code continues to refill.refill() without exiting or pausing. This may trigger a refill too early. Consider throwing an ExitException or returning immediately, similar to other dialog handlers.
confirmPodUsage -> locations.ordealCallConfirmPodUseRegion.center.click()

@github-actions
Copy link
Copy Markdown

github-actions bot commented May 18, 2025

Build 734

Download the latest APK for testing here

Note

You need a GitHub account to download the APK.

This URL is valid as long as the artifact has not expired yet.

@ArthurKun21
Copy link
Copy Markdown
Collaborator

ArthurKun21 commented May 19, 2025

I honestly just use the cancel button like this

cancel

val cancelQuestRegion = Region(-202, 1054, 90, 180).xFromCenter()

to detect the popup before the quest starts

works on both NA and JP so far and probably I assume the others servers too

@reconman reconman merged commit 024fcb7 into master Dec 22, 2025
1 check passed
@reconman reconman deleted the ordeal-call branch December 22, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Ordeal Call support

3 participants