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

@@ -7,9 +7,9 @@ namespace Zennysoft.Ma.Adapter.Entity
[Save("elemental_resist_set")]
public Dictionary<ElementType, double> ElementalResistance { get; }
public static ElementalResistanceSet None => new ElementalResistanceSet(0, 0, 0, 0, 0);
public static ElementalResistanceSet None => new ElementalResistanceSet(0, 0, 0, 0, 0, 0);
public ElementalResistanceSet(double aeolicResistance, double hydricResistance, double igneousResistance, double ferrumResistance, double telluricResistance)
public ElementalResistanceSet(double aeolicResistance, double hydricResistance, double igneousResistance, double ferrumResistance, double telluricResistance, double holyResistance)
{
ElementalResistance = new Dictionary<ElementType, double>
{
@@ -19,6 +19,8 @@ namespace Zennysoft.Ma.Adapter.Entity
{ ElementType.Igneous, igneousResistance },
{ ElementType.Ferrum, ferrumResistance },
{ ElementType.Telluric, telluricResistance },
{ ElementType.Holy, holyResistance },
{ ElementType.All, aeolicResistance + hydricResistance + igneousResistance + ferrumResistance + telluricResistance + holyResistance },
};
}
@@ -29,7 +31,8 @@ namespace Zennysoft.Ma.Adapter.Entity
left.ElementalResistance[ElementType.Hydric] + right.ElementalResistance[ElementType.Hydric],
left.ElementalResistance[ElementType.Igneous] + right.ElementalResistance[ElementType.Igneous],
left.ElementalResistance[ElementType.Ferrum] + right.ElementalResistance[ElementType.Ferrum],
left.ElementalResistance[ElementType.Telluric] + right.ElementalResistance[ElementType.Telluric]);
left.ElementalResistance[ElementType.Telluric] + right.ElementalResistance[ElementType.Telluric],
left.ElementalResistance[ElementType.Holy] + right.ElementalResistance[ElementType.Holy]);
}
}
}