A
antd
Guest
Yet, here is the disasm of the battle check (PSX NTSC U):You will encounter a random battle if, during a battle check, Rnd(0..255) is
less than [Danger Counter * Enemy Lure Value / 256].
Note that the Enemy Lure Value is a fraction between 2/16ths to 32/16ths, but is only altered
through the presence of Enemy Lure and Enemy Away Materia on your party.
The default value when no such Materia is equipped is 16/16ths or 100%.
Code: [Select]
Code:
lui r4,0x8007lhu r4,0x173c(r4) # load DangerValuelui r3,0x8006lbu r3,0x2f19(r3) # load EnemyLureValue (16)nopmult r4,r3 # DangerValue * EnemyLureValue (24128)andi r2,r2,0xff mflo r3 srl r3,r3,0x0c # (DangerValue * EnemyLureValue) / 4096sltu r2,r2,r3 beq r2,r0,0xabef0 # if Rnd < [DangerValue * EnemyLureValue / 4096] then battle timenop
Does someone care to tell me where I have gone wrong here?
EDIT: I think I see. EnemyLureValue is considered a fraction in Terrence's guide. Therefore the 4096 is divided by 16 to become 256?
Last edited: