3
3
from .Regions import regionMap
4
4
from ..AutoWorld import LogicMixin
5
5
6
- # TODOs
7
- # - Maybe put large island unlockables behind Receiver
8
- # -- This will make getting them more consistent
9
- # - Blueprint fuel pipe on Balboa didn't trigger Archipelago sendable ("Error finding ID for location Blueprint_Pipe_Fuel")
10
- # -- Same with Blueprint_Fueltank
11
- # -- All blueprints :(
12
- # - Blueprint_Firework from doll after explosive barrel on Caravan Island doesn't disappear when picked up
13
-
14
6
class RaftLogic (LogicMixin ):
7
+ def paddleboard_mode_enabled (self , player ):
8
+ return self .world .paddleboard_mode [player ].value
9
+
10
+ def big_islands_available (self , player ):
11
+ return self .world .big_island_early_crafting [player ].value or self .can_access_radio_tower (player )
12
+
15
13
def can_smelt_items (self , player ):
16
14
return self .has ("Smelter" , player )
17
15
@@ -81,8 +79,6 @@ def can_drive(self, player): # The player can go wherever they want with the eng
81
79
return self .can_craft_engine (player ) and self .can_craft_steeringWheel (player )
82
80
83
81
def can_access_radio_tower (self , player ):
84
- # Technically the player doesn't need things like the sail to reach the Radio Tower,
85
- # but paddling there is not very efficient or engaging gameplay.
86
82
return self .can_navigate (player )
87
83
88
84
def can_complete_radio_tower (self , player ):
@@ -95,25 +91,26 @@ def can_complete_vasagatan(self, player):
95
91
return self .can_access_vasagatan (player )
96
92
97
93
def can_access_balboa_island (self , player ):
98
- return self .can_complete_vasagatan (player ) and self .can_drive (player ) and self .has ("Balboa Island Frequency" , player )
94
+ return (self .can_complete_vasagatan (player )
95
+ and (self .can_drive (player ) or self .paddleboard_mode_enabled (player ))
96
+ and self .has ("Balboa Island Frequency" , player ))
99
97
100
98
def can_complete_balboa_island (self , player ):
101
99
return self .can_access_balboa_island (player ) and self .can_craft_machete (player ) and self .can_fire_bow (player )
102
100
103
101
def can_access_caravan_island (self , player ):
104
- return self .can_complete_balboa_island (player ) and self .can_drive (player ) # Coordinates are given from Relay Station quest
102
+ return self .can_complete_balboa_island (player ) and ( self .can_drive (player ) or self . paddleboard_mode_enabled ( player )) and self . has ( "Caravan Island Frequency" , player )
105
103
106
104
def can_complete_caravan_island (self , player ):
107
105
return self .can_access_caravan_island (player ) and self .can_craft_ziplineTool (player )
108
106
109
107
def can_access_tangaroa (self , player ):
110
- return self .can_complete_caravan_island (player ) and self .can_drive (player ) and self .has ("Tangaroa Frequency" , player )
108
+ return self .can_complete_caravan_island (player ) and ( self .can_drive (player ) or self . paddleboard_mode_enabled ( player ) ) and self .has ("Tangaroa Frequency" , player )
111
109
112
110
def can_complete_tangaroa (self , player ):
113
111
return self .can_access_tangaroa (player )
114
112
115
113
def set_rules (world , player ):
116
- # Map region to check to see if we can access it
117
114
regionChecks = {
118
115
"Raft" : lambda state : True ,
119
116
"ResearchTable" : lambda state : True ,
@@ -133,14 +130,14 @@ def set_rules(world, player):
133
130
"Scrap" : lambda state : True ,
134
131
"SeaVine" : lambda state : True ,
135
132
"Brick_Dry" : lambda state : True ,
136
- "Leather" : lambda state : True , # Conflicting info on whetherwe need state.can_navigate(player) instead, personal testing indicates this is correct
137
133
"Thatch" : lambda state : True , # Palm Leaf
138
134
"Placeable_GiantClam" : lambda state : True ,
139
- "Feather" : lambda state : state .can_craft_birdNest (player ), # Maybe add config for this since you technically don't need bird nest
135
+ "Leather" : lambda state : state .big_islands_available (player ),
136
+ "Feather" : lambda state : state .big_islands_available (player ) or state .can_craft_birdNest (player ),
140
137
"MetalIngot" : lambda state : state .can_smelt_items (player ),
141
138
"CopperIngot" : lambda state : state .can_smelt_items (player ),
142
139
"VineGoo" : lambda state : state .can_smelt_items (player ),
143
- "ExplosivePowder" : lambda state : state .can_smelt_items (player ),
140
+ "ExplosivePowder" : lambda state : state .big_islands_available ( player ) and state . can_smelt_items (player ),
144
141
"Glass" : lambda state : state .can_smelt_items (player ),
145
142
"Bolt" : lambda state : state .can_craft_bolt (player ),
146
143
"Hinge" : lambda state : state .can_craft_hinge (player ),
@@ -158,26 +155,26 @@ def set_rules(world, player):
158
155
"Zipline tool" : lambda state : state .can_craft_ziplineTool (player )
159
156
}
160
157
161
- # Location rules
158
+ # Region access rules
162
159
for region in regionMap :
163
160
if region != "Menu" :
164
161
for exitRegion in world .get_region (region , player ).exits :
165
162
set_rule (world .get_entrance (exitRegion .name , player ), regionChecks [region ])
166
163
167
- # Process locations
164
+ # Location access rules
168
165
for location in location_table :
169
166
locFromWorld = world .get_location (location ["name" ], player )
170
- if "requiresAccessToItems" in location :
171
- def ruleLambda (state , location = location ):
167
+ if "requiresAccessToItems" in location : # Specific item access required
168
+ def fullLocationCheck (state , location = location ):
172
169
canAccess = regionChecks [location ["region" ]](state )
173
170
for item in location ["requiresAccessToItems" ]:
174
171
if not itemChecks [item ](state ):
175
172
canAccess = False
176
173
break
177
174
return canAccess
178
- set_rule (locFromWorld , ruleLambda )
179
- else :
175
+ set_rule (locFromWorld , fullLocationCheck )
176
+ else : # Only region access required
180
177
set_rule (locFromWorld , regionChecks [location ["region" ]])
181
178
182
- # Victory location
183
- world .completion_condition [player ] = lambda state : state .has (' Victory' , player )
179
+ # Victory requirement
180
+ world .completion_condition [player ] = lambda state : state .has (" Victory" , player )
0 commit comments