diff --git a/assets/decor/entrance_bg_objects.png b/assets/decor/entrance_bg_objects.png index 09f4bf7..c8ce138 100644 Binary files a/assets/decor/entrance_bg_objects.png and b/assets/decor/entrance_bg_objects.png differ diff --git a/resources/characters/duchex.tres b/resources/characters/duchex.tres index f577978..967ede6 100644 --- a/resources/characters/duchex.tres +++ b/resources/characters/duchex.tres @@ -24,6 +24,6 @@ preferences = Dictionary[ExtResource("3_s53hh"), int]({ ExtResource("3_q0kni"): 0, ExtResource("6_f6mh3"): 0, ExtResource("7_nck5w"): 4, -ExtResource("4_s53hh"): 3 +ExtResource("4_s53hh"): 2 }) metadata/_custom_type_script = "uid://bwam50qxikpw4" diff --git a/resources/guests/bishop_blind.tres b/resources/guests/bishop_blind.tres new file mode 100644 index 0000000..2bc6dc4 --- /dev/null +++ b/resources/guests/bishop_blind.tres @@ -0,0 +1,11 @@ +[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://dw8ckdqphstum"] + +[ext_resource type="Resource" uid="uid://c2v05fqr7cwll" path="res://resources/characters/bishop.tres" id="1_1jsty"] +[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_bjdg5"] +[ext_resource type="Resource" uid="uid://vsvgpvluq7sh" path="res://resources/masks/blind.tres" id="2_ilfyw"] + +[resource] +script = ExtResource("2_bjdg5") +character = ExtResource("1_1jsty") +face_mask = ExtResource("2_ilfyw") +metadata/_custom_type_script = "uid://b8peyg02l0mrn" diff --git a/resources/guests/bishop_unmasked.tres b/resources/guests/bishop_unmasked.tres new file mode 100644 index 0000000..a81b2b8 --- /dev/null +++ b/resources/guests/bishop_unmasked.tres @@ -0,0 +1,9 @@ +[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://k561jqkq8jpa"] + +[ext_resource type="Resource" uid="uid://c2v05fqr7cwll" path="res://resources/characters/bishop.tres" id="1_srvwa"] +[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="3_u3km6"] + +[resource] +script = ExtResource("3_u3km6") +character = ExtResource("1_srvwa") +metadata/_custom_type_script = "uid://b8peyg02l0mrn" diff --git a/resources/guests/duchex_falsy.tres b/resources/guests/duchex_falsy.tres new file mode 100644 index 0000000..d494a7b --- /dev/null +++ b/resources/guests/duchex_falsy.tres @@ -0,0 +1,11 @@ +[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://bhigq5xthp5ee"] + +[ext_resource type="Resource" uid="uid://c87odmn680x7" path="res://resources/characters/duchex.tres" id="1_2k678"] +[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_lfr00"] +[ext_resource type="Resource" uid="uid://kau80jesm22w" path="res://resources/masks/falsy.tres" id="2_r25b7"] + +[resource] +script = ExtResource("2_lfr00") +character = ExtResource("1_2k678") +mouth_mask = ExtResource("2_r25b7") +metadata/_custom_type_script = "uid://b8peyg02l0mrn" diff --git a/resources/guests/duke_falsy.tres b/resources/guests/duke_falsy.tres new file mode 100644 index 0000000..1665375 --- /dev/null +++ b/resources/guests/duke_falsy.tres @@ -0,0 +1,11 @@ +[gd_resource type="Resource" script_class="MaskedChara" format=3 uid="uid://bbnabwyoewgym"] + +[ext_resource type="Resource" uid="uid://gy4ygqrjj5ys" path="res://resources/characters/duke.tres" id="1_iaxr1"] +[ext_resource type="Script" uid="uid://b8peyg02l0mrn" path="res://scenes/managers/masked_chara.gd" id="2_7bwff"] +[ext_resource type="Resource" uid="uid://kau80jesm22w" path="res://resources/masks/falsy.tres" id="2_mhs2o"] + +[resource] +script = ExtResource("2_7bwff") +character = ExtResource("1_iaxr1") +mouth_mask = ExtResource("2_mhs2o") +metadata/_custom_type_script = "uid://b8peyg02l0mrn" diff --git a/resources/masks/falsy.tres b/resources/masks/falsy.tres index be26f83..4dcef72 100644 --- a/resources/masks/falsy.tres +++ b/resources/masks/falsy.tres @@ -6,7 +6,7 @@ [resource] script = ExtResource("2_ncal4") name = "Mask of the Liar" -description = "Invert all preferences" +description = "Invert all traits" mask_sprite = ExtResource("1_r5drl") region = 1 stimuli = 1 diff --git a/scenes/character/character.tscn b/scenes/character/character.tscn index 5ee5799..6bdbc60 100644 --- a/scenes/character/character.tscn +++ b/scenes/character/character.tscn @@ -168,7 +168,6 @@ position = Vector2(31.595, 176.245) rotation = 0.017453292 [node name="MaskEyes" parent="." unique_id=428968220 instance=ExtResource("3_mutn8")] -visible = false position = Vector2(47.78, 157.815) rotation = 0.033161256 diff --git a/scenes/list/list.gd b/scenes/list/list.gd index 1f80c19..d095962 100644 --- a/scenes/list/list.gd +++ b/scenes/list/list.gd @@ -30,7 +30,7 @@ func set_list(_items): for i in _items: print(i.name) - current_item = 0 + current_item = 1 if _items.size() == 0: items = [] label.text = "...\n...\n..." diff --git a/scenes/main/main.tscn b/scenes/main/main.tscn index 8124a70..31834da 100644 --- a/scenes/main/main.tscn +++ b/scenes/main/main.tscn @@ -34,19 +34,19 @@ [ext_resource type="Resource" uid="uid://dvmr6qryknr2j" path="res://resources/characters/nun.tres" id="26_6miv3"] [ext_resource type="Resource" uid="uid://kau80jesm22w" path="res://resources/masks/falsy.tres" id="26_i6fjx"] [ext_resource type="Resource" uid="uid://bfvky2dpu6vv0" path="res://resources/guests/duke_unmasked.tres" id="27_6w6mm"] -[ext_resource type="Resource" uid="uid://cfargib0urafc" path="res://resources/guests/duchex_unmasked.tres" id="27_62f45"] [ext_resource type="Resource" uid="uid://i4yr7hqobna7" path="res://resources/characters/prince.tres" id="27_yisfj"] [ext_resource type="Resource" uid="uid://q3o5oxegjx2" path="res://resources/masks/no_smell.tres" id="28_7dg2i"] [ext_resource type="Resource" uid="uid://divy6byhpwgs2" path="res://resources/masks/truthy.tres" id="29_08tbl"] [ext_resource type="Resource" uid="uid://c25kg6um2k1dy" path="res://resources/guests/duchex_mute.tres" id="29_62f45"] -[ext_resource type="Resource" uid="uid://dfguca2526tk6" path="res://resources/guests/queen_unmasked.tres" id="30_6g32y"] [ext_resource type="Resource" uid="uid://im83307vumpx" path="res://resources/guests/queen_blind.tres" id="33_f4j1x"] [ext_resource type="Script" uid="uid://bb0od2qqdx3or" path="res://scenes/main/ready_bell.gd" id="33_tbnf8"] [ext_resource type="Texture2D" uid="uid://c3bxwu75mcl87" path="res://assets/decor/mask_page_held.png" id="35_1k3ck"] [ext_resource type="Texture2D" uid="uid://ce7wdct4e27e1" path="res://assets/decor/reception.png" id="35_62f45"] [ext_resource type="PackedScene" uid="uid://cayrxqnypoytu" path="res://scenes/table/table.tscn" id="35_r1bmu"] +[ext_resource type="Resource" uid="uid://k561jqkq8jpa" path="res://resources/guests/bishop_unmasked.tres" id="35_yisfj"] [ext_resource type="Texture2D" uid="uid://cl1a50j64nnlh" path="res://assets/decor/guest_page_held.png" id="36_62f45"] [ext_resource type="Texture2D" uid="uid://coahojeky8ul7" path="res://assets/decor/bell.png" id="37_6g32y"] +[ext_resource type="Resource" uid="uid://dw8ckdqphstum" path="res://resources/guests/bishop_blind.tres" id="37_yisfj"] [ext_resource type="Texture2D" uid="uid://cgl8g5eqy8xm0" path="res://assets/decor/hand_bell.png" id="39_62f45"] [ext_resource type="Texture2D" uid="uid://dj267xgqniy2i" path="res://assets/decor/table_item_a_2.png" id="43_jucdw"] [ext_resource type="Texture2D" uid="uid://b4u3o7fyryxxq" path="res://assets/decor/table_item_a.png" id="44_6miv3"] @@ -460,10 +460,10 @@ character = NodePath("../Character") guest_list = NodePath("../GuestList") mask_list = NodePath("../MaskList") tables = [NodePath("../Table"), NodePath("../Table2"), NodePath("../Table3")] -lvl1_guest_1 = ExtResource("27_62f45") +lvl1_guest_1 = ExtResource("35_yisfj") lvl1_guest_2 = ExtResource("27_6w6mm") -lvl2_guest_1 = ExtResource("27_62f45") -lvl2_guest_2 = ExtResource("30_6g32y") +lvl2_guest_1 = ExtResource("27_6w6mm") +lvl2_guest_2 = ExtResource("37_yisfj") lvl3_guest_1 = ExtResource("33_f4j1x") lvl3_guest_2 = ExtResource("29_62f45") lvl3_guest_3 = ExtResource("27_6w6mm") diff --git a/scenes/managers/game_manager.gd b/scenes/managers/game_manager.gd index 7fbda63..f5a6bb3 100644 --- a/scenes/managers/game_manager.gd +++ b/scenes/managers/game_manager.gd @@ -126,12 +126,14 @@ func compute_ending(): func ending_tween_cb(): var final_score = 0.0 - for table in tables: - final_score += table.compute_score() + var table1_score = tables[0].compute_score() + var table2_score = tables[1].compute_score() + var table3_score = tables[2].compute_score() + final_score = table1_score + table2_score + table3_score print("Final score: %s" % final_score) - - if final_score < 0: + var is_defeat = table1_score < 0 or table2_score < 0 or table3_score < 0 + if is_defeat: defeat_noise.emit() else: victory_noise.emit() @@ -147,12 +149,15 @@ func ending_tween_cb(): current_game_state = GameState.READY ring_bell.visible = true bell_anim_player.play("idle") + + if is_defeat: + return - if current_level == Levels.LVL1 and final_score >= 0: + if current_level == Levels.LVL1: current_level = Levels.LVL2 elif current_level == Levels.LVL2: current_level = Levels.LVL3 - elif final_score >= 0: + else: roster_size += 1 current_level = Levels.RANDOM diff --git a/scenes/managers/masked_chara.gd b/scenes/managers/masked_chara.gd index a4b50ec..4be0d34 100644 --- a/scenes/managers/masked_chara.gd +++ b/scenes/managers/masked_chara.gd @@ -41,7 +41,7 @@ func compute_score(other_guests: Array[MaskedChara]) -> float: for guest_trait in guest_traits: var trait_strength = 0.0 for stimuli in guest_trait.stimulis: - var strength = stimuli + var strength = 1.0 if guest_mouth_mask != null and stimuli == guest_mouth_mask.stimuli: strength *= guest_mouth_mask.stimuli_multiplier if face_mask != null and stimuli == face_mask.stimuli: @@ -51,6 +51,7 @@ func compute_score(other_guests: Array[MaskedChara]) -> float: var preference = character.preferences.get(guest_trait) if guest_trait in character.preferences else CharacterResource.Preference.DONT_CARE var score_multiplier = pref_score_map.get(preference) if preference in pref_score_map else 0.0 guest_appreciation += trait_strength*score_multiplier + print(guest_appreciation) overall_score += guest_appreciation