From a29ab970db4ecd74e498e4dbd359a9bfc2c6fba5 Mon Sep 17 00:00:00 2001 From: Admin-Yukiko Date: Sun, 11 Feb 2024 14:40:14 -0600 Subject: [PATCH] Added comments to :magery:spellStarter.src documenting how I want to add prevention of casting conflicting spells. Added path for commands in the devpkg/commands directory to /config/cmds.cfg. --- config/cmds.cfg | 1 + pkg/skills/magery/spellStarter.src | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/config/cmds.cfg b/config/cmds.cfg index 471068364..46edd3b5f 100644 --- a/config/cmds.cfg +++ b/config/cmds.cfg @@ -61,4 +61,5 @@ CmdLevel Test { DIR scripts/textcmd/test DIR pkg/commands/test + DIR devpkg/devcommands/commands/test } diff --git a/pkg/skills/magery/spellStarter.src b/pkg/skills/magery/spellStarter.src index c4fb93dbb..8b12dccaa 100644 --- a/pkg/skills/magery/spellStarter.src +++ b/pkg/skills/magery/spellStarter.src @@ -338,7 +338,7 @@ endfunction // // Parameter: mobile::mobileref, current_spell::string // -// Returns: The a string, the conflicting spell name or an empty string if +// Returns: The string, the conflicting spell name or an empty string if // no conflicts were found for the current spell being cast. // // Created: 2023-05-16 01:29:14 by Yukiko @@ -355,12 +355,19 @@ function ConflictsCheck( byref mobile, byref spell_id ) var current_spell := current_spell_elem.Name; var conlicting_spells := current_spell_elem.Conflicts; var conflicts := SplitWords( conlicting_spells ); - // var temp := spell_id in - var conflicting_spell := conflicts; + var conlicting_spells_names := {}; + var temp := CStr(spell_id) in conflicts; + var running_timers := TS_GetTimerNames(mobile); + // Added the following on 2024-02-06 + // foreach spell in conflicts + // Get spell_name of conflicting spell. + // Check against running timers. + // If spell_name in running_timers. + // return spell_name. + // endforeach + // return ""; - - MS_GetSpellsCfgElem(spell_id); if( current_spell == "Incognito" && GetObjProperty( mobile, "Polymorphed" ) ) return "Polymorph"; elseif( current_spell == "Polymorph" && GetObjProperty( mobile, "Incognito" ) ) @@ -368,6 +375,5 @@ function ConflictsCheck( byref mobile, byref spell_id ) else return ""; endif - // return conflicting_spell_name; // NecroHBeast endfunction \ No newline at end of file