Skip to content

Commit

Permalink
do not allow alive players to revive, by using the browser refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
1kuceraj committed Sep 23, 2024
1 parent 4f96bfa commit 51399b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions revive.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
from backend import update_user_data

def revive(user, user_data, league, usersdb):
if user_data.get("alive", True):
return "You are already alive and cannot revive yourself."

exp = user_data.get("exp", 0)
revive_cost = 1000 # Static cost of 1000 action points
exp_deduction = math.ceil(exp * 0.1) # 10% of current experience
Expand Down

0 comments on commit 51399b5

Please sign in to comment.