Beispiel #1
0
def check_fairy(user):
    global my_fairy
    my_fairy = False
    fairys = logic.get_fairys(user)
    for fairy in fairys:
        if user.userid == fairy.playerid:
            my_fairy = True
            fairy._fetch()
            if fairy.hp == fairy.hp_max:
                mini_deckcard(user, 3)
                fairy.attack()
            print user._loginId, "check"
            return True
        # else:
        #     if not fairy.fairyholo and logic.build_roundtable(user, fairy, keep_bc=30):
        #         fairy.attack()
    if not my_fairy:
        user.logger.info(U'妖精已死')
Beispiel #2
0
def battle_fairys(user):
    fairys = logic.get_fairys(user)
    for fairy in fairys:
        if not fairy.isattacked():
            sleep(15)
            fairy.attack()