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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user