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] Monster Summoning III

CamDawgCamDawg Member, Developer Posts: 3,394
edited August 2012 in Fixed
Per the description, MSIII has a 60% chance of summoning one creature and 40% for two. When cast at level 9 the percentage is actually 99% for one, 1% for two.
// mon sum iii has wrong probabilities at level 1
COPY_EXISTING ~spwi504.spl~ ~override~
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%" + 0x10 + (0x28 * "%abil_num%")) "min_lev"
PATCH_IF ("%min_lev%" = 1) BEGIN // if first header
READ_SHORT ("%abil_off%" + 0x1e + (0x28 * "%abil_num%")) "abil_fx_num"
READ_SHORT ("%abil_off%" + 0x20 + (0x28 * "%abil_num%")) "abil_fx_idx"
SET "eff" = 3
WHILE ("%abil_fx_num%" > 0) BEGIN
SET "abil_fx_num" = ("%abil_fx_num%" - 1)
READ_SHORT ("%fx_off%" + (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) "opcode"
PATCH_IF (("%opcode%" = 177) AND ("%eff%" = 2)) BEGIN // last eff opcode
WRITE_BYTE ("%fx_off%" + 0x12 + (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) 100 // probability
WRITE_BYTE ("%fx_off%" + 0x13 + (0x30 * ("%abil_fx_idx%" + "%abil_fx_num%"))) 61 // probability
SET "eff" = 0
END ELSE
PATCH_IF (("%opcode%" = 177) AND ("%eff%" = 3)) BEGIN // first or second eff
SET "eff" = ("%eff%" - 1)
END
END
END
END
BUT_ONLY_IF_IT_CHANGES

Post edited by Bhryaen on
AndreaColombo

Comments

Sign In or Register to comment.