Exemplo n.º 1
0
from module.base.button import ButtonGrid
from module.base.switch import Switch
from module.equipment.equipment import Equipment
from module.exception import ScriptError
from module.retire.assets import *

dock_sorting = Switch('Dork_sorting')
dock_sorting.add_status('Ascending', check_button=SORT_ASC, click_button=SORTING_CLICK)
dock_sorting.add_status('Descending', check_button=SORT_DESC, click_button=SORTING_CLICK)

favourite_filter = Switch('Favourite_filter')
favourite_filter.add_status('on', check_button=COMMON_SHIP_FILTER_ENABLE)
favourite_filter.add_status('off', check_button=COMMON_SHIP_FILTER_DISABLE)

filter_index_enhanceable = Switch('Filter_index_enhanceable')
filter_index_enhanceable.add_status('on', check_button=FILTER_INDEX_ENHANCEMENT_ON)
filter_index_enhanceable.add_status('off', check_button=FILTER_INDEX_ENHANCEMENT_OFF)

filter_index_all = Switch('Filter_index_all')
filter_index_all.add_status('on', check_button=FILTER_INDEX_ALL_ON)
filter_index_all.add_status('off', check_button=FILTER_INDEX_ALL_OFF)

filter_index_clear = Switch('Filter_index_clear')
filter_index_clear.add_status('on', check_button=FILTER_INDEX_CLEAR_ON)
filter_index_clear.add_status('off', check_button=FILTER_INDEX_CLEAR_OFF)

filter_index_dd = Switch('Filter_index_dd')
filter_index_dd.add_status('on', check_button=FILTER_INDEX_DD_ON)
filter_index_dd.add_status('off', check_button=FILTER_INDEX_DD_OFF)

filter_index_cl = Switch('Filter_index_cl')
Exemplo n.º 2
0
        '大型油田開発Ⅰ', '大型油田開発Ⅱ', '大型油田開発Ⅲ'
    ],
    'extra_book': ['小型船団護衛', '中型船団護衛', '大型船団護衛'],
    'urgent_drill':
    ['敵偵察部隊迎撃', '敵主力艦隊撃破', '敵精鋭部隊撃破', '輸送部隊護衛Ⅰ', '輸送部隊護衛Ⅱ', '輸送部隊護衛Ⅲ'],
    'urgent_part':
    ['近海掃海任務', '近海航行展示', '離島火力支援', '離島兵員輸送', '外敵生態調査', '兵站航路確保'],
    'urgent_book':
    ['離島物資輸送', '近海パトロール', '離島漸減支援', '外的動静哨戒', '前線部隊支援', '外敵中枢偵察'],
    'urgent_box':
    ['BIW装備輸送', 'NYB装備輸送', 'BIW物資交換', 'NYB物資交換', 'BIW装備試験', 'NYB装備試験'],
    'urgent_cube': ['船団救出Ⅰ', '船団救出Ⅱ', '船団救出Ⅲ', '敵襲Ⅰ', '敵襲Ⅱ', '敵襲Ⅲ'],
    'urgent_gem': ['BIW要人護衛', 'NYB要人護衛', 'BIW休暇護衛', 'NYB休暇護衛'],
    'urgent_ship': ['小型観覧式', '連合艦隊観覧式', '多国連合観覧式']
}
COMMISSION_SWITCH = Switch('Commission_switch', is_choice=True)
COMMISSION_SWITCH.add_status('daily', COMMISSION_DAILY)
COMMISSION_SWITCH.add_status('urgent', COMMISSION_URGENT)


class Commission:
    button: Button
    name: str
    genre: str
    status: str
    duration: timedelta
    expire: timedelta

    def __init__(self, image, y, config):
        self.config = config
        self.y = y
Exemplo n.º 3
0
import numpy as np

from module.base.switch import Switch
from module.handler.assets import *
from module.handler.info_handler import InfoHandler
from module.logger import logger
from module.template.assets import TEMPLATE_FORMATION_1, TEMPLATE_FORMATION_2, TEMPLATE_FORMATION_3

formation = Switch('Formation')
formation.add_status('1', check_button=FORMATION_1, offset=120)
formation.add_status('2', check_button=FORMATION_2, offset=120)
formation.add_status('3', check_button=FORMATION_3, offset=120)

submarine_view = Switch('Submarine_view')
submarine_view.add_status('on', check_button=SUBMARINE_VIEW_ON, offset=120)
submarine_view.add_status('off', check_button=SUBMARINE_VIEW_OFF, offset=120)

submarine_hunt = Switch('Submarine_hunt')
submarine_hunt.add_status('on', check_button=SUBMARINE_HUNT_ON, offset=120)
submarine_hunt.add_status('off', check_button=SUBMARINE_HUNT_OFF, offset=120)


class StrategyHandler(InfoHandler):
    fleet_1_formation_fixed = False
    fleet_2_formation_fixed = False

    def handle_opened_strategy_bar(self):
        if self.appear_then_click(STRATEGY_OPENED, offset=120):
            self.device.sleep(0.5)
            return True
from module.base.base import ModuleBase
from module.base.switch import Switch
from module.base.utils import color_bar_percentage
from module.handler.assets import *
from module.logger import logger

fast_forward = Switch('Fast_Forward')
fast_forward.add_status('on', check_button=FAST_FORWARD_ON)
fast_forward.add_status('off', check_button=FAST_FORWARD_OFF)
fleet_lock = Switch('Fleet_Lock')
fleet_lock.add_status('on', check_button=FLEET_LOCKED, offset=(5, 5))
fleet_lock.add_status('off', check_button=FLEET_UNLOCKED, offset=(5, 5))


class FastForwardHandler(ModuleBase):
    map_clear_percentage = 0.
    map_achieved_star_1 = False
    map_achieved_star_2 = False
    map_achieved_star_3 = False
    map_is_clear = False
    map_is_3_star = False
    map_is_green = False
    map_has_fast_forward = False

    map_clear_record = None

    def map_get_info(self):
        """
        Logs:
            | INFO | [Map_info] 98%, star_1, star_2, star_3, clear, 3_star, green, fast_forward
        """
Exemplo n.º 5
0
from module.base.switch import Switch
from module.campaign.assets import *
from module.campaign.campaign_ocr import CampaignOcr, ensure_chapter_index, separate_name
from module.exception import CampaignNameError
from module.logger import logger
from module.ui.ui import UI

STAGE_SHOWN_WAIT = (1, 1.2)
SWITCH_OFFSET = (30, 10)
MODE_SWITCH_1 = Switch('Mode_switch_1')
MODE_SWITCH_1.add_status('normal',
                         SWITCH_1_NORMAL,
                         offset=SWITCH_OFFSET,
                         sleep=STAGE_SHOWN_WAIT)
MODE_SWITCH_1.add_status('hard',
                         SWITCH_1_HARD,
                         offset=SWITCH_OFFSET,
                         sleep=STAGE_SHOWN_WAIT)
MODE_SWITCH_2 = Switch('Mode_switch_2')
MODE_SWITCH_2.add_status('hard',
                         SWITCH_2_HARD,
                         offset=SWITCH_OFFSET,
                         sleep=STAGE_SHOWN_WAIT)
MODE_SWITCH_2.add_status('ex',
                         SWITCH_2_EX,
                         offset=SWITCH_OFFSET,
                         sleep=STAGE_SHOWN_WAIT)


class CampaignUI(UI, CampaignOcr):
    def campaign_ensure_chapter(self, index):
Exemplo n.º 6
0
from module.base.button import ButtonGrid
from module.base.switch import Switch
from module.equipment.equipment import Equipment
from module.retire.assets import *
from module.ui.ui import UI

dock_sorting = Switch('Dork_sorting')
dock_sorting.add_status('Ascending',
                        check_button=SORT_ASC,
                        click_button=SORTING_CLICK)
dock_sorting.add_status('Descending',
                        check_button=SORT_DESC,
                        click_button=SORTING_CLICK)

favourite_filter = Switch('Favourite_filter')
favourite_filter.add_status('on', check_button=COMMON_SHIP_FILTER_ENABLE)
favourite_filter.add_status('off', check_button=COMMON_SHIP_FILTER_DISABLE)

filter_index_enhanceable = Switch('Filter_index_enhanceable')
filter_index_enhanceable.add_status('on',
                                    check_button=FILTER_INDEX_ENHANCEMENT_ON)
filter_index_enhanceable.add_status('off',
                                    check_button=FILTER_INDEX_ENHANCEMENT_OFF)

filter_index_all = Switch('Filter_index_all')
filter_index_all.add_status('on', check_button=FILTER_INDEX_ALL_ON)
filter_index_all.add_status('off', check_button=FILTER_INDEX_ALL_OFF)

CARD_GRIDS = ButtonGrid(origin=(93, 76),
                        delta=(164 + 2 / 3, 227),
                        button_shape=(138, 204),