Mother Brain's brain, neck and legs are all sprites. Her body is BG2 Her laser projectile ($A17B) moves at 4 px/frame if [enemy parameter 1] & 8000h = 0, otherwise 2 px/frame Her laser projectile damage is taken from the enemy header ;;; CGRAM ;;; { BG palette 3: Room background BG palette 4: Mother Brain's body BG palette 5: Room level graphics BG palette 6: Mother Brain's glass BG palette 7: ??? Set by Mother Brain's body, initialised to the same as palette 5 Sprite palette 1: Mother Brain's brain. Exploded escape door particles Sprite palette 2: Rinka / turret. Blue rings. Bombs. Death beam. Zebetites Sprite palette 3: Mother Brain's back leg. Shards of glass Sprite palette 7: Shitroid. Mother Brain's brain whilst/after body explodes. Mother Brain's tube enemy projectiles Drool, laser, elbow charge, rainbow charging particles and purple breath are using palette 5 (common sprites palette) } ;;; WRAM ;;; { Slot ID Enemy Enemy RAM 0 $EC7F Mother Brain (body) $0F78..0FB7 1 $EC3F Mother Brain (brain) $0FB8..0FF7 2 $E27F Zebetites $0FF8..1037 3 $ECBF/$D23F/$ECFF Shitroid / rinka / tubes $1038..1077 4 $D23F/$ECFF Rinka / tubes $1078..10B7 5 $D23F Rinka $10B8..10F7 ; Mother Brain's tubes falling { $0FA8: Function $0FAA: Y position threshold $0FAC: Y velocity. Unit is 1/100h px/frame $0FAE: Smoke timer $0FB0: Smoke counter $0FB4: Parameter 1: tube type { 0/2: Large tube 4/6: Small tube 8: Main tube } $0FB6: Parameter 2: timer for main tube to wait before falling } ; Shitroid in cutscene { $0FA8: Function $0FAA: X velocity. Unit is 1/100h px/frame $0FAC: Y velocity. Unit is 1/100h px/frame $0FAE: Palette frame timer $0FAF: Palette handler timer $0FB0: Palette handler delay. If < Ah then Shitroid draining sound effect is played instead of cry. Initialised to Ah $0FB2: Function timer $7E:7808: Cry sound effect flag. 0 = disabled, 1 = enabled $7E:780A: Cry sound effect timer $7E:780C: Flash timer $7E:780E: Death explosion index $7E:7810: Death explosion timer $7E:7812: Health based palette flag, 0 = disabled, 1 = enabled $7E:7814: Angle. Units of pi/8000h radians, 0 = down, increasing = anti-clockwise $7E:7816: Speed. Unit is 1/100h px/frame $7E:7818: Fade to black palette timer $7E:781A: Fade to black palette index $7E:781C: Movement table pointer. Processed by $C9C3. Set to $CA24 in $C959 { xxxx yyyy aaaa ffff x: Target X position (or next enemy function if $8000+) y: Target Y position a: Acceleration divisor table index (0 is max acceleration) f: Acceleration function } $7E:781E: Palette function $7E:7820: Shaking origin X position $7E:7822: Shaking origin Y position } ; Mother Brain { $0FA8: Mother Brain's body function $0FAA: Unused $0FAC: Zebetites palette animation index (see $A6:FD5E) $0FAE: Mother Brain's brain palette counter (counts from 0 to 8) $0FAF: Mother Brain's brain palette timer $0FB0: Mother Brain's brain palette timer reset value $0FB1: Mother Brain's brain palette set. 0 = normal, 2 = charging her laser $0FB2: { Mother Brain's body function timer Mother Brain's body target X position when firing bomb } $0FB4: { Mother Brain attack cooldown. Cooldown is 40h frames, applied even to non-attempted attacks Mother Brain rainbow beam explosion index Custom Samus X velocity } $0FB6: { Mother Brain rainbow beam explosion timer Custom Samus Y velocity } $0FE8: Mother Brain's brain function $0FF0: { Mother Brain's body subfunction (during tubes collapsing in fake death) Mother Brain death / escape door explosion interval timer } $0FF2: { Mother Brain's body subfunction timer Mother Brain death explosion index. 0..6, index into table of explosion offsets Escape door index. 0..3, index into table of explosion positions } $7E:7800: Mother Brain's form { 0: First phase (in glass jar) 1: Fake death (from the last missile up until she's vulnerable again) 2: Second phase (includes being a corpse due to Shitroid) 3: Drained by Shitroid 4: Third phase } $7E:7802: Initialised to $9C21 (instruction list - Mother Brain's brain - initial) $7E:7804: Mother Brain pose (when body is active) { 0: Standing 1: Walking 2: Crouching transition (including uncrouching) 3: Crouched 4: Death beam mode 6: Leaning down (used when attacking Shitroid and when finishing off Samus) } $7E:7808: Mother Brain hitboxes enabled { 1: Mother Brain body 2: Mother Brain brain 4: Mother Brain's neck } $7E:780C: Disable Mother Brain attacks. Third phase only $7E:780E: Mother Brain walk counter. Mother Brain walks backwards if zero, forwards if 100h $7E:7812: Mother Brain HDMA object index. Used when rising and for rainbow beam $7E:7814: Set to [Mother Brain's body X position] - 50h in neck handler ($A9:91B8). See "MB reference point.png" $7E:7816: Set to [Mother Brain's body Y position] + 2Eh in neck handler ($A9:91B8) $7E:7818: Mother Brain's neck palette index $7E:781A: Mother Brain's brain palette index $7E:781C: Room palette instruction list pointer. Used for flashing effect when first phase ends. Positive instructions point to data for BG1/2 palette 3 colours 4..Fh (18h bytes) and BG1/2 palette 5/7 colours 3..Eh (18h bytes) $7E:781E: Room palette instruction timer. This timer counts up from 1 rather than down to zero(!) $7E:7826: Mother Brain Shitroid attack counter. Counts the number of times Mother Brain fires blue rings at Shitroid whilst it's refilling Samus' energy $7E:7828: Flag. Play Shitroid cry $7E:782A: Number of times to queue rainbow beam sound effect. Initialised to 6, not sure why this isn't just a flag... $7E:782C: Flag. Mother Brain rainbow beam sound effect is playing. Used for resuming sound effect when unpausing $7E:782E: Mother Brain death beam attack phase { 0: Back up 1: Wait for any active bombs 2: Death beam mode is active 3: Finish } $7E:7830: Mother Brain attack phase { 0: Try attack 1: Cooldown 2: End attack } $7E:7834: Mother Brain blue rings target angle. Anti-clockwise where 0 = down. Used as parameter for blue ring enemy projectile $7E:783A: Flag to delete turrets and rinkas. Set to 1 when first phase MB health reaches zero $7E:783C: Rinka counter. Number of on-screen active rinkas (active = moving) $7E:783E: Mother Brain phase 2 corpse state { 0: Initial 1: Turned into corpse by Shitroid 2: Recovered from being a corpse (started attacking Shitroid) } $7E:7840: Mother Brain's brain main shake timer $7E:7842: Mother Brain's body rainbow beam palette animation index $7E:7844: Enable unpause hook. Initialised to 0. Set to 1 when room switches to library background. Set back to 0 when escape timer starts. $7E:784A: Mother Brain bomb counter $7E:784C: Mother Brain painful walking stage. Range 0..7. MB slows down as this value increases Set to 0 when MB gets attacked by Shitroid $7E:784E: Mother Brain painful walking walk animation delay. Set to 2 when MB gets attacked by Shitroid { 2: Really fast 4: Fast 6: Medium 8: Slow Ah: Really slow } $7E:7850: Mother Brain painful walking function. Set to $BFD0 when MB gets attacked by Shitroid $7E:7852: Mother Brain painful walking function timer $7E:7854: Shitroid enemy index $7E:7856: Seemingly never read. Set to 1 when Shitroid runs out of health. Then set to 0 when Shitroid does final charge $7E:7860: Enable Mother Brain's brain palette handling $7E:7862: Enable Mother Brain health-based palette handling $7E:7864: Flag. Mother Brain's drool generation is enabled $7E:7866: Mother Brain's drool enemy projectile parameter, range 0..5 $7E:7868: Flag. Mother Brain's small purple breath generation is enabled $7E:786A: Flag. Mother Brain's small purple breath is active $7E:786C: Samus rainbow palette function $7E:7870: Mother Brain neck function. Used in third phase $7E:7872: Mother Brain neck function timer $7E:7874: Mother Brain walking function. Used in third phase $7E:7876: Mother Brain target X position. Used in third phase $7E:7878: Mother Brain crouch timer. Used in third phase $7E:787A: Samus rainbow palette animation counter. Incremented by 300h, animation doesn't slowing down on the frame wraparound happens... $7E:8000: Mother Brain's brain instruction timer. This timer counts up from 1 rather than down to zero(!) $7E:8002: Mother Brain's brain instruction list pointer. This seems to be used entirely in place of the usual enemy instruction pointer, and instead it's drawn in the enemy graphics drawn hook for some reason $7E:8004: Sprite tiles transfer entry pointer $7E:8006: Mother Brain's death beam next X subposition $7E:8008: Mother Brain's death beam next X position $7E:800A: Mother Brain's death beam next Y subposition $7E:800C: Mother Brain's death beam next Y position $7E:800E: Mother Brain's death beam next X velocity $7E:8010: Mother Brain's death beam next Y velocity $7E:8012: Mother Brain's death beam next angle. Units of pi/80h radians, 0 = down, increasing = anti-clockwise $7E:8022: Mother Brain rainbow beam angle. Units of pi/80h radians, 0 = down, increasing = anti-clockwise $7E:8026: Mother Brain rainbow beam angular width. Units of pi/8000h radians. Increased by 180h up to C00h during rainbow beam $7E:802E: Mother Brain grey transition counter / room lights transition counter $7E:8030: Mother Brain fake death explosion timer $7E:8032: Mother Brain fake death explosion index (into table of explosion positions) $7E:8034: Mother Brain rainbow beam right edge angle (rotationally right). Units of pi/80h radians, 0 = down, increasing = anti-clockwise $7E:8036: Mother Brain rainbow beam left edge angle (rotationally left). Units of pi/80h radians, 0 = down, increasing = anti-clockwise $7E:8038: Mother Brain rainbow beam left origin X position (translationally left). Initialised to ([Mother Brain's brain X position] + Eh) * 100h $7E:803A: Mother Brain rainbow beam origin Y position. Initialised to [Mother Brain's brain Y position] + 5 $7E:803C: Mother Brain rainbow beam right origin X position (translationally right). Initialised to ([Mother Brain's brain X position] + Eh) * 100h $7E:803E: Mother Brain rainbow beam origin Y position. Same as $803A. Used when beam is aimed right, $803A is used otherwise. Initialised to [Mother Brain's brain Y position] + 5 $7E:8040: Mother Brain's lower neck angle (segments 0..2). Units of pi/8000h radians, 0 = down, increasing = anti-clockwise. Initialised to 4800h $7E:8042: Mother Brain's upper neck angle (segments 3..4). Units of pi/8000h radians, 0 = down, increasing = anti-clockwise. Initialised to 5000h $7E:8044: Mother Brain's neck segment 0 X position $7E:8046: Mother Brain's neck segment 0 Y position $7E:8048: Mother Brain's neck segment 0 distance (from neck origin). Initialised to 2 $7E:804A: Mother Brain's neck segment 1 X position $7E:804C: Mother Brain's neck segment 1 Y position $7E:804E: Mother Brain's neck segment 1 distance (from neck origin). Initialised to 10 $7E:8050: Mother Brain's neck segment 2 X position $7E:8052: Mother Brain's neck segment 2 Y position $7E:8054: Mother Brain's neck segment 2 distance (from neck origin). Initialised to 20 $7E:8056: Mother Brain's neck segment 3 X position $7E:8058: Mother Brain's neck segment 3 Y position $7E:805A: Mother Brain's neck segment 3 distance (from neck origin). Initialised to 10 $7E:805C: Mother Brain's neck segment 4 X position $7E:805E: Mother Brain's neck segment 4 Y position $7E:8060: Mother Brain's neck segment 4 distance (from neck origin). Initialised to 20 $7E:8062: Flag to enable Mother Brain neck movement $7E:8064: Mother Brain lower neck movement index. Index for $9072 jump table { 0: Nothing 2: Bob down. Lower neck down to 2800h (then set index 4) 4: Bob up. Raise neck up to 9000h (then set index 2) 6: Lower. Lower neck down to 3000h (then set index 0) 8: Raise. Raise neck up to 9000h (then set index 0) } $7E:8066: Mother Brain upper neck movement index. Index for $9109 jump table { 0: Nothing 2: Bob down. Lower neck down to 2800h (then set index 4). Also set index 4 if [Mother Brain's brain Y position] + 4 >= [Samus Y position] 4: Bob up. Raise neck up to [Mother Brain's lower neck angle] + 800h (then set index 2) 6: Lower. Lower neck down to 3000h (then set index 0) 8: Raise. Raise neck up to [Mother Brain's lower neck angle] + 800h (then set index 0) } $7E:8068: Mother Brain neck angle delta. Positive = move in current direction according to $7E:8064/66, negative = move in opposite direction $7E:8800..15: Rinka spawn point availability table. 0 = available $7E:8864..77: Corpse rotting variables $7E:2000..2FFF: BG2 tilemap (initialised to 0338h). Size = 800h / 140h / 2C6h. Modified by instruction lists via extended tilemap entries $7E:9000..953F: Corpse rotting graphics { $7E:9000..90DF: Row 0 $7E:90E0..91BF: Row 1 $7E:91C0..929F: Row 2 $7E:92A0..937F: Row 3 $7E:9380..945F: Row 4 $7E:9460..953F: Row 5 } $7E:9700..BF: Corpse rotting rot table $7E:9C00..10: Mother Brain rainbow beam indirect HDMA table for window 1 $7E:9D00..??: Mother Brain rainbow beam HDMA data table for window 1. List of 8-bit pairs (left position, right position) } } ;;; Execution flow ;;; { $8687: Mother Brain's body initialisation { Mother Brain's body instruction list pointer = $9C13 Mother Brain's brain function = $87D0 (set up brain to be drawn) Mother Brain's body function = $87E1 (first phase) } $8705: Mother Brain's brain initialisation { Initialise corpse rotting Mother Brain's brain unused instruction list pointer = $9C13 Mother Brain's brain instruction list pointer = $9C21 (initial) } $8B35: Mother Brain's tubes falling initialisation { Enemy instruction pointer = $8C69/$8C6F/$8C75/$8C7B/$8C81 Enemy function = $8B88/$8BCB } $873E: Mother Brain's body main AI / hurt AI { $D01C: Handle room palette Execute Mother Brain's body function $D1E4: Handle Mother Brain's palette { If [$7E:7860] != 0: Handle Mother Brain's brain palette If [$7E:7862] != 0: Mother Brain health-based palette handling } $B3B6: Mother Brain / Samus collision detection $CFD4: Process Mother Brain invincibility palette If [$7E:7844] != 0: Unpause hook = $A9:8763 } $878B: Main AI / hurt AI - enemy $EC3F (Mother Brain's brain) { Enemy graphics drawn hook = RTL If Mother Brain's brain is invisible: Execute Mother Brain's brain function } $8B85: Mother Brain's tubes falling main AI { Go to [enemy function] } Mother Brain's body functions: { $87E1: First phase { If Mother Brain's glass is destroyed and [Samus X position] < ECh and [Mother Brain's brain health] = 0: Mother Brain's body function = $881D (fake death - descent) } $881D: Fake death - descent { $881D: Initial pause $8829: Lock Samus and set scroll region $884D: Queue Mother Brain music $886C: Unlock Samus $8884: Begin screen flashing and lower acid { Mother Brain's body subfunction = $8949 } $88B2: Transition Mother Brain palette to grey $88D3: Collapse tubes { Execute [Mother Brain's body subfunction] $8949: Wait until there are less than 4 enemy projectiles alive and spawn tubes falling enemy 0 $896E: Clear bottom-left tube $8983: Spawn top-right tube falling enemy projectile $89A0: Clear ceiling block column 9 $89B5: Spawn top-left tube falling enemy projectile $89D2: Clear ceiling block column 6 $89E7: Spawn tubes falling enemy 1 $89FA: Clear bottom-left tube $8A0F: Spawn tubes falling enemy 2 $8A22: Clear bottom-middle-side tube $8A37: Spawn top-middle-left tube falling enemy projectile $8A54: Clear ceiling tube column 7 $8A69: Spawn top-middle-right tube falling enemy projectile $8A86: Clear ceiling tube column 8 $8A9B: Spawn tubes falling enemy 3 $8AAE: Clear bottom-middle-side tube $8AC3: Spawn tubes falling enemy 4 $8AD6: Clear bottom-middle tubes { Mother Brain's body subfunction = RTS } } } $8C87: Fake death - ascent { $8C87: Draw room background on BG1 - rows 2/3 $8C9E: Draw room background on BG1 - rows 4/5 $8CB5: Draw room background on BG1 - rows 6/7 $8CCC: Draw room background on BG1 - rows 8/9 $8CE3: Draw room background on BG1 - rows Ah/Bh $8CFA: Draw room background on BG1 - rows Ch/Dh $8D11: Set up Mother Brain phase 2 graphics $8D49: Set up Mother Brain phase 2 brain { Mother Brain's brain function = $87A2 (set up brain and neck to be drawn) } $8D79: Pause for suspense $8D8B: Prepare Mother Brain for rising { Set Mother Brain's brain instruction list to $9C21 (initial) } $8DB4: Load Mother's Brain's legs tiles $8DC3: Continue pausing for suspense $8DEC: Start music and earthquake { Set Mother Brain's body instruction list to $9A02 (crouched) } $8E4D: Raise Mother Brain { Set Mother Brain's body instruction list to $99AA (standing up after crouching - slow) } $8E95: Wait until Mother Brain has finished uncrouching $8EAA: Transition Mother Brain from grey and lower her head { Mother Brain's body function = $8EF5 (second phase - stretching) } } $8EF5: Second phase - stretching { $8EF5: Shake head menacingly { Set Mother Brain's brain instruction list to $9B7F (stretching) } $8F14: Bring head back up $8F33: Finish stretching { Mother Brain's body function = $B605 (thinking) } } $B605: Second phase - thinking { If [Mother Brain's brain health] = 0: { Mother Brain's body function = $B8EB (firing rainbow beam) } Else if [Mother Brain's pose] = standing: { If [Mother Brain's brain health] >= 4500 and [random number] < 1000h or [Mother Brain's brain health] < 4500 and [random number] >= A000h: { Mother Brain's body function = $B64B (try attack) } If [Mother Brain's brain health] < 4500 and 2000h <= [random number] < A000h: { Mother Brain's body function = $B87D (firing death beam) } If [Mother Brain's brain health] < 4500 and [random number] < 2000h or [Mother Brain's brain health] >= 4500 and [random number] >= 1000h: { Set Mother Brain's body instruction list to $97A4/$98C6 (walking forwards/backwards) } } } $B64B: Second phase - try attack { If [Mother Brain attack phase] = 0 (try attack): { If decided bomb: Mother Brain's body function = $B781 (firing bomb) If decided laser: Mother Brain's body function = $B80E (firing laser) If decided blue rings: Set Mother Brain's brain instruction list to $9D3D (attacking - four blue rings) If decided neutral: Set Mother Brain's brain instruction list to $9C87 (neutral) } If [Mother Brain attack phase] = 2 (end attack): Mother Brain's body function = $B605 (thinking) } $B80E: Second phase - firing laser { $B80E: Position head quickly $B839: Position head slowly and fire { Set Mother Brain's brain instruction list to $9F34 (attacking - laser) } $B863: Finish attack { Mother Brain's body function = $B605 (thinking) } } $B87D: Second phase - firing death beam { Set Mother Brain's body instruction list to $9A42 (death beam mode) Set Mother Brain's brain instruction list to $9C87 (neutral) Mother Brain's body function = $B605 (thinking) } $B8EB: Second phase - firing rainbow beam { $B8EB: Extend neck up { Set Mother Brain's brain instruction list to $9C87 (neutral) } $B91A: Start charging rainbow beam { Set Mother Brain's brain instruction list to $9F6C (charging rainbow beam) } $B92B: Retract neck $B93F: Wait for beam to charge $B951: Extend neck down $B975: Start firing rainbow beam { Set Mother Brain's brain instruction list to $9C77 (firing rainbow beam) } $B9E5: Move Samus towards wall $BA00: 1 frame delay $BA27: Start draining Samus $BA3C: Draining Samus $BA5E: Finish firing rainbow beam { Set Mother Brain's brain instruction list to $9C87 (neutral) } $BAC4: Let Samus fall $BAD1: Wait for Samus to hit ground $BADD: Lower head $BB06: Decide next action { If [Samus health] >= 400: Mother Brain's body function = $B8EB (firing rainbow beam) Else: Mother Brain's body function = $BD45 (finish Samus off) } } $BD45: Second phase - finish Samus off { $BD45: Get Samus to low health { Set Mother Brain's brain instruction list to $9D7F (attacking - two blue rings) / $9ECC (attacking - bomb) } $BD98: Stand up $BDA9: Admire job well done { Set Mother Brain's brain instruction list to $9B7F (stretching) } $BDC1: Charge final rainbow beam { Set Mother Brain's brain instruction list to $9F6C (charging rainbow beam) } $BDD2: Charge final rainbow beam / load Shitroid $BDED: Fire final rainbow beam { Set Mother Brain's brain instruction list to $9C77 (firing rainbow beam) Mother Brain's body function = RTS } } $BE38: Drained by Shitroid { ; Set by $C889 (Shitroid function - activate rainbow beam and Mother Brain's body) $BE38: Taken aback by Shitroid $BE5D: Regain balance $BE96: Firing rainbow beam $BF0E: Rainbow beam has run out { Set Mother Brain's brain instruction list to $9C39 (dying drool) } $BF41: Move to back of room $BF56: Go into low power mode $BF7D: Prepare transition to grey $BF95: Transition to grey { Mother Brain's body function = $C059 (revive self) } } $C059: Second phase - revive self { $C059: Inanimate grey $C066: Show signs of life $C082: Prepare transition from grey $C08F: Transition from grey $C0BA: Wake up $C0E4: Wake-up stretch { Set Mother Brain's brain instruction list to $9BB3 (stretching - phase 3) } $C0FB: Walk up to Shitroid $C11E: Prepare neck for Shitroid murder $C147: Finish preparing for Shitroid murder { Mother Brain's body function = $C15C (murder Shitroid) } } $C15C: Second phase - murder Shitroid { $C15C: Attack Shitroid $C182: Shitroid attack cooldown { Mother Brain's body function = $C15C (attack Shitroid) } } $C18E: Second phase - prepare for final Shitroid attack { ; Set by $CB13 (Shitroid function - release Samus) } $C19A: Second phase - execute final Shitroid attack { ; Set by $CB7B (Shitroid function - move to final charge start position) Set Mother Brain's brain instruction list to $9DB1 (attacking Shitroid) } $C1CF: Third phase - recover from cutscene { ; Set by $CCF0 (Shitroid function - finish cutscene) $C1CF: Make some distance $C1F0: Set up for fighting { Mother Brain's body function = $C209 (third phase - fighting) } } $C209: Third phase - fighting { $C209: Main { If [Mother Brain's brain health] = 0: Mother Brain's body function = $AEE1 (death sequence) } $C24E: Attack cooldown { Mother Brain's body function = $C209 (main) } } $AEE1: Third phase - death sequence { $AEE1: Move to back of room $AF12: Idle whilst exploding $AF21: Stumble to middle of room and drool { Set Mother Brain's brain instruction list to $9C39 (dying drool) } $AF54: Disable brain effects $AF9D: Set up body fade out $AFB6: Fade out body $B013: Final few explosions $B115: Realise decapitation { Set Mother Brain's brain instruction list to $9C29 (decapitated) Mother Brain's brain function = $87D0 (stop drawing neck) } $B12D: Brain falls to ground $B15E: Load corpse tiles $B173: Set up fade to grey $B189: Fade to grey { Set Mother Brain's brain instruction list to $9D25 (corpse) } $B1B8: Corpse tips over $B1D5: Corpse rots away $B211: 20 frame delay $B258: Load escape timer tiles $B26D: Start escape sequence { If Japanese text is disabled: Mother Brain's body function = $B2E3 (type out Zebes escape text) } $B2D1: Spawn time bomb set Japanese text $B2E3: Type out Zebes escape text $B2F9: Escape door is exploding, start escape timer $B32A: Blow up escape door $B33C: Keep earthquake going } $B781: Firing bomb { $B781: Decide on walking $B7AC: Walking backwards $B7C6: Crouch $B7E8: Fired bomb $B7F8: Stand up { Mother Brain's body function = $B605/$C15C (thinking) } } } Mother Brain's brain functions: { $87D0: Set up brain to be drawn $87A2: Set up brain and neck to be drawn } Mother Brain's tubes falling functions { $8B88: Non-main tube { If [enemy Y position] >= [enemy Y position threshold]: Delete enemy } $8BCB: Main tube { $8BCB: Waiting to fall $8BD6: Falling { If [Mother Brain's brain Y position] >= C4h: { Disable HDMA object 0 Disable HDMA object 1 Mother Brain's body function = $8C87 (fake death - ascent) Delete enemy } } } } } ;;; Enemy headers ;;; { __________________________ $EC3F: Mother Brain's brain | ___________________ $EC7F: Mother Brain's body | | ____________ $ECBF: Shitroid in cutscene | | | _____ $ECFF: Mother Brain's tubes falling | | | | 1000 8600 0000 0000 ; 0: Tile data size 9472 9472 F8E6 9472 ; 2: Palette 4650 4650 0C80 03E8 ; 4: Health 0078 0078 0028 0000 ; 6: Damage 0010 0008 0024 0000 ; 8: Width 0010 0008 0024 0000 ; Ah: Height A9 A9 A9 A9 ; Ch: Bank 00 00 00 00 ; Dh: Hurt AI time 0000 0000 0000 0000 ; Eh: Cry 000A 0000 0000 0000 ; 10h: Boss value 8705 8687 C710 8B35 ; 12h: Initialisation AI 0001 0001 0001 0001 ; 14h: Number of parts 878B 873E C779 8B85 ; 18h: Main AI 800F 800F 800F 800F ; 1Ah: Grapple AI 878B 873E 804C 804C ; 1Ch: Hurt AI 8041 8041 8041 8041 ; 1Eh: Frozen AI 0000 0000 0000 0000 ; 20h: X-ray AI 0000 0000 0000 0000 ; 22h: Death animation 8787 8787 0000 0000 ; 28h: Power bomb reaction B5C6 B5C5 CF03 804C ; 30h: Enemy touch B507 B503 804C 804C ; 32h: Enemy shot B78000 B0E800 B18400 B78000 ; 36h: Tile data 05 05 02 05 ; 39h: Layer F49A F3F8 F4A0 0000 ; 3Ah: Drop chances ($B4) F1C8 F1DE EC1C EC1C ; 3Ch: Vulnerabilities ($B4) 0000 0000 0000 0000 ; 3Eh: Enemy name ($B4) } ;;; Enemy vulnerabilities ;;; { ; Vulnerability format: ; v = fddddddd ; If v = FFh: ; Freeze, no damage ; Else: ; d: Damage multiplier * 2. If charged beam, damage multiplier * 2 = d & Fh (why?) ; f: Does not freeze ; _________________________________________________________________ 0: Power ; | ______________________________________________________________ 1: Wave ; | | ___________________________________________________________ 2: Ice ; | | | ________________________________________________________ 3: Ice + wave ; | | | | _____________________________________________________ 4: Spazer ; | | | | | __________________________________________________ 5: Spazer + wave ; | | | | | | _______________________________________________ 6: Spazer + ice ; | | | | | | | ____________________________________________ 7: Spazer + ice + wave ; | | | | | | | | _________________________________________ 8: Plasma ; | | | | | | | | | ______________________________________ 9: Plasma + wave ; | | | | | | | | | | ___________________________________ Ah: Plasma + ice ; | | | | | | | | | | | ________________________________ Bh: Plasma + ice + wave ; | | | | | | | | | | | | ; | | | | | | | | | | | | ____________________________ Ch: Missile ; | | | | | | | | | | | | | _________________________ Dh: Super missile ; | | | | | | | | | | | | | | ______________________ Eh: Bomb ; | | | | | | | | | | | | | | | ___________________ Fh: Power bomb ; | | | | | | | | | | | | | | | | ________________ 10h: Speed booster ; | | | | | | | | | | | | | | | | | _____________ 11h: Shinespark ; | | | | | | | | | | | | | | | | | | __________ 12h: Screw attack ; | | | | | | | | | | | | | | | | | | | _______ 13h: Charged beam ; | | | | | | | | | | | | | | | | | | | | ____ 14h: Pseudo screw attack ; | | | | | | | | | | | | | | | | | | | | | _ 15h: Unused ; | | | | | | | | | | | | | | | | | | | | | | $B4:EC1C db 02,02,02,02,02,02,02,02,02,02,02,02, 02,02,02,02,02,02,02,02,02,02 ; Default. Shitroid in cutscene / Mother Brain's tubes falling $B4:F1C8 db 80,80,80,80,80,80,80,80,80,80,80,80, 82,82,80,80,80,80,80,02,80,80 ; Mother Brain's brain $B4:F1DE db 80,80,80,80,80,80,80,80,80,80,80,80, 80,80,80,80,80,80,80,00,80,80 ; Mother Brain's body } ;;; Enemy drop chances ;;; { ; ________________ ; 0: Small health ; | _____________ ; 1: Big health ; | | __________ ; 2: Missiles ; | | | _______ ; 3: Nothing ; | | | | ____ ; 4: Super missiles ; | | | | | _ ; 5: Power bombs ; | | | | | | $B4:F3F8 db 32,32,32,00,32,37 ; 19.6% 19.6% 19.6% 19.6% 21.6% - Mother Brain's body $B4:F49A db 00,00,00,FF,00,00 ; 100.0% - Mother Brain's brain $B4:F4A0 db 00,00,00,FF,00,00 ; 100.0% - Shitroid in cutscene } ;;; Room FX data ;;; { ; ____________________________________________ Door pointer ; | ; | ______________________________________ Base Y position ; | | _________________________________ Target Y position ; | | | ____________________________ Y velocity ; | | | | ; | | | | ______________________ Timer ; | | | | | ___________________ Type (foreground layer 3) ; | | | | | | ________________ Default layer blending configuration (FX A) ; | | | | | | | _____________ FX layer 3 layer blending configuration (FX B) ; | | | | | | | | __________ FX liquid options (FX C) ; | | | | | | | | | _______ Palette FX bitset ; | | | | | | | | | | ____ Animated tiles bitset ; | | | | | | | | | | | _ Palette blend ; | | | | | | | | | | | | $83:A0A4 dx 0000, 00E8,FFFF,0000, 10,04,02,1E,01,02,00,02 ; Entry 0 $83:A0B4 dx 0000, 00E8,00B8,FFF0, 10,04,02,1E,01,02,00,02 ; Entry 1 - raise acid $83:A0C4 dx 0000, 00B8,00E8,0030, 10,04,02,1E,01,02,00,02 ; Entry 2 - lower acid }