Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip ossifier and bala's axe enchantment warning on ee games, remove …
…outdated aegis exclusion
- Loading branch information
1 parent
0e703ae
commit 9908339
Showing
1 changed file
with
13 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
READ_BYTE 0x18 flags //need only bit 6 | ||
READ_SHORT 0x1c type | ||
READ_BYTE 0x31 proficiency | ||
READ_LONG 0x60 enchantment | ||
magic_flag = (flags BAND 0b01000000) >> 6 | ||
READ_LONG ITM_flags flags | ||
READ_SHORT ITM_type type | ||
READ_BYTE ITM_weapon_proficiency proficiency | ||
READ_LONG ITM_enchantment enchantment | ||
|
||
magic_flag = flags BAND BIT6 | ||
|
||
PATCH_IF (enchantment != 0 AND magic_flag = 0) AND VARIABLE_IS_SET $item_type(~%type%~) BEGIN | ||
PATCH_PRINT ~HI60: %SOURCE_FILE% - magic flag %magic_flag% and enchantment level %enchantment% are inconsistent. Setting magic flag.~ | ||
new_flags = flags BOR 0b01000000 | ||
WRITE_BYTE 0x18 new_flags | ||
PATCH_PRINT ~HI60: %SOURCE_FILE% - magical flag bit 6 and enchantment level %enchantment% are inconsistent. Setting magic flag.~ | ||
new_flags = flags BOR BIT6 | ||
WRITE_LONG ITM_flags new_flags | ||
END | ||
PATCH_IF enchantment = 0 | ||
AND magic_flag != 0 | ||
AND VARIABLE_IS_SET $item_type(~%type%~) | ||
AND NOT (~%SOURCE_FILE%~ STR_EQ ~aegis.itm~) | ||
AND NOT (~%SOURCE_FILE%~ STR_EQ ~aegis2.itm~) // skip aegis for now, see https://github.com/Gibberlings3/BG2-Fixpack/pull/7 | ||
AND NOT (GAME_IS "bg2ee eet" AND (~%SOURCE_FILE%~ STR_EQ ~ax1h07.itm~)) // bala's axe | ||
AND NOT (GAME_IS "bgee eet sod" AND (~%SOURCE_FILE%~ STR_EQ ~staf25.itm~)) // ossifier | ||
BEGIN | ||
PATCH_PRINT ~HI61: %SOURCE_FILE% - magic flag %magic_flag% and enchantment level %enchantment% are inconsistent.~ | ||
PATCH_PRINT ~HI61: %SOURCE_FILE% - magical flag bit 6 and enchantment level %enchantment% are inconsistent.~ | ||
END |