@@ -137,60 +137,64 @@ def game_loop(self) -> None:
137
137
self .arena .check_health ()
138
138
ran_round : str = self .round [0 ]
139
139
if self .round [1 ] == 1 and self .round [0 ].split ("-" )[1 ] == "1" :
140
- game_assets .CAROUSEL_ROUND = {
141
- carousel_round
142
- for carousel_round in game_assets .CAROUSEL_ROUND
143
- if not carousel_round .startswith (self .round [0 ].split ("-" ))
144
- }
145
- game_assets .PVE_ROUND = {
146
- pve_round
147
- for pve_round in game_assets .PVE_ROUND
148
- if not pve_round .startswith (self .round [0 ].split ("-" ))
149
- }
150
- game_assets .PVP_ROUND = {
151
- pvp_round
152
- for pvp_round in game_assets .PVP_ROUND
153
- if not pvp_round .startswith (self .round [0 ].split ("-" ))
154
- }
155
- game_assets .ANVIL_ROUNDS = {
156
- anvil_round
157
- for anvil_round in game_assets .ANVIL_ROUNDS
158
- if not anvil_round .startswith (self .round [0 ].split ("-" ))
159
- }
160
- game_assets .ITEM_PLACEMENT_ROUNDS = {
161
- item_placement_round
162
- for item_placement_round in game_assets .ITEM_PLACEMENT_ROUNDS
163
- if not item_placement_round .startswith (self .round [0 ].split ("-" ))
164
- }
165
- for index , round_msg in enumerate (
166
- game_functions .check_encounter_round ()
167
- ):
168
- if index == 0 :
169
- continue
170
- if round_msg == "carousel" :
171
- game_assets .CAROUSEL_ROUND .add (
172
- self .round [0 ].split ("-" ) + "-" + str (index + 1 )
173
- )
174
- game_assets .ANVIL_ROUNDS .add (
175
- self .round [0 ].split ("-" ) + "-" + str (index + 2 )
176
- )
177
- game_assets .ITEM_PLACEMENT_ROUNDS .add (
178
- self .round [0 ].split ("-" ) + "-" + str (index + 2 )
179
- )
180
- elif round_msg == "pve" :
181
- game_assets .PVE_ROUND .add (
182
- self .round [0 ].split ("-" ) + "-" + str (index + 1 )
183
- )
184
- elif round_msg == "pvp" :
185
- game_assets .PVP_ROUND .add (
186
- self .round [0 ].split ("-" ) + "-" + str (index + 1 )
187
- )
188
- elif round_msg == "encounter" :
189
- game_assets .ENCOUNTER_ROUNDS .add (
190
- self .round [0 ].split ("-" ) + "-" + str (index + 1 )
191
- )
140
+ self .encounter_round_setup ()
192
141
sleep (0.5 )
193
142
143
+ def encounter_round_setup (self ) -> None :
144
+ """Remove rounds from game_assets and add it back by checking round message"""
145
+ game_assets .CAROUSEL_ROUND = {
146
+ carousel_round
147
+ for carousel_round in game_assets .CAROUSEL_ROUND
148
+ if not carousel_round .startswith (self .round [0 ].split ("-" ))
149
+ }
150
+ game_assets .PVE_ROUND = {
151
+ pve_round
152
+ for pve_round in game_assets .PVE_ROUND
153
+ if not pve_round .startswith (self .round [0 ].split ("-" ))
154
+ }
155
+ game_assets .PVP_ROUND = {
156
+ pvp_round
157
+ for pvp_round in game_assets .PVP_ROUND
158
+ if not pvp_round .startswith (self .round [0 ].split ("-" ))
159
+ }
160
+ game_assets .ANVIL_ROUNDS = {
161
+ anvil_round
162
+ for anvil_round in game_assets .ANVIL_ROUNDS
163
+ if not anvil_round .startswith (self .round [0 ].split ("-" ))
164
+ }
165
+ game_assets .ITEM_PLACEMENT_ROUNDS = {
166
+ item_placement_round
167
+ for item_placement_round in game_assets .ITEM_PLACEMENT_ROUNDS
168
+ if not item_placement_round .startswith (self .round [0 ].split ("-" ))
169
+ }
170
+ for index , round_msg in enumerate (
171
+ game_functions .check_encounter_round ()
172
+ ):
173
+ if index == 0 :
174
+ continue
175
+ if round_msg == "carousel" :
176
+ game_assets .CAROUSEL_ROUND .add (
177
+ self .round [0 ].split ("-" ) + "-" + str (index + 1 )
178
+ )
179
+ game_assets .ANVIL_ROUNDS .add (
180
+ self .round [0 ].split ("-" ) + "-" + str (index + 2 )
181
+ )
182
+ game_assets .ITEM_PLACEMENT_ROUNDS .add (
183
+ self .round [0 ].split ("-" ) + "-" + str (index + 2 )
184
+ )
185
+ elif round_msg == "pve" :
186
+ game_assets .PVE_ROUND .add (
187
+ self .round [0 ].split ("-" ) + "-" + str (index + 1 )
188
+ )
189
+ elif round_msg == "pvp" :
190
+ game_assets .PVP_ROUND .add (
191
+ self .round [0 ].split ("-" ) + "-" + str (index + 1 )
192
+ )
193
+ elif round_msg == "encounter" :
194
+ game_assets .ENCOUNTER_ROUNDS .add (
195
+ self .round [0 ].split ("-" ) + "-" + str (index + 1 )
196
+ )
197
+
194
198
def second_round (self ) -> None :
195
199
"""Move unknown champion to board after first carousel"""
196
200
print (f"\n [Second Round] { self .round } " )
0 commit comments