Wieldable/two-handed weapons (#4554)
* wielding kinda works * rough out all the edges, wielding works nicely * popups + loc * increase damage & extra damage against whitelist * small fixes * forgot to actually do that * reviews * reviews + thing * use resistances and not extradamageagainstwhitelist * slashy * make increasedamageonwield and melee hit events work with modifiersets * Silly individual
This commit is contained in:
@@ -183,6 +183,24 @@ namespace Content.Shared.Damage
|
||||
return newDamage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reduce (or increase) damages by applying multiple modifier sets.
|
||||
/// </summary>
|
||||
/// <param name="damageSpec"></param>
|
||||
/// <param name="modifierSets"></param>
|
||||
/// <returns></returns>
|
||||
public static DamageSpecifier ApplyModifierSets(DamageSpecifier damageSpec, IEnumerable<DamageModifierSet> modifierSets)
|
||||
{
|
||||
DamageSpecifier newDamage = new(damageSpec);
|
||||
foreach (var set in modifierSets)
|
||||
{
|
||||
// this is probably really inefficient. just don't call this in a hot path I guess.
|
||||
newDamage = ApplyModifierSet(newDamage, set);
|
||||
}
|
||||
|
||||
return newDamage;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove any damage entries with zero damage.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user