mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Pokémon Red and Blue: Version 2 (#1282)
Adds Trainersanity option (Each non-scripted trainer has a location check, adding 317 locations) Adds Randomize Pokedex option. It is required to obtain items from Oak's Aides. Adds option to add all normal shop items to all normal shops. Adds DeathLink option. Adds traps. Improves Type Chart randomization. Items can be received during battle. Stores start inventory in ROM. Only requests remote start inventory if patch is from v1. Fixes logic bugs. Various other improvements.
This commit is contained in:
@@ -3,25 +3,27 @@ from ..generic.Rules import add_item_rule, add_rule
|
||||
def set_rules(world, player):
|
||||
|
||||
add_item_rule(world.get_location("Pallet Town - Player's PC", player),
|
||||
lambda i: i.player == player and "Badge" not in i.name)
|
||||
lambda i: i.player == player and "Badge" not in i.name and "Trap" not in i.name and
|
||||
i.name != "Pokedex")
|
||||
|
||||
access_rules = {
|
||||
|
||||
"Pallet Town - Rival's Sister": lambda state: state.has("Oak's Parcel", player),
|
||||
"Pallet Town - Oak's Post-Route-22-Rival Gift": lambda state: state.has("Oak's Parcel", player),
|
||||
"Viridian City - Sleepy Guy": lambda state: state.pokemon_rb_can_cut(player) or state.pokemon_rb_can_surf(player),
|
||||
"Route 2 - Oak's Aide": lambda state: state.pokemon_rb_has_pokemon(state.multiworld.oaks_aide_rt_2[player].value + 5, player),
|
||||
"Route 2 - Oak's Aide": lambda state: state.pokemon_rb_oaks_aide(state.multiworld.oaks_aide_rt_2[player].value + 5, player),
|
||||
"Pewter City - Museum": lambda state: state.pokemon_rb_can_cut(player),
|
||||
"Cerulean City - Bicycle Shop": lambda state: state.has("Bike Voucher", player),
|
||||
"Lavender Town - Mr. Fuji": lambda state: state.has("Fuji Saved", player),
|
||||
"Vermilion Gym - Lt. Surge 1": lambda state: state.pokemon_rb_can_cut(player or state.pokemon_rb_can_surf(player)),
|
||||
"Vermilion Gym - Lt. Surge 2": lambda state: state.pokemon_rb_can_cut(player or state.pokemon_rb_can_surf(player)),
|
||||
"Route 11 - Oak's Aide": lambda state: state.pokemon_rb_has_pokemon(state.multiworld.oaks_aide_rt_11[player].value + 5, player),
|
||||
"Route 11 - Oak's Aide": lambda state: state.pokemon_rb_oaks_aide(state.multiworld.oaks_aide_rt_11[player].value + 5, player),
|
||||
"Celadon City - Stranded Man": lambda state: state.pokemon_rb_can_surf(player),
|
||||
"Silph Co 11F - Silph Co President": lambda state: state.has("Card Key", player),
|
||||
"Fuchsia City - Safari Zone Warden": lambda state: state.has("Gold Teeth", player),
|
||||
"Route 12 - Island Item": lambda state: state.pokemon_rb_can_surf(player),
|
||||
"Route 12 - Item Behind Cuttable Tree": lambda state: state.pokemon_rb_can_cut(player),
|
||||
"Route 15 - Oak's Aide": lambda state: state.pokemon_rb_oaks_aide(state.multiworld.oaks_aide_rt_15[player].value + 5, player),
|
||||
"Route 15 - Item": lambda state: state.pokemon_rb_can_cut(player),
|
||||
"Route 25 - Item": lambda state: state.pokemon_rb_can_cut(player),
|
||||
"Fuchsia City - Warden's House Item": lambda state: state.pokemon_rb_can_strength(player),
|
||||
@@ -85,10 +87,23 @@ def set_rules(world, player):
|
||||
"Route 12 - Sleeping Pokemon": lambda state: state.has("Poke Flute", player),
|
||||
"Route 16 - Sleeping Pokemon": lambda state: state.has("Poke Flute", player),
|
||||
"Seafoam Islands B4F - Legendary Pokemon": lambda state: state.pokemon_rb_can_strength(player),
|
||||
"Vermilion City - Legendary Pokemon": lambda state: state.pokemon_rb_can_surf(player) and state.has("S.S. Ticket", player)
|
||||
}
|
||||
"Vermilion City - Legendary Pokemon": lambda state: state.pokemon_rb_can_surf(player) and state.has("S.S. Ticket", player),
|
||||
|
||||
hidden_item_access_rules = {
|
||||
# Pokédex check
|
||||
"Pallet Town - Oak's Parcel Reward": lambda state: state.has("Oak's Parcel", player),
|
||||
|
||||
# trainers
|
||||
"Route 4 - Cooltrainer F": lambda state: state.pokemon_rb_can_surf(player),
|
||||
"Route 15 - Jr. Trainer F 1": lambda state: state.pokemon_rb_can_cut(player),
|
||||
"Silph Co 11F - Rocket 2 (Card Key)": lambda state: state.has("Card Key", player),
|
||||
"Silph Co 9F - Rocket 2 (Card Key)": lambda state: state.has("Card Key", player),
|
||||
"Silph Co 3F - Scientist (Card Key)": lambda state: state.has("Card Key", player),
|
||||
"Route 10 North - Pokemaniac": lambda state: state.pokemon_rb_can_surf(player),
|
||||
"Rocket Hideout B1F - Rocket 5 (Lift Key)": lambda state: state.has("Lift Key", player),
|
||||
"Rocket Hideout B4F - Rocket 2 (Lift Key)": lambda state: state.has("Lift Key", player),
|
||||
"Rocket Hideout B4F - Rocket 3 (Lift Key)": lambda state: state.has("Lift Key", player),
|
||||
|
||||
# hidden items
|
||||
"Viridian Forest - Hidden Item Northwest by Trainer": lambda state: state.pokemon_rb_can_get_hidden_items(
|
||||
player),
|
||||
"Viridian Forest - Hidden Item Entrance Tree": lambda state: state.pokemon_rb_can_get_hidden_items(player),
|
||||
@@ -159,8 +174,6 @@ def set_rules(world, player):
|
||||
player),
|
||||
"Route 4 - Hidden Item Plateau East Of Mt Moon": lambda state: state.pokemon_rb_can_get_hidden_items(player),
|
||||
}
|
||||
for loc, rule in access_rules.items():
|
||||
add_rule(world.get_location(loc, player), rule)
|
||||
if world.randomize_hidden_items[player].value != 0:
|
||||
for loc, rule in hidden_item_access_rules.items():
|
||||
add_rule(world.get_location(loc, player), rule)
|
||||
for loc in world.get_locations(player):
|
||||
if loc.name in access_rules:
|
||||
add_rule(loc, access_rules[loc.name])
|
||||
|
Reference in New Issue
Block a user