From b4b79bcd7889d189b6959efe1cb8fcd1f6795016 Mon Sep 17 00:00:00 2001 From: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Date: Fri, 17 May 2024 13:24:32 -0400 Subject: [PATCH] BRCF: Small Fixes (#3314) * Plural fix * Update link --- worlds/bomb_rush_cyberfunk/Locations.py | 2 +- worlds/bomb_rush_cyberfunk/Options.py | 2 +- worlds/bomb_rush_cyberfunk/Regions.py | 5 +++-- worlds/bomb_rush_cyberfunk/Rules.py | 14 +++++--------- worlds/bomb_rush_cyberfunk/__init__.py | 13 +------------ .../docs/en_Bomb Rush Cyberfunk.md | 2 +- worlds/bomb_rush_cyberfunk/docs/setup_en.md | 2 +- 7 files changed, 13 insertions(+), 27 deletions(-) diff --git a/worlds/bomb_rush_cyberfunk/Locations.py b/worlds/bomb_rush_cyberfunk/Locations.py index 57d91321..863e2ad0 100644 --- a/worlds/bomb_rush_cyberfunk/Locations.py +++ b/worlds/bomb_rush_cyberfunk/Locations.py @@ -10,7 +10,7 @@ class LocationDict(TypedDict): class EventDict(TypedDict): name: str - stage: Stages + stage: str item: str diff --git a/worlds/bomb_rush_cyberfunk/Options.py b/worlds/bomb_rush_cyberfunk/Options.py index 46df0014..87fc2ca9 100644 --- a/worlds/bomb_rush_cyberfunk/Options.py +++ b/worlds/bomb_rush_cyberfunk/Options.py @@ -159,4 +159,4 @@ class BombRushCyberfunkOptions(PerGameCommonOptions): dont_save_photos: DontSavePhotos score_difficulty: ScoreDifficulty damage_multiplier: DamageMultiplier - death_link: BRCDeathLink \ No newline at end of file + death_link: BRCDeathLink diff --git a/worlds/bomb_rush_cyberfunk/Regions.py b/worlds/bomb_rush_cyberfunk/Regions.py index 652c1e5b..206ae4ea 100644 --- a/worlds/bomb_rush_cyberfunk/Regions.py +++ b/worlds/bomb_rush_cyberfunk/Regions.py @@ -1,4 +1,5 @@ -from typing import Dict, List +from typing import Dict + class Stages: Misc = "Misc" @@ -99,4 +100,4 @@ region_exits: Dict[str, str] = { Stages.MA4: [Stages.MA3, Stages.MA5], Stages.MA5: [Stages.MA1] -} \ No newline at end of file +} diff --git a/worlds/bomb_rush_cyberfunk/Rules.py b/worlds/bomb_rush_cyberfunk/Rules.py index d9bf416a..6f31882c 100644 --- a/worlds/bomb_rush_cyberfunk/Rules.py +++ b/worlds/bomb_rush_cyberfunk/Rules.py @@ -158,7 +158,7 @@ def brink_terminal_plaza(state: CollectionState, player: int) -> bool: def brink_terminal_tower(state: CollectionState, player: int) -> bool: - return rep(state, player, 280) + return rep(state, player, 280) def brink_terminal_oldhead_underground(state: CollectionState, player: int) -> bool: @@ -246,8 +246,8 @@ def millennium_mall_challenge4(state: CollectionState, player: int) -> bool: return rep(state, player, 458) -def millennium_mall_all_challenges(state: CollectionState, player: int, limit: bool, glitched: bool) -> bool: - return millennium_mall_challenge4(state, player, limit, glitched) +def millennium_mall_all_challenges(state: CollectionState, player: int) -> bool: + return millennium_mall_challenge4(state, player) def millennium_mall_theater(state: CollectionState, player: int, limit: bool) -> bool: @@ -769,7 +769,7 @@ def build_access_cache(state: CollectionState, player: int, movestyle: int, limi func = globals()[fname] access: bool = func(*fvars) access_cache[fname] = access - if not access and not "oldhead" in fname: + if not access and "oldhead" not in fname: stop = True return access_cache @@ -877,7 +877,6 @@ def rules(brcworld): for e in multiworld.get_region(Stages.MA5, player).entrances: set_rule(e, lambda state: mataan_deepest(state, player, limit, glitched)) - # locations # hideout set_rule(multiworld.get_location("Hideout: BMX garage skateboard", player), @@ -1029,15 +1028,12 @@ def rules(brcworld): add_rule(multiworld.get_location("Defeat Faux", player), lambda state: rep(state, player, 1000)) - # graffiti spots spots: int = 0 while spots < 385: spots += 5 set_rule(multiworld.get_location(f"Tagged {spots} Graffiti Spots", player), - lambda state, spots=spots: graffiti_spots(state, player, movestyle, limit, glitched, spots)) + lambda state, spot_count=spots: graffiti_spots(state, player, movestyle, limit, glitched, spot_count)) set_rule(multiworld.get_location("Tagged 389 Graffiti Spots", player), lambda state: graffiti_spots(state, player, movestyle, limit, glitched, 389)) - - \ No newline at end of file diff --git a/worlds/bomb_rush_cyberfunk/__init__.py b/worlds/bomb_rush_cyberfunk/__init__.py index a6572ea2..2d078ae3 100644 --- a/worlds/bomb_rush_cyberfunk/__init__.py +++ b/worlds/bomb_rush_cyberfunk/__init__.py @@ -35,7 +35,6 @@ class BombRushCyberfunkWorld(World): options_dataclass = BombRushCyberfunkOptions options: BombRushCyberfunkOptions - def __init__(self, multiworld: MultiWorld, player: int): super(BombRushCyberfunkWorld, self).__init__(multiworld, player) self.item_classification: Dict[BRCType, ItemClassification] = { @@ -49,14 +48,12 @@ class BombRushCyberfunkWorld(World): BRCType.Camera: ItemClassification.progression } - def collect(self, state: "CollectionState", item: "Item") -> bool: change = super().collect(state, item) if change and "REP" in item.name: rep: int = int(item.name[0:len(item.name)-4]) state.prog_items[item.player]["rep"] += rep return change - def remove(self, state: "CollectionState", item: "Item") -> bool: change = super().remove(state, item) @@ -65,11 +62,9 @@ class BombRushCyberfunkWorld(World): state.prog_items[item.player]["rep"] -= rep return change - def set_rules(self): rules(self) - def get_item_classification(self, item_type: BRCType) -> ItemClassification: classification = ItemClassification.filler if item_type in self.item_classification.keys(): @@ -77,7 +72,6 @@ class BombRushCyberfunkWorld(World): return classification - def create_item(self, name: str) -> "BombRushCyberfunkItem": item_id: int = self.item_name_to_id[name] item_type: BRCType = self.item_name_to_type[name] @@ -85,10 +79,8 @@ class BombRushCyberfunkWorld(World): return BombRushCyberfunkItem(name, classification, item_id, self.player) - def create_event(self, event: str) -> "BombRushCyberfunkItem": return BombRushCyberfunkItem(event, ItemClassification.progression_skip_balancing, None, self.player) - def get_filler_item_name(self) -> str: item = self.random.choice(item_table) @@ -98,7 +90,6 @@ class BombRushCyberfunkWorld(World): return item["name"] - def generate_early(self): if self.options.starting_movestyle == StartStyle.option_skateboard: self.item_classification[BRCType.Skateboard] = ItemClassification.filler @@ -115,7 +106,6 @@ class BombRushCyberfunkWorld(World): else: self.item_classification[BRCType.BMX] = ItemClassification.progression - def create_items(self): rep_locations: int = 87 if self.options.skip_polo_photos: @@ -151,7 +141,6 @@ class BombRushCyberfunkWorld(World): self.multiworld.itempool += pool - def create_regions(self): multiworld = self.multiworld player = self.player @@ -211,4 +200,4 @@ class BombRushCyberfunkItem(Item): class BombRushCyberfunkLocation(Location): - game: str = "Bomb Rush Cyberfunk" \ No newline at end of file + game: str = "Bomb Rush Cyberfunk" diff --git a/worlds/bomb_rush_cyberfunk/docs/en_Bomb Rush Cyberfunk.md b/worlds/bomb_rush_cyberfunk/docs/en_Bomb Rush Cyberfunk.md index b77e183f..c6866e48 100644 --- a/worlds/bomb_rush_cyberfunk/docs/en_Bomb Rush Cyberfunk.md +++ b/worlds/bomb_rush_cyberfunk/docs/en_Bomb Rush Cyberfunk.md @@ -12,7 +12,7 @@ longer earned from doing graffiti, and is instead earned by finding it randomly Items can be found by picking up any type of collectible, unlocking characters, taking pictures of Polo, and for every 5 graffiti spots tagged. The types of items that can be found are Music, Graffiti (M), Graffiti (L), Graffiti (XL), -Skateboards, Inline Skates, BMX, Outifts, Characters, REP, and the Camera. +Skateboards, Inline Skates, BMX, Outfits, Characters, REP, and the Camera. Several changes have been made to the game for a better experience as a randomizer: diff --git a/worlds/bomb_rush_cyberfunk/docs/setup_en.md b/worlds/bomb_rush_cyberfunk/docs/setup_en.md index 0db0b292..14da25ad 100644 --- a/worlds/bomb_rush_cyberfunk/docs/setup_en.md +++ b/worlds/bomb_rush_cyberfunk/docs/setup_en.md @@ -3,7 +3,7 @@ ## Quick Links - Bomb Rush Cyberfunk: [Steam](https://store.steampowered.com/app/1353230/Bomb_Rush_Cyberfunk/) -- Archipelago Mod: [Thunderstore](https://thunderstore.io/c/bomb-rush-cyberfunk/p/TRPG/Archipelago/), +- Archipelago Mod: [Thunderstore](https://thunderstore.io/c/bomb-rush-cyberfunk/p/TRPG/BRC_Archipelago/), [GitHub](https://github.com/TRPG0/BRC-Archipelago/releases) ## Setup