Vibrator Events - Initial Implementation

* Added vibrator event chain (w/ Placeholders)
* Added vibrator item (Box o' fun)
* Added IntLike class
* Added her_tier_public as IntLike object
This commit is contained in:
LoafyLemon 2022-07-23 21:57:42 +01:00
parent 0c5de9218e
commit 23e5c598ee
4 changed files with 2370 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -49,3 +49,28 @@ default hg_masturbated = counter_class()
default hg_blowjob = counter_class()
default hg_sex = counter_class()
default hg_anal = counter_class()
init python:
# Public requests design is flawed at its core to the point it would
# require going back to the drawing board, so instead, we will
# simulate tiers without spending weeks refactoring it and risking
# breaking save compatibility again. Technical debt sucks. ¯\_(ツ)_/¯
def _her_tier_public():
if hg_pr_sex.counter > 0:
return 6
elif hg_pr_blowjob.counter > 0:
return 5
elif hg_pr_handjob.counter > 0:
return 4
elif hg_pr_kiss.counter > 0 or hg_pr_flash.counter > 0:
return 3
elif hg_pr_grope.counter > 0:
return 2
else:
return 1
her_tier_public = IntLike(_her_tier_public)

View File

@ -7,8 +7,7 @@ default sealed_scroll_ITEM = Item("sealed_scroll", "quest", "Sealed Scroll", 500
default quidditchguide_ITEM = Item("quidditch_book", "quest", "Quidditch Guide", 100, "This book contains the basic knowledge of Quidditch.", label="quidditch_guide_book", limit=1, image="interface/icons/generic_book.webp", unlocked=False, caption="Read")
default thequibbler_ITEM = Item("quibbler", "quest", "The Quibbler #NO. 24027", 15, "This tabloid includes conspiracy theories and discussions of imaginary creatures and other weirdness.", label="spectrespecs_E3", limit=1, image="interface/icons/the_quibbler.webp", unlocked=False, caption="Read")
default experimental_recipes_ITEM = Item("recipes", "quest", "Experimental Potion Recipes", 0, "This piece of paper has Snape's handwriting all over it.", limit=1, image="interface/icons/generic_scroll.webp", unlocked=False)
#default time_turner_ITEM = Item("time_turner", "quest", "Time Turner", 5000, "May only be used with explicit permission from the ministry of magic.\nChanges to established lore are strictly prohibited.", limit=1, label="not_implemented", unlocked=False)
default vibrators_ITEM = Item("vibrators", "quest", "Box o' fun", 1000, "A box full of vibrating devices in different shapes and forms. Some of them remain turned on.", limit=1, infinite=True, givable=True, give_label="hg_vibrators", usable_on=["hermione"], caption="Give", image="interface/icons/the_quibbler.webp") #TODO: Icon
# Outfits related quest items
default poker_outfit_ITEM = Item("her_outfit_poker", "quest", "Poke-her-nips Outfit", 15, "An outfit that doesn't leave much for the mind's desire, perfect for a lewd card loving girl.", limit=1, image="interface/icons/icon_gambler_hat.webp", unlocked=False, currency="tokens")

View File

@ -219,3 +219,36 @@ init -1 python:
def matches(s1, s2, filter=" "):
return s1.replace(filter, "") == s2.replace(filter, "")
class IntLike(python_object):
# Does not support rollback
def __init__(self, callable):
self._callable = callable
def __call__(self):
return self._callable()
def __repr__(self):
return repr(self())
def __add__(self, value):
raise Exception("IntLike does not support add")
def __eq__(self, value):
return self._callable() == value
def __gt__(self, value):
return self._callable() > value
def __lt__(self, value):
return self._callable() < value
def __ge__(self, value):
return self.__gt__(value) or self.__eq__(value)
def __le__(self, value):
return self.__lt__(value) or self.__eq__(value)
def __len__(self):
return len(self._callable())