diff --git a/worlds/yachtdice/Options.py b/worlds/yachtdice/Options.py index fba5a5cdbb..d795af6513 100644 --- a/worlds/yachtdice/Options.py +++ b/worlds/yachtdice/Options.py @@ -315,7 +315,7 @@ yd_option_groups = [ ChanceOfDoubleCategory, ChanceOfPoints, PointsSize, - ] + ], ), OptionGroup( "Other items", @@ -324,6 +324,6 @@ yd_option_groups = [ AddExtraPoints, AddStoryChapters, WhichStory - ] + ], ) ] diff --git a/worlds/yachtdice/Rules.py b/worlds/yachtdice/Rules.py index bad8380f42..9aed9335f7 100644 --- a/worlds/yachtdice/Rules.py +++ b/worlds/yachtdice/Rules.py @@ -8,7 +8,6 @@ from worlds.generic.Rules import set_rule from .YachtWeights import yacht_weights - # This module adds logic to the apworld. # In short, we ran a simulation for every possible combination of dice and rolls you can have, per category. # This simulation has a good strategy for locking dice. @@ -233,7 +232,9 @@ def dice_simulation_fill_pool(state, frags_per_dice, frags_per_roll, difficulty, categories, num_dice, num_rolls, fixed_mult, step_mult, expoints = extract_progression( state, "state_is_a_list", frags_per_dice, frags_per_roll ) - return dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mult, difficulty, player) + expoints + return ( + dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mult, difficulty, player) + expoints + ) def dice_simulation_state_change(state, player, frags_per_dice, frags_per_roll, difficulty): @@ -248,7 +249,8 @@ def dice_simulation_state_change(state, player, frags_per_dice, frags_per_roll, state, player, frags_per_dice, frags_per_roll ) state.prog_items[player]["maximum_achievable_score"] = ( - dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mult, difficulty, player) + expoints + dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mult, difficulty, player) + + expoints ) return state.prog_items[player]["maximum_achievable_score"] diff --git a/worlds/yachtdice/__init__.py b/worlds/yachtdice/__init__.py index 05e8750b9d..15516d010b 100644 --- a/worlds/yachtdice/__init__.py +++ b/worlds/yachtdice/__init__.py @@ -1,22 +1,21 @@ import math +from typing import Dict from BaseClasses import CollectionState, Entrance, Item, Region, Tutorial -from typing import Dict - from worlds.AutoWorld import WebWorld, World from .Items import YachtDiceItem, item_groups, item_table from .Locations import YachtDiceLocation, all_locations, ini_locations from .Options import ( - YachtDiceOptions, - yd_option_groups, + AddExtraPoints, + AddStoryChapters, GameDifficulty, MinimalNumberOfDiceAndRolls, - PointsSize, MinimizeExtraItems, - AddExtraPoints, - AddStoryChapters + PointsSize, + YachtDiceOptions, + yd_option_groups, ) from .Rules import dice_simulation_fill_pool, set_yacht_completion_rules, set_yacht_rules @@ -311,7 +310,11 @@ class YachtDiceWorld(World): while score_in_logic > 1000: removed_item = self.itempool.pop() score_in_logic = dice_simulation_fill_pool( - self.itempool + self.precollected, self.frags_per_dice, self.frags_per_roll, self.difficulty, self.player + self.itempool + self.precollected, + self.frags_per_dice, + self.frags_per_roll, + self.difficulty, + self.player, ) self.itempool.append(removed_item) else: @@ -327,7 +330,11 @@ class YachtDiceWorld(World): score_in_logic += 100 else: score_in_logic = dice_simulation_fill_pool( - self.itempool + self.precollected, self.frags_per_dice, self.frags_per_roll, self.difficulty, self.player + self.itempool + self.precollected, + self.frags_per_dice, + self.frags_per_roll, + self.difficulty, + self.player, ) # count the number of locations in the game.