Skip to content

Commit

Permalink
don't update some spells when adding to CT
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Jan 20, 2024
1 parent 0c26911 commit af79caa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Most features of this extension require the [PFRPG - Spellbook](https://www.fant
# Features
This extension replaces NPC spell actions with those from [PFRPG - Spellbook](https://www.fantasygrounds.com/forums/showthread.php?58962-PFRPG-Spellbook).
Spell actions replacement occurs automatically when the NPC is added to the combat tracker.
Spells whose names include `[LOCK]`, `(Mythic)`, or any parenthetical starting with `Mythic` -- such as `(Mythic Augmented 3rd)` -- will have their spell data left as-is.

To update a spell with the latest improvements from [PFRPG - Spellbook](https://www.fantasygrounds.com/forums/showthread.php?58962-PFRPG-Spellbook), right-click the spell and click "reparse".
The spell will be deleted and re-added with the latest information.
Expand Down
4 changes: 2 additions & 2 deletions extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Please see the LICENSE.md file included with this distribution for attribution and copyright information. -->
<properties>
<name>Feature: Upgrade NPC Actions</name>
<version>1.25</version>
<version>1.26</version>
<author>bmos (Wil Thieme)</author>
<description>This extension replaces NPC spell effects and descriptions with those from the 'PFRPG - Spellbook' module, links maladies from PFRPG - Maladies Library, and adds tooltips to the built-in conditions.</description>
<ruleset>
Expand All @@ -15,7 +15,7 @@
<loadorder>51</loadorder>
</properties>

<announcement text="https://www.fantasygrounds.com/forums/showthread.php?63620-PFRPG-Upgrade-NPC-Actions-Extension\nUpgrade NPC Actions v1.25-hotfix.7:\nThis extension replaces NPC spell effects and descriptions with those from the 'PFRPG - Spellbook' module, links maladies from PFRPG - Maladies Library, and adds tooltips to the built-in conditions." font="emotefont" icon="module_loaded" />
<announcement text="https://www.fantasygrounds.com/forums/showthread.php?63620-PFRPG-Upgrade-NPC-Actions-Extension\nUpgrade NPC Actions v1.26:\nThis extension replaces NPC spell effects and descriptions with those from the 'PFRPG - Spellbook' module, links maladies from PFRPG - Maladies Library, and adds tooltips to the built-in conditions." font="emotefont" icon="module_loaded" />

<base>
<!-- Scripts -->
Expand Down
6 changes: 5 additions & 1 deletion scripts/UNPC_upgradespells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ local function find_spell_nodes(nodeEntry)
for _, nodeSpell in ipairs(DB.getChildList(nodeSpellLevel, 'spells')) do
--Debug.chat(type(nodeSpell))
if DB.getType(nodeSpell) == 'node' and type(nodeSpell) ~= 'error' then
replace_spell_actions(nodeSpell)
local sSpellName = DB.getValue(nodeSpell, 'name', '')
if not string.find(sSpellName, '[LOCK]') and not string.match(sSpellName, '%(Mythic.*%)') then
replace_spell_actions(nodeSpell)
end
--Debug.console('nodeSpell', nodeSpell)
--else
--Debug.console('nodeSpell', nodeSpell)
--Debug.console('nodeSpell.getType', DB.getType(nodeSpell))
Expand Down

0 comments on commit af79caa

Please sign in to comment.