summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavoeklund01 <eklundgu@gmail.com>2025-11-10 16:57:26 -0300
committerGustavoeklund01 <eklundgu@gmail.com>2025-11-10 16:57:26 -0300
commit1b0582792b7b9169ce8a667bf5533241d083705c (patch)
treed168d44c19736dcfe97bd9a58a1f7253dc52c75f
parent3840e41432593855f53013962f42da553264baeb (diff)
small cure
-rw-r--r--assets/definitions/Items/small_cure.tres19
-rw-r--r--assets/definitions/actor/Player.tres2
-rw-r--r--assets/definitions/spells/small_cure.tres19
-rw-r--r--assets/sprites/spells/preview.pngbin0 -> 833 bytes
-rw-r--r--assets/sprites/spells/preview.png.import40
-rw-r--r--scripts/Entities/Actions/ItemAction.cs2
-rw-r--r--scripts/Entities/Actors/PlayerDefinition.cs2
-rw-r--r--scripts/Entities/Entity.cs2
-rw-r--r--scripts/Entities/EntityDefinition.cs2
-rw-r--r--scripts/Entities/Items/GrimoireItemActivation.cs2
-rw-r--r--scripts/Entities/Items/ItemResource.cs2
-rw-r--r--scripts/Entities/Items/SpellEffectItemActivation.cs2
-rw-r--r--scripts/Magic/DamageEffect.cs2
-rw-r--r--scripts/Magic/HealEffect.cs2
-rw-r--r--scripts/Magic/SpellBook.cs2
-rw-r--r--scripts/Magic/SpellEffect.cs2
-rw-r--r--scripts/Magic/SpellResource.cs2
17 files changed, 91 insertions, 13 deletions
diff --git a/assets/definitions/Items/small_cure.tres b/assets/definitions/Items/small_cure.tres
new file mode 100644
index 0000000..a9daaf5
--- /dev/null
+++ b/assets/definitions/Items/small_cure.tres
@@ -0,0 +1,19 @@
+[gd_resource type="Resource" script_class="ItemResource" load_steps=6 format=3 uid="uid://c2ih2qf8c4rso"]
+
+[ext_resource type="Script" uid="uid://bjheqia3q1u7m" path="res://scripts/Entities/Items/GrimoireItemActivation.cs" id="1_1lv8a"]
+[ext_resource type="Script" uid="uid://bybli1lduvm3n" path="res://scripts/Entities/Items/ItemResource.cs" id="1_rna1l"]
+[ext_resource type="Resource" uid="uid://c5uviqcb4ai8" path="res://assets/definitions/spells/small_cure.tres" id="2_6n7k0"]
+[ext_resource type="Texture2D" uid="uid://lgxlsnp626j8" path="res://assets/sprites/items/grimoire.png" id="3_wfig5"]
+
+[sub_resource type="Resource" id="Resource_tcd4j"]
+script = ExtResource("1_1lv8a")
+spell = ExtResource("2_6n7k0")
+metadata/_custom_type_script = "uid://bjheqia3q1u7m"
+
+[resource]
+script = ExtResource("1_rna1l")
+DisplayName = "grimoario cura pequena"
+Icon = ExtResource("3_wfig5")
+Description = "cura pequena"
+Activation = SubResource("Resource_tcd4j")
+metadata/_custom_type_script = "uid://bybli1lduvm3n"
diff --git a/assets/definitions/actor/Player.tres b/assets/definitions/actor/Player.tres
index 8a4e2c1..58062c3 100644
--- a/assets/definitions/actor/Player.tres
+++ b/assets/definitions/actor/Player.tres
@@ -11,7 +11,7 @@ deathTexture = ExtResource("1_m72ac")
Hp = 36
Mp = 12
Atk = 8
-Def = 10
+Def = 3
Men = 3
name = "Jogador"
texture = ExtResource("3_m72ac")
diff --git a/assets/definitions/spells/small_cure.tres b/assets/definitions/spells/small_cure.tres
new file mode 100644
index 0000000..cd4cca1
--- /dev/null
+++ b/assets/definitions/spells/small_cure.tres
@@ -0,0 +1,19 @@
+[gd_resource type="Resource" script_class="SpellResource" load_steps=5 format=3 uid="uid://c5uviqcb4ai8"]
+
+[ext_resource type="Script" uid="uid://bslt4pbvwvsj1" path="res://scripts/Magic/HealEffect.cs" id="1_6vhk7"]
+[ext_resource type="Script" uid="uid://bi6jdrduu76de" path="res://scripts/Magic/SpellResource.cs" id="1_bmdi4"]
+[ext_resource type="Texture2D" uid="uid://b38owm0e2mdf6" path="res://assets/sprites/spells/preview.png" id="2_dgyrn"]
+
+[sub_resource type="Resource" id="Resource_yfnw8"]
+script = ExtResource("1_6vhk7")
+Healing = 4
+metadata/_custom_type_script = "uid://bslt4pbvwvsj1"
+
+[resource]
+script = ExtResource("1_bmdi4")
+Icon = ExtResource("2_dgyrn")
+SpellName = "Small cure"
+Cost = 10
+Type = 1
+Effects = Array[Object]([SubResource("Resource_yfnw8")])
+metadata/_custom_type_script = "uid://bi6jdrduu76de"
diff --git a/assets/sprites/spells/preview.png b/assets/sprites/spells/preview.png
new file mode 100644
index 0000000..6c98c28
--- /dev/null
+++ b/assets/sprites/spells/preview.png
Binary files differ
diff --git a/assets/sprites/spells/preview.png.import b/assets/sprites/spells/preview.png.import
new file mode 100644
index 0000000..b725c43
--- /dev/null
+++ b/assets/sprites/spells/preview.png.import
@@ -0,0 +1,40 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://b38owm0e2mdf6"
+path="res://.godot/imported/preview.png-c395d3259810d7ab569a7ee8306729c8.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://assets/sprites/spells/preview.png"
+dest_files=["res://.godot/imported/preview.png-c395d3259810d7ab569a7ee8306729c8.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
+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/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
+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/scripts/Entities/Actions/ItemAction.cs b/scripts/Entities/Actions/ItemAction.cs
index a3197d4..d888329 100644
--- a/scripts/Entities/Actions/ItemAction.cs
+++ b/scripts/Entities/Actions/ItemAction.cs
@@ -19,4 +19,4 @@ public partial class ItemAction : Action
{
return item.Activate(this);
}
-} \ No newline at end of file
+}
diff --git a/scripts/Entities/Actors/PlayerDefinition.cs b/scripts/Entities/Actors/PlayerDefinition.cs
index 58ae6b4..8e655df 100644
--- a/scripts/Entities/Actors/PlayerDefinition.cs
+++ b/scripts/Entities/Actors/PlayerDefinition.cs
@@ -8,4 +8,4 @@ public partial class PlayerDefinition : ActorDefinition
[ExportCategory("Player Mechanics")]
[Export]
public int InventoryCapacity = 0;
-} \ No newline at end of file
+}
diff --git a/scripts/Entities/Entity.cs b/scripts/Entities/Entity.cs
index 5c643db..61dadc7 100644
--- a/scripts/Entities/Entity.cs
+++ b/scripts/Entities/Entity.cs
@@ -161,4 +161,4 @@ public abstract partial class Entity : Sprite2D, ISaveable
Type = (EntityType)(int)saveData["layer"];
return true;
}
-} \ No newline at end of file
+}
diff --git a/scripts/Entities/EntityDefinition.cs b/scripts/Entities/EntityDefinition.cs
index a6080bd..01a2ce9 100644
--- a/scripts/Entities/EntityDefinition.cs
+++ b/scripts/Entities/EntityDefinition.cs
@@ -20,4 +20,4 @@ public partial class EntityDefinition : Resource
// Se a entidade bloqueia movimento.
[Export]
public bool blocksMovement = true;
-} \ No newline at end of file
+}
diff --git a/scripts/Entities/Items/GrimoireItemActivation.cs b/scripts/Entities/Items/GrimoireItemActivation.cs
index 34c136f..d7da2d0 100644
--- a/scripts/Entities/Items/GrimoireItemActivation.cs
+++ b/scripts/Entities/Items/GrimoireItemActivation.cs
@@ -16,4 +16,4 @@ public partial class GrimoireItemActivation : ItemActivation
consumer.SpellBook.LearnSpell(spell);
return true;
}
-} \ No newline at end of file
+}
diff --git a/scripts/Entities/Items/ItemResource.cs b/scripts/Entities/Items/ItemResource.cs
index 47ea64d..60194e4 100644
--- a/scripts/Entities/Items/ItemResource.cs
+++ b/scripts/Entities/Items/ItemResource.cs
@@ -19,4 +19,4 @@ public partial class ItemResource : Resource
[Export]
public ItemActivation Activation { get; set; }
-} \ No newline at end of file
+}
diff --git a/scripts/Entities/Items/SpellEffectItemActivation.cs b/scripts/Entities/Items/SpellEffectItemActivation.cs
index 3b421c7..0734530 100644
--- a/scripts/Entities/Items/SpellEffectItemActivation.cs
+++ b/scripts/Entities/Items/SpellEffectItemActivation.cs
@@ -16,4 +16,4 @@ public partial class SpellEffectItemActivation : ItemActivation
effect.Apply(consumer, consumer);
return true;
}
-} \ No newline at end of file
+}
diff --git a/scripts/Magic/DamageEffect.cs b/scripts/Magic/DamageEffect.cs
index 211a03a..1263ab6 100644
--- a/scripts/Magic/DamageEffect.cs
+++ b/scripts/Magic/DamageEffect.cs
@@ -28,4 +28,4 @@ public partial class DamageEffect : SpellEffect
target.Hp -= damageDealt;
}
-} \ No newline at end of file
+}
diff --git a/scripts/Magic/HealEffect.cs b/scripts/Magic/HealEffect.cs
index 3e924c3..2fd6807 100644
--- a/scripts/Magic/HealEffect.cs
+++ b/scripts/Magic/HealEffect.cs
@@ -17,4 +17,4 @@ public partial class HealEffect : SpellEffect
int healingDealt = target.Hp - prevHealth;
MessageLogData.Instance.AddMessage($"{caster.DisplayName} restaurou {healingDealt} de HP de {target.DisplayName}");
}
-} \ No newline at end of file
+}
diff --git a/scripts/Magic/SpellBook.cs b/scripts/Magic/SpellBook.cs
index 914add6..11b7d08 100644
--- a/scripts/Magic/SpellBook.cs
+++ b/scripts/Magic/SpellBook.cs
@@ -45,4 +45,4 @@ public partial class SpellBook : Node, ISaveable
return true;
}
-} \ No newline at end of file
+}
diff --git a/scripts/Magic/SpellEffect.cs b/scripts/Magic/SpellEffect.cs
index 482a64f..e2209cc 100644
--- a/scripts/Magic/SpellEffect.cs
+++ b/scripts/Magic/SpellEffect.cs
@@ -7,4 +7,4 @@ namespace TheLegendOfGustav.Magic;
public abstract partial class SpellEffect : Resource
{
public abstract void Apply(Actor caster, Actor target);
-} \ No newline at end of file
+}
diff --git a/scripts/Magic/SpellResource.cs b/scripts/Magic/SpellResource.cs
index bb3fd15..b0487bd 100644
--- a/scripts/Magic/SpellResource.cs
+++ b/scripts/Magic/SpellResource.cs
@@ -33,4 +33,4 @@ public partial class SpellResource : Resource
public int Range { get; set; }
[Export]
public Godot.Collections.Array<SpellEffect> Effects { get; set; } = [];
-} \ No newline at end of file
+}