Fixed chaos bug

This commit is contained in:
Cal Corum 2024-12-24 23:31:13 -06:00
parent 7015fb3125
commit 30e417d6f8

21
dice.py
View File

@ -2809,14 +2809,21 @@ def ab_roll(this_team: Team, this_game: Game, allow_chaos: bool = True) -> AbRol
flag = 'passed ball'
if flag:
roll_message = f'```md\nCheck {flag}```\n' \
f'{flag.title()} roll```md\n# {d_twenty_two}\nDetails: [1d20 ({d_twenty_two})]```\n'
embed = get_dice_embed(this_team, f'Chaos roll for the {this_team.sname}', roll_message)
return AbRoll(
roll_message=roll_message,
is_chaos=True,
embeds=[embed]
logger.info(f'Creating chaos roll')
this_roll = AbRoll(
d_twenty=d_twenty_two,
roll_message=f'```md\n# {d_twenty_two}\nDetails: [1d20 ({d_twenty_two})]```\n'
)
logger.info(f'Getting dice embed for this_roll: {this_roll}')
embed = get_dice_embed(this_team)
logger.info(f'embed: {embed}')
embed.add_field(
name=f'{flag.title()} roll for the {this_team.sname}',
value=this_roll.roll_message
)
logger.info(f'embed post roll message: {embed}')
this_roll.embeds = [embed]
return this_roll
this_roll = AbRoll(
d_six_one=random.randint(1, 6),