Changes

Jump to navigation Jump to search

FF7/DamageFormula

170 bytes added, 16:35, 5 June 2013
Did I really type that?!!?! Also a little reformatting
=Damage Calculations=
For standard These are the damage functionsaccording to an unmodded FF7-ENG 1.02 (1998)==Standard Formulae=====X0:===<pre>Sets Target's 02h flag to 1. (Unknown effect)</pre>
X0:<pre>Sets Target's 02h flag to 1. (Unknown effect)</pre>----===X1:===
<pre>If Attack Property "Always Critical" is Set
Set Critical Damage Flag
End If
Damage = Variance( Damage )</pre>
----===X2:===
<pre>
multiNoSplit = ( ( ( Attack's Target Flags AND Ch ) - 4 ) == 0 ? 1 : 0 )
Damage = Variance( Damage )
</pre>
----===X3:===
<pre>
If Attack Properties Damage MP is clear
Damage = Damage / 2
End If</pre>
----===X4:===
<pre>If Attack Properties Damage MP is clear
Damage = Target's MHP
End If
</pre>
----===X5:===
<pre>
Damage = (Actor's (M)Attack + Actor's Level) * 6 + (Attack's Power * 22)
Damage = Barrier( Damage )
Damage = Variance( Damage )</pre>
----===X6:===
<pre>Damage = Attack's Power * 20</pre>
----===X7:===
<pre>
Damage = ( ( 512 - Target's Def ) * Attack's Power / 32 )
Damage = Variance( Damage )
</pre>
----===X8:===
<pre>
If ActionData[0x230] AND 40h
End If
//presumably this checks if the target heals from restore element and will either recover or kill based on the result</pre>
----===X9:===
<pre>
Actor's Attack = Actor's Strength * 2
Use Damage X1 with adjusted stat
</pre>
----===XA:===
<pre>Damage = ( Attack's Power + Number of Targets - 1 ) / Number of Targets</pre>
==Additional Checks==
===Sadness( Damage ):===
<pre>
If Target's Status includes Sadness
End If
Return Damage</pre>
----===SplitDamage( Damage, multiNoSplit ):===
<pre>
If multiNoSplit == 0
Return Damage
</pre>
----===Barrier( Damage ):===
<pre>
If Attack Property "Physical" is 0
Return Damage
</pre>
----
Variance( Damage ):
<pre>
</pre>
==Secondary Damage Formulae=====X0:===
<pre>
Damage = Attacker's HP
</pre>
===X1:===
<pre>
Damage = TargetAttacker's MHP - TargetAttacker's HP
</pre>
===X8:===
<pre>
Dice_Count = Attacker's Level / 10
Damage = value_repeat * 100 * total_dice_roll
</pre>
===X9:===
<pre>
Damage = Number of Successful Escapes
</pre>
===XA:===
<pre>
Damage = Target's HP - 1
</pre>
===XB:===
<pre>
Damage = (Game Time Hours * 100) + (Game Time Minutes)
</pre>
===XC:===
<pre>
Damage = Target's Kill Count * 10
The point of these is to set the "attack will miss" flag in the current action memory structure.
===0: Physical Accuracy Check===
<pre>
todo
</pre>
===1: Magical Accuracy Check===
<pre>
acc = Action's Accuracy
</pre>
===2: Critical Hit Check===
<pre>
If attack does not miss then
3, 4, and 5 don't exist. Since they don't set miss they will always hit.
===6: Manipulate Accuracy (intended solely for playable characters)===
<pre>
int ally_loop;
This doesn't actually place the target in the manipulate status. That happens elsewhere.
===7: Level-based Accuracy===
<pre>
If Action's Accuracy > 0 then
Anonymous user

Navigation menu