Qhimm.com Forums
Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: DLPB_ on 2018-01-30 01:55:27
-
NFITC1 has done the rest, so gave him a little head start with this one. It's more or less complete aside from a few unknown flags and their function.
https://pastebin.com/t7aL85Wg
Hopefully, that will prove useful to you, NFITC1 :) Have at you.
Edit.
The Sleep, Confusion, Manip flags are there to remove the status if hit. Those 3 are removed on physical attack. Not sure why it's ecx+0000023C and not ecx+00000228. Evidently, the former is checked to see what needs removing.
-
There is valuable info I will paste here for reference even tho the pastebin still working:
-18 : status of actor
-0c: status of target
5DDC10
Hitvar:= -1
5DDC17
if 0x1 on Unknown Var then
Hitvar:= 255;
5DDC31
if unknownvar = 99 then
HitVar:= 255;
5DDC4B
if TargetStatus is Death, Sleep, Confusion, Stop, Petrify, Manip, Paralysis then
Begin
if TargetStatus = Sleep then
Set 0x4 on Unknown Var
if TargetStatus = Confusion then
Set 0x40 on Unknown Var
if TargetStatus = Manip then
Set 0x400000 on Unknown Var
HitVar:= 255
End;
5DDCF7
if 0x20 on unknownvar then
HitVar:= 255
5DDD11
[edx+00000260] = Attack%
ebp[-28] = (Attacker's Dex / 4) + Attack%.
ebp[-20] = attacker's defence rate
ebp[-1c] = target's defence rate
5DDD78
if HitVar <> 255 then
begin
HitVar = (Attacker's Dex / 4) + Attack% + ( Attacker's Df% - Target's Df%)
FuryCheck
end
5DDD99
if HitVar < 1 then
Hitvar:= 1
5DDDA6
RandomVar:= Random (0..99)
5DDDB5
[Lucky Hit]
If RandomVar < Luck /4
then HitVar = 255.
Skips the Lucky Evade check.
5DDDEF
[Lucky Evade. Ally only.]
if user is enemy and target is ally then
if RandomVar < Luck /4 then
HitVar is 0.
005DDE29
RandomVar2 (1..100). Unknown mechanism.
5DDE31 :
if Randomvar2 < HitVar then
unknown
else
Set Miss flag.
I wonder if the 5DDC31 is not the squall check, so making him always hit. Will try this