Skip to content

Commit b27a010

Browse files
authored
usability changes for magus
1 parent 07fd410 commit b27a010

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

TomeAndBlood/comp/setup_magus.tpa

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,40 @@ ACTION_PHP_EACH armor AS ind => res BEGIN
7171
END
7272
END
7373
END
74+
75+
//Allow Mages and Sorcerers to equip any weapon/armor/shield/helmet (must still meet class/race/ability/alignment reqs)
76+
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
77+
PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
78+
READ_SHORT 0x31 "prof" ELSE 0
79+
READ_SHORT 0x1c "type" ELSE 0
80+
PATCH_IF ("%prof%" = 89 || //bastard sword
81+
"%prof%" = 90 || //long sword
82+
"%prof%" = 91 || //short sword
83+
"%prof%" = 92 || //axe
84+
"%prof%" = 93 || //2h sword
85+
"%prof%" = 94 || //katana
86+
"%prof%" = 95 || //scimitar
87+
"%prof%" = 97 || //war hammer
88+
"%prof%" = 98 || //spear
89+
"%prof%" = 99 || //halberd
90+
"%prof%" = 100 || //flail/morningstar
91+
"%prof%" = 101 || //mace
92+
"%prof%" = 103 || //xbow
93+
"%prof%" = 104 || //long bow
94+
"%prof%" = 105 || //shortbow
95+
"%prof%" = 115 || //club
96+
"%type%" = 31 || //xbow bolts
97+
"%type%" = 5 || //arrows
98+
"%type%" = 2 || //armor
99+
"%type%" = 7 || //helms
100+
"%type%" = 12) BEGIN //shields
101+
READ_BYTE 0x1e "bard"
102+
READ_BYTE 0x1f "fighter"
103+
PATCH_IF (("%fighter%" BAND "0b00001000") = "0b00000000") BEGIN
104+
READ_BYTE 0x20 "mage"
105+
WRITE_BYTE 0x20 ("%mage%" BAND "0b11111011")
106+
WRITE_BYTE 0x1e ("%bard%" BAND "0b10111111")
107+
END
108+
END
109+
END
110+
BUT_ONLY

0 commit comments

Comments
 (0)