//:://///////////////////////////////////////////// //:: Lomilwa (More Light) //:: lomilwa.nss //:: Copyright (c) 2025 WizardryEE Project //::////////////////////////////////////////////// /* More powerful MILWA spell that lasts for the entire expedition, but is terminated in darkness areas. Level 3 Priest spell. In Wizardry: Proving Grounds of the Mad Overlord, this is a Level 3 Priest field/support spell that targets the party. */ //::////////////////////////////////////////////// //:: Created By: WizardryEE Project //:: Created On: April 26, 2025 //::////////////////////////////////////////////// void main() { // Spell implementation for WizardryEE // Core functionality: Create stronger light and reveal secret doors // 1. Get caster information object oCaster = OBJECT_SELF; // 2. Calculate duration (based on caster level) int nCasterLevel = GetLevelByClass(CLASS_TYPE_CLERIC, oCaster); if (nCasterLevel < 1) nCasterLevel = 3; // Minimum level 3 for this spell float fDuration = HoursToSeconds(24); // Lasts for 24 hours (entire expedition) // 3. Create the light effect effect eLight = EffectVisualEffect(59); // Stronger light visual effect effect eVis = EffectVisualEffect(14); // Cast visual effect // 4. Remove any existing light effects // This would typically involve removing any existing light effects // from the MILWA spell if (GetLocalInt(oCaster, "MILWA_ACTIVE") == 1) { DeleteLocalInt(oCaster, "MILWA_ACTIVE"); // The game engine would handle removing the visual effect } // 5. Apply to the caster (light follows the party) ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oCaster); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLight, oCaster, fDuration); // 6. Set the LOMILWA flag SetLocalInt(oCaster, "LOMILWA_ACTIVE", 1); // 7. Reveal secret doors in the area // This would typically involve a search check or revealing // hidden objects in the area around the party object oArea = GetArea(oCaster); object oDoor = GetFirstObjectInArea(oArea); while (GetIsObjectValid(oDoor)) { // If the object is a secret door if (GetObjectType(oDoor) == OBJECT_TYPE_DOOR && GetLocalInt(oDoor, "SECRET_DOOR")) { // Make it visible/discoverable SetLocalInt(oDoor, "REVEALED", TRUE); // Visual effect at door location location lDoor = GetLocation(oDoor); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(14), lDoor); } oDoor = GetNextObjectInArea(oArea); } // 8. Notify the caster FloatingTextStringOnCreature("LOMILWA: Enhanced light spell active for 24 hours!", oCaster, TRUE); }