Shillelagh fix, Eldritch Knight fix

Shillelagh fix, Eldritch Knight fix
This commit is contained in:
Jaysyn904
2023-08-19 16:33:27 -04:00
parent 371c45c736
commit 8f9e989260
4 changed files with 452 additions and 422 deletions

View File

@@ -346,14 +346,44 @@ int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
fDuration = HoursToSeconds(nDuration);
break;
}
case SPELL_SHILLELAGH:
case SPELL_SHILLELAGH:
{
int nBaseItemType = GetBaseItemType(oMyWeapon);
if (nBaseItemType == BASE_ITEM_QUARTERSTAFF && !GetIsMagicItem(oMyWeapon))
{
// Execute the code for non-magical quarterstaff here
bCondition = bCondition && TRUE; // Update the condition as needed
fDuration = TurnsToSeconds(nDuration);
}
else if (nBaseItemType == BASE_ITEM_CLUB && !GetIsMagicItem(oMyWeapon))
{
// Execute the code for non-magical club here
bCondition = bCondition && TRUE; // Update the condition as needed
fDuration = TurnsToSeconds(nDuration);
}
else
{
// Invalid weapon type, do nothing or handle the error here
bCondition = bCondition && FALSE; // Update the condition as needed
fDuration = 0.0; // Update the duration as needed
}
break;
}
/* case SPELL_SHILLELAGH:
{
bCondition = bCondition && ((GetBaseItemType(oMyWeapon) == BASE_ITEM_QUARTERSTAFF) ||
(GetBaseItemType(oMyWeapon) == BASE_ITEM_CLUB)) &&
!GetIsMagicItem(oMyWeapon);
fDuration = TurnsToSeconds(nDuration);
break;
}
} */
}
if(bCondition)