Added rpg system for combat

added lots of loot to find
added level up system
This commit is contained in:
2026-01-11 23:12:09 +01:00
parent ab16194c39
commit 3a7fb29d58
32 changed files with 5076 additions and 96 deletions

View File

@@ -0,0 +1,76 @@
[gd_scene format=3 uid="uid://cvjj4wo2agd2k"]
[ext_resource type="Texture2D" uid="uid://ba772auc1t65n" path="res://assets/gfx/arrow.png" id="1_bey2v"]
[ext_resource type="Script" uid="uid://dqbctups3eri6" path="res://scripts/attack_arrow.gd" id="1_if6eb"]
[ext_resource type="AudioStream" uid="uid://hmci4kgvbqib" path="res://assets/audio/sfx/weapons/bow/arrow_fire_swosh.wav" id="3_o8cb2"]
[ext_resource type="AudioStream" uid="uid://b140nlsak4ub7" path="res://assets/audio/sfx/weapons/bow/arrow-hit-brick-wall-01.mp3" id="4_8l43l"]
[ext_resource type="AudioStream" uid="uid://dc7nt8gnjt5u5" path="res://assets/audio/sfx/weapons/melee_attack_12.wav.mp3" id="4_ol4b0"]
[sub_resource type="Gradient" id="Gradient_yp18a"]
colors = PackedColorArray(0, 0, 0, 1, 0, 0, 0, 0)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_gpny7"]
gradient = SubResource("Gradient_yp18a")
fill = 1
fill_from = Vector2(0.504587, 0.504587)
fill_to = Vector2(0.848624, 0.784404)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_b6ybh"]
size = Vector2(2, 6)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_wuwd8"]
size = Vector2(2, 8)
[node name="Arrow" type="CharacterBody2D" unique_id=1519950765]
z_index = 10
y_sort_enabled = true
collision_layer = 0
collision_mask = 0
motion_mode = 1
script = ExtResource("1_if6eb")
[node name="Shadow" type="Sprite2D" parent="." unique_id=1423726915]
z_index = 1
z_as_relative = false
position = Vector2(-2.98023e-08, 0)
scale = Vector2(0.09375, 0.0820313)
texture = SubResource("GradientTexture2D_gpny7")
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1110211076]
texture = ExtResource("1_bey2v")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1017444254]
shape = SubResource("RectangleShape2D_b6ybh")
[node name="ArrowArea" type="Area2D" parent="." unique_id=1075536929]
collision_layer = 0
collision_mask = 75
priority = 1
[node name="CollisionShape2D" type="CollisionShape2D" parent="ArrowArea" unique_id=926133347]
physics_interpolation_mode = 1
position = Vector2(0, 1)
shape = SubResource("RectangleShape2D_wuwd8")
debug_color = Color(0.7, 0, 0.195726, 0.42)
[node name="SfxArrowFire" type="AudioStreamPlayer2D" parent="." unique_id=1413495156]
stream = ExtResource("3_o8cb2")
pitch_scale = 1.61
max_polyphony = 4
[node name="SfxImpactWall" type="AudioStreamPlayer2D" parent="." unique_id=1132726967]
stream = ExtResource("4_8l43l")
volume_db = -4.0
pitch_scale = 1.29
attenuation = 3.4822
max_polyphony = 4
panning_strength = 1.3
[node name="SfxImpactSound" type="AudioStreamPlayer2D" parent="." unique_id=463883211]
stream = ExtResource("4_ol4b0")
volume_db = -4.685
pitch_scale = 1.47
max_polyphony = 4
[connection signal="area_entered" from="ArrowArea" to="." method="_on_arrow_area_area_entered"]
[connection signal="body_entered" from="ArrowArea" to="." method="_on_arrow_area_body_entered"]

View File

@@ -0,0 +1,86 @@
[gd_scene format=3 uid="uid://tcobiw1iirdw"]
[ext_resource type="Script" uid="uid://bqrtsr3mjvv3j" path="res://scripts/attack_axe_swing.gd" id="1_xo3v0"]
[ext_resource type="Texture2D" uid="uid://bwxpic53sluul" path="res://assets/gfx/sword_slash.png" id="2_lwt2c"]
[ext_resource type="AudioStream" uid="uid://4vulahdsj4i2" path="res://assets/audio/sfx/swoosh/throw_01.wav.mp3" id="3_v2p0x"]
[ext_resource type="AudioStream" uid="uid://uerx5rib87a6" path="res://assets/audio/sfx/weapons/bone_hit_wall_01.wav.mp3" id="4_ul7bj"]
[ext_resource type="AudioStream" uid="uid://dc7nt8gnjt5u5" path="res://assets/audio/sfx/weapons/melee_attack_12.wav.mp3" id="5_whqew"]
[sub_resource type="Animation" id="Animation_6bxep"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_p46b1"]
resource_name = "slash_anim"
length = 0.8
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.533333, 0.733333),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_hj6i2"]
_data = {
&"RESET": SubResource("Animation_6bxep"),
&"slash_anim": SubResource("Animation_p46b1")
}
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3jdng"]
size = Vector2(12, 12)
[node name="AxeSwing" type="Node2D" unique_id=1568208090]
z_index = 10
y_sort_enabled = true
script = ExtResource("1_xo3v0")
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=461038063]
texture = ExtResource("2_lwt2c")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=691292922]
libraries/ = SubResource("AnimationLibrary_hj6i2")
[node name="AttackSwosh" type="AudioStreamPlayer2D" parent="." unique_id=515041905]
stream = ExtResource("3_v2p0x")
pitch_scale = 0.74
autoplay = true
[node name="DamageArea" type="Area2D" parent="." unique_id=985585639]
collision_layer = 0
collision_mask = 75
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageArea" unique_id=805714782]
shape = SubResource("RectangleShape2D_3jdng")
debug_color = Color(0.7, 0, 0.18232, 0.42)
[node name="MeleeImpactWall" type="AudioStreamPlayer2D" parent="." unique_id=1016195072]
stream = ExtResource("4_ul7bj")
volume_db = -4.0
pitch_scale = 1.3
max_polyphony = 4
[node name="MeleeImpact" type="AudioStreamPlayer2D" parent="." unique_id=1548143473]
stream = ExtResource("5_whqew")
volume_db = -5.622
pitch_scale = 1.43
max_polyphony = 4
[connection signal="area_entered" from="DamageArea" to="." method="_on_damage_area_area_entered"]
[connection signal="body_entered" from="DamageArea" to="." method="_on_damage_area_body_entered"]

View File

@@ -0,0 +1,86 @@
[gd_scene format=3 uid="uid://b3my31y2ljai1"]
[ext_resource type="Script" uid="uid://ddprn0wrasavr" path="res://scripts/attack_spear_thrust.gd" id="1_psi1x"]
[ext_resource type="Texture2D" uid="uid://bwxpic53sluul" path="res://assets/gfx/sword_slash.png" id="2_rh1o6"]
[ext_resource type="AudioStream" uid="uid://4vulahdsj4i2" path="res://assets/audio/sfx/swoosh/throw_01.wav.mp3" id="3_j7ui3"]
[ext_resource type="AudioStream" uid="uid://uerx5rib87a6" path="res://assets/audio/sfx/weapons/bone_hit_wall_01.wav.mp3" id="4_cijfq"]
[ext_resource type="AudioStream" uid="uid://dc7nt8gnjt5u5" path="res://assets/audio/sfx/weapons/melee_attack_12.wav.mp3" id="5_h4gub"]
[sub_resource type="Animation" id="Animation_6bxep"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_p46b1"]
resource_name = "slash_anim"
length = 0.8
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.533333, 0.733333),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_hj6i2"]
_data = {
&"RESET": SubResource("Animation_6bxep"),
&"slash_anim": SubResource("Animation_p46b1")
}
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3jdng"]
size = Vector2(12, 12)
[node name="SpearThrust" type="Node2D" unique_id=785354531]
z_index = 10
y_sort_enabled = true
script = ExtResource("1_psi1x")
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1051719548]
texture = ExtResource("2_rh1o6")
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=907474922]
libraries/ = SubResource("AnimationLibrary_hj6i2")
[node name="AttackSwosh" type="AudioStreamPlayer2D" parent="." unique_id=1397921535]
stream = ExtResource("3_j7ui3")
pitch_scale = 1.4
autoplay = true
[node name="DamageArea" type="Area2D" parent="." unique_id=1687133888]
collision_layer = 0
collision_mask = 75
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageArea" unique_id=376828642]
shape = SubResource("RectangleShape2D_3jdng")
debug_color = Color(0.7, 0, 0.18232, 0.42)
[node name="MeleeImpactWall" type="AudioStreamPlayer2D" parent="." unique_id=651866255]
stream = ExtResource("4_cijfq")
volume_db = -4.0
pitch_scale = 1.3
max_polyphony = 4
[node name="MeleeImpact" type="AudioStreamPlayer2D" parent="." unique_id=35588340]
stream = ExtResource("5_h4gub")
volume_db = -5.622
pitch_scale = 1.43
max_polyphony = 4
[connection signal="area_entered" from="DamageArea" to="." method="_on_damage_area_area_entered"]
[connection signal="body_entered" from="DamageArea" to="." method="_on_damage_area_body_entered"]