Item holy and all element implementation, still need to work out some of the math for it

Fix bonus defense for weapons
This commit is contained in:
2026-02-05 10:48:24 -08:00
parent 8a99771491
commit 8ea881edb3
18 changed files with 88 additions and 28 deletions

View File

@@ -41,17 +41,26 @@ public partial class Weapon : EquipableItem
[Save("weapon_element")]
public ElementType WeaponElement => Stats.WeaponElement;
public override ElementalResistanceSet ElementalResistance => new ElementalResistanceSet(Stats.AeolicResistance, Stats.HydricResistance, Stats.IgneousResistance, Stats.FerrumResistance, Stats.TelluricResistance);
public override ElementalResistanceSet ElementalResistance => new ElementalResistanceSet(Stats.AeolicResistance, Stats.HydricResistance, Stats.IgneousResistance, Stats.FerrumResistance, Stats.TelluricResistance, Stats.HolyResistance);
public void IncreaseWeaponAttack(int bonus) => _bonusDamage += bonus;
public void SetWeaponAttack(int newBonus) => _bonusDamage = newBonus;
public void IncreaseWeaponDefense(int bonus) => _bonusDefense += bonus;
public void SetWeaponDefense(int newBonus) => _bonusDefense = newBonus;
public override int BonusAttack { get => Stats.BonusAttack + _bonusDamage; }
public override int BonusDefense { get => Stats.BonusDefense + _bonusDefense; }
[Save("weapon_bonus_damage")]
private int _bonusDamage { get; set; } = 0;
[Save("weapon_bonus_damage")]
private int _bonusDefense { get; set; } = 0;
[Export]
[Save("weapon_stats")]
public WeaponStats Stats { get; set; } = new WeaponStats();