Implement new house emblems, banners, and house points displayable, sunset top bar

This commit is contained in:
LoafyLemon 2024-06-25 20:57:56 +01:00
parent a97391b10c
commit dc0e34e5fc
23 changed files with 113 additions and 301 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
game/gui/creamy_pumpkin_pie/banners/banners_gryffindor.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
game/gui/creamy_pumpkin_pie/banners/banners_hufflepuff.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
game/gui/creamy_pumpkin_pie/banners/banners_leading.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
game/gui/creamy_pumpkin_pie/banners/banners_ravenclaw.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
game/gui/creamy_pumpkin_pie/banners/banners_slytherin.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

View File

@ -872,7 +872,6 @@ label hermione_intro_E4:
# Gryffindor gets shafted by Snape and has 50% of Slytherin's points.
$ states.env.gryffindor = int(states.env.gryffindor*0.5)
call update_ui_points
# Wear default outfit. She's in shock so she didn't change.
$ hermione.equip(her_outfit_default)

View File

@ -113,7 +113,6 @@ label day_start:
call update_genie
call room(states.room, stop_sound=False, hide_screens=False)
call update_ui_points
# Equip scheduled outfits
if states.lun.wardrobe_scheduling:

View File

@ -214,39 +214,22 @@ label cheats:
menu .points:
"-Add 200 Slytherin Points-" (icon="interface/icons/small/slyt.webp"):
$ states.env.slytherin += 200
call update_ui_points
nar "Added 200 points to Slytherin!"
"-Remove 200 Slytherin Points-" (icon="interface/icons/small/slyt.webp"):
$ states.env.slytherin -= 200
call update_ui_points
nar "Removed 200 points from Slytherin!"
"-Add 200 Gryffindor Points-" (icon="interface/icons/small/gryf.webp"):
$ states.env.gryffindor += 200
call update_ui_points
nar "Added 200 points to Gryffindor!"
"-Remove 200 Gryffindor Points-" (icon="interface/icons/small/gryf.webp"):
$ states.env.gryffindor -= 200
call update_ui_points
nar "Removed 200 points from Gryffindor!"
"-Add 200 Ravenclaw Points-" (icon="interface/icons/small/rave.webp"):
$ states.env.ravenclaw += 200
call update_ui_points
nar "Added 200 points to Ravenclaw!"
"-Remove 200 Ravenclaw Points-" (icon="interface/icons/small/rave.webp"):
$ states.env.ravenclaw -= 200
call update_ui_points
nar "Removed 200 points from Ravenclaw!"
"-Add 200 Hufflepuff Points-" (icon="interface/icons/small/huff.webp"):
$ states.env.hufflepuff += 200
call update_ui_points
nar "Added 200 points to Hufflepuff!"
"-Remove 200 Hufflepuff Points-" (icon="interface/icons/small/huff.webp"):
$ states.env.hufflepuff -= 200
call update_ui_points
nar "Removed 200 points from Hufflepuff!"
"-Reset all points-":
$ states.env.slytherin = states.env.gryffindor = states.env.ravenclaw = states.env.hufflepuff = 0
call update_ui_points
nar "House points reset!"
"-Back-":
jump cheats

View File

@ -1,19 +1,17 @@
### House-Points ###
init python:
def house_points_daily():
progress_factor = max(1, int(math.log(states.env.day) * 5))
# Bonuses based on Tonks and Snape friendship stat
bonus_g = states.her.tier
bonus_r = states.cho.tier + states.lun.tier
bonus_h = int((states.ton.level / 100.0) * (progress_factor * 0.7))
bonus_s = int((states.sna.level / 100.0) * (progress_factor * 0.7))
bonus_r = states.cho.tier + states.lun.tier
house_points = {
"gryffindor": states.env.gryffindor,
"hufflepuff": states.env.hufflepuff,
"ravenclaw": states.env.ravenclaw,
"hufflepuff": states.env.hufflepuff,
"slytherin": states.env.slytherin
}
@ -21,8 +19,8 @@ init python:
factors = {
"gryffindor": (bonus_g, max(house_points["hufflepuff"], house_points["ravenclaw"], house_points["slytherin"])),
"hufflepuff": (bonus_h, max(house_points["gryffindor"], house_points["ravenclaw"], house_points["slytherin"])),
"ravenclaw": (bonus_r, max(house_points["gryffindor"], house_points["hufflepuff"], house_points["slytherin"])),
"hufflepuff": (bonus_h, max(house_points["gryffindor"], house_points["ravenclaw"], house_points["slytherin"])),
"slytherin": (bonus_s, max(house_points["gryffindor"], house_points["hufflepuff"], house_points["ravenclaw"]))
}
@ -35,3 +33,60 @@ init python:
points[house] = renpy.random.randint(point // 2, point) + house_points[house]
states.env.set_points(points)
def house_points_anchors():
yanchors = [0, 0.15, 0.3, 0.45]
housepoints_sorted = sorted((states.env.slytherin, states.env.gryffindor, states.env.ravenclaw, states.env.hufflepuff), reverse=True)
g = housepoints_sorted.index(states.env.gryffindor)
r = housepoints_sorted.index(states.env.ravenclaw)
h = housepoints_sorted.index(states.env.hufflepuff)
s = housepoints_sorted.index(states.env.slytherin)
return [yanchors[g], yanchors[r], yanchors[h], yanchors[s]]
screen house_points():
layer "interface"
tag house_points
zorder 0
default start_yanchors = states.env.banners_yanchors # Updated externally through set_points function
default yanchors = house_points_anchors()
hbox:
spacing 10
xfill False
xalign 0.5
add "house_points_banner_small_gryffindor" at house_points_rollout(start_yanchors[0], yanchors[0])
add "house_points_banner_small_ravenclaw" at house_points_rollout(start_yanchors[1], yanchors[1])
add "house_points_banner_small_hufflepuff" at house_points_rollout(start_yanchors[2], yanchors[2])
add "house_points_banner_small_slytherin" at house_points_rollout(start_yanchors[3], yanchors[3])
at house_points_show_hide
timer 6.4 action Hide("house_points")
transform house_points_rollout(start_yanchor, yanchor):
subpixel True
yanchor start_yanchor
linear 1 yanchor yanchor
transform house_points_show_hide:
on show:
alpha 0.0
events False
easein 0.4 alpha 1.0
on hide:
alpha 1.0
events False
easein 0.4 alpha 0.0
image house_points_banner_small_gryffindor = Image("/gui/creamy_pumpkin_pie/banners/banners_gryffindor.png", oversample=16)
image house_points_banner_small_ravenclaw = Image("/gui/creamy_pumpkin_pie/banners/banners_ravenclaw.png", oversample=16)
image house_points_banner_small_hufflepuff = Image("/gui/creamy_pumpkin_pie/banners/banners_hufflepuff.png", oversample=16)
image house_points_banner_small_slytherin = Image("/gui/creamy_pumpkin_pie/banners/banners_slytherin.png", oversample=16)
image house_points_emblem_small_gryffindor = Image("/gui/creamy_pumpkin_pie/banners/banners_gryffindor_emblem.png", oversample=16)
image house_points_emblem_small_ravenclaw = Image("/gui/creamy_pumpkin_pie/banners/banners_ravenclaw_emblem.png", oversample=16)
image house_points_emblem_small_hufflepuff = Image("/gui/creamy_pumpkin_pie/banners/banners_hufflepuff_emblem.png", oversample=16)
image house_points_emblem_small_slytherin = Image("/gui/creamy_pumpkin_pie/banners/banners_slytherin_emblem.png", oversample=16)

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,6 @@ label duel:
# Hide all the screens.
hide screen notes #A bunch of notes poping out with a "win" sound effect.
hide screen ui_top_bar
hide screen ctc
hide screen snape_defends
call gen_chibi("hide")
@ -511,7 +510,6 @@ label snape_lost:
$ duel_OBJ.in_progress = False
hide screen hp_bar
hide screen duel_damage
show screen ui_top_bar
with flashbulb
pause 1
$ states.sna.ev.intro.duel_complete = True

View File

@ -29,10 +29,6 @@ label room(room=None, hide_screens=True, stop_sound=True):
if mailbox.get_parcels():
$ parcel_OBJ.hidden = False
# User interface
call update_ui_points
show screen ui_top_bar
elif room == "weasley_store":
show screen weasley_store_room

Some files were not shown because too many files have changed in this diff Show More