Ejemplo n.º 1
0
async def setup(_: 'Command', adventure: Adventure):
    battle.qsab(adventure, Location.LAKE, 'A')
    adventure.add_chapter(
        ChoiceChapter(Emoji.LAKE,
                      tr(adventure.get_lang(),
                         'LAKE.DECISION1_TEXT')).add_choice(
                             Emoji.UP,
                             tr(adventure.get_lang(),
                                'LAKE.DECISION1_OPTION1'), a_deep).add_choice(
                                    Emoji.RIGHT,
                                    tr(adventure.get_lang(),
                                       'LAKE.DECISION1_OPTION2'), b_around))
Ejemplo n.º 2
0
def b_around(adventure: Adventure):
    battle.qsab(adventure, Location.LAKE, 'A')
    battle.qsab(adventure, Location.LAKE, 'B')
    adventure.add_chapter(
        ChoiceChapter(Emoji.SEED,
                      tr(adventure.get_lang(),
                         'LAKE.DECISION2_TEXT')).add_choice(
                             Emoji.SEED,
                             tr(adventure.get_lang(),
                                'LAKE.DECISION2_OPTION1'), ba_pick).add_choice(
                                    Emoji.RIGHT,
                                    tr(adventure.get_lang(),
                                       'LAKE.DECISION2_OPTION2'), bb_ignore))
Ejemplo n.º 3
0
def aa_deeper(adventure: Adventure):
    battle.qsab(adventure, Location.FOREST, 'C')
    bc = BonusChapter(tr(adventure.get_lang(), 'FOREST.EVENT5'))
    if random.random() < 0.5:
        bc.add_modifier(StatModifier(Stat.EVA, 3, StatModifierOperation.ADD))
    else:
        bc.add_modifier(StatModifier(Stat.SPD, 3, StatModifierOperation.ADD))
    adventure.add_chapter(bc)
    battle.qsab(adventure, Location.FOREST, 'C')

    cc = ChoiceChapter(Emoji.MUSHROOM, tr(adventure.get_lang(), 'FOREST.DECISION4_TEXT'))
    cc.add_choice(Emoji.RED, tr(adventure.get_lang(), 'FOREST.DECISION4_OPTION1'), eat_mushroom(0))
    cc.add_choice(Emoji.BLUE, tr(adventure.get_lang(), 'FOREST.DECISION4_OPTION2'), eat_mushroom(1))
    cc.add_choice(Emoji.GREEN, tr(adventure.get_lang(), 'FOREST.DECISION4_OPTION3'), eat_mushroom(2))
    adventure.add_chapter(cc)

    battle.qsab(adventure, Location.FOREST, 'B')
    ability_ai: AbilityAI = AbilityAI([
        AbilityDecision(0, 0.5, AbilityContainer(AbilityEnum.SUMMON, 100), max_uses=1)
    ])
    boss: BotEntity = battle.rnd(adventure, Location.FOREST, 'BOSS', ability_ai)
    battle.qcsab(adventure, boss,
                 icon=Emoji.FOREST,
                 pre_text=[tr(adventure.get_lang(), 'FOREST.BOSS1'),
                           tr(adventure.get_lang(), 'FOREST.BOSS2'),
                           tr(adventure.get_lang(), 'FOREST.BOSS3')])

    item: Equipment = RandomEquipmentBuilder(0).set_location(Location.FOREST).build()
    adventure.add_chapter(ItemRewardChapter(item))
Ejemplo n.º 4
0
 def mushroom_effect(adventure: Adventure):
     bc = BonusChapter(tr(adventure.get_lang(), 'FOREST.EVENT6'))
     if color == 0:
         bc.add_modifier(StatModifier(Stat.DEF, -2, StatModifierOperation.ADD, 1))
     elif color == 1:
         bc.add_modifier(StatModifier(Stat.SPD, 5, StatModifierOperation.ADD))
     else:
         bc.add_persistent(Stat.HP, Stat.HP.get_value(4))
     adventure.insert_chapter(bc)
Ejemplo n.º 5
0
def ba_pick(adventure: Adventure):
    if random.random() < 0.5:
        bc: BonusChapter = BonusChapter(
            tr(adventure.get_lang(), 'LAKE.DECISION2_RESULT1'))
        if random.random() < 0.5:
            bc.add_modifier(
                StatModifier(Stat.STR, 2, StatModifierOperation.ADD))
        else:
            bc.add_modifier(
                StatModifier(Stat.DEF, 2, StatModifierOperation.ADD))
        adventure.add_chapter(bc)
        battle.qsab(adventure, Location.LAKE, 'A')
    else:
        battle.qsab(
            adventure,
            Location.LAKE,
            'B',
            pre_text=[tr(adventure.get_lang(), 'LAKE.DECISION2_RESULT2')])
    b_before_reward(adventure)
Ejemplo n.º 6
0
def aa_deepest(adventure: Adventure):
    battle.qsab(adventure, Location.LAKE, 'C')
    battle.qsab(adventure, Location.LAKE, 'C')
    bc: BonusChapter = BonusChapter(tr(adventure.get_lang(), 'LAKE.EVENT2'))
    bc.add_persistent(Stat.HP, 20)
    adventure.add_chapter(bc)
    ability_ai: AbilityAI = AbilityAI(
        [AbilityDecision(0, 1, AbilityContainer(AbilityEnum.CLAW, 0))])
    boss: BotEntity = battle.rnd(adventure, Location.LAKE, 'BOSS', ability_ai)
    battle.qsbb(adventure,
                boss,
                icon=Emoji.WAVES,
                pre_text=[
                    tr(adventure.get_lang(), 'LAKE.BOSS1'),
                    tr(adventure.get_lang(), 'LAKE.BOSS2'),
                    tr(adventure.get_lang(), 'LAKE.BOSS3')
                ])
    item: Equipment = RandomEquipmentBuilder(0).set_location(
        Location.LAKE).build()
    adventure.add_chapter(ItemRewardChapter(item))
Ejemplo n.º 7
0
def a_deep(adventure: Adventure):
    battle.qsab(adventure, Location.LAKE, 'B')
    battle.qsab(adventure, Location.LAKE, 'B')
    bc: BonusChapter = BonusChapter(tr(adventure.get_lang(), 'LAKE.EVENT1'))
    if random.random() < 0.5:
        bc.add_modifier(StatModifier(Stat.EVA, 3, StatModifierOperation.ADD))
    else:
        bc.add_modifier(StatModifier(Stat.CONT, 4, StatModifierOperation.ADD))
    bc.add_persistent(Stat.HP, 4)
    adventure.add_chapter(bc)
    adventure.add_chapter(
        ChoiceChapter(Emoji.LAKE,
                      tr(adventure.get_lang(),
                         'LAKE.DECISION3_TEXT')).add_choice(
                             Emoji.UP,
                             tr(adventure.get_lang(),
                                'LAKE.DECISION3_OPTION1'),
                             aa_deepest).add_choice(
                                 Emoji.RIGHT,
                                 tr(adventure.get_lang(),
                                    'LAKE.DECISION3_OPTION2'), ab_around))