from pokelife import Pokelife
PL = Pokelife()

DZICZ = 3
FIGHTER = 4
LEADERS = [4, 5, 6]
NOOBS = [1, 2, 3]
NAPOJE = 1  # 0 - wylaczone, 1 wlaczone

while PL.pa > 10:
    for leader in LEADERS:
        if PL.is_hurt(leader):
            PL.heal(leader)
    for noob in NOOBS:
        if PL.is_hurt(noob) == 'dead':
            PL.backpack('czerwone_jagody', noob)
    PL.explore(DZICZ)
    if PL.battle:
        if PL.is_shiny:
            break
        else:
            PL.fight(FIGHTER)
            if PL.capture:
                PL.catch()
    PL.update()
    if NAPOJE and PL.pa < 10:
        PL.drink()
        PL.update()
from pokelife import Pokelife
PL = Pokelife()

DZICZ = 3
POKEMON = 4

while PL.pa > 10:
    if PL.is_hurt():
        PL.heal()
    PL.explore(DZICZ)
    if PL.battle:
        if PL.is_shiny:
            break
        else:
            PL.fight(POKEMON)
            if PL.capture:
                PL.catch()
    PL.update()