diff --git a/lib/game/missions/__init__.py b/lib/game/missions/__init__.py index 49e60f9..bb38705 100644 --- a/lib/game/missions/__init__.py +++ b/lib/game/missions/__init__.py @@ -8,6 +8,7 @@ FriendsAndEnemies, WeatheringTheStorm, Blindsided, DarkAdvent, IncreasingDarkness, RoadToMonastery, \ MysteriousAmbush, MonasteryInTrouble, PowerOfTheDark, StingOfTheScorpion, SelfDefenseProtocol, LegacyOfBlood, \ PlayingHero, GoldenGods +from .events import EventWorldBoss, WorldEvent from .giant_boss_raid import GiantBossRaid from .legendary_battle import LegendaryBattle from .squad_battle import SquadBattle diff --git a/lib/game/missions/events.py b/lib/game/missions/events.py new file mode 100644 index 0000000..27044c8 --- /dev/null +++ b/lib/game/missions/events.py @@ -0,0 +1,217 @@ +from lib.game.battle_bot import ManualBattleBot +from lib.game.missions.missions import Missions +from lib.game.missions.world_boss import WorldBoss +from lib.functions import wait_until, r_sleep, is_strings_similar +import lib.logger as logging + +logger = logging.get_logger(__name__) + + +class EventMissions(Missions): + """Class for working with Event missions.""" + + def __init__(self, game): + """Class initialization. + + :param game.Game game: instance of the game. + """ + super().__init__(game, "") + + def find_event_ui_by_name(self, name): + """Find UI element of Event by it's name. + + :param name: name of event. + :return: UI element of event in Event List. + """ + self._drag_event_list_to_the_bottom() + for ui_index in range(1, 5): + event_ui = self.game.ui[f"EVENT_BUTTON_1_{ui_index}"] + event_text = self.emulator.get_screen_text(event_ui) + logger.debug(f"Found text inside event list: {event_text}") + if is_strings_similar(event_text, name): + return event_ui + self._drag_event_list_to_the_top() + for ui_index in range(1, 5): + event_ui = self.game.ui[f"EVENT_BUTTON_2_{ui_index}"] + event_text = self.emulator.get_screen_text(event_ui) + logger.debug(f"Found text inside event list: {event_text}") + if is_strings_similar(event_text, name): + return event_ui + + def _drag_event_list_to_the_top(self): + """Drag Event List to the top.""" + logger.debug("Dragging Event list to the top.") + self.emulator.drag(self.ui['EVENT_LIST_DRAG_FROM'].button, + self.ui['EVENT_LIST_DRAG_TO'].button) + r_sleep(1) + + def _drag_event_list_to_the_bottom(self): + """Drag Event List to the bottom.""" + logger.debug("Dragging Event list to the bottom.") + self.emulator.drag(self.ui['EVENT_LIST_DRAG_TO'].button, + self.ui['EVENT_LIST_DRAG_FROM'].button) + r_sleep(1) + + +class EventWorldBoss(EventMissions, WorldBoss): + """Class for working with Event World Boss.""" + + EVENT_NAME = "Event World Boss\nEVENT" + + def __init__(self, game): + """Class initialization. + + :param game.Game game: instance of the game. + """ + super(EventMissions, self).__init__(game) + self._stages = 5 + + @property + def battle_over_conditions(self): + def allies(): + return self.emulator.is_ui_element_on_screen(self.ui['EVENT_WORLD_BOSS_ALLIES']) + + def cannot_enter(): + if self.emulator.is_ui_element_on_screen(self.ui['EVENT_WORLD_BOSS_LIMIT_REACHED']): + logger.debug("Reached limit of missions.") + self._stages = 0 + self.emulator.click_button(self.ui['EVENT_WORLD_BOSS_LIMIT_REACHED']) + return True + + return [allies, cannot_enter] + + def open_event_world_boss(self): + """Open Event World Boss from Event List.""" + self.game.go_to_main_menu() + event_ui = self.find_event_ui_by_name(self.EVENT_NAME) + if not event_ui: + logger.info("Can't find Event World Boss, probably event isn't on right now.") + return + self.emulator.click_button(event_ui.button) + return wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['EVENT_WORLD_BOSS_LABEL']) + + def complete_event_world_boss(self): + """Complete all available stages in Event World Boss.""" + self.open_event_world_boss() + if not self.emulator.is_ui_element_on_screen(self.ui['EVENT_WORLD_BOSS_ENTER']): + logger.info("No available Event World Boss battles.") + return self.game.go_to_main_menu() + self.emulator.click_button(self.ui['EVENT_WORLD_BOSS_ENTER'].button) + while self._stages > 0: + if not self._start_world_boss_battle(): + logger.error("Failed to start battle. Returning to main menu.") + return self.game.go_to_main_menu() + self._stages -= 1 + if self._stages > 0: + self.press_repeat_button() + else: + self.press_home_button(home_button="EVENT_WORLD_BOSS_HOME_BUTTON") + logger.info("No more stages.") + + def press_repeat_button(self, repeat_button_ui='EVENT_WORLD_BOSS_REPEAT_BUTTON', start_button_ui='WB_SET_TEAM'): + """Press repeat button of the mission.""" + logger.debug(f"Clicking REPEAT button with UI Element: {repeat_button_ui}.") + self.emulator.click_button(self.ui[repeat_button_ui].button) + while not self.emulator.is_ui_element_on_screen(ui_element=self.ui[start_button_ui]): + if self.emulator.is_ui_element_on_screen(self.ui['EVENT_WORLD_BOSS_LIMIT_REACHED']): + logger.debug("Reached limit of missions.") + self._stages = 0 + self.emulator.click_button(self.ui['EVENT_WORLD_BOSS_LIMIT_REACHED']) + return True + self.close_after_mission_notifications(timeout=1) + return True + + def _start_world_boss_battle(self, check_inventory=True): + """Start World Boss battle.""" + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, ui_element=self.ui['WB_SET_TEAM']): + self._deploy_characters() + self.emulator.click_button(self.ui['WB_SET_TEAM'].button) + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['WB_UNAVAILABLE_CHARACTER']): + logger.warning("Stopping battle because your team has unavailable characters.") + self.emulator.click_button(self.ui['WB_UNAVAILABLE_CHARACTER'].button) + return False + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['WB_LOW_VALOR_OR_ATTACK']): + self.emulator.click_button(self.ui['WB_LOW_VALOR_OR_ATTACK'].button) + # Second notification about ATK is similar + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['WB_LOW_VALOR_OR_ATTACK']): + self.emulator.click_button(self.ui['WB_LOW_VALOR_OR_ATTACK'].button) + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, ui_element=self.ui['WB_START_BUTTON']): + self._deploy_allies() + self.emulator.click_button(self.ui['WB_START_BUTTON'].button) + if check_inventory and wait_until(self.emulator.is_ui_element_on_screen, timeout=2, + ui_element=self.ui['INVENTORY_FULL']): + logger.warning("Stopping battle because inventory is full.") + self.emulator.click_button(self.ui['INVENTORY_FULL'].button) + self.stages *= 0 + return False + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['WB_NOT_FULL_ALLY_TEAM']): + self.emulator.click_button(self.ui['WB_NOT_FULL_ALLY_TEAM'].button) + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['WB_EXCLUDE_CHARACTERS_FROM_ALLIES']): + self.emulator.click_button(self.ui['WB_EXCLUDE_CHARACTERS_FROM_ALLIES'].button) + ManualBattleBot(self.game, self.battle_over_conditions).fight(move_around=True) + return True + logger.warning("Failed to locate START button.") + return False + logger.warning("Failed to set team.") + + +class WorldEvent(EventMissions): + """Class for working with World Event.""" + + EVENT_NAME = "WORLD EVENT\nAvailable Now" + + @property + def battle_over_conditions(self): + def total_score(): + if self.emulator.is_ui_element_on_screen(self.ui['EVENT_WORLD_BATTLE_TOTAL_SCORE']): + self.emulator.click_button(self.ui['EVENT_WORLD_BATTLE_TOTAL_SCORE'].button) + return True + + return [total_score] + + def open_world_event(self): + """Open World Event in Event List.""" + self.game.go_to_main_menu() + event_ui = self.find_event_ui_by_name(self.EVENT_NAME) + if not event_ui: + logger.info("Can't find World Event, probably event isn't on right now.") + return + self.emulator.click_button(event_ui.button) + return wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['EVENT_WORLD_LABEL']) + + def _get_ready_to_battle(self): + """Getting ready to participate in World Event.""" + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['EVENT_WORLD_BATTLE_READY_BUTTON']): + logger.debug("Getting ready to battle.") + self.emulator.click_button(self.ui['EVENT_WORLD_BATTLE_READY_BUTTON'].button) + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['EVENT_WORLD_SELECT_BATTLE_READY']): + logger.debug("Selecting battle system.") + self.emulator.click_button(self.ui['EVENT_WORLD_SELECT_BATTLE_READY'].button) + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['EVENT_WORLD_SELECT_BATTLE_READY_OK']): + logger.debug("System selected.") + self.emulator.click_button(self.ui['EVENT_WORLD_SELECT_BATTLE_READY_OK'].button) + + def complete_world_event(self): + """Complete available stage in World Event.""" + self.open_world_event() + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['EVENT_WORLD_LOBBY_READY_BUTTON']): + logger.debug("Entering into team selection lobby.") + self.emulator.click_button(self.ui['EVENT_WORLD_LOBBY_READY_BUTTON'].button) + self._get_ready_to_battle() + if wait_until(self.emulator.is_ui_element_on_screen, timeout=3, + ui_element=self.ui['EVENT_WORLD_BATTLE_START_BUTTON']): + self.emulator.click_button(self.ui['EVENT_WORLD_BATTLE_START_BUTTON'].button) + ManualBattleBot(self.game, self.battle_over_conditions).fight(move_around=True) + self.emulator.click_button(self.ui['EVENT_WORLD_BATTLE_TOTAL_SCORE'].button) + self.game.go_to_main_menu() diff --git a/lib/game/missions/world_boss.py b/lib/game/missions/world_boss.py index 729df0f..0027948 100644 --- a/lib/game/missions/world_boss.py +++ b/lib/game/missions/world_boss.py @@ -156,7 +156,7 @@ def start_missions(self, mode=MODE.ULTIMATE, difficulty=0, boss=BOSS.TODAYS_BOSS def _start_world_boss_battle(self, check_inventory=True): """Start World Boss battle. - :param: deploy characters or not. + :param: check_inventory check for full inventory or not. """ self.emulator.click_button(self.ui['WB_READY_BUTTON'].button) self.close_mission_notifications() diff --git a/lib/gui/widgets/queue_item_editor.py b/lib/gui/widgets/queue_item_editor.py index 05041bb..ee009da 100644 --- a/lib/gui/widgets/queue_item_editor.py +++ b/lib/gui/widgets/queue_item_editor.py @@ -39,6 +39,8 @@ def clear_parameters(self): parameters.pop("all_stages") # Remove `all_stages` kwarg anyway if "action" in parameters.keys(): parameters.pop("action") + if "event" in parameters.keys(): + parameters.pop("event") return parameters def get_executor(self): @@ -66,6 +68,8 @@ def name(self): if hour_offset: additional_text += f"[-{hour_offset} hour(s)]" return f"[Action] {self.mode_name.title()} {additional_text}" + if self.parameters.get("event"): + return f"[Event] {self.mode_name.title()} {additional_text}" farm_bios = self.parameters.get("farm_shifter_bios") battle = self.parameters.get("battle") mission_mode = self.parameters.get("mode") @@ -158,6 +162,9 @@ def __init__(self, game): daily_rewards = _DailyRewards(game) collect_free_energy = _CollectFreeEnergy(game) collect_energy_via_points = _CollectEnergyViaAssemblePoints(game) + event_world_boss = _EventWorldBoss(game) + world_event = _WorldEvent(game) + self.events = [event_world_boss, world_event] self.actions = [restart_game, daily_trivia, daily_rewards, comic_cards, custom_gear, friends_send_all, friends_acquire_all, alliance_check_in, collect_free_energy, collect_energy_via_points, wait_boost_points, wait_max_energy, wait_daily_reset, reset_world_boss, @@ -171,7 +178,7 @@ def __init__(self, game): friends_and_enemies, weathering_the_storm, blindsided, dark_advent, increasing_darkness, road_to_monastery, mysterious_ambush, monastery_in_trouble, power_of_the_dark, giant_boss_raid, sting_of_the_scorpion, self_defense_protocol, legacy_of_blood, playing_hero, golden_gods, - *self.actions] + *self.actions, *self.events] self.mode_names = [mode.mode_name for mode in self.modes] self.queue_item = None self.current_mode = None @@ -179,6 +186,7 @@ def __init__(self, game): menu_dict = { "[ACTIONS]": self.actions, + "[EVENTS]": self.events, "EPIC QUESTS": { "DARK REIGN": [playing_hero, golden_gods, sting_of_the_scorpion, self_defense_protocol, legacy_of_blood], @@ -516,6 +524,20 @@ def action(*args, **kwargs): return action, {**self.render_execution_params(), "action": True} +class Event(Action): + """Class for working with in-game mission events.""" + + def render_executable(self): + """Render function and settings for event.""" + event_executable = self.action_executable # Only function without class reference (GUI cannot be pickled) + + @reset_emulator_and_logger(game=self.game) + def event(*args, **kwargs): + return event_executable(*args, **kwargs) + + return event, {**self.render_execution_params(), "event": True} + + class _RestartGame(Action): def __init__(self, game): @@ -1346,3 +1368,17 @@ def __init__(self, game): self.mode_settings.append(GameMode.ModeSetting(setting_type=GameMode.ModeSetting.MultiCheckbox, setting_key="world_boss", values_dict=self.world_bosses)) + + +class _EventWorldBoss(Event): + + def __init__(self, game): + self.event_world_boss = missions.EventWorldBoss(game) + super().__init__(game, "EVENT WORLD BOSS", self.event_world_boss.complete_event_world_boss) + + +class _WorldEvent(Event): + + def __init__(self, game): + self.event_world_boss = missions.WorldEvent(game) + super().__init__(game, "WORLD EVENT", self.event_world_boss.complete_world_event) diff --git a/settings/ui/events.json b/settings/ui/events.json new file mode 100644 index 0000000..ba46e31 --- /dev/null +++ b/settings/ui/events.json @@ -0,0 +1,460 @@ +[ + { + "EVENT_LIST_DRAG_FROM": { + "text_rect": null, + "button_rect": { + "x1": 0.7233069576171864, + "y1": 0.48041542170252505, + "x2": 0.9760352937641509, + "y2": 0.5282693078368617 + }, + "text": null, + "image_threshold": null, + "chars": null, + "image_save_file": "event_list_drag_from", + "description": "Event: start position of dragging the list." + } + }, + { + "EVENT_LIST_DRAG_TO": { + "text_rect": null, + "button_rect": { + "x1": 0.7233069576171864, + "y1": 0.8140633500280379, + "x2": 0.9737921428516039, + "y2": 0.8579294123178464 + }, + "text": null, + "image_threshold": null, + "chars": null, + "image_save_file": "event_list_drag_to", + "description": "Event: end position of dragging the list." + } + }, + { + "EVENT_BUTTON_1_1": { + "text_rect": { + "x1": 0.7233663865283669, + "y1": 0.788477455844055, + "x2": 0.848876348914871, + "y2": 0.8571324780041942 + }, + "button_rect": { + "x1": 0.7233663865283669, + "y1": 0.788477455844055, + "x2": 0.848876348914871, + "y2": 0.8571324780041942 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_1_1", + "description": "Event button on main screen: #1 from bottom to top without scrolling." + } + }, + { + "EVENT_BUTTON_1_2": { + "text_rect": { + "x1": 0.7242440785730276, + "y1": 0.6987578246120553, + "x2": 0.8475598108478797, + "y2": 0.7666326760658291 + }, + "button_rect": { + "x1": 0.7242440785730276, + "y1": 0.6987578246120553, + "x2": 0.8475598108478797, + "y2": 0.7666326760658291 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_1_2", + "description": "Event button on main screen: #2 from bottom to top without scrolling." + } + }, + { + "EVENT_BUTTON_1_3": { + "text_rect": { + "x1": 0.7238052325506973, + "y1": 0.6090381933800554, + "x2": 0.8449267347138971, + "y2": 0.6769130448338292 + }, + "button_rect": { + "x1": 0.7238052325506973, + "y1": 0.6090381933800554, + "x2": 0.8449267347138971, + "y2": 0.6769130448338292 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_1_3", + "description": "Event button on main screen: #3 from bottom to top without scrolling." + } + }, + { + "EVENT_BUTTON_1_4": { + "text_rect": { + "x1": 0.7233663865283668, + "y1": 0.5200987328544207, + "x2": 0.8453655807362276, + "y2": 0.5856330721890989 + }, + "button_rect": { + "x1": 0.7233663865283668, + "y1": 0.5200987328544207, + "x2": 0.8453655807362276, + "y2": 0.5856330721890989 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_1_4", + "description": "Event button on main screen: #4 from bottom to top without scrolling." + } + }, + { + "EVENT_BUTTON_2_1": { + "text_rect": { + "x1": 0.7228805306401055, + "y1": 0.7640989230504723, + "x2": 0.8604153690112154, + "y2": 0.8320866662815425 + }, + "button_rect": { + "x1": 0.7228805306401055, + "y1": 0.7640989230504723, + "x2": 0.8604153690112154, + "y2": 0.8320866662815425 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_2_1", + "description": "Event button on main screen: #1 from bottom to top after scrolling." + } + }, + { + "EVENT_BUTTON_2_2": { + "text_rect": { + "x1": 0.7225296764605872, + "y1": 0.6749039938574171, + "x2": 0.8597136606521791, + "y2": 0.7416442555613116 + }, + "button_rect": { + "x1": 0.7225296764605872, + "y1": 0.6749039938574171, + "x2": 0.8597136606521791, + "y2": 0.7416442555613116 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_2_2", + "description": "Event button on main screen: #2 from bottom to top after scrolling." + } + }, + { + "EVENT_BUTTON_2_3": { + "text_rect": { + "x1": 0.7228805306401055, + "y1": 0.584461583137186, + "x2": 0.8590119522931429, + "y2": 0.6524493263682561 + }, + "button_rect": { + "x1": 0.7228805306401055, + "y1": 0.584461583137186, + "x2": 0.8590119522931429, + "y2": 0.6524493263682561 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_2_3", + "description": "Event button on main screen: #3 from bottom to top after scrolling." + } + }, + { + "EVENT_BUTTON_2_4": { + "text_rect": { + "x1": 0.7228805306401055, + "y1": 0.4940191724169549, + "x2": 0.8597136606521791, + "y2": 0.562630656411613 + }, + "button_rect": { + "x1": 0.7228805306401055, + "y1": 0.4940191724169549, + "x2": 0.8597136606521791, + "y2": 0.562630656411613 + }, + "text": null, + "image_threshold": 120, + "chars": null, + "image_save_file": "event_button_2_4", + "description": "Event button on main screen: #4 from bottom to top after scrolling." + } + }, + { + "EVENT_WORLD_BOSS_LABEL": { + "text_rect": { + "x1": 0.04737081596968373, + "y1": 0.015169306507586995, + "x2": 0.2193457192649554, + "y2": 0.07764521340519293 + }, + "button_rect": { + "x1": 0.04737081596968373, + "y1": 0.015169306507586995, + "x2": 0.2193457192649554, + "y2": 0.07764521340519293 + }, + "text": "EVENT WORLD BOSS", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_boss_label", + "description": "Event World Boss mission label." + } + }, + { + "EVENT_WORLD_BOSS_ENTER": { + "text_rect": { + "x1": 0.11391762637524536, + "y1": 0.8273560961764647, + "x2": 0.18868932346014614, + "y2": 0.8885027284592278 + }, + "button_rect": { + "x1": 0.11391762637524536, + "y1": 0.8273560961764647, + "x2": 0.18868932346014614, + "y2": 0.8885027284592278 + }, + "text": "ENTER", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_boss_enter", + "description": "Event World Boss enter button." + } + }, + { + "EVENT_WORLD_BOSS_ALLIES": { + "text_rect": { + "x1": 0.678443939366246, + "y1": 0.218548322578517, + "x2": 0.7502247685677508, + "y2": 0.26906075794253886 + }, + "button_rect": null, + "text": "ALLIES", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_boss_allies", + "description": "Event World Boss: Allies label at the end of the battle." + } + }, + { + "EVENT_WORLD_BOSS_LIMIT_REACHED": { + "text_rect": { + "x1": 0.45637199902409076, + "y1": 0.20126775258556223, + "x2": 0.5453503185551227, + "y2": 0.2597558356386401 + }, + "button_rect": { + "x1": 0.48029894209125895, + "y1": 0.7156970285296794, + "x2": 0.5236665264005015, + "y2": 0.7741851115827575 + }, + "text": "NOTICE", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_boss_limit_reached", + "description": "Event World Boss: notice when all entries are used at the end of the battle. Leads to OK button." + } + }, + { + "EVENT_WORLD_BOSS_HOME_BUTTON": { + "text_rect": null, + "button_rect": { + "x1": 0.40477952803550926, + "y1": 0.8765392569256438, + "x2": 0.4503902632572988, + "y2": 0.9469908115123059 + }, + "text": null, + "image_threshold": null, + "chars": null, + "image_save_file": "event_world_boss_home_button", + "description": "Event World Boss: HOME button at the end of the battle." + } + }, + { + "EVENT_WORLD_BOSS_REPEAT_BUTTON": { + "text_rect": null, + "button_rect": { + "x1": 0.5498366203802166, + "y1": 0.8805270807701718, + "x2": 0.5939519216603081, + "y2": 0.9496493607419912 + }, + "text": null, + "image_threshold": null, + "chars": null, + "image_save_file": "event_world_boss_repeat_button", + "description": "Event World Boss: REPEAT button at the end of the battle." + } + }, + { + "EVENT_WORLD_LABEL": { + "text_rect": { + "x1": 0.04737081596968373, + "y1": 0.012510757277901676, + "x2": 0.176725851926562, + "y2": 0.08030376263487823 + }, + "button_rect": { + "x1": 0.04737081596968373, + "y1": 0.012510757277901676, + "x2": 0.176725851926562, + "y2": 0.08030376263487823 + }, + "text": "WORLD EVENT", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_label", + "description": "World Event mission label." + } + }, + { + "EVENT_WORLD_LOBBY_READY_BUTTON": { + "text_rect": { + "x1": 0.7786380134600129, + "y1": 0.9031247492224974, + "x2": 0.8638777481367997, + "y2": 0.9656006561201034 + }, + "button_rect": { + "x1": 0.7786380134600129, + "y1": 0.9031247492224974, + "x2": 0.8638777481367997, + "y2": 0.9656006561201034 + }, + "text": "READY", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_lobby_ready_button", + "description": "World Event: Ready button in mission lobby." + } + }, + { + "EVENT_WORLD_BATTLE_READY_BUTTON": { + "text_rect": { + "x1": 0.8220055977692555, + "y1": 0.8871734538443853, + "x2": 0.8982727287958542, + "y2": 0.9430029876677778 + }, + "button_rect": { + "x1": 0.8220055977692555, + "y1": 0.8871734538443853, + "x2": 0.8982727287958542, + "y2": 0.9430029876677778 + }, + "text": "Ready", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_battle_ready_button", + "description": "World Event: Ready button in team selector." + } + }, + { + "EVENT_WORLD_SELECT_BATTLE_READY": { + "text_rect": { + "x1": 0.3890774716476801, + "y1": 0.016498581122429547, + "x2": 0.6104016950189863, + "y2": 0.08562086109424909 + }, + "button_rect": { + "x1": 0.11466534334609442, + "y1": 0.2225361464230451, + "x2": 0.3359895667174006, + "y2": 0.6399283754836467 + }, + "text": "Select Battle System", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_select_battle_ready", + "description": "World Event: menu of selecting battle system. Leads to READY selector." + } + }, + { + "EVENT_WORLD_SELECT_BATTLE_READY_OK": { + "text_rect": { + "x1": 0.5618000919138009, + "y1": 0.6784773393140843, + "x2": 0.6074108271355902, + "y2": 0.7396239715968477 + }, + "button_rect": { + "x1": 0.5618000919138009, + "y1": 0.6784773393140843, + "x2": 0.6074108271355902, + "y2": 0.7396239715968477 + }, + "text": "OK", + "image_threshold": 120, + "chars": "OK", + "image_save_file": "event_world_select_battle_ready_ok", + "description": "World Event: conformation of selecting the battle. Leads to OK button." + } + }, + { + "EVENT_WORLD_BATTLE_START_BUTTON": { + "text_rect": { + "x1": 0.772656277693221, + "y1": 0.8845149046147, + "x2": 0.8481756917489707, + "y2": 0.9469908115123059 + }, + "button_rect": { + "x1": 0.772656277693221, + "y1": 0.8845149046147, + "x2": 0.8481756917489707, + "y2": 0.9469908115123059 + }, + "text": "START", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_battle_start_button", + "description": "World Event: Start button in team selector." + } + }, + { + "EVENT_WORLD_BATTLE_TOTAL_SCORE": { + "text_rect": { + "x1": 0.12064707911288644, + "y1": 0.4259151624939752, + "x2": 0.21785028532325743, + "y2": 0.4830739709322104 + }, + "button_rect": { + "x1": 0.40627496197720725, + "y1": 0.8512830392436328, + "x2": 0.4533811311406948, + "y2": 0.9177467699857669 + }, + "text": "TOTAL SCORE", + "image_threshold": 120, + "chars": null, + "image_save_file": "event_world_battle_total_score", + "description": "World Event: total score at the of the battle. Leads to HOME button." + } + } +] \ No newline at end of file