Skip to content

Commit

Permalink
BRCF: Small Fixes (#3314)
Browse files Browse the repository at this point in the history
* Plural fix

* Update link
  • Loading branch information
Exempt-Medic authored May 17, 2024
1 parent 539ee1c commit b4b79bc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 27 deletions.
2 changes: 1 addition & 1 deletion worlds/bomb_rush_cyberfunk/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class LocationDict(TypedDict):

class EventDict(TypedDict):
name: str
stage: Stages
stage: str
item: str


Expand Down
2 changes: 1 addition & 1 deletion worlds/bomb_rush_cyberfunk/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ class BombRushCyberfunkOptions(PerGameCommonOptions):
dont_save_photos: DontSavePhotos
score_difficulty: ScoreDifficulty
damage_multiplier: DamageMultiplier
death_link: BRCDeathLink
death_link: BRCDeathLink
5 changes: 3 additions & 2 deletions worlds/bomb_rush_cyberfunk/Regions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Dict, List
from typing import Dict


class Stages:
Misc = "Misc"
Expand Down Expand Up @@ -99,4 +100,4 @@ class Stages:
Stages.MA4: [Stages.MA3,
Stages.MA5],
Stages.MA5: [Stages.MA1]
}
}
14 changes: 5 additions & 9 deletions worlds/bomb_rush_cyberfunk/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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))


13 changes: 1 addition & 12 deletions worlds/bomb_rush_cyberfunk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand All @@ -49,14 +48,12 @@ def __init__(self, multiworld: MultiWorld, player: int):
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)
Expand All @@ -65,30 +62,25 @@ def remove(self, state: "CollectionState", item: "Item") -> bool:
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():
classification = self.item_classification[item_type]

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]
classification = self.get_item_classification(item_type)

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)
Expand All @@ -98,7 +90,6 @@ def get_filler_item_name(self) -> str:

return item["name"]


def generate_early(self):
if self.options.starting_movestyle == StartStyle.option_skateboard:
self.item_classification[BRCType.Skateboard] = ItemClassification.filler
Expand All @@ -115,7 +106,6 @@ def generate_early(self):
else:
self.item_classification[BRCType.BMX] = ItemClassification.progression


def create_items(self):
rep_locations: int = 87
if self.options.skip_polo_photos:
Expand Down Expand Up @@ -151,7 +141,6 @@ def create_items(self):

self.multiworld.itempool += pool


def create_regions(self):
multiworld = self.multiworld
player = self.player
Expand Down Expand Up @@ -211,4 +200,4 @@ class BombRushCyberfunkItem(Item):


class BombRushCyberfunkLocation(Location):
game: str = "Bomb Rush Cyberfunk"
game: str = "Bomb Rush Cyberfunk"
2 changes: 1 addition & 1 deletion worlds/bomb_rush_cyberfunk/docs/en_Bomb Rush Cyberfunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion worlds/bomb_rush_cyberfunk/docs/setup_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4b79bc

Please sign in to comment.