MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								from  . . generic . Rules  import  set_rule ,  add_rule  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								from  . Locations  import  exclusion_table ,  get_postgame_advancements  
						 
					
						
							
								
									
										
										
										
											2021-06-25 23:32:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								from  BaseClasses  import  MultiWorld  
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								from  . . AutoWorld  import  LogicMixin  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								class  MinecraftLogic ( LogicMixin ) :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_has_iron_ingots ( self ,  player :  int ) : 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  self . has ( ' Progressive Tools ' ,  player )  and  self . has ( ' Progressive Resource Crafting ' ,  player ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_has_copper_ingots ( self ,  player :  int ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . has ( ' Progressive Tools ' ,  player )  and  self . has ( ' Progressive Resource Crafting ' ,  player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_has_gold_ingots ( self ,  player :  int ) :  
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  self . has ( ' Progressive Resource Crafting ' ,  player )  and  ( self . has ( ' Progressive Tools ' ,  player ,  2 )  or  self . can_reach ( ' The Nether ' ,  ' Region ' ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_has_diamond_pickaxe ( self ,  player :  int ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . has ( ' Progressive Tools ' ,  player ,  3 )  and  self . _mc_has_iron_ingots ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_craft_crossbow ( self ,  player :  int ) :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . has ( ' Archery ' ,  player )  and  self . _mc_has_iron_ingots ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_has_bottle ( self ,  player :  int ) :  
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  self . has ( ' Bottles ' ,  player )  and  self . has ( ' Progressive Resource Crafting ' ,  player ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_has_spyglass ( self ,  player :  int ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . _mc_has_copper_ingots ( player )  and  self . has ( ' Spyglass ' ,  player )  and  self . _mc_can_adventure ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_can_enchant ( self ,  player :  int ) :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . has ( ' Enchanting ' ,  player )  and  self . _mc_has_diamond_pickaxe ( player )  # mine obsidian and lapis 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_can_use_anvil ( self ,  player :  int ) :  
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  self . has ( ' Enchanting ' ,  player )  and  self . has ( ' Progressive Resource Crafting ' ,  player ,  2 )  and  self . _mc_has_iron_ingots ( player ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_fortress_loot ( self ,  player :  int ) :  # saddles, blaze rods, wither skulls 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . can_reach ( ' Nether Fortress ' ,  ' Region ' ,  player )  and  self . _mc_basic_combat ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-03 19:21:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_can_brew_potions ( self ,  player :  int ) : 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-28 16:44:48 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  self . has ( ' Blaze Rods ' ,  player )  and  self . has ( ' Brewing ' ,  player )  and  self . _mc_has_bottle ( player ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-03 19:21:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_can_piglin_trade ( self ,  player :  int ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . _mc_has_gold_ingots ( player )  and  ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    self . can_reach ( ' The Nether ' ,  ' Region ' ,  player )  or  self . can_reach ( ' Bastion Remnant ' ,  ' Region ' , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                                     player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-03 19:21:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_enter_stronghold ( self ,  player :  int ) : 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-28 16:44:48 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  self . has ( ' Blaze Rods ' ,  player )  and  self . has ( ' Brewing ' ,  player )  and  self . has ( ' 3 Ender Pearls ' ,  player ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # Difficulty-dependent functions 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-03 19:21:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_combat_difficulty ( self ,  player :  int ) : 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-09 09:15:41 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  self . world . combat_difficulty [ player ] . current_key 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_can_adventure ( self ,  player :  int ) : 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 12:34:25 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        death_link_check  =  not  self . world . death_link [ player ]  or  self . has ( ' Bed ' ,  player ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-03 19:21:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  self . _mc_combat_difficulty ( player )  ==  ' easy ' : 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 12:34:25 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            return  self . has ( ' Progressive Weapons ' ,  player ,  2 )  and  self . _mc_has_iron_ingots ( player )  and  death_link_check 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-03 19:21:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        elif  self . _mc_combat_difficulty ( player )  ==  ' hard ' : 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            return  True 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 12:34:25 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  ( self . has ( ' Progressive Weapons ' ,  player )  and  death_link_check  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ( self . has ( ' Progressive Resource Crafting ' ,  player )  or  self . has ( ' Campfire ' ,  player ) ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-08-03 19:21:59 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_basic_combat ( self ,  player :  int ) : 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  self . _mc_combat_difficulty ( player )  ==  ' easy ' :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  self . has ( ' Progressive Weapons ' ,  player ,  2 )  and  self . has ( ' Progressive Armor ' ,  player )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                   self . has ( ' Shield ' ,  player )  and  self . _mc_has_iron_ingots ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        elif  self . _mc_combat_difficulty ( player )  ==  ' hard ' :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  True 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . has ( ' Progressive Weapons ' ,  player )  and  ( self . has ( ' Progressive Armor ' ,  player )  or  self . has ( ' Shield ' ,  player ) )  and  self . _mc_has_iron_ingots ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_complete_raid ( self ,  player :  int ) :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        reach_regions  =  self . can_reach ( ' Village ' ,  ' Region ' ,  player )  and  self . can_reach ( ' Pillager Outpost ' ,  ' Region ' ,  player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  self . _mc_combat_difficulty ( player )  ==  ' easy ' :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  reach_regions  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                   self . has ( ' Progressive Weapons ' ,  player ,  3 )  and  self . has ( ' Progressive Armor ' ,  player ,  2 )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                   self . has ( ' Shield ' ,  player )  and  self . has ( ' Archery ' ,  player )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                   self . has ( ' Progressive Tools ' ,  player ,  2 )  and  self . _mc_has_iron_ingots ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        elif  self . _mc_combat_difficulty ( player )  ==  ' hard ' :  # might be too hard? 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  reach_regions  and  self . has ( ' Progressive Weapons ' ,  player ,  2 )  and  self . _mc_has_iron_ingots ( player )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                   ( self . has ( ' Progressive Armor ' ,  player )  or  self . has ( ' Shield ' ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  reach_regions  and  self . has ( ' Progressive Weapons ' ,  player ,  2 )  and  self . _mc_has_iron_ingots ( player )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								               self . has ( ' Progressive Armor ' ,  player )  and  self . has ( ' Shield ' ,  player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_can_kill_wither ( self ,  player :  int ) :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        normal_kill  =  self . has ( " Progressive Weapons " ,  player ,  3 )  and  self . has ( " Progressive Armor " ,  player ,  2 )  and  self . _mc_can_brew_potions ( player )  and  self . _mc_can_enchant ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  self . _mc_combat_difficulty ( player )  ==  ' easy ' :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  self . _mc_fortress_loot ( player )  and  normal_kill  and  self . has ( ' Archery ' ,  player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        elif  self . _mc_combat_difficulty ( player )  ==  ' hard ' :  # cheese kill using bedrock ceilings 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  self . _mc_fortress_loot ( player )  and  ( normal_kill  or  self . can_reach ( ' The Nether ' ,  ' Region ' ,  player )  or  self . can_reach ( ' The End ' ,  ' Region ' ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . _mc_fortress_loot ( player )  and  normal_kill 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_can_respawn_ender_dragon ( self ,  player :  int ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . can_reach ( ' The Nether ' ,  ' Region ' ,  player )  and  self . can_reach ( ' The End ' ,  ' Region ' ,  player )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            self . has ( ' Progressive Resource Crafting ' ,  player )  # smelt sand into glass 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    def  _mc_can_kill_ender_dragon ( self ,  player :  int ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  self . _mc_combat_difficulty ( player )  ==  ' easy ' :  
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            return  self . has ( " Progressive Weapons " ,  player ,  3 )  and  self . has ( " Progressive Armor " ,  player ,  2 )  and  \
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                   self . has ( ' Archery ' ,  player )  and  self . _mc_can_brew_potions ( player )  and  self . _mc_can_enchant ( player ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  self . _mc_combat_difficulty ( player )  ==  ' hard ' :  
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            return  ( self . has ( ' Progressive Weapons ' ,  player ,  2 )  and  self . has ( ' Progressive Armor ' ,  player ) )  or  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                   ( self . has ( ' Progressive Weapons ' ,  player ,  1 )  and  self . has ( ' Bed ' ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . has ( ' Progressive Weapons ' ,  player ,  2 )  and  self . has ( ' Progressive Armor ' ,  player )  and  self . has ( ' Archery ' ,  player ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  _mc_has_structure_compass ( self ,  entrance_name :  str ,  player :  int ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  not  self . world . structure_compasses [ player ] : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  True 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  self . has ( f " Structure Compass ( { self . world . get_entrance ( entrance_name ,  player ) . connected_region . name } ) " ,  player ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Sets rules on entrances and advancements that are always applied  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								def  set_advancement_rules ( world :  MultiWorld ,  player :  int ) :  
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # Retrieves the appropriate structure compass for the given entrance 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  get_struct_compass ( entrance_name ) :  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        struct  =  world . get_entrance ( entrance_name ,  player ) . connected_region . name 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  f " Structure Compass ( { struct } ) " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 20:15:07 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_entrance ( " Nether Portal " ,  player ) ,  lambda  state :  state . has ( ' Flint and Steel ' ,  player )  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ( state . has ( ' Bucket ' ,  player )  or  state . has ( ' Progressive Tools ' ,  player ,  3 ) )  and  
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_entrance ( " End Portal " ,  player ) ,  lambda  state :  state . _mc_enter_stronghold ( player )  and  state . has ( ' 3 Ender Pearls ' ,  player ,  4 ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_entrance ( " Overworld Structure 1 " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player )  and  state . _mc_has_structure_compass ( " Overworld Structure 1 " ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_entrance ( " Overworld Structure 2 " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player )  and  state . _mc_has_structure_compass ( " Overworld Structure 2 " ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_entrance ( " Nether Structure 1 " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player )  and  state . _mc_has_structure_compass ( " Nether Structure 1 " ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_entrance ( " Nether Structure 2 " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player )  and  state . _mc_has_structure_compass ( " Nether Structure 2 " ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    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 ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Ender Dragon " ,  player ) ,  lambda  state :  state . _mc_can_kill_ender_dragon ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Wither " ,  player ) ,  lambda  state :  state . _mc_can_kill_wither ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-28 16:44:48 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Blaze Spawner " ,  player ) ,  lambda  state :  state . _mc_fortress_loot ( player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    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 ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Suit Up " ,  player ) ,  lambda  state :  state . has ( " Progressive Armor " ,  player )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Very Very Frightening " ,  player ) ,  lambda  state :  state . has ( " Channeling Book " ,  player )  and  state . _mc_can_use_anvil ( player )  and  state . _mc_can_enchant ( player )  and  \
							 
						 
					
						
							
								
									
										
										
										
											2021-05-22 09:30:09 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ( ( world . get_region ( ' Village ' ,  player ) . entrances [ 0 ] . parent_region . name  !=  ' The End '  and  state . can_reach ( ' Village ' ,  ' Region ' ,  player ) )  or  state . can_reach ( ' Zombie Doctor ' ,  ' Location ' ,  player ) ) )  # need villager into the overworld for lightning strike 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Hot Stuff " ,  player ) ,  lambda  state :  state . has ( " Bucket " ,  player )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Free the End " ,  player ) ,  lambda  state :  state . _mc_can_respawn_ender_dragon ( player )  and  state . _mc_can_kill_ender_dragon ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " A Furious Cocktail " ,  player ) ,  lambda  state :  state . _mc_can_brew_potions ( player )  and  
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft updates (#13)
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
* Minecraft logic updates
Wither kill now considers nether fortresses as a valid source of soul sand
A Furious Cocktail now requires beacons for resistance and village access for carrots
Uneasy Alliance now requires fishing rod to pull the ghast through the portal
On a Rail now requires iron pickaxe to make powered rails
Overkill now may require strength II without stone axe, which needs nether access
* embed all apmc info into slot_data
* updated MC tests for logic changes
* put apmc into zipfile
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-15 18:49:58 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                                                                             state . has ( " Fishing Rod " ,  player )  and  # Water Breathing 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                             state . can_reach ( ' The Nether ' ,  ' Region ' ,  player )  and  # Regeneration, Fire Resistance, gold nuggets 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                             state . can_reach ( ' Village ' ,  ' Region ' ,  player )  and  # Night Vision, Invisibility 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                             state . can_reach ( ' Bring Home the Beacon ' ,  ' Location ' ,  player ) )  # Resistance 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Best Friends Forever", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Bring Home the Beacon " ,  player ) ,  lambda  state :  state . _mc_can_kill_wither ( player )  and  
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        state . _mc_has_diamond_pickaxe ( player )  and  state . has ( " Progressive Resource Crafting " ,  player ,  2 ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Not Today, Thank You " ,  player ) ,  lambda  state :  state . has ( " Shield " ,  player )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Isn ' t It Iron Pick " ,  player ) ,  lambda  state :  state . has ( " Progressive Tools " ,  player ,  2 )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Local Brewery " ,  player ) ,  lambda  state :  state . _mc_can_brew_potions ( player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " The Next Generation " ,  player ) ,  lambda  state :  state . _mc_can_kill_ender_dragon ( player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Fishy Business " ,  player ) ,  lambda  state :  state . has ( " Fishing Rod " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Hot Tourist Destinations", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " This Boat Has Legs " ,  player ) ,  lambda  state :  ( state . _mc_fortress_loot ( player )  or  state . _mc_complete_raid ( player ) )  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        state . has ( " Saddle " ,  player )  and  state . has ( " Fishing Rod " ,  player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Sniper Duel " ,  player ) ,  lambda  state :  state . has ( " Archery " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Nether", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Great View From Up Here " ,  player ) ,  lambda  state :  state . _mc_basic_combat ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " How Did We Get Here? " ,  player ) ,  lambda  state :  state . _mc_can_brew_potions ( player )  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                           state . _mc_has_gold_ingots ( player )  and   # Absorption 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 20:15:07 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                           state . can_reach ( ' End City ' ,  ' Region ' ,  player )  and  # Levitation 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                           state . can_reach ( ' The Nether ' ,  ' Region ' ,  player )  and   # potion ingredients 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                           state . has ( " Fishing Rod " ,  player )  and  state . has ( " Archery " , player )  and   # Pufferfish, Nautilus Shells; spectral arrows 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 23:32:13 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                           state . can_reach ( " Bring Home the Beacon " ,  " Location " ,  player )  and   # Haste 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                           state . can_reach ( " Hero of the Village " ,  " Location " ,  player ) )   # Bad Omen, Hero of the Village 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Bullseye " ,  player ) ,  lambda  state :  state . has ( " Archery " ,  player )  and  state . has ( " Progressive Tools " ,  player ,  2 )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Spooky Scary Skeleton " ,  player ) ,  lambda  state :  state . _mc_basic_combat ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Two by Two " ,  player ) ,  lambda  state :  state . _mc_has_iron_ingots ( player )  and  state . _mc_can_adventure ( player ) )   # shears > seagrass > turtles; nether > striders; gold carrots > horses skips ingots 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Stone Age", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Two Birds, One Arrow " ,  player ) ,  lambda  state :  state . _mc_craft_crossbow ( player )  and  state . _mc_can_enchant ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("We Need to Go Deeper", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Who ' s the Pillager Now? " ,  player ) ,  lambda  state :  state . _mc_craft_crossbow ( player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Getting an Upgrade " ,  player ) ,  lambda  state :  state . has ( " Progressive Tools " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Tactical Fishing " ,  player ) ,  lambda  state :  state . has ( " Bucket " ,  player )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Zombie Doctor " ,  player ) ,  lambda  state :  state . _mc_can_brew_potions ( player )  and  state . _mc_has_gold_ingots ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("The City at the End of the Game", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Ice Bucket Challenge " ,  player ) ,  lambda  state :  state . _mc_has_diamond_pickaxe ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Remote Getaway", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Into Fire " ,  player ) ,  lambda  state :  state . _mc_basic_combat ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " War Pigs " ,  player ) ,  lambda  state :  state . _mc_basic_combat ( player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Take Aim " ,  player ) ,  lambda  state :  state . has ( " Archery " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Total Beelocation " ,  player ) ,  lambda  state :  state . has ( " Silk Touch Book " ,  player )  and  state . _mc_can_use_anvil ( player )  and  state . _mc_can_enchant ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Arbalistic " ,  player ) ,  lambda  state :  state . _mc_craft_crossbow ( player )  and  state . has ( " Piercing IV Book " ,  player )  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                                                     state . _mc_can_use_anvil ( player )  and  state . _mc_can_enchant ( player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " The End... Again... " ,  player ) ,  lambda  state :  state . _mc_can_respawn_ender_dragon ( player )  and  state . _mc_can_kill_ender_dragon ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Acquire Hardware " ,  player ) ,  lambda  state :  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Not Quite  \" Nine \"  Lives " ,  player ) ,  lambda  state :  state . _mc_can_piglin_trade ( player )  and  state . has ( " Progressive Resource Crafting " ,  player ,  2 ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 20:15:07 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Cover Me With Diamonds " ,  player ) ,  lambda  state :  state . has ( " Progressive Armor " ,  player ,  2 )  and  state . can_reach ( " Diamonds! " ,  " Location " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Sky ' s the Limit " ,  player ) ,  lambda  state :  state . _mc_basic_combat ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Hired Help " ,  player ) ,  lambda  state :  state . has ( " Progressive Resource Crafting " ,  player ,  2 )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Return to Sender", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 20:15:07 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Sweet Dreams " ,  player ) ,  lambda  state :  state . has ( " Bed " ,  player )  or  state . can_reach ( ' Village ' ,  ' Region ' ,  player ) ) 
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " You Need a Mint " ,  player ) ,  lambda  state :  state . _mc_can_respawn_ender_dragon ( player )  and  state . _mc_has_bottle ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Adventure", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Monsters Hunted " ,  player ) ,  lambda  state :  state . _mc_can_respawn_ender_dragon ( player )  and  state . _mc_can_kill_ender_dragon ( player )  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        state . _mc_can_kill_wither ( player )  and  state . has ( " Fishing Rod " ,  player ) )   # pufferfish for Water Breathing 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Enchanter " ,  player ) ,  lambda  state :  state . _mc_can_enchant ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Voluntary Exile " ,  player ) ,  lambda  state :  state . _mc_basic_combat ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Eye Spy " ,  player ) ,  lambda  state :  state . _mc_enter_stronghold ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("The End", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Serious Dedication " ,  player ) ,  lambda  state :  state . can_reach ( " Hidden in the Depths " ,  " Location " ,  player )  and  state . _mc_has_gold_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Postmortal " ,  player ) ,  lambda  state :  state . _mc_complete_raid ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Monster Hunter", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Adventuring Time " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("A Seedy Place", player), lambda state: True) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Those Were the Days", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Hero of the Village " ,  player ) ,  lambda  state :  state . _mc_complete_raid ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Hidden in the Depths " ,  player ) ,  lambda  state :  state . _mc_can_brew_potions ( player )  and  state . has ( " Bed " ,  player )  and  state . _mc_has_diamond_pickaxe ( player ) )   # bed mining :) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Beaconator " ,  player ) ,  lambda  state :  state . _mc_can_kill_wither ( player )  and  state . _mc_has_diamond_pickaxe ( player )  and 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                           state . has ( " Progressive Resource Crafting " ,  player ,  2 ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Withering Heights " ,  player ) ,  lambda  state :  state . _mc_can_kill_wither ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " A Balanced Diet " ,  player ) ,  lambda  state :  state . _mc_has_bottle ( player )  and  state . _mc_has_gold_ingots ( player )  and   # honey bottle; gapple 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                           state . has ( " Progressive Resource Crafting " ,  player ,  2 )  and  state . can_reach ( ' The End ' ,  ' Region ' ,  player ) )   # notch apple, chorus fruit 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Subspace Bubble " ,  player ) ,  lambda  state :  state . _mc_has_diamond_pickaxe ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Husbandry", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Country Lode, Take Me Home " ,  player ) ,  lambda  state :  state . can_reach ( " Hidden in the Depths " ,  " Location " ,  player )  and  state . _mc_has_gold_ingots ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Bee Our Guest " ,  player ) ,  lambda  state :  state . has ( " Campfire " ,  player )  and  state . _mc_has_bottle ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("What a Deal!", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Uneasy Alliance " ,  player ) ,  lambda  state :  state . _mc_has_diamond_pickaxe ( player )  and  state . has ( ' Fishing Rod ' ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Diamonds! " ,  player ) ,  lambda  state :  state . has ( " Progressive Tools " ,  player ,  2 )  and  state . _mc_has_iron_ingots ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("A Terrible Fortress", player), lambda state: True)  # since you don't have to fight anything 
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " A Throwaway Joke " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player ) )   # kill drowned 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Minecraft", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Sticky Situation " ,  player ) ,  lambda  state :  state . has ( " Campfire " ,  player )  and  state . _mc_has_bottle ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Ol '  Betsy " ,  player ) ,  lambda  state :  state . _mc_craft_crossbow ( player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 20:15:07 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Cover Me in Debris " ,  player ) ,  lambda  state :  state . has ( " Progressive Armor " ,  player ,  2 )  and 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                           state . has ( " 8 Netherite Scrap " ,  player ,  2 )  and  state . has ( " Progressive Resource Crafting " ,  player )  and 
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 20:15:07 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                           state . can_reach ( " Diamonds! " ,  " Location " ,  player )  and  state . can_reach ( " Hidden in the Depths " ,  " Location " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("The End?", player), lambda state: True) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # set_rule(world.get_location("The Parrots and the Bats", player), lambda state: True) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # set_rule(world.get_location("A Complete Catalogue", player), lambda state: True)  # kill fish for raw 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Getting Wood", player), lambda state: True) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Time to Mine!", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-04 16:33:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Hot Topic " ,  player ) ,  lambda  state :  state . has ( " Progressive Resource Crafting " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Bake Bread", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " The Lie " ,  player ) ,  lambda  state :  state . _mc_has_iron_ingots ( player )  and  state . has ( " Bucket " ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " On a Rail " ,  player ) ,  lambda  state :  state . _mc_has_iron_ingots ( player )  and  state . has ( ' Progressive Tools ' ,  player ,  2 ) )   # powered rails 
							 
						 
					
						
							
								
									
										
										
										
											2022-02-20 13:02:57 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Time to Strike!", player), lambda state: True) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # set_rule(world.get_location("Cow Tipper", player), lambda state: True) 
							 
						 
					
						
							
								
									
										
										
										
											2021-07-23 19:28:16 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " When Pigs Fly " ,  player ) ,  lambda  state :  ( state . _mc_fortress_loot ( player )  or  state . _mc_complete_raid ( player ) )  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        state . has ( " Saddle " ,  player )  and  state . has ( " Fishing Rod " ,  player )  and  state . _mc_can_adventure ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Overkill " ,  player ) ,  lambda  state :  state . _mc_can_brew_potions ( player )  and  
							 
						 
					
						
							
								
									
										
										
										
											2021-06-25 20:15:07 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ( state . has ( " Progressive Weapons " ,  player )  or  state . can_reach ( ' The Nether ' ,  ' Region ' ,  player ) ) )   # strength 1 + stone axe crit OR strength 2 + wood axe crit 
							 
						 
					
						
							
								
									
										
											 
										
											
												Minecraft Randomizer
Squash merge, original Commits:
* Minecraft locations, items, and generation without logic
* added id lookup for minecraft
* typing import fix in minecraft/Items.py
* fix 2
* implementing Minecraft options and hard/postgame advancement exclusion
* first logic pass (75/80)
* logic pass 2 and proper completion conditions
* added insane difficulty pool, modified method of excluding item pools for easier extension
* bump network_data_package version
* minecraft testing framework
* switch Ancient Debris to Netherite Scrap to avoid advancement triggering on receiving that item
* Testing now functions, split tests up by advancement pane, added some story tests
* Newer testing framework: every advancement gets its own function, for ease of testing
* fixed logic for The End... Again...
* changed option names to "include_hard_advancements" etc.
* village/pillager-related advancements now require can_adventure: weapon + food
* a few minecraft tests
* rename "Flint & Steel" to "Flint and Steel" for parity with in-game name
* additional MC tests
* more tests, mostly nether-related tests
* more tests, removed anvil path for Two Birds One Arrow
* include Minecraft slot data, and a world seed for each Minecraft player slot
* Added new items: ender pearls, lapis, porkchops
* All remaining Minecraft tests
* formatting of Minecraft tests and logic for better readability
* require Wither kill for Monsters Hunted
* properly removed 8 Emeralds item from item pool
* enchanting required for wither; fishing rod required for water breathing; water breathing required for elder guardian kill
* Added 12 new advancements (ported from old achievement system)
* renamed "On a Rail" for consistency with modern advancements
* tests for the new advancements
* moved slot_data generation for minecraft into worlds/minecraft/__init__.py, added logic_version to slot_data
* output minecraft options in the spoiler log
* modified advancement goal values for new advancements
* make non-native Minecraft items appear as Shovel in ALttP, and unknown-game items as Power Stars
* fixed glowstone block logic for Not Quite Nine Lives
* setup for shuffling MC structures: building ER world and shuffling regions/entrances
* ensured Nether Fortresses can't be placed in the End
* finished logic for structure randomization
* fixed nonnative items always showing up as Hammers in ALttP shops
* output minecraft structure info in the spoiler
* generate .apmc file for communication with MC client
* fixed structure rando always using the same seed
* move stuff to worlds/minecraft/Regions.py
* make output apmc file have consistent name with other files
* added minecraft bottle macro; fixed tests imports
* generalizing MC region generation
* restructured structure shuffling in preparation for structure plando
* only output structure rando info in spoiler if they are shuffled
* Force structure rando to always be off, for the stable release
* added Minecraft options to player settings
* formally added combat_difficulty as an option
* Added Ender Dragon into playthrough, cleaned up goal map
* Added new difficulties: Easy, Normal, Hard combat
* moved .apmc generation time to prevent outputs on failed generation
* updated tests for new combat logic
* Fixed bug causing generation to fail; removed Nether Fortress event since it should no longer be needed with the fix
* moved all MC-specific functions into gen_minecraft
* renamed "logic_version" to "client_version"
* bug fixes
properly flagged event locations/items with id None
moved generation back to Main.py to fix mysterious generation failures
* moved link_minecraft_regions into minecraft init, left create_regions in Main for caching
* added seed_name, player_name, client_version to apmc file
* reenabled structure shuffle
* added entrance tests for minecraft
Co-authored-by: achuang <alexander.w.chuang@gmail.com>
											 
										 
										
											2021-05-08 07:38:57 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Librarian " ,  player ) ,  lambda  state :  state . has ( " Enchanting " ,  player ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-06 14:50:15 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Overpowered " ,  player ) ,  lambda  state :  state . _mc_has_iron_ingots ( player )  and  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        state . has ( ' Progressive Tools ' ,  player ,  2 )  and  state . _mc_basic_combat ( player ) )   # mine gold blocks w/ iron pick 
							 
						 
					
						
							
								
									
										
											 
										
											
												MC: 1.17 support (#120)
* MC: add death_link option
* Minecraft: 1.17 advancements and logic support
* Update Minecraft tracker to 1.17
* Minecraft: add tests for new advancements
* removed jdk/forge download install out of iss and into MinecraftClient.py using flag --install
* Add required_bosses option
choices are none, ender_dragon, wither, both
postgame advancements are set according to the required boss for completion
* fix docstring for PostgameAdvancements
* Minecraft: add starting_items
List of dicts: item, amount, nbt
* Update descriptions for AdvancementGoal and EggShardsRequired
* Minecraft: fix tests for required_bosses attribute
* Minecraft: updated logic for various dragon-related advancements
Split the logic into can_respawn and can_kill dragon
Free the End, Monsters Hunted, The End Again still require both respawn and kill, since the player needs to kill and be credited with the kill
You Need a Mint and Is It a Plane now require only respawn, since the dragon need only be alive; if killed out of logic, it's ok
The Next Generation only requires kill, since the egg spawns regardless of whether the player was credited with the kill or not
* Minecraft client: ignore prereleases unless --prerelease flag is on
* explicitly state all defaults
change structure shuffle and structure compass defaults to true
update install tutorial to point to player-settings page, as well as removing instructions for manual install
* Minecraft client: add Minecraft version check
Adds a minecraft_version field in the apmc, and downloads only mods which contain that version in the name of the .jar file.
This ensures that the client remains compatible even if new mods are released for later versions, since they won't download a mod for a later version than the apmc says.
Co-authored-by: Kono Tyran <Kono.Tyran@gmail.com>
											 
										 
										
											2021-11-30 20:37:11 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Wax On " ,  player ) ,  lambda  state :  state . _mc_has_copper_ingots ( player )  and  state . has ( ' Campfire ' ,  player )  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        state . has ( ' Progressive Resource Crafting ' ,  player ,  2 ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Wax Off " ,  player ) ,  lambda  state :  state . _mc_has_copper_ingots ( player )  and  state . has ( ' Campfire ' ,  player )  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        state . has ( ' Progressive Resource Crafting ' ,  player ,  2 ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " The Cutest Predator " ,  player ) ,  lambda  state :  state . _mc_has_iron_ingots ( player )  and  state . has ( ' Bucket ' ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " The Healing Power of Friendship " ,  player ) ,  lambda  state :  state . _mc_has_iron_ingots ( player )  and  state . has ( ' Bucket ' ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Is It a Bird? " ,  player ) ,  lambda  state :  state . _mc_has_spyglass ( player )  and  state . _mc_can_adventure ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Is It a Balloon? " ,  player ) ,  lambda  state :  state . _mc_has_spyglass ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Is It a Plane? " ,  player ) ,  lambda  state :  state . _mc_has_spyglass ( player )  and  state . _mc_can_respawn_ender_dragon ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Surge Protector " ,  player ) ,  lambda  state :  state . has ( " Channeling Book " ,  player )  and  state . _mc_can_use_anvil ( player )  and  state . _mc_can_enchant ( player )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        ( ( world . get_region ( ' Village ' ,  player ) . entrances [ 0 ] . parent_region . name  !=  ' The End '  and  state . can_reach ( ' Village ' ,  ' Region ' ,  player ) )  or  state . can_reach ( ' Zombie Doctor ' ,  ' Location ' ,  player ) ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Light as a Rabbit " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player )  and  state . _mc_has_iron_ingots ( player )  and  state . has ( ' Bucket ' ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Glow and Behold! " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    set_rule ( world . get_location ( " Whatever Floats Your Goat! " ,  player ) ,  lambda  state :  state . _mc_can_adventure ( player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Sets rules on completion condition and postgame advancements  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								def  set_completion_rules ( world :  MultiWorld ,  player :  int ) :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  reachable_locations ( state ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        postgame_advancements  =  get_postgame_advancements ( world . required_bosses [ player ] . current_key ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  [ location  for  location  in  world . get_locations ( )  if 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                location . player  ==  player  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                location . name  not  in  postgame_advancements  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                location . address  !=  None  and 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                location . can_reach ( state ) ] 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    def  defeated_required_bosses ( state ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  ( world . required_bosses [ player ] . current_key  not  in  { " ender_dragon " ,  " both " }  or  state . has ( " Defeat Ender Dragon " ,  player ) )  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            ( world . required_bosses [ player ] . current_key  not  in  { " wither " ,  " both " }  or  state . has ( " Defeat Wither " ,  player ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # 103 total advancements. Goal is to complete X advancements and then defeat the dragon.  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # There are 11 possible postgame advancements; 5 for dragon, 5 for wither, 1 shared between them 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # Hence the max for completion is 92 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    egg_shards  =  min ( world . egg_shards_required [ player ] ,  world . egg_shards_available [ player ] ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    completion_requirements  =  lambda  state :  len ( reachable_locations ( state ) )  > =  world . advancement_goal [ player ]  and  \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        state . has ( " Dragon Egg Shard " ,  player ,  egg_shards ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    world . completion_condition [ player ]  =  lambda  state :  completion_requirements ( state )  and  defeated_required_bosses ( state ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    # Set rules on postgame advancements 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    for  adv_name  in  get_postgame_advancements ( world . required_bosses [ player ] . current_key ) : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        add_rule ( world . get_location ( adv_name ,  player ) ,  completion_requirements )