Reorganized files, started splitting up unit
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
[gd_scene format=3 uid="uid://dkhyh5ce4iuk3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bks7uplgjjdg0" path="res://nodes/combat_map.gd" id="1_jyv1f"]
|
||||
[ext_resource type="Script" uid="uid://c6701vy8h5rfx" path="res://resources/resource_definitions/dl_tileset.gd" id="2_8rn0j"]
|
||||
[ext_resource type="Script" uid="uid://bks7uplgjjdg0" path="res://scripts/battle/map/combat_map.gd" id="1_jyv1f"]
|
||||
[ext_resource type="Script" uid="uid://c6701vy8h5rfx" path="res://scripts/battle/map/dl_tileset.gd" id="2_8rn0j"]
|
||||
[ext_resource type="Texture2D" uid="uid://sjsl8q7tkx8" path="res://assets/sprites/grid_highlight.png" id="3_vcj5e"]
|
||||
[ext_resource type="Script" uid="uid://cxl38x2m6sj3w" path="res://scripts/battle/grid_overlay.gd" id="4_jelju"]
|
||||
[ext_resource type="Script" uid="uid://cxl38x2m6sj3w" path="res://scripts/battle/map/grid_overlay.gd" id="4_jelju"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1ks72fiesfrm" path="res://assets/sprites/combat_map_ui.BMP" id="5_mycp7"]
|
||||
[ext_resource type="Texture2D" uid="uid://65rmoynep5hy" path="res://assets/sprites/MP000A.BMP" id="6_muxvo"]
|
||||
[ext_resource type="Script" uid="uid://c4f1vflwd81b8" path="res://nodes/wall_renderer.gd" id="7_wallr"]
|
||||
[ext_resource type="Script" uid="uid://c4f1vflwd81b8" path="res://scripts/battle/map/wall_renderer.gd" id="7_wallr"]
|
||||
[ext_resource type="Texture2D" uid="uid://b20mhn7ca5xyo" path="res://assets/sprites/aux_terrain.BMP" id="8_auxtr"]
|
||||
[ext_resource type="Script" uid="uid://d1d1nbetdvynk" path="res://nodes/fog_renderer.gd" id="9_fogrn"]
|
||||
[ext_resource type="Script" uid="uid://d1d1nbetdvynk" path="res://scripts/battle/map/fog_renderer.gd" id="9_fogrn"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_vcj5e"]
|
||||
script = ExtResource("2_8rn0j")
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[gd_scene format=3]
|
||||
[gd_scene format=3 uid="uid://dpcaa8x6xxup0"]
|
||||
|
||||
[ext_resource type="Script" path="res://nodes/debug_menu.gd" id="1_script"]
|
||||
[ext_resource type="Script" uid="uid://c64yr8xvkb5cw" path="res://scripts/debug/debug_menu.gd" id="1_script"]
|
||||
|
||||
[node name="DebugMenu" type="CanvasLayer"]
|
||||
[node name="DebugMenu" type="CanvasLayer" unique_id=240858900]
|
||||
layer = 100
|
||||
script = ExtResource("1_script")
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="."]
|
||||
[node name="Panel" type="PanelContainer" parent="." unique_id=349886438]
|
||||
unique_name_in_owner = true
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -14,46 +14,45 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Panel"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="Panel" unique_id=322235564]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 12
|
||||
theme_override_constants/margin_top = 12
|
||||
theme_override_constants/margin_right = 12
|
||||
theme_override_constants/margin_bottom = 12
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Panel/MarginContainer" unique_id=1731008558]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="TitleLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer" unique_id=211532752]
|
||||
layout_mode = 2
|
||||
text = "Debug Menu"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="HSeparator" type="HSeparator" parent="Panel/MarginContainer/VBoxContainer" unique_id=1527486356]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScenesLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="ScenesLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer" unique_id=1071710223]
|
||||
layout_mode = 2
|
||||
text = "Scenes:"
|
||||
|
||||
[node name="SceneList" type="VBoxContainer" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="SceneList" type="VBoxContainer" parent="Panel/MarginContainer/VBoxContainer" unique_id=1684653951]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="HSeparator2" type="HSeparator" parent="Panel/MarginContainer/VBoxContainer" unique_id=487142357]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ConsoleLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="ConsoleLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer" unique_id=1165373860]
|
||||
layout_mode = 2
|
||||
text = "Console:"
|
||||
|
||||
[node name="CommandInput" type="LineEdit" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="CommandInput" type="LineEdit" parent="Panel/MarginContainer/VBoxContainer" unique_id=1402278573]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "Enter command or expression..."
|
||||
|
||||
[node name="ResultLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="ResultLabel" type="Label" parent="Panel/MarginContainer/VBoxContainer" unique_id=881735021]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = ""
|
||||
autowrap_mode = 3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://b6a7nlnf58mc4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c016mxgatcpse" path="res://nodes/unit.gd" id="1_cq4v0"]
|
||||
[ext_resource type="Script" uid="uid://c016mxgatcpse" path="res://scripts/units/unit.gd" id="1_cq4v0"]
|
||||
[ext_resource type="Texture2D" uid="uid://cw5su6lignryo" path="res://assets/sprites/flag.png" id="2_fhs1y"]
|
||||
[ext_resource type="Shader" uid="uid://bd8ki8xwym5nc" path="res://shaders/chroma_key.gdshader" id="3_fhs1y"]
|
||||
[ext_resource type="Texture2D" uid="uid://dyutp4m5d53gd" path="res://assets/sprites/CP002AA.BMP" id="3_on614"]
|
||||
@@ -18,7 +18,7 @@ resource_name = "AllegianceIndicatorManager"
|
||||
script/source = "extends Sprite2D
|
||||
|
||||
|
||||
func _on_unit_unit_allegiance_changed(unit: Unit, allegiance: UnitAllegiance) -> void:
|
||||
func _on_unit_unit_allegiance_changed(_unit: Unit, allegiance: UnitAllegiance) -> void:
|
||||
self_modulate = allegiance.color
|
||||
"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="Resource" script_class="UnitAllegiance" format=3 uid="uid://cuc7kkknpsr1g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bhglsexm8dtpj" path="res://resources/resource_definitions/unit_allegiance.gd" id="1_40cg2"]
|
||||
[ext_resource type="Script" uid="uid://bhglsexm8dtpj" path="res://scripts/units/unit_allegiance.gd" id="1_40cg2"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_40cg2")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_resource type="Resource" script_class="UnitAllegiance" format=3 uid="uid://dufi2h00j5vrq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bhglsexm8dtpj" path="res://resources/resource_definitions/unit_allegiance.gd" id="1_4mkdx"]
|
||||
[ext_resource type="Script" uid="uid://bhglsexm8dtpj" path="res://scripts/units/unit_allegiance.gd" id="1_4mkdx"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_4mkdx")
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
class_name ConsoleCommand extends RefCounted
|
||||
|
||||
func get_command_name() -> String:
|
||||
return ""
|
||||
|
||||
func get_help_text() -> String:
|
||||
return ""
|
||||
|
||||
func run(args: Array, context: Dictionary) -> String:
|
||||
return ""
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene format=3 uid="uid://gfrxev22t0bc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ifv6cww6fk6c" path="res://nodes/game.gd" id="1_script"]
|
||||
[ext_resource type="Script" uid="uid://ifv6cww6fk6c" path="res://scripts/game.gd" id="1_script"]
|
||||
[ext_resource type="PackedScene" path="res://prefabs/debug_menu.tscn" id="2_debug_menu"]
|
||||
|
||||
[node name="Game" type="Node" unique_id=906681388]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[gd_scene format=3 uid="uid://wy7ur5r23ek3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dnsqtsx4u2hx4" path="res://nodes/strategy_phase.gd" id="1_qs1ys"]
|
||||
[ext_resource type="Script" uid="uid://dnsqtsx4u2hx4" path="res://scripts/battle/strategy_phase.gd" id="1_qs1ys"]
|
||||
[ext_resource type="PackedScene" uid="uid://cy7r0udfcsqbn" path="res://prefabs/combat_ui.tscn" id="2_4s0rq"]
|
||||
[ext_resource type="PackedScene" uid="uid://dkhyh5ce4iuk3" path="res://prefabs/combat_map.tscn" id="3_n1a8d"]
|
||||
[ext_resource type="Script" uid="uid://dfojm3n0em4ef" path="res://nodes/player_controller.gd" id="4_208pr"]
|
||||
[ext_resource type="Script" uid="uid://cf4ivrcbky0s3" path="res://nodes/combat_system.gd" id="5_n11my"]
|
||||
[ext_resource type="Script" uid="uid://dfojm3n0em4ef" path="res://scripts/battle/player_controller.gd" id="4_208pr"]
|
||||
[ext_resource type="Script" uid="uid://cf4ivrcbky0s3" path="res://scripts/battle/combat_engine/combat_system.gd" id="5_n11my"]
|
||||
[ext_resource type="Script" uid="uid://csdcbi2gtwrly" path="res://scripts/battle/camera_controller.gd" id="6_m48os"]
|
||||
[ext_resource type="AudioStream" uid="uid://dsikulned64qt" path="res://assets/music/combat_bgm_01.OGG" id="7_oih6t"]
|
||||
|
||||
|
||||
@@ -86,14 +86,14 @@ func _pressed() -> void:
|
||||
var combat_map: CombatMap = combat_instance.find_child(\"CombatMap\")
|
||||
|
||||
var player_unit: Unit = UNIT_SCENE.instantiate()
|
||||
player_unit.stat_template = UnitStats.new(50)
|
||||
player_unit.stat_template = UnitStats.new()
|
||||
player_unit.info_template = UnitInfo.new()
|
||||
player_unit.info_template.name = \"Putit\"
|
||||
player_unit.allegiance_template = PLAYER_ALLEGIANCE
|
||||
combat_map.deploy_unit(player_unit, Vector2i(3, 3))
|
||||
|
||||
var enemy_unit: Unit = UNIT_SCENE.instantiate()
|
||||
enemy_unit.stat_template = UnitStats.new(50)
|
||||
enemy_unit.stat_template = UnitStats.new()
|
||||
enemy_unit.info_template = UnitInfo.new()
|
||||
enemy_unit.info_template.name = \"Putit\"
|
||||
enemy_unit.allegiance_template = ENEMY_ALLEGIANCE
|
||||
|
||||
461
scenes/views/main_menu_view.tscn111937213334.tmp
Normal file
461
scenes/views/main_menu_view.tscn111937213334.tmp
Normal file
@@ -0,0 +1,461 @@
|
||||
[gd_scene format=3 uid="uid://dlbuo46n6q238"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_wmt4g"]
|
||||
[ext_resource type="AudioStream" uid="uid://b7dgmblbcm0cj" path="res://assets/music/menu_theme.OGG" id="2_0dhhe"]
|
||||
[ext_resource type="Texture2D" uid="uid://b47b6tt142b25" path="res://assets/sprites/main_menu.BMP" id="3_xgjk6"]
|
||||
[ext_resource type="AudioStream" uid="uid://5ndo4w06umsa" path="res://assets/sounds/SE020.WAV" id="4_somrw"]
|
||||
[ext_resource type="AudioStream" uid="uid://d1hacs4t5qni1" path="res://assets/sounds/SE015.WAV" id="5_ybnw1"]
|
||||
[ext_resource type="Texture2D" uid="uid://8kr4vmvhu03p" path="res://assets/sprites/menu_selector_flame.BMP" id="6_5jfhr"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wu84c"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(0, 0, 800, 400)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8ln24"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(0, 600, 800, 348)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a8gd2"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(800, 0, 745, 745)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bqqt6"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(-1, 995, 800, 43)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rtw2f"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(0, 950, 800, 45)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oa1go"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(800, 744, 515, 210)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_hover"]
|
||||
resource_name = "ButtonHoverSFX"
|
||||
script/source = "extends VBoxContainer
|
||||
|
||||
@onready var hover_sfx: AudioStreamPlayer = $HoverSFX
|
||||
@onready var left_indicator: Control = %LeftIndicator
|
||||
@onready var right_indicator: Control = %RightIndicator
|
||||
@onready var click_sfx: AudioStreamPlayer = $ClickSFX
|
||||
|
||||
func _ready() -> void:
|
||||
for child in get_children():
|
||||
if child is TextureButton:
|
||||
child.mouse_entered.connect(_on_button_hovered.bind(child))
|
||||
child.mouse_exited.connect(_on_button_unhovered)
|
||||
child.pressed.connect(_on_button_clicked)
|
||||
|
||||
func _on_button_hovered(button: TextureButton) -> void:
|
||||
hover_sfx.play()
|
||||
var button_center := button.global_position + button.size / 2.0
|
||||
left_indicator.global_position = Vector2(button.global_position.x, button_center.y)
|
||||
right_indicator.global_position = Vector2(button.global_position.x + button.size.x, button_center.y)
|
||||
left_indicator.visible = true
|
||||
right_indicator.visible = true
|
||||
|
||||
func _on_button_unhovered() -> void:
|
||||
left_indicator.visible = false
|
||||
right_indicator.visible = false
|
||||
|
||||
func _on_button_clicked() -> void:
|
||||
click_sfx.play()
|
||||
"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tbmy8"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 0, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jk1qb"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 300, 330, 50)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_bqqt6"]
|
||||
resource_name = "StartButton"
|
||||
script/source = "extends TextureButton
|
||||
|
||||
const COMBAT_SCENE = preload(\"res://scenes/views/battle_view.tscn\")
|
||||
const UNIT_SCENE = preload(\"res://prefabs/unit.tscn\")
|
||||
const PLAYER_ALLEGIANCE = preload(\"res://resources/allegiance_types/player_allegiance.tres\")
|
||||
const ENEMY_ALLEGIANCE = preload(\"res://resources/allegiance_types/enemy_allegiance.tres\")
|
||||
|
||||
func _pressed() -> void:
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
var combat_instance := COMBAT_SCENE.instantiate()
|
||||
var combat_map: CombatMap = combat_instance.find_child(\"CombatMap\")
|
||||
|
||||
var player_unit: Unit = UNIT_SCENE.instantiate()
|
||||
player_unit.stat_template = UnitStats.new()
|
||||
player_unit.info_template = UnitInfo.new()
|
||||
player_unit.info_template.name = \"Putit\"
|
||||
player_unit.allegiance_template = PLAYER_ALLEGIANCE
|
||||
combat_map.deploy_unit(player_unit, Vector2i(3, 3))
|
||||
|
||||
var enemy_unit: Unit = UNIT_SCENE.instantiate()
|
||||
enemy_unit.stat_template = UnitStats.new()
|
||||
enemy_unit.info_template = UnitInfo.new()
|
||||
enemy_unit.info_template.name = \"Putit\"
|
||||
enemy_unit.allegiance_template = ENEMY_ALLEGIANCE
|
||||
combat_map.deploy_unit(enemy_unit, Vector2i(6, 3))
|
||||
|
||||
var tree := get_tree()
|
||||
var root := tree.root
|
||||
var current_scene := tree.current_scene
|
||||
root.remove_child(current_scene)
|
||||
current_scene.queue_free()
|
||||
root.add_child(combat_instance)
|
||||
tree.current_scene = combat_instance
|
||||
"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5dd4i"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 60, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lgwnu"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 360, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_flqon"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 120, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rcqid"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 420, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1ajci"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 180, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7b55j"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 480, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5pajh"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 240, 330, 50)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j7ex8"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1550, 540, 330, 50)
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_wu84c"]
|
||||
resource_name = "ExitButton"
|
||||
script/source = "extends TextureButton
|
||||
|
||||
func _pressed():
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
get_tree().quit(0)
|
||||
"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tcusk"]
|
||||
atlas = ExtResource("3_xgjk6")
|
||||
region = Rect2(1320, 746, 25, 22)
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_8ln24"]
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8egab"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(0, 0, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gw5y6"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(140, 0, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_svtp6"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(280, 0, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1dfpl"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(420, 0, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qywvv"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(0, 140, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3wgol"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(140, 140, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1acrt"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(280, 140, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vr8o3"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(420, 140, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1a85y"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(0, 280, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hl5e0"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(140, 280, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_engjn"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(280, 280, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6h3lr"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(420, 280, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dj67d"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(0, 420, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6vcge"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(140, 420, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ip0br"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(280, 420, 140, 140)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xyero"]
|
||||
atlas = ExtResource("6_5jfhr")
|
||||
region = Rect2(420, 420, 140, 140)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_tcusk"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8egab")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gw5y6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_svtp6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1dfpl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qywvv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3wgol")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1acrt")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vr8o3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1a85y")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hl5e0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_engjn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6h3lr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dj67d")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6vcge")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ip0br")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xyero")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 10.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_rtw2f"]
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hstxw"]
|
||||
|
||||
[node name="MainMenu" type="Control" unique_id=528000941]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme = ExtResource("1_wmt4g")
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1976575731]
|
||||
stream = ExtResource("2_0dhhe")
|
||||
autoplay = true
|
||||
parameters/looping = true
|
||||
|
||||
[node name="Background" type="Control" parent="." unique_id=801579001]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Top" type="TextureRect" parent="Background" unique_id=2030397311]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 400.0
|
||||
grow_horizontal = 2
|
||||
texture = SubResource("AtlasTexture_wu84c")
|
||||
|
||||
[node name="Bottom" type="TextureRect" parent="Background" unique_id=736979824]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -348.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
texture = SubResource("AtlasTexture_8ln24")
|
||||
|
||||
[node name="MagicCircle" type="TextureRect" parent="Background" unique_id=1610277203]
|
||||
self_modulate = Color(1, 1, 1, 0.6156863)
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -72.5
|
||||
offset_bottom = 72.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource("AtlasTexture_a8gd2")
|
||||
|
||||
[node name="BottomBorder" type="TextureRect" parent="Background" unique_id=2048064934]
|
||||
layout_mode = 1
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -45.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
texture = SubResource("AtlasTexture_bqqt6")
|
||||
|
||||
[node name="TopBorder" type="TextureRect" parent="Background" unique_id=812827884]
|
||||
layout_mode = 0
|
||||
offset_right = 800.0
|
||||
offset_bottom = 45.0
|
||||
texture = SubResource("AtlasTexture_rtw2f")
|
||||
|
||||
[node name="Logo" type="TextureRect" parent="Background" unique_id=815631332]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -257.5
|
||||
offset_top = 50.0
|
||||
offset_right = 257.5
|
||||
offset_bottom = 210.0
|
||||
grow_horizontal = 2
|
||||
texture = SubResource("AtlasTexture_oa1go")
|
||||
|
||||
[node name="Buttons" type="VBoxContainer" parent="." unique_id=1869378860]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
anchor_left = 0.29375
|
||||
anchor_top = 0.5566667
|
||||
anchor_right = 0.70625
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 1.5258789e-05
|
||||
offset_bottom = -55.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
alignment = 1
|
||||
script = SubResource("GDScript_hover")
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="HoverSFX" type="AudioStreamPlayer" parent="Buttons" unique_id=256435189]
|
||||
stream = ExtResource("4_somrw")
|
||||
|
||||
[node name="ClickSFX" type="AudioStreamPlayer" parent="Buttons" unique_id=2129807302]
|
||||
stream = ExtResource("5_ybnw1")
|
||||
|
||||
[node name="StartButton" type="TextureButton" parent="Buttons" unique_id=973041905]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_tbmy8")
|
||||
texture_hover = SubResource("AtlasTexture_jk1qb")
|
||||
script = SubResource("GDScript_bqqt6")
|
||||
|
||||
[node name="LoadButton" type="TextureButton" parent="Buttons" unique_id=2075751086]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_5dd4i")
|
||||
texture_hover = SubResource("AtlasTexture_lgwnu")
|
||||
|
||||
[node name="EushullyButton" type="TextureButton" parent="Buttons" unique_id=412756984]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_flqon")
|
||||
texture_hover = SubResource("AtlasTexture_rcqid")
|
||||
|
||||
[node name="OptionsButton" type="TextureButton" parent="Buttons" unique_id=1002907774]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_1ajci")
|
||||
texture_hover = SubResource("AtlasTexture_7b55j")
|
||||
|
||||
[node name="ExitButton" type="TextureButton" parent="Buttons" unique_id=286651369]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture_normal = SubResource("AtlasTexture_5pajh")
|
||||
texture_hover = SubResource("AtlasTexture_j7ex8")
|
||||
script = SubResource("GDScript_wu84c")
|
||||
|
||||
[node name="LeftIndicator" type="Control" parent="." unique_id=100000001]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
anchors_preset = 0
|
||||
offset_right = 50.0
|
||||
offset_bottom = 50.0
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="LeftIndicator" unique_id=1510731086]
|
||||
position = Vector2(0, 15)
|
||||
texture = SubResource("AtlasTexture_tcusk")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="LeftIndicator" unique_id=1906133697]
|
||||
material = SubResource("CanvasItemMaterial_8ln24")
|
||||
scale = Vector2(0.75, 0.75)
|
||||
sprite_frames = SubResource("SpriteFrames_tcusk")
|
||||
autoplay = "default"
|
||||
frame = 12
|
||||
frame_progress = 0.23836201
|
||||
|
||||
[node name="RightIndicator" type="Control" parent="." unique_id=100000002]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
anchors_preset = 0
|
||||
offset_right = 50.0
|
||||
offset_bottom = 50.0
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="RightIndicator" unique_id=979863490]
|
||||
position = Vector2(0, 15)
|
||||
texture = SubResource("AtlasTexture_tcusk")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="RightIndicator" unique_id=1047794140]
|
||||
material = SubResource("CanvasItemMaterial_rtw2f")
|
||||
scale = Vector2(0.75, 0.75)
|
||||
sprite_frames = SubResource("SpriteFrames_tcusk")
|
||||
autoplay = "default"
|
||||
frame = 12
|
||||
frame_progress = 0.23836201
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="." unique_id=968381019]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
texture = SubResource("AtlasTexture_hstxw")
|
||||
@@ -3,7 +3,7 @@ class_name CombatTactic extends Resource
|
||||
@export var tactic_name: String = ""
|
||||
@export var tactic_range: CombatTacticRange
|
||||
|
||||
func get_offensive_stats(unit: Unit) -> Variant:
|
||||
func get_offensive_stats(_unit: Unit) -> Variant:
|
||||
return null
|
||||
|
||||
func get_relevant_defense(unit: Unit) -> int:
|
||||
@@ -1,5 +1,5 @@
|
||||
# resources/resource_definitions/any_combat_tactic_range.gd
|
||||
class_name AnyCombatTacticRange extends CombatTacticRange
|
||||
|
||||
func is_valid_range(distance: int, unit: Unit) -> bool:
|
||||
func is_valid_range(_distance: int, _unit: Unit) -> bool:
|
||||
return true
|
||||
@@ -1,5 +1,5 @@
|
||||
# resources/resource_definitions/combat_tactic_range.gd
|
||||
class_name CombatTacticRange extends Resource
|
||||
|
||||
func is_valid_range(distance: int, unit: Unit) -> bool:
|
||||
func is_valid_range(_distance: int, _unit: Unit) -> bool:
|
||||
return false
|
||||
@@ -1,6 +1,6 @@
|
||||
class_name DefendCombatTactic extends CombatTactic
|
||||
|
||||
func get_offensive_stats(unit: Unit) -> Variant:
|
||||
func get_offensive_stats(_unit: Unit) -> Variant:
|
||||
return null
|
||||
|
||||
func get_relevant_defense(unit: Unit) -> int:
|
||||
4
scripts/battle/deployed_units/deployed_unit.gd
Normal file
4
scripts/battle/deployed_units/deployed_unit.gd
Normal file
@@ -0,0 +1,4 @@
|
||||
class_name DeployedUnit extends Node2D
|
||||
|
||||
# The unit represented by this deployment
|
||||
@export var unit: Unit
|
||||
1
scripts/battle/deployed_units/deployed_unit.gd.uid
Normal file
1
scripts/battle/deployed_units/deployed_unit.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://cmh4lphvboggy
|
||||
14
scripts/battle/deployed_units/deployed_unit_stats.gd
Normal file
14
scripts/battle/deployed_units/deployed_unit_stats.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
class_name DeployedUnitStats extends Resource
|
||||
|
||||
@export var unit_stats: UnitStats
|
||||
@export var current_hp: int
|
||||
@export var current_sp: int
|
||||
@export var current_fs: int
|
||||
|
||||
func _init() -> void:
|
||||
_init_stats.call_deferred()
|
||||
|
||||
func _init_stats() -> void:
|
||||
current_hp = unit_stats.max_hp
|
||||
current_sp = unit_stats.max_sp
|
||||
current_fs = unit_stats.max_fs
|
||||
1
scripts/battle/deployed_units/deployed_unit_stats.gd.uid
Normal file
1
scripts/battle/deployed_units/deployed_unit_stats.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b3jekvxwi8sxi
|
||||
@@ -157,11 +157,11 @@ func _select_unit(unit: Unit) -> void:
|
||||
|
||||
|
||||
func _get_unit_at(world_pos: Vector2) -> Unit:
|
||||
var snapped := dl_map.snap_to_grid(world_pos)
|
||||
var snapped_coords := dl_map.snap_to_grid(world_pos)
|
||||
for unit: Unit in get_tree().get_nodes_in_group("units"):
|
||||
if not unit.is_alive():
|
||||
continue
|
||||
var unit_snapped := dl_map.snap_to_grid(unit.global_position)
|
||||
if unit_snapped == snapped:
|
||||
if unit_snapped == snapped_coords:
|
||||
return unit
|
||||
return null
|
||||
7
scripts/debug/console_command.gd
Normal file
7
scripts/debug/console_command.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
@abstract class_name ConsoleCommand extends RefCounted
|
||||
|
||||
@abstract func get_command_name() -> String
|
||||
|
||||
@abstract func get_help_text() -> String
|
||||
|
||||
@abstract func run(args: Array, context: Dictionary) -> String
|
||||
@@ -6,7 +6,7 @@ func get_command_name() -> String:
|
||||
func get_help_text() -> String:
|
||||
return "Lists all available commands"
|
||||
|
||||
func run(args: Array, context: Dictionary) -> String:
|
||||
func run(_args: Array, context: Dictionary) -> String:
|
||||
var commands: Array = context["commands"]
|
||||
var lines: PackedStringArray = []
|
||||
for command: ConsoleCommand in commands:
|
||||
@@ -6,7 +6,7 @@ func get_command_name() -> String:
|
||||
func get_help_text() -> String:
|
||||
return "Lists available scenes for swapping"
|
||||
|
||||
func run(args: Array, context: Dictionary) -> String:
|
||||
func run(_args: Array, context: Dictionary) -> String:
|
||||
var registry: Array = context["scene_registry"]
|
||||
var lines: PackedStringArray = []
|
||||
for entry: Dictionary in registry:
|
||||
@@ -11,7 +11,6 @@ var scene_registry: Array = [
|
||||
]
|
||||
|
||||
var commands: Array[ConsoleCommand] = []
|
||||
var _result_tween: Tween
|
||||
|
||||
@onready var panel: PanelContainer = %Panel
|
||||
@onready var scene_list: VBoxContainer = %SceneList
|
||||
@@ -48,7 +47,7 @@ func swap_scene(entry: Dictionary) -> void:
|
||||
_apply_setup(entry["setup"], instance)
|
||||
close_requested.emit()
|
||||
|
||||
func _apply_setup(setup_key: String, scene_instance: Node) -> void:
|
||||
func _apply_setup(setup_key: String, _scene_instance: Node) -> void:
|
||||
match setup_key:
|
||||
_:
|
||||
push_warning("Unknown setup key: %s" % setup_key)
|
||||
@@ -1,9 +1,8 @@
|
||||
class_name UnitStats extends Resource
|
||||
|
||||
@export var max_hp: int = 10
|
||||
@export var current_hp: int
|
||||
@export var max_sp: int = 10
|
||||
@export var current_sp: int = 10
|
||||
@export var max_fs: int = 10
|
||||
@export var phys_atk: int = 10
|
||||
@export var phys_def: int = 5
|
||||
@export var magic_atk: int = 0
|
||||
@@ -13,7 +12,4 @@ class_name UnitStats extends Resource
|
||||
@export var spd: int = 1
|
||||
@export var eva: int = 1
|
||||
@export var lck: int = 1
|
||||
|
||||
func _init(max_hp: int = 10) -> void:
|
||||
self.max_hp = max_hp
|
||||
current_hp = max_hp
|
||||
@export var mov: int = 3
|
||||
Reference in New Issue
Block a user