Skip to content

Commit 061f8c6

Browse files
Daivukqwint
authored andcommitted
Heretic: Update to use new Options + logic fixes + Doc fix (ArchipelagoMW#3139)
1 parent 473f55a commit 061f8c6

File tree

6 files changed

+289
-276
lines changed

6 files changed

+289
-276
lines changed

worlds/heretic/Locations.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ class LocationDict(TypedDict, total=False):
12661266
'map': 3,
12671267
'index': 10,
12681268
'doom_type': 79,
1269-
'region': "The River of Fire (E2M3) Main"},
1269+
'region': "The River of Fire (E2M3) Green"},
12701270
371179: {'name': 'The River of Fire (E2M3) - Green key',
12711271
'episode': 2,
12721272
'check_sanity': False,
@@ -1301,7 +1301,7 @@ class LocationDict(TypedDict, total=False):
13011301
'map': 3,
13021302
'index': 122,
13031303
'doom_type': 2003,
1304-
'region': "The River of Fire (E2M3) Main"},
1304+
'region': "The River of Fire (E2M3) Green"},
13051305
371184: {'name': 'The River of Fire (E2M3) - Hellstaff',
13061306
'episode': 2,
13071307
'check_sanity': False,
@@ -1364,7 +1364,7 @@ class LocationDict(TypedDict, total=False):
13641364
'map': 3,
13651365
'index': 299,
13661366
'doom_type': 32,
1367-
'region': "The River of Fire (E2M3) Main"},
1367+
'region': "The River of Fire (E2M3) Green"},
13681368
371193: {'name': 'The River of Fire (E2M3) - Morph Ovum',
13691369
'episode': 2,
13701370
'check_sanity': False,
@@ -1385,7 +1385,7 @@ class LocationDict(TypedDict, total=False):
13851385
'map': 3,
13861386
'index': 413,
13871387
'doom_type': 2002,
1388-
'region': "The River of Fire (E2M3) Main"},
1388+
'region': "The River of Fire (E2M3) Green"},
13891389
371196: {'name': 'The River of Fire (E2M3) - Firemace 2',
13901390
'episode': 2,
13911391
'check_sanity': True,
@@ -2610,7 +2610,7 @@ class LocationDict(TypedDict, total=False):
26102610
'map': 2,
26112611
'index': 172,
26122612
'doom_type': 33,
2613-
'region': "The Cesspool (E3M2) Main"},
2613+
'region': "The Cesspool (E3M2) Yellow"},
26142614
371371: {'name': 'The Cesspool (E3M2) - Bag of Holding 2',
26152615
'episode': 3,
26162616
'check_sanity': False,
@@ -4360,7 +4360,7 @@ class LocationDict(TypedDict, total=False):
43604360
'map': 3,
43614361
'index': 297,
43624362
'doom_type': 2002,
4363-
'region': "Ambulatory (E4M3) Green"},
4363+
'region': "Ambulatory (E4M3) Green Lock"},
43644364
371621: {'name': 'Ambulatory (E4M3) - Firemace 2',
43654365
'episode': 4,
43664366
'check_sanity': False,
@@ -6040,7 +6040,7 @@ class LocationDict(TypedDict, total=False):
60406040
'map': 3,
60416041
'index': 234,
60426042
'doom_type': 85,
6043-
'region': "Quay (E5M3) Blue"},
6043+
'region': "Quay (E5M3) Cyan"},
60446044
371861: {'name': 'Quay (E5M3) - Map Scroll',
60456045
'episode': 5,
60466046
'check_sanity': True,
@@ -6075,7 +6075,7 @@ class LocationDict(TypedDict, total=False):
60756075
'map': 3,
60766076
'index': 239,
60776077
'doom_type': 86,
6078-
'region': "Quay (E5M3) Blue"},
6078+
'region': "Quay (E5M3) Cyan"},
60796079
371866: {'name': 'Quay (E5M3) - Torch',
60806080
'episode': 5,
60816081
'check_sanity': False,
@@ -6089,7 +6089,7 @@ class LocationDict(TypedDict, total=False):
60896089
'map': 3,
60906090
'index': 242,
60916091
'doom_type': 2002,
6092-
'region': "Quay (E5M3) Blue"},
6092+
'region': "Quay (E5M3) Cyan"},
60936093
371868: {'name': 'Quay (E5M3) - Firemace 2',
60946094
'episode': 5,
60956095
'check_sanity': False,
@@ -6124,7 +6124,7 @@ class LocationDict(TypedDict, total=False):
61246124
'map': 3,
61256125
'index': 247,
61266126
'doom_type': 2002,
6127-
'region': "Quay (E5M3) Blue"},
6127+
'region': "Quay (E5M3) Cyan"},
61286128
371873: {'name': 'Quay (E5M3) - Bag of Holding 2',
61296129
'episode': 5,
61306130
'check_sanity': True,
@@ -6138,7 +6138,7 @@ class LocationDict(TypedDict, total=False):
61386138
'map': 3,
61396139
'index': -1,
61406140
'doom_type': -1,
6141-
'region': "Quay (E5M3) Blue"},
6141+
'region': "Quay (E5M3) Cyan"},
61426142
371875: {'name': 'Courtyard (E5M4) - Blue key',
61436143
'episode': 5,
61446144
'check_sanity': False,

worlds/heretic/Options.py

+21-22
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import typing
2-
3-
from Options import AssembleOptions, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool
1+
from Options import PerGameCommonOptions, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool
2+
from dataclasses import dataclass
43

54

65
class Goal(Choice):
@@ -146,22 +145,22 @@ class Episode5(Toggle):
146145
display_name = "Episode 5"
147146

148147

149-
options: typing.Dict[str, AssembleOptions] = {
150-
"start_inventory_from_pool": StartInventoryPool,
151-
"goal": Goal,
152-
"difficulty": Difficulty,
153-
"random_monsters": RandomMonsters,
154-
"random_pickups": RandomPickups,
155-
"random_music": RandomMusic,
156-
"allow_death_logic": AllowDeathLogic,
157-
"pro": Pro,
158-
"check_sanity": CheckSanity,
159-
"start_with_map_scrolls": StartWithMapScrolls,
160-
"reset_level_on_death": ResetLevelOnDeath,
161-
"death_link": DeathLink,
162-
"episode1": Episode1,
163-
"episode2": Episode2,
164-
"episode3": Episode3,
165-
"episode4": Episode4,
166-
"episode5": Episode5
167-
}
148+
@dataclass
149+
class HereticOptions(PerGameCommonOptions):
150+
start_inventory_from_pool: StartInventoryPool
151+
goal: Goal
152+
difficulty: Difficulty
153+
random_monsters: RandomMonsters
154+
random_pickups: RandomPickups
155+
random_music: RandomMusic
156+
allow_death_logic: AllowDeathLogic
157+
pro: Pro
158+
check_sanity: CheckSanity
159+
start_with_map_scrolls: StartWithMapScrolls
160+
reset_level_on_death: ResetLevelOnDeath
161+
death_link: DeathLink
162+
episode1: Episode1
163+
episode2: Episode2
164+
episode3: Episode3
165+
episode4: Episode4
166+
episode5: Episode5

worlds/heretic/Regions.py

+14-5
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,8 @@ class RegionDict(TypedDict, total=False):
604604
"connections":[
605605
{"target":"Ambulatory (E4M3) Blue","pro":False},
606606
{"target":"Ambulatory (E4M3) Yellow","pro":False},
607-
{"target":"Ambulatory (E4M3) Green","pro":False}]},
607+
{"target":"Ambulatory (E4M3) Green","pro":False},
608+
{"target":"Ambulatory (E4M3) Green Lock","pro":False}]},
608609
{"name":"Ambulatory (E4M3) Blue",
609610
"connects_to_hub":False,
610611
"episode":4,
@@ -619,6 +620,12 @@ class RegionDict(TypedDict, total=False):
619620
"connects_to_hub":False,
620621
"episode":4,
621622
"connections":[{"target":"Ambulatory (E4M3) Main","pro":False}]},
623+
{"name":"Ambulatory (E4M3) Green Lock",
624+
"connects_to_hub":False,
625+
"episode":4,
626+
"connections":[
627+
{"target":"Ambulatory (E4M3) Green","pro":False},
628+
{"target":"Ambulatory (E4M3) Main","pro":False}]},
622629

623630
# Sepulcher (E4M4)
624631
{"name":"Sepulcher (E4M4) Main",
@@ -767,9 +774,7 @@ class RegionDict(TypedDict, total=False):
767774
{"name":"Quay (E5M3) Blue",
768775
"connects_to_hub":False,
769776
"episode":5,
770-
"connections":[
771-
{"target":"Quay (E5M3) Green","pro":False},
772-
{"target":"Quay (E5M3) Main","pro":False}]},
777+
"connections":[{"target":"Quay (E5M3) Main","pro":False}]},
773778
{"name":"Quay (E5M3) Yellow",
774779
"connects_to_hub":False,
775780
"episode":5,
@@ -779,7 +784,11 @@ class RegionDict(TypedDict, total=False):
779784
"episode":5,
780785
"connections":[
781786
{"target":"Quay (E5M3) Main","pro":False},
782-
{"target":"Quay (E5M3) Blue","pro":False}]},
787+
{"target":"Quay (E5M3) Cyan","pro":False}]},
788+
{"name":"Quay (E5M3) Cyan",
789+
"connects_to_hub":False,
790+
"episode":5,
791+
"connections":[{"target":"Quay (E5M3) Main","pro":False}]},
783792

784793
# Courtyard (E5M4)
785794
{"name":"Courtyard (E5M4) Main",

0 commit comments

Comments
 (0)