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))
def a_deep(adventure): battle.qsab(adventure, Location.FOREST, 'B') battle.qsab(adventure, Location.FOREST, 'B') adventure.add_chapter(ChoiceChapter(Emoji.BEAR, tr(adventure.get_lang(), 'FOREST.DECISION3_TEXT')) .add_choice(Emoji.UP, tr(adventure.get_lang(), 'FOREST.DECISION3_OPTION1'), aa_deeper) .add_choice(Emoji.RIGHT, tr(adventure.get_lang(), 'FOREST.DECISION3_OPTION2'), ab_continue_path))
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))
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))
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))
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))