Skip to content

Commit

Permalink
Add back item requirements for gear shop items
Browse files Browse the repository at this point in the history
  • Loading branch information
CovenEsme committed Aug 1, 2023
1 parent f97c6d8 commit c58387c
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 57 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
- Expanded Shopsanity (by CovenEsme)
- Beedle Shopsanity checks have been renamed based on their location in the shop (instead of their prices)
- Gear Shopsanity adds a check to each of the item slots in Rupin's shop (next to Peatrice's Item Check in the Bazaar)
- All shop slots are always available to be bought
- All items are on display - even if you don't have the requirements to purchase them
- The leftmost and frontmost shop slots require either bow, bomb bag, or slingshot in order to be able to purchase them (like their vanilla items)
- The rightmost shop slots are always available for purchase (as long as you have the wallet capacity and enough Rupees)
- After buying an item, it will become sold out until you leave and re-enter the Bazaar after which the vanilla item can be bought repeatedly
- If disabled, each shop slot will contain its vanilla item which can be bought repeatedly
- Potion Shopsanity adds a check to each potion vat (next to Sparrot's Fortune-telling Stall in the Bazaar)
Expand Down
12 changes: 6 additions & 6 deletions SS Rando Logic - Glitchless Requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -479,22 +479,22 @@ Beedle's Shop - Second Outer Right Item:
## Rupin's Shop

Central Skyloft - Gear Shop - Top Left Item:
Can Afford 150 Rupees
Can Afford 150 Rupees & Bow

Central Skyloft - Gear Shop - Middle Left Item:
Can Afford 100 Rupees
Can Afford 100 Rupees & Slingshot

Central Skyloft - Gear Shop - Bottom Left Item:
Can Afford 150 Rupees
Can Afford 150 Rupees & Bomb Bag

Central Skyloft - Gear Shop - Left Front Item:
Can Afford 20 Rupees
Can Afford 20 Rupees & Slingshot

Central Skyloft - Gear Shop - Middle Front Item:
Can Afford 20 Rupees
Can Afford 20 Rupees & Bow

Central Skyloft - Gear Shop - Right Front Item:
Can Afford 20 Rupees
Can Afford 20 Rupees & Bomb Bag

Central Skyloft - Gear Shop - Bottom Right Item:
Can Afford 50 Rupees
Expand Down
73 changes: 43 additions & 30 deletions eventpatches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -974,36 +974,6 @@
index: 89
flow:
next: 116
- name: Always allow buying Quiver item
type: flowpatch
index: 74
flow:
next: 76
- name: Always allow buying Satchel item
type: flowpatch
index: 71
flow:
next: 73
- name: Always allow buying Bomb Bag item
type: flowpatch
index: 77
flow:
next: 79
- name: Always allow buying Seeds item
type: flowpatch
index: 54
flow:
next: 55
- name: Always allow buying Arrows item
type: flowpatch
index: 26
flow:
next: 28
- name: Always allow buying Bombs item
type: flowpatch
index: 36
flow:
next: 37
- name: Rupin always offers advice
type: flowpatch
index: 0
Expand All @@ -1015,6 +985,49 @@
text: "Regrettably, that sign means I'm all\nsold out of that item.
\n\n\n...
\n\n\n\nHowever, I have many other wonderful\ntreasures prepared just for you. So,\nplease, savor my other fantastical\nwares, friend!"

# Missing item flag patches
- name: Missing Itemflag 2 Text # green rupee (always set)
type: textadd
text: "" # should never happen
- name: Missing Itemflag 2
type: flowadd
flow:
type: type1
next: -1
param3: 79
param4: Missing Itemflag 2 Text
- name: Missing Itemflag 19 Text
type: textadd
text: "I do apologize, but I can't sell you\nthis unless you have a <r<bow>>. It's\nstore policy, you see."
- name: Missing Itemflag 19
type: flowadd
flow:
type: type1
next: -1
param3: 79
param4: Missing Itemflag 19 Text
- name: Missing Itemflag 52 Text
type: textadd
text: "My friend...you don't appear to have\na <r<slingshot>>.
\n\n\nI simply couldn't sell you these in good\nconscience if you do not have a\n<r<slingshot>>. Perhaps I can interest you\nin some of my other wares..."
- name: Missing Itemflag 52
type: flowadd
flow:
type: type1
next: -1
param3: 79
param4: Missing Itemflag 52 Text
- name: Missing Itemflag 92 Text
type: textadd
text: "Ahaa! Very sorry, but I can't sell you\nthis unless you have a <r<Bomb Bag>>.\nAgain, my apologies."
- name: Missing Itemflag 92
type: flowadd
flow:
type: type1
next: -1
param3: 79
param4: Missing Itemflag 92 Text
102-Zelda:
- name: Fledge Quest Switch 1
type: flowpatch
Expand Down
57 changes: 44 additions & 13 deletions gamepatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,16 @@
"Beedle - Third Outer Left Item": (31, 32, 1200, 600),
"Beedle - Second Inner Left Item": (21, 22, 1600, 800),
# Rupin
## location: (entry index, price)
"Rupin - Middle Front Item": ("101_40", 20),
"Rupin - Right Front Item": ("101_41", 20),
"Rupin - Bottom Right Item": ("101_42", 50),
"Rupin - Middle Right Item": ("101_43", 100),
"Rupin - Top Right Item": ("101_44", 500),
"Rupin - Left Front Item": ("101_45", 20),
"Rupin - Middle Left Item": ("101_46", 100),
"Rupin - Top Left Item": ("101_47", 150),
"Rupin - Bottom Left Item": ("101_48", 150),
## location: (entry index, price, itemflag)
"Rupin - Middle Front Item": ("101_40", 20, 19), # bow
"Rupin - Right Front Item": ("101_41", 20, 92), # bomb bag
"Rupin - Bottom Right Item": ("101_42", 50, 2), # green rupee (always set)
"Rupin - Middle Right Item": ("101_43", 100, 2), # green rupee (always set)
"Rupin - Top Right Item": ("101_44", 500, 2), # green rupee (always set)
"Rupin - Left Front Item": ("101_45", 20, 52), # slingshot
"Rupin - Middle Left Item": ("101_46", 100, 52), # slingshot
"Rupin - Top Left Item": ("101_47", 150, 19), # bow
"Rupin - Bottom Left Item": ("101_48", 150, 92), # bomb bag
}

BEEDLE_BUY_SWITCH = "[1]I'll buy it![2-]No, thanks."
Expand Down Expand Up @@ -1879,7 +1879,7 @@ def shopsanity_patches(self):
{"name": discounted, "type": "textadd", "text": discount_text}
)
elif location.startswith("Rupin"):
entry_index, price = SHOP_TEXT_PATCHES[location]
entry_index, price, itemflag = SHOP_TEXT_PATCHES[location]

sold_item = self.placement_file.item_locations[
self.areas.short_to_full(location)
Expand All @@ -1890,7 +1890,7 @@ def shopsanity_patches(self):
break_lines(
f"You've got quite an eye, friend. That "
f"there is a <y<{sold_item}>>. "
f"It cost a mere <r<{price} Rupees>>."
f"It costs a mere <r<{price} Rupees>>."
)
+ f"\n{RUPIN_BUY_SWITCH}"
)
Expand Down Expand Up @@ -1939,12 +1939,43 @@ def shopsanity_patches(self):
"subType": 6,
"param1": 0,
"param2": 1,
"next": f"{location} Event Choice",
"next": f"{location} Check Item Flag 1",
"param3": 12,
},
}
)

self.eventpatches["101-Shop"].append(
{
"name": f"{location} Check Item Flag 1",
"type": "flowadd",
"flow": {
"type": "type3",
"subType": 1,
"param1": itemflag,
"param2": 1, # check flag is set
"next": f"{location} Check Item Flag 2",
"param3": 23, # check for itemflag
},
}
)

self.eventpatches["101-Shop"].append(
{
"name": f"{location} Check Item Flag 2",
"type": "switchadd",
"flow": {
"subType": 6,
"param2": 0,
"param3": 7, # use result from previous check
},
"cases": [
f"{location} Event Choice",
f"Missing Itemflag {itemflag}", # see eventpatches.yaml
],
}
)

self.eventpatches["101-Shop"].append(
{
"name": f"{location} Event Choice",
Expand Down
14 changes: 7 additions & 7 deletions logic/requirements/Skyloft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ Central Skyloft:
exits:
Bazaar: Nothing
locations:
Top Left Item: Can Afford 150 Rupees
Middle Left Item: Can Afford 100 Rupees
Bottom Left Item: Can Afford 150 Rupees
Left Front Item: Can Afford 20 Rupees
Middle Front Item: Can Afford 20 Rupees
Right Front Item: Can Afford 20 Rupees
Top Left Item: Can Afford 150 Rupees & Bow
Middle Left Item: Can Afford 100 Rupees & Slingshot
Bottom Left Item: Can Afford 150 Rupees & Bomb Bag
Left Front Item: Can Afford 20 Rupees & Slingshot
Middle Front Item: Can Afford 20 Rupees & Bow
Right Front Item: Can Afford 20 Rupees & Bomb Bag
Bottom Right Item: Can Afford 50 Rupees
Middle Right Item: Can Afford 100 Rupees
Top Right Item: Can Afford 500 Rupees
Top Right Item: Can Afford 500 Rupees

Potion Shop:
exits:
Expand Down

0 comments on commit c58387c

Please sign in to comment.