From 81748af47e2060f5a1fa77acca25d75003032d56 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 15 May 2024 20:26:23 +0100 Subject: [PATCH] Bug fixes * Fixed intro events --- game/scripts/animations/ani_duel.rpy | 24 +-- game/scripts/interface/screens.rpy | 4 +- game/scripts/minigames/dueling/snape_duel.rpy | 140 +++++++++--------- 3 files changed, 80 insertions(+), 88 deletions(-) diff --git a/game/scripts/animations/ani_duel.rpy b/game/scripts/animations/ani_duel.rpy index 701c1b7b..a9e0007e 100644 --- a/game/scripts/animations/ani_duel.rpy +++ b/game/scripts/animations/ani_duel.rpy @@ -1,6 +1,7 @@ # Animation that shows a broken glass effect when the duel starts. image glass: + zoom 2.0 contains: "images/dueling/snape/glass/gradient.webp" @@ -31,7 +32,6 @@ image glass: "images/dueling/snape/glass/crack.webp" image smoke: - zoom 0.5 alpha 1.0 "images/animation/smoke_01.webp" pause.1 @@ -43,6 +43,7 @@ image smoke: pause.1 image teleport_ani: + zoom 2.0 "images/magic/magic4.webp" pause.05 "images/magic/magic5.webp" @@ -53,6 +54,7 @@ image teleport_ani: pause.3 image heal_ani: + zoom 2.0 "images/magic/heal01.webp" pause.06 "images/magic/heal02.webp" @@ -91,6 +93,7 @@ image heal_ani: pause.06 image heal_02: # Smaller version of heal. 40% of the original size. + zoom 2.0 "images/magic/heal_02/heal01.webp" pause.06 "images/magic/heal_02/heal02.webp" @@ -131,6 +134,7 @@ image heal_02: # Smaller version of heal. 40% of the original size. ### GENIE SPELL ANIMATION ### image spell_ani: + zoom 2.0 "images/animation/spell01.webp" pause.1 "images/animation/spell02.webp" @@ -167,7 +171,6 @@ image spell_ani: pause.1 image ch_sna duel_01: - zoom 0.5 "images/dueling/snape/snape_01.webp" pause.13 "images/dueling/snape/snape_02.webp" @@ -179,7 +182,6 @@ image ch_sna duel_01: repeat image ch_gen duel_01: - zoom 0.5 "images/dueling/snape/gen_01.webp" pause.13 "images/dueling/snape/gen_02.webp" @@ -191,7 +193,6 @@ image ch_gen duel_01: repeat image ch_gen guard: - zoom 0.5 "images/dueling/snape/guard_01.webp" pause.13 "images/dueling/snape/guard_02.webp" @@ -203,7 +204,6 @@ image ch_gen guard: repeat image ch_gen barb: - zoom 0.5 "images/dueling/snape/barb_01.webp" pause.13 "images/dueling/snape/barb_02.webp" @@ -211,11 +211,9 @@ image ch_gen barb: repeat image genie_no_magic: - zoom 0.5 "images/dueling/snape/no_magic.webp" image ch_sna defend: - zoom 0.5 "images/dueling/snape/snape_defend_01.webp" pause.13 "images/dueling/snape/snape_defend_02.webp" @@ -227,7 +225,6 @@ image ch_sna defend: repeat image snape_attack: - zoom 0.5 "images/dueling/snape/sna_attack_01.webp" pause.13 "images/dueling/snape/sna_attack_02.webp" @@ -251,7 +248,6 @@ image snape_attack: repeat image snape_attack_guard: - zoom 0.5 "images/dueling/snape/sna_attack_guard_01.webp" pause.08 "images/dueling/snape/sna_attack_guard_02.webp" @@ -275,7 +271,6 @@ image snape_attack_guard: repeat image genie_attack: - zoom 0.5 "images/dueling/snape/genie_attack_01.webp" pause.15 "images/dueling/snape/genie_attack_02.webp" @@ -322,7 +317,6 @@ image genie_attack: # Snape is in defence stance. Barbarian throws axes at him. image snape_defend: - zoom 0.5 "images/dueling/snape/sna_block_01.webp" pause.15 "images/dueling/snape/sna_block_02.webp" @@ -360,15 +354,12 @@ image snape_defend: repeat image snape_summon: - zoom 0.5 "images/dueling/snape/snape_casting_01.webp" image snape_lost: - zoom 0.5 "images/dueling/snape/snape.webp" image pentogram: - zoom 0.5 alpha 0.0 linear .5 alpha 1.0 "images/dueling/snape/pen_01.webp" @@ -376,7 +367,6 @@ image pentogram: repeat image hand: #Hand appears. - zoom 0.5 "images/dueling/snape/hand_01.webp" pause.1 "images/dueling/snape/hand_02.webp" @@ -412,7 +402,6 @@ image hand: #Hand appears. repeat image hand_genie: #Hand attacks Genie. - zoom 0.5 "images/dueling/snape/hand_genie_01.webp" pause.13 "images/dueling/snape/hand_genie_02.webp" @@ -441,7 +430,6 @@ image hand_genie: #Hand attacks Genie. pause.1 image hand_guard: #Hand attacks the guard. - zoom 0.5 "images/dueling/snape/hand_guard_01.webp" pause.1 "images/dueling/snape/hand_guard_02.webp" @@ -478,6 +466,7 @@ image hand_guard: #Hand attacks the guard. pause.1 image bouquet_appear: + zoom 2.0 "images/animation/Bouquet0.webp" pause.1 "images/animation/Bouquet1.webp" @@ -490,6 +479,7 @@ image bouquet_appear: pause.8 image flower_appear: + zoom 2.0 "images/animation/Flower0.webp" pause.1 "images/animation/Flower1.webp" diff --git a/game/scripts/interface/screens.rpy b/game/scripts/interface/screens.rpy index 9da22fe7..9dc7df21 100644 --- a/game/scripts/interface/screens.rpy +++ b/game/scripts/interface/screens.rpy @@ -66,9 +66,9 @@ screen gfx_effect(start_x=None, start_y=None, target_x=None, target_y=None, img= zorder 30 if target_x: - add img xanchor xanchor yanchor yanchor zoom zoom at move_to(start_x, start_y, target_x, target_y, duration) + add img xanchor xanchor yanchor yanchor zoom zoom at move_to(start_x*2, start_y*2, target_x*2, target_y*2, duration) else: - add img xanchor xanchor yanchor yanchor zoom zoom xpos start_x ypos start_y + add img xanchor xanchor yanchor yanchor zoom zoom xpos start_x*2 ypos start_y*2 timer timer action Hide("gfx_effect") screen ctc(): diff --git a/game/scripts/minigames/dueling/snape_duel.rpy b/game/scripts/minigames/dueling/snape_duel.rpy index e4fd7549..005648aa 100644 --- a/game/scripts/minigames/dueling/snape_duel.rpy +++ b/game/scripts/minigames/dueling/snape_duel.rpy @@ -18,7 +18,7 @@ init python: genie = "" def show(self,image=None,x=720,y=250,z=5): - renpy.show(image,at_list=[Position(xpos=x, ypos=y, xanchor="center", yanchor="center")],layer="screens",zorder=z) + renpy.show(image,at_list=[Position(xpos=x*2, ypos=y*2, xanchor="center", yanchor="center")],layer="screens",zorder=z) def hide(self,image=None): renpy.hide(image,layer="screens") @@ -95,58 +95,56 @@ label duel_main: screen duel_buttons(): zorder 3 - imagebutton: # tease - xpos 726 - yalign 1.0 - focus_mask True - if not used_tease and not in_action: - idle "images/dueling/snape/attack_tease.webp" - hover image_hover("images/dueling/snape/attack_tease.webp") - action [Jump("main_tease")] - else: - idle gray_tint("images/dueling/snape/attack_tease.webp") - if not in_action: - hover image_hover(gray_tint("images/dueling/snape/attack_tease.webp")) + hbox: + align (1.0, 1.0) + spacing -30 + at transform: + zoom 1.5 + + imagebutton: # tease + focus_mask True + if not used_tease and not in_action: + idle "images/dueling/snape/attack_tease.webp" + hover image_hover("images/dueling/snape/attack_tease.webp") action [Jump("main_tease")] - imagebutton: # attack - xpos 802 - yalign 1.0 - focus_mask True - if not in_action: - idle "images/dueling/snape/attack_melee.webp" - hover image_hover("images/dueling/snape/attack_melee.webp") - action [Jump("main_attack")] - else: - idle gray_tint("images/dueling/snape/attack_melee.webp") + else: + idle gray_tint("images/dueling/snape/attack_tease.webp") + if not in_action: + hover image_hover(gray_tint("images/dueling/snape/attack_tease.webp")) + action [Jump("main_tease")] + imagebutton: # attack + focus_mask True if not in_action: - hover image_hover(gray_tint("images/dueling/snape/attack_melee.webp")) + idle "images/dueling/snape/attack_melee.webp" + hover image_hover("images/dueling/snape/attack_melee.webp") action [Jump("main_attack")] - imagebutton: # aguard - xpos 868 - yalign 1.0 - focus_mask True - if not in_action: - idle "images/dueling/snape/attack_defend.webp" - hover image_hover("images/dueling/snape/attack_defend.webp") - action [Jump("main_defend")] - else: - idle gray_tint("images/dueling/snape/attack_defend.webp") + else: + idle gray_tint("images/dueling/snape/attack_melee.webp") + if not in_action: + hover image_hover(gray_tint("images/dueling/snape/attack_melee.webp")) + action [Jump("main_attack")] + imagebutton: # aguard + focus_mask True if not in_action: - hover image_hover(gray_tint("images/dueling/snape/attack_defend.webp")) + idle "images/dueling/snape/attack_defend.webp" + hover image_hover("images/dueling/snape/attack_defend.webp") action [Jump("main_defend")] - imagebutton: # item - xpos 954 - yalign 1.0 - focus_mask True - if states.healing_potions > 0 and not in_action: - idle "images/dueling/snape/attack_item.webp" - hover image_hover("images/dueling/snape/attack_item.webp") - action [Jump("main_potion")] - else: - idle gray_tint("images/dueling/snape/attack_item.webp") - if not in_action: - hover image_hover(gray_tint("images/dueling/snape/attack_item.webp")) + else: + idle gray_tint("images/dueling/snape/attack_defend.webp") + if not in_action: + hover image_hover(gray_tint("images/dueling/snape/attack_defend.webp")) + action [Jump("main_defend")] + imagebutton: # item + focus_mask True + if states.healing_potions > 0 and not in_action: + idle "images/dueling/snape/attack_item.webp" + hover image_hover("images/dueling/snape/attack_item.webp") action [Jump("main_potion")] + else: + idle gray_tint("images/dueling/snape/attack_item.webp") + if not in_action: + hover image_hover(gray_tint("images/dueling/snape/attack_item.webp")) + action [Jump("main_potion")] label main_tease: $ in_action = True @@ -427,7 +425,7 @@ screen duel(): zorder 2 if pentogram: - add "pentogram" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "pentogram" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") if duel_OBJ.genie in ["attack"] or duel_OBJ.snape in ["attack","block"]: pass @@ -435,35 +433,38 @@ screen duel(): if duel_OBJ.genie == "hand": pass elif duel_OBJ.genie == "no_magic": - add "genie_no_magic" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "genie_no_magic" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") elif duel_OBJ.genie == "defend": - add "ch_gen guard" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "ch_gen guard" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") elif duel_OBJ.genie == "barb": - add "ch_gen barb" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "ch_gen barb" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") else: - add "ch_gen duel_01" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "ch_gen duel_01" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") if duel_OBJ.snape == "hand": pass elif duel_OBJ.snape == "lost": - add "snape_lost" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "snape_lost" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") elif duel_OBJ.snape == "defend": - add "ch_sna defend" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "ch_sna defend" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") else: - add "ch_sna duel_01" at Position(xpos=720, ypos=250, xanchor="center", yanchor="center") + add "ch_sna duel_01" at Position(xpos=720*2, ypos=250*2, xanchor="center", yanchor="center") screen hp_bar(): zorder 3 ### health bar is 271 px wide ### - add "images/dueling/snape/hp_bar_02.webp" xpos int((genie_hp-genie_max_hp)/(genie_max_hp/271.0)) ypos 0 - add "images/dueling/snape/hp_bar.webp" #Genie avatr pic. + fixed: + at transform: + zoom 1.8 + add "images/dueling/snape/hp_bar_02.webp" xpos int((genie_hp-genie_max_hp)/(genie_max_hp/271.0)) ypos 0 + add "images/dueling/snape/hp_bar.webp" #Genie avatr pic. - ### health bar is 727 px wide ### - add "images/dueling/snape/hp_bar_11.webp" #Black background for HP bar. - add "images/dueling/snape/hp_bar_12.webp" xpos int((snape_max_hp-snape_hp)/(snape_max_hp/727.0)) ypos 0 - add "images/dueling/snape/hp_bar_10.webp" #Snape avatr pic. + ### health bar is 727 px wide ### + add "images/dueling/snape/hp_bar_11.webp" #Black background for HP bar. + add "images/dueling/snape/hp_bar_12.webp" xpos int((snape_max_hp-snape_hp)/(snape_max_hp/727.0)) ypos 0 + add "images/dueling/snape/hp_bar_10.webp" #Snape avatr pic. use duel_buttons @@ -473,6 +474,7 @@ screen snape_defends(xx=0): transform damage_transform: alpha 1.0 + zoom 2.0 linear 1.5 yoffset -100 alpha 0.0 screen duel_damage(value=0, attacking=True): @@ -481,11 +483,11 @@ screen duel_damage(value=0, attacking=True): style "empty" at damage_transform if attacking: - xpos 780 - ypos 120 + xpos 780*2 + ypos 120*2 else: - xpos 450 - ypos 120 + xpos 450*2 + ypos 120*2 add "images/dueling/damage/"+str(value)+".webp" screen duel_heal(value=300, player=True): @@ -494,11 +496,11 @@ screen duel_heal(value=300, player=True): style "empty" at damage_transform if not player: - xpos 780 - ypos 120 + xpos 780*2 + ypos 120*2 else: - xpos 450 - ypos 120 + xpos 450*2 + ypos 120*2 add "images/dueling/damage/plus_"+str(value)+".webp" ### SNAPE LOSES ###