More work on combat

This commit is contained in:
2025-10-09 14:52:47 -04:00
parent 7563e99059
commit 9a216d3285
44 changed files with 547 additions and 103 deletions

View File

@@ -0,0 +1,16 @@
[gd_scene load_steps=2 format=3 uid="uid://4wbwscvayw8c"]
[ext_resource type="Script" uid="uid://cv7wuquahc53c" path="res://scripts/quest_notice_banner.gd" id="1_5gikw"]
[node name="Damage Banner" type="Sprite2D"]
script = ExtResource("1_5gikw")
[node name="Label" type="Label" parent="."]
offset_left = -32.0
offset_top = -26.0
offset_right = 37.0
offset_bottom = 8.0
theme_override_font_sizes/font_size = 24
text = "99999"
horizontal_alignment = 1
vertical_alignment = 1

View File

@@ -1,13 +1,192 @@
[gd_scene load_steps=9 format=3 uid="uid://c31w28fcqw4ra"]
[gd_scene load_steps=18 format=3 uid="uid://c31w28fcqw4ra"]
[ext_resource type="Script" uid="uid://fxixa11vqdrn" path="res://scripts/enemy.gd" id="1_82j8k"]
[ext_resource type="Texture2D" uid="uid://1mkagt2y0jah" path="res://graphics/questview/goo.png" id="2_87tms"]
[ext_resource type="Script" uid="uid://727tgvtmq4nb" path="res://data/statblock.gd" id="2_fehp8"]
[ext_resource type="Texture2D" uid="uid://cf31h0xgcc2yi" path="res://graphics/questview/goo shadow.png" id="3_bfuvr"]
[ext_resource type="Shader" uid="uid://ctod7r3yre02d" path="res://shaders/nonvariant_sprite.gdshader" id="4_h6sl2"]
[ext_resource type="Texture2D" uid="uid://bmkpn7sex6buo" path="res://graphics/questview/goo-sheet.png" id="4_rigyd"]
[sub_resource type="Resource" id="Resource_bfuvr"]
script = ExtResource("2_fehp8")
metadata/_custom_type_script = "uid://727tgvtmq4nb"
[sub_resource type="ShaderMaterial" id="ShaderMaterial_h6sl2"]
resource_local_to_scene = true
shader = ExtResource("4_h6sl2")
shader_parameter/flash = false
shader_parameter/flash_strength = 0.4
shader_parameter/highlight = Color(1, 1, 1, 0)
[sub_resource type="Animation" id="Animation_fnqwt"]
resource_name = "idle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_q2yeo"]
resource_name = "attack"
length = 0.80000335
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.16666667, 0.33333334, 0.36666667, 0.43333334, 0.49999997),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 1,
"values": [8, 9, 10, 11, 12, 13]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.33333334, 0.5),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"trigger_hit"
}, {
"args": [true, "idle"],
"method": &"complete_action"
}]
}
[sub_resource type="Animation" id="Animation_rfgh2"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [9]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, -48)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:material:shader_parameter/highlight")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_t5s0y"]
resource_name = "running"
length = 0.46667004
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.06666667, 0.13333333, 0.20000002, 0.26666668, 0.33333334, 0.40000004),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [2, 3, 4, 5, 6, 7, 1]
}
[sub_resource type="Animation" id="Animation_in6p1"]
resource_name = "hurt"
length = 0.23333667
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.099999994, 0.13333333, 0.16666667, 0.2),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1),
"update": 1,
"values": [14, 15, 16, 17, 18]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite:position")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.06666667, 0.16666667, 0.23333335),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector2(0, -48), Vector2(0, -60), Vector2(0, -48), Vector2(0, -48)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:material:shader_parameter/highlight")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.16666667),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.23333333),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [0.2],
"method": &"knockback"
}, {
"args": [false, "idle"],
"method": &"complete_action"
}]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_45clm"]
_data = {
&"RESET": SubResource("Animation_rfgh2"),
&"attack": SubResource("Animation_q2yeo"),
&"hurt": SubResource("Animation_in6p1"),
&"idle": SubResource("Animation_fnqwt"),
&"running": SubResource("Animation_t5s0y")
}
[sub_resource type="Gradient" id="Gradient_nqdtq"]
offsets = PackedFloat32Array(0)
colors = PackedColorArray(0, 0, 0, 1)
@@ -28,13 +207,27 @@ width = 1
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_82j8k")
life = 10
max_life = 10
stats = SubResource("Resource_bfuvr")
[node name="Sprite2D" type="Sprite2D" parent="."]
[node name="Shadow" type="Sprite2D" parent="."]
modulate = Color(0, 0, 0, 0.57254905)
position = Vector2(0, -48)
texture = ExtResource("2_87tms")
texture = ExtResource("3_bfuvr")
[node name="Sprite" type="Sprite2D" parent="."]
material = SubResource("ShaderMaterial_h6sl2")
position = Vector2(0, -48)
texture = ExtResource("4_rigyd")
hframes = 8
vframes = 3
frame = 9
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_45clm")
}
[node name="LifeBar" type="TextureProgressBar" parent="."]
layout_mode = 0
@@ -47,3 +240,6 @@ texture_under = SubResource("GradientTexture1D_fehp8")
texture_progress = SubResource("GradientTexture1D_bfuvr")
tint_over = Color(1, 0, 0, 1)
tint_progress = Color(1, 0, 0, 1)
[node name="BannerOffset" type="Node2D" parent="."]
position = Vector2(0, -57)

View File

@@ -34,7 +34,7 @@ point_count = 2
[sub_resource type="ShaderMaterial" id="ShaderMaterial_nfvtf"]
shader = ExtResource("2_ggqxp")
shader_parameter/line_thickness = 3.8570001832075
shader_parameter/line_thickness = 3.0000001425
shader_parameter/line_color = Color(0.7666664, 0, 1, 1)
[sub_resource type="Gradient" id="Gradient_ggqxp"]
@@ -97,7 +97,7 @@ scale = Vector2(2, 2)
transform = Transform2D(2, 0, 0, 2, 0, 0)
[node name="ColorRect" type="ColorRect" parent="CanvasLayer"]
anchors_preset = -1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -801.5
@@ -131,13 +131,13 @@ scale_amount_max = 4.2
scale_amount_curve = SubResource("Curve_0aygh")
[node name="CanvasGroup" type="CanvasGroup" parent="."]
texture_filter = 4
material = SubResource("ShaderMaterial_nfvtf")
position = Vector2(509, 176)
scale = Vector2(5, 5)
[node name="CPUParticles2D" type="CPUParticles2D" parent="CanvasGroup"]
material = SubResource("ShaderMaterial_28dkg")
scale = Vector2(0.99999994, 0.99999994)
scale = Vector2(5, 5)
amount = 1000
texture = ExtResource("13_0xaku")
preprocess = 5.0
@@ -276,7 +276,7 @@ avoidance_enabled = true
position = Vector2(654, -2)
[node name="SubViewport" type="SubViewport" parent="."]
size = Vector2i(1920, 1080)
size = Vector2i(3840, 2160)
[node name="ColorRect" type="ColorRect" parent="SubViewport"]
anchors_preset = 15
@@ -294,7 +294,7 @@ follow_viewport = false
ignore_camera_scroll = true
[node name="TextureRect2" type="TextureRect" parent="SubViewport/Parallax2D"]
anchors_preset = -1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 1920.0

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://cdtpyg5ohniax"]
[gd_scene load_steps=15 format=3 uid="uid://cdtpyg5ohniax"]
[ext_resource type="Script" uid="uid://ce0vugvrwvppb" path="res://scripts/questor_sprite.gd" id="1_0ev5i"]
[ext_resource type="Texture2D" uid="uid://bu0e077vc8qo1" path="res://graphics/questview/lvlup-circle.png" id="2_nqdtq"]
@@ -124,11 +124,60 @@ tracks/3/keys = {
"values": [Vector2(0, -45), Vector2(0, -40), Vector2(0, -45), Vector2(0, -40), Vector2(0, -45)]
}
[sub_resource type="Animation" id="Animation_cr46e"]
resource_name = "spear attack"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.033333335, 0.06666667, 0.10000001, 0.13333334, 0.16666667, 0.20000002, 0.23333335, 0.26666668),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 1,
"values": [11, 11, 12, 13, 14, 15, 16, 17, 18]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.16666667, 0.5),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],
"method": &"trigger_hit"
}, {
"args": [true, "spear idle"],
"method": &"complete_action"
}]
}
[sub_resource type="Animation" id="Animation_nqdtq"]
resource_name = "spear idle"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [18]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_pylgq"]
_data = {
&"RESET": SubResource("Animation_7jhts"),
&"idle": SubResource("Animation_gy3gd"),
&"running": SubResource("Animation_5om5g")
&"running": SubResource("Animation_5om5g"),
&"spear attack": SubResource("Animation_cr46e"),
&"spear idle": SubResource("Animation_nqdtq")
}
[sub_resource type="Gradient" id="Gradient_nqdtq"]
@@ -155,6 +204,11 @@ offset_top = 274.0
offset_right = 89.0
offset_bottom = 274.0
script = ExtResource("1_0ev5i")
life = null
max_life = null
energy = null
max_energy = null
exp = null
[node name="GroundFX" type="Node2D" parent="."]
position = Vector2(0, -30)
@@ -175,7 +229,7 @@ texture = ExtResource("3_cr46e")
position = Vector2(0, -53)
texture = ExtResource("2_w1b7t")
hframes = 4
vframes = 3
vframes = 5
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
@@ -187,6 +241,7 @@ autoplay = "running"
position = Vector2(0, -94)
[node name="LifeBar" type="TextureProgressBar" parent="."]
visible = false
layout_mode = 0
offset_left = -37.0
offset_top = 16.0