From a0739436cc228337dfec78eee581126b1b0abfb8 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Wed, 1 Mar 2023 23:03:29 -0500 Subject: [PATCH] Wacca: Fix stageup order, fixes #3 --- titles/wacca/base.py | 13 ++++++++----- titles/wacca/lily.py | 26 +++++++++++++------------- titles/wacca/lilyr.py | 26 +++++++++++++------------- titles/wacca/reverse.py | 26 +++++++++++++------------- titles/wacca/s.py | 24 ++++++++++++------------ 5 files changed, 59 insertions(+), 56 deletions(-) diff --git a/titles/wacca/base.py b/titles/wacca/base.py index 984cdad..2bf47fd 100644 --- a/titles/wacca/base.py +++ b/titles/wacca/base.py @@ -361,7 +361,8 @@ class WaccaBase(): if stages is None: stages = [] - add_next = True + tmp: List[StageInfo] = [] + for d in self.allowed_stages: stage_info = StageInfo(d[0], d[1]) @@ -374,11 +375,13 @@ class WaccaBase(): stage_info.song3BestScore = score["song3_score"] break - if add_next or stage_info.danLevel < 9: - resp.stageList.append(stage_info) + tmp.append(stage_info) - if stage_info.danLevel >= 9 and stage_info.clearStatus < 1: - add_next = False + for x in range(len(resp.stageList)): + if resp.stageList[x].danLevel >= 10 and (resp.stageList[x + 1].clearStatus >= 1 or resp.stageList[x].clearStatus >= 1): + resp.stageList.append(tmp[x]) + elif resp.stageList[x].danLevel < 10: + resp.stageList.append(tmp[x]) return resp.make() diff --git a/titles/wacca/lily.py b/titles/wacca/lily.py index d15a504..66a4bc8 100644 --- a/titles/wacca/lily.py +++ b/titles/wacca/lily.py @@ -17,20 +17,20 @@ class WaccaLily(WaccaS): self.OPTIONS_DEFAULTS["set_nav_id"] = 210002 self.allowed_stages = [ - (2001, 1), - (2002, 2), - (2003, 3), - (2004, 4), - (2005, 5), - (2006, 6), - (2007, 7), - (2008, 8), - (2009, 9), - (2010, 10), - (2011, 11), - (2012, 12), - (2013, 13), (2014, 14), + (2013, 13), + (2012, 12), + (2011, 11), + (2010, 10), + (2009, 9), + (2008, 8), + (2007, 7), + (2006, 6), + (2005, 5), + (2004, 4), + (2003, 3), + (2002, 2), + (2001, 1), (210001, 0), (210002, 0), (210003, 0), diff --git a/titles/wacca/lilyr.py b/titles/wacca/lilyr.py index 559c61d..893a8f3 100644 --- a/titles/wacca/lilyr.py +++ b/titles/wacca/lilyr.py @@ -16,20 +16,20 @@ class WaccaLilyR(WaccaLily): self.OPTIONS_DEFAULTS["set_nav_id"] = 210002 self.allowed_stages = [ - (2501, 1), - (2502, 2), - (2503, 3), - (2504, 4), - (2505, 5), - (2506, 6), - (2507, 7), - (2508, 8), - (2509, 9), - (2510, 10), - (2511, 11), - (2512, 12), - (2513, 13), (2514, 14), + (2513, 13), + (2512, 12), + (2511, 11), + (2510, 10), + (2509, 9), + (2508, 8), + (2507, 7), + (2506, 6), + (2505, 5), + (2504, 4), + (2503, 3), + (2501, 2), + (2501, 1), (210001, 0), (210002, 0), (210003, 0), diff --git a/titles/wacca/reverse.py b/titles/wacca/reverse.py index 78db7e4..100ffb1 100644 --- a/titles/wacca/reverse.py +++ b/titles/wacca/reverse.py @@ -18,20 +18,20 @@ class WaccaReverse(WaccaLilyR): self.OPTIONS_DEFAULTS["set_nav_id"] = 310001 self.allowed_stages = [ - (3001, 1), - (3002, 2), - (3003, 3), - (3004, 4), - (3005, 5), - (3006, 6), - (3007, 7), - (3008, 8), - (3009, 9), - (3010, 10), - (3011, 11), - (3012, 12), - (3013, 13), (3014, 14), + (3013, 13), + (3012, 12), + (3011, 11), + (3010, 10), + (3009, 9), + (3008, 8), + (3007, 7), + (3006, 6), + (3005, 5), + (3004, 4), + (3003, 3), + (3002, 2), + (3001, 1), # Touhou (210001, 0), (210002, 0), diff --git a/titles/wacca/s.py b/titles/wacca/s.py index 9f23367..d4c2881 100644 --- a/titles/wacca/s.py +++ b/titles/wacca/s.py @@ -11,19 +11,19 @@ from titles.wacca.handlers import * class WaccaS(WaccaBase): allowed_stages = [ - (1501, 1), - (1502, 2), - (1503, 3), - (1504, 4), - (1505, 5), - (1506, 6), - (1507, 7), - (1508, 8), - (1509, 9), - (1510, 10), - (1511, 11), - (1512, 12), (1513, 13), + (1512, 12), + (1511, 11), + (1510, 10), + (1509, 9), + (1508, 8), + (1507, 7), + (1506, 6), + (1505, 5), + (1514, 4), + (1513, 3), + (1512, 2), + (1511, 1), ] def __init__(self, cfg: CoreConfig, game_cfg: WaccaConfig) -> None: