Anonymous

Changes

From Final Fantasy Inside

FF7/DamageFormula

1,643 bytes added, 19:49, 17 May 2021
0: Physical Accuracy Check: Added pseudocode for physical accuracy check
===0: Physical Accuracy Check===
''0x5DDBB0''
<pre>;For the purposes of this code, "Dex" means the adjusted Dexterity of the actor/target if any in-battle dex bonuses have been granted.;Same holds for the Physical Evade. Physical Hit rate has no in-game bonus opportunities. Check_For_Cover() HitChance = -1; If "Always connect" flag set then HitChance = 255;todoItIf target has one of the following statuses (Death, Sleep, Confu, Stop, Petrify, Manipulate, Paralysis) then Remove Sleep status Remove Confu status Remove Manipulate status HitChance = 255End If If action is flagged as "always hit" then HitChance = 255; Physical Chance = (Actor's Dex >> 2) + action physical hit rateActor's evade = (Actor's Dex >> 2) + Actor's Physical evadeTarget's evade = (Target's Dex >> 2) + Target's Physical evade If HitChance = -1 Then HitChance = Physical Chance + Actor's evade - Target's evade HitChance = FuryAdjust(HitChance)End If If HitChance = 0 then HitChance = 1 Luck Chance = [0..99]If (Actor's Luck / 4) > Luck Chance Then HitChance = 255 ;Lucky HitElse If Actor is Player Character targetting an enemy Then If (Target's long so Luck / 4) > Luck Chance HitChance = 0 ;Lucky Dodge End If End IfEnd If Miss Chance = (([0..65535] * 99) / 65535) + 1 ;essentially [1..100]if HitChance > Miss Chance then Set Hit flagElse Set Miss flagEnd IF Check_For_Cover() { This is where the game checks if the target is covered under a "cover"ing ally. It only applies to Player Characters It might be more complicated that I'll tackle it when I have a lot m seeing, but that is definitely ONE of time on my handsits functions} FuryAdjust(HitChance) { If HitChance < 255 then If Actor is in Fury Status HitChance = HitChance - ((HitChance * 3) / 10) End If End If return HitChance}
</pre>
6
edits