Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Axis & Allies 1942 Online is now available in Early Access! Buy it on Steam. The FAQ is available.
New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

[(BG2) bug] Spell schools for item abilities

CamDawgCamDawg Member, Developer Posts: 3,394
edited November 2012 in Fixed
Just like spells themselves, item abilities can have spell schools and secondary types. For the most part, these are taken from BG2's assignments and applied to BG items:
// match to underlying spell
COPY_EXISTING ~wand10.itm~ ~override~ // wand of monster summoning
READ_LONG 0x64 abil_off
READ_SHORT 0x68 abil_num
FOR (index = 0 ; index < abil_num ; ++index) BEGIN
WRITE_BYTE (abil_off + 0x17 + (index * 0x38)) 2 // school: conjuration
WRITE_BYTE (abil_off + 0x19 + (index * 0x38)) 6 // secondary: conjuration
END
BUT_ONLY

// match to underlying spell
COPY_EXISTING ~ring03.itm~ ~override~ // ring of animal friendship
~wand02.itm~ ~override~ // wand of fear
~wand04.itm~ ~override~ // wand of paralyzation
~wand08.itm~ ~override~ // wand of sleep
READ_LONG 0x64 abil_off
READ_SHORT 0x68 abil_num
FOR (index = 0 ; index < abil_num ; ++index) BEGIN
WRITE_BYTE (abil_off + 0x17 + (index * 0x38)) 4 // school: enchantment
WRITE_BYTE (abil_off + 0x19 + (index * 0x38)) 11 // secondary: disabling
END
BUT_ONLY

// match to underlying spell
COPY_EXISTING ~potn10.itm~ ~override~ // potion of invis
~ring05.itm~ ~override~ // invis ring
READ_LONG 0x64 abil_off
READ_SHORT 0x68 abil_num
FOR (index = 0 ; index < abil_num ; ++index) BEGIN
WRITE_BYTE (abil_off + 0x17 + (index * 0x38)) 5 // school: illusion
WRITE_BYTE (abil_off + 0x19 + (index * 0x38)) 3 // secondary: illusionary protections
END
BUT_ONLY

// match to underlying spell
COPY_EXISTING ~amul15.itm~ ~override~ // shield amulet
READ_LONG 0x64 abil_off
READ_SHORT 0x68 abil_num
FOR (index = 0 ; index < abil_num ; ++index) BEGIN
WRITE_BYTE (abil_off + 0x17 + (index * 0x38)) 6 // school: invocation
WRITE_BYTE (abil_off + 0x19 + (index * 0x38)) 7 // secondary: combat protections
END
BUT_ONLY

// match to underlying spell
COPY_EXISTING ~wand03.itm~ ~override~ // wand of magic missiles
~wand05.itm~ ~override~ // wand of fire
~wand06.itm~ ~override~ // wand of frost
~wand07.itm~ ~override~ // wand of lightning
~wand11.itm~ ~override~ // wand of the heavens
~wand12.itm~ ~override~ // wand of magic missiles
READ_LONG 0x64 abil_off
READ_SHORT 0x68 abil_num
FOR (index = 0 ; index < abil_num ; ++index) BEGIN
WRITE_BYTE (abil_off + 0x17 + (index * 0x38)) 6 // school: invocation
WRITE_BYTE (abil_off + 0x19 + (index * 0x38)) 10 // secondary: offensive damage
END
BUT_ONLY

// match to underlying spell
COPY_EXISTING ~chillt.itm~ ~override~ // chill touch
~ghoult.itm~ ~override~ // ghoul touch
READ_LONG 0x64 abil_off
READ_SHORT 0x68 abil_num
FOR (index = 0 ; index < abil_num ; ++index) BEGIN
WRITE_BYTE (abil_off + 0x17 + (index * 0x38)) 7 // school: necromancy
WRITE_BYTE (abil_off + 0x19 + (index * 0x38)) 7 // secondary: combination
END
BUT_ONLY

// match to underlying spell
COPY_EXISTING ~sgrasp.itm~ ~override~ // shocking grasp
READ_LONG 0x64 abil_off
READ_SHORT 0x68 abil_num
FOR (index = 0 ; index < abil_num ; ++index) BEGIN
WRITE_BYTE (abil_off + 0x17 + (index * 0x38)) 8 // school: transmutation
WRITE_BYTE (abil_off + 0x19 + (index * 0x38)) 10 // secondary: offensive damage
END
BUT_ONLY

Post edited by Tanthalas on
AndreaColombo

Comments

Sign In or Register to comment.