Skip to content

Commit 48eb799

Browse files
ScipioWrightEmilyV99
authored andcommitted
TUNIC: Some cleanup (ArchipelagoMW#3115)
1 parent a866de3 commit 48eb799

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

worlds/tunic/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def create_items(self) -> None:
125125
item_table[filler].classification == ItemClassification.filler]
126126

127127
# Remove filler to make room for other items
128-
def remove_filler(amount: int):
128+
def remove_filler(amount: int) -> None:
129129
for _ in range(0, amount):
130130
if not available_filler:
131131
fill = "Fool Trap"
@@ -231,7 +231,7 @@ def set_rules(self) -> None:
231231
def get_filler_item_name(self) -> str:
232232
return self.random.choice(filler_items)
233233

234-
def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]):
234+
def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]) -> None:
235235
if self.options.entrance_rando:
236236
hint_data.update({self.player: {}})
237237
# all state seems to have efficient paths

worlds/tunic/er_rules.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ def set_er_region_rules(world: "TunicWorld", ability_unlocks: Dict[str, int], re
991991
# connecting the regions portals are in to other portals you can access via ladder storage
992992
# using has_stick instead of can_ladder_storage since it's already checking the logic rules
993993
if options.logic_rules == "unrestricted":
994-
def get_portal_info(portal_sd: str) -> (str, str):
994+
def get_portal_info(portal_sd: str) -> Tuple[str, str]:
995995
for portal1, portal2 in portal_pairs.items():
996996
if portal1.scene_destination() == portal_sd:
997997
return portal1.name, portal2.region

worlds/tunic/er_scripts.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ class TunicERLocation(Location):
2222
def create_er_regions(world: "TunicWorld") -> Dict[Portal, Portal]:
2323
regions: Dict[str, Region] = {}
2424
if world.options.entrance_rando:
25-
portal_pairs: Dict[Portal, Portal] = pair_portals(world)
25+
portal_pairs = pair_portals(world)
2626

2727
# output the entrances to the spoiler log here for convenience
2828
for portal1, portal2 in portal_pairs.items():
2929
world.multiworld.spoiler.set_entrance(portal1.name, portal2.name, "both", world.player)
3030
else:
31-
portal_pairs: Dict[Portal, Portal] = vanilla_portals()
31+
portal_pairs = vanilla_portals()
3232

3333
for region_name, region_data in tunic_er_regions.items():
3434
regions[region_name] = Region(region_name, world.player, world.multiworld)

worlds/tunic/test/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
class TunicTestBase(WorldTestBase):
55
game = "TUNIC"
6-
player: int = 1
6+
player = 1

worlds/tunic/test/test_access.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
class TestAccess(TunicTestBase):
66
# test whether you can get into the temple without laurels
7-
def test_temple_access(self):
7+
def test_temple_access(self) -> None:
88
self.collect_all_but(["Hero's Laurels", "Lantern"])
99
self.assertFalse(self.can_reach_location("Sealed Temple - Page Pickup"))
1010
self.collect_by_name(["Lantern"])
1111
self.assertTrue(self.can_reach_location("Sealed Temple - Page Pickup"))
1212

1313
# test that the wells function properly. Since fairies is written the same way, that should succeed too
14-
def test_wells(self):
14+
def test_wells(self) -> None:
1515
self.collect_all_but(["Golden Coin"])
1616
self.assertFalse(self.can_reach_location("Coins in the Well - 3 Coins"))
1717
self.collect_by_name(["Golden Coin"])
@@ -22,7 +22,7 @@ class TestStandardShuffle(TunicTestBase):
2222
options = {options.AbilityShuffling.internal_name: options.AbilityShuffling.option_true}
2323

2424
# test that you need to get holy cross to open the hc door in overworld
25-
def test_hc_door(self):
25+
def test_hc_door(self) -> None:
2626
self.assertFalse(self.can_reach_location("Fountain Cross Door - Page Pickup"))
2727
self.collect_by_name("Pages 42-43 (Holy Cross)")
2828
self.assertTrue(self.can_reach_location("Fountain Cross Door - Page Pickup"))
@@ -33,7 +33,7 @@ class TestHexQuestShuffle(TunicTestBase):
3333
options.AbilityShuffling.internal_name: options.AbilityShuffling.option_true}
3434

3535
# test that you need the gold questagons to open the hc door in overworld
36-
def test_hc_door_hex_shuffle(self):
36+
def test_hc_door_hex_shuffle(self) -> None:
3737
self.assertFalse(self.can_reach_location("Fountain Cross Door - Page Pickup"))
3838
self.collect_by_name("Gold Questagon")
3939
self.assertTrue(self.can_reach_location("Fountain Cross Door - Page Pickup"))
@@ -44,15 +44,15 @@ class TestHexQuestNoShuffle(TunicTestBase):
4444
options.AbilityShuffling.internal_name: options.AbilityShuffling.option_false}
4545

4646
# test that you can get the item behind the overworld hc door with nothing and no ability shuffle
47-
def test_hc_door_no_shuffle(self):
47+
def test_hc_door_no_shuffle(self) -> None:
4848
self.assertTrue(self.can_reach_location("Fountain Cross Door - Page Pickup"))
4949

5050

5151
class TestNormalGoal(TunicTestBase):
5252
options = {options.HexagonQuest.internal_name: options.HexagonQuest.option_false}
5353

5454
# test that you need the three colored hexes to reach the Heir in standard
55-
def test_normal_goal(self):
55+
def test_normal_goal(self) -> None:
5656
location = ["The Heir"]
5757
items = [["Red Questagon", "Blue Questagon", "Green Questagon"]]
5858
self.assertAccessDependency(location, items)
@@ -63,7 +63,7 @@ class TestER(TunicTestBase):
6363
options.AbilityShuffling.internal_name: options.AbilityShuffling.option_true,
6464
options.HexagonQuest.internal_name: options.HexagonQuest.option_false}
6565

66-
def test_overworld_hc_chest(self):
66+
def test_overworld_hc_chest(self) -> None:
6767
# test to see that static connections are working properly -- this chest requires holy cross and is in Overworld
6868
self.assertFalse(self.can_reach_location("Overworld - [Southwest] Flowers Holy Cross"))
6969
self.collect_by_name(["Pages 42-43 (Holy Cross)"])

0 commit comments

Comments
 (0)