Compare commits

..

9 Commits

Author SHA1 Message Date
Artur David ec60de8fa1 rearranged spawn stages 2026-06-06 17:16:37 +02:00
Artur David 711e318cb4 rearranged tscns 2026-06-06 17:16:17 +02:00
Artur David a675b6fb03 added summon circle asset 2026-06-06 17:10:26 +02:00
Artur David 970ccb7aba fix brew explosion spawning into World instead of Witch 2026-06-06 02:18:16 +02:00
Artur David ca820caa2b fix game.gd node paths for Player and Witch under World 2026-06-06 02:15:47 +02:00
Artur David 3779426968 update node paths after Player and Witch moved into World 2026-06-06 02:12:11 +02:00
Artur David 6177d2afbb cache World node reference in spawn_control 2026-06-06 02:10:54 +02:00
Artur David f998f37693 spawn enemies into World node for y_sort 2026-06-06 02:08:32 +02:00
Artur David 9ae4bba208 add World y_sort container, reparent Player, Witch, TileMapLayer(Objects) 2026-06-06 01:47:10 +02:00
16 changed files with 132 additions and 83 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0af4r052pq1r"
path="res://.godot/imported/Magic Summons Pack.png-b18a5a0e9a109a671c89e9f22cfb7f66.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Magic Summons Pack.png"
dest_files=["res://.godot/imported/Magic Summons Pack.png-b18a5a0e9a109a671c89e9f22cfb7f66.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -1,62 +1,62 @@
[
{
"time_start": 0,
"time_end": 60,
"elite_enemy": "res://scenes/slime.tscn",
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 3, "count_at_end": 8, "min_interval": 1.2 }
]
"time_start": 0,
"time_end": 60,
"elite_enemy": "res://scenes/slime.tscn",
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 3, "count_at_end": 8, "min_interval": 1.2 }
]
},
{
"time_start": 60,
"time_end": 90,
"elite_enemy": "res://scenes/blue_slime.tscn",
"entries": [
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 4, "count_at_end": 7, "min_interval": 1.2 }
]
"time_start": 60,
"time_end": 90,
"elite_enemy": "res://scenes/blue_slime.tscn",
"entries": [
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 4, "count_at_end": 7, "min_interval": 1.2 }
]
},
{
"time_start": 90,
"time_end": 180,
"elite_enemy": "res://scenes/blue_slime.tscn",
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 8, "count_at_end": 15, "min_interval": 0.8 },
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 4, "count_at_end": 10, "min_interval": 1.0 }
]
"time_start": 90,
"time_end": 180,
"elite_enemy": "res://scenes/blue_slime.tscn",
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 8, "count_at_end": 15, "min_interval": 0.8 },
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 4, "count_at_end": 10, "min_interval": 1.0 }
]
},
{
"time_start": 180,
"time_end": 210,
"elite_enemy": "res://scenes/fire_slime.tscn",
"entries": [
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 3, "count_at_end": 5, "min_interval": 1.5 }
]
"time_start": 180,
"time_end": 210,
"elite_enemy": "res://scenes/fire_slime.tscn",
"entries": [
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 3, "count_at_end": 5, "min_interval": 1.5 }
]
},
{
"time_start": 210,
"time_end": 300,
"elite_enemy": "res://scenes/fire_slime.tscn",
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 12, "count_at_end": 20, "min_interval": 0.6 },
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 4, "count_at_end": 10, "min_interval": 1.0 }
]
"time_start": 210,
"time_end": 300,
"elite_enemy": "res://scenes/fire_slime.tscn",
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 12, "count_at_end": 20, "min_interval": 0.6 },
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 4, "count_at_end": 10, "min_interval": 1.0 }
]
},
{
"time_start": 300,
"time_end": 390,
"elite_enemy": "res://scenes/fire_slime.tscn",
"entries": [
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 10, "count_at_end": 18, "min_interval": 0.7 },
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 8, "count_at_end": 14, "min_interval": 0.9 }
]
"time_start": 300,
"time_end": 390,
"elite_enemy": "res://scenes/fire_slime.tscn",
"entries": [
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 10, "count_at_end": 18, "min_interval": 0.7 },
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 8, "count_at_end": 14, "min_interval": 0.9 }
]
},
{
"time_start": 390,
"time_end": -1,
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 15, "count_at_end": 30, "min_interval": 0.4 },
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 10, "count_at_end": 25, "min_interval": 0.6 },
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 8, "count_at_end": 20, "min_interval": 0.7 }
]
"time_start": 390,
"time_end": -1,
"entries": [
{ "enemy": "res://scenes/slime.tscn", "count_at_start": 15, "count_at_end": 30, "min_interval": 0.4 },
{ "enemy": "res://scenes/blue_slime.tscn", "count_at_start": 10, "count_at_end": 25, "min_interval": 0.6 },
{ "enemy": "res://scenes/fire_slime.tscn", "count_at_start": 8, "count_at_end": 20, "min_interval": 0.7 }
]
}
]

View File

@ -9,15 +9,15 @@ var _game_over_scene = preload("res://scenes/game_over.tscn")
func _ready():
MusicManager.play(preload("res://assets/music&sfx/music/ashveil-355633.mp3"))
add_child(_debug_menu_script.new())
$Witch.died.connect(_on_witch_died)
$World/Witch.died.connect(_on_witch_died)
func _process(_delta: float) -> void:
var t = int(_spawn_control.elapsed_time)
_timer_label.text = "%02d:%02d" % [t / 60, t % 60]
func _on_witch_died(killer) -> void:
var witch = $Witch
var player = $Player
var witch = $World/Witch
var player = $World/Player
$PauseMenu.process_mode = Node.PROCESS_MODE_DISABLED
get_tree().paused = true

View File

@ -2352,8 +2352,10 @@ script = ExtResource("1_vtaks")
[node name="Worldborder" parent="." unique_id=985455729 instance=ExtResource("2_dinhu")]
[node name="Player" parent="." unique_id=804585690 instance=ExtResource("1_uwrxv")]
z_index = 1
[node name="World" type="Node2D" parent="." unique_id=555444333]
y_sort_enabled = true
[node name="Player" parent="World" unique_id=804585690 instance=ExtResource("1_uwrxv")]
position = Vector2(355, 172)
[node name="Camera2D" type="Camera2D" parent="." unique_id=866207293]
@ -2369,7 +2371,7 @@ offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("6_p57ef")
[node name="Witch" parent="." unique_id=1188927311 instance=ExtResource("7_u5sy4")]
[node name="Witch" parent="World" unique_id=1188927311 instance=ExtResource("7_u5sy4")]
position = Vector2(304, 164)
[node name="TileMapLayer(Background)2" parent="." unique_id=1138596890 instance=ExtResource("8_vtaks")]
@ -2378,7 +2380,9 @@ texture_filter = 1
[node name="TileMapLayer(Overlay)" parent="." unique_id=659138705 instance=ExtResource("10_dinhu")]
texture_filter = 1
[node name="TileMapLayer(Objects)" parent="." unique_id=229708934 instance=ExtResource("9_kvpfn")]
[node name="TileMapLayer(Objects)" parent="World" unique_id=229708934 instance=ExtResource("9_kvpfn")]
y_sort_enabled = true
z_index = 0
texture_filter = 1
tile_map_data = PackedByteArray("AAACABEAAQAmACIAAAAXAAMAAAAEAAoAAAALABEAAAATAAoAAAALABIAAAATAAsAAAAMABEAAAAUAAoAAAAMABIAAAAUAAsAAAAbAA4AAAAeAAoAAAAgAAgAAAAbAAEAAAAgAAkAAAAbAAIAAAAhAAgAAAAcAAEAAAAhAAkAAAAcAAIAAAACAAsAAAAOAAEAAAACAAwAAAAOAAIAAAADAAsAAAAPAAEAAAADAAwAAAAPAAIAAAAhAAsAAAAjAAIAAAAZABEAAAAjAAIAAAAJABEAAAAjAAIAAAALAAoAAAAjAAIAAAATAAIAAAAjAAIAAAACABAAAQAmACEAAAACABIAAQAmACMAAAADABAAAQAnACEAAAADABEAAQAnACIAAAADABIAAQAnACMAAAADABMAAQAnACQAAAAEABAAAQAoACEAAAAEABEAAQAoACIAAAAEABIAAQAoACMAAAAEABMAAQAoACQAAAAFABAAAQApACEAAAAFABEAAQApACIAAAAFABIAAQApACMAAAAFABMAAQApACQAAAD//wYAAQABACAAAAD//wcAAQABACEAAAD//wkAAQABACMAAAD//woAAQABACQAAAAAAAUAAQACAB8AAAAAAAYAAQACACAAAAAAAAcAAQACACEAAAAAAAgAAQACACIAAAAAAAkAAQACACMAAAAAAAoAAQACACQAAAABAAUAAQADAB8AAAABAAYAAQADACAAAAABAAcAAQADACEAAAABAAgAAQADACIAAAABAAkAAQADACMAAAABAAoAAQADACQAAAACAAUAAQAEAB8AAAACAAYAAQAEACAAAAACAAcAAQAEACEAAAACAAgAAQAEACIAAAACAAkAAQAEACMAAAACAAoAAQAEACQAAAAVAA4AAQAaAAcAAAAVAA8AAQAaAAgAAAAVABAAAQAaAAkAAAAVABEAAQAaAAoAAAAVABIAAQAaAAsAAAAWAA4AAQAbAAcAAAAWAA8AAQAbAAgAAAAWABAAAQAbAAkAAAAWABEAAQAbAAoAAAAWABIAAQAbAAsAAAAXAA4AAQAcAAcAAAAXAA8AAQAcAAgAAAAXABAAAQAcAAkAAAAXABEAAQAcAAoAAAAXABIAAQAcAAsAAAAYAA4AAQAdAAcAAAAYAA8AAQAdAAgAAAAYABAAAQAdAAkAAAAYABEAAQAdAAoAAAAgAAQAAQAUAA4AAAAgAAUAAQAUAA8AAAAhAAQAAQAVAA4AAAAhAAUAAQAVAA8AAAAiAAQAAQAWAA4AAAAiAAUAAQAWAA8AAAAjAAQAAQAXAA4AAAAjAAUAAQAXAA8AAAAPAAUAAQA3ACsAAAAPAAYAAQA3ACwAAAAMAAYAAQAzACsAAAAMAAcAAQAzACwAAAAOAAcAAQA7ACsAAAAOAAgAAQA7ACwAAAAPABAAAQBHABcAAAAPABEAAQBHABgAAAAQABAAAQBIABcAAAAQABEAAQBIABgAAAAQABIAAQBIABkAAAARABEAAQBJABgAAAARABIAAQBJABkAAAAbAAEAAQAmABwAAAAbAAIAAQAmAB0AAAAbAAMAAQAmAB4AAAAbAAQAAQAmAB8AAAAcAAEAAQAnABwAAAAcAAIAAQAnAB0AAAAcAAMAAQAnAB4AAAAcAAQAAQAnAB8AAAAdAAEAAQAoABwAAAAdAAIAAQAoAB0AAAAdAAMAAQAoAB4AAAAdAAQAAQAoAB8AAAAeAAEAAQApABwAAAAeAAIAAQApAB0AAAAeAAMAAQApAB4AAAAeAAQAAQApAB8AAAA=")
tile_set = SubResource("TileSet_dinhu")

View File

@ -7,9 +7,6 @@
[ext_resource type="Texture2D" uid="uid://cfb1vyk7t0pkn" path="res://assets/Swordsman_lvl1/Without_shadow/Swordsman_lvl1_Run_without_shadow.png" id="3_dqkch"]
[ext_resource type="Texture2D" uid="uid://cw2gocls81uli" path="res://assets/Swordsman_lvl1/Without_shadow/Swordsman_lvl1_Walk_without_shadow.png" id="4_dqkch"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_u8vuu"]
radius = 7.0
[sub_resource type="AtlasTexture" id="AtlasTexture_qsb7e"]
atlas = ExtResource("2_tuyoq")
region = Rect2(0, 0, 64, 64)
@ -775,6 +772,10 @@ animations = [{
"speed": 10.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_u8vuu"]
radius = 7.0
height = 14.0
[sub_resource type="CircleShape2D" id="CircleShape2D_tuyoq"]
radius = 30.0
@ -783,14 +784,16 @@ collision_mask = 129
motion_mode = 1
script = ExtResource("1_3vyb7")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=896441301]
shape = SubResource("CapsuleShape2D_u8vuu")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1616479252]
texture_filter = 1
position = Vector2(0, -2)
sprite_frames = SubResource("SpriteFrames_giy8y")
animation = &"run_down"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=896441301]
position = Vector2(0, 2)
shape = SubResource("CapsuleShape2D_u8vuu")
[node name="MeleeArea" type="Area2D" parent="." unique_id=24997730]
[node name="CollisionShape2D" type="CollisionShape2D" parent="MeleeArea" unique_id=2002113716]

View File

@ -6,10 +6,6 @@
[ext_resource type="Texture2D" uid="uid://484stlylp2nk" path="res://assets/Cauldron's Brew/Equiptment.png" id="4_qrkn2"]
[ext_resource type="Texture2D" uid="uid://c2sji04ufhh60" path="res://assets/Cauldron's Brew/Cauldron and Powder.png" id="5_vid1f"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_gyfn7"]
radius = 6.0
height = 22.0
[sub_resource type="AtlasTexture" id="AtlasTexture_b1vsk"]
atlas = ExtResource("1_hgjeu")
region = Rect2(0, 64, 24, 32)
@ -249,6 +245,10 @@ animations = [{
"speed": 5.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_gyfn7"]
radius = 6.0
height = 12.0
[sub_resource type="AtlasTexture" id="AtlasTexture_f4ghg"]
atlas = ExtResource("4_qrkn2")
region = Rect2(96, 96, 96, 96)
@ -260,10 +260,6 @@ region = Rect2(480, 96, 96, 96)
[node name="Witch" type="CharacterBody2D" unique_id=1188927311]
script = ExtResource("1_b1vsk")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=774888103]
position = Vector2(0, 3)
shape = SubResource("CapsuleShape2D_gyfn7")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=698352033]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_f4ghg")
@ -271,6 +267,10 @@ animation = &"south"
autoplay = "south"
frame_progress = 0.9113742
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=774888103]
position = Vector2(0, 8)
shape = SubResource("CapsuleShape2D_gyfn7")
[node name="CauldronBar" type="HBoxContainer" parent="." unique_id=1541519739]
modulate = Color(1, 1, 1, 0.8627451)
anchors_preset = 5

View File

@ -12,8 +12,8 @@ var _sfx_player: AudioStreamPlayer
func _ready() -> void:
body_entered.connect(_on_body_entered)
witch = get_node_or_null("/root/Game/Witch")
player = get_node_or_null("/root/Game/Player")
witch = get_node_or_null("/root/Game/World/Witch")
player = get_node_or_null("/root/Game/World/Player")
if witch == null or player == null:
queue_free()
return

View File

@ -13,7 +13,7 @@ var progres_index = 0
var is_brewing
var brew_explosion = true
@onready var witch = get_parent()
@onready var player = get_node("/root/Game/Player")
@onready var player = get_node("/root/Game/World/Player")
var explosion_scene = preload("res://scenes/explosion.tscn")
var _ignite_sfx = preload("res://assets/music&sfx/sfx/data_pion-sfx9-fwoosh-324525.mp3")
var _ignite_player: AudioStreamPlayer
@ -68,7 +68,7 @@ func ignite_cauldrons():
await get_tree().create_timer(0.4).timeout
if brew_explosion:
var boom = explosion_scene.instantiate()
get_parent().add_child(boom)
witch.get_parent().add_child(boom)
boom.scale = Vector2(3,3)
boom.global_position = witch.global_position

View File

@ -1,9 +1,9 @@
extends CanvasLayer
@onready var _spawn_control = get_node("/root/Game/SpawnControl")
@onready var _witch = get_node("/root/Game/Witch")
@onready var _witch = get_node("/root/Game/World/Witch")
@onready var _drop_manager = get_node("/root/Game/DropManager")
@onready var _player = get_node("/root/Game/Player")
@onready var _player = get_node("/root/Game/World/Player")
var _fruit_scenes: Dictionary = {
"Apple": preload("res://scenes/apple.tscn"),

View File

@ -1,6 +1,6 @@
extends Node2D
@onready var player = get_node("/root/Game/Player")
@onready var player = get_node("/root/Game/World/Player")
@onready var bar = get_node("/root/Game/CanvasLayer/ProgressBar")
signal leveled_up
@export var fruit_drop_threshold: int = 7

View File

@ -23,8 +23,8 @@ var xp = 1
func _ready() -> void:
add_to_group("enemies")
died.connect(get_node("/root/Game/DropManager").on_enemy_died)
witch = get_node("/root/Game/Witch")
player = get_node("/root/Game/Player")
witch = get_node("/root/Game/World/Witch")
player = get_node("/root/Game/World/Player")
animated_sprite_2d.sprite_frames = animated_sprite_2d.sprite_frames.duplicate()
hp = max_hp
$Area2D.body_entered.connect(_on_base_body_entered)

View File

@ -51,8 +51,8 @@ func show_perks():
func select_perk(perk):
perk.effect.call()
get_tree().paused = false
_spawn_level_up_particles(get_node("/root/Game/Witch").global_position)
_spawn_level_up_particles(get_node("/root/Game/Player").global_position)
_spawn_level_up_particles(get_node("/root/Game/World/Witch").global_position)
_spawn_level_up_particles(get_node("/root/Game/World/Player").global_position)
perks.erase(perk)
for child in $HBoxContainer.get_children():
child.animate_out()

View File

@ -1,7 +1,7 @@
extends Node2D
@onready var witch = get_node("/root/Game/Witch")
@onready var player = get_node("/root/Game/Player")
@onready var witch = get_node("/root/Game/World/Witch")
@onready var player = get_node("/root/Game/World/Player")
var fireball = preload("res://scenes/fireball.tscn")
var throwing_knife = preload("res://scenes/throwing_knive.tscn")
var cauldron

View File

@ -1,5 +1,7 @@
extends Control
@onready var _world: Node2D = get_node("/root/Game/World")
var up_left: Vector2
var down_right: Vector2
var up_right: Vector2
@ -86,7 +88,7 @@ func _active_stage_idx() -> int:
func _spawn_elite(scene: PackedScene) -> void:
var enemy = scene.instantiate()
enemy.global_position = get_spawn_position()
add_child(enemy)
_world.add_child(enemy)
enemy.scale = Vector2(ELITE_SCALE, ELITE_SCALE)
enemy.max_hp = enemy.max_hp * ELITE_HP_MULT
enemy.hp = enemy.max_hp
@ -140,4 +142,4 @@ func _spawn_one(entry: StageEntry, state: Dictionary) -> void:
state["alive"] += 1
state["spawned_total"] += 1
enemy.tree_exited.connect(func(): state["alive"] -= 1)
add_child(enemy)
_world.add_child(enemy)

View File

@ -6,7 +6,7 @@ func _ready() -> void:
super()
speed = 400.0
damage = 12
var witch = get_node("/root/Game/Witch")
var witch = get_node("/root/Game/World/Witch")
_target_enemy = witch.get_nearest_enemy(witch.global_position, _knife_filter)
if _target_enemy == null:
queue_free()