                            Final Fantasy III (VI)
                             Algorithms FAQ V 1.3

                                      By

                       Terii Senshi (teriisenshi@aol.com)

*****************
Table of Contents
*****************

1.0 Introduction

2.0 Basic Algorithms
   2.1 Physical damage calculation
   2.2 Magic damage calculation
   2.3 Random encounters
   2.4 Chance to hit

3.0 Weapons
   3.1 Atma Weapon
   3.2 Dice
   3.3 Fixed Dice
   3.4 Thief Knife
   3.5 Valiant Knife

4.0 Relics
   4.1  Atlas Armlet
   4.2  Charm Bangle
   4.3  Coin Toss
   4.4  Cure Ring
   4.5  Earrings
   4.6  Gauntlet
   4.7  Genji Glove
   4.8  Hero Ring
   4.9  Hyper Wrist
   4.10 Sneak Ring
   4.11 Tintinabar

5.0 Commands
   5.1 GP Rain
   5.2 Steal
   5.3 Throw

6.0 Spells
   6.1 Earth Wall (Golem)
   6.2 Metamorph (Ragnarok)
   6.3 Regen
   6.4 Stone

7.0 Credits/Acknowledgements


Version Changes:

1.3 Added Genji Glove, Earth Wall, and Stone. Corrected or added to Physical
Damage Calculation, Random Encounters, Chance to Hit, Dice, Fixed Dice,
Gauntlet, and Metamorph.

1.2 Added chance to hit calculation, steal command, sneak ring, and metamorph.
Changed the layout slightly

1.1 Added a 100% accurate physical damage formula. Fixed a few other errors

1.0 The original version.


******************
 1.0 Introduction
******************

These FAQ explains how the algorithms and calculations for Final Fantasy III
work. It contains details on how damage is calculated, how random encounters
are determined, as well as how other items and things work. It's not meant to
be comprehensive, but simply contains things have been figured out so far. 

A few explanations about notation:
[A..B] is random number between A and B, so [1..6] would be a random number
1, 2, 3, 4, 5, or 6.

Trunc(x) is x rounded down to the nearest integer, so trunc(1) = 1,
trunc(2.4) = 2, and trunc (6.9) = 6.

Ceil(x) is x rounded up to the nearest integer, so ceil(1) = 1
ceil(2.4) = 3, and ceil(6.9) = 7.

NOTE: All divisions done in all calculations are integer division. This means
the result after the division is trucnated (rounded down), so (4 / 2) = 2,
(8 / 3) = 2, and ((17 / 2) / 5) = (8 / 5) = 1.


                            **********************
                             2.0 Basic Algorithms
                            **********************

*********************************
 2.1 Physical damage calculation
*********************************

This formula is used for standard attacks, and some special attacks that
use Vigor instead of Magic Power.

1. Vigor2 = Vigor * 2.
   If Vigor > 255 then Vigor2 = 255


2. Figure Maximum Damage:
   
   Attack = Battle Power + Vigor2 * 2

   Damage = Battle Power + ((Level * Level * Attack) / 256)) * 3 / 2

   Monsters work differently:

   Vigor2 = [58..65]

   Damage = Level * Level * (Battle Power * 4 + Vigor2) / 256


3. If in back row, then damage = damage / 2


4. Defense calculation:

   If attack is defense ignoring, then skip this step.

   damage = damage * ((255 - Defense) / 256)


5. Random Variance:

   Multiply damage by [224..255] / 256


6. if damage < 1024 then damage = damage + 1


7. If target is in back row, then damage = damage / 2


8. Self Damage

   Monsters skip this step.

   If attacking self (or other party member) damage = damage / 2


9. Elemental calculation

   If target is weak vs. element, then damage = damage * 2
   If target is strong vs. elements, then damage = damage / 2
   If target is resistant to element, then damage = 0
   If target absorbs element, then damage is unchanged, but damage is added
   to HP rather than subtracted


******************************
 2.2 Magic damage calculation
******************************

This formula is used for almost all special attacks, and spells.

1. Figure Maximum Damage:

   Maximum Damage = Spell Power * 4 +( Level * Magic Power * Spell Power / 32)


2. Multiple Targets:

   Some spells skip this step

   If spell is targeting multiple targets then damage = damage / 2


3. Defense calculation:

   If attack is defense ignoring, then skip this step.

   damage = damage * ((255 - Magic Defense) / 256)


4. Random Variance:

   Multiply damage by [224..255] / 256


5. if damage < 1024 then damage = damage + 1


6. Self Damage

   Monsters skip this step.

   If attacking self (or other party member) damage = damage / 2


7. Elemental calculation

   If target is weak vs. element, then damage = damage * 2
   If target is strong vs. elements, then damage = damage / 2
   If target is resistant to element, then damage = 0
   If target absorbs element, then damage is unchanged, but damage is added
   to HP rather than subtracted


***********************
 2.3 Random Encounters
***********************

The game keeps a counter that increases each time you take a step. Each step
a random number is picked from 0 to 255, if this number is less than
(counter / 256 ) than a fight occurs. When a random encounter occurs the
counter is reset to 0. If the lead party member has a Charm Bangle equipped,
then the number added is cut in half.

Values added to counter by terrain:

Terrain  Value
Caves    112
Grass    96
Desert   192
Forest   192
Snow     112
Town     112
Mountain 112


*******************
 2.4 Chance to Hit
*******************

NOTE: Because of a bug in the game, Mblock determines whether both magical or
physical attacks hit. Evade does nothing.

1. HitValue = (255 - MBlock * 2) + 1

2. If HitValue > 255 then HitValue = 255
   If HitValue < 1 then HitValue = 1

3. If ((Hit Rate * HitValue) / 256) >= [0..99] then you hit, otherwise you miss.

4. Certain spells (Break, Doom, Demi, Quartr, X-Zone, W Wind, Shoat, Odin,
   Raiden, Antlion, Snare, X-Fer, and Grav Bomb) can also be blocked by Stamina
   For all other spells skip this step.

   If target's stamina > [0..127] then the attack misses (even if it hit in
   step 3)


                                *************
                                 3.0 Weapons
                                *************

******************
 3.1 Atma Weapon:
******************

Deals damage as normal weapon with the following exceptions:

Between steps 2 and 3 of the physical damage calculation:

2.1 damage = damage * level / 64
2.2 damage = damage * ((current HP / 256) + 1) / ((max HP / 256) + 1)

Is defense ignoring, so it skips step 4 (defense calculation).

Is NOT unblockable


***********
 3.2 Dice:
***********

damage = Dice Roll 1 * Dice Roll 2 * Level * 2

Skips all normal steps for physical damage calculation.
Ignores M. Block (is unblockable)

For determing the dice rolls, each number does not have an equal chance of
coming up. 1, 2, 3, and 4 each have a 18.75% chance of coming up. 5, and 6
only have a 12.5% chance of coming up.


*****************
 3.3 Fixed Dice:
*****************

damage = Dice Roll 1 * Dice Roll 2 * Dice Roll 3 * Level * 2

if all Dice Rolls are the same then:

damage = damage * Dice Roll

Skips all normal steps for physical damage calculation.
Ignores M. Block (is unblockable)

For determing the dice rolls, each number does not have an equal chance of
coming up. 1, 2, 3, and 4 each have a 18.75% chance of coming up. 5, and 6
only have a 12.5% chance of coming up.


*****************
 3.4 Thief Knife
*****************

Has a 50% chance of attempting to steal as well as dealing it's normal damage.


********************
 3.5 Valiant Knife:
********************

Deals damage as normal weapon with the following exceptions:

Between steps 2 and 3 of the physical damage calculation:

2.1 damage = damage + (Max HP - Current HP)

Is defense ignoring, so it skips step 4 (defense calculation).

Is NOT unblockable


                                 ************
                                  4.0 Relics
                                 ************

******************
 4.1 Atlas Armlet
******************

Between steps 2 and 3 of the physical damage calculation:

2.1 damage = damage * 5 / 4

If you have 2 equipped it has the same effect as only having one equipped


******************
 4.2 Charm Bangle
******************

Decreases amount of random encounters by 25%. See random encounters (2.3) for
more information.


****************
 4.3 Coin Toss
****************

See GP Rain (5.1)


****************
 4.4 Cure Ring:
****************

Max HP Gained = (Max HP * stamina / 1024) + 2 (if this value is greater than
255 it is set to 255)
HP Gained = Max HP Gained * ([224..255]) / 256

Regen spell works the same way


**************
 4.5 Earrings
**************

Between steps 1 and 2 of the magic damage calculation:

1.1 damage = damage * 5 / 4

If you have 2 equipped then:

1.1 damage = damage * 3 / 2


***************
 4.6 Gauntlet:
***************

Between steps 1 and 2 of the physical damage calculation:

1.1 Attack = Attack + (Battle Power * 3 / 4)


*****************
 4.7 Genji Glove
*****************

Allows you to attack with a weapon in both hands. If you only have one weapon
equipped the attack does only 75% of normal damage, does full damage if you
have 2 weapons equipped.


***************
 4.8 Hero Ring
***************

Has the exact same effect as an Atlas Armlet and Earrings combined. This means
the effect is cumulative for magic damage, but not physical damage.


*****************
 4.9 Hyper Wrist
*****************

Increases Vigor by 50%. Note: because of step 1 in physical damage calculation
increasing vigor over 128 is worthless.


*****************
 4.10 Sneak Ring
*****************

Doubles your chance of succesfully stealing. Does not affect the chance of
getting a rare item instead of a common item.

See Steal (5.3) for more information.


*****************
 4.11 Tintinabar:
*****************

HP gained per step = Level * Stamina / 128


                                **************
                                 5.0 Commands
                                **************

**************
 5.1 GP Rain:
**************

Damage = Level * 60 / # of enemies hit
Gold Used = Level * 30


************
 5.2 Throw:
************

Deals damage as a normal physical attack with these exceptions:

After step 2:

2.1 damage = damage * 2

Is defense ignoring (skips step 4)

Ignores row (steps 3 and 8)

Is Unblockable

The Battle Power used is the Battle Power of the thrown weapon. The elemental
property of the weapon counts, but all other special properties of the thrown
weapon are ignored.


***********
 5.3 Steal
***********

1 .If monster has no items then you automatically fail to steal

2. StealValue = Your level + 50 - monster's level

3. If StealValue <= 0 then you fail to steal

4. If StealValue >= 128 then you automatically steal (skip steps 5 and 6)

5. If you have a Sneak Ring equipped:
      StealValue = StealValue * 2

6. If StealValue <= [0..99] then you fail to steal

7. You have 1 in 8 chance of getting a rare item, otherwise you get a common
   item.

8. If the monster doesn't have an item to steal in that slot, then you fail to
steal, otherwise you sucessfully steal that item.


                                  ************
                                   6.0 Spells
                                  ************


****************
 6.1 Earth Wall
****************

Will block physical damage for all party members. The amount of damage it can
block is equal to the HP of the caster when it was cast. Once it has blocked
that much damage it will no longer block attacks for the rest of combat.


***************
 6.2 Metamorph
***************

Each enemy has a number 0 to 7 that determines how hard it is to morph.
For each value, The chance to morph is:

0: 100%
1: 75%
2: 50%
3: 25%
4: 12.5%
5: 6.25%
6: 3.125%
7: 0%


Each monster has 4 items it can be morphed into. The item you get is randomly
determined from among the items, each having a 1 in 4 chance of being the
item you get.


***********
 6.3 Regen
***********

See Cure Ring (4.4)


***********
 6.4 Stone
***********

If the attacker's and target's levels are the same, does 7.5x normal damage.


*****************************
 7.0 Credits/Ackowledgements
*****************************

Squaresoft
  For making this game :)

GameFAQs
  For giving me a place other than my website to post my FAQ

Everyone at FF3 Message Boards on GameFAQS, especially Master Zed, Assassin17,
Mech Gouki, and anyone else who figured out some of the things I put in this
FAQ.


/**************************************************************************/
Copyright notice:
This document is Copyright 2001 by Kris DeHart. I do not authorize any part
of this FAQ to be copied or used in anyone else's FAQ without my explicit
permission. The most recent version of this FAQ and all my other FAQS can
always be found at GameFAQs (http://www.gamefaqs.com) or my website
(http://www.geocities.com/teriisenshi)
/***************************************************************************/

