Skip to content

Commit

Permalink
Added comments to :magery:spellStarter.src documenting how I want to …
Browse files Browse the repository at this point in the history
…add prevention of casting conflicting spells.

Added path for commands in the devpkg/commands directory to /config/cmds.cfg.
  • Loading branch information
Admin-Yukiko committed Feb 11, 2024
1 parent 85a0342 commit a29ab97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions config/cmds.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ CmdLevel Test
{
DIR scripts/textcmd/test
DIR pkg/commands/test
DIR devpkg/devcommands/commands/test
}
18 changes: 12 additions & 6 deletions pkg/skills/magery/spellStarter.src
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -355,19 +355,25 @@ 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" ) )
return "Incognito";
else
return "";
endif
// return conflicting_spell_name;
// NecroHBeast
endfunction

0 comments on commit a29ab97

Please sign in to comment.