This commit is contained in:
spinerak
2024-06-15 01:02:19 +02:00
parent 090859a0f7
commit 7d21ec902f
3 changed files with 23 additions and 14 deletions

View File

@@ -315,7 +315,7 @@ yd_option_groups = [
ChanceOfDoubleCategory,
ChanceOfPoints,
PointsSize,
]
],
),
OptionGroup(
"Other items",
@@ -324,6 +324,6 @@ yd_option_groups = [
AddExtraPoints,
AddStoryChapters,
WhichStory
]
],
)
]

View File

@@ -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"]

View File

@@ -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.