Skip to content

Commit

Permalink
6.5
Browse files Browse the repository at this point in the history
fixed thief points at low levels
  • Loading branch information
subtledoctor committed Dec 15, 2023
1 parent 6440894 commit d879de5
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<h1>NPCs Enhanced... um, for Everyone! (a.k.a. NPC_EE)</h1>
<div class="section">
<p><strong> Version 6.4 </strong><br />
<p><strong> Version 6.5 </strong><br />
<strong> Languages:</strong> English</p>
<p><strong>Author: <a href="http://forums.gibberlings3.net/index.php?showuser=6306">The Subtle Doctor</a></strong></p>
<p><strong><a href="https://github.com/UnearthedArcana/NPC_EE">Home page</a></strong></p>
Expand Down
10 changes: 5 additions & 5 deletions npc_ee/data/d5_ckit.baf
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,6 @@ IF
THEN
RESPONSE #100
SetGlobal("D5LV1PRF","GLOBAL",1)
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
Continue()
END
IF
Expand All @@ -1769,6 +1768,7 @@ THEN
RESPONSE #100
ChangeStat(LastSummonerOf(Myself),"LORE",1,SET)
ActionOverride(LastSummonerOf(Myself),ChangeStat(Myself,MAXHITPOINTS,2,SET))
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
ChangeStat(LastSummonerOf(Myself),"SAVEVSDEATH",savedeathrog,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSWANDS",savewandsrog,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSPOLY",savepolyrog,SET)
Expand Down Expand Up @@ -2220,7 +2220,6 @@ IF
THEN
RESPONSE #100
SetGlobal("D5LV1PRF","GLOBAL",1)
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
Continue()
END
IF
Expand Down Expand Up @@ -2254,6 +2253,7 @@ THEN
RESPONSE #100
ChangeStat(LastSummonerOf(Myself),"LORE",1,SET)
ActionOverride(LastSummonerOf(Myself),ChangeStat(Myself,MAXHITPOINTS,2,SET))
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
ChangeStat(LastSummonerOf(Myself),"SAVEVSDEATH",savedeathwar,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSWANDS",savewandswar,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSPOLY",savepolywar,SET)
Expand Down Expand Up @@ -2363,7 +2363,6 @@ IF
THEN
RESPONSE #100
SetGlobal("D5LV1PRF","GLOBAL",1)
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
Continue()
END
IF
Expand Down Expand Up @@ -2397,6 +2396,7 @@ THEN
RESPONSE #100
ChangeStat(LastSummonerOf(Myself),"LORE",1,SET)
ActionOverride(LastSummonerOf(Myself),ChangeStat(Myself,MAXHITPOINTS,2,SET))
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
ChangeStat(LastSummonerOf(Myself),"SAVEVSDEATH",savedeathprs,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSWANDS",savewandsprs,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSPOLY",savepolyprs,SET)
Expand Down Expand Up @@ -2484,7 +2484,6 @@ IF
THEN
RESPONSE #100
SetGlobal("D5LV1PRF","GLOBAL",1)
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
Continue()
END
IF
Expand Down Expand Up @@ -2518,6 +2517,7 @@ THEN
RESPONSE #100
ChangeStat(LastSummonerOf(Myself),"LORE",1,SET)
ActionOverride(LastSummonerOf(Myself),ChangeStat(Myself,MAXHITPOINTS,2,SET))
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
ChangeStat(LastSummonerOf(Myself),"SAVEVSDEATH",savedeathwiz,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSWANDS",savewandswiz,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSPOLY",savepolywiz,SET)
Expand Down Expand Up @@ -2545,7 +2545,6 @@ IF
THEN
RESPONSE #100
SetGlobal("D5LV1PRF","GLOBAL",1)
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
Continue()
END
IF
Expand Down Expand Up @@ -2590,6 +2589,7 @@ THEN
RESPONSE #100
ChangeStat(LastSummonerOf(Myself),"LORE",1,SET)
ActionOverride(LastSummonerOf(Myself),ChangeStat(Myself,MAXHITPOINTS,2,SET))
ActionOverride(LastSummonerOf(Myself),ApplySpellRES("D5CSM8T",Myself))
ChangeStat(LastSummonerOf(Myself),"SAVEVSDEATH",savedeathwiz,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSWANDS",savewandswiz,SET)
ChangeStat(LastSummonerOf(Myself),"SAVEVSPOLY",savepolywiz,SET)
Expand Down
67 changes: 66 additions & 1 deletion npc_ee/lib/semi_spont/semi_misc_functions.tpa
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// v11.5 - fixed Identify for Vancian casting
// v12 - added define_priest_spells function

/*

Expand All @@ -13,6 +13,9 @@ functions in this file:
- semi_armor_casting - line
sets armor to block arcane 5E casting

- define_priest_spells
collects all priest spells and sorts by who gets what

- free_known_spells - line
input a free_spell (can run multiple free_spells for the same list_spell)
outputs a list_spell that adds the free_spells to one's spellbook
Expand Down Expand Up @@ -510,6 +513,68 @@ END // end define function
//__________________________________________________________________________________


DEFINE_ACTION_MACRO define_priest_spells BEGIN

// sorts priest spells by who gets what

COPY_EXISTING ~mxsplpal.2da~ ~override~
COUNT_2DA_COLS cols
PATCH_IF (cols > 1) BEGIN
SET max_lvl_pal = cols
END
BUT_ONLY

COPY_EXISTING ~mxsplran.2da~ ~override~
COUNT_2DA_COLS cols
PATCH_IF (cols > 1) BEGIN
SET max_lvl_ran = cols
END
BUT_ONLY

COPY_EXISTING_REGEXP ~^[Ss][Pp][Pp][Rr][1-7][0-5a-zA-Z][0-9a-zA-Z]\.spl$~ ~override~
PATCH_IF (%SOURCE_SIZE% > 0x71) BEGIN
PATCH_IF !(FILE_CONTAINS_EVALUATED (~hidespl.2da~ ~%SOURCE_RES%~)) BEGIN
READ_SHORT 0x1c spl_typ
READ_LONG 0x34 spl_lvl
PATCH_IF (spl_typ = 2) BEGIN
READ_BYTE 0x21 exclude
PATCH_IF ((exclude BAND 0b11000000) = 0b10000000) BEGIN // valid for clerics
SPRINT $cleric_valid_spells(~%SOURCE_RES%~)~1~
PATCH_IF (spl_lvl <= %max_lvl_pal%) BEGIN
SPRINT $paladin_valid_spells(~%SOURCE_RES%~)~1~
END
END
PATCH_IF ((exclude BAND 0b11000000) = 0b01000000) BEGIN // valid for druids
SPRINT $druid_valid_spells(~%SOURCE_RES%~)~1~
PATCH_IF (spl_lvl <= %max_lvl_ran%) BEGIN
SPRINT $ranger_valid_spells(~%SOURCE_RES%~)~1~
END
END
PATCH_IF ((exclude BAND 0b11000000) = 0b00000000) BEGIN // valid for both
SPRINT $cleric_valid_spells(~%SOURCE_RES%~)~1~
SPRINT $druid_valid_spells(~%SOURCE_RES%~)~1~
PATCH_IF (spl_lvl <= %max_lvl_pal%) BEGIN
SPRINT $paladin_valid_spells(~%SOURCE_RES%~)~1~
END
PATCH_IF (spl_lvl <= %max_lvl_ran%) BEGIN
SPRINT $ranger_valid_spells(~%SOURCE_RES%~)~1~
END
END
PATCH_IF ((exclude BAND 0b11000000) = 0b11000000) BEGIN // valid for neither
SPRINT $shaman_only_spells(~%SOURCE_RES%~)~1~
END
END
END
END
BUT_ONLY

END // end macro


//__________________________________________________________________________________
//__________________________________________________________________________________


DEFINE_ACTION_FUNCTION free_known_spells STR_VAR free_spell = ~~ list_spell = ~~ BEGIN

/*
Expand Down
10 changes: 6 additions & 4 deletions npc_ee/lib/semi_spontaneous.tpa
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

// v11.3
// v11.5 - support DW spells

/*

Expand Down Expand Up @@ -1286,7 +1286,8 @@ ACTION_IF (FILE_EXISTS_IN_GAME ~d5zclons.2da~) BEGIN
BUT_ONLY

ACTION_IF !(FILE_EXISTS_IN_GAME ~d5__spheres.d5~) BEGIN
COPY_EXISTING_REGEXP ~^[Ss][Pp][Pp][Rr][1-7]\([0-4][0-9]\|50\)\.spl$~ ~override~
COPY_EXISTING_REGEXP ~^[Ss][Pp][Pp][Rr][1-7][0-5a-zA-Z][0-9a-zA-Z]\.spl$~ ~override~
PATCH_IF !(FILE_CONTAINS_EVALUATED (~hidespl.2da~ ~%SOURCE_RES%~)) OR !(~%SOURCE_RES%~ STRING_MATCHES_REGEXP ~[Ss][Pp][Pp][Rr][1-7]50~) BEGIN
SET spl_ind = 0
INNER_ACTION BEGIN
ACTION_IF (FILE_CONTAINS_EVALUATED (~d5zclons.2da~ ~%SOURCE_RES%~)) BEGIN
Expand All @@ -1308,6 +1309,7 @@ ACTION_IF (FILE_EXISTS_IN_GAME ~d5zclons.2da~) BEGIN
END
APPEND ~d5zclons.2da~ ~%spl_ind% %SOURCE_RES% %SOURCE_RES% divine no ~ UNLESS ~%SOURCE_RES% %SOURCE_RES%~
END
END
BUT_ONLY
END // end no FnP

Expand Down Expand Up @@ -1596,15 +1598,15 @@ ACTION_IF (FILE_EXISTS_IN_GAME ~d5zclons.2da~) BEGIN
READ_SHORT 0x1c spell_type
READ_BYTE 0x25 spell_school
READ_LONG 0x34 spell_level
PATCH_IF (~%SOURCE_RES%~ STRING_MATCHES_REGEXP ~[Ss][Pp][Ww][Ii][1-9][0-5][0-9]$~ = 0) && (spell_type = 1) && !(spell_school = 10) && !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPWI908~) && !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPWI124~) BEGIN
PATCH_IF (~%SOURCE_RES%~ STRING_MATCHES_REGEXP ~[Ss][Pp][Ww][Ii][1-9][0-5a-zA-Z][0-9a-zA-Z]$~ = 0) && (spell_type = 1) && !(spell_school = 10) && !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPWI908~) && !(~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPWI124~) BEGIN
SNPRINT (0 - 3) spell_num ~%SOURCE_RES%~
PATCH_IF !(FILE_CONTAINS_EVALUATED (~hidespl.2da~ ~%SOURCE_RES%~)) AND !(FILE_CONTAINS_EVALUATED (~d5zclons.2da~ ~%SOURCE_RES%~)) BEGIN
SPRINT $more_sorcerer_spells(~%SOURCE_RES%~) ~1~
END
END
END
BUT_ONLY

ACTION_PHP_EACH more_sorcerer_spells AS sorc_spell => ind BEGIN
ACTION_IF (%ind% > 0) BEGIN
OUTER_SET spl_ind = 0
Expand Down
2 changes: 1 addition & 1 deletion npc_ee/npc_ee.tp2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BACKUP ~weidu_external/backup/npc_ee~
AUTHOR ~SubtleD~

VERSION ~6.4.1~
VERSION ~6.5~
//README ~npc_ee/readme-NPC_EE.html~

ALWAYS
Expand Down
2 changes: 1 addition & 1 deletion npc_ee/readme-NPC_EE.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<h1>NPCs Enhanced... um, for Everyone! (a.k.a. NPC_EE)</h1>
<div class="section">
<p><strong> Version 6.4 </strong><br />
<p><strong> Version 6.5 </strong><br />
<strong> Languages:</strong> English</p>
<p><strong>Author: <a href="http://forums.gibberlings3.net/index.php?showuser=6306">The Subtle Doctor</a></strong></p>
<p><strong><a href="https://github.com/UnearthedArcana/NPC_EE">Home page</a></strong></p>
Expand Down

0 comments on commit d879de5

Please sign in to comment.