Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,11 +6,11 @@ app = Flask(__name__)
|
|
6 |
# ---------------- Configuration ----------------
|
7 |
AIR_STRIKE_CHANCE = 0.85 # Chance to call in an Air Strike if available
|
8 |
SELF_REVIVE_CHANCE = 0.10 # Chance to self-revive when downed
|
9 |
-
EXTRA_LOST_PLATE_CHANCE = 0.
|
10 |
GULAG_WIN_THRESHOLD = 0.45 # In Gulag: outcome <35% = win (return to battle)
|
11 |
GULAG_ELIMINATED_THRESHOLD = 0.55 # In Gulag: outcome >=35% and <65% = eliminated; >=65% = stalemate (lose a plate and try again)
|
12 |
-
NAT_MIN_DEATHS =
|
13 |
-
NAT_MAX_DEATHS =
|
14 |
# ------------------------------------------------
|
15 |
|
16 |
game_states = {}
|
@@ -44,7 +44,7 @@ def init_game(username, loadout):
|
|
44 |
|
45 |
@app.route("/")
|
46 |
def home():
|
47 |
-
return "Welcome to the BR game
|
48 |
|
49 |
@app.route("/start", methods=["GET"])
|
50 |
def start():
|
@@ -240,7 +240,7 @@ def fight():
|
|
240 |
state["gulag_tokens"] = 1
|
241 |
resp += "Purchased a Gulag Token for a second chance! "
|
242 |
else:
|
243 |
-
resp += "
|
244 |
|
245 |
elif event == "ambush":
|
246 |
resp += "Ambushed! "
|
|
|
6 |
# ---------------- Configuration ----------------
|
7 |
AIR_STRIKE_CHANCE = 0.85 # Chance to call in an Air Strike if available
|
8 |
SELF_REVIVE_CHANCE = 0.10 # Chance to self-revive when downed
|
9 |
+
EXTRA_LOST_PLATE_CHANCE = 0.90 # Chance to lose an extra plate from enemy fire
|
10 |
GULAG_WIN_THRESHOLD = 0.45 # In Gulag: outcome <35% = win (return to battle)
|
11 |
GULAG_ELIMINATED_THRESHOLD = 0.55 # In Gulag: outcome >=35% and <65% = eliminated; >=65% = stalemate (lose a plate and try again)
|
12 |
+
NAT_MIN_DEATHS = 13 # Minimum natural enemy deaths per round
|
13 |
+
NAT_MAX_DEATHS = 29 # Maximum natural enemy deaths per round
|
14 |
# ------------------------------------------------
|
15 |
|
16 |
game_states = {}
|
|
|
44 |
|
45 |
@app.route("/")
|
46 |
def home():
|
47 |
+
return "Welcome to the Warzone BR game! Use !start, !fight, or !gulag."
|
48 |
|
49 |
@app.route("/start", methods=["GET"])
|
50 |
def start():
|
|
|
240 |
state["gulag_tokens"] = 1
|
241 |
resp += "Purchased a Gulag Token for a second chance! "
|
242 |
else:
|
243 |
+
resp += "You found a gulag toke but no need for one so you left it to despawn. "
|
244 |
|
245 |
elif event == "ambush":
|
246 |
resp += "Ambushed! "
|