On this page
  1. Related
  2. Mechanics
  3. References
  4. Sources

EarthBound is the North American release of Mother 2, the Super Famicom sequel to Mother. The code read here is Herringway’s ebsrc, a ca65 disassembly that builds the US release, a US prototype, and the Japanese Mother 2 from one source. The claims describe the US release.

Damage to a party member doesn’t land at once. It sets a target, and the HP meter counts toward it at 1.0625 to 1.125 HP per update; a character falls only when the meter reaches 0, so a battle won while it is still rolling leaves them standing1. This is the rolling HP meter.

Enemies walk the map instead of appearing at random. Touching one starts a battle, and the facings at contact decide who strikes first2. Enemies far below the party’s levels run from it3, and a fight the party can’t lose is won without being fought, the instant win4.

A bash deals twice the Offense less the Defense, give or take up to a quarter5. It can miss on the weapon’s rate in 16, and then the target can dodge by Speed6. A “SMAAAASH!!” comes at about Guts in 500 and deals 4 × Offense − Defense7. As in Mother it is rolled before the dodge, but every number has changed8. The turn order rolls Speed up or down by as much as half once per turn9, and running gets 10 points likelier each turn10.

Mechanics

MechanicKindHow
Rolling HP meterRollinga party member's HP counts down to the damage at about 1 HP per update, and only the rolled value knocks them out
Instant winGuaranteed winskipped when the party's weakest bash would kill every enemy and its slowest member outruns them all, or the first strike plays out a win
Visible encounterTouch and facingenemies walk the map; who faces whom at contact decides the first strike, and enemies far below the party run away
Turn orderStat plus a rollSpeed ±50%, rolled once per turn, highest first
Damage formulaAttack minus defense2 × Offense − Defense, ±25% weighted toward small changes
Critical hitFrom a stat"SMAAAASH!!" at about Guts in 500, at least 1 in 20 for the party, for 4 × Offense − Defense
Hit chanceMiss, then a stat dodgea miss roll in 16 from the weapon, then a dodge of (2 × the target's Speed − the attacker's) in 500
FleeingSpeed gap, rising by turn10 × the turn number plus the Speed gap, in 100; certain on a first strike, never against a boss
Every claim about this game, by concept (10)
Critical hitIn EarthBound (US release), a bash is a "SMAAAASH!!" with a chance of about the attacker's Guts in 500, with a party member's Guts counted as at least 25 (about 1 in 20). It is rolled after the miss check and before the dodge, so it can't be dodged, and deals 4 × Offense − Defense with no random spread.Code
EarthBound (US release) keeps EarthBound Beginnings' order of a plain attack, with the "SMAAAASH!!" rolled before the dodge so it can't be dodged, but changes the numbers: the chance comes from the attacker's Guts alone (about Guts in 500) instead of Fight against Fight; the SMAAAASH deals 4 × Offense − Defense instead of the full Offense; a normal hit deals 2 × Offense − Defense instead of Offense − Defense ÷ 2; and the dodge comes from Speed instead of Fight.Code
Damage formulaIn EarthBound (US release), a bash deals 2 × the attacker's Offense − the target's Defense, moved up or down by up to 25%, and at least 1. The spread draws two random bytes and keeps the one nearer 128; its distance d from 128 moves the damage by d/512 of it, down when the byte is under 128 and up when over, so small changes are the most common.Code
FleeingIn EarthBound (US release), running away never works against a boss. Otherwise it works on the first turn of a battle the party started with the first strike, or when no enemy can act; else it works with a chance of about (10 × the turn number + the fastest party member's Speed − the fastest able enemy's Speed) in 100, and never when that is below 0.Code
Hit chanceIn EarthBound (US release), a bash first misses at the attacker's miss rate in 16: for a party member its weapon's, or 1 with no weapon, plus 8 while crying or nauseous; for an enemy its own. Then the target dodges with a chance of about (2 × target's Speed − attacker's Speed) in 500, never when that is 0 or less, nor while the target is paralyzed, asleep, immobilized, or solidified.Code
Instant winIn EarthBound (US release), a battle the party can't lose is won without being fought. The check fails if the enemies struck first, or if there are more enemies than able party members among the four main characters (unconscious, diamondized, paralyzed, nauseous, poisoned, sunstroked, cold, mushroomized, and possessed ones don't count). In an even start, the four's lowest Speed must be at least every enemy's Speed, and twice their lowest Offense at least each enemy's HP plus Defense. When the party struck first, it sorts the able members by Offense and the enemies by HP, both highest first, and plays one round in that order: each member makes one attack of 2 × Offense − Defense on the current enemy, moving on to the next enemy only when one falls (any surplus damage is lost), and the party wins if every enemy falls.Code
Rolling HP meterIn EarthBound (US release), damage to a party member sets a target HP, and the HP shown counts toward it over time: each call moves one party slot (picked by the frame counter's low two bits) by 1.125, 1.094, or 1.0625 HP by the text speed setting. Healing rolls at 6.25 HP per update when a fastest flag or the flip-out mode is set; damage rolls at 6.25 only in the flip-out mode. A character falls only when that rolling HP reaches 0. When the last enemy falls, each meter still rolling down stops where it is, so mortal damage that hasn't finished rolling doesn't knock anyone out. Enemies and guest characters take damage at once.Code
Turn orderIn EarthBound (US release), every conscious combatant's initiative is rolled at the start of each turn: its Speed moved up or down by up to 50% (the 25% spread's method without the final halving), at least 1. Then the conscious combatant yet to act with the highest initiative goes next, ties going to the later slot.Code
Visible encounterIn EarthBound (US release), a battle starts when an enemy on the map touches the party, and the two's facings decide who strikes first. With the direction from the enemy to the party rounded to one of eight: the party strikes first when the enemy isn't moving toward the party (within 45°) and the leader isn't facing away from the enemy; the enemies strike first when the enemy is moving toward the party and the leader faces away; otherwise neither does. A standing enemy always gives the party the first strike.Code
In EarthBound (US release), an enemy on the map turns and runs from the party when its group's run-away event flag holds the value the group names (its run_away_flag_state byte), or when the levels of the party's main characters (not guests) summed are more than 10 times the enemy's level; more than 8 times for 3 enemies in 4, and more than 6 times for 1 in 2, by a random byte each enemy gets when it spawns.Code

References

  1. ^In EarthBound (US release), damage to a party member sets a target HP, and the HP shown counts toward it over time: each call moves one party slot (picked by the frame counter's low two bits) by 1.125, 1.094, or 1.0625 HP by the text speed setting. Healing rolls at 6.25 HP per update when a fastest flag or the flip-out mode is set; damage rolls at 6.25 only in the flip-out mode. A character falls only when that rolling HP reaches 0. When the last enemy falls, each meter still rolling down stops where it is, so mortal damage that hasn't finished rolling doesn't knock anyone out. Enemies and guest characters take damage at once.CodeHerringway/ebsrc · “EarthBound (USA)”revised
    How we know
    23	LDA a:battler::ally_or_enemy,X
    24	AND #$00FF
    25	BNE @UNKNOWN2
    26	LDA a:battler::npc_id,X
    27	AND #$00FF
    28	BNE @UNKNOWN1
    29	TYA
    30	STA a:battler::hp_target,X
    ⋮
    32	AND #$00FF
    ⋮
    37	TYA
    38	STA PARTY_CHARACTERS+char_struct::current_hp_target,X
    39	BRA @UNKNOWN3
    ⋮
    
    src/battle/set_hp.asm lines 23–64 at 68aec5c · upstream ↗
    12	LDA FRAME_COUNTER
    13	AND #$00FF
    14	AND #$0003
    ⋮
    22	LDA GAME_STATE + game_state::party_members,X
    
    src/misc/hp_pp_roller.asm lines 12–22 at 68aec5c · upstream ↗
    64	LDA FASTEST_HPPP_METER_SPEED
    65	AND #$00FF
    66	BNE @UNKNOWN5
    67	LDA HPPP_METER_FLIPOUT_MODE
    68	BEQ @UNKNOWN6
    69@UNKNOWN5:
    70	MOVE_INT_CONSTANT $00064000, @VIRTUAL06
    71	BRA @UNKNOWN7
    72@UNKNOWN6:
    73	JSR UNKNOWN_C20F58
    ⋮
    79	ADD_INT_ASSIGN @VIRTUAL06, @VIRTUAL0A
    
    src/misc/hp_pp_roller.asm lines 64–80 at 68aec5c · upstream ↗
    109@UNKNOWN10:
    ⋮
    116	LDA HPPP_METER_FLIPOUT_MODE
    117	BEQ @UNKNOWN11
    118	MOVE_INT_CONSTANT $00064000, @VIRTUAL06
    119	BRA @UNKNOWN12
    120@UNKNOWN11:
    121	JSR UNKNOWN_C20F58
    ⋮
    127	SUB_INT_ASSIGN @VIRTUAL06, @VIRTUAL0A
    
    src/misc/hp_pp_roller.asm lines 109–127 at 68aec5c · upstream ↗
    2HP_METER_SPEEDS:
    3	.WORD $2000, 1 ;1 + 4/32
    4	.WORD $1800, 1 ;1 + 3/32
    5	.WORD $1000, 1 ;1 + 2/32
    
    src/data/hp_meter_speeds.asm lines 2–5 at 68aec5c · upstream ↗

    In the cartridge (“EarthBound (USA)”): $C3:FB1F, the three 32-bit rates as the ROM has them. We don't reproduce the bytes.

    665	LDA GAME_STATE+game_state::text_speed
    ⋮
    670	LOADPTR HP_METER_SPEEDS, @VIRTUAL0A
    ⋮
    678	MOVE_INT @VIRTUAL06, HP_METER_SPEED
    
    src/intro/file_select_menu_loop.asm lines 665–678 at 68aec5c · upstream ↗
    43	LDA a:char_struct::current_hp,X
    44	LDX @LOCAL01
    45	STA __BSS_START__,X
    ⋮
    49	LDX @LOCAL01
    50	LDA __BSS_START__,X
    51	BNE @UNKNOWN4
    ⋮
    62	LDA #STATUS_0::UNCONSCIOUS
    63	STA a:battler::afflictions + STATUS_GROUP::PERSISTENT_EASYHEAL,X
    
    src/battle/check_dead_players.asm lines 43–63 at 68aec5c · upstream ↗
    3051@ALLIES_ARE_ALIVE:
    3052	LDA #1
    3053	JSL COUNT_CHARS
    3054	CMP #0
    3055	BNEL @UNKNOWN234
    3056@ENEMIES_ARE_DEAD:
    3057	STZ @LOCAL03
    3058	JSL RESET_HPPP_ROLLING
    
    src/battle/main_battle_routine.asm lines 3051–3058 at 68aec5c · upstream ↗
    37	LDA a:char_struct::current_hp_fraction,Y
    38	BEQ @UNKNOWN2
    39	LDA a:char_struct::current_hp,Y
    40	STA @LOCAL00
    ⋮
    43	ADC #char_struct::current_hp_target
    ⋮
    47	LDA @LOCAL00
    48	CMP @VIRTUAL04
    49	BLTEQ @UNKNOWN2
    50	STA __BSS_START__,X
    
    src/misc/reset_hppp_rolling.asm lines 37–50 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Revised after a check by a second AI model, 2026-10-21.

    In the claim ledger

  2. ^In EarthBound (US release), a battle starts when an enemy on the map touches the party, and the two's facings decide who strikes first. With the direction from the enemy to the party rounded to one of eight: the party strikes first when the enemy isn't moving toward the party (within 45°) and the leader isn't facing away from the enemy; the enemies strike first when the enemy is moving toward the party and the leader faces away; otherwise neither does. A standing enemy always gives the party the first strike.CodeHerringway/ebsrc
    How we know
    17	LDA TOUCHED_ENEMY
    ⋮
    24	ADC #.LOWORD(ENTITY_MOVING_DIRECTIONS)
    ⋮
    28	CMP #8
    29	BNE @UNKNOWN0
    30	LDY #0
    31	LDX #1
    32	BRA @UNKNOWN6
    
    src/unknown/C0/C0D19B.asm lines 17–32 at 68aec5c · upstream ↗
    49	JSL UNKNOWN_C41EFF
    50	LDY #$2000
    51	CLC
    52	ADC #$1000
    53	JSL DIVISION16S_DIVISOR_POSITIVE
    54	STA @VIRTUAL04
    ⋮
    57	SEC
    58	SBC @VIRTUAL04
    59	AND #$0007
    60	BEQ @UNKNOWN1
    61	CMP #1
    62	BEQ @UNKNOWN1
    ⋮
    
    src/unknown/C0/C0D19B.asm lines 49–99 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  3. ^In EarthBound (US release), an enemy on the map turns and runs from the party when its group's run-away event flag holds the value the group names (its run_away_flag_state byte), or when the levels of the party's main characters (not guests) summed are more than 10 times the enemy's level; more than 8 times for 3 enemies in 4, and more than 6 times for 1 in 2, by a random byte each enemy gets when it spawns.CodeHerringway/ebsrcrevised
    How we know
    24	OPTIMIZED_ADD battle_entry_ptr_entry::run_away_flag
    ⋮
    31	JSL GET_EVENT_FLAG
    ⋮
    36	ADC #battle_entry_ptr_entry::run_away_flag_state
    ⋮
    43	LDA @LOCAL00
    44	CMP @VIRTUAL02
    45	BNE @UNKNOWN0
    46	LDA #1
    
    src/unknown/C0/C0C524.asm lines 24–47 at 68aec5c · upstream ↗
    49	JSL UNKNOWN_C0546B
    ⋮
    53	ASL
    ⋮
    60	ADC #enemy_data::level
    ⋮
    65	OPTIMIZED_MULT @VIRTUAL04, 10
    66	STA @VIRTUAL02
    67	LDY @LOCAL00
    68	TYA
    69	CMP @VIRTUAL02
    70	BLTEQ @UNKNOWN1
    71	LDA #1
    ⋮
    73@UNKNOWN1:
    74	LDA @LOCAL01
    ⋮
    
    src/unknown/C0/C0C524.asm lines 49–105 at 68aec5c · upstream ↗
    2UNKNOWN_C0C615:
    3	REP #PROC_FLAGS::ACCUM8 | PROC_FLAGS::INDEX8 | PROC_FLAGS::CARRY
    4	JSL UNKNOWN_C0C524
    5	CMP #$0000
    6	BEQ @UNKNOWN0
    7	JSL GET_OPPOSITE_DIRECTION_FROM_PLAYER_TO_ENTITY
    
    src/unknown/C0/C0C615.asm lines 2–11 at 68aec5c · upstream ↗
    412	JSL RAND
    413	LDX @LOCAL06
    414	STA ENTITY_WEAK_ENEMY_VALUE,X
    
    src/overworld/spawn_enemies_from_group.asm lines 412–414 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Revised after a check by a second AI model, 2026-10-21.

    In the claim ledger

  4. ^In EarthBound (US release), a battle the party can't lose is won without being fought. The check fails if the enemies struck first, or if there are more enemies than able party members among the four main characters (unconscious, diamondized, paralyzed, nauseous, poisoned, sunstroked, cold, mushroomized, and possessed ones don't count). In an even start, the four's lowest Speed must be at least every enemy's Speed, and twice their lowest Offense at least each enemy's HP plus Defense. When the party struck first, it sorts the able members by Offense and the enemies by HP, both highest first, and plays one round in that order: each member makes one attack of 2 × Offense − Defense on the current enemy, moving on to the next enemy only when one falls (any surplus damage is lost), and the party wins if every enemy falls.CodeHerringway/ebsrcrevised
    How we know
    17	LDA BATTLE_INITIATIVE
    18	CMP #INITIATIVE::ENEMIES_FIRST
    19	BNE @UNKNOWN0
    20	LDA #0
    21	JMP @UNKNOWN37
    
    src/battle/instant_win_check.asm lines 17–21 at 68aec5c · upstream ↗
    46	CPX #1
    47	BCCL @UNKNOWN6
    48	CPX #4
    49	BGTL @UNKNOWN6
    ⋮
    55	LDA PARTY_CHARACTERS+char_struct::speed,X
    56	AND #$00FF
    57	CMP @VIRTUAL04
    58	BCS @UNKNOWN4
    59	STA @VIRTUAL04
    
    src/battle/instant_win_check.asm lines 46–59 at 68aec5c · upstream ↗
    130	LDA ENEMIES_IN_BATTLE
    131	CMP @LOCAL08
    132	BLTEQ @UNKNOWN9
    133	LDA #0
    134	JMP @UNKNOWN37
    135@UNKNOWN9:
    136	LDA BATTLE_INITIATIVE
    137	BNEL @UNKNOWN18
    
    src/battle/instant_win_check.asm lines 130–137 at 68aec5c · upstream ↗
    183	ADC #enemy_data::defense
    ⋮
    188	STA @VIRTUAL02
    ⋮
    191	ADC #enemy_data::hp
    ⋮
    198	ADC @VIRTUAL02
    199	STA @VIRTUAL04
    200	LDA @LOCAL07
    201	STA @VIRTUAL02
    202	ASL
    203	CMP @VIRTUAL04
    204	BCS @UNKNOWN16
    205	LDA #0
    206	JMP @UNKNOWN37
    
    src/battle/instant_win_check.asm lines 183–206 at 68aec5c · upstream ↗
    383	LDA INSTANT_WIN_SORTED_OFFENSE,X
    384	ASL
    385	STA @VIRTUAL04
    386	LDX @LOCAL09
    ⋮
    388	ASL
    ⋮
    406	LDA @VIRTUAL04
    407	CMP @VIRTUAL02
    408	BCS @UNKNOWN34
    409	LDA @VIRTUAL04
    410	SEC
    411	SBC @LOCAL05
    ⋮
    414	SEC
    ⋮
    
    src/battle/instant_win_check.asm lines 383–427 at 68aec5c · upstream ↗
    16	JSL INSTANT_WIN_CHECK
    17	CMP #0
    18	BEQ @UNKNOWN2
    19	JSL INSTANT_WIN_HANDLER
    20	STZ BATTLE_MODE
    21	BRA @UNKNOWN5
    22@UNKNOWN2:
    23	JSL INIT_BATTLE_COMMON
    
    src/battle/init_overworld.asm lines 16–23 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Revised after a check by a second AI model, 2026-10-21.

    In the claim ledger

  5. ^In EarthBound (US release), a bash deals 2 × the attacker's Offense − the target's Defense, moved up or down by up to 25%, and at least 1. The spread draws two random bytes and keeps the one nearer 128; its distance d from 128 moves the damage by d/512 of it, down when the byte is under 128 and up when over, so small changes are the most common.CodeHerringway/ebsrc
    How we know
    7	LDX CURRENT_ATTACKER
    8	LDA a:battler::offense,X
    9	ASL
    10	LDX CURRENT_TARGET
    11	SEC
    12	SBC a:battler::defense,X
    13	STA @LOCAL00
    14	CLC
    15	SBC #0
    16	BRANCHLTEQS @UNKNOWN2
    17	LDA @LOCAL00
    18	JSR TWENTY_FIVE_PERCENT_VARIANCE
    ⋮
    
    src/battle/actions/level_2_attack.asm lines 7–30 at 68aec5c · upstream ↗
    11	STA @VIRTUAL04
    12	JSR RAND_LONG
    ⋮
    17	JSR RAND_LONG
    ⋮
    23	SEC
    24	SBC #$0080
    ⋮
    26	STA @VIRTUAL02
    ⋮
    28	CLC
    29	SBC @VIRTUAL02
    ⋮
    40	SEC
    41	SBC #$0080
    ⋮
    43	STA @VIRTUAL02
    ⋮
    45	CLC
    ⋮
    
    src/battle/25_percent_variance.asm lines 11–93 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  6. ^In EarthBound (US release), a bash first misses at the attacker's miss rate in 16: for a party member its weapon's, or 1 with no weapon, plus 8 while crying or nauseous; for an enemy its own. Then the target dodges with a chance of about (2 × target's Speed − attacker's Speed) in 500, never when that is 0 or less, nor while the target is paralyzed, asleep, immobilized, or solidified.CodeHerringway/ebsrc
    How we know
    40	OPTIMIZED_MULT @VIRTUAL04, .SIZEOF(item)
    41	CLC
    42	ADC #item::params + item_parameters::special
    ⋮
    45	LDA f:ITEM_CONFIGURATION_TABLE,X
    ⋮
    52	STX @MISS_CHANCE
    53	BRA @UNKNOWN3
    54@UNKNOWN2:
    55	LDX #1
    56	STX @MISS_CHANCE
    
    src/battle/miss_calc.asm lines 40–56 at 68aec5c · upstream ↗
    72	ADC #8 ;miss chance + 1/2
    ⋮
    82	ADC #enemy_data::miss_rate
    ⋮
    89	LDX @MISS_CHANCE
    90	BEQ @UNKNOWN9
    91	LDA #16
    92	JSR RAND_LIMIT
    93	STA @VIRTUAL02
    94	LDX @MISS_CHANCE
    95	TXA
    96	DEC
    97	CMP @VIRTUAL02
    98	BCC @UNKNOWN9
    
    src/battle/miss_calc.asm lines 72–98 at 68aec5c · upstream ↗
    34	LDX CURRENT_TARGET
    35	LDA a:battler::speed,X
    36	ASL
    37	LDX CURRENT_ATTACKER
    38	SEC
    39	SBC a:battler::speed,X
    40	STA @LOCAL00
    41	STA @VIRTUAL02
    42	LDA #0
    43	CLC
    44	SBC @VIRTUAL02
    45	BRANCHGTS @UNKNOWN6
    ⋮
    
    src/battle/determine_dodge.asm lines 34–47 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  7. ^In EarthBound (US release), a bash is a "SMAAAASH!!" with a chance of about the attacker's Guts in 500, with a party member's Guts counted as at least 25 (about 1 in 20). It is rolled after the miss check and before the dodge, so it can't be dodged, and deals 4 × Offense − Defense with no random spread.CodeHerringway/ebsrc
    How we know
    7	LDA #0
    8	JSR MISS_CALC
    9	CMP #0
    10	BNE @UNKNOWN1
    11	JSR SMAAAASH
    12	CMP #0
    13	BNE @UNKNOWN1
    14	JSR DETERMINE_DODGE
    15	CMP #0
    16	BNE @UNKNOWN0
    17	JSR BTLACT_LEVEL_2_ATK
    
    src/battle/actions/bash.asm lines 7–17 at 68aec5c · upstream ↗
    10	LDX CURRENT_ATTACKER
    11	LDA __BSS_START__ + battler::guts,X
    12	STA @LOCAL01
    13	LDX CURRENT_ATTACKER
    ⋮
    15	AND #$00FF
    16	BNE @BYPASS_MINIMUM_GUTS
    17	LDA @LOCAL01
    18	CMP #GUTS_FLOOR_FOR_SMAAAASH_CHANCE
    19	BCS @BYPASS_MINIMUM_GUTS
    20	LDA #GUTS_FLOOR_FOR_SMAAAASH_CHANCE
    21	STA @LOCAL01
    22@BYPASS_MINIMUM_GUTS:
    ⋮
    
    src/battle/smaaaash.asm lines 10–26 at 68aec5c · upstream ↗
    .DEFINE GUTS_FLOOR_FOR_SMAAAASH_CHANCE 25
    include/config.asm#L66 · upstream ↗
    59	LDX CURRENT_ATTACKER
    60	LDA __BSS_START__ + battler::offense,X
    61	ASL
    62	ASL
    63	LDX CURRENT_TARGET
    64	SEC
    65	SBC __BSS_START__ + battler::defense,X
    66	LDX @LOCAL01
    67	JSR CALC_RESIST_DAMAGE
    
    src/battle/smaaaash.asm lines 59–67 at 68aec5c · upstream ↗
    8	STA @VIRTUAL02
    9	LDA #500
    10	JSR RAND_LIMIT
    11	CMP @VIRTUAL02
    12	BCS @UNKNOWN0
    13	LDA #1
    
    src/battle/success_500.asm lines 8–13 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  8. ^EarthBound (US release) keeps EarthBound Beginnings' order of a plain attack, with the "SMAAAASH!!" rolled before the dodge so it can't be dodged, but changes the numbers: the chance comes from the attacker's Guts alone (about Guts in 500) instead of Fight against Fight; the SMAAAASH deals 4 × Offense − Defense instead of the full Offense; a normal hit deals 2 × Offense − Defense instead of Offense − Defense ÷ 2; and the dodge comes from Speed instead of Fight.CodeNathan-R-Og/mother · Herringway/ebsrc
    How we know
    585BATTLE_ACTION1:
    ⋮
    590ba_jumpif BA_CON::IS_CRIT, BA1_CRIT
    ⋮
    596ba_jumpifnot BA_CON::IS_DODGE, BATACT_DODGED_SWIFTLY
    ⋮
    602    BA1_CRIT:
    ⋮
    607ba_misc BA_MISC::DAMAGECALC_CRIT, 0
    
    src/global/battle_data.asm lines 585–608 at e0b3e3f · upstream ↗
    3137BINSTCONDITION2_CRIT:
    ⋮
    3141    lda BATTLER_CORES, y
    ⋮
    3144    lda BATTLER_CORES, y
    ⋮
    3146    jsr DoFightEquation
    
    src/global/prg/battle.asm lines 3137–3146 at e0b3e3f · upstream ↗
    3399; Normal Attack Damage = AttackerOFF - (DefenderDEF / 2)
    3400; If DEF > OFF, Damage = (3 * AttackerOFF - DefenderDEF ) / 4
    ⋮
    3407    sec
    ⋮
    3413    sbc battle_wordvar64
    ⋮
    3419    bcc @SETNUM_WeakBash
    3420    lsr battle_wordvar64+1
    3421    ror battle_wordvar64
    3422    sec
    3423    lda battle_wordvar66
    3424    sbc battle_wordvar64
    3425    sta battle_wordvar60
    
    src/global/prg/battle.asm lines 3399–3428 at e0b3e3f · upstream ↗
    3483; Damage = AttackerOFF
    ⋮
    3487    lda BATTLER_OFF, y
    
    src/global/prg/battle.asm lines 3483–3488 at e0b3e3f · upstream ↗
    11	JSR SMAAAASH
    12	CMP #0
    13	BNE @UNKNOWN1
    14	JSR DETERMINE_DODGE
    15	CMP #0
    16	BNE @UNKNOWN0
    17	JSR BTLACT_LEVEL_2_ATK
    
    src/battle/actions/bash.asm lines 11–17 at 68aec5c · upstream ↗
    11	LDA __BSS_START__ + battler::guts,X
    ⋮
    24	JSR SUCCESS_500
    
    src/battle/smaaaash.asm lines 10–24 at 68aec5c · upstream ↗
    60	LDA __BSS_START__ + battler::offense,X
    61	ASL
    62	ASL
    ⋮
    65	SBC __BSS_START__ + battler::defense,X
    
    src/battle/smaaaash.asm lines 60–65 at 68aec5c · upstream ↗
    8	LDA a:battler::offense,X
    9	ASL
    10	LDX CURRENT_TARGET
    11	SEC
    12	SBC a:battler::defense,X
    
    src/battle/actions/level_2_attack.asm lines 8–12 at 68aec5c · upstream ↗
    34	LDX CURRENT_TARGET
    35	LDA a:battler::speed,X
    36	ASL
    37	LDX CURRENT_ATTACKER
    38	SEC
    39	SBC a:battler::speed,X
    
    src/battle/determine_dodge.asm lines 34–39 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-25.

    Checked by a second AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-25.

    In the claim ledger

  9. ^In EarthBound (US release), every conscious combatant's initiative is rolled at the start of each turn: its Speed moved up or down by up to 50% (the 25% spread's method without the final halving), at least 1. Then the conscious combatant yet to act with the highest initiative goes next, ties going to the later slot.CodeHerringway/ebsrc
    How we know
    1127	LDA a:battler::consciousness,Y
    1128	AND #$00FF
    1129	BEQ @UNKNOWN73
    1130	TYA
    1131	CLC
    1132	ADC #battler::initiative
    1133	STA @VIRTUAL02
    1134	LDA a:battler::speed,Y
    1135	JSR FIFTY_PERCENT_VARIANCE
    1136	LDX @VIRTUAL02
    1137	STA __BSS_START__,X
    1138	CMP #0
    ⋮
    
    src/battle/main_battle_routine.asm lines 1127–1142 at 68aec5c · upstream ↗
    67	LDX @VIRTUAL04
    68	TYA
    69	SEP #PROC_FLAGS::ACCUM8
    70	JSR TRUNCATE_16_TO_8
    71	STA @VIRTUAL02
    72	LDA @VIRTUAL04
    73	SEC
    74	SBC @VIRTUAL02
    
    src/battle/50_percent_variance.asm lines 66–76 at 68aec5c · upstream ↗
    2126	LDA BATTLERS_TABLE+battler::consciousness,Y
    2127	AND #$00FF
    2128	BEQ @UNKNOWN149
    2129	LDA BATTLERS_TABLE+13,Y
    2130	AND #$00FF
    2131	BNE @UNKNOWN149
    2132	LDA BATTLERS_TABLE+70,Y
    2133	TAY
    2134	STX @VIRTUAL02
    2135	TYA
    2136.ENDIF
    2137	CMP @VIRTUAL02
    ⋮
    
    src/battle/main_battle_routine.asm lines 2126–2138 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  10. ^In EarthBound (US release), running away never works against a boss. Otherwise it works on the first turn of a battle the party started with the first strike, or when no enemy can act; else it works with a chance of about (10 × the turn number + the fastest party member's Speed − the fastest able enemy's Speed) in 100, and never when that is below 0.CodeHerringway/ebsrc
    How we know
    1276	LDA @LOCAL07
    1277	CMP #BATTLE_ACTIONS::RUN_AWAY
    ⋮
    1286	CMP #1
    1287	BNE @UNKNOWN85
    1288	LDA #4
    ⋮
    1295@UNKNOWN85:
    1296	LDA #3
    
    src/battle/main_battle_routine.asm lines 1276–1300 at 68aec5c · upstream ↗
    1950@UNKNOWN136:
    1951	LDA a:battler::consciousness,Y
    1952	AND #$00FF
    1953	BEQ @UNKNOWN139
    1954	LDA a:battler::npc_id,Y
    1955	AND #$00FF
    1956	BNE @UNKNOWN139
    1957	LDA a:battler::ally_or_enemy,Y
    1958	AND #$00FF
    1959	CMP #1
    1960	BNE @UNKNOWN138
    ⋮
    1965	ADC #enemy_data::boss
    ⋮
    
    src/battle/main_battle_routine.asm lines 1950–1969 at 68aec5c · upstream ↗
    1999@UNKNOWN138:
    2000	LDA a:battler::speed,Y
    2001	CMP @LOCAL05
    2002	BLTEQ @UNKNOWN139
    2003	STA @LOCAL05
    
    src/battle/main_battle_routine.asm lines 1999–2003 at 68aec5c · upstream ↗
    2019	LDA @VIRTUAL04
    2020	BEQ @UNKNOWN142
    ⋮
    2024	LDA @LOCAL06
    2025.ENDIF
    2026	CMP #4
    2027	BEQ @UNKNOWN142
    ⋮
    2031	LDA @LOCAL0A
    2032.ENDIF
    2033	OPTIMIZED_MULT @VIRTUAL04, 10
    2034	CLC
    2035	ADC @LOCAL05
    ⋮
    2041.ENDIF
    ⋮
    
    src/battle/main_battle_routine.asm lines 2019–2068 at 68aec5c · upstream ↗
    1113.ELSE
    1114	INC @LOCAL0A
    1115.ENDIF
    
    src/battle/main_battle_routine.asm lines 1112–1116 at 68aec5c · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

Sources

Code