From bebb7b467b52bceb3b8adb34a75b6145dacd6471 Mon Sep 17 00:00:00 2001 From: kennetha123 Date: Sat, 25 Jan 2025 22:00:20 +0700 Subject: [PATCH] wip: monster card --- assets/card_base/Illustrated BG.png | 3 + assets/card_base/Illustrated BG.png.import | 34 +++ assets/card_base/Monster-InnerFill.png | 3 + assets/card_base/Monster-InnerFill.png.import | 34 +++ assets/card_base/Pip.png | 3 + assets/card_base/Pip.png.import | 34 +++ assets/card_base/RPS Panel.png | 3 + assets/card_base/RPS Panel.png.import | 34 +++ .../Screenshot 2025-01-25 211435.png | 3 + .../Screenshot 2025-01-25 211435.png.import | 34 +++ assets/card_base/Star.png | 3 + assets/card_base/Star.png.import | 34 +++ assets/card_base/batu.png | 3 + assets/card_base/batu.png.import | 34 +++ assets/card_base/gunting.png | 3 + assets/card_base/gunting.png.import | 34 +++ assets/card_base/kertas.png | 3 + assets/card_base/kertas.png.import | 34 +++ assets/monster/froggo 1.png | 3 + assets/monster/froggo 1.png.import | 34 +++ .../monster/{taiman.tres => axoluna.tres} | 10 +- data/cards/monster/bunnaut.tres | 13 + .../monster/{baraga.tres => capytain.tres} | 10 +- data/cards/monster/cattogato.tres | 13 + data/cards/monster/froguvo.tres | 15 ++ data/cards/monster/gilli.tres | 13 + data/cards/monster/jellova.tres | 13 + data/cards/monster/orcava.tres | 13 + data/cards/monster/prankie.tres | 13 + data/cards/monster/quackle.tres | 13 + demo_game.tscn | 6 +- icon.svg | 4 +- main.gd | 3 +- main.tscn | 2 +- tcg/card/monster_card.gd | 12 +- test_card.tscn | 10 +- ui/card_template/monster_card.gd | 7 + ui/card_template/monster_card.tscn | 254 +++++++++++++++++- 38 files changed, 772 insertions(+), 22 deletions(-) create mode 100644 assets/card_base/Illustrated BG.png create mode 100644 assets/card_base/Illustrated BG.png.import create mode 100644 assets/card_base/Monster-InnerFill.png create mode 100644 assets/card_base/Monster-InnerFill.png.import create mode 100644 assets/card_base/Pip.png create mode 100644 assets/card_base/Pip.png.import create mode 100644 assets/card_base/RPS Panel.png create mode 100644 assets/card_base/RPS Panel.png.import create mode 100644 assets/card_base/Screenshot 2025-01-25 211435.png create mode 100644 assets/card_base/Screenshot 2025-01-25 211435.png.import create mode 100644 assets/card_base/Star.png create mode 100644 assets/card_base/Star.png.import create mode 100644 assets/card_base/batu.png create mode 100644 assets/card_base/batu.png.import create mode 100644 assets/card_base/gunting.png create mode 100644 assets/card_base/gunting.png.import create mode 100644 assets/card_base/kertas.png create mode 100644 assets/card_base/kertas.png.import create mode 100644 assets/monster/froggo 1.png create mode 100644 assets/monster/froggo 1.png.import rename data/cards/monster/{taiman.tres => axoluna.tres} (62%) create mode 100644 data/cards/monster/bunnaut.tres rename data/cards/monster/{baraga.tres => capytain.tres} (63%) create mode 100644 data/cards/monster/cattogato.tres create mode 100644 data/cards/monster/froguvo.tres create mode 100644 data/cards/monster/gilli.tres create mode 100644 data/cards/monster/jellova.tres create mode 100644 data/cards/monster/orcava.tres create mode 100644 data/cards/monster/prankie.tres create mode 100644 data/cards/monster/quackle.tres create mode 100644 ui/card_template/monster_card.gd diff --git a/assets/card_base/Illustrated BG.png b/assets/card_base/Illustrated BG.png new file mode 100644 index 0000000..13f506e --- /dev/null +++ b/assets/card_base/Illustrated BG.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5db3ddf6b8519218ece058d4f169efc363d2aba02400b89b7eef1277c8e44ab +size 1973201 diff --git a/assets/card_base/Illustrated BG.png.import b/assets/card_base/Illustrated BG.png.import new file mode 100644 index 0000000..a704b8d --- /dev/null +++ b/assets/card_base/Illustrated BG.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dft4fbgoecbp4" +path="res://.godot/imported/Illustrated BG.png-181034664aa2e590183e18ee7ca1bfaa.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/Illustrated BG.png" +dest_files=["res://.godot/imported/Illustrated BG.png-181034664aa2e590183e18ee7ca1bfaa.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/card_base/Monster-InnerFill.png b/assets/card_base/Monster-InnerFill.png new file mode 100644 index 0000000..e625751 --- /dev/null +++ b/assets/card_base/Monster-InnerFill.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c98a835ac49a78d6cdc44f867372f5405c6e935fa651c55455ad54603cf7f6f6 +size 121678 diff --git a/assets/card_base/Monster-InnerFill.png.import b/assets/card_base/Monster-InnerFill.png.import new file mode 100644 index 0000000..f7d395a --- /dev/null +++ b/assets/card_base/Monster-InnerFill.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2qyx2k50v2vv" +path="res://.godot/imported/Monster-InnerFill.png-93b412d347601958a4d2176fe728b492.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/Monster-InnerFill.png" +dest_files=["res://.godot/imported/Monster-InnerFill.png-93b412d347601958a4d2176fe728b492.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/card_base/Pip.png b/assets/card_base/Pip.png new file mode 100644 index 0000000..e16ae38 --- /dev/null +++ b/assets/card_base/Pip.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8571a2dcc30f164a811adfe3ffd51ca631fe17bfa5bbae4b3bea4aefe0b7c038 +size 1179 diff --git a/assets/card_base/Pip.png.import b/assets/card_base/Pip.png.import new file mode 100644 index 0000000..1e6c48e --- /dev/null +++ b/assets/card_base/Pip.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjmxetjq82rl2" +path="res://.godot/imported/Pip.png-de8c266f2e2c9cd5a4519b7d5df4868e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/Pip.png" +dest_files=["res://.godot/imported/Pip.png-de8c266f2e2c9cd5a4519b7d5df4868e.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/card_base/RPS Panel.png b/assets/card_base/RPS Panel.png new file mode 100644 index 0000000..ce9a35a --- /dev/null +++ b/assets/card_base/RPS Panel.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2d6582bca3acbce0bc3e7179ee8864c9bf2bb7ed8afe1cdbe64b8fc3d0e596c +size 11713 diff --git a/assets/card_base/RPS Panel.png.import b/assets/card_base/RPS Panel.png.import new file mode 100644 index 0000000..f1a9ba3 --- /dev/null +++ b/assets/card_base/RPS Panel.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d0a2opcuwsko8" +path="res://.godot/imported/RPS Panel.png-ccba378cf0e54a7db466c513ef19441b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/RPS Panel.png" +dest_files=["res://.godot/imported/RPS Panel.png-ccba378cf0e54a7db466c513ef19441b.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/card_base/Screenshot 2025-01-25 211435.png b/assets/card_base/Screenshot 2025-01-25 211435.png new file mode 100644 index 0000000..b3ed7e8 --- /dev/null +++ b/assets/card_base/Screenshot 2025-01-25 211435.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:694774dbbeaa32955325ca8159a81d21a6df10b9768e19dff254619f86a9e0af +size 242836 diff --git a/assets/card_base/Screenshot 2025-01-25 211435.png.import b/assets/card_base/Screenshot 2025-01-25 211435.png.import new file mode 100644 index 0000000..4347032 --- /dev/null +++ b/assets/card_base/Screenshot 2025-01-25 211435.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqladcrximh6" +path="res://.godot/imported/Screenshot 2025-01-25 211435.png-7837967bcc49e81c793d612b9d970963.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/Screenshot 2025-01-25 211435.png" +dest_files=["res://.godot/imported/Screenshot 2025-01-25 211435.png-7837967bcc49e81c793d612b9d970963.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/card_base/Star.png b/assets/card_base/Star.png new file mode 100644 index 0000000..f1810d8 --- /dev/null +++ b/assets/card_base/Star.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69c3d97e1726b30f476327786f41c60aa448445f49098e3092f267ec75fbbacf +size 1246 diff --git a/assets/card_base/Star.png.import b/assets/card_base/Star.png.import new file mode 100644 index 0000000..eeabaf5 --- /dev/null +++ b/assets/card_base/Star.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqttp0i3vph37" +path="res://.godot/imported/Star.png-b9b4017ee1202aa95ea8c6ee772a751e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/Star.png" +dest_files=["res://.godot/imported/Star.png-b9b4017ee1202aa95ea8c6ee772a751e.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/card_base/batu.png b/assets/card_base/batu.png new file mode 100644 index 0000000..7899aa9 --- /dev/null +++ b/assets/card_base/batu.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3ebc26aaf3c87de9ce48e9a4f9e22db8944b9c304f9dbda9cf21c3636f013e9 +size 24379 diff --git a/assets/card_base/batu.png.import b/assets/card_base/batu.png.import new file mode 100644 index 0000000..bdef9d8 --- /dev/null +++ b/assets/card_base/batu.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bywa8qlwvcksd" +path="res://.godot/imported/batu.png-45758b8e11a9ea003a7865de11dc4441.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/batu.png" +dest_files=["res://.godot/imported/batu.png-45758b8e11a9ea003a7865de11dc4441.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/card_base/gunting.png b/assets/card_base/gunting.png new file mode 100644 index 0000000..553ae4d --- /dev/null +++ b/assets/card_base/gunting.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5679d2d3e778ec2d3142eaf0f5603b3a144e87f7f26e1e2d78974462db69f75 +size 33308 diff --git a/assets/card_base/gunting.png.import b/assets/card_base/gunting.png.import new file mode 100644 index 0000000..24d6aac --- /dev/null +++ b/assets/card_base/gunting.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ch04c20lkis6j" +path="res://.godot/imported/gunting.png-f8810080ad1e41ec3bcb0f8ff0d8b5f8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/gunting.png" +dest_files=["res://.godot/imported/gunting.png-f8810080ad1e41ec3bcb0f8ff0d8b5f8.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/card_base/kertas.png b/assets/card_base/kertas.png new file mode 100644 index 0000000..6507ea0 --- /dev/null +++ b/assets/card_base/kertas.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3aa28478cb7241ff59fe191f1aca345eccd60d8a9cb8f9c1058874b3fc0606ff +size 17766 diff --git a/assets/card_base/kertas.png.import b/assets/card_base/kertas.png.import new file mode 100644 index 0000000..c48a956 --- /dev/null +++ b/assets/card_base/kertas.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b0pclmv0j0r12" +path="res://.godot/imported/kertas.png-fd031884ac9417a6b135672f3fcc1d7f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/card_base/kertas.png" +dest_files=["res://.godot/imported/kertas.png-fd031884ac9417a6b135672f3fcc1d7f.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/monster/froggo 1.png b/assets/monster/froggo 1.png new file mode 100644 index 0000000..958fea7 --- /dev/null +++ b/assets/monster/froggo 1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f7f76dda3d26c8b4ac1b88f6fa7b0d22da51f873ced793d7c6b666138445844 +size 102451 diff --git a/assets/monster/froggo 1.png.import b/assets/monster/froggo 1.png.import new file mode 100644 index 0000000..8f40732 --- /dev/null +++ b/assets/monster/froggo 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8accn4e2ojau" +path="res://.godot/imported/froggo 1.png-9f147da84c624d2073b0c92236a84741.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/monster/froggo 1.png" +dest_files=["res://.godot/imported/froggo 1.png-9f147da84c624d2073b0c92236a84741.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/data/cards/monster/taiman.tres b/data/cards/monster/axoluna.tres similarity index 62% rename from data/cards/monster/taiman.tres rename to data/cards/monster/axoluna.tres index aa4681d..5ce7e9e 100644 --- a/data/cards/monster/taiman.tres +++ b/data/cards/monster/axoluna.tres @@ -1,11 +1,13 @@ [gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://di76avwc0gn8e"] -[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_j4601"] +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_s0p53"] [resource] -script = ExtResource("1_j4601") -rock = 50 -paper = 50 +script = ExtResource("1_s0p53") +rock = 20 +paper = 30 scissors = 50 energy_cost = 1 base_health = 120 +name = "Axoluna" +description = "Cute wanderer of the tank, Axoluna" diff --git a/data/cards/monster/bunnaut.tres b/data/cards/monster/bunnaut.tres new file mode 100644 index 0000000..15a678d --- /dev/null +++ b/data/cards/monster/bunnaut.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://bynhiupm3e5fp"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_3jfyg"] + +[resource] +script = ExtResource("1_3jfyg") +rock = 10 +paper = 30 +scissors = 70 +energy_cost = 1 +base_health = 50 +name = "Bunnaut" +description = "Run faster than tortoise." diff --git a/data/cards/monster/baraga.tres b/data/cards/monster/capytain.tres similarity index 63% rename from data/cards/monster/baraga.tres rename to data/cards/monster/capytain.tres index a979300..d11bf4d 100644 --- a/data/cards/monster/baraga.tres +++ b/data/cards/monster/capytain.tres @@ -1,11 +1,13 @@ [gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://cs7q8i7bvohmj"] -[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_v65bb"] +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_n3oql"] [resource] -script = ExtResource("1_v65bb") +script = ExtResource("1_n3oql") rock = 100 -paper = 100 -scissors = 100 +paper = 40 +scissors = 80 energy_cost = 3 base_health = 170 +name = "Capytain" +description = "A big, hungry capybara" diff --git a/data/cards/monster/cattogato.tres b/data/cards/monster/cattogato.tres new file mode 100644 index 0000000..7fee1c0 --- /dev/null +++ b/data/cards/monster/cattogato.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://bmst884k0myvd"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_hblhq"] + +[resource] +script = ExtResource("1_hblhq") +rock = 10 +paper = 10 +scissors = 200 +energy_cost = 3 +base_health = 80 +name = "Cattogato" +description = "Lovely cat wandering in the space." diff --git a/data/cards/monster/froguvo.tres b/data/cards/monster/froguvo.tres new file mode 100644 index 0000000..f9f900c --- /dev/null +++ b/data/cards/monster/froguvo.tres @@ -0,0 +1,15 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=3 format=3 uid="uid://bt1ngixrq4sve"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_ayfld"] +[ext_resource type="Texture2D" uid="uid://b8accn4e2ojau" path="res://assets/monster/froggo 1.png" id="1_vlu3d"] + +[resource] +script = ExtResource("1_ayfld") +rock = 20 +paper = 30 +scissors = 50 +energy_cost = 1 +base_health = 80 +name = "Froguvo" +description = "Ribbit in space." +icon = ExtResource("1_vlu3d") diff --git a/data/cards/monster/gilli.tres b/data/cards/monster/gilli.tres new file mode 100644 index 0000000..30da6af --- /dev/null +++ b/data/cards/monster/gilli.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://myxgsyerrdla"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_1j36c"] + +[resource] +script = ExtResource("1_1j36c") +rock = 40 +paper = 10 +scissors = 10 +energy_cost = 1 +base_health = 120 +name = "Gilli" +description = "There is a huge monster looking at me everyday." diff --git a/data/cards/monster/jellova.tres b/data/cards/monster/jellova.tres new file mode 100644 index 0000000..df0e747 --- /dev/null +++ b/data/cards/monster/jellova.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://425ipxdapg8o"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_yvmeg"] + +[resource] +script = ExtResource("1_yvmeg") +rock = 40 +paper = 60 +scissors = 50 +energy_cost = 2 +base_health = 110 +name = "Jellova" +description = "I'm gonna whip you till' you .. nevermind." diff --git a/data/cards/monster/orcava.tres b/data/cards/monster/orcava.tres new file mode 100644 index 0000000..b1c212e --- /dev/null +++ b/data/cards/monster/orcava.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://cakkx0o8mifmn"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_xcdwy"] + +[resource] +script = ExtResource("1_xcdwy") +rock = 30 +paper = 30 +scissors = 30 +energy_cost = 2 +base_health = 200 +name = "Orcava" +description = "Human try to communicate with me. I simply block them." diff --git a/data/cards/monster/prankie.tres b/data/cards/monster/prankie.tres new file mode 100644 index 0000000..5cea32c --- /dev/null +++ b/data/cards/monster/prankie.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://shri5ne51s74"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_70s4q"] + +[resource] +script = ExtResource("1_70s4q") +rock = 60 +paper = 60 +scissors = 10 +energy_cost = 2 +base_health = 100 +name = "Prankie" +description = "I'm not pranking anyone. Yet." diff --git a/data/cards/monster/quackle.tres b/data/cards/monster/quackle.tres new file mode 100644 index 0000000..f774842 --- /dev/null +++ b/data/cards/monster/quackle.tres @@ -0,0 +1,13 @@ +[gd_resource type="Resource" script_class="MonsterCard" load_steps=2 format=3 uid="uid://dnf3gpji5prlr"] + +[ext_resource type="Script" path="res://tcg/card/monster_card.gd" id="1_a8rjn"] + +[resource] +script = ExtResource("1_a8rjn") +rock = 50 +paper = 20 +scissors = 40 +energy_cost = 1 +base_health = 70 +name = "Quackle" +description = "Quack! Quack! No one notice me." diff --git a/demo_game.tscn b/demo_game.tscn index 7120e03..b209cf1 100644 --- a/demo_game.tscn +++ b/demo_game.tscn @@ -1,12 +1,12 @@ -[gd_scene load_steps=8 format=3 uid="uid://l2ehohbd1xhk"] +[gd_scene load_steps=8 format=3 uid="uid://bgc0u117jqyr1"] [ext_resource type="Script" path="res://demo_game.gd" id="1_jn16u"] [ext_resource type="Script" path="res://player_side.gd" id="2_w4tnt"] [ext_resource type="Script" path="res://tcg/card/card.gd" id="2_xuft0"] [ext_resource type="PackedScene" uid="uid://cikstg43mudkn" path="res://tcg/match/match_manager.tscn" id="3_3yhrl"] -[ext_resource type="Resource" uid="uid://cs7q8i7bvohmj" path="res://data/cards/monster/baraga.tres" id="3_we1tk"] +[ext_resource type="Resource" uid="uid://cs7q8i7bvohmj" path="res://data/cards/monster/capytain.tres" id="3_we1tk"] [ext_resource type="Resource" uid="uid://4eod3m0vc5a8" path="res://data/cards/support/potion.tres" id="4_kkhfk"] -[ext_resource type="Resource" uid="uid://di76avwc0gn8e" path="res://data/cards/monster/taiman.tres" id="5_3cm5x"] +[ext_resource type="Resource" uid="uid://di76avwc0gn8e" path="res://data/cards/monster/axoluna.tres" id="5_3cm5x"] [node name="DemoGame" type="Control"] layout_mode = 3 diff --git a/icon.svg b/icon.svg index 9d8b7fa..2ead0cd 100644 --- a/icon.svg +++ b/icon.svg @@ -1 +1,3 @@ - \ No newline at end of file +version https://git-lfs.github.com/spec/v1 +oid sha256:f6369bae7e12e6d16019cd6214cf27a2fdb6f3f6d024bd6f23c322be4804474f +size 994 diff --git a/main.gd b/main.gd index 5ba3478..6916288 100644 --- a/main.gd +++ b/main.gd @@ -130,7 +130,8 @@ func _on_server_removed(id, ip): func _do_connect(ip: String, port: int): var peer = ENetMultiplayerPeer.new() print("%s Connecting to %s:%d" % [server_discovery.id, ip, port]) - peer.create_client(ip, port) + var err = peer.create_client(ip, port) + print(err) multiplayer.multiplayer_peer = peer func _on_host_pressed(): diff --git a/main.tscn b/main.tscn index 523431c..f256ce5 100644 --- a/main.tscn +++ b/main.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://main.gd" id="1_e0ud3"] [ext_resource type="Script" path="res://server_discovery.gd" id="2_hed18"] -[ext_resource type="PackedScene" uid="uid://l2ehohbd1xhk" path="res://demo_game.tscn" id="3_2ln6b"] +[ext_resource type="PackedScene" uid="uid://bgc0u117jqyr1" path="res://demo_game.tscn" id="3_2ln6b"] [node name="Main" type="Control"] layout_mode = 3 diff --git a/tcg/card/monster_card.gd b/tcg/card/monster_card.gd index 4b82987..16174b1 100644 --- a/tcg/card/monster_card.gd +++ b/tcg/card/monster_card.gd @@ -8,9 +8,9 @@ class_name MonsterCard @export var base_health: int = 100 var damage: Dictionary: - get: - return { - "rock": rock, - "paper": paper, - "scissors": scissors - } \ No newline at end of file + get: + return { + "rock": rock, + "paper": paper, + "scissors": scissors + } diff --git a/test_card.tscn b/test_card.tscn index ccbb6d6..19770ef 100644 --- a/test_card.tscn +++ b/test_card.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=5 format=3 uid="uid://dhm4v4r7he0op"] +[gd_scene load_steps=6 format=3 uid="uid://lrb86kqjqt4v"] [ext_resource type="Script" path="res://test_card.gd" id="1_tqmas"] [ext_resource type="PackedScene" uid="uid://dg5amjm1gqi06" path="res://ui/card_template/support_card_green.tscn" id="2_22pto"] [ext_resource type="Resource" uid="uid://4eod3m0vc5a8" path="res://data/cards/support/potion.tres" id="2_tbbjy"] [ext_resource type="PackedScene" uid="uid://cds50kwwhlgam" path="res://ui/card_template/support_card_red.tscn" id="3_7wd2e"] +[ext_resource type="PackedScene" uid="uid://bhrelvt51cbp2" path="res://ui/card_template/monster_card.tscn" id="5_8mwjl"] [node name="TestCard" type="Control"] layout_mode = 3 @@ -26,3 +27,10 @@ offset_left = 699.0 offset_top = 168.0 offset_right = 919.0 offset_bottom = 488.0 + +[node name="MonsterCard" parent="." instance=ExtResource("5_8mwjl")] +layout_mode = 1 +offset_left = 461.0 +offset_top = 162.0 +offset_right = -471.0 +offset_bottom = -166.0 diff --git a/ui/card_template/monster_card.gd b/ui/card_template/monster_card.gd new file mode 100644 index 0000000..30349e6 --- /dev/null +++ b/ui/card_template/monster_card.gd @@ -0,0 +1,7 @@ +extends Control + +@export var name_label: Label +@export var health_label: Label +@export var energy_pip_container: Container +@export var energy_pip: PackedScene +@export var art: Texture2D diff --git a/ui/card_template/monster_card.tscn b/ui/card_template/monster_card.tscn index 3d9e3de..cee06b2 100644 --- a/ui/card_template/monster_card.tscn +++ b/ui/card_template/monster_card.tscn @@ -1,9 +1,261 @@ -[gd_scene format=3 uid="uid://bhrelvt51cbp2"] +[gd_scene load_steps=15 format=3 uid="uid://bhrelvt51cbp2"] + +[ext_resource type="Texture2D" uid="uid://cqladcrximh6" path="res://assets/card_base/Screenshot 2025-01-25 211435.png" id="1_nvo50"] +[ext_resource type="Script" path="res://ui/card_template/monster_card.gd" id="1_xddej"] +[ext_resource type="Texture2D" uid="uid://l2nxxhh0pvh8" path="res://assets/card_base/Frame.png" id="2_lhxdu"] +[ext_resource type="Texture2D" uid="uid://crgrple0uik7x" path="res://assets/card_base/Stroke.png" id="4_kkcc6"] +[ext_resource type="Texture2D" uid="uid://c2qyx2k50v2vv" path="res://assets/card_base/Monster-InnerFill.png" id="5_a3gpd"] +[ext_resource type="Texture2D" uid="uid://b8accn4e2ojau" path="res://assets/monster/froggo 1.png" id="7_j2i0p"] +[ext_resource type="Texture2D" uid="uid://dft4fbgoecbp4" path="res://assets/card_base/Illustrated BG.png" id="7_qe8a1"] +[ext_resource type="Texture2D" uid="uid://cqttp0i3vph37" path="res://assets/card_base/Star.png" id="8_ophhb"] +[ext_resource type="Theme" path="res://cards.tres" id="9_6x2vq"] +[ext_resource type="Texture2D" uid="uid://cjmxetjq82rl2" path="res://assets/card_base/Pip.png" id="10_14hhn"] +[ext_resource type="FontFile" uid="uid://08q3kkwmd4u6" path="res://assets/Inter-Regular.otf" id="11_oy107"] +[ext_resource type="Texture2D" uid="uid://bywa8qlwvcksd" path="res://assets/card_base/batu.png" id="12_a4kkh"] +[ext_resource type="Texture2D" uid="uid://ch04c20lkis6j" path="res://assets/card_base/gunting.png" id="13_ifoc6"] +[ext_resource type="Texture2D" uid="uid://b0pclmv0j0r12" path="res://assets/card_base/kertas.png" id="14_gm7k7"] [node name="MonsterCard" type="Control"] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 +offset_right = -932.0 +offset_bottom = -328.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("1_xddej") + +[node name="Screenshot2025-01-25211435" type="Sprite2D" parent="."] +visible = false +position = Vector2(355, 157) +scale = Vector2(0.625, 0.625) +texture = ExtResource("1_nvo50") + +[node name="Frame" type="TextureRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_lhxdu") +expand_mode = 1 + +[node name="MarginContainer" type="Control" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 4.0 +offset_top = 3.0 +offset_right = -5.0 +offset_bottom = -4.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="OuterStroke" type="NinePatchRect" parent="MarginContainer"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("4_kkcc6") + +[node name="InnerFill" type="TextureRect" parent="MarginContainer"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = 43.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("5_a3gpd") +expand_mode = 1 + +[node name="InnerStroke" type="NinePatchRect" parent="MarginContainer"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = 42.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("4_kkcc6") + +[node name="TextureRect2" type="TextureRect" parent="MarginContainer"] +layout_mode = 0 +offset_left = 9.0 +offset_top = 77.0 +offset_right = 199.0 +offset_bottom = 207.0 +pivot_offset = Vector2(95, 65) +texture = ExtResource("7_qe8a1") +expand_mode = 1 +stretch_mode = 5 + +[node name="TextureRect" type="TextureRect" parent="MarginContainer/TextureRect2"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("7_j2i0p") +expand_mode = 1 +stretch_mode = 5 + +[node name="EnergyStars" type="HBoxContainer" parent="MarginContainer"] +layout_mode = 0 +offset_left = 141.0 +offset_top = 55.0 +offset_right = 200.0 +offset_bottom = 70.0 + +[node name="TextureRect3" type="TextureRect" parent="MarginContainer/EnergyStars"] +layout_mode = 2 +texture = ExtResource("8_ophhb") +expand_mode = 3 +stretch_mode = 5 + +[node name="TextureRect2" type="TextureRect" parent="MarginContainer/EnergyStars"] +layout_mode = 2 +texture = ExtResource("8_ophhb") +expand_mode = 3 +stretch_mode = 5 + +[node name="TextureRect" type="TextureRect" parent="MarginContainer/EnergyStars"] +layout_mode = 2 +texture = ExtResource("8_ophhb") +expand_mode = 3 +stretch_mode = 5 + +[node name="HPNumber" type="Label" parent="MarginContainer"] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_left = 14.0 +offset_top = 44.0 +offset_right = -99.0 +offset_bottom = 80.0 +grow_horizontal = 2 +theme = ExtResource("9_6x2vq") +theme_override_font_sizes/font_size = 16 +text = "HP 80" +vertical_alignment = 1 + +[node name="MonsterNameLabel" type="Label" parent="MarginContainer"] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_left = 31.0 +offset_top = 11.0 +offset_right = 26.0 +offset_bottom = 47.0 +grow_horizontal = 2 +theme = ExtResource("9_6x2vq") +theme_override_font_sizes/font_size = 26 +text = "Cattogato" +vertical_alignment = 1 + +[node name="CardNumber" type="TextureRect" parent="MarginContainer"] +layout_mode = 0 +offset_left = 7.0 +offset_top = 17.0 +offset_right = 26.0 +offset_bottom = 36.0 +texture = ExtResource("10_14hhn") +expand_mode = 1 +stretch_mode = 5 + +[node name="Label" type="Label" parent="MarginContainer/CardNumber"] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -9.5 +offset_top = -7.0 +offset_right = 9.5 +offset_bottom = 7.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = ExtResource("9_6x2vq") +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_fonts/font = ExtResource("11_oy107") +theme_override_font_sizes/font_size = 6 +text = "#01" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Paper" type="TextureRect" parent="MarginContainer"] +offset_left = 109.0 +offset_top = 183.0 +offset_right = 222.0 +offset_bottom = 356.0 +texture = ExtResource("14_gm7k7") +expand_mode = 1 +stretch_mode = 5 + +[node name="HPNumber" type="Label" parent="MarginContainer/Paper"] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_left = 48.0 +offset_top = 32.0 +offset_right = -32.0 +offset_bottom = 73.0 +grow_horizontal = 2 +theme = ExtResource("9_6x2vq") +theme_override_font_sizes/font_size = 20 +text = "10" +vertical_alignment = 1 + +[node name="Scissors" type="TextureRect" parent="MarginContainer"] +offset_left = 43.0 +offset_top = 182.0 +offset_right = 156.0 +offset_bottom = 355.0 +texture = ExtResource("13_ifoc6") +expand_mode = 1 +stretch_mode = 5 + +[node name="HPNumber" type="Label" parent="MarginContainer/Scissors"] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_left = 48.0 +offset_top = 32.0 +offset_right = -32.0 +offset_bottom = 73.0 +grow_horizontal = 2 +theme = ExtResource("9_6x2vq") +theme_override_font_sizes/font_size = 20 +text = "10" +vertical_alignment = 1 + +[node name="Rock" type="TextureRect" parent="MarginContainer"] +layout_mode = 0 +offset_left = -23.0 +offset_top = 181.0 +offset_right = 90.0 +offset_bottom = 354.0 +texture = ExtResource("12_a4kkh") +expand_mode = 1 +stretch_mode = 5 + +[node name="HPNumber" type="Label" parent="MarginContainer/Rock"] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_left = 48.0 +offset_top = 32.0 +offset_right = -32.0 +offset_bottom = 73.0 +grow_horizontal = 2 +theme = ExtResource("9_6x2vq") +theme_override_font_sizes/font_size = 20 +text = "10" +vertical_alignment = 1