EarthBound Beginnings/Battle Engine: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
(→‎Fight: Add SMAAASH base damage)
(Add run away section)
Line 47: Line 47:
===Healing===
===Healing===
PSI healing calculation currently unknown.
PSI healing calculation currently unknown.
==Run away==
Every non-fainted ally has a 50% chance of successfully running away, and if any one ally escapes the entire party will escape.  So, the chance of successfully running away is:
1 - 0.5<sup>Number of non-fainted allies</sup>


==Combat data==
==Combat data==
Line 52: Line 57:
Stored at RAM 0x0600-0x067F
Stored at RAM 0x0600-0x067F


* 00: Unknown (unused?)
* 00: Ally in party, FF if ally is in party
* 01: Status condition
* 01: Status condition
** Bit 0: Cold
** Bit 0: Cold

Revision as of 14:17, 22 April 2025

Fight

Hit/miss Calculation

The attacker hits if:

(256 + AttackerFight - DefenderFight) / 2 < (RANDOM 0-255) + 102

Otherwise "[NAME] dodged swiftly." If the attacker and defender have equal Fight, the chance of hitting is approximately 90%.

Damage Calculation

The following method is used to determine attack damage:

1. Calculate base damage (round BaseDamage down):

BaseDamage (normal) = [(AttackerOffense * 3) - DefenderDefense] / 4

BaseDamage (SMAAASH!!) = AttackerOffense

2. Get random multiplier from this table. There is a 50% chance of RandMult being negative.

Odds 7.8% 7.8% 7.8% 7.8% 7.8% 7.0% 7.0% 6.3% 6.3% 5.5% 4.7% 4.7% 3.9% 3.1% 3.1% 2.3% 2.3% 1.6% 1.6% 1.6% 0.8% 0.8% 0.8% 0.8%
RandMult 0 ±1 ±2 ±3 ±4 ±5 ±6 ±7 ±8 ±9 ±10 ±11 ±13 ±14 ±15 ±16 ±17 ±18 ±19 ±20 ±21 ±22 ±23 ±24

3. Calculate final damage (round FinalDamage down):

FinalDamage = BaseDamage * (1 ± 0.1 * RandMult)


This means that any attack can hit for 76% to 124% of its base damage.

Odds of getting a SMAAAASH!!

The chance of a SMAAAASH!! is exactly the same as the chance of missing an attack: The attacker gets a SMAAAASH!! if:

(256 + AttackerFight - DefenderFight) / 2 > (RANDOM 0-255) + 102

If the attacker and defender have equal Fight, the chance of both hitting and getting a SMAAAASH!! is approximately 9%.

PSI

PSI attacks will always hit if the defender is not PSI-protected.

Damage

PSI damage calculation currently unknown.

Healing

PSI healing calculation currently unknown.

Run away

Every non-fainted ally has a 50% chance of successfully running away, and if any one ally escapes the entire party will escape. So, the chance of successfully running away is:

1 - 0.5Number of non-fainted allies

Combat data

Allies

Stored at RAM 0x0600-0x067F

  • 00: Ally in party, FF if ally is in party
  • 01: Status condition
    • Bit 0: Cold
    • Bit 1: Poisoned
    • Bit 2: Puzzled
    • Bit 3: Confused
    • Bit 4: Sleeping
    • Bit 5: Paralyzed
    • Bit 6: Stone
    • Bit 7: Unconscious (can be applied even when HP isn't at 0)
  • 02: Unknown
  • 03-04: HP
  • 05-06: PP
  • 07-08: Offense
  • 09-0A: Defense
  • 0B: Fight
  • 0C: Speed
  • 0D: Wisdom
  • 0E: Strength
  • 0F: Force
  • 10-17: Unknown
  • 18-19: Pointer to name
  • 1A-1F: Unknown

Enemies

Stored at RAM 0x0680-0x06FF

  • 00: Unknown (unused?)
  • 01: Status condition
    • Bit 0: Cold
    • Bit 1: Poisoned
    • Bit 2: Puzzled
    • Bit 3: Confused
    • Bit 4: Sleeping
    • Bit 5: Paralyzed
    • Bit 6: Stone
    • Bit 7: Unconscious (can be applied even when HP isn't at 0)
  • 02: Unknown
  • 03-04: HP
  • 05-06: PP
  • 07-08: Offense
  • 09-0A: Defense
  • 0B: Fight
  • 0C: Speed
  • 0D: Wisdom
  • 0E: Strength
  • 0F: Force
  • 10-17: Attacks
  • 18-19: Pointer to enemy data
  • 1A-1B: Experience
  • 1C-1D: Money
  • 1E: Item dropped
  • 1F: Graphic tileset