50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Kalki (Blessings)
|
|
//:: kalki.nss
|
|
//:: Copyright (c) 2025 WizardryEE Project
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Reduces the armor class of all party members by 1
|
|
for the duration of the combat.
|
|
Level 1 Priest spell.
|
|
|
|
In Wizardry: Proving Grounds of the Mad Overlord,
|
|
this is a Level 1 Priest support spell that targets
|
|
the entire party.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: WizardryEE Project
|
|
//:: Created On: April 26, 2025
|
|
//:://////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
// Spell implementation for WizardryEE
|
|
// Core functionality: Reduce AC of all party members by 1
|
|
|
|
// 1. Get all party members
|
|
object oCaster = OBJECT_SELF;
|
|
object oTarget = GetFirstPC();
|
|
|
|
// 2. Calculate duration (based on caster level)
|
|
int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster);
|
|
if (nCasterLevel < 1) nCasterLevel = 1;
|
|
float fDuration = RoundsToSeconds(nCasterLevel);
|
|
|
|
// 3. Create the AC reduction effect
|
|
effect eAC = EffectACDecrease(1); // Reduce AC by 1 (lower AC is better)
|
|
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_HOLY);
|
|
|
|
// 4. Apply to all party members
|
|
while (GetIsObjectValid(oTarget))
|
|
{
|
|
// Apply visual effect
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
|
|
|
// Apply AC reduction for the duration
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oTarget, fDuration);
|
|
|
|
// Get next party member
|
|
oTarget = GetNextPC();
|
|
}
|
|
} |