From 775bbde030776de7dad746a433cfd9a5a48420a7 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Sat, 21 Feb 2026 09:23:33 +0000 Subject: [PATCH] Fix mortgage flow: send ? for property list, done when solvent --- monop_players.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/monop_players.py b/monop_players.py index 8cc5a20..c767340 100644 --- a/monop_players.py +++ b/monop_players.py @@ -350,6 +350,13 @@ class PlayerBot: self.say_delayed("bank") return + if msg.startswith("Which player do you wish to trade with?"): + # We don't trade proactively — shouldn't hit this + return + + if msg.startswith("Which property do you wish to trade?"): + return + # ============================================================ # DEBT / FORCED MORTGAGE # ============================================================ @@ -378,13 +385,16 @@ class PlayerBot: # Mortgage property selection if msg == "Which property do you want to mortgage?": - # monop will present options via getinp; it takes the property - # name. We'll wait for the valid inputs prompt. - self.awaiting_prompt = "mortgage_choice" + if self.is_my_turn(): + if self.in_debt: + self.say_delayed("?") # get list, pick first + else: + self.say_delayed("done") # not in debt, stop mortgaging return if msg == "Which property do you want to unmortgage?": - self.awaiting_prompt = "unmortgage_choice" + if self.is_my_turn(): + self.say_delayed("done") # don't unmortgage proactively return # ============================================================