Skip to content

Commit

Permalink
usability changes for magus
Browse files Browse the repository at this point in the history
  • Loading branch information
aquadrizzt authored Nov 19, 2017
1 parent 07fd410 commit b27a010
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions TomeAndBlood/comp/setup_magus.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,40 @@ ACTION_PHP_EACH armor AS ind => res BEGIN
END
END
END

//Allow Mages and Sorcerers to equip any weapon/armor/shield/helmet (must still meet class/race/ability/alignment reqs)
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
PATCH_IF (SOURCE_SIZE > 0x71) BEGIN
READ_SHORT 0x31 "prof" ELSE 0
READ_SHORT 0x1c "type" ELSE 0
PATCH_IF ("%prof%" = 89 || //bastard sword
"%prof%" = 90 || //long sword
"%prof%" = 91 || //short sword
"%prof%" = 92 || //axe
"%prof%" = 93 || //2h sword
"%prof%" = 94 || //katana
"%prof%" = 95 || //scimitar
"%prof%" = 97 || //war hammer
"%prof%" = 98 || //spear
"%prof%" = 99 || //halberd
"%prof%" = 100 || //flail/morningstar
"%prof%" = 101 || //mace
"%prof%" = 103 || //xbow
"%prof%" = 104 || //long bow
"%prof%" = 105 || //shortbow
"%prof%" = 115 || //club
"%type%" = 31 || //xbow bolts
"%type%" = 5 || //arrows
"%type%" = 2 || //armor
"%type%" = 7 || //helms
"%type%" = 12) BEGIN //shields
READ_BYTE 0x1e "bard"
READ_BYTE 0x1f "fighter"
PATCH_IF (("%fighter%" BAND "0b00001000") = "0b00000000") BEGIN
READ_BYTE 0x20 "mage"
WRITE_BYTE 0x20 ("%mage%" BAND "0b11111011")
WRITE_BYTE 0x1e ("%bard%" BAND "0b10111111")
END
END
END
BUT_ONLY

0 comments on commit b27a010

Please # to comment.