Version 2.0.3

manual input option
max score in logic always 2.0.3
faster gen
This commit is contained in:
spinerak
2024-06-06 16:26:33 +02:00
parent 046463113c
commit be65762532
3 changed files with 21 additions and 5 deletions

View File

@@ -229,6 +229,18 @@ class whichStory(Choice):
option_random_story = -1
default = -1
class allowManual(Choice):
"""
Yacht Dice allows players to roll IRL dice.
By sending "manual" in the chat, a input field appears where you can type your dice rolls.
Of course we cannot check anymore if the player is playing fair.
Do you want to allow manual input of rolls?
"""
display_name = "Allow manual inputs"
option_yes_allow = 1
option_no_dont_allow = 2
default = 1
@dataclass
class YachtDiceOptions(PerGameCommonOptions):
game_difficulty: gameDifficulty
@@ -253,4 +265,6 @@ class YachtDiceOptions(PerGameCommonOptions):
minimize_extra_items: minimizeExtraItems
add_bonus_points: addExtraPoints
add_story_chapters: addStoryChapters
which_story: whichStory
which_story: whichStory
allow_manual_input: allowManual

View File

@@ -197,7 +197,8 @@ def dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mu
total_dist = add_distributions(total_dist, dist)
#save result into the cache, then return it
yachtdice_cache[tup] = math.floor(sum([percentile_distribution(total_dist, perc) for perc in perc_return]) / len(perc_return))
outcome = sum([percentile_distribution(total_dist, perc) for perc in perc_return]) / len(perc_return)
yachtdice_cache[tup] = max(5, math.floor(outcome))
return yachtdice_cache[tup]
# Returns the feasible score that one can reach with the current state, options and difficulty.

View File

@@ -40,7 +40,7 @@ class YachtDiceWorld(World):
item_name_groups = item_groups
ap_world_version = "2.0.2"
ap_world_version = "2.0.3"
def _get_yachtdice_data(self):
return {
@@ -135,7 +135,7 @@ class YachtDiceWorld(World):
already_items = len(self.itempool) + self.extra_plando_items
#Yacht Dice needs extra filler items so it doesn't get stuck in generation.
if self.options.minimize_extra_items.value == 2:
if self.options.minimize_extra_items.value:
extraPercentage = max(0.1, 0.8 - self.multiworld.players / 10)
else:
extraPercentage = 0.7
@@ -391,7 +391,8 @@ class YachtDiceWorld(World):
"minimize_extra_items",
"add_bonus_points",
"add_story_chapters",
"which_story"
"which_story",
"allow_manual_input"
)
slot_data = {**yacht_dice_data, **yacht_dice_options} #combine the two