diff --git a/buildings/room_pedastal_mean.tscn b/buildings/room_pedastal_mean.tscn index c9ffdef..b99b096 100644 --- a/buildings/room_pedastal_mean.tscn +++ b/buildings/room_pedastal_mean.tscn @@ -45,7 +45,7 @@ scale = Vector2(2.49, 3.1) [node name="ItemSpawn" parent="EnemyList" instance=ExtResource("7_sr858")] position = Vector2(149, -645) -rarity_bonus = 2 +rarity_bonus = 0.5 [node name="MorningStar" parent="EnemyList" instance=ExtResource("8_ta0fd")] position = Vector2(39, -552) diff --git a/buildings/room_wide_item_above.tscn b/buildings/room_wide_item_above.tscn index ba97c8b..8a28333 100644 --- a/buildings/room_wide_item_above.tscn +++ b/buildings/room_wide_item_above.tscn @@ -57,7 +57,7 @@ collision_layer = 41 [node name="ItemSpawn" parent="EnemyList" instance=ExtResource("7_crruu")] position = Vector2(137, -329) -rarity_bonus = 1 +rarity_bonus = 0.25 [node name="BearTrap" parent="EnemyList" instance=ExtResource("8_fkxmk")] position = Vector2(465, -301) diff --git a/enemies/boss/boss.gd b/enemies/boss/boss.gd index 808b4d0..09288dd 100644 --- a/enemies/boss/boss.gd +++ b/enemies/boss/boss.gd @@ -4,7 +4,6 @@ extends CharacterBody2D var moves = ["slam", "wave", "water_rise", "splash"] @export var big_blob : PackedScene @onready var water : Water = get_tree().get_root().get_node("main/Water") -@onready var next_move = choose_next_move() var risen = 0 var attack_ready = true @@ -17,10 +16,10 @@ var dead = false signal grounded func choose_next_move() -> String: - if $EnemyHurtbox.hp < 2 * $EnemyHurtbox.max_hp / 3 and risen == 0: + if $EnemyHurtbox.hp <= 3 * $EnemyHurtbox.max_hp / 4 and risen == 0: risen += 1 return "water_rise" - if $EnemyHurtbox.hp < $EnemyHurtbox.max_hp / 3 and risen == 1: + if $EnemyHurtbox.hp <= $EnemyHurtbox.max_hp / 2 and risen == 1: risen += 1 return "water_rise" @@ -36,8 +35,7 @@ func _physics_process(delta: float) -> void: up_direction = earthaligner.global_from_local(Vector2.UP) if attack_ready: attack_ready = false - call(next_move) - next_move = choose_next_move() + call(choose_next_move()) if(is_on_floor()): grounded.emit() diff --git a/enemies/boss/boss.tscn b/enemies/boss/boss.tscn index b682a37..ede2b73 100644 --- a/enemies/boss/boss.tscn +++ b/enemies/boss/boss.tscn @@ -32,7 +32,7 @@ texture = ExtResource("3_opohk") [node name="EnemyHurtbox" parent="." node_paths=PackedStringArray("canvasItem") instance=ExtResource("2_skx2t")] collision_layer = 16 collision_mask = 32 -max_hp = 600 +max_hp = 800 canvasItem = NodePath("..") [node name="CollisionShape2D" type="CollisionShape2D" parent="EnemyHurtbox"] diff --git a/items/generic/item_spawn.gd b/items/generic/item_spawn.gd index 75b9a97..f331a30 100644 --- a/items/generic/item_spawn.gd +++ b/items/generic/item_spawn.gd @@ -4,11 +4,11 @@ class_name ItemSpawn extends Node2D @export var rare_items : Array[PackedScene] static var unique_items : Array[PackedScene] = [] -@export var rarity_bonus = 0 +@export var rarity_bonus : float = 0 @export var guarantee_rare : bool = false -@export var unique_base_chance = .03 -@export var rare_base_chance = .2 +@export var unique_base_chance = .02 +@export var rare_base_chance = .04 @export var unique_bonus_multiplier = .025 @export var rare_bonus_multiplier = .1 @@ -16,7 +16,7 @@ var remove_after_spawn = false func choose_pool() -> Array[PackedScene]: var unique_chance = unique_base_chance + unique_bonus_multiplier * rarity_bonus - var rare_chance = unique_base_chance + unique_bonus_multiplier * rarity_bonus + var rare_chance = rare_base_chance + rare_bonus_multiplier * rarity_bonus var random = randf() if random < unique_chance && unique_items.size() > 0: @@ -38,8 +38,8 @@ func _ready(): static func refill_unique_item_pool(): unique_items = [ - load("res://items/permanent_items/backslash.tscn"), - load("res://items/permanent_items/high_jump.tscn"), - load("res://items/permanent_items/upslash.tscn"), + load("res://items/permanent_items/backslash/backslash.tscn"), + load("res://items/permanent_items/high_jump/high_jump.tscn"), + load("res://items/permanent_items/upslash/upslash.tscn"), load("res://items/active_items/horizontal_dash/horizontal_dash.tscn") ] diff --git a/items/generic/item_spawn.tscn b/items/generic/item_spawn.tscn index d707a22..ffe4087 100644 --- a/items/generic/item_spawn.tscn +++ b/items/generic/item_spawn.tscn @@ -6,7 +6,7 @@ [ext_resource type="PackedScene" uid="uid://gwctb2xqsbj" path="res://items/immediate_items/healthup/healthup.tscn" id="3_yi7ag"] [ext_resource type="PackedScene" uid="uid://ddn025xnjngko" path="res://items/active_items/bow/bow.tscn" id="4_v0ua0"] [ext_resource type="PackedScene" uid="uid://ewe36lqcjojk" path="res://items/active_items/updash/updash.tscn" id="5_uitgx"] -[ext_resource type="PackedScene" uid="uid://wc7kgtomy6xm" path="res://items/permanent_items/extrajump.tscn" id="6_xqgya"] +[ext_resource type="PackedScene" uid="uid://wc7kgtomy6xm" path="res://items/permanent_items/extrajump/extrajump.tscn" id="6_xqgya"] [node name="ItemSpawn" type="Node2D"] script = ExtResource("1_ms6tn") diff --git a/items/permanent_items/backslash.gd b/items/permanent_items/backslash/backslash.gd similarity index 100% rename from items/permanent_items/backslash.gd rename to items/permanent_items/backslash/backslash.gd diff --git a/items/permanent_items/backslash.gd.uid b/items/permanent_items/backslash/backslash.gd.uid similarity index 100% rename from items/permanent_items/backslash.gd.uid rename to items/permanent_items/backslash/backslash.gd.uid diff --git a/items/permanent_items/backslash.png b/items/permanent_items/backslash/backslash.png similarity index 100% rename from items/permanent_items/backslash.png rename to items/permanent_items/backslash/backslash.png diff --git a/items/permanent_items/backslash.png.import b/items/permanent_items/backslash/backslash.png.import similarity index 75% rename from items/permanent_items/backslash.png.import rename to items/permanent_items/backslash/backslash.png.import index 9601521..0a78f86 100644 --- a/items/permanent_items/backslash.png.import +++ b/items/permanent_items/backslash/backslash.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://c7mrm8uel7r36" -path="res://.godot/imported/backslash.png-149a372aa6b01851fbdc2c6a7a2e54db.ctex" +path="res://.godot/imported/backslash.png-627b3c40a1c8a6f83dc2a8bbc2d29adb.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://items/permanent_items/backslash.png" -dest_files=["res://.godot/imported/backslash.png-149a372aa6b01851fbdc2c6a7a2e54db.ctex"] +source_file="res://items/permanent_items/backslash/backslash.png" +dest_files=["res://.godot/imported/backslash.png-627b3c40a1c8a6f83dc2a8bbc2d29adb.ctex"] [params] diff --git a/items/permanent_items/backslash.tscn b/items/permanent_items/backslash/backslash.tscn similarity index 91% rename from items/permanent_items/backslash.tscn rename to items/permanent_items/backslash/backslash.tscn index 3728051..4cef13a 100644 --- a/items/permanent_items/backslash.tscn +++ b/items/permanent_items/backslash/backslash.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=8 format=3 uid="uid://bbpf28ohayd8n"] -[ext_resource type="Script" uid="uid://blg876atd71cg" path="res://items/permanent_items/backslash.gd" id="1_s4bdx"] +[ext_resource type="Script" uid="uid://blg876atd71cg" path="res://items/permanent_items/backslash/backslash.gd" id="1_s4bdx"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_kiuxs"] [ext_resource type="PackedScene" uid="uid://d3e3kuyeh6mr1" path="res://player/sword.tscn" id="2_u6vk4"] [ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="4_legpc"] -[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash.png" id="5_qg660"] +[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash/backslash.png" id="5_qg660"] [ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="6_qg660"] [sub_resource type="CircleShape2D" id="CircleShape2D_hvhjo"] diff --git a/items/permanent_items/extrajump.gd b/items/permanent_items/extrajump/extrajump.gd similarity index 100% rename from items/permanent_items/extrajump.gd rename to items/permanent_items/extrajump/extrajump.gd diff --git a/items/permanent_items/extrajump.gd.uid b/items/permanent_items/extrajump/extrajump.gd.uid similarity index 100% rename from items/permanent_items/extrajump.gd.uid rename to items/permanent_items/extrajump/extrajump.gd.uid diff --git a/items/permanent_items/extrajump.png b/items/permanent_items/extrajump/extrajump.png similarity index 100% rename from items/permanent_items/extrajump.png rename to items/permanent_items/extrajump/extrajump.png diff --git a/items/permanent_items/extrajump.png.import b/items/permanent_items/extrajump/extrajump.png.import similarity index 75% rename from items/permanent_items/extrajump.png.import rename to items/permanent_items/extrajump/extrajump.png.import index 6bdff70..0353123 100644 --- a/items/permanent_items/extrajump.png.import +++ b/items/permanent_items/extrajump/extrajump.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dicx1uk4187dq" -path="res://.godot/imported/extrajump.png-5c34a7cf40e9d4d17063d874a102c414.ctex" +path="res://.godot/imported/extrajump.png-b4900058bcc784042b34649841ea8810.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://items/permanent_items/extrajump.png" -dest_files=["res://.godot/imported/extrajump.png-5c34a7cf40e9d4d17063d874a102c414.ctex"] +source_file="res://items/permanent_items/extrajump/extrajump.png" +dest_files=["res://.godot/imported/extrajump.png-b4900058bcc784042b34649841ea8810.ctex"] [params] diff --git a/items/permanent_items/extrajump.tscn b/items/permanent_items/extrajump/extrajump.tscn similarity index 91% rename from items/permanent_items/extrajump.tscn rename to items/permanent_items/extrajump/extrajump.tscn index 366f906..e5db149 100644 --- a/items/permanent_items/extrajump.tscn +++ b/items/permanent_items/extrajump/extrajump.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=7 format=3 uid="uid://wc7kgtomy6xm"] -[ext_resource type="Script" uid="uid://bnr7cpjuvy6xj" path="res://items/permanent_items/extrajump.gd" id="1_t7gtn"] +[ext_resource type="Script" uid="uid://bnr7cpjuvy6xj" path="res://items/permanent_items/extrajump/extrajump.gd" id="1_t7gtn"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_70c5v"] [ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_hw3fr"] -[ext_resource type="Texture2D" uid="uid://dicx1uk4187dq" path="res://items/permanent_items/extrajump.png" id="3_t7gtn"] +[ext_resource type="Texture2D" uid="uid://dicx1uk4187dq" path="res://items/permanent_items/extrajump/extrajump.png" id="3_t7gtn"] [ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="5_kn13r"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_hw3fr"] diff --git a/items/permanent_items/high_jump.gd b/items/permanent_items/high_jump/high_jump.gd similarity index 100% rename from items/permanent_items/high_jump.gd rename to items/permanent_items/high_jump/high_jump.gd diff --git a/items/permanent_items/high_jump.gd.uid b/items/permanent_items/high_jump/high_jump.gd.uid similarity index 100% rename from items/permanent_items/high_jump.gd.uid rename to items/permanent_items/high_jump/high_jump.gd.uid diff --git a/items/permanent_items/high_jump.png b/items/permanent_items/high_jump/high_jump.png similarity index 100% rename from items/permanent_items/high_jump.png rename to items/permanent_items/high_jump/high_jump.png diff --git a/items/permanent_items/high_jump.png.import b/items/permanent_items/high_jump/high_jump.png.import similarity index 75% rename from items/permanent_items/high_jump.png.import rename to items/permanent_items/high_jump/high_jump.png.import index 220d1e1..6dd0910 100644 --- a/items/permanent_items/high_jump.png.import +++ b/items/permanent_items/high_jump/high_jump.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://c6pyyfgkhytu5" -path="res://.godot/imported/high_jump.png-8bc003388f039950b2397263b61bf2a9.ctex" +path="res://.godot/imported/high_jump.png-1048e30a3bfeaa9531008ef81208b49f.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://items/permanent_items/high_jump.png" -dest_files=["res://.godot/imported/high_jump.png-8bc003388f039950b2397263b61bf2a9.ctex"] +source_file="res://items/permanent_items/high_jump/high_jump.png" +dest_files=["res://.godot/imported/high_jump.png-1048e30a3bfeaa9531008ef81208b49f.ctex"] [params] diff --git a/items/permanent_items/high_jump.tscn b/items/permanent_items/high_jump/high_jump.tscn similarity index 91% rename from items/permanent_items/high_jump.tscn rename to items/permanent_items/high_jump/high_jump.tscn index 5209b2c..1b4a36c 100644 --- a/items/permanent_items/high_jump.tscn +++ b/items/permanent_items/high_jump/high_jump.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=7 format=3 uid="uid://bpgo1djj8f1rg"] -[ext_resource type="Script" uid="uid://cq6h2iven3rly" path="res://items/permanent_items/high_jump.gd" id="1_7gixi"] +[ext_resource type="Script" uid="uid://cq6h2iven3rly" path="res://items/permanent_items/high_jump/high_jump.gd" id="1_7gixi"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="2_s7mjt"] [ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="3_ui5no"] -[ext_resource type="Texture2D" uid="uid://c6pyyfgkhytu5" path="res://items/permanent_items/high_jump.png" id="4_7gixi"] +[ext_resource type="Texture2D" uid="uid://c6pyyfgkhytu5" path="res://items/permanent_items/high_jump/high_jump.png" id="4_7gixi"] [ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="5_s7mjt"] [sub_resource type="CircleShape2D" id="CircleShape2D_bya24"] diff --git a/items/permanent_items/upslash.gd b/items/permanent_items/upslash/upslash.gd similarity index 100% rename from items/permanent_items/upslash.gd rename to items/permanent_items/upslash/upslash.gd diff --git a/items/permanent_items/upslash.gd.uid b/items/permanent_items/upslash/upslash.gd.uid similarity index 100% rename from items/permanent_items/upslash.gd.uid rename to items/permanent_items/upslash/upslash.gd.uid diff --git a/items/permanent_items/upslash.tscn b/items/permanent_items/upslash/upslash.tscn similarity index 92% rename from items/permanent_items/upslash.tscn rename to items/permanent_items/upslash/upslash.tscn index fd038aa..5a7fe35 100644 --- a/items/permanent_items/upslash.tscn +++ b/items/permanent_items/upslash/upslash.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=8 format=3 uid="uid://bwtdls58ajair"] -[ext_resource type="Script" uid="uid://cyql6o6m4xrv3" path="res://items/permanent_items/upslash.gd" id="1_vv4qh"] +[ext_resource type="Script" uid="uid://cyql6o6m4xrv3" path="res://items/permanent_items/upslash/upslash.gd" id="1_vv4qh"] [ext_resource type="PackedScene" uid="uid://chs0u61f45nau" path="res://utils/earth_aligner.tscn" id="3_ayb0v"] [ext_resource type="Texture2D" uid="uid://d4mrbgfl7jpqq" path="res://items/ItemShine.png" id="4_35mg8"] -[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash.png" id="5_f1n28"] +[ext_resource type="Texture2D" uid="uid://c7mrm8uel7r36" path="res://items/permanent_items/backslash/backslash.png" id="5_f1n28"] [ext_resource type="Texture2D" uid="uid://dxcfkdhl4g24c" path="res://items/active_items/updash/updash.png" id="6_4gfq4"] [ext_resource type="AudioStream" uid="uid://pdd0sy3p4y0d" path="res://sounds/750240__universfield__coin-drop.mp3" id="6_5tj4p"] diff --git a/main.tscn b/main.tscn index d98b759..c26f383 100644 --- a/main.tscn +++ b/main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=3 uid="uid://cxo6bq26huau7"] +[gd_scene load_steps=14 format=3 uid="uid://cxo6bq26huau7"] [ext_resource type="PackedScene" uid="uid://cmaovvr15b3qk" path="res://player/player.tscn" id="2_1bvp3"] [ext_resource type="Texture2D" uid="uid://d3fpq76anm4t7" path="res://world/Background Prototype/Background prototype.png" id="3_kek77"] @@ -13,7 +13,6 @@ [ext_resource type="PackedScene" uid="uid://ca5ndobertnp4" path="res://water/water.tscn" id="10_4c57u"] [ext_resource type="Script" uid="uid://cpaskpj67pnaj" path="res://enemies/boss/boss_spawner.gd" id="10_efxa6"] [ext_resource type="PackedScene" uid="uid://cpe4s6vsn0ujd" path="res://enemies/boss/boss.tscn" id="11_efxa6"] -[ext_resource type="PackedScene" uid="uid://dy17xhg1yrl0o" path="res://items/active_items/horizontal_dash/horizontal_dash.tscn" id="14_w48qg"] [node name="main" type="Node2D"] @@ -89,9 +88,6 @@ texture = ExtResource("3_kek77") script = ExtResource("10_efxa6") boss = ExtResource("11_efxa6") -[node name="HorizontalDash" parent="." instance=ExtResource("14_w48qg")] -position = Vector2(116, -3150) - [connection signal="active_item_changed" from="Player" to="UIOverlay/ItemUI" method="_on_player_active_item_changed"] [connection signal="health_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_health_changed"] [connection signal="max_hp_changed" from="Player" to="UIOverlay/Healthbar" method="_on_player_max_hp_changed"]