Fix logic for calculating spawn chance

This commit is contained in:
Luke Robles 2024-11-06 09:16:48 -08:00
parent 97bcce40d1
commit c6e968e8ac
2 changed files with 2 additions and 5 deletions

View File

@ -175,10 +175,7 @@ class Tarkov(commands.Cog):
for key, value in levels.items():
embed.add_field(
name=key,
value="\n".join(
f"{k}: **{str(round(v['spawnChance'],2))}%**"
for k, v in value.items()
),
value="\n".join(f"{k}: {v['spawnChance']}" for k, v in value.items()),
inline=False,
)
embed.set_footer(text=f"Pulled from the api")

View File

@ -75,7 +75,7 @@ def tarkov_boss_info():
"escorts": sum(
escort["amount"][0]["count"] for escort in boss["escorts"]
),
"spawnChance": f"**{str(round(boss['spawnChance'],2))}%**",
"spawnChance": f"**{str(round(boss['spawnChance'] * 100, 2))}%**",
"picture": boss["boss"]["imagePortraitLink"],
}
for boss in level["bosses"]