Skip to content

Commit

Permalink
Opt: search archives entrance (#4284)
Browse files Browse the repository at this point in the history
* Upd: re-crop war_archives templates to reduce height

* Opt: full scan archives_entrance twice
  • Loading branch information
Air111 authored Oct 16, 2024
1 parent 7e47138 commit b5dd289
Show file tree
Hide file tree
Showing 52 changed files with 5 additions and 2 deletions.
Binary file modified assets/cn/war_archives/TEMPLATE_ASHEN_SIMULACRUM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_AURORA_NOCTIS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_CRESCENDO_OF_POLARIS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_CRIMSON_ECHOES.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_DIVERGENT_CHESSBOARD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_DREAMWAKERS_BUTTERFLY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_EMPYREAL_TRAGICOMEDY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_ENCIRCLING_GRAF_SPEE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_FALLEN_WINGS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_GLORIOUS_BATTLE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_INK_STAINED_STEEL_SAKURA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_INVERTED_ORTHANT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_IRIS_OF_LIGHT_AND_DARK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_KHOROVOD_OF_DAWNS_RIME.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_MICROLAYER_MEDLEY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_MIRROR_INVOLUTION.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_NORTHERN_OVERTURE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_PRELUDE_UNDER_THE_MOON.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_SCHERZO_OF_IRON_AND_BLOOD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_SKYBOUND_ORATORIO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_STRIVE_WISH_AND_STRATEGIZE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_SWIRLING_CHERRY_BLOSSOMS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_THE_ENIGMA_AND_THE_SHARK.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/cn/war_archives/TEMPLATE_THE_SOLOMON_RANGER.png
Binary file modified assets/cn/war_archives/TEMPLATE_THE_WAY_HOME_IN_THE_NIGHT.png
Binary file modified assets/cn/war_archives/TEMPLATE_UNIVERSE_IN_UNISON.png
Binary file modified assets/cn/war_archives/TEMPLATE_VISITORS_DYED_IN_RED.png
Binary file modified assets/cn/war_archives/TEMPLATE_WINTERS_CROWN.png
Binary file modified assets/jp/war_archives/TEMPLATE_CRESCENDO_OF_POLARIS.png
Binary file modified assets/jp/war_archives/TEMPLATE_CRIMSON_ECHOES.png
Binary file modified assets/jp/war_archives/TEMPLATE_DIVERGENT_CHESSBOARD.png
Binary file modified assets/jp/war_archives/TEMPLATE_ENCIRCLING_GRAF_SPEE.png
Binary file modified assets/jp/war_archives/TEMPLATE_FALLEN_WINGS.png
Binary file modified assets/jp/war_archives/TEMPLATE_GLORIOUS_BATTLE.png
Binary file modified assets/jp/war_archives/TEMPLATE_INK_STAINED_STEEL_SAKURA.png
Binary file modified assets/jp/war_archives/TEMPLATE_IRIS_OF_LIGHT_AND_DARK.png
Binary file modified assets/jp/war_archives/TEMPLATE_STRIVE_WISH_AND_STRATEGIZE.png
Binary file modified assets/jp/war_archives/TEMPLATE_UNIVERSE_IN_UNISON.png
Binary file modified assets/jp/war_archives/TEMPLATE_VISITORS_DYED_IN_RED.png
Binary file modified assets/jp/war_archives/TEMPLATE_WINTERS_CROWN.png
Binary file modified assets/tw/war_archives/TEMPLATE_DIVERGENT_CHESSBOARD.png
Binary file modified assets/tw/war_archives/TEMPLATE_ENCIRCLING_GRAF_SPEE.png
Binary file modified assets/tw/war_archives/TEMPLATE_FALLEN_WINGS.png
Binary file modified assets/tw/war_archives/TEMPLATE_GLORIOUS_BATTLE.png
Binary file modified assets/tw/war_archives/TEMPLATE_MICROLAYER_MEDLEY.png
Binary file modified assets/tw/war_archives/TEMPLATE_STRIVE_WISH_AND_STRATEGIZE.png
Binary file modified assets/tw/war_archives/TEMPLATE_VISITORS_DYED_IN_RED.png
Binary file modified assets/tw/war_archives/TEMPLATE_WINTERS_CROWN.png
7 changes: 5 additions & 2 deletions campaign/campaign_war_archives/campaign_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ def _search_archives_entrance(self, name, skip_first_screenshot=True):
Fixed number of scrolls until give up, may need to
increase as more war archives campaigns are added
"""
for _ in range(10):
for _ in range(20):
if skip_first_screenshot:
skip_first_screenshot = False
else:
self.device.screenshot()

while self.device.click_record and self.device.click_record[-1] == 'WAR_ARCHIVES_SCROLL':
self.device.click_record.pop()

# Drag may result in accidental exit, recover
# before starting next search attempt
while not self.appear(WAR_ARCHIVES_CHECK):
Expand All @@ -80,7 +83,7 @@ def _search_archives_entrance(self, name, skip_first_screenshot=True):
if WAR_ARCHIVES_SCROLL.at_bottom(main=self):
WAR_ARCHIVES_SCROLL.set_top(main=self)
else:
WAR_ARCHIVES_SCROLL.next_page(main=self)
WAR_ARCHIVES_SCROLL.next_page(main=self, page=0.66)
continue
else:
break
Expand Down

0 comments on commit b5dd289

Please sign in to comment.