summaryrefslogtreecommitdiff
path: root/assets/definitions
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-10-24 21:25:15 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-10-24 21:25:15 -0300
commit639cd8cef403e9e66bf31e7888e786effac2b292 (patch)
treea1b3872a91ad599a71629d0d62c72125138c5c14 /assets/definitions
parent52c32a24044aa574c9e7bf7aa4e2499349cc36b2 (diff)
refactor: Sistema de itens reescrito
Em tese, este novo sistema é mais fácil de serializar. Descanse em paz pergaminhos, eu não quero reimplementá-los neste novo sistema.
Diffstat (limited to 'assets/definitions')
-rw-r--r--assets/definitions/Items/mana_bolt_grimoire.tres25
-rw-r--r--assets/definitions/Items/mana_bolt_scroll.tres14
-rw-r--r--assets/definitions/Items/small_healing_potion.tres29
3 files changed, 35 insertions, 33 deletions
diff --git a/assets/definitions/Items/mana_bolt_grimoire.tres b/assets/definitions/Items/mana_bolt_grimoire.tres
index b134ea1..95918d5 100644
--- a/assets/definitions/Items/mana_bolt_grimoire.tres
+++ b/assets/definitions/Items/mana_bolt_grimoire.tres
@@ -1,14 +1,19 @@
-[gd_resource type="Resource" script_class="GrimoireConsumableDefinition" load_steps=4 format=3 uid="uid://coeyeuyren2vi"]
+[gd_resource type="Resource" script_class="ItemResource" load_steps=6 format=3 uid="uid://bpg2rb62r7aev"]
-[ext_resource type="Resource" uid="uid://boi8svlb0e8l" path="res://assets/definitions/spells/mana_bolt.tres" id="1_dnjm5"]
-[ext_resource type="Script" uid="uid://blkth0in1fp74" path="res://scripts/Entities/Items/GrimoireConsumableDefinition.cs" id="1_tv46f"]
-[ext_resource type="Texture2D" uid="uid://lgxlsnp626j8" path="res://assets/sprites/items/grimoire.png" id="3_degcq"]
+[ext_resource type="Script" uid="uid://bjheqia3q1u7m" path="res://scripts/Entities/Items/GrimoireItemActivation.cs" id="1_degcq"]
+[ext_resource type="Script" uid="uid://bybli1lduvm3n" path="res://scripts/Entities/Items/ItemResource.cs" id="1_tv46f"]
+[ext_resource type="Resource" uid="uid://boi8svlb0e8l" path="res://assets/definitions/spells/mana_bolt.tres" id="2_dtkc6"]
+[ext_resource type="Texture2D" uid="uid://lgxlsnp626j8" path="res://assets/sprites/items/grimoire.png" id="3_f5ce4"]
+
+[sub_resource type="Resource" id="Resource_4p7cf"]
+script = ExtResource("1_degcq")
+spell = ExtResource("2_dtkc6")
+metadata/_custom_type_script = "uid://bjheqia3q1u7m"
[resource]
script = ExtResource("1_tv46f")
-Spell = ExtResource("1_dnjm5")
-name = "Grimório de flecha de mana."
-texture = ExtResource("3_degcq")
-Type = 1
-blocksMovement = false
-metadata/_custom_type_script = "uid://blkth0in1fp74"
+DisplayName = "Grimório de mana bolt"
+Icon = ExtResource("3_f5ce4")
+Description = "O demiurgo usou as leis da matéria, moldou o mundo e aprisionou todas as centelhas no reino sensível."
+Activation = SubResource("Resource_4p7cf")
+metadata/_custom_type_script = "uid://bybli1lduvm3n"
diff --git a/assets/definitions/Items/mana_bolt_scroll.tres b/assets/definitions/Items/mana_bolt_scroll.tres
deleted file mode 100644
index 1b0dec8..0000000
--- a/assets/definitions/Items/mana_bolt_scroll.tres
+++ /dev/null
@@ -1,14 +0,0 @@
-[gd_resource type="Resource" script_class="ScrollConsumableDefinition" load_steps=4 format=3 uid="uid://xbjfp7d6qoyj"]
-
-[ext_resource type="Resource" uid="uid://boi8svlb0e8l" path="res://assets/definitions/spells/mana_bolt.tres" id="1_eaxr2"]
-[ext_resource type="Script" uid="uid://2lk5w2po81gy" path="res://scripts/Entities/Items/ScrollConsumableDefinition.cs" id="1_jtnuc"]
-[ext_resource type="Texture2D" uid="uid://b2rpvh57daol7" path="res://assets/sprites/items/scroll.png" id="3_eaxr2"]
-
-[resource]
-script = ExtResource("1_jtnuc")
-Spell = ExtResource("1_eaxr2")
-name = "Pergaminho de flecha de mana"
-texture = ExtResource("3_eaxr2")
-Type = 1
-blocksMovement = false
-metadata/_custom_type_script = "uid://2lk5w2po81gy"
diff --git a/assets/definitions/Items/small_healing_potion.tres b/assets/definitions/Items/small_healing_potion.tres
index 4a75d72..2c5d1c4 100644
--- a/assets/definitions/Items/small_healing_potion.tres
+++ b/assets/definitions/Items/small_healing_potion.tres
@@ -1,13 +1,24 @@
-[gd_resource type="Resource" script_class="HealingConsumableDefinition" load_steps=3 format=3 uid="uid://bm6yx6rwh8bds"]
+[gd_resource type="Resource" script_class="ItemResource" load_steps=7 format=3 uid="uid://bb2lhoglbafb4"]
-[ext_resource type="Script" uid="uid://b3qy4gtjfci14" path="res://scripts/Entities/Items/HealingConsumableDefinition.cs" id="1_4dl2g"]
-[ext_resource type="Texture2D" uid="uid://b7drpdbk4lggb" path="res://assets/sprites/items/small_health_potion.png" id="2_esrbk"]
+[ext_resource type="Script" uid="uid://bybli1lduvm3n" path="res://scripts/Entities/Items/ItemResource.cs" id="1_4dl2g"]
+[ext_resource type="Script" uid="uid://bslt4pbvwvsj1" path="res://scripts/Magic/HealEffect.cs" id="1_fmuec"]
+[ext_resource type="Script" uid="uid://b72fwkwul1wet" path="res://scripts/Entities/Items/SpellEffectItemActivation.cs" id="2_nd4hc"]
+[ext_resource type="Texture2D" uid="uid://b7drpdbk4lggb" path="res://assets/sprites/items/small_health_potion.png" id="3_e450c"]
+
+[sub_resource type="Resource" id="Resource_qjoe0"]
+script = ExtResource("1_fmuec")
+Healing = 4
+metadata/_custom_type_script = "uid://bslt4pbvwvsj1"
+
+[sub_resource type="Resource" id="Resource_72281"]
+script = ExtResource("2_nd4hc")
+effect = SubResource("Resource_qjoe0")
+metadata/_custom_type_script = "uid://b72fwkwul1wet"
[resource]
script = ExtResource("1_4dl2g")
-healingPercentage = 10.0
-name = "Poção de vida pequena"
-texture = ExtResource("2_esrbk")
-Type = 1
-blocksMovement = false
-metadata/_custom_type_script = "uid://b3qy4gtjfci14"
+DisplayName = "Poção de vida pequena"
+Icon = ExtResource("3_e450c")
+Description = "Recupera um pouco de vida lol"
+Activation = SubResource("Resource_72281")
+metadata/_custom_type_script = "uid://bybli1lduvm3n"