Generalize ResistanceSets into DamageModifierSets (#4619)

* generalize ResistanceSets into DamageModifierSets

* remove unneeded test prototype
This commit is contained in:
mirrorcult
2021-09-15 15:51:13 -07:00
committed by GitHub
parent cd6c2bb373
commit cc52ebb9b5
57 changed files with 131 additions and 112 deletions

View File

@@ -53,14 +53,9 @@ namespace Content.IntegrationTests.Tests.Damageable
- TestDamage3b
- TestDamage3c
- type: resistanceSet
id: testResistances
# this space is intentionally left blank
# This container should not support TestDamage1 or TestDamage2b
- type: damageContainer
id: testDamageContainer
defaultResistanceSet: testResistances
supportedGroups:
- TestGroup3
supportedTypes:
@@ -189,9 +184,9 @@ namespace Content.IntegrationTests.Tests.Damageable
Assert.That(sDamageableComponent.TotalDamage, Is.EqualTo(damageToDeal));
Assert.That(sDamageableComponent.DamagePerGroup[group3.ID], Is.EqualTo(damageToDeal));
// integer rounding. In this case, first member gets 1 less than others.
Assert.That(sDamageableComponent.Damage.DamageDict[type3a.ID], Is.EqualTo(damageToDeal / types.Count()));
Assert.That(sDamageableComponent.Damage.DamageDict[type3a.ID], Is.EqualTo(damageToDeal / types.Count()));
Assert.That(sDamageableComponent.Damage.DamageDict[type3b.ID], Is.EqualTo(1 + damageToDeal / types.Count()));
Assert.That(sDamageableComponent.Damage.DamageDict[type3c.ID], Is.EqualTo(1 + damageToDeal / types.Count()));
Assert.That(sDamageableComponent.Damage.DamageDict[type3c.ID], Is.EqualTo(1 + damageToDeal / types.Count()));
// Heal
sDamageableSystem.TryChangeDamage(uid, -damage);