Finished PRC8 integration

Finished PRC8 integration.  Moved creature abilities to top hak.  Setup tooling.  Created release archive
This commit is contained in:
Jaysyn904
2024-03-12 21:27:23 -04:00
parent 7b9e44ebbb
commit e5b3f6ad61
958 changed files with 1491 additions and 630 deletions

View File

@@ -1,5 +1,6 @@
// WILD MAGIC SYSTEM by Lex
// Adapted to HCR system by Archaegeo
#include "prc_inc_spells"
// Set MATERCOMP to 0 to not use material components for those spells that need.
object oMod=GetModule();
@@ -136,13 +137,13 @@ int NullMagicOverride(object oArea = OBJECT_INVALID,
{
int nModuleState = GetWMState(GetModule());
object oItem = GetItemActivated();
if (oItem == OBJECT_INVALID) oItem = GetSpellCastItem();
if (oItem == OBJECT_INVALID) oItem = PRCGetSpellCastItem();
int nItemState = GetWMState(oItem);
location lTargetLocation;
if (oCaster == OBJECT_INVALID)
{
oCaster = GetLastSpellCaster();
lTargetLocation = GetSpellTargetLocation();
lTargetLocation = PRCGetSpellTargetLocation();
}
if (oCaster == OBJECT_INVALID) {
oCaster = GetItemActivator();
@@ -153,7 +154,7 @@ int NullMagicOverride(object oArea = OBJECT_INVALID,
oCaster = OBJECT_SELF;
lTargetLocation = GetLocation(OBJECT_SELF);
}
if (oTarget == OBJECT_INVALID) oTarget = GetSpellTargetObject();
if (oTarget == OBJECT_INVALID) oTarget = PRCGetSpellTargetObject();
if (oTarget == OBJECT_INVALID) oTarget = GetItemActivatedTarget();
if (oTarget == OBJECT_INVALID) oTarget = oCaster;
if (oArea == OBJECT_INVALID) oArea = GetArea(oCaster);
@@ -190,13 +191,13 @@ int WildMagicOverride(object oArea = OBJECT_INVALID,
{
int nModuleState = GetWMState(GetModule());
object oItem = GetItemActivated();
if (oItem == OBJECT_INVALID) oItem = GetSpellCastItem();
if (oItem == OBJECT_INVALID) oItem = PRCGetSpellCastItem();
int nItemState = GetWMState(oItem);
location lTargetLocation = GetSpellTargetLocation();
location lTargetLocation = PRCGetSpellTargetLocation();
if (oCaster == OBJECT_INVALID)
{
oCaster = GetLastSpellCaster();
lTargetLocation = GetSpellTargetLocation();
lTargetLocation = PRCGetSpellTargetLocation();
}
if (oCaster == OBJECT_INVALID) {
oCaster = GetItemActivator();
@@ -207,7 +208,7 @@ int WildMagicOverride(object oArea = OBJECT_INVALID,
oCaster = OBJECT_SELF;
lTargetLocation = GetLocation(OBJECT_SELF);
}
if (oTarget == OBJECT_INVALID) oTarget = GetSpellTargetObject();
if (oTarget == OBJECT_INVALID) oTarget = PRCGetSpellTargetObject();
if (oTarget == OBJECT_INVALID) oTarget = GetItemActivatedTarget();
if (oTarget == OBJECT_INVALID) oTarget = oCaster;
if (oArea == OBJECT_INVALID) oArea = GetArea(oCaster);
@@ -245,15 +246,15 @@ int WildMagicOverride(object oArea = OBJECT_INVALID,
int GoWild(object oCaster, object oTarget, location lLocation)
{
int nCasterLevel = GetCasterLevel(oCaster);
int nCasterLevel = PRCGetCasterLevel(oCaster);
if (GetLocalInt(OBJECT_SELF, "WILDCASTING"))
{
DeleteLocalInt(OBJECT_SELF, "WILDCASTING");
return 0;
}
int nSpell = GetSpellId();
int nMetaMagic = GetMetaMagicFeat();
int nSpell = PRCGetSpellId();
int nMetaMagic = PRCGetMetaMagicFeat();
int nRoll = d100();
@@ -352,7 +353,7 @@ void RandomCast ()
object oTarget = GetRandomNearby(OBJECT_SELF);
location lLocation = GetLocation(oTarget);
SpecialCast(Random(412), oTarget, lLocation,
GetCasterLevel(OBJECT_SELF), GetMetaMagicFeat());
PRCGetCasterLevel(OBJECT_SELF), PRCGetMetaMagicFeat());
}
object GetRandomNearby(object oTarget=OBJECT_SELF)