From 3cf39c7135041fc136f0a3a2e5acadb3854d3e61 Mon Sep 17 00:00:00 2001 From: Joey Pollack Date: Sun, 23 Jun 2024 19:56:52 -0400 Subject: [PATCH] Combat sys refactor started, PlayerCharacter sys started --- .gitignore | 4 + Systems/Combat/Actions/Scripts/attack.gd | 21 -- .../Combat/Actions/Scripts/combat_action.gd | 18 -- .../Actions/Standard Actions/attack.tscn | 6 - Systems/Combat/Actions/action.tscn | 6 - Systems/Combat/Combatant.tscn | 6 - Systems/Combat/Scripts/Combatant.gd | 47 ---- .../Scripts/PlayerCombatantController.gd | 51 ---- Systems/Combat/Scripts/combat_stats.gd | 38 --- .../Combat/Scripts/combatant_controller.gd | 6 - Systems/Combat/combatant_controller.tscn | 6 - .../Combat/player_combatant_controller.tscn | 12 - Systems/UI/Menu System/Scripts/battle_menu.gd | 43 ---- Systems/UI/Menu System/Scripts/menu_item.gd | 17 -- Systems/UI/Menu System/battle_menu.tscn | 217 ------------------ Systems/UI/Menu System/menu_item.tscn | 25 -- Test Scenes/Player.gd | 7 - .../Scripts/spin_attack.gd | 14 -- .../Test Player Actions/spin_attack.tscn | 6 - Test Scenes/player.tscn | 42 ---- actors/player chars/alex/alex.gd | 4 + actors/player chars/alex/alex.tscn | 138 +++++++++++ actors/player chars/player_character.gd | 98 ++++++++ assets/art/character sprites/alex.png | 3 + assets/art/character sprites/alex.png.import | 34 +++ assets/binary files/.gdignore | 1 + assets/misc/script_template.gd | 23 ++ project.godot | 30 ++- systems/combat/combat_state.gd | 20 ++ systems/combat/combat_stats.gd | 40 ++++ systems/combat/combat_team.gd | 23 ++ systems/combat/combatant.gd | 31 +++ systems/combat/damage_source.gd | 27 +++ systems/game_state/game_state.gd | 30 +++ .../test_player.gd => testing/sandbox.gd | 13 +- {Test Scenes => testing}/sandbox.tscn | 31 ++- 36 files changed, 530 insertions(+), 608 deletions(-) delete mode 100644 Systems/Combat/Actions/Scripts/attack.gd delete mode 100644 Systems/Combat/Actions/Scripts/combat_action.gd delete mode 100644 Systems/Combat/Actions/Standard Actions/attack.tscn delete mode 100644 Systems/Combat/Actions/action.tscn delete mode 100644 Systems/Combat/Combatant.tscn delete mode 100644 Systems/Combat/Scripts/Combatant.gd delete mode 100644 Systems/Combat/Scripts/PlayerCombatantController.gd delete mode 100644 Systems/Combat/Scripts/combat_stats.gd delete mode 100644 Systems/Combat/Scripts/combatant_controller.gd delete mode 100644 Systems/Combat/combatant_controller.tscn delete mode 100644 Systems/Combat/player_combatant_controller.tscn delete mode 100644 Systems/UI/Menu System/Scripts/battle_menu.gd delete mode 100644 Systems/UI/Menu System/Scripts/menu_item.gd delete mode 100644 Systems/UI/Menu System/battle_menu.tscn delete mode 100644 Systems/UI/Menu System/menu_item.tscn delete mode 100644 Test Scenes/Player.gd delete mode 100644 Test Scenes/Test Player Actions/Scripts/spin_attack.gd delete mode 100644 Test Scenes/Test Player Actions/spin_attack.tscn delete mode 100644 Test Scenes/player.tscn create mode 100644 actors/player chars/alex/alex.gd create mode 100644 actors/player chars/alex/alex.tscn create mode 100644 actors/player chars/player_character.gd create mode 100644 assets/art/character sprites/alex.png create mode 100644 assets/art/character sprites/alex.png.import create mode 100644 assets/binary files/.gdignore create mode 100644 assets/misc/script_template.gd create mode 100644 systems/combat/combat_state.gd create mode 100644 systems/combat/combat_stats.gd create mode 100644 systems/combat/combat_team.gd create mode 100644 systems/combat/combatant.gd create mode 100644 systems/combat/damage_source.gd create mode 100644 systems/game_state/game_state.gd rename Test Scenes/test_player.gd => testing/sandbox.gd (54%) rename {Test Scenes => testing}/sandbox.tscn (99%) diff --git a/.gitignore b/.gitignore index 4709183..ca7d037 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ # Godot 4+ specific ignores .godot/ + +assets/binary files/elements_core_pack_2.14.24/ + +*.zip \ No newline at end of file diff --git a/Systems/Combat/Actions/Scripts/attack.gd b/Systems/Combat/Actions/Scripts/attack.gd deleted file mode 100644 index 20ab994..0000000 --- a/Systems/Combat/Actions/Scripts/attack.gd +++ /dev/null @@ -1,21 +0,0 @@ - -class_name Attack -extends CombatAction - - -func _ready(): - ActionName = "Attack" - -var timer -func execute(): - timer = Timer.new() - timer.timeout.connect(done) - timer.wait_time = 1 - add_child(timer) - timer.start() - print("Executing Attack!") - -func done(): - timer.queue_free() - action_finished.emit() - diff --git a/Systems/Combat/Actions/Scripts/combat_action.gd b/Systems/Combat/Actions/Scripts/combat_action.gd deleted file mode 100644 index 1336afb..0000000 --- a/Systems/Combat/Actions/Scripts/combat_action.gd +++ /dev/null @@ -1,18 +0,0 @@ - -class_name CombatAction -extends Node - - -@export var ActionName = "NONE" -@export var ActionText = "" - -var ActionIndex = 0 - -signal action_finished - -func _ready(): - if ActionName == "NONE": - push_warning("Actions has NONE name") - -func execute(): - push_warning("Base Action execute method called") diff --git a/Systems/Combat/Actions/Standard Actions/attack.tscn b/Systems/Combat/Actions/Standard Actions/attack.tscn deleted file mode 100644 index 7c72be1..0000000 --- a/Systems/Combat/Actions/Standard Actions/attack.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://bbbyup8pp6uam"] - -[ext_resource type="Script" path="res://Systems/Combat/Actions/Scripts/attack.gd" id="1_nmi0m"] - -[node name="attack" type="Node"] -script = ExtResource("1_nmi0m") diff --git a/Systems/Combat/Actions/action.tscn b/Systems/Combat/Actions/action.tscn deleted file mode 100644 index 2edf4d6..0000000 --- a/Systems/Combat/Actions/action.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://djn8b685adlak"] - -[ext_resource type="Script" path="res://Systems/Combat/Actions/Scripts/combat_action.gd" id="1_sqc33"] - -[node name="action" type="Node"] -script = ExtResource("1_sqc33") diff --git a/Systems/Combat/Combatant.tscn b/Systems/Combat/Combatant.tscn deleted file mode 100644 index 6ec041b..0000000 --- a/Systems/Combat/Combatant.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://ch1sc85jxy1r7"] - -[ext_resource type="Script" path="res://Systems/Combat/Scripts/Combatant.gd" id="1_4hh5d"] - -[node name="Combatant" type="Node"] -script = ExtResource("1_4hh5d") diff --git a/Systems/Combat/Scripts/Combatant.gd b/Systems/Combat/Scripts/Combatant.gd deleted file mode 100644 index 013fd36..0000000 --- a/Systems/Combat/Scripts/Combatant.gd +++ /dev/null @@ -1,47 +0,0 @@ -extends Node -class_name Combatant - -# @export var Behavior: - -@export var Controller: CombatantController -@export var Stats: CombatStats -@export var ATBSpeedCoeffecient = 25 - -#@onready var ATB = $battle_menu/ATB - -var is_init = false -var ATBCurrent = 0 - -signal atb_update(atb_current) - -func _ready(): - Controller.init_combat(Stats) - - -func next_turn(): - ATBCurrent = 0 - - # TODO: Tick status effects - -func tick_atb(delta): - - if ATBCurrent >= 100: - ATBCurrent = 100 - return - - ATBCurrent += Stats.Speed * delta * ATBSpeedCoeffecient - atb_update.emit(ATBCurrent) - - #ATB.value = ATBCurrent - - -func _process(delta): - - tick_atb(delta) -# -#func init(): -# for action in Actions: -# print("Action: %s" % action.ActionName) -# Menu.add_action(action) -# -# is_init = true diff --git a/Systems/Combat/Scripts/PlayerCombatantController.gd b/Systems/Combat/Scripts/PlayerCombatantController.gd deleted file mode 100644 index acb688c..0000000 --- a/Systems/Combat/Scripts/PlayerCombatantController.gd +++ /dev/null @@ -1,51 +0,0 @@ -extends CombatantController - -@export var Name = "NONE" -@export var TeamPosition = 0 - -@onready var Menu = $battle_menu - -func init_combat(stats): - Menu.init_state(Name, stats, TeamPosition) - -func on_atb_update(new): - Menu.ATB.value = new - - -#@export var SpecialActions: Array[Action] = [] -# -#@onready var ATB = $battle_menu/ATB -#@onready var ActionState = $battle_menu/ActionPanel/ActionState -#@onready var Actions = $Combatant/Actions -#var NextAction -#var ActionReady = false -# -# -#func _process(delta): -# -# var combatant = $Combatant -# if ActionReady and ATB.value == 100: -# NextAction.execute() -# ActionState.text = "Action Executing: %s" % NextAction.ActionName -# combatant.ATBCurrent = 0 -# ATB.value = 0 -# ActionReady = false -# return -# -# -# combatant.tick_atb(delta) -# -# -#func do_action(a): -# -# var action = Actions.get_node(a) -# if !action: -# push_error("Unknown battle action: %s" % a) -# return -# -# ActionState.text = "Action Queued: %s" % action.ActionName -# NextAction = action -# ActionReady = true -# -#func action_done(): -# ActionState.text = "" diff --git a/Systems/Combat/Scripts/combat_stats.gd b/Systems/Combat/Scripts/combat_stats.gd deleted file mode 100644 index 68d09c3..0000000 --- a/Systems/Combat/Scripts/combat_stats.gd +++ /dev/null @@ -1,38 +0,0 @@ -extends Resource -class_name CombatStats - -# Health -@export var MaxHP = 10 -var HP = MaxHP - -# Needed to use physical techniques -@export var MaxPhysicalStamina = 10 -var PhysicalStamina = MaxPhysicalStamina - -# Needed to use magic -@export var MaxMentalStamina = 10 -var MentalStamina = MaxMentalStamina - -# Physical Attack Power -@export var Strength = 1 - -# Magic Offense -@export var Wisdom = 1 - -# Physical Defense -@export var Constitution = 1 - -# Magic Defense -@export var Willpower = 1 - -# Battle turn order or ATB time -@export var Speed = 1 - -# Critical hit chance -@export var Focus = 1 - -# Chance to hit -@export var Accuracy = 1 - -# Chance to dodge -@export var Agility = 1 diff --git a/Systems/Combat/Scripts/combatant_controller.gd b/Systems/Combat/Scripts/combatant_controller.gd deleted file mode 100644 index b92c58b..0000000 --- a/Systems/Combat/Scripts/combatant_controller.gd +++ /dev/null @@ -1,6 +0,0 @@ -extends Node -class_name CombatantController - - -func init_combat(stats): - push_warning("Base init_combat method called") diff --git a/Systems/Combat/combatant_controller.tscn b/Systems/Combat/combatant_controller.tscn deleted file mode 100644 index a69872c..0000000 --- a/Systems/Combat/combatant_controller.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://dokn6d31y1bxv"] - -[ext_resource type="Script" path="res://Systems/Combat/Scripts/combatant_controller.gd" id="1_kxwx8"] - -[node name="CombatantController" type="Node"] -script = ExtResource("1_kxwx8") diff --git a/Systems/Combat/player_combatant_controller.tscn b/Systems/Combat/player_combatant_controller.tscn deleted file mode 100644 index 7b1bc77..0000000 --- a/Systems/Combat/player_combatant_controller.tscn +++ /dev/null @@ -1,12 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://b0swegor2jejg"] - -[ext_resource type="PackedScene" uid="uid://dokn6d31y1bxv" path="res://Systems/Combat/combatant_controller.tscn" id="1_f3a3l"] -[ext_resource type="Script" path="res://Systems/Combat/Scripts/PlayerCombatantController.gd" id="2_rhclm"] -[ext_resource type="PackedScene" uid="uid://cl5d768roh8ir" path="res://Systems/UI/Menu System/battle_menu.tscn" id="3_7ys45"] - -[node name="PlayerCombatantController" instance=ExtResource("1_f3a3l")] -script = ExtResource("2_rhclm") -Name = "NONE" -TeamPosition = 0 - -[node name="battle_menu" parent="." index="0" instance=ExtResource("3_7ys45")] diff --git a/Systems/UI/Menu System/Scripts/battle_menu.gd b/Systems/UI/Menu System/Scripts/battle_menu.gd deleted file mode 100644 index f36659c..0000000 --- a/Systems/UI/Menu System/Scripts/battle_menu.gd +++ /dev/null @@ -1,43 +0,0 @@ -extends Control -class_name BattleMenu - -@onready var BasePanel = $Panel -@onready var Name = $Panel/InfoPanel/Name -@onready var HP = $Panel/InfoPanel/HP -@onready var MStam = $Panel/InfoPanel/MentalStamina -@onready var PStam = $Panel/InfoPanel/PhysicalStamina - -@onready var ATB = $Panel/InfoPanel/ATB - -var top_margin = 100 -var item_padding = 10 - -enum ACTION { ATTACK, DEFEND, ITEM } - -signal action_selected(action) - -func init_state(name, stats, team_position): - offset_top = 300 - offset_left = BasePanel.size.x * team_position - Name.text = name - HP.text = "HP: %s/%s" % [stats.HP, stats.MaxHP] - MStam.text = "M Stam: %s/%s" % [stats.MentalStamina, stats.MaxMentalStamina] - PStam.text = "P Stam: %s/%s" % [stats.PhysicalStamina, stats.MaxPhysicalStamina] - - # TODO Set the rest of the stats - - -func _on_attack_pressed(): - action_selected.emit("attack") - - -func _on_defend_pressed(): - action_selected.emit("defend") - - -func _on_item_pressed(): - pass # GO TO SUBMENU HERE - - -func _on_tech_pressed(): - pass # GO TO SUBMENU HERE diff --git a/Systems/UI/Menu System/Scripts/menu_item.gd b/Systems/UI/Menu System/Scripts/menu_item.gd deleted file mode 100644 index 4c13fbf..0000000 --- a/Systems/UI/Menu System/Scripts/menu_item.gd +++ /dev/null @@ -1,17 +0,0 @@ -extends Control -class_name MenuItem - -@export var label = "" -@export var action: CombatAction - -@onready var button = $Button - -signal action_selected(action: CombatAction) - -# Called when the node enters the scene tree for the first time. -func _ready(): - button.text = label - - -func _on_button_pressed(): - emit_signal("action_selected", action) diff --git a/Systems/UI/Menu System/battle_menu.tscn b/Systems/UI/Menu System/battle_menu.tscn deleted file mode 100644 index b0d4880..0000000 --- a/Systems/UI/Menu System/battle_menu.tscn +++ /dev/null @@ -1,217 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://cl5d768roh8ir"] - -[ext_resource type="Script" path="res://Systems/UI/Menu System/Scripts/battle_menu.gd" id="1_fije1"] -[ext_resource type="Texture2D" uid="uid://dqf1p1mfki3vc" path="res://assets/art/ui/bar_under.png" id="2_ayq4q"] -[ext_resource type="Texture2D" uid="uid://bnp5t7o26kb0c" path="res://assets/art/ui/bar_over.png" id="3_s7h0n"] - -[node name="battle_menu" type="Control"] -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -script = ExtResource("1_fije1") - -[node name="Panel" type="Panel" parent="."] -layout_mode = 1 -offset_right = 190.0 -offset_bottom = 408.0 - -[node name="InfoPanel" type="Panel" parent="Panel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -85.0 -offset_right = 85.0 -offset_bottom = 148.0 -grow_horizontal = 2 - -[node name="ATB" type="TextureProgressBar" parent="Panel/InfoPanel"] -layout_mode = 1 -anchors_preset = 7 -anchor_left = 0.5 -anchor_top = 1.0 -anchor_right = 0.5 -anchor_bottom = 1.0 -offset_left = -85.0 -offset_top = -29.0 -offset_right = 185.0 -offset_bottom = 21.0 -grow_horizontal = 2 -grow_vertical = 0 -scale = Vector2(0.63, 0.403) -value = 50.0 -texture_under = ExtResource("2_ayq4q") -texture_progress = ExtResource("3_s7h0n") -texture_progress_offset = Vector2(16, 8) - -[node name="Name" type="Label" parent="Panel/InfoPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -52.5 -offset_right = 52.5 -offset_bottom = 26.0 -grow_horizontal = 2 -text = "Fighter Name -" - -[node name="HP" type="Label" parent="Panel/InfoPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -71.5 -offset_top = 26.0 -offset_right = 71.5 -offset_bottom = 52.0 -grow_horizontal = 2 -text = "CurrentHP/MaxHP -" - -[node name="MentalStamina" type="Label" parent="Panel/InfoPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -71.5 -offset_top = 52.0 -offset_right = 71.5 -offset_bottom = 78.0 -grow_horizontal = 2 -text = "Current/Max -" - -[node name="PhysicalStamina" type="Label" parent="Panel/InfoPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -71.5 -offset_top = 78.0 -offset_right = 71.5 -offset_bottom = 104.0 -grow_horizontal = 2 -text = "Current/Max -" - -[node name="Label" type="Label" parent="Panel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -56.0 -offset_top = 159.0 -offset_right = 57.0 -offset_bottom = 188.0 -grow_horizontal = 2 -text = "Battle Menu" -horizontal_alignment = 1 - -[node name="MenuPanel" type="Panel" parent="Panel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -72.0 -offset_top = 190.0 -offset_right = 75.0 -offset_bottom = 373.0 -grow_horizontal = 2 - -[node name="Attack" type="Button" parent="Panel/MenuPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -35.0 -offset_top = 6.0 -offset_right = 35.0 -offset_bottom = 37.0 -grow_horizontal = 2 -text = "Attack -" - -[node name="Tech" type="Button" parent="Panel/MenuPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -35.0 -offset_top = 41.0 -offset_right = 35.0 -offset_bottom = 72.0 -grow_horizontal = 2 -text = "Tech" - -[node name="Defend" type="Button" parent="Panel/MenuPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -35.0 -offset_top = 76.0 -offset_right = 35.0 -offset_bottom = 107.0 -grow_horizontal = 2 -text = "Defend" - -[node name="Item" type="Button" parent="Panel/MenuPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -35.5 -offset_top = 111.0 -offset_right = 34.5 -offset_bottom = 142.0 -grow_horizontal = 2 -text = "Item" - -[node name="Rest" type="Button" parent="Panel/MenuPanel"] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -35.5 -offset_top = 146.0 -offset_right = 34.5 -offset_bottom = 177.0 -grow_horizontal = 2 -text = "Rest" - -[node name="ActionPanel" type="Panel" parent="Panel"] -layout_mode = 1 -anchors_preset = 12 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = -33.0 -grow_horizontal = 2 -grow_vertical = 0 - -[node name="ActionState" type="Label" parent="Panel/ActionPanel"] -layout_mode = 1 -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -85.0 -offset_top = -13.0 -offset_right = 85.0 -offset_bottom = 13.0 -grow_horizontal = 2 -grow_vertical = 2 -theme_override_font_sizes/font_size = 10 -horizontal_alignment = 1 -vertical_alignment = 1 - -[connection signal="pressed" from="Panel/MenuPanel/Attack" to="." method="_on_attack_pressed"] -[connection signal="pressed" from="Panel/MenuPanel/Tech" to="." method="_on_tech_pressed"] -[connection signal="pressed" from="Panel/MenuPanel/Defend" to="." method="_on_defend_pressed"] -[connection signal="pressed" from="Panel/MenuPanel/Item" to="." method="_on_item_pressed"] -[connection signal="pressed" from="Panel/MenuPanel/Rest" to="." method="_on_item_pressed"] diff --git a/Systems/UI/Menu System/menu_item.tscn b/Systems/UI/Menu System/menu_item.tscn deleted file mode 100644 index e929919..0000000 --- a/Systems/UI/Menu System/menu_item.tscn +++ /dev/null @@ -1,25 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://l1bdgx07seai"] - -[ext_resource type="Script" path="res://Systems/UI/Menu System/Scripts/menu_item.gd" id="1_paamu"] - -[node name="MenuItem" type="Control"] -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -script = ExtResource("1_paamu") - -[node name="Button" type="Button" parent="."] -layout_mode = 1 -anchors_preset = 5 -anchor_left = 0.5 -anchor_right = 0.5 -offset_left = -36.0 -offset_right = 36.0 -offset_bottom = 34.0 -grow_horizontal = 2 -text = "TEST" - -[connection signal="pressed" from="Button" to="." method="_on_button_pressed"] diff --git a/Test Scenes/Player.gd b/Test Scenes/Player.gd deleted file mode 100644 index 0b603a9..0000000 --- a/Test Scenes/Player.gd +++ /dev/null @@ -1,7 +0,0 @@ -extends Sprite2D - -@onready var Combantant = $Combatant -@onready var Controller = $Combatant/PlayerCombatantController - -func _ready(): - pass diff --git a/Test Scenes/Test Player Actions/Scripts/spin_attack.gd b/Test Scenes/Test Player Actions/Scripts/spin_attack.gd deleted file mode 100644 index 64b6fd2..0000000 --- a/Test Scenes/Test Player Actions/Scripts/spin_attack.gd +++ /dev/null @@ -1,14 +0,0 @@ -extends Action - -var timer -func execute(): - timer = Timer.new() - timer.timeout.connect(done) - timer.wait_time = 1 - add_child(timer) - timer.start() - print("Executing Spin Attack!") - -func done(): - timer.queue_free() - action_finished.emit() diff --git a/Test Scenes/Test Player Actions/spin_attack.tscn b/Test Scenes/Test Player Actions/spin_attack.tscn deleted file mode 100644 index ee1a7de..0000000 --- a/Test Scenes/Test Player Actions/spin_attack.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://bmot4y61f1r8f"] - -[ext_resource type="Script" path="res://Test Scenes/Test Player Actions/Scripts/spin_attack.gd" id="1_ywj48"] - -[node name="spin_attack" type="Node"] -script = ExtResource("1_ywj48") diff --git a/Test Scenes/player.tscn b/Test Scenes/player.tscn deleted file mode 100644 index eb09cee..0000000 --- a/Test Scenes/player.tscn +++ /dev/null @@ -1,42 +0,0 @@ -[gd_scene load_steps=8 format=3 uid="uid://b2iq5inxeoe82"] - -[ext_resource type="Texture2D" uid="uid://dedauf4ntkthu" path="res://icon.svg" id="1_d15px"] -[ext_resource type="Script" path="res://Test Scenes/Player.gd" id="2_8b3bs"] -[ext_resource type="PackedScene" uid="uid://ch1sc85jxy1r7" path="res://Systems/Combat/Combatant.tscn" id="4_w3vb5"] -[ext_resource type="PackedScene" uid="uid://bbbyup8pp6uam" path="res://Systems/Combat/Actions/Standard Actions/attack.tscn" id="5_17k7n"] -[ext_resource type="PackedScene" uid="uid://b0swegor2jejg" path="res://Systems/Combat/player_combatant_controller.tscn" id="6_fabcu"] -[ext_resource type="Script" path="res://Systems/Combat/Scripts/combat_stats.gd" id="7_ynhjd"] - -[sub_resource type="Resource" id="Resource_28c5l"] -script = ExtResource("7_ynhjd") -MaxHP = 10 -MaxPhysicalStamina = 10 -MaxMentalStamina = 10 -Strength = 1 -Wisdom = 1 -Constitution = 1 -Willpower = 1 -Speed = 1 -Focus = 1 -Accuracy = 1 -Agility = 1 - -[node name="Player" type="Sprite2D"] -position = Vector2(553, 219) -texture = ExtResource("1_d15px") -script = ExtResource("2_8b3bs") - -[node name="Combatant" parent="." node_paths=PackedStringArray("Controller") instance=ExtResource("4_w3vb5")] -Controller = NodePath("PlayerCombatantController") -Stats = SubResource("Resource_28c5l") - -[node name="Actions" type="Node" parent="Combatant"] - -[node name="attack" parent="Combatant/Actions" instance=ExtResource("5_17k7n")] - -[node name="PlayerCombatantController" parent="Combatant" instance=ExtResource("6_fabcu")] -Name = "TEST_DUDE" -TeamPosition = 1 - -[connection signal="atb_update" from="Combatant" to="Combatant/PlayerCombatantController" method="on_atb_update"] -[connection signal="action_finished" from="Combatant/Actions/attack" to="." method="action_done"] diff --git a/actors/player chars/alex/alex.gd b/actors/player chars/alex/alex.gd new file mode 100644 index 0000000..afdde77 --- /dev/null +++ b/actors/player chars/alex/alex.gd @@ -0,0 +1,4 @@ + +class_name Alex +extends PlayerCharacter + diff --git a/actors/player chars/alex/alex.tscn b/actors/player chars/alex/alex.tscn new file mode 100644 index 0000000..dd159cb --- /dev/null +++ b/actors/player chars/alex/alex.tscn @@ -0,0 +1,138 @@ +[gd_scene load_steps=16 format=3 uid="uid://d1nq0efa53wra"] + +[ext_resource type="Script" path="res://actors/player chars/player_character.gd" id="1_l60p5"] +[ext_resource type="Texture2D" uid="uid://cs6uqgpyvwy7r" path="res://assets/art/character sprites/alex.png" id="2_2yoh5"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_fdxoe"] +atlas = ExtResource("2_2yoh5") +region = Rect2(48, 48, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_u1hru"] +atlas = ExtResource("2_2yoh5") +region = Rect2(48, 144, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xioqy"] +atlas = ExtResource("2_2yoh5") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6y8f1"] +atlas = ExtResource("2_2yoh5") +region = Rect2(0, 48, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fkjvm"] +atlas = ExtResource("2_2yoh5") +region = Rect2(48, 48, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xbpqv"] +atlas = ExtResource("2_2yoh5") +region = Rect2(96, 48, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mya52"] +atlas = ExtResource("2_2yoh5") +region = Rect2(0, 144, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0mev0"] +atlas = ExtResource("2_2yoh5") +region = Rect2(48, 144, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_6b3k6"] +atlas = ExtResource("2_2yoh5") +region = Rect2(96, 144, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gymxu"] +atlas = ExtResource("2_2yoh5") +region = Rect2(0, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fddh6"] +atlas = ExtResource("2_2yoh5") +region = Rect2(48, 0, 48, 48) + +[sub_resource type="AtlasTexture" id="AtlasTexture_p4xmj"] +atlas = ExtResource("2_2yoh5") +region = Rect2(96, 0, 48, 48) + +[sub_resource type="SpriteFrames" id="SpriteFrames_vu5b1"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_fdxoe") +}], +"loop": true, +"name": &"Idle_East", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_u1hru") +}], +"loop": true, +"name": &"Idle_North", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_xioqy") +}], +"loop": true, +"name": &"Idle_South", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_6y8f1") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fkjvm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xbpqv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fkjvm") +}], +"loop": true, +"name": &"Walk_East", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_mya52") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0mev0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_6b3k6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0mev0") +}], +"loop": true, +"name": &"Walk_North", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_gymxu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fddh6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_p4xmj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fddh6") +}], +"loop": true, +"name": &"Walk_South", +"speed": 5.0 +}] + +[node name="Alex" type="Node2D" node_paths=PackedStringArray("sprite")] +script = ExtResource("1_l60p5") +sprite = NodePath("AnimatedSprite2D") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_vu5b1") +animation = &"Walk_East" diff --git a/actors/player chars/player_character.gd b/actors/player chars/player_character.gd new file mode 100644 index 0000000..da07a39 --- /dev/null +++ b/actors/player chars/player_character.gd @@ -0,0 +1,98 @@ + +class_name PlayerCharacter +extends Node2D + +enum FacingDirection +{ + NORTH, + SOUTH, + EAST, + WEST +} + +@export var char_name: String = "Unnamed Player Character" +@export var sprite: AnimatedSprite2D + +var facing_direction = FacingDirection.NORTH + +var _follow_target: PlayerCharacter = null +var _is_moving = false +var _was_moving = false +var warned = false + +func _ready(): + _validate_animations() + +func _process(_delta): + if _follow_target: + # TODO: Implement the player char following system + if !warned: + push_warning("%s is set to follow %s, but following is not yet implemented!" % [char_name, _follow_target.char_name]) + warned = true + else: + _process_input() + +func _validate_animations(): + var expected_animations = [ + "Idle_North", + "Idle_South", + "Idle_East", + "Walk_North", + "Walk_South", + "Walk_East", + ] + + for anim in expected_animations: + if !sprite.sprite_frames.has_animation(anim): + push_warning("Missing animation: %s, on player char: %s" %[anim, char_name]) + +func _process_input(): + if Input.is_action_just_pressed("Move_Down"): + _is_moving = true + _was_moving = true + facing_direction = FacingDirection.SOUTH + sprite.play("Walk_South") + + if Input.is_action_just_pressed("Move_Up"): + _is_moving = true + _was_moving = true + facing_direction = FacingDirection.NORTH + sprite.play("Walk_North") + + if Input.is_action_just_pressed("Move_Left"): + _is_moving = true + _was_moving = true + facing_direction = FacingDirection.EAST + sprite.play("Walk_East") + sprite.flip_h = false + + if Input.is_action_just_pressed("Move_Right"): + _is_moving = true + _was_moving = true + facing_direction = FacingDirection.WEST + sprite.play("Walk_East") + sprite.flip_h = true + + if Input.is_action_just_released("Move_Down") \ + || Input.is_action_just_released("Move_Up") \ + || Input.is_action_just_released("Move_Left") \ + || Input.is_action_just_released("Move_Right"): + _is_moving = false + + + if !_is_moving && _was_moving: + print("DIRECTION: %s" % facing_direction) + _was_moving = false + if facing_direction == FacingDirection.NORTH: + sprite.play("Idle_North") + + if facing_direction == FacingDirection.SOUTH: + sprite.play("Idle_South") + + if facing_direction == FacingDirection.EAST: + sprite.play("Idle_East") + sprite.flip_h = false + + if facing_direction == FacingDirection.WEST: + sprite.play("Idle_East") + sprite.flip_h = true diff --git a/assets/art/character sprites/alex.png b/assets/art/character sprites/alex.png new file mode 100644 index 0000000..03e3cc8 --- /dev/null +++ b/assets/art/character sprites/alex.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79a94669323881fc36b7864b01174c9ca1ba19d34733fa37aa8113a4efa08c0c +size 24208 diff --git a/assets/art/character sprites/alex.png.import b/assets/art/character sprites/alex.png.import new file mode 100644 index 0000000..207f88d --- /dev/null +++ b/assets/art/character sprites/alex.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cs6uqgpyvwy7r" +path="res://.godot/imported/alex.png-d2fbd360031d0aeabb7ca94deee40098.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/art/character sprites/alex.png" +dest_files=["res://.godot/imported/alex.png-d2fbd360031d0aeabb7ca94deee40098.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/assets/binary files/.gdignore b/assets/binary files/.gdignore new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/assets/binary files/.gdignore @@ -0,0 +1 @@ + diff --git a/assets/misc/script_template.gd b/assets/misc/script_template.gd new file mode 100644 index 0000000..266f670 --- /dev/null +++ b/assets/misc/script_template.gd @@ -0,0 +1,23 @@ +# @tool +# class_name (PascalCase) +# extends +# # docstring +# +# signals (snake_case) +# enums (PascalCase, members are CONSTANT_CASE) +# constants (CONSTANT_CASE) +# @export variables (snake_case) +# public variables (non-underscore-prefixed snake_case) +# private variables (underscore-prefixed _snake_case) +# @onready variables (snake_case) +# +# optional built-in virtual _init method +# optional built-in virtual _enter_tree() method +# built-in virtual _ready method +# remaining built-in virtual methods (underscore-prefixed _snake_case) +# public methods (non-underscore-prefixed snake_case) +# private methods (underscore-prefixed _snake_case) +# subclasses (PascalCase) + + +var stop_empty_file_warning = 0 \ No newline at end of file diff --git a/project.godot b/project.godot index 2cfd85e..3e23d36 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="RPG Prototype" -run/main_scene="res://Test Scenes/sandbox.tscn" +run/main_scene="res://testing/sandbox.tscn" config/features=PackedStringArray("4.2", "Forward Plus") config/icon="res://icon.svg" @@ -23,5 +23,31 @@ window/size/viewport_height=720 [file_customization] folder_colors={ -"res://Systems/Combat/": "teal" +"res://actors/": "blue", +"res://assets/": "orange", +"res://systems/": "teal", +"res://testing/": "gray" +} + +[input] + +Move_Left={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"echo":false,"script":null) +] +} +Move_Right={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"echo":false,"script":null) +] +} +Move_Up={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"echo":false,"script":null) +] +} +Move_Down={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"echo":false,"script":null) +] } diff --git a/systems/combat/combat_state.gd b/systems/combat/combat_state.gd new file mode 100644 index 0000000..68e86c7 --- /dev/null +++ b/systems/combat/combat_state.gd @@ -0,0 +1,20 @@ + +class_name CombatState +extends GameState + +## The combat state controls/manages combat + +var teams: Array[CombatTeam] = [] + + +func state_enter(_params: Dictionary): + pass + +func state_exit(): + pass + +func state_process(delta): + for team in teams: + team.tick_atb(delta) + team.process_ready_actions() + \ No newline at end of file diff --git a/systems/combat/combat_stats.gd b/systems/combat/combat_stats.gd new file mode 100644 index 0000000..7702ede --- /dev/null +++ b/systems/combat/combat_stats.gd @@ -0,0 +1,40 @@ + +class_name CombatStats +extends Resource +## Stats that every combatant must have +## +## These stats don't change during combat but +## status effects may override or offset them. + +# Health +@export var max_hp = 10 + +# Needed to use physical techniques +@export var max_physical_stamina = 10 + +# Needed to use magic +@export var max_mental_stamina = 10 + +# Physical Attack Power +@export var strength = 1 + +# Magic Offense +@export var wisdom = 1 + +# Physical Defense +@export var constitution = 1 + +# Magic Defense +@export var willpower = 1 + +# Battle turn order or ATB time +@export var speed = 1 + +# Critical hit chance +@export var focus = 1 + +# Chance to hit +@export var accuracy = 1 + +# Chance to dodge +@export var aabbgility = 1 diff --git a/systems/combat/combat_team.gd b/systems/combat/combat_team.gd new file mode 100644 index 0000000..3528a39 --- /dev/null +++ b/systems/combat/combat_team.gd @@ -0,0 +1,23 @@ + +class_name CombatTeam +extends Node +## Manages a team of combatants + +var team: Array[Combatant] = [] + + +func is_defeated(): + for combatant in team: + if !combatant.is_defeated(): + return false + + return true + + +func tick_atb(delta): + for combatant in team: + combatant.tick_atb(delta) + +func process_ready_actions(): + # TODO: Implement process_ready_actions() + pass diff --git a/systems/combat/combatant.gd b/systems/combat/combatant.gd new file mode 100644 index 0000000..3084443 --- /dev/null +++ b/systems/combat/combatant.gd @@ -0,0 +1,31 @@ + +class_name Combatant +extends Node + +@export var combat_stats: CombatStats + +# current state +var hp: int = 0 # Health Points +var ps: int = 0 # Physical Stamina +var ms: int = 0 # Mental Stamina +var atb: float = 0 # ATB Timer - counts down, turn is ready at 0 + +func is_defeated(): + + # TODO: add checks for status conditions + # that cause this combantant to be + # considered defeated (like stone) + return hp <= 0 + +func is_turn_ready(): + return atb <= 0 + +func tick_atb(delta): + if atb <= 0: + return + + atb -= delta + +# Override these methods in child classes +func take_damage(source: DamageSource): + hp -= source.amount \ No newline at end of file diff --git a/systems/combat/damage_source.gd b/systems/combat/damage_source.gd new file mode 100644 index 0000000..26d0338 --- /dev/null +++ b/systems/combat/damage_source.gd @@ -0,0 +1,27 @@ + +class_name DamageSource +extends Resource + + +enum Type +{ + BLUNT, + CUTTING, + PIERCING, + MAGIC, +} + +enum Element +{ + PHYSICAL, + LIGHTNING, + FIRE, + WATER, + BIO, +} + + +var attacker: Combatant = null +var amount: int = 0 +var type: Type = Type.BLUNT +var element: Element = Element.PHYSICAL \ No newline at end of file diff --git a/systems/game_state/game_state.gd b/systems/game_state/game_state.gd new file mode 100644 index 0000000..e22190e --- /dev/null +++ b/systems/game_state/game_state.gd @@ -0,0 +1,30 @@ + +class_name GameState +extends Node +### The base game state. + +# signals (snake_case) +# enums (PascalCase, members are CONSTANT_CASE) +# constants (CONSTANT_CASE) +# @export variables (snake_case) +# public variables (non-underscore-prefixed snake_case) +# private variables (underscore-prefixed _snake_case) +# @onready variables (snake_case) +# +# optional built-in virtual _init method +# optional built-in virtual _enter_tree() method +# built-in virtual _ready method +# remaining built-in virtual methods (underscore-prefixed _snake_case) +# public methods (non-underscore-prefixed snake_case) +func state_enter(_params: Dictionary): + push_warning("Base GameState state_enter method called") + +func state_exit(): + push_warning("Base GameState state_exit method called") + +func state_process(_delta): + push_warning("Base GameState state_process method called") + + +# private methods (underscore-prefixed _snake_case) +# subclasses (PascalCase) diff --git a/Test Scenes/test_player.gd b/testing/sandbox.gd similarity index 54% rename from Test Scenes/test_player.gd rename to testing/sandbox.gd index 254f707..4dac7ed 100644 --- a/Test Scenes/test_player.gd +++ b/testing/sandbox.gd @@ -1,6 +1,9 @@ + extends Node2D -@onready var Combat = $Combatant + +@onready var game_state: GameState = $CombatState + # Called when the node enters the scene tree for the first time. func _ready(): @@ -8,9 +11,5 @@ func _ready(): # Called every frame. 'delta' is the elapsed time since the previous frame. -func _process(_delta): - if Input.is_key_pressed(KEY_1): - Combat.execute_action(0) - - if Input.is_key_pressed(KEY_2): - Combat.execute_action(1) +func _process(delta): + game_state.state_process(delta) diff --git a/Test Scenes/sandbox.tscn b/testing/sandbox.tscn similarity index 99% rename from Test Scenes/sandbox.tscn rename to testing/sandbox.tscn index 881ab1b..2cd700c 100644 --- a/Test Scenes/sandbox.tscn +++ b/testing/sandbox.tscn @@ -1,13 +1,15 @@ -[gd_scene load_steps=11 format=3 uid="uid://dnmtnb7kvhmkp"] +[gd_scene load_steps=13 format=3 uid="uid://dnmtnb7kvhmkp"] -[ext_resource type="Texture2D" uid="uid://dxqymswxvgfax" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/MainLev2.0.png" id="2_mrneo"] -[ext_resource type="Texture2D" uid="uid://iuymh60ilu1r" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/decorative.png" id="3_ylcjg"] -[ext_resource type="Texture2D" uid="uid://cu7troaoq4own" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/anim/tree1B_ss.png" id="4_e2cmm"] -[ext_resource type="PackedScene" uid="uid://b2iq5inxeoe82" path="res://Test Scenes/player.tscn" id="5_cbhf3"] -[ext_resource type="Texture2D" uid="uid://qje1ncupgnd" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/anim/tree1D_ss.png" id="5_ewkk6"] +[ext_resource type="Script" path="res://testing/sandbox.gd" id="1_41e3p"] +[ext_resource type="Texture2D" uid="uid://dxqymswxvgfax" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/MainLev2.0.png" id="2_t8bqu"] +[ext_resource type="Texture2D" uid="uid://iuymh60ilu1r" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/decorative.png" id="3_udm07"] +[ext_resource type="Texture2D" uid="uid://cu7troaoq4own" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/anim/tree1B_ss.png" id="4_21w1r"] +[ext_resource type="Texture2D" uid="uid://qje1ncupgnd" path="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/anim/tree1D_ss.png" id="5_tmyhp"] +[ext_resource type="Script" path="res://systems/combat/combat_state.gd" id="6_37h1i"] +[ext_resource type="PackedScene" uid="uid://d1nq0efa53wra" path="res://actors/player chars/alex/alex.tscn" id="7_c3ubv"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_6ttut"] -texture = ExtResource("2_mrneo") +texture = ExtResource("2_t8bqu") 0:0/0 = 0 1:0/0 = 0 2:0/0 = 0 @@ -8739,7 +8741,7 @@ texture = ExtResource("2_mrneo") 99:87/0 = 0 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v0nkk"] -texture = ExtResource("3_ylcjg") +texture = ExtResource("3_udm07") 19:0/0 = 0 26:0/0 = 0 27:0/0 = 0 @@ -11191,7 +11193,7 @@ texture = ExtResource("3_ylcjg") 45:63/0 = 0 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_2wyfn"] -texture = ExtResource("4_e2cmm") +texture = ExtResource("4_21w1r") 2:0/0 = 0 3:0/0 = 0 4:0/0 = 0 @@ -11878,7 +11880,7 @@ texture = ExtResource("4_e2cmm") 47:19/0 = 0 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_mt186"] -texture = ExtResource("5_ewkk6") +texture = ExtResource("5_tmyhp") 2:0/0 = 0 3:0/0 = 0 4:0/0 = 0 @@ -12571,6 +12573,7 @@ sources/2 = SubResource("TileSetAtlasSource_2wyfn") sources/3 = SubResource("TileSetAtlasSource_mt186") [node name="Sandbox" type="Node2D"] +script = ExtResource("1_41e3p") [node name="Battle Map" type="TileMap" parent="."] y_sort_enabled = true @@ -12586,4 +12589,10 @@ layer_2/name = "Doodads 2" layer_2/y_sort_enabled = true layer_2/tile_data = PackedInt32Array(983087, 3, 2, 1048623, 3, 3, 983088, 65539, 2, 1048624, 65539, 3, 1114160, 65539, 4, 852017, 131075, 0, 917553, 131075, 1, 983089, 131075, 2, 1048625, 131075, 3, 1114161, 131075, 4, 1376305, 131075, 8, 1441841, 131075, 9, 852018, 196611, 0, 917554, 196611, 1, 983090, 196611, 2, 1048626, 196611, 3, 1114162, 196611, 4, 1179698, 196611, 5, 1245234, 196611, 6, 1310770, 196611, 7, 1376306, 196611, 8, 1441842, 196611, 9, 852019, 262147, 0, 917555, 262147, 1, 983091, 262147, 2, 1048627, 262147, 3, 1114163, 262147, 4, 1179699, 262147, 5, 1245235, 262147, 6, 1310771, 262147, 7, 1376307, 262147, 8, 1441843, 262147, 9, 852020, 327683, 0, 917556, 327683, 1, 983092, 327683, 2, 1048628, 327683, 3, 1114164, 327683, 4, 1179700, 327683, 5, 1245236, 327683, 6, 1310772, 327683, 7, 1376308, 327683, 8, 1441844, 327683, 9, 852021, 393219, 0, 917557, 393219, 1, 983093, 393219, 2, 1048629, 393219, 3, 1114165, 393219, 4, 1179701, 393219, 5, 1245237, 393219, 6, 1310773, 393219, 7, 1376309, 393219, 8, 1441845, 393219, 9, 852022, 458755, 0, 917558, 458755, 1, 983094, 458755, 2, 1048630, 458755, 3, 1114166, 458755, 4, 1179702, 458755, 5, 1245238, 458755, 6, 1310774, 458755, 7, 1376310, 458755, 8, 1441846, 458755, 9, 852023, 524291, 0, 917559, 524291, 1, 983095, 524291, 2, 1048631, 524291, 3, 1114167, 524291, 4, 524325, 3, 2, 589861, 3, 3, 524326, 65539, 2, 589862, 65539, 3, 655398, 65539, 4, 393255, 131075, 0, 458791, 131075, 1, 524327, 131075, 2, 589863, 131075, 3, 655399, 131075, 4, 917543, 131075, 8, 983079, 131075, 9, 393256, 196611, 0, 458792, 196611, 1, 524328, 196611, 2, 589864, 196611, 3, 655400, 196611, 4, 720936, 196611, 5, 786472, 196611, 6, 852008, 196611, 7, 917544, 196611, 8, 983080, 196611, 9, 393257, 262147, 0, 458793, 262147, 1, 524329, 262147, 2, 589865, 262147, 3, 655401, 262147, 4, 720937, 262147, 5, 786473, 262147, 6, 852009, 262147, 7, 917545, 262147, 8, 983081, 262147, 9, 393258, 327683, 0, 458794, 327683, 1, 524330, 327683, 2, 589866, 327683, 3, 655402, 327683, 4, 720938, 327683, 5, 786474, 327683, 6, 852010, 327683, 7, 917546, 327683, 8, 983082, 327683, 9, 393259, 393219, 0, 458795, 393219, 1, 524331, 393219, 2, 589867, 393219, 3, 655403, 393219, 4, 720939, 393219, 5, 786475, 393219, 6, 852011, 393219, 7, 917547, 393219, 8, 983083, 393219, 9, 393260, 458755, 0, 458796, 458755, 1, 524332, 458755, 2, 589868, 458755, 3, 655404, 458755, 4, 720940, 458755, 5, 786476, 458755, 6, 852012, 458755, 7, 917548, 458755, 8, 983084, 458755, 9, 393261, 524291, 0, 458797, 524291, 1, 524333, 524291, 2, 589869, 524291, 3, 655405, 524291, 4, 851974, 3, 2, 917510, 3, 3, 851975, 65539, 2, 917511, 65539, 3, 983047, 65539, 4, 720904, 131075, 0, 786440, 131075, 1, 851976, 131075, 2, 917512, 131075, 3, 983048, 131075, 4, 1245192, 131075, 8, 1310728, 131075, 9, 720905, 196611, 0, 786441, 196611, 1, 851977, 196611, 2, 917513, 196611, 3, 983049, 196611, 4, 1048585, 196611, 5, 1114121, 196611, 6, 1179657, 196611, 7, 1245193, 196611, 8, 1310729, 196611, 9, 720906, 262147, 0, 786442, 262147, 1, 851978, 262147, 2, 917514, 262147, 3, 983050, 262147, 4, 1048586, 262147, 5, 1114122, 262147, 6, 1179658, 262147, 7, 1245194, 262147, 8, 1310730, 262147, 9, 720907, 327683, 0, 786443, 327683, 1, 851979, 327683, 2, 917515, 327683, 3, 983051, 327683, 4, 1048587, 327683, 5, 1114123, 327683, 6, 1179659, 327683, 7, 1245195, 327683, 8, 1310731, 327683, 9, 720908, 393219, 0, 786444, 393219, 1, 851980, 393219, 2, 917516, 393219, 3, 983052, 393219, 4, 1048588, 393219, 5, 1114124, 393219, 6, 1179660, 393219, 7, 1245196, 393219, 8, 1310732, 393219, 9, 720909, 458755, 0, 786445, 458755, 1, 851981, 458755, 2, 917517, 458755, 3, 983053, 458755, 4, 1048589, 458755, 5, 1114125, 458755, 6, 1179661, 458755, 7, 1245197, 458755, 8, 1310733, 458755, 9, 720910, 524291, 0, 786446, 524291, 1, 851982, 524291, 2, 917518, 524291, 3, 983054, 524291, 4, 524309, 2, 2, 589845, 2, 3, 524310, 65538, 2, 589846, 65538, 3, 655382, 65538, 4, 393239, 131074, 0, 458775, 131074, 1, 524311, 131074, 2, 589847, 131074, 3, 655383, 131074, 4, 917527, 131074, 8, 983063, 131074, 9, 393240, 196610, 0, 458776, 196610, 1, 524312, 196610, 2, 589848, 196610, 3, 655384, 196610, 4, 720920, 196610, 5, 786456, 196610, 6, 851992, 196610, 7, 917528, 196610, 8, 983064, 196610, 9, 393241, 262146, 0, 458777, 262146, 1, 524313, 262146, 2, 589849, 262146, 3, 655385, 262146, 4, 720921, 262146, 5, 786457, 262146, 6, 851993, 262146, 7, 917529, 262146, 8, 983065, 262146, 9, 393242, 327682, 0, 458778, 327682, 1, 524314, 327682, 2, 589850, 327682, 3, 655386, 327682, 4, 720922, 327682, 5, 786458, 327682, 6, 851994, 327682, 7, 917530, 327682, 8, 983066, 327682, 9, 393243, 393218, 0, 458779, 393218, 1, 524315, 393218, 2, 589851, 393218, 3, 655387, 393218, 4, 720923, 393218, 5, 786459, 393218, 6, 851995, 393218, 7, 917531, 393218, 8, 983067, 393218, 9, 393244, 458754, 0, 458780, 458754, 1, 524316, 458754, 2, 589852, 458754, 3, 655388, 458754, 4, 720924, 458754, 5, 786460, 458754, 6, 851996, 458754, 7, 917532, 458754, 8, 983068, 458754, 9, 393245, 524290, 0, 458781, 524290, 1, 524317, 524290, 2, 589853, 524290, 3, 655389, 524290, 4, 524318, 589826, 2, 1507340, 2, 2, 1572876, 2, 3, 1507341, 65538, 2, 1572877, 65538, 3, 1638413, 65538, 4, 1376270, 131074, 0, 1441806, 131074, 1, 1507342, 131074, 2, 1572878, 131074, 3, 1638414, 131074, 4, 1900558, 131074, 8, 1966094, 131074, 9, 1376271, 196610, 0, 1441807, 196610, 1, 1507343, 196610, 2, 1572879, 196610, 3, 1638415, 196610, 4, 1703951, 196610, 5, 1769487, 196610, 6, 1835023, 196610, 7, 1900559, 196610, 8, 1966095, 196610, 9, 1376272, 262146, 0, 1441808, 262146, 1, 1507344, 262146, 2, 1572880, 262146, 3, 1638416, 262146, 4, 1703952, 262146, 5, 1769488, 262146, 6, 1835024, 262146, 7, 1900560, 262146, 8, 1966096, 262146, 9, 1376273, 327682, 0, 1441809, 327682, 1, 1507345, 327682, 2, 1572881, 327682, 3, 1638417, 327682, 4, 1703953, 327682, 5, 1769489, 327682, 6, 1835025, 327682, 7, 1900561, 327682, 8, 1966097, 327682, 9, 1376274, 393218, 0, 1441810, 393218, 1, 1507346, 393218, 2, 1572882, 393218, 3, 1638418, 393218, 4, 1703954, 393218, 5, 1769490, 393218, 6, 1835026, 393218, 7, 1900562, 393218, 8, 1966098, 393218, 9, 1376275, 458754, 0, 1441811, 458754, 1, 1507347, 458754, 2, 1572883, 458754, 3, 1638419, 458754, 4, 1703955, 458754, 5, 1769491, 458754, 6, 1835027, 458754, 7, 1900563, 458754, 8, 1966099, 458754, 9, 1376276, 524290, 0, 1441812, 524290, 1, 1507348, 524290, 2, 1572884, 524290, 3, 1638420, 524290, 4, 1507349, 589826, 2, 1441829, 2, 2, 1507365, 2, 3, 1441830, 65538, 2, 1507366, 65538, 3, 1572902, 65538, 4, 1310759, 131074, 0, 1376295, 131074, 1, 1441831, 131074, 2, 1507367, 131074, 3, 1572903, 131074, 4, 1835047, 131074, 8, 1900583, 131074, 9, 1310760, 196610, 0, 1376296, 196610, 1, 1441832, 196610, 2, 1507368, 196610, 3, 1572904, 196610, 4, 1638440, 196610, 5, 1703976, 196610, 6, 1769512, 196610, 7, 1835048, 196610, 8, 1900584, 196610, 9, 1310761, 262146, 0, 1376297, 262146, 1, 1441833, 262146, 2, 1507369, 262146, 3, 1572905, 262146, 4, 1638441, 262146, 5, 1703977, 262146, 6, 1769513, 262146, 7, 1835049, 262146, 8, 1900585, 262146, 9, 1310762, 327682, 0, 1376298, 327682, 1, 1441834, 327682, 2, 1507370, 327682, 3, 1572906, 327682, 4, 1638442, 327682, 5, 1703978, 327682, 6, 1769514, 327682, 7, 1835050, 327682, 8, 1900586, 327682, 9, 1310763, 393218, 0, 1376299, 393218, 1, 1441835, 393218, 2, 1507371, 393218, 3, 1572907, 393218, 4, 1638443, 393218, 5, 1703979, 393218, 6, 1769515, 393218, 7, 1835051, 393218, 8, 1900587, 393218, 9, 1310764, 458754, 0, 1376300, 458754, 1, 1441836, 458754, 2, 1507372, 458754, 3, 1572908, 458754, 4, 1638444, 458754, 5, 1703980, 458754, 6, 1769516, 458754, 7, 1835052, 458754, 8, 1900588, 458754, 9, 1310765, 524290, 0, 1376301, 524290, 1, 1441837, 524290, 2, 1507373, 524290, 3, 1572909, 524290, 4, 1441838, 589826, 2) -[node name="Player" parent="." instance=ExtResource("5_cbhf3")] +[node name="CombatState" type="Node" parent="."] +script = ExtResource("6_37h1i") + +[node name="Alex" parent="." instance=ExtResource("7_c3ubv")] +texture_filter = 1 +position = Vector2(505, 516) +scale = Vector2(2, 2)