More work on portraits and on combat in quest views

This commit is contained in:
2025-10-02 15:42:16 -04:00
parent 00ef506689
commit aa9b0720d8
36 changed files with 236 additions and 90 deletions

View File

@@ -74,7 +74,7 @@ class Event:
quest.questview.set_questor_animation("idle")
for enemy in enemy_list:
quest.questview.pause_setting()
quest.questview.place_enemy(enemy)
quest.questview.place_enemy(enemy, true)
quest.questview.set_enemy_animation(enemy, "idle")
start_combat([quest.questor.quest_sprite], enemy_list)
@@ -169,6 +169,11 @@ class Event:
printerr("Tried to remove someone not in the turn queue")
func _on_combat_action_complete(requeue : bool, combatant : QuestSprite) -> void:
if combatant.position != combatant.reset_position:
combatant.position_reset()
combatant.arrived.connect(_on_combat_action_complete.bind(requeue, combatant), CONNECT_ONE_SHOT)
return
busy_list.erase(combatant)
if requeue:
add_to_turn_queue(combatant)
@@ -178,7 +183,8 @@ class Event:
#TODO: Come up with other options than just swinging at each other
var enemies : Array = get_enemy_list(combatant)
var target = enemies.pick_random()
execute_attack(combatant, target)
combatant.approach(target, combatant.melee_range)
combatant.arrived.connect(execute_attack.bind(combatant, target), CONNECT_ONE_SHOT)
func get_enemy_list(combatant) -> Array:
var lst = []

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://crrd8mpcuync2"
path="res://.godot/imported/body.png-efd5e53b6f03adc4a57de5ce8dc4d3cd.ctex"
path="res://.godot/imported/body.png-5a897720f599ec630383f1f3dd8e9e9e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/body.png"
dest_files=["res://.godot/imported/body.png-efd5e53b6f03adc4a57de5ce8dc4d3cd.ctex"]
source_file="res://external/Test Portrait/Farmer_F/body.png"
dest_files=["res://.godot/imported/body.png-5a897720f599ec630383f1f3dd8e9e9e.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://pp5ssn5m2n3i"
path="res://.godot/imported/brow_shadow-1.png-8dff8c187d59ecaaefbb84e877b32e20.ctex"
path="res://.godot/imported/brow_shadow-1.png-94d923d93f9bc0db18f7b963da1021dd.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/brow_shadow-1.png"
dest_files=["res://.godot/imported/brow_shadow-1.png-8dff8c187d59ecaaefbb84e877b32e20.ctex"]
source_file="res://external/Test Portrait/Farmer_F/brow_shadow-1.png"
dest_files=["res://.godot/imported/brow_shadow-1.png-94d923d93f9bc0db18f7b963da1021dd.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://x4e86o28672u"
path="res://.godot/imported/brow_shadow-2.png-b5d8d416acf1ddb95fd785200da8d3ce.ctex"
path="res://.godot/imported/brow_shadow-2.png-85a8d07465b9b109e67ad99a37d690d1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/brow_shadow-2.png"
dest_files=["res://.godot/imported/brow_shadow-2.png-b5d8d416acf1ddb95fd785200da8d3ce.ctex"]
source_file="res://external/Test Portrait/Farmer_F/brow_shadow-2.png"
dest_files=["res://.godot/imported/brow_shadow-2.png-85a8d07465b9b109e67ad99a37d690d1.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://sv7bxo8a12i6"
path="res://.godot/imported/brow_shadow.png-f653be07b461bc5d7a18192996ffb73a.ctex"
path="res://.godot/imported/brow_shadow.png-e4497bbbff21d0b56dc81b07de4f06bc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/brow_shadow.png"
dest_files=["res://.godot/imported/brow_shadow.png-f653be07b461bc5d7a18192996ffb73a.ctex"]
source_file="res://external/Test Portrait/Farmer_F/brow_shadow.png"
dest_files=["res://.godot/imported/brow_shadow.png-e4497bbbff21d0b56dc81b07de4f06bc.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://tpg08bgn2on7"
path="res://.godot/imported/brows-1.png-86a51529282fffa26d497e35e4cc9367.ctex"
path="res://.godot/imported/brows-1.png-70092c4bb56529f3cdeb7b51925eb071.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/brows-1.png"
dest_files=["res://.godot/imported/brows-1.png-86a51529282fffa26d497e35e4cc9367.ctex"]
source_file="res://external/Test Portrait/Farmer_F/brows-1.png"
dest_files=["res://.godot/imported/brows-1.png-70092c4bb56529f3cdeb7b51925eb071.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://brmta1rtiau4a"
path="res://.godot/imported/brows-2.png-01beea1c4e9cadf04c529dc849682c8a.ctex"
path="res://.godot/imported/brows-2.png-227c9708d0b7fde57b1ef42021508fcf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/brows-2.png"
dest_files=["res://.godot/imported/brows-2.png-01beea1c4e9cadf04c529dc849682c8a.ctex"]
source_file="res://external/Test Portrait/Farmer_F/brows-2.png"
dest_files=["res://.godot/imported/brows-2.png-227c9708d0b7fde57b1ef42021508fcf.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://c3wwe6r000gpq"
path="res://.godot/imported/composite.png-a68e5c4a777094ce447b89a2ab45b35b.ctex"
path="res://.godot/imported/composite.png-b2c2e474fe243b72bd3471af031774d6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/composite.png"
dest_files=["res://.godot/imported/composite.png-a68e5c4a777094ce447b89a2ab45b35b.ctex"]
source_file="res://external/Test Portrait/Farmer_F/composite.png"
dest_files=["res://.godot/imported/composite.png-b2c2e474fe243b72bd3471af031774d6.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://caow8dqiog7j4"
path="res://.godot/imported/ear.png-74df11e092bb05fcc54c7e7478ed4d95.ctex"
path="res://.godot/imported/ear.png-a1b457892f7236464123f2229af36695.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/ear.png"
dest_files=["res://.godot/imported/ear.png-74df11e092bb05fcc54c7e7478ed4d95.ctex"]
source_file="res://external/Test Portrait/Farmer_F/ear.png"
dest_files=["res://.godot/imported/ear.png-a1b457892f7236464123f2229af36695.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://csp7xbtu0tpn7"
path="res://.godot/imported/eye-white-1.png-a31a2b044ab6206c129b0739fd4c0c80.ctex"
path="res://.godot/imported/eye-white-1.png-fb75b817d294c00ebeee3e6996a2c02e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/eye-white-1.png"
dest_files=["res://.godot/imported/eye-white-1.png-a31a2b044ab6206c129b0739fd4c0c80.ctex"]
source_file="res://external/Test Portrait/Farmer_F/eye-white-1.png"
dest_files=["res://.godot/imported/eye-white-1.png-fb75b817d294c00ebeee3e6996a2c02e.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://mygmunn3voie"
path="res://.godot/imported/eyes-iris-1.png-d2077e2e658acf3840075cfe98f86f4e.ctex"
path="res://.godot/imported/eyes-iris-1.png-3c96067ab402ea99f8e1b1b7db594f4c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/eyes-iris-1.png"
dest_files=["res://.godot/imported/eyes-iris-1.png-d2077e2e658acf3840075cfe98f86f4e.ctex"]
source_file="res://external/Test Portrait/Farmer_F/eyes-iris-1.png"
dest_files=["res://.godot/imported/eyes-iris-1.png-3c96067ab402ea99f8e1b1b7db594f4c.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://wnkr20dtf734"
path="res://.godot/imported/eyes-lashes-1.png-1460ddc60d7a087da2d517ce8f1a5faa.ctex"
path="res://.godot/imported/eyes-lashes-1.png-8a4535f7647af11ff99b165ee021e8cc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/eyes-lashes-1.png"
dest_files=["res://.godot/imported/eyes-lashes-1.png-1460ddc60d7a087da2d517ce8f1a5faa.ctex"]
source_file="res://external/Test Portrait/Farmer_F/eyes-lashes-1.png"
dest_files=["res://.godot/imported/eyes-lashes-1.png-8a4535f7647af11ff99b165ee021e8cc.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dd063tm4qo5nc"
path="res://.godot/imported/eyes.png-da6eb5fdf7f113844fe8e5414a1f2331.ctex"
path="res://.godot/imported/eyes.png-1384a95ac331738bfe48af30a8953f10.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/eyes.png"
dest_files=["res://.godot/imported/eyes.png-da6eb5fdf7f113844fe8e5414a1f2331.ctex"]
source_file="res://external/Test Portrait/Farmer_F/eyes.png"
dest_files=["res://.godot/imported/eyes.png-1384a95ac331738bfe48af30a8953f10.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://li44lgsa0ky"
path="res://.godot/imported/eyes_shadow.png-c0450e5470a67b3e212b544dfeadc885.ctex"
path="res://.godot/imported/eyes_shadow.png-639516c9b7d6a71a22fcd4597236a89e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/eyes_shadow.png"
dest_files=["res://.godot/imported/eyes_shadow.png-c0450e5470a67b3e212b544dfeadc885.ctex"]
source_file="res://external/Test Portrait/Farmer_F/eyes_shadow.png"
dest_files=["res://.godot/imported/eyes_shadow.png-639516c9b7d6a71a22fcd4597236a89e.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://can8npg0ufr3f"
path="res://.godot/imported/hair_bg.png-71bd584ff51ea6c704ba2eb2b8124703.ctex"
path="res://.godot/imported/hair_bg.png-07f942d8008a0d2581909922002bbbe2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/hair_bg.png"
dest_files=["res://.godot/imported/hair_bg.png-71bd584ff51ea6c704ba2eb2b8124703.ctex"]
source_file="res://external/Test Portrait/Farmer_F/hair_bg.png"
dest_files=["res://.godot/imported/hair_bg.png-07f942d8008a0d2581909922002bbbe2.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://vt17lekvchdg"
path="res://.godot/imported/hair_fg.png-9dfae38fbf9812dad9b45d15a1cbd791.ctex"
path="res://.godot/imported/hair_fg.png-9f5c6bb27fb0349d9ddfba99f87aa5c6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/hair_fg.png"
dest_files=["res://.godot/imported/hair_fg.png-9dfae38fbf9812dad9b45d15a1cbd791.ctex"]
source_file="res://external/Test Portrait/Farmer_F/hair_fg.png"
dest_files=["res://.godot/imported/hair_fg.png-9f5c6bb27fb0349d9ddfba99f87aa5c6.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cru775pghpate"
path="res://.godot/imported/hair_fg_shadow.png-609d7f961008e48f548f0e05277dafb4.ctex"
path="res://.godot/imported/hair_fg_shadow.png-41de10e26ae2147aace92ba197b28075.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/hair_fg_shadow.png"
dest_files=["res://.godot/imported/hair_fg_shadow.png-609d7f961008e48f548f0e05277dafb4.ctex"]
source_file="res://external/Test Portrait/Farmer_F/hair_fg_shadow.png"
dest_files=["res://.godot/imported/hair_fg_shadow.png-41de10e26ae2147aace92ba197b28075.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dj6fagfp2sbrx"
path="res://.godot/imported/hat-bg.png-972a86d8449c11d1a72a4f21b15efd0a.ctex"
path="res://.godot/imported/hat-bg.png-00e20fcd79ddb550d12459624be7d9b1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/hat-bg.png"
dest_files=["res://.godot/imported/hat-bg.png-972a86d8449c11d1a72a4f21b15efd0a.ctex"]
source_file="res://external/Test Portrait/Farmer_F/hat-bg.png"
dest_files=["res://.godot/imported/hat-bg.png-00e20fcd79ddb550d12459624be7d9b1.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://b303qa76o5r1m"
path="res://.godot/imported/hat.png-21e48868d0218210b390afa680a1202d.ctex"
path="res://.godot/imported/hat.png-9bb6fa9d1f7f7503ee26b1749cdf7c0a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/hat.png"
dest_files=["res://.godot/imported/hat.png-21e48868d0218210b390afa680a1202d.ctex"]
source_file="res://external/Test Portrait/Farmer_F/hat.png"
dest_files=["res://.godot/imported/hat.png-9bb6fa9d1f7f7503ee26b1749cdf7c0a.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dyeu4kwwnxjn5"
path="res://.godot/imported/hat_fg.png-2dddd61ae84da22b32d123d3533338c5.ctex"
path="res://.godot/imported/hat_fg.png-e2cae14f649780ea2aba38b34358b587.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/hat_fg.png"
dest_files=["res://.godot/imported/hat_fg.png-2dddd61ae84da22b32d123d3533338c5.ctex"]
source_file="res://external/Test Portrait/Farmer_F/hat_fg.png"
dest_files=["res://.godot/imported/hat_fg.png-e2cae14f649780ea2aba38b34358b587.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dbdjaye6srxhx"
path="res://.godot/imported/head.png-47039f8abc285b87bb176b5b43ee9a5f.ctex"
path="res://.godot/imported/head.png-df46fa0b8e2741bbf0fad9b3a03fedea.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/farmer_f/head.png"
dest_files=["res://.godot/imported/head.png-47039f8abc285b87bb176b5b43ee9a5f.ctex"]
source_file="res://external/Test Portrait/Farmer_F/head.png"
dest_files=["res://.godot/imported/head.png-df46fa0b8e2741bbf0fad9b3a03fedea.ctex"]
[params]

BIN
external/Test Portrait/Penny.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

40
external/Test Portrait/Penny.png.import vendored Normal file
View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dy01kbn6oq774"
path="res://.godot/imported/Penny.png-389d42de4b6272cc7190b03341f8ba23.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/Test Portrait/Penny.png"
dest_files=["res://.godot/imported/Penny.png-389d42de4b6272cc7190b03341f8ba23.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

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cygn0xfsayykd"
path="res://.godot/imported/eye-a.png-4ae928c135fabbb6dbe591d1f658a054.ctex"
path="res://.godot/imported/eye-a.png-734a4fd0bcb4bbf98a974b4b70824d99.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/player/eye-a.png"
dest_files=["res://.godot/imported/eye-a.png-4ae928c135fabbb6dbe591d1f658a054.ctex"]
source_file="res://external/Test Portrait/player/eye-a.png"
dest_files=["res://.godot/imported/eye-a.png-734a4fd0bcb4bbf98a974b4b70824d99.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bg6lac6nl5k84"
path="res://.godot/imported/eye-b.png-8a340a04655f91a439de6b55293f607d.ctex"
path="res://.godot/imported/eye-b.png-14ca96eb629f87ea602431771407786a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/player/eye-b.png"
dest_files=["res://.godot/imported/eye-b.png-8a340a04655f91a439de6b55293f607d.ctex"]
source_file="res://external/Test Portrait/player/eye-b.png"
dest_files=["res://.godot/imported/eye-b.png-14ca96eb629f87ea602431771407786a.ctex"]
[params]

View File

@@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bxdclvopvj75q"
path="res://.godot/imported/eye-c.png-b34d6d5c940d727416bc135e5e88a9ca.ctex"
path="res://.godot/imported/eye-c.png-4530d56f6c9ba13b8148544326f1dcc2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://external/test portrait/player/eye-c.png"
dest_files=["res://.godot/imported/eye-c.png-b34d6d5c940d727416bc135e5e88a9ca.ctex"]
source_file="res://external/Test Portrait/player/eye-c.png"
dest_files=["res://.godot/imported/eye-c.png-4530d56f6c9ba13b8148544326f1dcc2.ctex"]
[params]

Binary file not shown.

BIN
external/Test Portrait/priestess.clip vendored Normal file

Binary file not shown.

View File

@@ -104,7 +104,6 @@ total_visitors = 1
[node name="Timer" type="Timer" parent="Guildhall/VisitorSpawner"]
[node name="UI" type="CanvasLayer" parent="."]
visible = false
[node name="VBoxContainer" type="VBoxContainer" parent="UI"]
offset_left = 1485.0

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://dlmodaf4nojin"]
[gd_scene load_steps=10 format=3 uid="uid://dlmodaf4nojin"]
[ext_resource type="Texture2D" uid="uid://jhaiu4lbwswl" path="res://external/test-map.png" id="1_2klcf"]
[ext_resource type="PackedScene" uid="uid://dqt38n43p58vx" path="res://templates/map_pin.tscn" id="2_paxxb"]
@@ -19,6 +19,21 @@ shader_parameter/fringe_color = SubResource("GradientTexture1D_blm8a")
shader_parameter/fringe_threshold = 0.10000000000582077
shader_parameter/threshold = 0.361
[sub_resource type="Gradient" id="Gradient_gldc4"]
offsets = PackedFloat32Array(0, 0.5344828, 1)
colors = PackedColorArray(1, 1, 1, 1, 1, 0.8666667, 0, 1, 0.81, 0.567, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_0cso3"]
gradient = SubResource("Gradient_gldc4")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_2klcf"]
resource_local_to_scene = true
shader = ExtResource("3_2lpho")
shader_parameter/add_color = Color(1, 1, 1, 0)
shader_parameter/fringe_color = SubResource("GradientTexture1D_0cso3")
shader_parameter/fringe_threshold = 0.10000000000582077
shader_parameter/threshold = 0.361
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
@@ -43,10 +58,10 @@ offset_top = 554.0
offset_right = 459.0
offset_bottom = 624.0
label = ""
locked_brief = null
unlocked_brief = null
locked_brief = ""
unlocked_brief = ""
[node name="Brief" parent="Map Pin2/Panel" index="0"]
[node name="Brief" parent="Map Pin2/BriefPanel" index="0"]
text = ""
[node name="CanvasGroup" parent="Map Pin2" index="1"]
@@ -73,8 +88,8 @@ offset_right = 214.0
offset_bottom = 452.0
primed = true
label = "Nestor's Woods"
locked_brief = null
unlocked_brief = null
locked_brief = ""
unlocked_brief = ""
[node name="Map Pin4" parent="." instance=ExtResource("2_paxxb")]
layout_mode = 0
@@ -87,4 +102,20 @@ label = "Iko Gorge"
locked_brief = "Mysterious cliffs in the frozen north."
unlocked_brief = "One of the few northernmost lands uninhabited by [giants]. The snowy creatures of the Iko region run rampant here. Some say they are protected by the [giant] goddess, [Nakari]."
[node name="BriefPanel" parent="Map Pin4" index="0"]
offset_left = 56.0
offset_top = 53.0
offset_right = 356.0
offset_bottom = 153.0
[node name="Brief" parent="Map Pin4/BriefPanel" index="0"]
text = "Mysterious cliffs in the frozen north."
[node name="CanvasGroup" parent="Map Pin4" index="1"]
material = SubResource("ShaderMaterial_2klcf")
[node name="Label" parent="Map Pin4/CanvasGroup/Banner" index="0"]
text = "Iko Gorge"
[editable path="Map Pin2"]
[editable path="Map Pin4"]

View File

@@ -24,7 +24,8 @@ func _process(delta: float) -> void:
toggle_player_profile()
if Input.is_action_just_pressed("switch modes"):
confirm_end_shift()
if Input.is_action_just_pressed("test"):
test_save()
func add_quest_progress_bar(quest : Quest) -> void:
panel.add_quest_progress_bar(quest)

View File

@@ -9,6 +9,8 @@ var energy : int = 1
var max_energy : int = 1
var level : int = 1
var exp : int = 0
var reset_position : Vector2
var melee_range : float = 100
@export var stats : StatBlock
var gold : int = 0
@@ -18,7 +20,33 @@ var gold : int = 0
signal died(killer :QuestSprite)
signal action_complete(requeue : bool)
signal busy()
signal arrived()
func position_reset() -> void:
var tween = create_tween()
#TODO: Vary movement animations?
tween.tween_callback(anim_player.play.bind("running"))
tween.tween_property(self, "position", reset_position,.75)
if reset_position.x < position.x:
$Sprite.flip_h = true
tween.tween_property($Sprite, "flip_h", false, 0)
tween.tween_callback(anim_player.play.bind("idle"))
tween.tween_callback(arrived.emit)
func approach(target, offset) -> void:
var tween = create_tween()
if target.position.x > position.x:
#TODO: Switch facing direction
offset = -offset
#TODO: Vary movement animations?
tween.tween_callback(anim_player.play.bind("running"))
var target_position = target.position + Vector2(offset, 0)
tween.tween_property(self, "position", target_position,.75)
if target_position.x < position.x:
$Sprite.flip_h = true
tween.tween_property($Sprite, "flip_h", false, 0)
tween.tween_callback(anim_player.play.bind("idle"))
tween.tween_callback(arrived.emit)
func attack(target : QuestSprite) -> void:
print("Attack by %s to %s" % [name, target.name])

View File

@@ -6,6 +6,7 @@ const questor_template = preload("res://templates/questor_sprite.tscn")
@onready var setting = $Setting
var quest : Quest
@export var base_speed : float
func setup(qst : Quest) -> void:
quest = qst
@@ -14,6 +15,10 @@ func setup(qst : Quest) -> void:
questorSprite.setup(quest.questor)
add_child(questorSprite)
questorSprite.global_position = $QuestorPosition.global_position
questorSprite.reset_position = questorSprite.position
for child in %Layers.get_children():
if child is Parallax2D:
child.autoscroll.x = -base_speed * child.scroll_scale.x
func set_questor_animation(anim_name : String) -> void:
@@ -22,9 +27,10 @@ func set_questor_animation(anim_name : String) -> void:
func set_enemy_animation(enemy : Enemy, anim_name : String) -> void:
enemy.set_animation(anim_name)
func place_enemy(enemy : Enemy) -> void:
func place_enemy(enemy : Enemy, reset : bool = false) -> void:
add_child(enemy)
enemy.global_position = $EnemyPosition.global_position
enemy.reset_position = enemy.position
func pause_setting() -> void:
setting.process_mode = Node.PROCESS_MODE_DISABLED

View File

@@ -54,3 +54,6 @@ func check_levelup() -> void:
func _on_level_up() -> void:
show_levelup_banner()
func _on_questor_changed() -> void:
pass

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=5 format=3 uid="uid://c31w28fcqw4ra"]
[gd_scene load_steps=9 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"]
@@ -8,6 +8,22 @@
script = ExtResource("2_fehp8")
metadata/_custom_type_script = "uid://727tgvtmq4nb"
[sub_resource type="Gradient" id="Gradient_nqdtq"]
offsets = PackedFloat32Array(0)
colors = PackedColorArray(0, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_fehp8"]
gradient = SubResource("Gradient_nqdtq")
width = 1
[sub_resource type="Gradient" id="Gradient_yy18h"]
offsets = PackedFloat32Array(1)
colors = PackedColorArray(1, 1, 1, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_bfuvr"]
gradient = SubResource("Gradient_yy18h")
width = 1
[node name="Goo" type="Control"]
layout_mode = 3
anchors_preset = 0
@@ -19,3 +35,15 @@ position = Vector2(5, -47)
texture = ExtResource("2_87tms")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
[node name="LifeBar" type="TextureProgressBar" parent="."]
layout_mode = 0
offset_left = -37.0
offset_top = 16.0
offset_right = 38.0
offset_bottom = 26.0
nine_patch_stretch = true
texture_under = SubResource("GradientTexture1D_fehp8")
texture_progress = SubResource("GradientTexture1D_bfuvr")
tint_over = Color(1, 0, 0, 1)
tint_progress = Color(1, 0, 0, 1)

View File

@@ -11,6 +11,7 @@ custom_minimum_size = Vector2(375, 325)
offset_right = 375.0
offset_bottom = 325.0
script = ExtResource("1_gmxj1")
base_speed = 45.0
[node name="Setting" type="Control" parent="."]
clip_contents = true
@@ -19,51 +20,54 @@ anchors_preset = 0
offset_right = 375.0
offset_bottom = 325.0
[node name="Control" type="Control" parent="Setting"]
[node name="Layers" type="Control" parent="Setting"]
unique_name_in_owner = true
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="StageParallax" type="Parallax2D" parent="Setting/Control"]
[node name="StageParallax" type="Parallax2D" parent="Setting/Layers"]
scroll_scale = Vector2(0.667, 0.667)
repeat_size = Vector2(750, 0)
autoscroll = Vector2(-30, 0)
ignore_camera_scroll = true
[node name="Background" type="TextureRect" parent="Setting/Control/StageParallax"]
[node name="Background" type="TextureRect" parent="Setting/Layers/StageParallax"]
offset_top = -50.0
offset_right = 750.0
offset_bottom = 375.0
texture = ExtResource("2_0cnce")
[node name="StageParallax3" type="Parallax2D" parent="Setting/Control"]
[node name="StageParallax3" type="Parallax2D" parent="Setting/Layers"]
scale = Vector2(0.8, 0.8)
scroll_scale = Vector2(0.778, 0.778)
repeat_size = Vector2(750, 0)
autoscroll = Vector2(-35, 0)
ignore_camera_scroll = true
[node name="Background" type="TextureRect" parent="Setting/Control/StageParallax3"]
[node name="Background" type="TextureRect" parent="Setting/Layers/StageParallax3"]
modulate = Color(1.179842, 1.179842, 1.179842, 1)
offset_right = 750.0
offset_bottom = 425.0
texture = ExtResource("3_dvgqk")
[node name="BackgroundParallax" type="Parallax2D" parent="Setting/Control"]
[node name="BackgroundParallax" type="Parallax2D" parent="Setting/Layers"]
repeat_size = Vector2(475, 0)
autoscroll = Vector2(-45, 0)
ignore_camera_scroll = true
[node name="TextureRect" type="TextureRect" parent="Setting/Control/BackgroundParallax"]
[node name="TextureRect" type="TextureRect" parent="Setting/Layers/BackgroundParallax"]
offset_top = -50.0
offset_right = 475.0
offset_bottom = 375.0
texture = ExtResource("4_0yhlr")
[node name="StageParallax2" type="Parallax2D" parent="Setting/Control"]
[node name="StageParallax2" type="Parallax2D" parent="Setting/Layers"]
repeat_size = Vector2(750, 0)
autoscroll = Vector2(-45, 0)
ignore_camera_scroll = true
[node name="Foreground" type="TextureRect" parent="Setting/Control/StageParallax2"]
[node name="Foreground" type="TextureRect" parent="Setting/Layers/StageParallax2"]
offset_top = -50.0
offset_right = 750.0
offset_bottom = 375.0