2022-05-16 23:48:22 +00:00
|
|
|
label purchase_item(item):
|
|
|
|
|
|
|
|
if item.currency == "tokens":
|
|
|
|
if tokens < item.price:
|
|
|
|
gen "(I don't have enough tokens.)" ("base", xpos="far_left", ypos="head")
|
|
|
|
return
|
|
|
|
else:
|
|
|
|
if game.gold < item.price:
|
|
|
|
gen "(I don't have enough gold.)" ("base", xpos="far_left", ypos="head")
|
|
|
|
return
|
|
|
|
|
|
|
|
if item == sealed_scroll_ITEM:
|
|
|
|
show screen blktone
|
|
|
|
with d3
|
2023-03-31 22:41:48 +00:00
|
|
|
if not states.her.status.sex:
|
2022-05-16 23:48:22 +00:00
|
|
|
gen "What's in this scroll?" ("base", xpos="far_left", ypos="head")
|
|
|
|
ger "Don't worry about it."
|
|
|
|
gen "Why?" ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "You're not ready for what's in this scroll."
|
|
|
|
gen "Well, that just makes me want it more." ("base", xpos="far_left", ypos="head")
|
|
|
|
ger "Too bad, professor."
|
|
|
|
gen "(Perhaps I should check it out later...)" ("base", xpos="far_left", ypos="head")
|
|
|
|
hide screen blktone
|
|
|
|
with d3
|
|
|
|
return
|
|
|
|
|
|
|
|
gen "I'd like to buy this scroll." ("base", xpos="far_left", ypos="head")
|
|
|
|
ger "Five hundred gold coins."
|
|
|
|
gen "Five hundred!? Why on earth is it so expensive?" ("angry", xpos="far_left", ypos="head")
|
|
|
|
fre "Forbidden magic is quite a risky and expensive endeavour Professor, We'll sell it for no less than five hundred."
|
|
|
|
gen "What's it for anyway?" ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "It is one of the components needed for a forbidden spell."
|
2023-05-09 13:45:34 +00:00
|
|
|
ger "Acquired completely legitimately, I might add!"
|
2022-05-16 23:48:22 +00:00
|
|
|
gen "What does it do?" ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "It transforms you into... something."
|
|
|
|
gen "Like what?" ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "We don't know, it could be anything."
|
2023-05-09 13:45:34 +00:00
|
|
|
ger "A powerful phoenix, a terrifying gorgon, a deadly basilisk or an awe-inspiring dragon."
|
2022-05-16 23:48:22 +00:00
|
|
|
gen "Not sure I'd really want to transform into any of those..." ("base", xpos="far_left", ypos="head")
|
|
|
|
ger "Well... those are just theories, we've not been able to use the scroll to find the second component ourselves."
|
2023-05-09 13:45:34 +00:00
|
|
|
gen "Really? Now that is surprising." ("base", xpos="far_left", ypos="head")
|
2022-05-16 23:48:22 +00:00
|
|
|
fre "Yes, although it's blank for some reason... not really anything new to us as we used to have a ma--"
|
|
|
|
ger "massive amounts of scrolls just like this one!"
|
2023-05-09 13:45:34 +00:00
|
|
|
ger "Yep... lots of them, shame they all burnt."
|
2022-05-16 23:48:22 +00:00
|
|
|
fre "What are you-- *HHNG*"
|
|
|
|
fre "Oh! I see... Yes, very unfortunate..."
|
2023-05-09 13:45:34 +00:00
|
|
|
gen "That is unfortunate... Well, I'm sure I'll manage." ("base", xpos="far_left", ypos="head")
|
2022-05-16 23:48:22 +00:00
|
|
|
hide screen blktone
|
|
|
|
with d3
|
|
|
|
|
2023-04-02 23:48:38 +00:00
|
|
|
if item == collar_ITEM and not states.her.ev.magic_collar.worn and item.owned == 0:
|
2022-05-16 23:48:22 +00:00
|
|
|
show screen blktone
|
|
|
|
with d3
|
|
|
|
gen "A Magic collar..." ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "Oh yes... That thing."
|
|
|
|
ger "I'd be careful with that one if I were you."
|
|
|
|
gen "How come?" ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "Well... It might reveal some secrets that most people would want to keep to themselves."
|
|
|
|
gen "Such as?" ("base", xpos="far_left", ypos="head")
|
|
|
|
twi "Their true self!"
|
|
|
|
gen "..." ("base", xpos="far_left", ypos="head")
|
|
|
|
gen "Colour me intrigued..." ("base", xpos="far_left", ypos="head")
|
|
|
|
gen "And it works?" ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "Of course it does, we tested it on ourselves!"
|
2023-05-09 13:45:34 +00:00
|
|
|
ger "Just know that the collar loses its magic once it is put on one's neck."
|
2022-05-16 23:48:22 +00:00
|
|
|
ger "So you'll have to buy another collar if you want to test if anything's changed..."
|
|
|
|
# ger "So you'll have to buy multiple collars if you want to test it on multiple subjects..."
|
|
|
|
# fre "Or multiple times on one subject to see if anything's changed..."
|
|
|
|
gen "I see." ("base", xpos="far_left", ypos="head")
|
|
|
|
gen "So, what did the collar say when you guys put it on?" ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "Voyeu--"
|
|
|
|
ger "Thrifty!"
|
2023-05-09 13:45:34 +00:00
|
|
|
ger "Wait, what did you just say, Fred?"
|
2022-05-16 23:48:22 +00:00
|
|
|
fre "..."
|
|
|
|
gen "Alright then, I'll take it..." ("base", xpos="far_left", ypos="head")
|
|
|
|
fre "*Ahem*... It's a pleasure doing business with you, sir!"
|
|
|
|
hide screen blktone
|
|
|
|
with d3
|
|
|
|
|
|
|
|
elif item == poker_outfit_ITEM:
|
|
|
|
$ item.used = True
|
|
|
|
|
2023-03-18 15:14:56 +00:00
|
|
|
call unlock_clothing("Congratulations! You have unlocked a new outfit!", her_outfit_poker)
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-03-11 22:01:39 +00:00
|
|
|
play sound "sounds/money.ogg"
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
if item.currency == "tokens":
|
|
|
|
$ tokens -= item.price
|
|
|
|
else:
|
|
|
|
$ game.gold -= item.price
|
|
|
|
$ item.owned += 1
|
|
|
|
|
2023-07-08 20:44:35 +00:00
|
|
|
$ item_store_achievements()
|
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
return
|
2023-07-08 20:44:35 +00:00
|
|
|
|
|
|
|
init python:
|
|
|
|
def item_store_achievements():
|
|
|
|
# We require a function because lambdas aren't pickleable
|
|
|
|
if isinstance(item, Decoration):
|
|
|
|
_posters = filter(lambda x: (x.type == "decoration" and x.placement == poster_OBJ), inventory.items)
|
|
|
|
_hats = filter(lambda x: (x.type == "decoration" and "hat" in x.name.lower()), inventory.items)
|
|
|
|
|
|
|
|
if all(i.owned > 0 for i in _posters):
|
|
|
|
achievements.unlock("postman")
|
|
|
|
|
|
|
|
if all(i.owned > 0 for i in _hats):
|
|
|
|
achievements.unlock("hats")
|