//:://///////////////////////////////////////////// //:: Malikto (Word of Death) //:: malikto.nss //:: Copyright (c) 2025 WizardryEE Project //::////////////////////////////////////////////// /* Causes 12d6 (12-72) points of damage to all monsters. Level 7 Priest spell. In Wizardry: Proving Grounds of the Mad Overlord, this is a Level 7 Priest attack spell that targets all monsters. */ //::////////////////////////////////////////////// //:: Created By: WizardryEE Project //:: Created On: April 26, 2025 //::////////////////////////////////////////////// void main() { // Spell implementation for WizardryEE // Core functionality: Deal 12d6 damage to all monsters // 1. Get caster information object oCaster = OBJECT_SELF; // 2. Create the word of death visual effect effect eWordVis = EffectVisualEffect(47); // Global death effect location lCaster = GetLocation(oCaster); ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWordVis, lCaster); // 3. Get all enemies in the area object oArea = GetArea(oCaster); object oTarget = GetFirstObjectInArea(oArea); int nEnemiesHit = 0; while (GetIsObjectValid(oTarget)) { // Check if target is a valid enemy // Consider target alive if they're not marked as dead or permanently lost if (GetIsEnemy(oTarget, oCaster) && GetObjectType(oTarget) == OBJECT_TYPE_CREATURE && !GetLocalInt(oTarget, "CONDITION_DEAD") && !GetLocalInt(oTarget, "PERMANENTLY_LOST")) { // Calculate damage int nDamage = d6(12); // 12d6 damage // Create the damage effect effect eDamage = EffectDamage(nDamage, DAMAGE_TYPE_NEGATIVE); effect eVis = EffectVisualEffect(40); // Negative energy visual effect // Signal spell cast at event SignalEvent(oTarget, EventSpellCastAt(oCaster, 39)); // Word of Death spell ID // Apply the visual and damage effects ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oTarget); // Notify damage FloatingTextStringOnCreature("MALIKTO: " + IntToString(nDamage) + " damage to " + GetName(oTarget), oCaster, TRUE); nEnemiesHit++; } // Get next target in area oTarget = GetNextObjectInArea(oArea); } // Final notification if (nEnemiesHit > 0) { FloatingTextStringOnCreature("MALIKTO: Hit " + IntToString(nEnemiesHit) + " enemies!", oCaster, TRUE); } else { FloatingTextStringOnCreature("MALIKTO: No enemies found in range", oCaster, TRUE); } }