data/claims/earthbound.yamlEarthBound (Herringway/ebsrc)
Game: EarthBound.
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. earthbound/rolling-hp
About: EarthBound Rolling HP meter
Value
{
"hpPerUpdate": {
"textSpeed1": 1.125,
"textSpeed2": 1.09375,
"textSpeed3": 1.0625,
"fast": 6.25
},
"slotsPerCycle": 4
}src/battle/set_hp.asm#L23-L64 LDA a:battler::ally_or_enemy,X
AND #$00FF
BNE @UNKNOWN2
LDA a:battler::npc_id,X
AND #$00FF
BNE @UNKNOWN1
TYA
STA a:battler::hp_target,X
…
STA PARTY_CHARACTERS+char_struct::current_hp_target,X
BRA @UNKNOWN3
@UNKNOWN1:
…ebsrc: Source code recreation for the game Earthbound · src/misc/hp_pp_roller.asm#L12-L22 LDA FRAME_COUNTER
AND #$00FF
AND #$0003
…
LDA GAME_STATE + game_state::party_members,Xebsrc: Source code recreation for the game Earthbound · src/misc/hp_pp_roller.asm#L64-L80 — the branch for a meter below its target, i.e. healing LDA FASTEST_HPPP_METER_SPEED
AND #$00FF
BNE @UNKNOWN5
LDA HPPP_METER_FLIPOUT_MODE
BEQ @UNKNOWN6
@UNKNOWN5:
MOVE_INT_CONSTANT $00064000, @VIRTUAL06
BRA @UNKNOWN7
@UNKNOWN6:
JSR UNKNOWN_C20F58
…
ADD_INT_ASSIGN @VIRTUAL06, @VIRTUAL0Aebsrc: Source code recreation for the game Earthbound · src/misc/hp_pp_roller.asm#L109-L127 — the branch for a meter above its target, i.e. damage@UNKNOWN10:
…
LDA HPPP_METER_FLIPOUT_MODE
BEQ @UNKNOWN11
MOVE_INT_CONSTANT $00064000, @VIRTUAL06
BRA @UNKNOWN12
@UNKNOWN11:
JSR UNKNOWN_C20F58
…
SUB_INT_ASSIGN @VIRTUAL06, @VIRTUAL0Aebsrc: Source code recreation for the game Earthbound · src/data/hp_meter_speeds.asm#L2-L5HP_METER_SPEEDS:
.WORD $2000, 1 ;1 + 4/32
.WORD $1800, 1 ;1 + 3/32
.WORD $1000, 1 ;1 + 2/32EarthBound (USA) · 0x3FB1F-0x3FB2A — $C3:FB1F, the three 32-bit rates as the ROM has themebsrc: Source code recreation for the game Earthbound · src/intro/file_select_menu_loop.asm#L665-L678 LDA GAME_STATE+game_state::text_speed
…
LOADPTR HP_METER_SPEEDS, @VIRTUAL0A
…
MOVE_INT @VIRTUAL06, HP_METER_SPEEDebsrc: Source code recreation for the game Earthbound · src/battle/check_dead_players.asm#L43-L63 LDA a:char_struct::current_hp,X
LDX @LOCAL01
STA __BSS_START__,X
…
LDA __BSS_START__,X
BNE @UNKNOWN4
…
LDA #STATUS_0::UNCONSCIOUS
STA a:battler::afflictions + STATUS_GROUP::PERSISTENT_EASYHEAL,Xebsrc: Source code recreation for the game Earthbound · src/battle/main_battle_routine.asm#L3051-L3058@ALLIES_ARE_ALIVE:
LDA #1
JSL COUNT_CHARS
CMP #0
BNEL @UNKNOWN234
@ENEMIES_ARE_DEAD:
STZ @LOCAL03
JSL RESET_HPPP_ROLLINGebsrc: Source code recreation for the game Earthbound · src/misc/reset_hppp_rolling.asm#L37-L50 LDA a:char_struct::current_hp_fraction,Y
BEQ @UNKNOWN2
LDA a:char_struct::current_hp,Y
STA @LOCAL00
…
ADC #char_struct::current_hp_target
…
LDA @LOCAL00
CMP @VIRTUAL04
BLTEQ @UNKNOWN2
STA __BSS_START__,XChecked by claude-agent, 2026-10-21 — read the nine ranges and the ROM's 12 bytes at 0x3FB1F (00 20 01 00, 00 18 01 00, 00 10 01 00: 16.16 fixed point, so $00012000 is 1.125). REDUCE_HP (reduce_hp.asm L9-L26) subtracts from hp_target and calls SET_HP; the roller adds the rate to the 32-bit pair of current_hp_fraction and current_hp, stopping at the target (L52-L89); the decreasing branch (L109-L128) subtracts it and checks only the flip-out flag for the fast rate. CHECK_DEAD_PLAYERS copies the rolled current_hp into the battler and knocks it out at 0. RESET_HPPP_ROLLING raises a target below a mid-roll meter to the meter's value, and gives a conscious member whose meter shows 0 a target of 1 (L28-L35). UNKNOWN_C20F58 halves the rate when HALF_HPPP_METER_SPEED is set. The routine's call rate per frame is not read here.Cited by: EarthBound, Rolling HP meter
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. earthbound/instant-win
About: EarthBound Instant win
Value
{
"offenseMultiplier": 2,
"needsSpeed": true
}src/battle/instant_win_check.asm#L17-L21 LDA BATTLE_INITIATIVE
CMP #INITIATIVE::ENEMIES_FIRST
BNE @UNKNOWN0
LDA #0
JMP @UNKNOWN37ebsrc: Source code recreation for the game Earthbound · src/battle/instant_win_check.asm#L46-L59 CPX #1
BCCL @UNKNOWN6
CPX #4
BGTL @UNKNOWN6
…
LDA PARTY_CHARACTERS+char_struct::speed,X
AND #$00FF
CMP @VIRTUAL04
BCS @UNKNOWN4
STA @VIRTUAL04ebsrc: Source code recreation for the game Earthbound · src/battle/instant_win_check.asm#L130-L137 LDA ENEMIES_IN_BATTLE
CMP @LOCAL08
BLTEQ @UNKNOWN9
LDA #0
JMP @UNKNOWN37
@UNKNOWN9:
LDA BATTLE_INITIATIVE
BNEL @UNKNOWN18ebsrc: Source code recreation for the game Earthbound · src/battle/instant_win_check.asm#L183-L206 ADC #enemy_data::defense
…
ADC #enemy_data::hp
…
ADC @VIRTUAL02
STA @VIRTUAL04
LDA @LOCAL07
STA @VIRTUAL02
ASL
CMP @VIRTUAL04
BCS @UNKNOWN16
LDA #0
…ebsrc: Source code recreation for the game Earthbound · src/battle/instant_win_check.asm#L383-L427 LDA INSTANT_WIN_SORTED_OFFENSE,X
ASL
STA @VIRTUAL04
…
LDA @VIRTUAL04
CMP @VIRTUAL02
BCS @UNKNOWN34
LDA @VIRTUAL04
SEC
SBC @LOCAL05
…
@UNKNOWN34:
…ebsrc: Source code recreation for the game Earthbound · src/battle/init_overworld.asm#L16-L23 JSL INSTANT_WIN_CHECK
CMP #0
BEQ @UNKNOWN2
JSL INSTANT_WIN_HANDLER
STZ BATTLE_MODE
BRA @UNKNOWN5
@UNKNOWN2:
JSL INIT_BATTLE_COMMONChecked by claude-agent, 2026-10-21 — read the six ranges. The status list is L84-L112; the lowest Offense (L61-L72) and Speed are taken over party IDs 1–4 before the status check, so a fallen character's stats still count. The enemy Speed loop is L140-L167; the bubble sorts that follow put Offense (L258-L311) and HP (L312-L374) in descending order once, Defense moving with HP; L380-L427 then walks members and enemies in that order. INSTANT_WIN_HANDLER deposits money and adds experience (instant_win_handler.asm L92, L152-L184). BLTEQ and the signed-branch macros are in include/macros.asm L760-L813.Cited by: EarthBound, Instant win
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. earthbound/contact-initiative
About: EarthBound Visible encounter
Codeebsrc: Source code recreation for the game Earthbound ·src/unknown/C0/C0D19B.asm#L17-L32 LDA TOUCHED_ENEMY
…
ADC #.LOWORD(ENTITY_MOVING_DIRECTIONS)
…
CMP #8
BNE @UNKNOWN0
LDY #0
LDX #1
BRA @UNKNOWN6ebsrc: Source code recreation for the game Earthbound · src/unknown/C0/C0D19B.asm#L49-L99 JSL UNKNOWN_C41EFF
LDY #$2000
CLC
ADC #$1000
JSL DIVISION16S_DIVISOR_POSITIVE
STA @VIRTUAL04
…
SBC @VIRTUAL04
AND #$0007
BEQ @UNKNOWN1
CMP #1
BEQ @UNKNOWN1
…Checked by claude-agent, 2026-10-21 — read both ranges. UNKNOWN_C41EFF takes a position in A and X and a second in Y and $1E and returns the angle from the first to the second: make_party_look_at_active_entity.asm (L50-L79) turns a party member toward an entity with it. Here the first point is the touched enemy and the second the enemy's pathfinding target (L34-L49), so $VIRTUAL04 is the enemy-to-party direction in eighths. Y=1 is the enemy's motion within one eighth of it; X=0 is the leader's facing within one eighth of it, i.e. facing away from the enemy. Direction 8 is no motion.Cited by: EarthBound, Visible encounter
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. earthbound/enemies-flee
About: EarthBound Visible encounter
Value
{
"always": 10,
"threeInFour": 8,
"oneInTwo": 6
}src/unknown/C0/C0C524.asm#L24-L47 OPTIMIZED_ADD battle_entry_ptr_entry::run_away_flag
…
JSL GET_EVENT_FLAG
…
ADC #battle_entry_ptr_entry::run_away_flag_state
…
LDA @LOCAL00
CMP @VIRTUAL02
BNE @UNKNOWN0
LDA #1ebsrc: Source code recreation for the game Earthbound · src/unknown/C0/C0C524.asm#L49-L105 JSL UNKNOWN_C0546B
…
ADC #enemy_data::level
…
OPTIMIZED_MULT @VIRTUAL04, 10
STA @VIRTUAL02
LDY @LOCAL00
TYA
CMP @VIRTUAL02
BLTEQ @UNKNOWN1
LDA #1
…
…ebsrc: Source code recreation for the game Earthbound · src/unknown/C0/C0C615.asm#L2-L11UNKNOWN_C0C615:
REP #PROC_FLAGS::ACCUM8 | PROC_FLAGS::INDEX8 | PROC_FLAGS::CARRY
JSL UNKNOWN_C0C524
CMP #$0000
BEQ @UNKNOWN0
JSL GET_OPPOSITE_DIRECTION_FROM_PLAYER_TO_ENTITYebsrc: Source code recreation for the game Earthbound · src/overworld/spawn_enemies_from_group.asm#L412-L414 JSL RAND
LDX @LOCAL06
STA ENTITY_WEAK_ENEMY_VALUE,XChecked by claude-agent, 2026-10-21 — read the four ranges; UNKNOWN_C0546B (src/unknown/C0/C0546B.asm) sums char_struct::level over the party, skipping members whose ID is 5 or more, the guests. BLTEQ is BCC plus BEQ (macros.asm L760-L763), so each test is a strict "more than". Bytes 192 and up fail the 8× test (64 of 256), and 128 and up the 6× test.Cited by: EarthBound, Visible encounter
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. earthbound/smaaaash
About: EarthBound Critical hit
Value
{
"of": 500,
"partyGutsFloor": 25,
"damage": "4*off - def"
}src/battle/actions/bash.asm#L7-L17 LDA #0
JSR MISS_CALC
CMP #0
BNE @UNKNOWN1
JSR SMAAAASH
CMP #0
BNE @UNKNOWN1
JSR DETERMINE_DODGE
CMP #0
BNE @UNKNOWN0
JSR BTLACT_LEVEL_2_ATKebsrc: Source code recreation for the game Earthbound · src/battle/smaaaash.asm#L10-L26 LDX CURRENT_ATTACKER
LDA __BSS_START__ + battler::guts,X
STA @LOCAL01
…
AND #$00FF
BNE @BYPASS_MINIMUM_GUTS
LDA @LOCAL01
CMP #GUTS_FLOOR_FOR_SMAAAASH_CHANCE
BCS @BYPASS_MINIMUM_GUTS
LDA #GUTS_FLOOR_FOR_SMAAAASH_CHANCE
STA @LOCAL01
@BYPASS_MINIMUM_GUTS:
…ebsrc: Source code recreation for the game Earthbound · include/config.asm#L66.DEFINE GUTS_FLOOR_FOR_SMAAAASH_CHANCE 25ebsrc: Source code recreation for the game Earthbound · src/battle/smaaaash.asm#L59-L67 LDX CURRENT_ATTACKER
LDA __BSS_START__ + battler::offense,X
ASL
ASL
LDX CURRENT_TARGET
SEC
SBC __BSS_START__ + battler::defense,X
LDX @LOCAL01
JSR CALC_RESIST_DAMAGEebsrc: Source code recreation for the game Earthbound · src/battle/success_500.asm#L8-L13 STA @VIRTUAL02
LDA #500
JSR RAND_LIMIT
CMP @VIRTUAL02
BCS @UNKNOWN0
LDA #1Checked by claude-agent, 2026-10-21 — read the five ranges. RAND_LIMIT (rand_limit.asm L9-L14) scales a random byte by the limit and drops 8 bits (TRUNCATE_16_TO_8), so it returns one of 256 values spread over 0–499: Guts 25 succeeds for 13 of 256 bytes, about 5.1%. CALC_RESIST_DAMAGE (calc_damage_reduction.asm) calls no random routine.Cited by: Critical hit, EarthBound
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. earthbound/hit-and-dodge
About: EarthBound Hit chance
Value
{
"missOf": 16,
"unarmedMiss": 1,
"cryingBonus": 8,
"dodgeOf": 500
}src/battle/miss_calc.asm#L40-L56 OPTIMIZED_MULT @VIRTUAL04, .SIZEOF(item)
CLC
ADC #item::params + item_parameters::special
…
LDA f:ITEM_CONFIGURATION_TABLE,X
…
STX @MISS_CHANCE
BRA @UNKNOWN3
@UNKNOWN2:
LDX #1
STX @MISS_CHANCEebsrc: Source code recreation for the game Earthbound · src/battle/miss_calc.asm#L72-L98 ADC #8 ;miss chance + 1/2
…
ADC #enemy_data::miss_rate
…
LDX @MISS_CHANCE
BEQ @UNKNOWN9
LDA #16
JSR RAND_LIMIT
STA @VIRTUAL02
LDX @MISS_CHANCE
TXA
DEC
…ebsrc: Source code recreation for the game Earthbound · src/battle/determine_dodge.asm#L34-L47 LDX CURRENT_TARGET
LDA a:battler::speed,X
ASL
LDX CURRENT_ATTACKER
SEC
SBC a:battler::speed,X
STA @LOCAL00
STA @VIRTUAL02
LDA #0
CLC
SBC @VIRTUAL02
BRANCHGTS @UNKNOWN6
…Checked by claude-agent, 2026-10-21 — read the three ranges; the status exits are determine_dodge.asm L9-L32 and the crying and nauseous checks miss_calc.asm L57-L74. RAND_LIMIT(16) is the random byte's top nibble, so the miss is exactly rate in 16. BRANCHGTS branches when the result is 0 or more as a signed number (macros.asm L797-L804), so −(x+1) ≥ 0 skips the dodge for x ≤ −1, and SUCCESS_500(0) never succeeds.Cited by: EarthBound, Hit chance
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. earthbound/bash-damage
About: EarthBound Damage formula
Value
{
"offenseMultiplier": 2,
"spreadMaxPercent": 25,
"minimum": 1
}src/battle/actions/level_2_attack.asm#L7-L30 LDX CURRENT_ATTACKER
LDA a:battler::offense,X
ASL
LDX CURRENT_TARGET
SEC
SBC a:battler::defense,X
STA @LOCAL00
CLC
SBC #0
BRANCHLTEQS @UNKNOWN2
LDA @LOCAL00
JSR TWENTY_FIVE_PERCENT_VARIANCE
…ebsrc: Source code recreation for the game Earthbound · src/battle/25_percent_variance.asm#L11-L93 STA @VIRTUAL04
JSR RAND_LONG
…
JSR RAND_LONG
…
SBC #$0080
…
TYA
CMP @VIRTUAL02
BLTEQ @UNKNOWN8
LDX @LOCAL01
LDY @VIRTUAL02
…Checked by claude-agent, 2026-10-21 — read both ranges. Y holds each byte's distance from 128 and the smaller is kept (L54-L60); TRUNCATE_16_TO_8 multiplies by it and drops 8 bits, and LSR halves that, so the most is 128/512 = 25%. The signed-branch tests (macros.asm L797-L813) make 128 itself, and a raw damage of 0 or less, skip the spread.Cited by: Damage formula, EarthBound
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. earthbound/turn-order
About: EarthBound Turn order
Value
{
"spreadMaxPercent": 50,
"minimum": 1
}src/battle/main_battle_routine.asm#L1127-L1142 LDA a:battler::consciousness,Y
AND #$00FF
BEQ @UNKNOWN73
TYA
CLC
ADC #battler::initiative
STA @VIRTUAL02
LDA a:battler::speed,Y
JSR FIFTY_PERCENT_VARIANCE
LDX @VIRTUAL02
STA __BSS_START__,X
CMP #0
…ebsrc: Source code recreation for the game Earthbound · src/battle/50_percent_variance.asm#L66-L76 LDX @VIRTUAL04
TYA
SEP #PROC_FLAGS::ACCUM8
JSR TRUNCATE_16_TO_8
STA @VIRTUAL02
LDA @VIRTUAL04
SEC
SBC @VIRTUAL02ebsrc: Source code recreation for the game Earthbound · src/battle/main_battle_routine.asm#L2126-L2138 LDA BATTLERS_TABLE+battler::consciousness,Y
AND #$00FF
BEQ @UNKNOWN149
LDA BATTLERS_TABLE+13,Y
AND #$00FF
BNE @UNKNOWN149
LDA BATTLERS_TABLE+70,Y
TAY
STX @VIRTUAL02
TYA
.ENDIF
CMP @VIRTUAL02
…Checked by claude-agent, 2026-10-21 — read the three ranges. Offset 13 is has_taken_turn and 70 initiative (include/structs.asm); the 16-bit store at L1137 and load at L2132 treat initiative as a word, so a roll above 255 keeps its high byte. The roll loop runs once per turn after the turn counter increments (L1112-L1116).Cited by: EarthBound, Turn order
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. earthbound/run
About: EarthBound Fleeing
Value
{
"perTurn": 10,
"of": 100
}src/battle/main_battle_routine.asm#L1276-L1300 LDA @LOCAL07
CMP #BATTLE_ACTIONS::RUN_AWAY
…
CMP #1
BNE @UNKNOWN85
LDA #4
…
@UNKNOWN85:
LDA #3ebsrc: Source code recreation for the game Earthbound · src/battle/main_battle_routine.asm#L1950-L1969@UNKNOWN136:
LDA a:battler::consciousness,Y
AND #$00FF
BEQ @UNKNOWN139
LDA a:battler::npc_id,Y
AND #$00FF
BNE @UNKNOWN139
LDA a:battler::ally_or_enemy,Y
AND #$00FF
CMP #1
BNE @UNKNOWN138
…
…ebsrc: Source code recreation for the game Earthbound · src/battle/main_battle_routine.asm#L1999-L2003@UNKNOWN138:
LDA a:battler::speed,Y
CMP @LOCAL05
BLTEQ @UNKNOWN139
STA @LOCAL05ebsrc: Source code recreation for the game Earthbound · src/battle/main_battle_routine.asm#L2019-L2068 LDA @VIRTUAL04
BEQ @UNKNOWN142
…
LDA @LOCAL06
.ENDIF
CMP #4
BEQ @UNKNOWN142
…
LDA @LOCAL0A
.ENDIF
OPTIMIZED_MULT @VIRTUAL04, 10
CLC
…ebsrc: Source code recreation for the game Earthbound · src/battle/main_battle_routine.asm#L1112-L1116.ELSE
INC @LOCAL0A
.ENDIFChecked by claude-agent, 2026-10-21 — read the five ranges, following the US (.ELSE) branches: @LOCAL06 holds the battle's initiative (copied at L1011-L1036, PARTY_FIRST = 1 in include/constants/battle.asm) and is cleared after the first turn's run check (L2078-L2083); @LOCAL0A is the turn counter, cleared at L151 and incremented once per turn, so the first turn is 1. Enemies that are asleep, immobilized, solidified, diamondized, or paralyzed are skipped (L1974-L1992).Cited by: EarthBound, Fleeing
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. earthbound/changes-mother
About: EarthBound Critical hit
Codemother: Disassembly of Mother/Earthbound Zero/Earthbound Beginnings for the NES ·src/global/battle_data.asm#L585-L608BATTLE_ACTION1:
…
ba_jumpif BA_CON::IS_CRIT, BA1_CRIT
…
ba_jumpifnot BA_CON::IS_DODGE, BATACT_DODGED_SWIFTLY
…
BA1_CRIT:
…
ba_misc BA_MISC::DAMAGECALC_CRIT, 0mother: Disassembly of Mother/Earthbound Zero/Earthbound Beginnings for the NES · src/global/prg/battle.asm#L3137-L3146BINSTCONDITION2_CRIT:
…
lda BATTLER_CORES, y
…
jsr DoFightEquationmother: Disassembly of Mother/Earthbound Zero/Earthbound Beginnings for the NES · src/global/prg/battle.asm#L3399-L3428; Normal Attack Damage = AttackerOFF - (DefenderDEF / 2)
; If DEF > OFF, Damage = (3 * AttackerOFF - DefenderDEF ) / 4
…
bcc @SETNUM_WeakBash
lsr battle_wordvar64+1
ror battle_wordvar64
sec
lda battle_wordvar66
sbc battle_wordvar64
sta battle_wordvar60mother: Disassembly of Mother/Earthbound Zero/Earthbound Beginnings for the NES · src/global/prg/battle.asm#L3483-L3488; Damage = AttackerOFF
…
lda BATTLER_OFF, yebsrc: Source code recreation for the game Earthbound · src/battle/actions/bash.asm#L11-L17 JSR SMAAAASH
CMP #0
BNE @UNKNOWN1
JSR DETERMINE_DODGE
CMP #0
BNE @UNKNOWN0
JSR BTLACT_LEVEL_2_ATKebsrc: Source code recreation for the game Earthbound · src/battle/smaaaash.asm#L10-L24 LDA __BSS_START__ + battler::guts,X
…
JSR SUCCESS_500ebsrc: Source code recreation for the game Earthbound · src/battle/smaaaash.asm#L60-L65 LDA __BSS_START__ + battler::offense,X
ASL
ASL
…
SBC __BSS_START__ + battler::defense,Xebsrc: Source code recreation for the game Earthbound · src/battle/actions/level_2_attack.asm#L8-L12 LDA a:battler::offense,X
ASL
LDX CURRENT_TARGET
SEC
SBC a:battler::defense,Xebsrc: Source code recreation for the game Earthbound · src/battle/determine_dodge.asm#L34-L39 LDX CURRENT_TARGET
LDA a:battler::speed,X
ASL
LDX CURRENT_ATTACKER
SEC
SBC a:battler::speed,XChecked by claude, 2026-10-25 — read each range in both repos, and BINST60_SETNUMBASH (L3401-L3428), which halves the defense and subtracts it from the offense when the offense is at least the defense; mother1/smaaaash, mother1/bash-damage, and mother1/dodge carry the Mother side's full evidence, earthbound/smaaaash, earthbound/bash-damage, and earthbound/hit-and-dodge EarthBound'sCited by: Critical hit, Damage formula, EarthBound, Hit chance