From 04c87ebf66af89c48541b1777b74e320a152cef7 Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Sun, 1 Dec 2024 22:34:49 -0500 Subject: [PATCH] EEEEEH?? EASY MODO?? --- autoloads/game.gd | 6 ++++++ menus/results.gd | 5 +++++ menus/results.tscn | 16 ++++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/autoloads/game.gd b/autoloads/game.gd index a17ea40..83dc856 100644 --- a/autoloads/game.gd +++ b/autoloads/game.gd @@ -9,6 +9,9 @@ enum Difficulty { PUNGENT, # faster enemies, 3 lives } +# score multiplier for easy mode +const EASY_DIFFICULTY_MODIFIER: float = 0.75 + ## resolution the game renders at const RESOLUTION := Vector2(256,192) @@ -139,6 +142,9 @@ func tally_scores() -> void: perfect_bonus += 1000 # final score final_score = score + arrows_bonus + collection_bonus + time_bonus + life_bonus + perfect_bonus + # easy mode modifier + if difficulty == Difficulty.SWEET: + final_score *= EASY_DIFFICULTY_MODIFIER if marathon_mode: marathon_shards += shards_collected.count(true) marathon_score += final_score diff --git a/menus/results.gd b/menus/results.gd index 7c320e6..9748925 100644 --- a/menus/results.gd +++ b/menus/results.gd @@ -28,6 +28,11 @@ func _notification(what: int) -> void: func _ready() -> void: var palette = load("res://graphics/player/palettes/%s.tex" % Game.current_palette) $"%ArrowBonus".material.set_shader_param("palette", palette) + # easy indicator + if Game.difficulty == Game.Difficulty.SWEET: + $EasyIndicator.visible = true + else: + $EasyIndicator.visible = false #preload final score text_3d = Text3D.instance() text_3d.anim = "final score" diff --git a/menus/results.tscn b/menus/results.tscn index aa437f8..d5d1733 100644 --- a/menus/results.tscn +++ b/menus/results.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=34 format=2] +[gd_scene load_steps=35 format=2] [ext_resource path="res://shaders/wibble_wobble.gdshader" type="Shader" id=1] [ext_resource path="res://shaders/ska_plane.gdshader" type="Shader" id=2] @@ -19,6 +19,7 @@ [ext_resource path="res://scripts/randomize_particle_start.gd" type="Script" id=17] [ext_resource path="res://graphics/hud/pause_arrow.png" type="Texture" id=18] [ext_resource path="res://ui/2ndpuberty_scholar_outline.fnt" type="BitmapFont" id=19] +[ext_resource path="res://graphics/hud/scores/sweet.png" type="Texture" id=20] [sub_resource type="ShaderMaterial" id=5] shader = ExtResource( 2 ) @@ -1054,6 +1055,13 @@ theme = ExtResource( 10 ) text = "Score: 0000000" align = 1 +[node name="EasyIndicator" type="TextureRect" parent="."] +margin_left = 61.0 +margin_top = 7.0 +margin_right = 73.0 +margin_bottom = 19.0 +texture = ExtResource( 20 ) + [node name="Time" type="Label" parent="."] material = ExtResource( 9 ) margin_top = 178.0 @@ -1113,15 +1121,15 @@ rect_pivot_offset = Vector2( 45.5, 18 ) theme = ExtResource( 10 ) [node name="Label" type="Label" parent="CenterContainer/SubmitScore"] -margin_right = 126.0 +margin_right = 91.0 margin_bottom = 10.0 custom_fonts/font = ExtResource( 19 ) text = "submit score?" [node name="YesNoPrompt" type="PanelContainer" parent="CenterContainer/SubmitScore"] -margin_left = 18.0 +margin_left = 1.0 margin_top = 14.0 -margin_right = 107.0 +margin_right = 90.0 margin_bottom = 36.0 size_flags_horizontal = 4