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] Destroy gold wild surge

CamDawgCamDawg Member, Developer Posts: 3,394
edited August 2012 in Fixed
The wild surge that destroys gold is supposed to be self-targeted, but instead was affecting the original spell target.
// wild surge: destroy gold is supposed to target self, not present target
COPY_EXISTING ~spwm117.spl~ ~override~
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
READ_LONG 0x64 "abil_off"
READ_SHORT 0x68 "abil_num"
READ_LONG 0x6a "fx_off"
WHILE ("%abil_num%" > 0) BEGIN
SET "abil_num" = ("%abil_num%" - 1)
READ_SHORT ("%abil_off%" + (0x28 * "%abil_num%")) "type"
PATCH_IF ("%type%" = 1) BEGIN // if melee
READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%abil_num%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%abil_num%")) "abil_fx_idx"
WHILE ("%abil_fx_num%" > 0) BEGIN
SET "abil_fx_num" = ("%abil_fx_num%" - 1)
WRITE_BYTE ("%fx_off%" + 0x02 + (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) 1 // target: self
END
END
END
END
BUT_ONLY_IF_IT_CHANGES

Post edited by Bhryaen on
AndreaColombo

Comments

Sign In or Register to comment.