Additional refactoring and fixing of equipment data

Add attack data to enemy attacks (might need to rework a little bit for primary/secondary attacks)
This commit is contained in:
2025-10-23 00:05:44 -07:00
parent f0c4e65783
commit bc161a58b3
73 changed files with 641 additions and 641 deletions

View File

@@ -38,14 +38,11 @@ public partial class Weapon : EquipableItem
public ElementType WeaponElement => Stats.WeaponElement;
public double ElementalDamageBonus => Stats.ElementalDamageBonus;
public void IncreaseWeaponAttack(int bonus) => _extraDamage += bonus;
public int Damage => Stats.Damage + _bonusDamage;
public override int BonusAttack { get => Stats.BonusAttack + _extraDamage; }
public void IncreaseWeaponAttack(int bonus) => _bonusDamage += bonus;
[Save("weapon_bonus_damage")]
private int _bonusDamage { get; set; } = 0;
private int _extraDamage = 0;
[Export]
[Save("weapon_stats")]

View File

@@ -1,7 +1,6 @@
using Chickensoft.Introspection;
using Chickensoft.Serialization;
using Godot;
using Zennysoft.Game.Implementation;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma;
@@ -10,22 +9,6 @@ namespace Zennysoft.Game.Ma;
[Meta, Id("weapon_stat_type")]
public partial class WeaponStats : InventoryItemStats
{
[Export]
[Save("weapon_name")]
public override string Name { get; set; } = default!;
[Export(PropertyHint.MultilineText)]
[Save("weapon_description")]
public override string Description { get; set; } = default!;
[Export]
[Save("weapon_damage")]
public int Damage { get; set; } = 0;
[Export]
[Save("weapon_luck")]
public double Luck { get; set; } = 0.05;
[Export]
[Save("weapon_atk_speed")]
public double AttackSpeed { get; set; } = 1;
@@ -34,10 +17,6 @@ public partial class WeaponStats : InventoryItemStats
[Save("weapon_element")]
public ElementType WeaponElement { get; set; } = ElementType.None;
[Export]
[Save("weapon_elemental_damage_bonus")]
public double ElementalDamageBonus { get; set; } = 1.0;
[Export]
[Save("weapon_tag")]
public WeaponTag WeaponTag { get; set; } = WeaponTag.None;

View File

@@ -1,9 +1,12 @@
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://ww4vha51i82v"]
[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://ww4vha51i82v"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_d2lw0"]
[resource]
script = ExtResource("1_d2lw0")
AttackSpeed = 0.15
WeaponElement = 0
WeaponTag = 0
Name = "Atonement"
Description = "\"Should I betray my mother, my father, my brother, my sister, my love, let me be pierced by a thousand knives.
Should I betray the self, let me be struck by 10,000 lightning bolts.
@@ -15,16 +18,13 @@ The Goddess of Destruction materialized it's sorrow into this form.
A powerful weapon that has the ability to obliterate anything of the earth.
There is significance in your using it."
Damage = 1000
Luck = 0.05
AttackSpeed = 0.15
WeaponElement = 0
ElementalDamageBonus = 1.0
WeaponTag = 0
SpawnRate = 0.0
BonusAttack = 1000
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
HealHPAmount = 0
HealVTAmount = 0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
metadata/_custom_type_script = "uid://cc7byqeolw5y4"

View File

@@ -1,21 +1,23 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://c1bg0o7nmu2xw"]
[ext_resource type="Texture2D" uid="uid://cil3xe3jq82r6" path="res://src/items/weapons/textures/JIBLETT.PNG" id="1_ifm43"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="1_re512"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_re512"]
[resource]
script = ExtResource("1_re512")
Damage = 3
Luck = 0.05
AttackSpeed = 1.0
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = []
WeaponElement = 0
WeaponTag = 0
Name = "Jiblett"
Description = "+3 ATK
A halberd for the tasteful."
Texture = ExtResource("1_ifm43")
SpawnRate = 0.1
BonusAttack = 3
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_ifm43")

View File

@@ -1,20 +1,22 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://c8bvtfcq772sv"]
[ext_resource type="Texture2D" uid="uid://dsi0myqu80aq3" path="res://src/items/weapons/textures/katar.PNG" id="1_3waom"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="2_3gdyl"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="2_3gdyl"]
[resource]
script = ExtResource("2_3gdyl")
Damage = 1
Luck = 0.05
AttackSpeed = 1.25
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = []
WeaponElement = 0
WeaponTag = 0
Name = "Katara"
Description = "+1 ATK, Fast"
Texture = ExtResource("1_3waom")
SpawnRate = 0.3
BonusAttack = 1
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_3waom")

View File

@@ -1,22 +1,24 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://db075qhmlmrcu"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="1_kbje7"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_kbje7"]
[ext_resource type="Texture2D" uid="uid://bkntmni5jxfpk" path="res://src/items/weapons/textures/KUBEL.PNG" id="1_kwtbu"]
[resource]
script = ExtResource("1_kbje7")
Damage = 9
Luck = 0.05
AttackSpeed = 1.0
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = [0]
WeaponElement = 0
WeaponTag = 0
Name = "Kubel"
Description = "+9 ATK
A very powerful spear.
For every hit, you lose 5 HP."
Texture = ExtResource("1_kwtbu")
SpawnRate = 0.01
BonusAttack = 9
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_kwtbu")

View File

@@ -1,21 +1,23 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://cfr100khjkloh"]
[ext_resource type="Texture2D" uid="uid://blq3nnyostunl" path="res://src/items/weapons/textures/LOVE JUDGEMENT.PNG" id="1_ivlxj"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="1_vroib"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_vroib"]
[resource]
script = ExtResource("1_vroib")
Damage = 12
Luck = 0.05
AttackSpeed = 1.0
TelluricDamageBonus = 0.0
AeolicDamageBonus = 25.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = []
WeaponElement = 0
WeaponTag = 0
Name = "Love Judgement"
Description = "+12 ATK
A mace only wieldable by the strong of heart."
Texture = ExtResource("1_ivlxj")
SpawnRate = 0.01
BonusAttack = 12
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_ivlxj")

View File

@@ -1,22 +1,24 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://ckj1m4iv4m02r"]
[ext_resource type="Texture2D" uid="uid://740syoj0w14p" path="res://src/items/weapons/textures/PALM OF HEAVEN.PNG" id="1_hi6xm"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="1_pwwg7"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_pwwg7"]
[resource]
script = ExtResource("1_pwwg7")
Damage = 10
Luck = 0.05
AttackSpeed = 1.0
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = [3]
WeaponElement = 0
WeaponTag = 0
Name = "Palm of Heaven"
Description = "+10 ATK
Very Powerful.
Breaks upon leaving the floor."
Texture = ExtResource("1_hi6xm")
SpawnRate = 0.01
BonusAttack = 10
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_hi6xm")

View File

@@ -1,21 +1,23 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://gebgo2x6nr3t"]
[ext_resource type="Texture2D" uid="uid://b8c7kd436tg4" path="res://src/items/weapons/textures/RONDO.PNG" id="1_cvwbh"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="1_xfb0x"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_xfb0x"]
[resource]
script = ExtResource("1_xfb0x")
Damage = 7
Luck = 0.05
AttackSpeed = 1.333
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = [1]
WeaponElement = 0
WeaponTag = 0
Name = "Rondo"
Description = "+7 ATK
An eastern blade outside of time and reproach."
Texture = ExtResource("1_cvwbh")
SpawnRate = 0.01
BonusAttack = 7
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_cvwbh")

View File

@@ -1,26 +1,24 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://b7xr0l4a8g1gk"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="1_40b5j"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_40b5j"]
[ext_resource type="Texture2D" uid="uid://b1qbho30vnuxf" path="res://src/items/weapons/textures/sealing rod.PNG" id="1_wiylj"]
[resource]
script = ExtResource("1_40b5j")
Damage = 2
Luck = 0.05
AttackSpeed = 1.0
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = []
WeaponElement = 0
WeaponTag = 0
Name = "Sealing Rod"
Description = "+2 ATK
A wand fitted with charms said to cleanse and purify that which belongs to other worlds.
It's unaligned nature has the power to balance all that it comes into contact with, should the wielder have the will."
Texture = ExtResource("1_wiylj")
SpawnRate = 0.5
BonusAttack = 2
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
HealHPAmount = 0
HealVTAmount = 0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_wiylj")

View File

@@ -1,20 +1,22 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://dj6i0em2a3hj8"]
[ext_resource type="Texture2D" uid="uid://cixq2naufiuhv" path="res://src/items/weapons/textures/spaded staff.PNG" id="1_6tifm"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="2_w4n0u"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="2_w4n0u"]
[resource]
script = ExtResource("2_w4n0u")
Damage = 5
Luck = 0.1
AttackSpeed = 0.75
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = []
WeaponElement = 0
WeaponTag = 0
Name = "Monk's Spade"
Description = "+5 ATK, Slow"
Texture = ExtResource("1_6tifm")
SpawnRate = 0.3
BonusAttack = 5
Defense = 0
Luck = 0.1
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_6tifm")

View File

@@ -5,21 +5,21 @@
[resource]
script = ExtResource("1_cik6n")
Damage = 12
Luck = 0.05
AttackSpeed = 1.25
WeaponElement = 0
ElementalDamageBonus = 1.0
WeaponTag = 0
WeaponTag = 2
Name = "Swan Sword Odette"
Description = "+12 ATK
Ignores Affinity.
The blade of a thousand faced heroine."
Texture = ExtResource("1_qc4eu")
SpawnRate = 0.01
BonusAttack = 12
Defense = 0
Luck = 0.05
ThrowSpeed = 12.0
HealHPAmount = 0
HealVTAmount = 0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_qc4eu")

View File

@@ -1,20 +1,22 @@
[gd_resource type="Resource" script_class="WeaponStats" load_steps=3 format=3 uid="uid://bs01dnjkcmi7a"]
[ext_resource type="Texture2D" uid="uid://d02gqi3icdp8l" path="res://src/items/weapons/textures/talwar.PNG" id="1_8a832"]
[ext_resource type="Script" path="res://src/items/weapons/WeaponStats.cs" id="2_a7ln4"]
[ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="2_a7ln4"]
[resource]
script = ExtResource("2_a7ln4")
Damage = 3
Luck = 0.07
AttackSpeed = 1.0
TelluricDamageBonus = 0.0
AeolicDamageBonus = 0.0
BaseHydricDamageBonus = 0.0
IgneousDamageBonus = 0.0
FerrumDamageBonus = 0.0
WeaponTags = []
WeaponElement = 0
WeaponTag = 0
Name = "Talwar"
Description = "+3 ATK"
Texture = ExtResource("1_8a832")
SpawnRate = 0.3
BonusAttack = 3
Defense = 0
Luck = 0.07
ThrowSpeed = 12.0
IncreaseMaxHPAmount = 0
IncreaseMaxVTAmount = 0
ThrowDamage = 5
ItemTag = 0
Texture = ExtResource("1_8a832")