Create event Blaze Spawner containing Blaze Rods, preventing scenarios where the only progression in a sphere is to gain access to a fortress, which crashes playthrough generation

This commit is contained in:
espeon65536 2021-08-28 16:44:48 -05:00 committed by Fabian Dill
parent a65bf60cea
commit a124a7a82a
4 changed files with 8 additions and 5 deletions

View File

@ -58,6 +58,7 @@ item_table = {
"Dragon Egg Shard": ItemData(45043, True),
"Bee Trap (Minecraft)": ItemData(45100, False),
"Blaze Rods": ItemData(None, True),
"Victory": ItemData(None, True)
}

View File

@ -109,6 +109,7 @@ advancement_table = {
"Librarian": AdvData(42090, 'Overworld'),
"Overpowered": AdvData(42091, 'Overworld'),
"Blaze Spawner": AdvData(None, 'Nether Fortress'),
"Ender Dragon": AdvData(None, 'The End')
}

View File

@ -31,7 +31,7 @@ class MinecraftLogic(LogicMixin):
return self.can_reach('Nether Fortress', 'Region', player) and self._mc_basic_combat(player)
def _mc_can_brew_potions(self, player: int):
return self._mc_fortress_loot(player) and self.has('Brewing', player) and self._mc_has_bottle(player)
return self.has('Blaze Rods', player) and self.has('Brewing', player) and self._mc_has_bottle(player)
def _mc_can_piglin_trade(self, player: int):
return self._mc_has_gold_ingots(player) and (
@ -39,7 +39,7 @@ class MinecraftLogic(LogicMixin):
player))
def _mc_enter_stronghold(self, player: int):
return self._mc_fortress_loot(player) and self.has('Brewing', player) and self.has('3 Ender Pearls', player)
return self.has('Blaze Rods', player) and self.has('Brewing', player) and self.has('3 Ender Pearls', player)
# Difficulty-dependent functions
def _mc_combat_difficulty(self, player: int):
@ -135,6 +135,7 @@ def set_rules(world: MultiWorld, player: int):
set_rule(world.get_entrance("The End Structure", player), lambda state: state._mc_can_adventure(player) and state._mc_has_structure_compass("The End Structure", player))
set_rule(world.get_location("Ender Dragon", player), lambda state: can_complete(state))
set_rule(world.get_location("Blaze Spawner", player), lambda state: state._mc_fortress_loot(player))
set_rule(world.get_location("Who is Cutting Onions?", player), lambda state: state._mc_can_piglin_trade(player))
set_rule(world.get_location("Oh Shiny", player), lambda state: state._mc_can_piglin_trade(player))

View File

@ -72,9 +72,9 @@ class MinecraftWorld(World):
exclusion_pool.update(exclusion_table[key])
exclusion_rules(self.world, self.player, exclusion_pool)
# Prefill the Ender Dragon with the completion condition
completion = self.create_item("Victory")
self.world.get_location("Ender Dragon", self.player).place_locked_item(completion)
# Prefill event locations with their events
self.world.get_location("Blaze Spawner", self.player).place_locked_item(self.create_item("Blaze Rods"))
self.world.get_location("Ender Dragon", self.player).place_locked_item(self.create_item("Victory"))
self.world.itempool += itempool