Skip to content

Commit

Permalink
new quake types
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiDuncan committed Nov 27, 2023
1 parent 7617faa commit 77dcac1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sizebot/lib/quake.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ def mag_to_name(mag: float) -> str:
return "unprecedented"
elif mag < 21: # 13 - 21
return "apocalyptic"
elif mag < 22: # 22 - 23
elif mag < 22: # 21 - 23
return "earth-cracking"
else: # 23 - inf
elif mag < 25: # 23 - 25
return "earth-crumbling"
elif mag < 32: # 25 - 32
return "sun-shattering"
elif mag < 63: # 32 - 63
return "galaxy-collapsing"
else: # 63+
return "universe-ending"

def scale_to_joules(user: User, g: float, factor: float) -> Decimal:
return Decimal((user.weight * Decimal(0.4536)) / 2 * Decimal(g) * (Decimal(factor) * user.scale))
Expand Down

0 comments on commit 77dcac1

Please sign in to comment.