Ejemplo n.º 1
0
def servant_skill(skill: BaseButton, servant=Button.NullButton):
    wait_action()
    Log.record('servant_skill')
    AdbServer.tap(skill.random_point)
    if servant != Button.NullButton:
        AdbServer.wait_second(0.25)
        AdbServer.tap(servant.random_point)
Ejemplo n.º 2
0
def one_battle():
    AdbServer.tap(Button.WorkFlow.KaiShiRenWu.random_point)
    wait_action()

    servant_skill(Button.OnBattle.Skill.Skill8)
    servant_skill(Button.OnBattle.Skill.Skill9)
    servant_skill(Button.OnBattle.Skill.Skill1,
                  Button.OnBattle.Skill.Servant.p2)
    choose_card(Button.OnBattle.NoblePhantasm.NP2, Button.OnBattle.Card.Card1,
                Button.OnBattle.Card.Card2)
    servant_skill(Button.OnBattle.Skill.Skill7,
                  Button.OnBattle.Skill.Servant.p2)
    change_servant(Button.OnBattle.MasterMenu.Exchange.p3,
                   Button.OnBattle.MasterMenu.Exchange.p4)
    servant_skill(Button.OnBattle.Skill.Skill7,
                  Button.OnBattle.Skill.Servant.p2)
    servant_skill(Button.OnBattle.Skill.Skill9,
                  Button.OnBattle.Skill.Servant.p2)
    servant_skill(Button.OnBattle.Skill.Skill6)
    choose_card(Button.OnBattle.NoblePhantasm.NP2, Button.OnBattle.Card.Card1,
                Button.OnBattle.Card.Card2)
    servant_skill(Button.OnBattle.Skill.Skill3,
                  Button.OnBattle.Skill.Servant.p2)
    servant_skill(Button.OnBattle.Skill.Skill2)
    servant_skill(Button.OnBattle.Skill.Skill8)
    master_skill(Button.OnBattle.MasterMenu.Skill1)
    choose_card(Button.OnBattle.NoblePhantasm.NP2, Button.OnBattle.Card.Card1,
                Button.OnBattle.Card.Card2)
Ejemplo n.º 3
0
def end_battle():
    wait_appear(Asset.WorkFlow.ZhanDouJieGuo, 1)
    while Asset.WorkFlow.ZhanDouJieGuo.match():
        AdbServer.tap(Button.WorkFlow.DianJiHuaMian.random_point)
        AdbServer.screen_cap()
    while Asset.WorkFlow.XiaYiBu.match():
        AdbServer.tap(Button.WorkFlow.XiaYiBu.random_point)
        AdbServer.screen_cap()
    AdbServer.wait_second(10)
Ejemplo n.º 4
0
def check_ap() -> bool:
    AdbServer.screen_cap()
    if Asset.WorkFlow.ApNotEnough.match():
        Log.record('ApNotEnough')
        AdbServer.tap(Button.WorkFlow.Apple.Golden.random_point)
        AdbServer.wait_second(0.5)
        AdbServer.tap(Button.WorkFlow.Apple.JueDing.random_point)
        return False
    else:
        return True
Ejemplo n.º 5
0
def change_servant(servant1: BaseButton, servant2: BaseButton):
    wait_action()
    Log.record('change_servant')
    AdbServer.tap(Button.OnBattle.MasterMenu.Open.random_point)
    AdbServer.wait_second(0.25)
    AdbServer.tap(Button.OnBattle.MasterMenu.Skill3.random_point)
    AdbServer.wait_second(0.5)
    AdbServer.tap(servant1.random_point)
    AdbServer.wait_second(0.1)
    AdbServer.tap(servant2.random_point)
    AdbServer.wait_second(0.1)
    AdbServer.tap(Button.OnBattle.MasterMenu.Exchange.Change.random_point)
    AdbServer.wait_second(5)
Ejemplo n.º 6
0
def master_skill(skill: BaseButton):
    wait_action()
    Log.record('master_skill')
    AdbServer.tap(Button.OnBattle.MasterMenu.Open.random_point)
    AdbServer.wait_second(0.25)
    AdbServer.tap(skill.random_point)
Ejemplo n.º 7
0
def choose_card(card1: BaseButton, card2: BaseButton, card3: BaseButton):
    wait_action()
    Log.record('choosing cards')
    AdbServer.tap(Button.OnBattle.Attack.random_point)
    AdbServer.wait_second(1)
    AdbServer.tap(card3.random_point)
    AdbServer.wait_second(0.2)
    AdbServer.tap(card3.random_point)
    AdbServer.wait_second(0.2)
    AdbServer.tap(card1.random_point)
    AdbServer.wait_second(0.2)
    AdbServer.tap(card2.random_point)
    AdbServer.wait_second(0.2)
    AdbServer.tap(card3.random_point)
    AdbServer.wait_second(10)
Ejemplo n.º 8
0
def battle_start():
    wait_appear(Asset.RenWuXvanZe.ShanShanJi.JueSai_GuangChangHuaYuan, 1)
    AdbServer.tap(Button.WorkFlow.GuanQia.random_point)
    AdbServer.wait_second(0.5)
    if not check_ap():
        AdbServer.tap(Button.WorkFlow.GuanQia.random_point)