mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-23 07:53:23 -07:00
Compare commits
5 Commits
NewSoupVi-
...
NewSoupVi-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40cc4dd9f1 | ||
|
|
a40744e6db | ||
|
|
d802f9652a | ||
|
|
cbdb4d7ce3 | ||
|
|
691ce6a248 |
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1 +1,2 @@
|
|||||||
worlds/blasphemous/region_data.py linguist-generated=true
|
worlds/blasphemous/region_data.py linguist-generated=true
|
||||||
|
worlds/yachtdice/YachtWeights.py linguist-generated=true
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
You have no generated any seeds yet!
|
You have not generated any seeds yet!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -118,9 +118,6 @@
|
|||||||
# Noita
|
# Noita
|
||||||
/worlds/noita/ @ScipioWright @heinermann
|
/worlds/noita/ @ScipioWright @heinermann
|
||||||
|
|
||||||
# Ocarina of Time
|
|
||||||
/worlds/oot/ @espeon65536
|
|
||||||
|
|
||||||
# Old School Runescape
|
# Old School Runescape
|
||||||
/worlds/osrs @digiholic
|
/worlds/osrs @digiholic
|
||||||
|
|
||||||
@@ -230,6 +227,9 @@
|
|||||||
# Links Awakening DX
|
# Links Awakening DX
|
||||||
# /worlds/ladx/
|
# /worlds/ladx/
|
||||||
|
|
||||||
|
# Ocarina of Time
|
||||||
|
# /worlds/oot/
|
||||||
|
|
||||||
## Disabled Unmaintained Worlds
|
## Disabled Unmaintained Worlds
|
||||||
|
|
||||||
# The following worlds in this repo are currently unmaintained and disabled as they do not work in core. If you are
|
# The following worlds in this repo are currently unmaintained and disabled as they do not work in core. If you are
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class EntityHuntPicker:
|
|||||||
|
|
||||||
remaining_entities, remaining_entity_weights = [], []
|
remaining_entities, remaining_entity_weights = [], []
|
||||||
for area, eligible_entities in self.ELIGIBLE_ENTITIES_PER_AREA.items():
|
for area, eligible_entities in self.ELIGIBLE_ENTITIES_PER_AREA.items():
|
||||||
for panel in eligible_entities - self.HUNT_ENTITIES:
|
for panel in sorted(eligible_entities - self.HUNT_ENTITIES):
|
||||||
remaining_entities.append(panel)
|
remaining_entities.append(panel)
|
||||||
remaining_entity_weights.append(allowance_per_area[area])
|
remaining_entity_weights.append(allowance_per_area[area])
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class Category:
|
|||||||
mean_score = 0
|
mean_score = 0
|
||||||
for key, value in yacht_weights[self.name, min(8, num_dice), min(8, num_rolls)].items():
|
for key, value in yacht_weights[self.name, min(8, num_dice), min(8, num_rolls)].items():
|
||||||
mean_score += key * value / 100000
|
mean_score += key * value / 100000
|
||||||
return mean_score * self.quantity
|
return mean_score
|
||||||
|
|
||||||
|
|
||||||
class ListState:
|
class ListState:
|
||||||
|
|||||||
3040
worlds/yachtdice/YachtWeights.py
generated
3040
worlds/yachtdice/YachtWeights.py
generated
File diff suppressed because it is too large
Load Diff
@@ -56,7 +56,7 @@ class YachtDiceWorld(World):
|
|||||||
|
|
||||||
item_name_groups = item_groups
|
item_name_groups = item_groups
|
||||||
|
|
||||||
ap_world_version = "2.1.1"
|
ap_world_version = "2.1.2"
|
||||||
|
|
||||||
def _get_yachtdice_data(self):
|
def _get_yachtdice_data(self):
|
||||||
return {
|
return {
|
||||||
@@ -190,7 +190,6 @@ class YachtDiceWorld(World):
|
|||||||
if self.frags_per_roll == 1:
|
if self.frags_per_roll == 1:
|
||||||
self.itempool += ["Roll"] * num_of_rolls_to_add # minus one because one is in start inventory
|
self.itempool += ["Roll"] * num_of_rolls_to_add # minus one because one is in start inventory
|
||||||
else:
|
else:
|
||||||
self.itempool.append("Roll") # always add a full roll to make generation easier (will be early)
|
|
||||||
self.itempool += ["Roll Fragment"] * (self.frags_per_roll * num_of_rolls_to_add)
|
self.itempool += ["Roll Fragment"] * (self.frags_per_roll * num_of_rolls_to_add)
|
||||||
|
|
||||||
already_items = len(self.itempool)
|
already_items = len(self.itempool)
|
||||||
@@ -231,13 +230,10 @@ class YachtDiceWorld(World):
|
|||||||
weights["Dice"] = weights["Dice"] / 5 * self.frags_per_dice
|
weights["Dice"] = weights["Dice"] / 5 * self.frags_per_dice
|
||||||
weights["Roll"] = weights["Roll"] / 5 * self.frags_per_roll
|
weights["Roll"] = weights["Roll"] / 5 * self.frags_per_roll
|
||||||
|
|
||||||
extra_points_added = 0
|
extra_points_added = [0] # make it a mutible type so we can change the value in the function
|
||||||
multipliers_added = 0
|
step_score_multipliers_added = [0]
|
||||||
items_added = 0
|
|
||||||
|
|
||||||
def get_item_to_add(weights, extra_points_added, multipliers_added, items_added):
|
|
||||||
items_added += 1
|
|
||||||
|
|
||||||
|
def get_item_to_add(weights, extra_points_added, step_score_multipliers_added):
|
||||||
all_items = self.itempool + self.precollected
|
all_items = self.itempool + self.precollected
|
||||||
dice_fragments_in_pool = all_items.count("Dice") * self.frags_per_dice + all_items.count("Dice Fragment")
|
dice_fragments_in_pool = all_items.count("Dice") * self.frags_per_dice + all_items.count("Dice Fragment")
|
||||||
if dice_fragments_in_pool + 1 >= 9 * self.frags_per_dice:
|
if dice_fragments_in_pool + 1 >= 9 * self.frags_per_dice:
|
||||||
@@ -246,21 +242,18 @@ class YachtDiceWorld(World):
|
|||||||
if roll_fragments_in_pool + 1 >= 6 * self.frags_per_roll:
|
if roll_fragments_in_pool + 1 >= 6 * self.frags_per_roll:
|
||||||
weights["Roll"] = 0 # don't allow >= 6 rolls
|
weights["Roll"] = 0 # don't allow >= 6 rolls
|
||||||
|
|
||||||
# Don't allow too many multipliers
|
|
||||||
if multipliers_added > 50:
|
|
||||||
weights["Fixed Score Multiplier"] = 0
|
|
||||||
weights["Step Score Multiplier"] = 0
|
|
||||||
|
|
||||||
# Don't allow too many extra points
|
# Don't allow too many extra points
|
||||||
if extra_points_added > 300:
|
if extra_points_added[0] > 400:
|
||||||
weights["Points"] = 0
|
weights["Points"] = 0
|
||||||
|
|
||||||
|
if step_score_multipliers_added[0] > 10:
|
||||||
|
weights["Step Score Multiplier"] = 0
|
||||||
|
|
||||||
# if all weights are zero, allow to add fixed score multiplier, double category, points.
|
# if all weights are zero, allow to add fixed score multiplier, double category, points.
|
||||||
if sum(weights.values()) == 0:
|
if sum(weights.values()) == 0:
|
||||||
if multipliers_added <= 50:
|
weights["Fixed Score Multiplier"] = 1
|
||||||
weights["Fixed Score Multiplier"] = 1
|
|
||||||
weights["Double category"] = 1
|
weights["Double category"] = 1
|
||||||
if extra_points_added <= 300:
|
if extra_points_added[0] <= 400:
|
||||||
weights["Points"] = 1
|
weights["Points"] = 1
|
||||||
|
|
||||||
# Next, add the appropriate item. We'll slightly alter weights to avoid too many of the same item
|
# Next, add the appropriate item. We'll slightly alter weights to avoid too many of the same item
|
||||||
@@ -274,11 +267,10 @@ class YachtDiceWorld(World):
|
|||||||
return "Roll" if self.frags_per_roll == 1 else "Roll Fragment"
|
return "Roll" if self.frags_per_roll == 1 else "Roll Fragment"
|
||||||
elif which_item_to_add == "Fixed Score Multiplier":
|
elif which_item_to_add == "Fixed Score Multiplier":
|
||||||
weights["Fixed Score Multiplier"] /= 1.05
|
weights["Fixed Score Multiplier"] /= 1.05
|
||||||
multipliers_added += 1
|
|
||||||
return "Fixed Score Multiplier"
|
return "Fixed Score Multiplier"
|
||||||
elif which_item_to_add == "Step Score Multiplier":
|
elif which_item_to_add == "Step Score Multiplier":
|
||||||
weights["Step Score Multiplier"] /= 1.1
|
weights["Step Score Multiplier"] /= 1.1
|
||||||
multipliers_added += 1
|
step_score_multipliers_added[0] += 1
|
||||||
return "Step Score Multiplier"
|
return "Step Score Multiplier"
|
||||||
elif which_item_to_add == "Double category":
|
elif which_item_to_add == "Double category":
|
||||||
# Below entries are the weights to add each category.
|
# Below entries are the weights to add each category.
|
||||||
@@ -303,15 +295,15 @@ class YachtDiceWorld(World):
|
|||||||
choice = self.random.choices(list(probs.keys()), weights=list(probs.values()))[0]
|
choice = self.random.choices(list(probs.keys()), weights=list(probs.values()))[0]
|
||||||
if choice == "1 Point":
|
if choice == "1 Point":
|
||||||
weights["Points"] /= 1.01
|
weights["Points"] /= 1.01
|
||||||
extra_points_added += 1
|
extra_points_added[0] += 1
|
||||||
return "1 Point"
|
return "1 Point"
|
||||||
elif choice == "10 Points":
|
elif choice == "10 Points":
|
||||||
weights["Points"] /= 1.1
|
weights["Points"] /= 1.1
|
||||||
extra_points_added += 10
|
extra_points_added[0] += 10
|
||||||
return "10 Points"
|
return "10 Points"
|
||||||
elif choice == "100 Points":
|
elif choice == "100 Points":
|
||||||
weights["Points"] /= 2
|
weights["Points"] /= 2
|
||||||
extra_points_added += 100
|
extra_points_added[0] += 100
|
||||||
return "100 Points"
|
return "100 Points"
|
||||||
else:
|
else:
|
||||||
raise Exception("Unknown point value (Yacht Dice)")
|
raise Exception("Unknown point value (Yacht Dice)")
|
||||||
@@ -320,7 +312,7 @@ class YachtDiceWorld(World):
|
|||||||
|
|
||||||
# adding 17 items as a start seems like the smartest way to get close to 1000 points
|
# adding 17 items as a start seems like the smartest way to get close to 1000 points
|
||||||
for _ in range(17):
|
for _ in range(17):
|
||||||
self.itempool.append(get_item_to_add(weights, extra_points_added, multipliers_added, items_added))
|
self.itempool.append(get_item_to_add(weights, extra_points_added, step_score_multipliers_added))
|
||||||
|
|
||||||
score_in_logic = dice_simulation_fill_pool(
|
score_in_logic = dice_simulation_fill_pool(
|
||||||
self.itempool + self.precollected,
|
self.itempool + self.precollected,
|
||||||
@@ -348,7 +340,7 @@ class YachtDiceWorld(World):
|
|||||||
else:
|
else:
|
||||||
# Keep adding items until a score of 1000 is in logic
|
# Keep adding items until a score of 1000 is in logic
|
||||||
while score_in_logic < 1000:
|
while score_in_logic < 1000:
|
||||||
item_to_add = get_item_to_add(weights, extra_points_added, multipliers_added, items_added)
|
item_to_add = get_item_to_add(weights, extra_points_added, step_score_multipliers_added)
|
||||||
self.itempool.append(item_to_add)
|
self.itempool.append(item_to_add)
|
||||||
if item_to_add == "1 Point":
|
if item_to_add == "1 Point":
|
||||||
score_in_logic += 1
|
score_in_logic += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user