70 lines
2.2 KiB
Plaintext
70 lines
2.2 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Latumofis (Cure Poison)
|
|
//:: latumofis.nss
|
|
//:: Copyright (c) 2025 WizardryEE Project
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Cures poison for a party member.
|
|
Level 4 Priest spell.
|
|
|
|
In Wizardry: Proving Grounds of the Mad Overlord,
|
|
this is a Level 4 Priest healing spell that targets
|
|
one character.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: WizardryEE Project
|
|
//:: Created On: April 26, 2025
|
|
//:://////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
// Spell implementation for WizardryEE
|
|
// Core functionality: Cure poison
|
|
|
|
// 1. Get caster information
|
|
object oCaster = OBJECT_SELF;
|
|
|
|
// 2. Get the target
|
|
object oTarget = GetSpellTargetObject();
|
|
if (!GetIsObjectValid(oTarget))
|
|
{
|
|
// If no specific target, target self
|
|
oTarget = oCaster;
|
|
}
|
|
|
|
// 3. Check if target is valid and is a party member
|
|
if (GetIsObjectValid(oTarget) && !GetIsEnemy(oTarget, oCaster))
|
|
{
|
|
// 4. Check if target is poisoned
|
|
int bPoisoned = GetLocalInt(oTarget, "CONDITION_POISONED");
|
|
|
|
if (bPoisoned)
|
|
{
|
|
// 5. Create the cure effect
|
|
effect eCure = EffectVisualEffect(14); // Healing visual effect
|
|
|
|
// 6. Apply the effects
|
|
// Signal spell cast at event
|
|
SignalEvent(oTarget, EventSpellCastAt(oCaster, 75, FALSE)); // Neutralize Poison spell ID
|
|
|
|
// Remove the poison condition
|
|
DeleteLocalInt(oTarget, "CONDITION_POISONED");
|
|
|
|
// Apply the visual effect
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eCure, oTarget);
|
|
|
|
// 7. Notify the caster
|
|
FloatingTextStringOnCreature("LATUMOFIS: Cured poison for " + GetName(oTarget), oCaster, TRUE);
|
|
}
|
|
else
|
|
{
|
|
// Notify if target is not poisoned
|
|
FloatingTextStringOnCreature(GetName(oTarget) + " is not poisoned.", oCaster, TRUE);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// Notify if no valid target
|
|
FloatingTextStringOnCreature("LATUMOFIS: No valid target found", oCaster, TRUE);
|
|
}
|
|
} |