Flesh out acid as a real damage type

This commit is contained in:
2025-05-08 18:17:18 -05:00
parent 01608064f2
commit 005d40806c
12 changed files with 54 additions and 28 deletions

View File

@@ -68,7 +68,7 @@ TEST_CASE("Initialization sanity test for monster") {
CHECK(monst.abil.empty());
CHECK(monst.corpse_item == 0);
CHECK(monst.corpse_item_chance == 0);
CHECK(monst.resist.size() == 10);
CHECK(monst.resist.size() == 11);
CHECK(monst.resist[eDamageType::WEAPON] == 100);
CHECK(monst.resist[eDamageType::FIRE] == 100);
CHECK(monst.resist[eDamageType::POISON] == 100);
@@ -77,6 +77,7 @@ TEST_CASE("Initialization sanity test for monster") {
CHECK(monst.resist[eDamageType::UNBLOCKABLE] == 100);
CHECK(monst.resist[eDamageType::UNDEAD] == 100);
CHECK(monst.resist[eDamageType::DEMON] == 100);
CHECK(monst.resist[eDamageType::ACID] == 100);
CHECK(monst.resist[eDamageType::MARKED] == 100);
CHECK_FALSE(monst.mindless);
CHECK_FALSE(monst.invuln);

View File

@@ -132,7 +132,8 @@ TEST_CASE("Saving monster types") {
scen.scen_monsters[1].resist[eDamageType::COLD] = 30;
scen.scen_monsters[1].resist[eDamageType::UNDEAD] = 35;
scen.scen_monsters[1].resist[eDamageType::DEMON] = 40;
scen.scen_monsters[1].resist[eDamageType::SPECIAL] = 45;
scen.scen_monsters[1].resist[eDamageType::ACID] = 45;
scen.scen_monsters[1].resist[eDamageType::SPECIAL] = 50;
in_and_out("resistance", scen);
CHECK(scen.scen_monsters[1].resist[eDamageType::WEAPON] == 5);
CHECK(scen.scen_monsters[1].resist[eDamageType::FIRE] == 10);
@@ -142,6 +143,7 @@ TEST_CASE("Saving monster types") {
CHECK(scen.scen_monsters[1].resist[eDamageType::COLD] == 30);
CHECK(scen.scen_monsters[1].resist[eDamageType::UNDEAD] == 35);
CHECK(scen.scen_monsters[1].resist[eDamageType::DEMON] == 40);
CHECK(scen.scen_monsters[1].resist[eDamageType::ACID] == 45);
// This one should not be saved, so we expect it to revert to default
CHECK(scen.scen_monsters[1].resist[eDamageType::SPECIAL] == 100);
}