Added "Removed Files" folder

Added "Removed Files" folder in case we needed to review any of them.
This commit is contained in:
Jaysyn904
2022-10-10 10:39:34 -04:00
parent c1d6da2ed3
commit 151d074880
290 changed files with 55612 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#include "nwnx_race"
#include "nwnx_tests"
void main()
{
WriteTimestampedLogEntry("NWNX_Race unit test begin..");
object oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation());
int iSR = GetSpellResistance(oCreature);
int iSkillRank = GetSkillRank(SKILL_HEAL, oCreature);
int iAC = GetAC(oCreature);
int iImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED);
DestroyObject(oCreature);
NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SRCHARGEN, 10);
NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_SKILL, SKILL_HEAL, 5);
NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_AC, 1);
NWNX_Race_SetRacialModifier(RACIAL_TYPE_ANIMAL, NWNX_RACE_MODIFIER_IMMUNITY, IMMUNITY_TYPE_CURSED);
oCreature = CreateObject(OBJECT_TYPE_CREATURE, "nw_chicken", GetStartingLocation());
int iNewSR = GetSpellResistance(oCreature);
int iNewSkillRank = GetSkillRank(SKILL_HEAL, oCreature);
int iNewAC = GetAC(oCreature);
int iNewImmune = GetIsImmune(oCreature, IMMUNITY_TYPE_CURSED);
DestroyObject(oCreature);
NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SR", iSR == iNewSR - 10);
NWNX_Tests_Report("NWNX_Race", "SetRacialModifier SkillRank", iSkillRank == iNewSkillRank - 5);
NWNX_Tests_Report("NWNX_Race", "SetRacialModifier AC", iAC == iNewAC - 1);
NWNX_Tests_Report("NWNX_Race", "SetRacialModifier Immunity", iImmune != iNewImmune);
WriteTimestampedLogEntry("NWNX_Race unit test end.");
}