Exemplo n.º 1
0
def b_around(adventure):
    bc = BonusChapter(tr(adventure.get_lang(), 'FOREST.EVENT1'))
    bc.add_persistent(Stat.HP, Stat.HP.get_value(3))
    adventure.add_chapter(bc)
    battle.qsab(adventure, Location.FOREST, 'B')
    adventure.add_chapter(ChoiceChapter(Emoji.BEAR, tr(adventure.get_lang(), 'FOREST.DECISION2_TEXT'))
                          .add_choice(Emoji.UP, tr(adventure.get_lang(), 'FOREST.DECISION2_OPTION1'), ba_bear)
                          .add_choice(Emoji.RIGHT, tr(adventure.get_lang(), 'FOREST.DECISION2_OPTION2'),
                                      bb_around_bear))
Exemplo n.º 2
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)
Exemplo 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))
Exemplo n.º 4
0
def ab_continue_path(adventure):
    if random.random() < 0.5:
        bc = BonusChapter(tr(adventure.get_lang(), 'FOREST.EVENT3'))
        bc.add_modifier(StatModifier(Stat.DEF, 3, StatModifierOperation.ADD))
        adventure.add_chapter(bc)
    else:
        bc = BonusChapter(tr(adventure.get_lang(), 'FOREST.EVENT4'))
        bc.add_persistent(Stat.HP, Stat.HP.get_value(2))
        adventure.add_chapter(bc)
    battle.qsab(adventure, Location.FOREST, 'A')
    battle.qsab(adventure, Location.FOREST, 'C')
    if random.random() < 0.5:
        adventure.add_chapter(MoneyRewardChapter(random.randint(100, 150)))
    else:
        item: Equipment = RandomEquipmentBuilder(0).set_location(Location.ANYWHERE) \
            .choose_rarity([ItemRarity.UNCOMMON, ItemRarity.RARE, ItemRarity.EPIC], [6, 3, 1]).build()
        adventure.add_chapter(ItemRewardChapter(item))
Exemplo 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)
Exemplo 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))
Exemplo 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))