Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bomb Rush Cyberfunk: Implement new game #2925

Merged
merged 29 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
55cd62e
Bomb Rush Cyberfunk world
TRPG0 Mar 10, 2024
6f28168
Merge branch 'ArchipelagoMW:main' into brc
TRPG0 Mar 10, 2024
13affba
Fix test failures
TRPG0 Mar 10, 2024
3bae847
Double check graffiti spot counts
TRPG0 Mar 10, 2024
765452c
Double check graffiti spot counts (but do it right this time)
TRPG0 Mar 10, 2024
aad0fb7
Add missing option display name
TRPG0 Mar 10, 2024
ab79c28
Add data version
TRPG0 Mar 10, 2024
a7f821c
Change "Skip Polo Photos" option
TRPG0 Mar 11, 2024
27f4480
Remove data version, don't assign to "world", fix sets
TRPG0 Mar 11, 2024
6ae72a1
Remove accidental extra graffiti
TRPG0 Mar 11, 2024
d886dad
Update option descriptions
TRPG0 Mar 13, 2024
bd2e36d
Fix event stages, random object, wrong REP counts
TRPG0 Mar 13, 2024
d251e71
Fix wrong S graffiti count
TRPG0 Mar 14, 2024
13db163
Adjusting graffiti numbers
TRPG0 Mar 14, 2024
454d0ec
Merge branch 'ArchipelagoMW:main' into brc
TRPG0 Mar 21, 2024
23b86c7
Add to codeowners, readme
TRPG0 Mar 21, 2024
89ef3e0
"settings" -> "options"
TRPG0 Mar 23, 2024
8d61c55
Merge branch 'main' into brc
TRPG0 Mar 23, 2024
7182576
Optimize rules, fix glitched logic mistakes
TRPG0 Apr 14, 2024
98cdf3a
Rework regions
TRPG0 Apr 15, 2024
2980c52
Review changes
TRPG0 Apr 16, 2024
a51591f
Add missing option to test
TRPG0 Apr 16, 2024
b2b2c01
Fix glitched logic L numbers
TRPG0 Apr 16, 2024
f370c74
Typo
TRPG0 Apr 24, 2024
b7a8486
Fix graffiti spots loop
TRPG0 Apr 30, 2024
35deea5
Update option description
TRPG0 May 3, 2024
b843419
Fix Rietveld
TRPG0 May 5, 2024
d5d096f
Merge branch 'main' into brc
TRPG0 May 8, 2024
5fb3887
Use new count exclusive methods
TRPG0 May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
552 changes: 552 additions & 0 deletions worlds/bomb_rush_cyberfunk/Items.py

Large diffs are not rendered by default.

785 changes: 785 additions & 0 deletions worlds/bomb_rush_cyberfunk/Locations.py

Large diffs are not rendered by default.

161 changes: 161 additions & 0 deletions worlds/bomb_rush_cyberfunk/Options.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
from dataclasses import dataclass
from Options import Choice, Toggle, DefaultOnToggle, Range, DeathLink, PerGameCommonOptions
import typing

if typing.TYPE_CHECKING:
from random import Random
else:
Random = typing.Any


class Logic(Choice):
"""Choose the logic used by the randomizer."""
TRPG0 marked this conversation as resolved.
Show resolved Hide resolved
display_name = "Logic"
option_glitchless = 0
option_glitched = 1
default = 0


class SkipIntro(DefaultOnToggle):
"""Skips escaping the police station.
Graffiti spots tagged during the intro will not unlock items."""
display_name = "Skip Intro"


class SkipDreams(Toggle):
"""Skips the dream sequences at the end of each chapter."""
display_name = "Skip Dreams"


class SkipHands(Toggle):
"""Skips spraying the lion statue hands after the dream in Chapter 5."""
display_name = "Skip Statue Hands"


class TotalRep(Range):
"""Change the total amount of REP in your world.
At least 960 REP is needed to finish the game.
Will be rounded to the nearest number divisible by 8."""
display_name = "Total REP"
range_start = 1000
range_end = 2000
default = 1400

def round_to_nearest_step(self):
rem: int = self.value % 8
if rem >= 5:
self.value = self.value - rem + 8
else:
self.value = self.value - rem

def get_rep_item_counts(self, random_source: Random, location_count: int) -> typing.List[int]:
def increment_item(item: int) -> int:
if item == 32:
item = 48
else:
item += 8
return item

items = [8]*location_count
while sum(items) < self.value:
index = random_source.randint(0, location_count-1)
while items[index] >= 48:
index = random_source.randint(0, location_count-1)
items[index] = increment_item(items[index])

while sum(items) > self.value:
index = random_source.randint(0, location_count-1)
if not (items[index] == 16 or items[index] == 24 or items[index] == 32):
index = random_source.randint(0, location_count-1)
items[index] -= 8

return [items.count(8), items.count(16), items.count(24), items.count(32), items.count(48)]
TRPG0 marked this conversation as resolved.
Show resolved Hide resolved


class EndingREP(Toggle):
"""Changes the final boss to require 1000 REP to start."""
TRPG0 marked this conversation as resolved.
Show resolved Hide resolved
display_name = "Extra REP Required"


class StartStyle(Choice):
"""Choose which movestyle to start with."""
display_name = "Starting Movestyle"
option_skateboard = 2
option_inline_skates = 3
option_bmx = 1
default = 2


class LimitedGraffiti(Toggle):
"""Each graffiti design can only be used a limited number of times before being removed from your inventory.
In some cases, such as completing a dream, using graffiti to defeat enemies, or spraying over your own graffiti,
uses will not be counted.
If enabled, doing graffiti is disabled during crew battles, to prevent softlocking."""
display_name = "Limited Graffiti"


class SGraffiti(Choice):
"""Choose if small graffiti should be separate, meaning that you will need to switch characters every time you run
out, or combined, meaning that unlocking new characters will add 5 uses that any character can use.
Has no effect if Limited Graffiti is disabled."""
display_name = "Small Graffiti Uses"
option_separate = 0
option_combined = 1
default = 0


class JunkPhotos(Toggle):
"""Skip taking pictures of Polo for items."""
display_name = "Skip Polo Photos"


class DontSavePhotos(Toggle):
"""Photos taken with the Camera app will not be saved.
This can be changed later in the options menu inside the Archipelago phone app."""
display_name = "Don't Save Photos"


class ScoreDifficulty(Choice):
"""Alters the score required to win score challenges and crew battles.
This can be changed later in the options menu inside the Archipelago phone app."""
display_name = "Score Difficulty"
option_normal = 0
option_medium = 1
option_hard = 2
option_very_hard = 3
option_extreme = 4
default = 0


class DamageMultiplier(Range):
"""Multiplies all damage received.
At 3x, most damage will OHKO the player, including falling into pits.
At 6x, all damage will OHKO the player.
This can be changed later in the options menu inside the Archipelago phone app."""
display_name = "Damage Multiplier"
range_start = 1
range_end = 6
default = 1


class BRCDeathLink(DeathLink):
"""When you die, everyone dies. The reverse is also true.
This can be changed later in the options menu inside the Archipelago phone app."""


@dataclass
class BombRushCyberfunkOptions(PerGameCommonOptions):
logic: Logic
skip_intro: SkipIntro
skip_dreams: SkipDreams
skip_statue_hands: SkipHands
total_rep: TotalRep
extra_rep_required: EndingREP
starting_movestyle: StartStyle
limited_graffiti: LimitedGraffiti
small_graffiti_uses: SGraffiti
skip_polo_photos: JunkPhotos
dont_save_photos: DontSavePhotos
score_difficulty: ScoreDifficulty
damage_multiplier: DamageMultiplier
death_link: BRCDeathLink
45 changes: 45 additions & 0 deletions worlds/bomb_rush_cyberfunk/Regions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from enum import Enum
from typing import Dict, List


class BRCStage(Enum):
Misc = 0
Hideout = 1
VersumHill = 2
MillenniumSquare = 3
BrinkTerminal = 4
MillenniumMall = 5
PyramidIsland = 6
Mataan = 7


region_names: Dict[BRCStage, str] = {
BRCStage.Misc: "Misc",
BRCStage.Hideout: "Hideout",
BRCStage.VersumHill: "Versum Hill",
BRCStage.MillenniumSquare: "Millennium Square",
BRCStage.BrinkTerminal: "Brink Terminal",
BRCStage.MillenniumMall: "Millennium Mall",
BRCStage.PyramidIsland: "Pyramid Island",
BRCStage.Mataan: "Mataan"
}

region_exits: Dict[BRCStage, List[BRCStage]] = {
BRCStage.Misc: [BRCStage.Hideout],
BRCStage.Hideout: [BRCStage.Misc,
BRCStage.VersumHill,
BRCStage.MillenniumSquare,
BRCStage.Mataan],
BRCStage.VersumHill: [BRCStage.Hideout,
BRCStage.MillenniumSquare],
BRCStage.MillenniumSquare: [BRCStage.VersumHill,
BRCStage.BrinkTerminal,
BRCStage.MillenniumMall,
BRCStage.PyramidIsland,
BRCStage.Mataan],
BRCStage.BrinkTerminal: [BRCStage.MillenniumSquare],
BRCStage.MillenniumMall: [BRCStage.MillenniumSquare],
BRCStage.PyramidIsland: [BRCStage.MillenniumSquare],
BRCStage.Mataan: [BRCStage.MillenniumSquare,
BRCStage.Hideout]
}
Loading
Loading