2023-03-09 21:55:55 +00:00
|
|
|
init -1 python:
|
2024-03-30 19:20:46 +00:00
|
|
|
import os
|
|
|
|
|
2024-03-26 18:41:37 +00:00
|
|
|
def __check_exists(key):
|
2023-04-11 19:36:22 +00:00
|
|
|
if not key in states.dolls:
|
2024-03-26 18:49:01 +00:00
|
|
|
raise KeyError(f"{key!r} character is undefined.")
|
2024-03-26 18:41:37 +00:00
|
|
|
|
|
|
|
def get_character_progression(key):
|
|
|
|
__check_exists(key)
|
2024-03-26 18:42:57 +00:00
|
|
|
return getattr(states, key[:3]).level
|
2023-03-31 22:41:48 +00:00
|
|
|
|
|
|
|
def get_character_scheduling(key):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:42:57 +00:00
|
|
|
return getattr(states, key[:3]).wardrobe_scheduling
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-03-26 18:43:42 +00:00
|
|
|
def get_character_requirement(key, typ):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:43:42 +00:00
|
|
|
return getattr(renpy.store, key[:3]+"_requirements").get(typ, 0)
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-03-26 18:43:42 +00:00
|
|
|
def get_character_response(key, typ):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:43:42 +00:00
|
|
|
return getattr(renpy.store, key[:3]+"_responses").get(typ)
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
def get_character_object(key):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2022-05-16 23:48:22 +00:00
|
|
|
return getattr(store, key)
|
|
|
|
|
2024-03-26 18:43:42 +00:00
|
|
|
def get_character_outfit(key, typ="default"):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:49:01 +00:00
|
|
|
return getattr(store, f"{key[:3]}_outfit_{typ}")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-03-26 18:43:42 +00:00
|
|
|
def get_character_body(key, typ="default"):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:49:01 +00:00
|
|
|
return getattr(store, f"{key[:3]}_body_{typ}")
|
2023-02-07 19:22:05 +00:00
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
def get_character_outfit_req(key, item):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
if not isinstance(item, DollOutfit):
|
2024-03-26 18:49:01 +00:00
|
|
|
raise TypeError(f"{item!r} is not a DollOutfit instance.")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-03-26 18:49:01 +00:00
|
|
|
req = [f"{i.type}: {i.level}" for i in item.group]
|
2022-05-16 23:48:22 +00:00
|
|
|
has_bra = any(i.type == "bra" for i in item.group)
|
|
|
|
has_panties = any(i.type == "panties" for i in item.group)
|
|
|
|
|
|
|
|
if not has_bra:
|
2024-03-26 18:49:01 +00:00
|
|
|
req.append(f'NO BRA: {get_character_requirement(key, "unequip bra")}')
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
if not has_panties:
|
2024-03-26 18:49:01 +00:00
|
|
|
req.append(f'NO PANTIES: {get_character_requirement(key, "unequip panties")}')
|
2022-09-29 21:19:55 +00:00
|
|
|
print("\n".join(req))
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
def get_character_tag(key):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:49:01 +00:00
|
|
|
return f"{key}_main"
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
def get_character_unlock(key):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:42:57 +00:00
|
|
|
return getattr(states, key[:3]).unlocked
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2023-05-10 15:16:42 +00:00
|
|
|
def get_character_gifted(key):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:42:57 +00:00
|
|
|
return getattr(states, key[:3]).gifted
|
2023-05-10 15:16:42 +00:00
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
def get_character_mood(key):
|
2024-03-26 18:41:37 +00:00
|
|
|
__check_exists(key)
|
2024-03-26 18:42:57 +00:00
|
|
|
return getattr(states, key[:3]).mood
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
def get_outfit_score(outfit):
|
|
|
|
"""Returns outfit 'lewdness' score"""
|
|
|
|
|
|
|
|
score = 0
|
|
|
|
|
|
|
|
for i in outfit.group:
|
|
|
|
score += i.level//2
|
|
|
|
|
|
|
|
if not outfit.has_type("bra"):
|
|
|
|
score += 3
|
|
|
|
|
|
|
|
if not outfit.has_type("top"):
|
|
|
|
score += 6
|
|
|
|
|
|
|
|
if not outfit.has_type("panties"):
|
|
|
|
score += 6
|
|
|
|
|
|
|
|
if not outfit.has_type("bottom"):
|
|
|
|
score += 12
|
|
|
|
|
|
|
|
if not outfit.has_type("top"):
|
|
|
|
score += 4
|
|
|
|
|
|
|
|
if not outfit.has_type("bottom"):
|
|
|
|
score += 4
|
|
|
|
|
2023-02-07 19:22:05 +00:00
|
|
|
# if outfit.has_type("buttplug"):
|
|
|
|
# score += 9
|
2022-05-16 23:48:22 +00:00
|
|
|
|
|
|
|
if outfit.has_type("makeup"):
|
|
|
|
score += 1
|
|
|
|
|
|
|
|
if outfit.has_type("tattoo"):
|
|
|
|
score += 2
|
|
|
|
|
|
|
|
if outfit.has_type("piercing"):
|
|
|
|
score += 3
|
|
|
|
|
|
|
|
return score
|
|
|
|
|
2024-11-07 12:40:49 +00:00
|
|
|
def show_kinetic_text(text, style="what_centered_small", pos=None, anchor=(0.5, 0.6), zoom=1.0, sound=None, trans=None, timer=1):
|
|
|
|
if pos is None:
|
|
|
|
start_x, start_y = renpy.get_mouse_pos()
|
|
|
|
else:
|
|
|
|
start_x, start_y = pos
|
|
|
|
|
|
|
|
target_x, target_y = start_x, start_y-15
|
|
|
|
xanchor, yanchor = anchor
|
|
|
|
|
|
|
|
if sound:
|
|
|
|
renpy.play(sound)
|
|
|
|
|
|
|
|
if trans:
|
|
|
|
d = At(At(Text(text, style=style), trans), random_rotation) # We need to do this in two steps because of the rotation
|
|
|
|
else:
|
|
|
|
d = At(Text(text, style=style), random_rotation)
|
|
|
|
|
|
|
|
renpy.show_screen("gfx_effect", start_x=start_x, start_y=start_y, target_x=target_x, target_y=target_y, img=d, xanchor=xanchor, yanchor=yanchor, zoom=zoom, timer=timer)
|
|
|
|
|
2022-05-16 23:48:22 +00:00
|
|
|
def mouse_slap():
|
|
|
|
"""Causes the mouse to be moved away from current position and displays a smoke effect"""
|
|
|
|
renpy.play('sounds/slap.ogg')
|
|
|
|
renpy.stop_predict_screen("gfx_effect")
|
|
|
|
x, y = renpy.get_mouse_pos()
|
|
|
|
xx = x+random.randint(-100, 100)
|
|
|
|
yy = y+random.randint(-100, 100)
|
|
|
|
renpy.show_screen("gfx_effect", start_x=x, start_y=y, target_x=xx, target_y=yy, img="smoke", xanchor=0.1, yanchor=0.7, zoom=0.2, duration=0.15)
|
|
|
|
renpy.set_mouse_pos(xx, yy, duration=0.1)
|
|
|
|
|
|
|
|
def wardrobe_fail_hint(value):
|
|
|
|
"""Displays required whoring/friendship/affection level."""
|
|
|
|
word_list = {"tonks": "friendship", "astoria": "affection", "susan": "confidence", "luna": "corruption", "cho": "recklessness", "hermione": "whoring"}
|
2023-03-31 22:41:48 +00:00
|
|
|
word = word_list.get(states.active_girl, "whoring")
|
2022-05-16 23:48:22 +00:00
|
|
|
|
2024-04-25 19:11:30 +00:00
|
|
|
if states.env.cheats or states.env.difficulty <= 2:
|
2022-05-16 23:48:22 +00:00
|
|
|
renpy.show_screen("blktone")
|
|
|
|
renpy.with_statement(d3)
|
|
|
|
renpy.say(None, "{size=+6}> Try again at "+word+" level {color=#7a0000}"+str(value)+"{/color}.{/size}")
|
|
|
|
renpy.hide_screen("blktone")
|
|
|
|
renpy.with_statement(d3)
|
|
|
|
return
|
|
|
|
|
2024-10-29 14:06:38 +00:00
|
|
|
transform squeeze_hearts:
|
|
|
|
animation
|
|
|
|
subpixel True
|
|
|
|
transform_anchor True
|
|
|
|
xzoom 1.0
|
|
|
|
easein 0.5 xzoom 0.65
|
|
|
|
easeout 0.5 xzoom 1.0
|
|
|
|
pause 1
|
|
|
|
repeat
|