Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
epic quests: fixed dragging to second page
Browse files Browse the repository at this point in the history
  • Loading branch information
tmarenko committed Oct 21, 2021
1 parent e5d150c commit 3e1283a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/game/missions/epic_quest.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def separate_stages(self):
class TenStageEpicQuest(EpicQuest):
"""Class for working with Epic Quests with 10 stages (usual missions without difficulty)."""

SECOND_PAGE_EQ = [ui.EQ_RISE_OF_X_MEN.name, ui.EQ_SORCERER_SUPREME.name, ui.EQ_X_FORCE.name]

def __init__(self, game, mode_selector_ui, mission_selector_ui, mission_selector_label_ui, stage_selector_ui,
stage_name=None):
"""Class initialization.
Expand All @@ -164,7 +166,7 @@ def __init__(self, game, mode_selector_ui, mission_selector_ui, mission_selector
def _select_epic_quest(self):
"""Selects Epic Quest."""
if self.game.go_to_epic_quests():
if self.mode_selector_ui in [ui.EQ_RISE_OF_X_MEN, ui.EQ_SORCERER_SUPREME, ui.EQ_X_FORCE]:
if self.mode_selector_ui.name in self.SECOND_PAGE_EQ:
logger.debug("Epic Quests is referring to the second page. Trying to scroll.")
self.emulator.drag(ui.EQ_PAGE_DRAG_FROM, ui.EQ_PAGE_DRAG_TO)
r_sleep(1)
Expand Down

0 comments on commit 3e1283a

Please sign in to comment.