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:
Alchav
2022-12-07 18:38:34 -05:00
committed by GitHub
parent 5273812039
commit e206c065bf
16 changed files with 1775 additions and 870 deletions

View File

@@ -1,5 +1,5 @@
from Options import Toggle, Choice, Range, SpecialRange, FreeText, TextChoice
from Options import Toggle, Choice, Range, SpecialRange, TextChoice, DeathLink
class GameVersion(Choice):
@@ -10,23 +10,25 @@ class GameVersion(Choice):
default = "random"
class TrainerName(FreeText):
"""Your trainer name. Cannot exceed 7 characters.
See the setup guide on archipelago.gg for a list of allowed characters."""
class TrainerName(TextChoice):
"""Your trainer name. If not set to choose_in_game, must be a name not exceeding 7 characters, and the prompt to
name your character in-game will be skipped. See the setup guide on archipelago.gg for a list of allowed characters."""
display_name = "Trainer Name"
default = "ASH"
option_choose_in_game = -1
default = -1
class RivalName(FreeText):
"""Your rival's name. Cannot exceed 7 characters.
See the setup guide on archipelago.gg for a list of allowed characters."""
class RivalName(TextChoice):
"""Your rival's name. If not set to choose_in_game, must be a name not exceeding 7 characters, and the prompt to
name your rival in-game will be skipped. See the setup guide on archipelago.gg for a list of allowed characters."""
display_name = "Rival's Name"
default = "GARY"
option_choose_in_game = -1
default = -1
class Goal(Choice):
"""If Professor Oak is selected, your victory condition will require challenging and defeating Oak after becoming"""
"""Champion and defeating or capturing the Pokemon at the end of Cerulean Cave."""
"""If Professor Oak is selected, your victory condition will require challenging and defeating Oak after becoming
Champion and defeating or capturing the Pokemon at the end of Cerulean Cave."""
display_name = "Goal"
option_pokemon_league = 0
option_professor_oak = 1
@@ -59,8 +61,8 @@ class ViridianGymCondition(Range):
class CeruleanCaveCondition(Range):
"""Number of badges, HMs, and key items (not counting items you can lose) required to access Cerulean Cave."""
"""If extra_key_items is turned on, the number chosen will be increased by 4."""
"""Number of badges, HMs, and key items (not counting items you can lose) required to access Cerulean Cave.
If extra_key_items is turned on, the number chosen will be increased by 4."""
display_name = "Cerulean Cave Condition"
range_start = 0
range_end = 25
@@ -97,8 +99,8 @@ class BadgesNeededForHMMoves(Choice):
class OldMan(Choice):
"""With Open Viridian City, the Old Man will let you through without needing to turn in Oak's Parcel."""
"""Early Parcel will ensure Oak's Parcel is available at the beginning of your game."""
"""With Open Viridian City, the Old Man will let you through without needing to turn in Oak's Parcel.
Early Parcel will ensure Oak's Parcel is available at the beginning of your game."""
display_name = "Old Man"
option_vanilla = 0
option_early_parcel = 1
@@ -106,6 +108,15 @@ class OldMan(Choice):
default = 1
class RandomizePokedex(Choice):
"""Randomize the location of the Pokedex, or start with it. It is required to receive items from Oak's Aides."""
display_name = "Randomize Pokedex"
option_vanilla = 0
option_randomize = 1
option_start_with = 2
default = 0
class Tea(Toggle):
"""Adds a Tea item to the item pool which the Saffron guards require instead of the vending machine drinks.
Adds a location check to the Celadon Mansion 1F, where Tea is acquired in FireRed and LeafGreen."""
@@ -144,6 +155,14 @@ class RandomizeHiddenItems(Choice):
default = 0
class TrainerSanity(Toggle):
"""Add a location check to every trainer in the game, which can be obtained by talking to a trainer after defeating
them. Does not affect gym leaders and some scripted event battles (including all Rival, Giovanni, and
Cinnabar Gym battles)."""
display_name = "Trainersanity"
default = 0
class FreeFlyLocation(Toggle):
"""One random fly destination will be unlocked by default."""
display_name = "Free Fly Location"
@@ -180,7 +199,7 @@ class OaksAidRt15(Range):
class ExpModifier(SpecialRange):
"""Modifier for EXP gained. When specifying a number, exp is multiplied by this amount and divided by 16."""
display_name = "Exp Modifier"
range_start = 0
range_start = 1
range_end = 255
default = 16
special_range_names = {
@@ -330,6 +349,13 @@ class StartWithFourMoves(Toggle):
default = 0
class SameTypeAttackBonus(Toggle):
"""Here you can disable Same Type Attack Bonus, so that a move matching a Pokemon's type has no benefit.
If disabled, all moves will gain 25% extra damage, instead of same type moves gaining 50% extra damage."""
display_name = "Same Type Attack Bonus"
default = 1
class TMCompatibility(Choice):
"""Randomize which Pokemon can learn each TM. prefer_types: 90% chance if Pokemon's type matches the move,
50% chance if move is Normal type and the Pokemon is not, and 25% chance otherwise. Pokemon will retain the same
@@ -379,31 +405,54 @@ class SecondaryTypeChance(SpecialRange):
}
class RandomizeTypeChartTypes(Choice):
"""The game's type chart consists of 3 columns: attacking type, defending type, and type effectiveness.
Matchups that have regular type effectiveness are not in the chart. Shuffle will shuffle the attacking types
across the attacking type column and the defending types across the defending type column (so for example Normal
type will still have exactly 2 types that it receives non-regular damage from, and 2 types it deals non-regular
damage to). Randomize will randomize each type in both columns to any random type."""
display_name = "Randomize Type Chart Types"
class RandomizeTypeChart(Choice):
"""Randomize the type chart. If 'randomize' is chosen, the matchup weight options will determine the weights.
If the numbers chosen across the 4 settings add up to exactly 225, they will be the exact numbers of those matchups.
Otherwise, the normal super effective, and not very effective matchup settings will be used as weights.
The immunities option will always be the exact amount of immunity matchups.
If 'chaos' is chosen, the matchup settings will be ignored and every type matchup will be given a random damage
modifier anywhere between 0 to 200% damage, in 10% increments."""
display_name = "Randomize Type Chart"
option_vanilla = 0
option_shuffle = 1
option_randomize = 2
option_randomize = 1
option_chaos = 2
default = 0
class RandomizeTypeChartTypeEffectiveness(Choice):
"""The game's type chart consists of 3 columns: attacking type, defending type, and type effectiveness.
Matchups that have regular type effectiveness are not in the chart. Shuffle will shuffle the type effectiveness
across the type effectiveness column (so for example there will always be 6 type immunities). Randomize will
randomize each entry in the table to no effect, not very effective, or super effective; with no effect occurring
at a low chance. Chaos will randomize the values to anywhere between 0% and 200% damage, in 10% increments."""
display_name = "Randomize Type Chart Type Effectiveness"
option_vanilla = 0
option_shuffle = 1
option_randomize = 2
option_chaos = 3
default = 0
class NormalMatchups(Range):
"""If 'randomize' is chosen for randomize_type_chart, this will be the weight for neutral matchups.
No effect if 'chaos' is chosen"""
display_name = "Normal Matchups"
default = 143
range_start = 0
range_end = 225
class SuperEffectiveMatchups(Range):
"""If 'randomize' is chosen for randomize_type_chart, this will be the weight for super effective matchups.
No effect if 'chaos' is chosen"""
display_name = "Super Effective Matchups"
default = 38
range_start = 0
range_end = 225
class NotVeryEffectiveMatchups(Range):
"""If 'randomize' is chosen for randomize_type_chart, this will be the weight for not very effective matchups.
No effect if 'chaos' is chosen"""
display_name = "Not Very Effective Matchups"
default = 38
range_start = 0
range_end = 225
class ImmunityMatchups(Range):
"""If 'randomize' is chosen for randomize_type_chart, this will be the exact number of immunities.
No effect if 'chaos' is chosen"""
display_name = "Immunity Matchups"
default = 6
range_start = 0
range_end = 100
class SafariZoneNormalBattles(Toggle):
@@ -425,6 +474,23 @@ class ReusableTMs(Toggle):
default = 0
class BetterShops(Choice):
"""Change every town's Pokemart to contain all normal Pokemart items. Additionally, you can add the Master Ball
to these shops."""
display_name = "Better Shops"
option_off = 0
option_on = 1
option_add_master_ball = 2
default = 0
class MasterBallPrice(Range):
"""Price for Master Balls. Can only be bought if better_shops is set to add_master_ball, but this will affect the
sell price regardless. Vanilla is 0"""
range_end = 999999
default = 5000
class StartingMoney(Range):
"""The amount of money you start with."""
display_name = "Starting Money"
@@ -433,6 +499,21 @@ class StartingMoney(Range):
range_end = 999999
class LoseMoneyOnBlackout(Toggle):
"""Lose half your money when blacking out, as in vanilla."""
display_name = "Lose Money on Blackout"
default = 1
class TrapPercentage(Range):
"""Chance for each filler item to be replaced with trap items: Poison Trap, Paralyze Trap, Ice Trap, and
Fire Trap. These traps apply the status to your entire party! Keep in mind that trainersanity vastly increases the
number of filler items. Make sure to stock up on Ice Heals!"""
display_name = "Trap Percentage"
range_end = 100
default = 0
pokemon_rb_options = {
"game_version": GameVersion,
"trainer_name": TrainerName,
@@ -445,11 +526,13 @@ pokemon_rb_options = {
"second_fossil_check_condition": SecondFossilCheckCondition,
"badgesanity": BadgeSanity,
"old_man": OldMan,
"randomize_pokedex": RandomizePokedex,
"tea": Tea,
"extra_key_items": ExtraKeyItems,
"extra_strength_boulders": ExtraStrengthBoulders,
"require_item_finder": RequireItemFinder,
"randomize_hidden_items": RandomizeHiddenItems,
"trainersanity": TrainerSanity,
"badges_needed_for_hm_moves": BadgesNeededForHMMoves,
"free_fly_location": FreeFlyLocation,
"oaks_aide_rt_2": OaksAidRt2,
@@ -470,14 +553,23 @@ pokemon_rb_options = {
"trainer_legendaries": TrainerLegendaries,
"randomize_pokemon_movesets": RandomizePokemonMovesets,
"start_with_four_moves": StartWithFourMoves,
"same_type_attack_bonus": SameTypeAttackBonus,
"tm_compatibility": TMCompatibility,
"hm_compatibility": HMCompatibility,
"randomize_pokemon_types": RandomizePokemonTypes,
"secondary_type_chance": SecondaryTypeChance,
"randomize_type_matchup_types": RandomizeTypeChartTypes,
"randomize_type_matchup_type_effectiveness": RandomizeTypeChartTypeEffectiveness,
"randomize_type_chart": RandomizeTypeChart,
"normal_matchups": NormalMatchups,
"super_effective_matchups": SuperEffectiveMatchups,
"not_very_effective_matchups": NotVeryEffectiveMatchups,
"immunity_matchups": ImmunityMatchups,
"safari_zone_normal_battles": SafariZoneNormalBattles,
"normalize_encounter_chances": NormalizeEncounterChances,
"reusable_tms": ReusableTMs,
"better_shops": BetterShops,
"master_ball_price": MasterBallPrice,
"starting_money": StartingMoney,
"lose_money_on_blackout": LoseMoneyOnBlackout,
"trap_percentage": TrapPercentage,
"death_link": DeathLink
}