From 49cf1220a62ae607d9a2c2778cf53ad2e248ec7f Mon Sep 17 00:00:00 2001 From: BattleJenkins Date: Sat, 1 Apr 2017 18:32:45 -0700 Subject: [PATCH] Restore minor fixes Restores some minor fixes I committed and accidentally reverted when I failed to update my local copy of the module. Note to self: start actually using GitHub correctly. --- evennia/contrib/turnbattle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evennia/contrib/turnbattle.py b/evennia/contrib/turnbattle.py index 1679f3da97..4a9a43e658 100644 --- a/evennia/contrib/turnbattle.py +++ b/evennia/contrib/turnbattle.py @@ -528,7 +528,7 @@ class TurnHandler(DefaultScript): for fighter in self.db.fighters: combat_cleanup(fighter) #Clean up leftover combat attributes beforehand, just in case. fighter.db.Combat_ActionsLeft = 1 #Actions remaining - start of turn adds to this, turn ends when it reaches 0 - fighter.db.Combat_TurnHandler = self #Add a reference to this scrip to the character + fighter.db.Combat_TurnHandler = self #Add a reference to this script to the character fighter.db.Combat_LastAction = "null" #Track last action taken in combat # Roll initiative and sort the list of fighters depending on who rolls highest to determine turn order. # The initiative roll is determined by the roll_init function and can be customized easily. @@ -557,6 +557,7 @@ class TurnHandler(DefaultScript): # If the current character has no actions remaining, go to the next turn. if not currentchar.db.Combat_ActionsLeft: self.next_turn() + return # Warn the current character if they're about to time out. if self.db.timer == 10: # 10 seconds left