Player and enemy on screen

combat_refactor
Joey Pollack 1 year ago
parent 6ecbd2e5a2
commit 8c835b408a

@ -1,3 +0,0 @@
{
"godotTools.editorPath.godot4": "/home/joey/Programs/Godot_v4.2.2-stable_linux.x86_64"
}

@ -0,0 +1,3 @@
class_name Actor
extends Node2D

BIN
actors/enemies/blob/art/Blob.png (Stored with Git LFS)

Binary file not shown.

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dd73lco3o6w4f"
path="res://.godot/imported/Blob.png-1c6e25fee902453014828903c414f9b3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://actors/enemies/blob/art/Blob.png"
dest_files=["res://.godot/imported/Blob.png-1c6e25fee902453014828903c414f9b3.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

@ -0,0 +1,10 @@
class_name Blob
extends EnemyCharacter
func get_combatant_component():
return $Combatant
func _ready():
$AnimatedSprite2D.play("Idle")

@ -0,0 +1,55 @@
[gd_scene load_steps=9 format=3 uid="uid://dwi00nixw6eia"]
[ext_resource type="Script" path="res://actors/enemies/blob/blob.gd" id="1_e8a40"]
[ext_resource type="Texture2D" uid="uid://dd73lco3o6w4f" path="res://actors/enemies/blob/art/Blob.png" id="2_ej213"]
[ext_resource type="Script" path="res://systems/combat/combatant.gd" id="3_mqgr1"]
[ext_resource type="Script" path="res://systems/combat/combat_stats.gd" id="4_22gbw"]
[sub_resource type="AtlasTexture" id="AtlasTexture_m73y6"]
atlas = ExtResource("2_ej213")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_1g2yn"]
atlas = ExtResource("2_ej213")
region = Rect2(32, 0, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_p36og"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_m73y6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1g2yn")
}],
"loop": true,
"name": &"Idle",
"speed": 3.0
}]
[sub_resource type="Resource" id="Resource_46v15"]
script = ExtResource("4_22gbw")
max_hp = 10
max_physical_stamina = 10
max_mental_stamina = 10
strength = 1
wisdom = 1
constitution = 1
willpower = 1
speed = 1
focus = 1
accuracy = 1
agility = 1
[node name="Blob" type="Node2D"]
script = ExtResource("1_e8a40")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_p36og")
animation = &"Idle"
frame_progress = 0.110573
[node name="Combatant" type="Node" parent="."]
script = ExtResource("3_mqgr1")
combat_stats = SubResource("Resource_46v15")

@ -1,3 +1,3 @@
class_name EnemyCharacter
extends Node2D
extends Actor

@ -2,3 +2,5 @@
class_name Alex
extends PlayerCharacter
func get_combatant_component():
return $Combatant

@ -1,7 +1,10 @@
[gd_scene load_steps=16 format=3 uid="uid://d1nq0efa53wra"]
[gd_scene load_steps=21 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"]
[ext_resource type="Script" path="res://actors/player chars/alex/alex.gd" id="1_3ppui"]
[ext_resource type="Texture2D" uid="uid://cs6uqgpyvwy7r" path="res://actors/player chars/alex/art/alex.png" id="2_2yoh5"]
[ext_resource type="Script" path="res://systems/combat/combatant.gd" id="3_m4k76"]
[ext_resource type="Script" path="res://systems/combat/combat_stats.gd" id="4_6ae2h"]
[ext_resource type="Script" path="res://systems/combat/common actions/action_attack.gd" id="5_dhgwv"]
[sub_resource type="AtlasTexture" id="AtlasTexture_u1hru"]
atlas = ExtResource("2_2yoh5")
@ -129,11 +132,34 @@ animations = [{
"speed": 5.0
}]
[sub_resource type="Resource" id="Resource_y86ab"]
script = ExtResource("4_6ae2h")
max_hp = 100
max_physical_stamina = 10
max_mental_stamina = 10
strength = 5
wisdom = 1
constitution = 2
willpower = 1
speed = 1
focus = 1
accuracy = 1
agility = 1
[sub_resource type="Resource" id="Resource_2d861"]
script = ExtResource("5_dhgwv")
[node name="Alex" type="Node2D" node_paths=PackedStringArray("sprite")]
script = ExtResource("1_l60p5")
script = ExtResource("1_3ppui")
char_name = "Alex"
sprite = NodePath("AnimatedSprite2D")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_vu5b1")
animation = &"Idle_West"
[node name="Combatant" type="Node" parent="."]
script = ExtResource("3_m4k76")
combat_stats = SubResource("Resource_y86ab")
actions = Array[Resource("res://systems/combat/combat_action.gd")]([SubResource("Resource_2d861")])

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cs6uqgpyvwy7r"
path="res://.godot/imported/alex.png-d2fbd360031d0aeabb7ca94deee40098.ctex"
path="res://.godot/imported/alex.png-56d47e9a77a03f088a2e0c12cdb4ed2d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/character sprites/alex.png"
dest_files=["res://.godot/imported/alex.png-d2fbd360031d0aeabb7ca94deee40098.ctex"]
source_file="res://actors/player chars/alex/art/alex.png"
dest_files=["res://.godot/imported/alex.png-56d47e9a77a03f088a2e0c12cdb4ed2d.ctex"]
[params]

@ -1,6 +1,6 @@
class_name PlayerCharacter
extends Node2D
extends Actor
enum FacingDirection
{

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dxqymswxvgfax"
path="res://.godot/imported/MainLev2.0.png-c0f0144cffd3ebe82e6676edefbdd261.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/binary files/tile sets/RPGW_GrassLand_v2.01/MainLev2.0.png"
dest_files=["res://.godot/imported/MainLev2.0.png-c0f0144cffd3ebe82e6676edefbdd261.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

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://uvm83t4gchb7"
path="res://.godot/imported/Female1.png-751b04120ba1352265921310378ca8c2.ctex"
path="res://.godot/imported/Female1.png-2eec5ea28254392b2e95464ad0a94372.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/character sprites/Szadi NPCs/Female1.png"
dest_files=["res://.godot/imported/Female1.png-751b04120ba1352265921310378ca8c2.ctex"]
source_file="res://assets/extra/character sprites/Szadi NPCs/Female1.png"
dest_files=["res://.godot/imported/Female1.png-2eec5ea28254392b2e95464ad0a94372.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cgc15eklb3nu"
path="res://.godot/imported/Female2.png-c21c085d5b87f05b39035afefe476932.ctex"
path="res://.godot/imported/Female2.png-01de3d78f89683cfbbe8e8792cc6bd08.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/character sprites/Szadi NPCs/Female2.png"
dest_files=["res://.godot/imported/Female2.png-c21c085d5b87f05b39035afefe476932.ctex"]
source_file="res://assets/extra/character sprites/Szadi NPCs/Female2.png"
dest_files=["res://.godot/imported/Female2.png-01de3d78f89683cfbbe8e8792cc6bd08.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://4h8n71pv0rte"
path="res://.godot/imported/Male1.png-7e24926694ba397cd822ce2fe47dd922.ctex"
path="res://.godot/imported/Male1.png-963f24f22d76f069f012c827a633bb63.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/character sprites/Szadi NPCs/Male1.png"
dest_files=["res://.godot/imported/Male1.png-7e24926694ba397cd822ce2fe47dd922.ctex"]
source_file="res://assets/extra/character sprites/Szadi NPCs/Male1.png"
dest_files=["res://.godot/imported/Male1.png-963f24f22d76f069f012c827a633bb63.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://daq5hi7v0qbys"
path="res://.godot/imported/Male2.png-383cd63349d8e1441ed489d992446ce6.ctex"
path="res://.godot/imported/Male2.png-457a0ef9a2428d306d6490ae1fdbea89.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/character sprites/Szadi NPCs/Male2.png"
dest_files=["res://.godot/imported/Male2.png-383cd63349d8e1441ed489d992446ce6.ctex"]
source_file="res://assets/extra/character sprites/Szadi NPCs/Male2.png"
dest_files=["res://.godot/imported/Male2.png-457a0ef9a2428d306d6490ae1fdbea89.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cj13x130gdhv3"
path="res://.godot/imported/Male3.png-30f6f69b4fbf36e0cd2cc492c4dbe0f2.ctex"
path="res://.godot/imported/Male3.png-b2d56b3ab554af3a5ebd939e18716414.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/character sprites/Szadi NPCs/Male3.png"
dest_files=["res://.godot/imported/Male3.png-30f6f69b4fbf36e0cd2cc492c4dbe0f2.ctex"]
source_file="res://assets/extra/character sprites/Szadi NPCs/Male3.png"
dest_files=["res://.godot/imported/Male3.png-b2d56b3ab554af3a5ebd939e18716414.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://biv828180br3o"
path="res://.godot/imported/Male4.png-4f84124cbebb5fd4c9ec637846a7c80c.ctex"
path="res://.godot/imported/Male4.png-587a54eeb23dff76c97924ec7f3ba382.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/character sprites/Szadi NPCs/Male4.png"
dest_files=["res://.godot/imported/Male4.png-4f84124cbebb5fd4c9ec637846a7c80c.ctex"]
source_file="res://assets/extra/character sprites/Szadi NPCs/Male4.png"
dest_files=["res://.godot/imported/Male4.png-587a54eeb23dff76c97924ec7f3ba382.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bnp5t7o26kb0c"
path="res://.godot/imported/bar_over.png-55a6bae0151fad781ffcae0da3dc8d8b.ctex"
path="res://.godot/imported/bar_over.png-845363e26d1dc5930d27712ba94e0f91.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/ui/bar_over.png"
dest_files=["res://.godot/imported/bar_over.png-55a6bae0151fad781ffcae0da3dc8d8b.ctex"]
source_file="res://assets/extra/ui/bar_over.png"
dest_files=["res://.godot/imported/bar_over.png-845363e26d1dc5930d27712ba94e0f91.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dqf1p1mfki3vc"
path="res://.godot/imported/bar_under.png-f50ef5b32422e97a71938bac527202bf.ctex"
path="res://.godot/imported/bar_under.png-640e8ada6e2e3b0f68aea5197ab95723.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/ui/bar_under.png"
dest_files=["res://.godot/imported/bar_under.png-f50ef5b32422e97a71938bac527202bf.ctex"]
source_file="res://assets/extra/ui/bar_under.png"
dest_files=["res://.godot/imported/bar_under.png-640e8ada6e2e3b0f68aea5197ab95723.ctex"]
[params]

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dusv2g2bfou5l"
path="res://.godot/imported/bars.png-44ddffd67a1ebda120adc0b0e3911832.ctex"
path="res://.godot/imported/bars.png-fcaf8e549b67a5e765aebf41c3229fd3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/art/ui/bars.png"
dest_files=["res://.godot/imported/bars.png-44ddffd67a1ebda120adc0b0e3911832.ctex"]
source_file="res://assets/extra/ui/bars.png"
dest_files=["res://.godot/imported/bars.png-fcaf8e549b67a5e765aebf41c3229fd3.ctex"]
[params]

Binary file not shown.

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://4vbvmka0nuap"
path="res://.godot/imported/Female1.png-56887a3529fb336cf0858ab90f1fa770.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/binary files/NPC_Characters_v1.0/Female1.png"
dest_files=["res://.godot/imported/Female1.png-56887a3529fb336cf0858ab90f1fa770.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

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://7w7x8v2knti6"
path="res://.godot/imported/Female2.png-7455c479d4df8ac112540e04ff5b5630.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/binary files/NPC_Characters_v1.0/Female2.png"
dest_files=["res://.godot/imported/Female2.png-7455c479d4df8ac112540e04ff5b5630.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

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c62uqc15bk3v1"
path="res://.godot/imported/Male1.png-52f5a648166156cb5e195109c5672d85.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/binary files/NPC_Characters_v1.0/Male1.png"
dest_files=["res://.godot/imported/Male1.png-52f5a648166156cb5e195109c5672d85.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

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://6wby1g2ryiga"
path="res://.godot/imported/Male2.png-ea5c98f76a14fdec8476da97ac1fd5c0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/binary files/NPC_Characters_v1.0/Male2.png"
dest_files=["res://.godot/imported/Male2.png-ea5c98f76a14fdec8476da97ac1fd5c0.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

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://duom7a2rcyoxr"
path="res://.godot/imported/Male3.png-55debb59273585e3573b0ff3535086f8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/binary files/NPC_Characters_v1.0/Male3.png"
dest_files=["res://.godot/imported/Male3.png-55debb59273585e3573b0ff3535086f8.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

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c0jpxexgng8o6"
path="res://.godot/imported/Male4.png-8c683ea0a332ef0d4c17509ab8e2d3d4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/binary files/NPC_Characters_v1.0/Male4.png"
dest_files=["res://.godot/imported/Male4.png-8c683ea0a332ef0d4c17509ab8e2d3d4.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

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save