From: <ma...@us...> - 2006-11-30 02:43:50
|
Update of /cvsroot/exult/./exult/content/bgkeyring/src/spells In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv14393/content/bgkeyring/src/spells Modified Files: eighth_circle.uc fifth_circle.uc first_circle.uc fourth_circle.uc linear_spells.uc npc_spells.uc second_circle.uc seventh_circle.uc sixth_circle.uc spell_ai.uc spell_functions.uc third_circle.uc Log Message: * Updating Keyring mod to incorporate some additions to UCC, as well as a new sprite and gump for Mariah and several bugfixes. Index: eighth_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/eighth_circle.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- eighth_circle.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ eighth_circle.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -27,12 +27,12 @@ /* Eighth circle Spells - extern spellDeathVortex (); + extern spellDeathVortex (var target); extern spellInvisibilityAll (); extern spellMassDeath (); - extern spellResurrect (); + extern spellResurrect (var target); extern spellSummon (); - extern spellSwordStrike (); + extern spellSwordStrike (var target); extern spellTimeStop (); extern spellMassResurrect (); */ @@ -224,7 +224,7 @@ if (event == DOUBLECLICK) { halt_scheduled(); - item_say("Kal Vas Xen"); + item_say("@Kal Vas Xen@"); if (inMagicStorm()) { script item Index: fifth_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/fifth_circle.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fifth_circle.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ fifth_circle.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -29,13 +29,13 @@ /* Fifth circle Spells - extern spellCharm (); + extern spellCharm (var target); extern spellDance (); - extern spellDispelField (); - extern spellExplosion (); - extern spellFireField (); - extern spellGreatHeal (); - extern spellInvisibility (); + extern spellDispelField (var target); + extern spellExplosion (var target); + extern spellFireField (var target); + extern spellGreatHeal (var target); + extern spellInvisibility (var target); extern spellMassSleep (); extern spellSummonSkeletons (); */ @@ -332,7 +332,7 @@ if (event == DOUBLECLICK) { halt_scheduled(); - item_say("Kal Corp Xen"); + item_say("@Kal Corp Xen@"); if (inMagicStorm()) { script item Index: first_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/first_circle.uc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- first_circle.uc 26 Sep 2006 23:10:27 -0000 1.5 +++ first_circle.uc 30 Nov 2006 02:43:42 -0000 1.6 @@ -31,7 +31,7 @@ extern spellAwakenAll (); extern spellCreateFood (); - extern spellCure (); + extern spellCure (var target); extern spellDetectTrap (); extern spellGreatDouse (); extern spellGreatIgnite (); Index: fourth_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/fourth_circle.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fourth_circle.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ fourth_circle.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -31,13 +31,13 @@ Fourth circle Spells extern spellConjure (); - extern spellLightning (); + extern spellLightning (var target); extern spellMassCurse (); extern spellReveal (); extern spellSeance (); - extern spellUnlockMagic (); - extern spellRechargeMagic (); - extern spellBlink (); + extern spellUnlockMagic (var target); + extern spellRechargeMagic (var target); + extern spellBlink (var target); */ enum fourth_circle_spells Index: linear_spells.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/linear_spells.uc,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- linear_spells.uc 27 Feb 2006 16:48:27 -0000 1.2 +++ linear_spells.uc 30 Nov 2006 02:43:42 -0000 1.3 @@ -29,14 +29,14 @@ /* Linear Spells - extern spellAwaken (); - extern spellDouse (); + extern spellAwaken (var target); + extern spellDouse (var target); extern spellFireworks (); extern spellGlimmer (); - extern spellIgnite (); + extern spellIgnite (var target); extern spellThunder (); extern spellWeather (); - extern spellDetectCharges (); + extern spellDetectCharges (var target); */ enum linear_spells Index: npc_spells.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/npc_spells.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- npc_spells.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ npc_spells.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -31,368 +31,770 @@ NO_SUCH_SPELL = 3 }; +enum reagents +{ + BLACK_PEARL = 0, + BLOOD_MOSS = 1, + NIGHTSHADE = 2, + MANDRAKE_ROOT = 3, + GARLIC = 4, + GINSENG = 5, [...1542 lines suppressed...] + case NOT_ENOUGH_REAGENTS: + npc->item_say("Need reagents"); + break; + + case NOT_ENOUGH_MANA: + if (casting_return[2]) + npc->item_say("Can't cast"); + else + npc->item_say("Must rest"); + break; + default: + //This should never happen... + npc->item_say("No spell"); } - else if (casting_result == NO_SUCH_SPELL) - //This should never happen... - npc->item_say("No spell"); } npcCastHealing (var npc, var talk_cast, var talk, var healing_spells) Index: second_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/second_circle.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- second_circle.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ second_circle.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -27,13 +27,13 @@ /* Second circle Spells - extern spellDestroyTrap (); - extern spellEnchant (); - extern spellFireBlast (); + extern spellDestroyTrap (var target); + extern spellEnchant (var target); + extern spellFireBlast (var target); extern spellGreatLight (); extern spellMassCure (); - extern spellProtection (); - extern spellTelekinesis (); + extern spellProtection (var target); + extern spellTelekinesis (var target); extern spellWizardEye (); */ Index: seventh_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/seventh_circle.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- seventh_circle.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ seventh_circle.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -29,11 +29,11 @@ /* Seventh circle Spells - extern spellCreateGold (); - extern spellDeathBolt (); - extern spellDelayedBlast (); - extern spellEnergyField (); - extern spellEnergyMist (); + extern spellCreateGold (var target); + extern spellDeathBolt (var target); + extern spellDelayedBlast (var target); + extern spellEnergyField (var target); + extern spellEnergyMist (var target); extern spellMassCharm (); extern spellMassMight (); extern spellRestoration (); Index: sixth_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/sixth_circle.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sixth_circle.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ sixth_circle.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -28,12 +28,12 @@ Sixth circle Spells extern spellCauseFear (); - extern spellClone (); - extern spellFireRing (); + extern spellClone (var target); + extern spellFireRing (var target); extern spellFlameStrike (); extern spellMagicStorm (); - extern spellPoisonField (); - extern spellSleepField (); + extern spellPoisonField (var target); + extern spellSleepField (var target); extern spellTremor (); */ @@ -388,45 +388,39 @@ while (counter < duration) { var rand = UI_die_roll(0, 8); - var randusecodearray; - var randopcode; - if (rand >= 6) - //Get one of the four cardinal directions: - randopcode = (0x30 + directions[UI_get_random(4)]); - if (rand == 0) - randusecodearray = [SCRIPT_NPC_FRAME + KNEEL, SCRIPT_NPC_FRAME + LEAN, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { actor frame KNEEL; actor frame LEAN; + actor frame STAND;}; else if (rand == 1) - randusecodearray = [SCRIPT_NPC_FRAME + KNEEL, SCRIPT_NPC_FRAME + STAND, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { actor frame KNEEL; actor frame STAND; + actor frame STAND;}; else if (rand == 2) - randusecodearray = [SCRIPT_NPC_FRAME + LEAN, SCRIPT_NPC_FRAME + LIE, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { actor frame LEAN; actor frame LIE; + actor frame STAND;}; else if (rand == 3) - randusecodearray = [SCRIPT_NPC_FRAME + STAND, SCRIPT_NPC_FRAME + STAND, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { actor frame STAND; actor frame STAND; + actor frame STAND;}; else if (rand == 4) - randusecodearray = [SCRIPT_NPC_FRAME + KNEEL, SCRIPT_NPC_FRAME + USE, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { actor frame KNEEL; actor frame USE; + actor frame STAND;}; else if (rand == 5) - randusecodearray = [SCRIPT_NPC_FRAME + USE, SCRIPT_NPC_FRAME + KNEEL, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { actor frame USE; actor frame KNEEL; + actor frame STAND;}; else if (rand == 6) - randusecodearray = [SCRIPT_FACE_DIR, randopcode, SCRIPT_NPC_FRAME + LEAN, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { face directions[UI_get_random(4)]; + actor frame LEAN; actor frame STAND;}; else if (rand == 7) - randusecodearray = [SCRIPT_FACE_DIR, randopcode, SCRIPT_NPC_FRAME + KNEEL, SCRIPT_NPC_FRAME + STAND]; - + usecodearray << { face directions[UI_get_random(4)]; + actor frame KNEEL; actor frame STAND;}; else if (rand == 8) - randusecodearray = [SCRIPT_FACE_DIR, randopcode, SCRIPT_NPC_FRAME + USE, SCRIPT_NPC_FRAME + STAND]; + usecodearray << { face directions[UI_get_random(4)]; + actor frame USE; actor frame STAND; }; - usecodearray = [usecodearray, randusecodearray]; counter = (counter + 1); } npc->halt_scheduled(); - npc->execute_usecode_array(usecodearray); + npc->run_script(usecodearray); } UI_earthquake((duration * 3)); } Index: spell_ai.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/spell_ai.uc,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- spell_ai.uc 27 Feb 2006 16:48:27 -0000 1.1 +++ spell_ai.uc 30 Nov 2006 02:43:42 -0000 1.2 @@ -274,7 +274,7 @@ { //Queue reentry: script item after 10 ticks - {nohalt; call aiMain;} + { nohalt; call aiMain;} if (get_item_flag(DEAD) || get_item_flag(ASLEEP) || get_item_flag(CHARMED) || get_item_flag(CONFUSION)) @@ -308,7 +308,7 @@ item_shape = spellitem_shapes[i]; break; } - i = i + 1; + i += 1; } //Spellitem missing; leave immediatelly if (count_objects(item_shape, -get_npc_number(), FRAME_ANY) == 0) Index: spell_functions.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/spell_functions.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- spell_functions.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ spell_functions.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -73,7 +73,7 @@ var delay = ((get_distance(lightsource) / 3) + 2); //Call the obj's usecode function after delay ticks: script lightsource after delay ticks - { nohalt; call lightsource->get_usecode_fun(), DOUBLECLICK;} + { nohalt; call lightsource->get_usecode_fun(), DOUBLECLICK;} } } } Index: third_circle.uc =================================================================== RCS file: /cvsroot/exult/./exult/content/bgkeyring/src/spells/third_circle.uc,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- third_circle.uc 27 Aug 2006 19:35:30 -0000 1.3 +++ third_circle.uc 30 Nov 2006 02:43:42 -0000 1.4 @@ -29,15 +29,15 @@ /* Third circle Spells - extern spellCurse (); - extern spellHeal (); - extern spellParalyze (); + extern spellCurse (var target); + extern spellHeal (var target); + extern spellParalyze (var target); extern spellPeer (); - extern spellPoison (); + extern spellPoison (var target); extern spellProtectAll (); - extern spellSleep (); + extern spellSleep (var target); extern spellSwarm (); - extern spellRemoveCurse (); + extern spellRemoveCurse (var target); */ enum third_circle_spells |