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!

[(BGEE, BG2) Bug] Minor Spell Turning (0813)

CamDawgCamDawg Member, Developer Posts: 3,394
edited August 2012 in Fixed
Minor spell turning is supposed to turn spells of levels 1-4, but was acting a sits big brother and turning spells of levels 1-7.
 // minor spell turning reflecting spells of level 5-7; should only be 1-4
COPY_EXISTING ~spwi522.spl~ ~override~
LAUNCH_PATCH_FUNCTION ~DELETE_SPELL_EFFECT~ INT_VAR
opcode_to_delete = 200 // remove all spell turnings
END
READ_SHORT 0x68 "abil_num"
FOR (index = 1 ; index <= abil_num ; index = index + 1) BEGIN
READ_SHORT ("%abil_off%" + 0x10 + (0x28 * ("%index%" - 1))) "level"
PATCH_IF ("%level%" = 1) BEGIN
SET "level" = 5
END
FOR (index2 = 1 ; index2 < 5 ; index2 = index2 + 1) BEGIN
LAUNCH_PATCH_FUNCTION ~ADD_SPELL_EFFECT~ INT_VAR
opcode = 200 // remove feeblemind
target = 1 // self
power = 5 // power
parameter1 = 4 // absorb 4 spells
parameter2 = "%index2%" // levels 1-4
duration = (18 * "%level%") // 3 rds/level
header = "%index%" // one per header
resist_dispel = 2 // not dispel/bypass MR
insert_point = 0 // add as first effect
END
END
END
BUT_ONLY_IF_IT_CHANGES</pre>

Post edited by Bhryaen on
AndreaColombo

Comments

Sign In or Register to comment.