Skip to content
Permalink
Browse files

TomeAndBlood v0.6 - added subtledoctor's Oct 25 2016 hotfix from http…

  • Loading branch information...
agb1 committed Dec 8, 2016
1 parent 53db7a9 commit aa0018fbc9f44944b018992f53690c9ae42f7fea
@@ -0,0 +1,10 @@
--- TomeAndBlood/SetUp-TomeAndBlood.tp2 2016-02-19 18:22:59.430633400 -0500
+++ Fixpack/TomeAndBlood/SetUp-TomeAndBlood.tp2 2016-12-07 19:02:14.953385400 -0500
@@ -1,6 +1,6 @@
BACKUP ~TomeAndBlood/backup~
AUTHOR ~aquadrizzt@gmail.com~
-VERSION ~0.6~
+VERSION ~0.6 + subtledoctor's Oct 25 2016 hotfix~

/* Language Settings */
AUTO_TRA ~TomeAndBlood/tra/%s~
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,273 @@

DEFINE_PATCH_FUNCTION patch_add_hla
STR_VAR
2da_row = ~1~
ability = ~*~
icon = ~*~
strref = ~*~
min_lev = ~1~
max_level = ~99~
num_allowed = ~*~
prerequisite = ~*~
excluded_by = ~*~
alignment_restrict = ~*~
BEGIN
COUNT_2DA_COLS cols // amount of columns
COUNT_2DA_ROWS cols rows // amount of rows
READ_2DA_ENTRIES_NOW file cols // read all file into memory
first_empty_row = rows // default value to amount of rows in order to skip removal if the table is full
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
SET empty_col_count = 0 // amount of empty columns in the row
FOR (j = 0; j < cols; ++j) BEGIN // iterate over columns in the row
READ_2DA_ENTRY_FORMER file i j col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL "*" BEGIN // asterisk symbolizes empty column
empty_col_count += 1
END
END
PATCH_IF "%empty_col_count%" = ("%cols%" - 1) BEGIN // first column in every row is its number, that's why (cols - 1)
first_empty_row = i // remember the first empty row
i = file // skip iterating over the rest of the rows
END
END
INSERT_2DA_ROW ("%first_empty_row%") %cols% ~%2da_row% %ability% %icon% %strref% %min_lev% %max_level% %num_allowed% %prerequisite% %excluded_by% %alignment_restrict%~
PRETTY_PRINT_2DA
END


DEFINE_PATCH_FUNCTION patch_remove_hla
STR_VAR
remove_ability = ~*~
BEGIN
COUNT_2DA_COLS cols // amount of columns
COUNT_2DA_ROWS cols rows // amount of rows
READ_2DA_ENTRIES_NOW file cols // read all file into memory
SET num_deleted = 0
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER file i 1 col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL_CASE "%remove_ability%" BEGIN // match .spl to be removed
REMOVE_2DA_ROW (i - num_deleted) cols // kill the row
SET num_deleted += 1
END
END
END


DEFINE_PATCH_FUNCTION patch_replace_hla
STR_VAR
remove_ability = ~*~
2da_row = ~1~
ability = ~*~
icon = ~*~
strref = ~*~
min_lev = ~1~
max_level = ~99~
num_allowed = ~*~
prerequisite = ~*~
excluded_by = ~*~
alignment_restrict = ~*~
BEGIN
COUNT_2DA_COLS cols // amount of columns
COUNT_2DA_ROWS cols rows // amount of rows
READ_2DA_ENTRIES_NOW file cols // read all file into memory
SET num_deleted = 0
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER file i 1 col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL_CASE "%remove_ability%" BEGIN // match .spl to be removed
REMOVE_2DA_ROW (i - num_deleted) cols // kill the row
SET num_deleted += 1
END
END
PATCH_IF NOT num_deleted = 0 BEGIN
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
SET empty_col_count = 0 // amount of empty columns in the row
FOR (j = 0; j < cols; ++j) BEGIN // iterate over columns in the row
READ_2DA_ENTRY_FORMER file i j col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL "*" BEGIN // asterisk symbolizes empty column
empty_col_count += 1
END
END
PATCH_IF "%empty_col_count%" = ("%cols%" - 1) BEGIN // first column in every row is its number, that's why (cols - 1)
first_empty_row = i // remember the first empty row
i = file // skip iterating over the rest of the rows
END
END
INSERT_2DA_ROW ("%first_empty_row%" - 1) %cols% ~%2da_row% %ability% %icon% %strref% %min_lev% %max_level% %num_allowed% %prerequisite% %excluded_by% %alignment_restrict%~
END
PRETTY_PRINT_2DA
END


DEFINE_ACTION_FUNCTION get_hla_table
STR_VAR
kit_name = ~~
RET
hla_table
BEGIN
COPY_EXISTING ~luabbr.2da~ ~override~
READ_2DA_ENTRIES_NOW file 2 // read all file into memory
FOR (row = 1; row < file; row += 1) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER ~file~ row 0 kit
READ_2DA_ENTRY_FORMER ~file~ row 1 table
TEXT_SPRINT $d5_hla_tables(~%kit%~) ~%table%~
END
BUT_ONLY
ACTION_PHP_EACH d5_hla_tables AS ind => tab BEGIN
ACTION_IF ~%ind%~ STRING_EQUAL_CASE ~%kit_name%~ BEGIN
OUTER_TEXT_SPRINT hla_table ~%tab%~
END
END
END


DEFINE_ACTION_FUNCTION action_add_hla
STR_VAR
kit_name = ~~
2da_row = ~1~
ability = ~*~
icon = ~*~
strref = ~*~
min_lev = ~1~
max_level = ~99~
num_allowed = ~*~
prerequisite = ~*~
excluded_by = ~*~
alignment_restrict = ~*~
BEGIN
COPY_EXISTING ~luabbr.2da~ ~override~
COUNT_2DA_COLS l_cols // amount of columns
READ_2DA_ENTRIES_NOW l_rows l_cols // read all file into memory
FOR (l_row = 1; l_row < l_rows; ++l_row) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER l_rows l_row 0 ~l_kit~ // read column value
PATCH_IF ~%l_kit%~ STRING_EQUAL_CASE ~%kit_name%~ BEGIN
SET lu_row = %l_row%
READ_2DA_ENTRY_FORMER l_rows lu_row 1 ~l_table~ // read column value
END
END
BUT_ONLY
ACTION_IF FILE_EXISTS_IN_GAME ~lu%l_table%.2da~ BEGIN
COPY_EXISTING ~lu%l_table%.2da~ ~override/lud5_%lu_row%.2da~
COUNT_2DA_COLS cols // amount of columns
COUNT_2DA_ROWS cols rows // amount of rows
READ_2DA_ENTRIES_NOW file cols // read all file into memory
first_empty_row = rows // default value to amount of rows in order to skip removal if the table is full
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
SET empty_col_count = 0 // amount of empty columns in the row
FOR (j = 0; j < cols; ++j) BEGIN // iterate over columns in the row
READ_2DA_ENTRY_FORMER file i j col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL "*" BEGIN // asterisk symbolizes empty column
empty_col_count += 1
END
END
PATCH_IF "%empty_col_count%" = ("%cols%" - 1) BEGIN // first column in every row is its number, that's why (cols - 1)
first_empty_row = i // remember the first empty row
i = file // skip iterating over the rest of the rows
END
END
INSERT_2DA_ROW ("%first_empty_row%") %cols% ~%2da_row% %ability% %icon% %strref% %min_lev% %max_level% %num_allowed% %prerequisite% %excluded_by% %alignment_restrict%~
PRETTY_PRINT_2DA
ACTION_IF NOT (~%l_table%~ STRING_EQUAL_CASE ~d5_%lu_row%~) BEGIN
COPY_EXISTING ~LUABBR.2DA~ ~override~
SET_2DA_ENTRY %lu_row% 1 2 ~d5_%lu_row%~
END
END
END


DEFINE_ACTION_FUNCTION action_remove_hla
STR_VAR
kit_name = ~~
remove_ability = ~*~
BEGIN
COPY_EXISTING ~luabbr.2da~ ~override~
COUNT_2DA_COLS l_cols // amount of columns
READ_2DA_ENTRIES_NOW l_rows l_cols // read all file into memory
FOR (l_row = 1; l_row < l_rows; ++l_row) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER l_rows l_row 0 ~l_kit~ // read column value
PATCH_IF ~%l_kit%~ STRING_EQUAL_CASE ~%kit_name%~ BEGIN
SET lu_row = %l_row%
READ_2DA_ENTRY_FORMER l_rows lu_row 1 ~l_table~ // read column value
END
END
BUT_ONLY
ACTION_IF FILE_EXISTS_IN_GAME ~lu%l_table%.2da~ BEGIN
COPY_EXISTING ~lu%l_table%.2da~ ~override/lud5_%lu_row%.2da~
COUNT_2DA_COLS cols // amount of columns
COUNT_2DA_ROWS cols rows // amount of rows
READ_2DA_ENTRIES_NOW file cols // read all file into memory
SET num_deleted = 0
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER file i 1 col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL_CASE "%remove_ability%" BEGIN // match .spl to be removed
REMOVE_2DA_ROW (i - num_deleted) cols // kill the row
SET num_deleted += 1
END
END
ACTION_IF NOT (~%l_table%~ STRING_EQUAL_CASE ~d5_%lu_row%~) BEGIN
COPY_EXISTING ~LUABBR.2DA~ ~override~
SET_2DA_ENTRY %lu_row% 1 2 ~d5_%lu_row%~
END
END
END

DEFINE_ACTION_FUNCTION action_replace_hla
STR_VAR
kit_name = ~~
remove_ability = ~*~
2da_row = ~1~
ability = ~*~
icon = ~*~
strref = ~*~
min_lev = ~1~
max_level = ~99~
num_allowed = ~*~
prerequisite = ~*~
excluded_by = ~*~
alignment_restrict = ~*~
BEGIN
COPY_EXISTING ~luabbr.2da~ ~override~
COUNT_2DA_COLS l_cols // amount of columns
READ_2DA_ENTRIES_NOW l_rows l_cols // read all file into memory
FOR (l_row = 1; l_row < l_rows; ++l_row) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER l_rows l_row 0 ~l_kit~ // read column value
PATCH_IF ~%l_kit%~ STRING_EQUAL_CASE ~%kit_name%~ BEGIN
SET lu_row = %l_row%
READ_2DA_ENTRY_FORMER l_rows lu_row 1 ~l_table~ // read column value
END
END
BUT_ONLY
ACTION_IF FILE_EXISTS_IN_GAME ~lu%l_table%.2da~ BEGIN
COPY_EXISTING ~lu%l_table%.2da~ ~override/lud5_%lu_row%.2da~
COUNT_2DA_COLS cols // amount of columns
COUNT_2DA_ROWS cols rows // amount of rows
READ_2DA_ENTRIES_NOW file cols // read all file into memory
SET num_deleted = 0
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
READ_2DA_ENTRY_FORMER file i 1 col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL_CASE "%remove_ability%" BEGIN // match .spl to be removed
REMOVE_2DA_ROW (i - num_deleted) cols // kill the row
SET num_deleted += 1
END
END
PATCH_IF NOT num_deleted = 0 BEGIN
FOR (i = 0; i < file; ++i) BEGIN // iterate over rows
SET empty_col_count = 0 // amount of empty columns in the row
FOR (j = 0; j < cols; ++j) BEGIN // iterate over columns in the row
READ_2DA_ENTRY_FORMER file i j col_value // read column value
PATCH_IF "%col_value%" STRING_EQUAL "*" BEGIN // asterisk symbolizes empty column
empty_col_count += 1
END
END
PATCH_IF "%empty_col_count%" = ("%cols%" - 1) BEGIN // first column in every row is its number, that's why (cols - 1)
first_empty_row = i // remember the first empty row
i = file // skip iterating over the rest of the rows
END
END
INSERT_2DA_ROW ("%first_empty_row%" - 1) %cols% ~%2da_row% %ability% %icon% %strref% %min_lev% %max_level% %num_allowed% %prerequisite% %excluded_by% %alignment_restrict%~
END
PRETTY_PRINT_2DA
ACTION_IF NOT (~%l_table%~ STRING_EQUAL_CASE ~d5_%lu_row%~) BEGIN
COPY_EXISTING ~LUABBR.2DA~ ~override~
SET_2DA_ENTRY %lu_row% 1 2 ~d5_%lu_row%~
END
END
END
@@ -0,0 +1,16 @@

backup/0
backup/1
backup/10
backup/11
backup/12
backup/13
backup/2
backup/20
backup/3
backup/4
backup/5
backup/6
backup/7
backup/8
backup/9
@@ -0,0 +1,20 @@
--- TomeAndBlood/tra/english/setup.tra 2016-03-25 19:07:32.533876100 -0400
+++ Fixpack/TomeAndBlood/tra/english/setup.tra 2016-12-07 18:54:07.418584200 -0500
@@ -1493,9 +1493,15 @@
By means of a Ray of Enfeeblement, a wizard launches a magical attack against the vitality of an opponent, reducing its Strength and thereby the attacks that rely upon it. The victim's Strength score is automatically reduced by 4 points for the duration of the spell. Additionally, if the target fails a saving throw vs. Death, the Strength penalty is doubled to -8, and the victim suffers the effects of a Slow spell (half movement rate and -4 penalties to thac0 and AC). These effects last for 1 turn.~
@6351 = ~Contingency~
@6352 = ~Contingency
-Upon using this ability, the wizard is allowed to choose a spell from his repertoire of known spells. One spell level every 3 levels of the caster is allowed (rounded up), up to 7th-level spells at 19th level. Once the spell is chosen, the caster can choose a condition of some kind from the list provided. The starting condition can be anything from reaching 10% of <PRO_HISHER> Hit Points to an enemy being sighted. Once this starting condition is satisfied, the spell that was chosen will be cast automatically.

-For example, a 12th-level wizard could place the spell Stoneskin in a Contingency with the starting condition being "the wizard reaches 50% of his Hit Points." Once the wizard is reduced to 50% max Hit Points or below, Stoneskin would be immediately cast. This requires no action by the wizard, but happens automatically and instantaneously.~
+Upon using this ability, the wizard is allowed to choose a spell from his repertoire of known spells. One spell level every 3 levels of the caster is allowed (rounded up), up to 7th-level spells at 19th level. Once the spell is chosen, the caster can choose a condition of some kind from the list provided. The starting condition can be anything from reaching 10% of Hit Points to an enemy being sighted. Once this starting condition is satisfied, the spell that was chosen will be cast automatically.
+
+For example, a 12th-level wizard could place the spell Stoneskin in a Contingency with the starting condition being "the wizard reaches 50% of his Hit Points." Once the wizard is reduced to 50% max Hit Points or below, Stoneskin would be immediately cast. This requires no action by the wizard, but happens automatically and instantaneously.
+~
+@6353 = ~Chain Contingency~
+@6354 = ~Chain Contingency
+
+Chain Contingency channels some of the magical energy of the wizard and releases it only under certain circumstances. The wizard chooses three spells that will be released under certain conditions, such as being hit by an enemy. When this condition occurs, all three spells are cast immediately. Spells of 8th level or lower may be used in the contingency.~
@6501 = ~This is Edwin's birthright, inlaid with his family stone.

STATISTICS:

0 comments on commit aa0018f

Please sign in to comment.
You can’t perform that action at this time.