Skip to content

Commit

Permalink
Merge pull request #8648 from jmwall24/f1422
Browse files Browse the repository at this point in the history
f14 2022
  • Loading branch information
jmwall24 authored Feb 7, 2022
2 parents 5328269 + e4b09e3 commit 7d81430
Show file tree
Hide file tree
Showing 34 changed files with 381 additions and 35 deletions.
4 changes: 4 additions & 0 deletions Monika After Story/game/event-handler.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ init -999 python in mas_ev_data_ver:
return isinstance(val, __builtin__.list) or isinstance(val, tuple)


def _verify_tuli_nn(val):
return _verify_tuli(val, False)


def _verify_tuli_aff(val, allow_none=True):
if val is None:
return allow_none
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 84 additions & 23 deletions Monika After Story/game/script-holidays.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -6004,8 +6004,29 @@ label mas_f14_autoload_check:
if not persistent._mas_f14_in_f14_mode and mas_isMoniNormal(higher=True):
persistent._mas_f14_in_f14_mode = True

#Force sundress
monika_chr.change_clothes(mas_clothes_sundress_white, by_user=False, outfit_mode=True)
has_sundress = mas_SELisUnlocked(mas_clothes_sundress_white)
has_shoulderless = mas_SELisUnlocked(mas_clothes_blackpink_dress)
#TODO: Generalize this
lingerie_eligible = (
mas_canShowRisque()
and not mas_SELisUnlocked(mas_clothes_vday_lingerie)
and has_sundress
)

#NOTE: This lingerie_eligible check is so we don't grant lingeire on the same F14 we did black/pink dress
#(handled within f14 intro pathing)
if (
not has_sundress
or (has_shoulderless and random.random() > 0.5)
or lingerie_eligible
):
monika_chr.change_clothes(mas_clothes_sundress_white, by_user=False, outfit_mode=True)

else:
monika_chr.change_clothes(mas_clothes_blackpink_dress, by_user=False, outfit_mode=True)
#Add to hol map as a failsafe if we don't have new clothes and this has already been seen, and player is < 1k aff
mas_addClothesToHolidayMap(mas_clothes_blackpink_dress)

monika_chr.save()
renpy.save_persistent()

Expand Down Expand Up @@ -6082,7 +6103,7 @@ init 5 python:
label mas_f14_monika_valentines_intro:
#Set the spent flag to True
$ persistent._mas_f14_spent_f14 = True
$ mas_gainAffection(5, bypass=True)
$ mas_gainAffection(10, bypass=True)

#Prevent nts stuff for upset- since they don't get the rest of the event.
if mas_isMoniUpset(lower=True):
Expand All @@ -6091,15 +6112,18 @@ label mas_f14_monika_valentines_intro:
m "Thanks for visiting me, I hope you have a good day."
return

$ lingerie_eligible = (
mas_canShowRisque()
and not mas_SELisUnlocked(mas_clothes_vday_lingerie)
and mas_SELisUnlocked(mas_clothes_sundress_white)
)
python:
has_sundress = mas_SELisUnlocked(mas_clothes_sundress_white)
has_shoulderless = mas_SELisUnlocked(mas_clothes_blackpink_dress)
lingerie_eligible = (
mas_canShowRisque()
and not mas_SELisUnlocked(mas_clothes_vday_lingerie)
and has_sundress
)

$ mas_addClothesToHolidayMap(mas_clothes_sundress_white)
#rmall this because reset runs before we've registered this outfit
$ mas_rmallEVL("mas_change_to_def")
mas_addClothesToHolidayMap(mas_clothes_sundress_white)
#rmall this because reset runs before we've registered this outfit
mas_rmallEVL("mas_change_to_def")

m 1hub "[player]!"
m 1hua "Do you know what day it is?"
Expand Down Expand Up @@ -6130,13 +6154,13 @@ label mas_f14_monika_valentines_intro:
if lingerie_eligible and not mas_hasUnlockedClothesWithExprop("lingerie"):
call mas_lingerie_intro(holiday_str="on Valentine's Day", lingerie_choice=mas_clothes_vday_lingerie)

# first time seeing sundress or non-first time seeing lingerie
elif not mas_SELisUnlocked(mas_clothes_sundress_white) or lingerie_eligible:
# first time seeing sundress/shoulderless or non-first time seeing lingerie
elif not has_sundress or not has_shoulderless or lingerie_eligible:
m 3wub "Oh!"
m 3tsu "I have a little surprise for you...{w=1}I think you're gonna like it, ehehe~"

# lingerie
if mas_SELisUnlocked(mas_clothes_sundress_white):
if lingerie_eligible:
call mas_clothes_change(outfit=mas_clothes_vday_lingerie, outfit_mode=True, exp="monika 2rkbsu", restore_zoom=False, unlock=True)
pause 2.0
show monika 2ekbsu
Expand All @@ -6151,9 +6175,16 @@ label mas_f14_monika_valentines_intro:
m 2hubsb "But now that I've done it before, I really enjoy dressing like this for you!"
m 3tkbsu "I hope you enjoy it too~"

# shoulderless dress
elif has_sundress:
call mas_clothes_change(mas_clothes_blackpink_dress, unlock=True, outfit_mode=True)
m 2eua "Well...{w=0.3}what do you think?"
call mas_f14_intro_blackpink_dress

# sundress
else:
call mas_clothes_change(mas_clothes_sundress_white, unlock=True, outfit_mode=True)
$ mas_selspr.json_sprite_unlock(mas_acs_musicnote_necklace_gold)
m 2eua "..."
m 2eksdla "..."
m 2rksdlb "Ahaha...{w=1}{nw}"
Expand All @@ -6165,11 +6196,10 @@ label mas_f14_monika_valentines_intro:
else:
# don't currently have access to sundress or wearing inappropraite outfit for f14
if (
monika_chr.clothes != mas_clothes_sundress_white
monika_chr.clothes not in (mas_clothes_sundress_white, mas_clothes_blackpink_dress)
and (
monika_chr.is_wearing_clothes_with_exprop("costume")
or monika_chr.clothes == mas_clothes_def
or monika_chr.clothes == mas_clothes_blazerless
or monika_chr.clothes in (mas_clothes_def, mas_clothes_blazerless)
or mas_isMoniEnamored(lower=True)
)
):
Expand Down Expand Up @@ -6215,14 +6245,10 @@ label mas_f14_monika_valentines_intro:

# not returning from a date, not getting lingerie
else:
# already have sundress unlocked
if mas_SELisUnlocked(mas_clothes_sundress_white):
call mas_f14_intro_generic

# first time getting sundress
else:
if not has_sundress:
python:
store.mas_selspr.unlock_clothes(mas_clothes_sundress_white)
mas_selspr.json_sprite_unlock(mas_acs_musicnote_necklace_gold)
# TODO: generalize this under one function
store.mas_selspr.save_selectables()
renpy.save_persistent()
Expand All @@ -6235,6 +6261,13 @@ label mas_f14_monika_valentines_intro:
m 3tsb "Ahaha! I'm just kidding...{w=0.5}do you like my outfit?"
call mas_f14_sun_dress_outro

elif not has_shoulderless:
m 2eua "What do you think of my outfit?"
call mas_f14_intro_blackpink_dress

else:
call mas_f14_intro_generic

m 1fkbsu "I love you so much."
m 1hubfb "Happy Valentine's Day, [player]~"

Expand All @@ -6259,6 +6292,34 @@ label mas_f14_intro_generic:
m 1fkbsu "It really doesn't matter to me as long as we're together."
return

label mas_f14_intro_blackpink_dress:
#Do all unlocks here as a common path
python:
items_to_unlock = (
mas_clothes_blackpink_dress,
mas_acs_diamond_necklace_pink,
mas_acs_pinkdiamonds_hairclip,
mas_acs_ribbon_black_pink,
mas_acs_earrings_diamond_pink
)
for item in items_to_unlock:
mas_selspr.json_sprite_unlock(item)

#Add to holiday map
mas_addClothesToHolidayMap(mas_clothes_blackpink_dress)

#Save
mas_selspr.save_selectables()
renpy.save_persistent()

m 4hub "I think it's really cute!"
m 2eub "There's just something about that black and pink combination...{w=0.3}they just go so well together!"
m 2rtd "Seems like it would be a great outfit to wear for a date..."
m 2eua "..."
m 2tuu "..."
m 7hub "Ahaha~"
return

#######################[HOL050] TOPICS

init 5 python:
Expand Down
13 changes: 13 additions & 0 deletions Monika After Story/game/updates.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,19 @@ label v0_3_1(version=version): # 0.3.1
return

# non generic updates go here
# 0.12.8
label v0_12_8(version="v0_12_8"):
python hide:
sundress_white_data = store.mas_utils.pdget(
"sundress_white",
persistent._mas_selspr_clothes_db,
validator=store.mas_ev_data_ver._verify_tuli_nn,
defval=(False, )
)
if len(sundress_white_data) > 0 and sundress_white_data[0]:
persistent._mas_selspr_acs_db["musicnote_necklace_gold"] = (True, True)

return

# 0.12.7.1
label v0_12_7_1(version="v0_12_7_1"):
Expand Down
115 changes: 103 additions & 12 deletions Monika After Story/game/zz_selector.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ init -100 python in mas_selspr:
"wear": "Can you wear a choker?",
},
"clothes": {
"_not_group": True,
"_ev": "monika_clothes_select",
"change": "Can you change your clothes?",
# TODO: min-items
Expand All @@ -56,6 +57,7 @@ init -100 python in mas_selspr:
"wear": "Can you wear earrings?",
},
"hair": {
"_not_group": True,
"_ev": "monika_hair_select",
"change": "Can you change your hairstyle?",
# TODO: min-items
Expand All @@ -78,6 +80,12 @@ init -100 python in mas_selspr:
"change": "Can you change the flower in your hair?",
"wear": "Can you wear a flower in your hair?",
},
"necklace": {
"_ev": "monika_necklace_select",
"_min-items": 1,
"change": "Can you change your necklace?",
"wear": "Can you wear a necklace?",
},
"ribbon": {
"_ev": "monika_ribbon_select",
"_min-items": 1,
Expand All @@ -88,6 +96,54 @@ init -100 python in mas_selspr:
}


def _add_prompt(
key,
ev_label,
change,
wear,
_min_items=1,
_rule=None,
_not_group=False,
):
"""
Adds a prompt to the prompt map - basically like registering a
selector.
NOTE: this is private for now - should consider an actual
"register selector" function as a public API instead.
NOTE: this will overwrite existing data
IN:
key - the prompt key - for ACS, this should be group type
ev_label - event label associated with the selector
change - prompt to use when Monika currently wearing the ACS
wear - prompt to use when Monika not wearing the ACS
_min_items - minimum number of items to unlock the selector
(Default: 1)
_rule - function evaluated whenever unocking a selector -
should return True if the selector should be unlocked
(Default: None)
_not_group - True if this is prompt is not associated with an ACS
group
(Default: False)
"""
data = {
"_ev": ev_label,
"_min-items": _min_items,
"change": change,
"wear": wear,
}

if _rule is not None:
data["_rule"] = _rule

if _not_group:
data["_not_group"] = True

PROMPT_MAP[key] = data


def check_prompt(key):
"""
Checks if the prompt's rule passes.
Expand Down Expand Up @@ -146,6 +202,29 @@ init -100 python in mas_selspr:
return key in PROMPT_MAP


def iter_prompt():
"""
Creates an interable of prompt keys
RETURNS: iter (generator) of prompt keys
"""
for prompt_key, prompt_data in iter_prompt_data():
yield prompt_key


def iter_prompt_data():
"""
Creates an iterable of prompt map data
RETURNS: iter (generator) of tuples:
[0]: prompt key
[1]: prompt data
"""
for prompt_key in PROMPT_MAP:
if "_not_group" not in PROMPT_MAP[prompt_key]:
yield (prompt_key, PROMPT_MAP[prompt_key])


def lock_prompt(key):
"""
Locks ev with the given key
Expand Down Expand Up @@ -202,7 +281,7 @@ init -100 python in mas_selspr:
set_prompt("ribbon", "wear")

# now for the rest
for group in GRP_TOPIC_LIST:
for group in iter_prompt():
if group != "ribbon":
if store.monika_chr.is_wearing_acs_type(group):
set_prompt(group, "change")
Expand Down Expand Up @@ -607,14 +686,6 @@ init -10 python in mas_selspr:
HAIR_SEL_SL = []
CLOTH_SEL_SL = []

GRP_TOPIC_LIST = [
"choker",
"earrings",
"hat",
"left-hair-clip",
"left-hair-flower",
"ribbon",
]

# generic select dlg quips go here
# should be as neutral as possible to go with any kind of acs
Expand Down Expand Up @@ -678,7 +749,7 @@ init -10 python in mas_selspr:
NOTE: also checks the prompt rule
"""
#ACS
for group in GRP_TOPIC_LIST:
for group in iter_prompt():
min_items = get_minitems(group, 1)
if (
check_prompt(group)
Expand All @@ -691,9 +762,9 @@ init -10 python in mas_selspr:

def _switch_to_wear_prompts():
"""
Switches all prompts for grp_topic_list topics to use their wear prompt.
Switches all prompts for groups to use their wear prompt.
"""
for group in GRP_TOPIC_LIST:
for group in iter_prompt():
set_prompt(group, "wear")


Expand Down Expand Up @@ -4306,4 +4377,24 @@ label monika_earrings_select:

#### end earrings

init 5 python:
addEvent(
Event(
persistent.event_database,
eventlabel="monika_necklace_select",
category=["appearance"],
prompt=store.mas_selspr.get_prompt("necklace", "change"),
pool=True,
unlocked=False,
rules={"no_unlock": None},
aff_range=(mas_aff.HAPPY, None)
),
restartBlacklist=True,
markSeen=True
)

label monika_necklace_select:
call mas_selector_generic_sidebar_select_acs("necklace", idle_exp="monika 6eua")
return
#### end necklace selector
############### END SELECTOR TOPICS ###########################################
Loading

0 comments on commit 7d81430

Please sign in to comment.