From ae8fc85647b2e1c7c92e813353e63048352cd77e Mon Sep 17 00:00:00 2001 From: Roman Trapeznikov Date: Wed, 8 Apr 2020 13:02:15 +0300 Subject: [PATCH] fix football description Score 3.0 (?!) touchdowns -> Score 3 touchdowns. 'Score to Win' / 7 rounds up. --- assets/src/ba_data/python/bastd/game/football.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/src/ba_data/python/bastd/game/football.py b/assets/src/ba_data/python/bastd/game/football.py index d74fd9e1..f2acc1d3 100644 --- a/assets/src/ba_data/python/bastd/game/football.py +++ b/assets/src/ba_data/python/bastd/game/football.py @@ -135,12 +135,17 @@ class FootballTeamGame(ba.TeamGameActivity): def get_instance_description(self) -> Union[str, Sequence]: touchdowns = self.settings['Score to Win'] / 7 + # NOTE: if use just touchdowns = self.settings['Score to Win'] // 7 + # and we will need to score, for example, 27 points, + # we will be required to score 3 (not 4) goals .. + touchdowns = math.ceil(touchdowns) if touchdowns > 1: return 'Score ${ARG1} touchdowns.', touchdowns return 'Score a touchdown.' def get_instance_scoreboard_description(self) -> Union[str, Sequence]: touchdowns = self.settings['Score to Win'] / 7 + touchdowns = math.ceil(touchdowns) if touchdowns > 1: return 'score ${ARG1} touchdowns', touchdowns return 'score a touchdown'