Compare commits

..

No commits in common. "95b3db770ea22ed52c6eda100f155a4d889b0d41" and "01126edc4e3174a7ca4f17eb8e622e9e43409d9a" have entirely different histories.

17 changed files with 231 additions and 228 deletions

View File

@ -103,25 +103,25 @@ label upgrades_menu(xx=150, yy=90):
with d3
label .after_init:
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "category":
$ current_category = __choice[1]
if _choice[0] == "category":
$ current_category = _choice[1]
$ category_items = 0
$ menu_items = upgrades_sortfilter([], current_sorting)
$ menu_items_length = len(menu_items)
$ current_item = 0
elif __choice[0] == "subcat":
if __choice[1] != current_subcategory:
$ current_subcategory = __choice[1]
elif __choice[0] == "buy":
if game.gold >= __choice[1] and ton_friendship >= __choice[3]*25:
elif _choice[0] == "subcat":
if _choice[1] != current_subcategory:
$ current_subcategory = _choice[1]
elif _choice[0] == "buy":
if game.gold >= _choice[1] and ton_friendship >= _choice[3]*25:
python:
renpy.play('sounds/money.ogg')
game.gold -= __choice[1]
_list = __choice[2]
_iter = __choice[3]
game.gold -= _choice[1]
_list = _choice[2]
_iter = _choice[3]
item_bought = True
@ -129,7 +129,7 @@ label upgrades_menu(xx=150, yy=90):
if not _list[i].unlocked:
_list[i].unlock()
ton_clothing_upgrades += 1
elif ton_friendship < __choice[4]:
elif ton_friendship < _choice[4]:
$ renpy.play('sounds/fail.ogg')
"> Tonks doesn't like you enough."
else:

View File

@ -201,12 +201,12 @@ label achievement_menu(xx=150, yy=90):
label .after_init:
python:
renpy.dynamic(__choice = ui.interact())
_choice = ui.interact()
if __choice[0] == "select":
current_item = __choice[1]
elif __choice[0] == "category":
current_category = __choice[1]
if _choice[0] == "select":
current_item = _choice[1]
elif _choice[0] == "category":
current_category = _choice[1]
if current_category == "All":
category_items = list(persistent.achievements.items())
else:
@ -215,11 +215,11 @@ label achievement_menu(xx=150, yy=90):
menu_items_length = len(menu_items)
current_page = 0
current_item = next(iter(menu_items), None)
elif __choice == "inc":
elif _choice == "inc":
current_page += 1
elif __choice == "dec":
elif _choice == "dec":
current_page += -1
elif __choice == "filter":
elif _choice == "filter":
if current_filter == None:
current_filter = "Locked"
elif current_filter == "Locked":
@ -232,7 +232,7 @@ label achievement_menu(xx=150, yy=90):
menu_items_length = len(menu_items)
current_page = 0
current_item = next(iter(menu_items), None)
elif __choice == "sort":
elif _choice == "sort":
if current_sorting == "A-z":
current_sorting = "z-A"
elif current_sorting == "z-A":

View File

@ -79,24 +79,24 @@ label book_handle(book=None):
show screen book_animator("book_page_next", 0.5)
label .after_init:
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice == "next":
if _choice == "next":
$ book.next()
play sound "sounds/pageflip.ogg"
show screen book_animator("book_page_next", 0.5)
with d1
elif __choice == "prev":
elif _choice == "prev":
$ book.prev()
play sound "sounds/pageflip.ogg"
show screen book_animator("book_page_prev", 0.5)
with d1
elif __choice == "back":
elif _choice == "back":
$ book.open()
play sound "sounds/pageflipback.ogg"
show screen book_animator("book_page_start", 0.5)
with d1
elif __choice == "Close":
elif _choice == "Close":
$ book.close()
play sound "sounds/bookclose.ogg"
return

View File

@ -31,11 +31,11 @@ label brewing_menu(xx=150, yy=90):
show screen brewing(xx, yy)
label .after_init:
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "select":
$ current_item = __choice[1]
elif __choice == "filter":
if _choice[0] == "select":
$ current_item = _choice[1]
elif _choice == "filter":
if current_filter == "Unlocked":
$ current_filter = None
elif current_filter == None:
@ -44,7 +44,7 @@ label brewing_menu(xx=150, yy=90):
$ menu_items = brewing_sortfilter(inventory.get_instances_of_type("potion"), current_sorting, current_filter)
$ menu_items_length = len(menu_items)
$ current_item = next(iter(menu_items), None)
elif __choice == "sort":
elif _choice == "sort":
if current_sorting == "A-z":
$ current_sorting = "z-A"
else:
@ -53,10 +53,10 @@ label brewing_menu(xx=150, yy=90):
$ menu_items = brewing_sortfilter(inventory.get_instances_of_type("potion"), current_sorting, current_filter)
$ menu_items_length = len(menu_items)
#$ current_item = next(iter(menu_items), None)
elif __choice[0] == "make":
if __choice[1].has_ingredients():
elif _choice[0] == "make":
if _choice[1].has_ingredients():
play sound "sounds/bubble.ogg"
$ __choice[1].make()
$ _choice[1].make()
else:
gen "It appears I'm missing some key ingredients..." ("base", xpos="far_left", ypos="head")
else:

View File

@ -34,18 +34,18 @@ label summon_menu(xx=723, yy=90):
show screen summon(xx, yy)
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "summon":
if _choice[0] == "summon":
hide screen summon
if not __choice[2]:
if not _choice[2]:
$ enable_game_menu()
$ renpy.jump_out_of_context("summon_"+__choice[1].lower())
$ renpy.jump_out_of_context("summon_"+_choice[1].lower())
else:
if game.daytime or __choice[1] in ["Tonks", "Snape"]:
nar "[__choice[1]] is currently busy. Try again later."
if game.daytime or _choice[1] in ["Tonks", "Snape"]:
nar "[_choice[1]] is currently busy. Try again later."
else:
nar "[__choice[1]] is currently asleep. Try again tomorrow."
nar "[_choice[1]] is currently asleep. Try again tomorrow."
else:
hide screen summon
return

View File

@ -62,13 +62,13 @@ label inventory_menu(xx=150, yy=90):
label .after_init:
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "select":
$ current_item = __choice[1]
elif __choice[0] == "category":
if _choice[0] == "select":
$ current_item = _choice[1]
elif _choice[0] == "category":
python:
current_category = __choice[1]
current_category = _choice[1]
category_items = inventory_dict[current_category]
menu_items = inventory_sortfilter(category_items, current_sorting, current_filter)
menu_items_length = len(menu_items)
@ -79,11 +79,11 @@ label inventory_menu(xx=150, yy=90):
current_page = 0
current_item = next(iter(menu_items), None)
elif __choice == "inc":
elif _choice == "inc":
$ current_page += 1
elif __choice == "dec":
elif _choice == "dec":
$ current_page += -1
elif __choice == "sort":
elif _choice == "sort":
python:
if current_sorting == "A-z":
current_sorting = "z-A"
@ -104,7 +104,7 @@ label inventory_menu(xx=150, yy=90):
if not current_item or not menu_items_length:
current_item = next(iter(menu_items), None)
elif __choice == "filter":
elif _choice == "filter":
python:
if current_filter == None:
current_filter = "Owned"
@ -121,11 +121,11 @@ label inventory_menu(xx=150, yy=90):
if not current_item or not menu_items_length:
current_item = next(iter(menu_items), None)
elif __choice == "use":
elif _choice == "use":
python:
enable_game_menu()
current_item.use()
elif __choice == "give":
elif _choice == "give":
if current_item.type == "gift":
if get_character_gifted(states.active_girl):

View File

@ -111,18 +111,18 @@ label stats_menu(xx=150, yy=90):
show screen stats(xx, yy)
label .after_init:
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "category":
$ current_category = __choice[1]
if _choice[0] == "category":
$ current_category = _choice[1]
$ category_items = stats_dict[current_category]
$ menu_items = stats_sortfilter(category_items, current_sorting)
$ menu_items_length = len(menu_items)
$ current_item = stats_dict[current_category]
#$ current_subcategory = "overview"
elif __choice[0] == "subcat":
if __choice[1] != current_subcategory:
$ current_subcategory = __choice[1]
elif _choice[0] == "subcat":
if _choice[1] != current_subcategory:
$ current_subcategory = _choice[1]
else:
hide screen stats
return

View File

@ -31,7 +31,7 @@ label tutorial(entry):
label .display(entry):
show screen tutorial(entry)
$ _choice = ui.interact() # ???
$ _choice = ui.interact()
return
screen tutorial(entry):

View File

@ -5,34 +5,34 @@ label deck_builder:
label deck_builder_jump:
show screen deck_builder_screen
$ renpy.block_rollback()
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice in unlocked_cards:
$ selectcard = unlocked_cards.index(__choice)
if _choice in unlocked_cards:
$ selectcard = unlocked_cards.index(_choice)
jump deck_builder_jump
elif __choice == "gallery":
elif _choice == "gallery":
hide screen deck_builder_screen
show screen deck_builder_gallery
elif __choice == "back":
elif _choice == "back":
hide screen deck_builder_gallery
show screen deck_builder_screen
elif __choice == "Close":
elif _choice == "Close":
$ selectcard = -1
hide screen deck_builder_screen
jump main_room_menu
elif __choice == "guide":
elif _choice == "guide":
$ selectcard = -1
hide screen deck_builder_screen
jump deck_builder_guide
elif __choice == "inc":
elif _choice == "inc":
$ currentpage += 1
$ selectcard = -1
jump deck_builder_jump
elif __choice == "dec":
elif _choice == "dec":
$ currentpage -= 1
$ selectcard = -1
jump deck_builder_jump
elif __choice == "unselect":
elif _choice == "unselect":
$ selectcard = -1
jump deck_builder_jump
else:
@ -40,8 +40,8 @@ label deck_builder:
python:
if unlocked_cards[selectcard].copies > -1:
unlocked_cards[selectcard].copies -= 1
add_card_to_deck(playerdeck[int(__choice)].title)
playerdeck[int(__choice)] = unlocked_cards[selectcard]
add_card_to_deck(playerdeck[int(_choice)].title)
playerdeck[int(_choice)] = unlocked_cards[selectcard]
selectcard = -1
pass
jump deck_builder_jump
@ -256,9 +256,9 @@ label deck_builder_guide:
gen "(*Shudders*)" ("base", xpos="far_left", ypos="head")
gen "(Well... might as well...)" ("base", xpos="far_left", ypos="head")
#$ renpy.dynamic(__choice = ui.interact())
#$ _choice = ui.interact()
#if __choice == "back":
#if _choice == "back":
call music_block
hide screen deck_builder_tutorial

View File

@ -85,12 +85,12 @@
# $ test_sign.interactive = True
# $ renpy.dynamic(__choice = ui.interact())
# $ _choice = ui.interact()
# if __choice[0] == "result":
# if _choice[0] == "result":
# $ test_sign.interactive = False
# pause 3.0
# if __choice[1] >= 50.0:
# if _choice[1] >= 50.0:
# "Magician" "Congratulations, you have passed the test with the score of [_sign_max]%%, I am proud of you!"
# menu:
# "Magician" "Would you like to keep playing?"
@ -116,21 +116,21 @@
# show screen draw_magic
# $ renpy.dynamic(__choice = ui.interact())
# $ _choice = ui.interact()
# if __choice[0] == "result":
# if _choice[0] == "result":
# $ test_sign.interactive = False
# pause 3.0
# if __choice[1] == 0.0:
# if _choice[1] == 0.0:
# "Magician" "You suck."
# elif 25.0 > __choice[1] > 0.0:
# elif 25.0 > _choice[1] > 0.0:
# "Magician" "You still suck."
# elif 50.0 > __choice[1] > 25.0:
# elif 50.0 > _choice[1] > 25.0:
# "Magician" "You're average."
# elif 75.0 > __choice[1] > 50.0:
# elif 75.0 > _choice[1] > 50.0:
# "Magician" "You're above average."
# elif 100.0 > __choice[1] > 75.0:
# elif 100.0 > _choice[1] > 75.0:
# "Magician" "You're good."
# else:
# "Magician" "Holy shit! CRITICAL HIT!"

View File

@ -35,23 +35,23 @@ label mirror_menu(xx=150, yy=90):
show screen mirror(xx, yy)
label .after_init:
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "select":
$ current_item = __choice[1]
if _choice[0] == "select":
$ current_item = _choice[1]
$ current_item.seen = True
elif __choice[0] == "category":
$ current_category = __choice[1]
elif _choice[0] == "category":
$ current_category = _choice[1]
$ menu_items = mirror_sortfilter(mirror.get_instances_of_tag(current_category), current_sorting, current_filter)
$ menu_items_length = len(menu_items)
$ current_page = 0
$ current_item = next(iter(menu_items), None)
elif __choice == "inc":
elif _choice == "inc":
$ current_page += 1
elif __choice == "dec":
elif _choice == "dec":
$ current_page += -1
elif __choice == "filter":
elif _choice == "filter":
if current_filter == "Unlocked":
$ current_filter = None
elif current_filter == None:
@ -61,7 +61,7 @@ label mirror_menu(xx=150, yy=90):
$ menu_items_length = len(menu_items)
$ current_page = 0
$ current_item = next(iter(menu_items), None)
elif __choice == "sort":
elif _choice == "sort":
if current_sorting == "A-z":
$ current_sorting = "z-A"
else:
@ -71,8 +71,8 @@ label mirror_menu(xx=150, yy=90):
$ menu_items_length = len(menu_items)
$ current_page = 0
$ current_item = next(iter(menu_items), None)
elif __choice[0] == "play":
$ __choice[1].play()
elif _choice[0] == "play":
$ _choice[1].play()
$ renpy.jump_out_of_context("mirror")
else:
$ enable_game_menu()

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,13 @@ init python:
item = sorted(item, key=lambda x: natsort_key(x.name))
if sortby == "Price (Asc)":
item.sort(key=lambda x: x.price, reverse=False)
item = sorted(item, key=lambda x: x.price, reverse=False)
elif current_sorting == "Price (Desc)":
item.sort(key=lambda x: x.price, reverse=True)
item = sorted(item, key=lambda x: x.price, reverse=True)
if sortby == "Lewdness (Asc)":
item.sort(key=get_outfit_score, reverse=False)
item = sorted(item, key=lambda x: get_outfit_score(x), reverse=False)
elif current_sorting == "Lewdness (Desc)":
item.sort(key=get_outfit_score, reverse=True)
item = sorted(item, key=lambda x: get_outfit_score(x), reverse=True)
return item
label shop_dress:
@ -25,7 +25,7 @@ label shop_dress_menu:
category_items = {"hermione": hermione.outfits, "tonks": tonks.outfits, "cho": cho.outfits, "luna": luna.outfits, "astoria": astoria.outfits, "susan": susan.outfits}
current_category = "hermione"
store_cart = set()
menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting)
menu_items = shop_dress_sortfilter([x for x in category_items.get(current_category, []) if bool(x.unlocked == False and x.price > 0 and not x in store_cart)], current_sorting)
current_item = next(iter(menu_items), None)
parcel_callbacks = []
@ -33,25 +33,25 @@ label shop_dress_menu:
label .after_init:
$ renpy.dynamic(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "category":
$ current_category = __choice[1]
$ menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting)
if _choice[0] == "category":
$ current_category = _choice[1]
$ menu_items = shop_dress_sortfilter([x for x in category_items.get(current_category, []) if bool(x.unlocked == False and x.price > 0 and not x in store_cart)], current_sorting)
$ current_item = next(iter(menu_items), None)
elif __choice[0] == "buy":
elif _choice[0] == "buy":
show screen blktone
with d3
if game.gold < __choice[1].price:
if game.gold < _choice[1].price:
gen "(I don't have enough gold.)" ("base", xpos="far_left", ypos="head")
else:
if len(store_cart) < 5:
$ renpy.call("purchase_outfit", __choice[1])
$ renpy.call("purchase_outfit", _choice[1])
play sound "sounds/money.ogg"
$ game.gold -= __choice[1].price
$ store_cart.add(__choice[1])
$ menu_items = shop_dress_sortfilter((x for x in category_items.get(current_category, []) if (x.unlocked == False and x.price > 0 and x not in store_cart)), current_sorting)
$ game.gold -= _choice[1].price
$ store_cart.add(_choice[1])
$ menu_items = shop_dress_sortfilter([x for x in category_items.get(current_category, []) if bool(x.unlocked == False and x.price > 0 and not x in store_cart)], current_sorting)
$ current_item = next(iter(menu_items), None)
if len(store_cart) < 5:
@ -63,7 +63,7 @@ label shop_dress_menu:
hide screen blktone
with d3
elif __choice == "sort":
elif _choice == "sort":
if current_sorting == "Price (Asc)":
$ current_sorting = "Price (Desc)"
elif current_sorting == "Price (Desc)":
@ -115,9 +115,9 @@ label shop_dress_menu:
return
else:
gen "Nothing has caught my eye I'm afraid." ("base", xpos="far_left", ypos="head")
maf "Maybe next time."
return
gen "Nothing has caught my eye I'm afraid." ("base", xpos="far_left", ypos="head")
maf "Maybe next time."
return
jump .after_init

View File

@ -90,8 +90,13 @@ label purchase_item(item):
$ game.gold -= item.price
$ item.owned += 1
python hide:
# We hide the lambdas which aren't pickleable
$ item_store_achievements()
return
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)
@ -101,5 +106,3 @@ label purchase_item(item):
if all(i.owned > 0 for i in _hats):
achievements.unlock("hats")
return

View File

@ -4,9 +4,9 @@ init python:
item = sorted(item, key=lambda x: natsort_key(x.name))
if sortby == "Price (Asc)":
item.sort(key=lambda x: x.price, reverse=False)
item = sorted(item, key=lambda x: x.price, reverse=False)
elif current_sorting == "Price (Desc)":
item.sort(key=lambda x: x.price, reverse=True)
item = sorted(item, key=lambda x: x.price, reverse=True)
return item
label shop_item:
@ -31,9 +31,9 @@ label shop_item_menu(xx=150, yy=90):
current_sorting = "Price (Asc)"
if current_category in {"Gifts", "Ingredients"}:
category_items = [x for x in inventory_dict[current_category] if (x.price > 0 and x.unlocked)]
category_items = [x for x in inventory_dict[current_category] if bool(x.price > 0 and x.unlocked)]
elif current_category in {"Books", "Scrolls", "Decorations", "Quest Items"}:
category_items = [x for x in inventory_dict[current_category] if (x.price > 0 and x.owned < x.limit and x.unlocked)]
category_items = [x for x in inventory_dict[current_category] if bool(x.price > 0 and x.owned < x.limit and x.unlocked)]
menu_items = shop_item_sortfilter(category_items, current_sorting)
menu_items_length = len(menu_items)
@ -43,39 +43,39 @@ label shop_item_menu(xx=150, yy=90):
show screen shop_item(xx, yy)
label .after_init:
$ renpy.dynamix(__choice = ui.interact())
$ _choice = ui.interact()
if __choice[0] == "select":
$ current_item = __choice[1]
elif __choice[0] == "category":
$ current_category = __choice[1]
if _choice[0] == "select":
$ current_item = _choice[1]
elif _choice[0] == "category":
$ current_category = _choice[1]
if current_category in {"Gifts", "Ingredients"}:
$ category_items = [x for x in inventory_dict[current_category] if (x.price > 0 and x.unlocked)]
$ category_items = [x for x in inventory_dict[current_category] if bool(x.price > 0 and x.unlocked)]
elif current_category in {"Books", "Scrolls", "Decorations", "Quest Items"}:
$ category_items = [x for x in inventory_dict[current_category] if (x.price > 0 and x.owned < x.limit and x.unlocked)]
$ category_items = [x for x in inventory_dict[current_category] if bool(x.price > 0 and x.owned < x.limit and x.unlocked)]
$ menu_items = shop_item_sortfilter(category_items, current_sorting)
$ menu_items_length = len(menu_items)
$ current_page = 0
$ current_item = next(iter(menu_items), None)
pass
elif __choice == "inc":
elif _choice == "inc":
$ current_page += 1
elif __choice == "dec":
elif _choice == "dec":
$ current_page += -1
elif __choice == "sort":
elif _choice == "sort":
if current_sorting == "Price (Asc)":
$ current_sorting = "Price (Desc)"
elif current_sorting == "Price (Desc)":
$ current_sorting = "Price (Asc)"
$ menu_items = shop_item_sortfilter(category_items, current_sorting)
elif __choice == "buy":
elif _choice == "buy":
$ renpy.call("purchase_item", current_item)
if current_category in {"Gifts", "Ingredients"}:
$ category_items = [x for x in inventory_dict[current_category] if (x.price > 0 and x.unlocked)]
$ category_items = [x for x in inventory_dict[current_category] if bool(x.price > 0 and x.unlocked)]
elif current_category in {"Books", "Scrolls", "Decorations", "Quest Items"}:
$ category_items = [x for x in inventory_dict[current_category] if (x.price > 0 and x.owned < x.limit and x.unlocked)]
$ category_items = [x for x in inventory_dict[current_category] if bool(x.price > 0 and x.owned < x.limit and x.unlocked)]
$ menu_items = shop_item_sortfilter(category_items, current_sorting)
$ menu_items_length = len(menu_items)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff