Closed KingPin closed 2 years ago
no division by zero errors
Adventure version: 3.5.3 getting a "ZeroDivisionError: division by zero" error in the following two locations :
File "/data/cogs/CogManager/cogs/adventure/adventure.py", line 1668, in _result round((diplomacy / dipl) * 0.25),
and
hp = int(session.monster_modified_stats["hp"] * self.ATTRIBS[challenge_attrib][0] * session.monster_stats), line 1258
Traceback (most recent call last): File "/data/cogs/CogManager/cogs/adventure/adventure.py", line 553, in _adventure reward, participants = await self._simple(ctx, adventure_msg, challenge) File "/data/cogs/CogManager/cogs/adventure/adventure.py", line 888, in _simple await self._choice(ctx, adventure_msg) File "/data/cogs/CogManager/cogs/adventure/adventure.py", line 996, in _choice return await self._result(ctx, adventure_msg) File "/data/cogs/CogManager/cogs/adventure/adventure.py", line 1668, in _result round((diplomacy / dipl) * 0.25), ZeroDivisionError: division by zero
I've solved this by making monsters not having less than 200 hp/dipl in my custom theme, not the best approach but works.
Complete these first
Expected Behavior
no division by zero errors
Current Behavior
Adventure version: 3.5.3 getting a "ZeroDivisionError: division by zero" error in the following two locations :
and
hp = int(session.monster_modified_stats["hp"] * self.ATTRIBS[challenge_attrib][0] * session.monster_stats), line 1258
Possible Solution
Steps to Reproduce
Context (Environment)
Detailed Description
Possible Implementation