### RAW ASSEMBLY INSTRUCTIONS:

glabel calc_player_damage_enemy
/* 1A0224 80271944 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* 1A0228 80271948 AFB40048 */  sw        $s4, 0x48($sp)
/* 1A022C 8027194C 3C14800E */  lui       $s4, %hi(gBattleStatus)
/* 1A0230 80271950 2694C070 */  addiu     $s4, $s4, %lo(gBattleStatus)
/* 1A0234 80271954 AFBF005C */  sw        $ra, 0x5C($sp)
/* 1A0238 80271958 AFBE0058 */  sw        $fp, 0x58($sp)
/* 1A023C 8027195C AFB70054 */  sw        $s7, 0x54($sp)
/* 1A0240 80271960 AFB60050 */  sw        $s6, 0x50($sp)
/* 1A0244 80271964 AFB5004C */  sw        $s5, 0x4C($sp)
/* 1A0248 80271968 AFB30044 */  sw        $s3, 0x44($sp)
/* 1A024C 8027196C AFB20040 */  sw        $s2, 0x40($sp)
/* 1A0250 80271970 AFB1003C */  sw        $s1, 0x3C($sp)
/* 1A0254 80271974 AFB00038 */  sw        $s0, 0x38($sp)
/* 1A0258 80271978 AFA00020 */  sw        $zero, 0x20($sp)
/* 1A025C 8027197C AFA00028 */  sw        $zero, 0x28($sp)
/* 1A0260 80271980 AFA0002C */  sw        $zero, 0x2C($sp)
/* 1A0264 80271984 AFA00030 */  sw        $zero, 0x30($sp)
/* 1A0268 80271988 AFA0001C */  sw        $zero, 0x1C($sp)
/* 1A026C 8027198C AFA00024 */  sw        $zero, 0x24($sp)
/* 1A0270 80271990 8E8800D8 */  lw        $t0, 0xD8($s4)
/* 1A0274 80271994 0000B02D */  daddu     $s6, $zero, $zero
/* 1A0278 80271998 A2800199 */  sb        $zero, 0x199($s4)
/* 1A027C 8027199C A6800180 */  sh        $zero, 0x180($s4)
/* 1A0280 802719A0 AFA80018 */  sw        $t0, 0x18($sp)
/* 1A0284 802719A4 968301A0 */  lhu       $v1, 0x1A0($s4)
/* 1A0288 802719A8 868401A0 */  lh        $a0, 0x1A0($s4)
/* 1A028C 802719AC 928201A2 */  lbu       $v0, 0x1A2($s4)
/* 1A0290 802719B0 95050192 */  lhu       $a1, 0x192($t0)
/* 1A0294 802719B4 829001A2 */  lb        $s0, 0x1A2($s4)
/* 1A0298 802719B8 02C0B82D */  daddu     $s7, $s6, $zero
/* 1A029C 802719BC A68301A4 */  sh        $v1, 0x1A4($s4)
/* 1A02A0 802719C0 A28201A6 */  sb        $v0, 0x1A6($s4)
/* 1A02A4 802719C4 0C09A75B */  jal       get_actor
/* 1A02A8 802719C8 A68501A8 */   sh       $a1, 0x1A8($s4)
/* 1A02AC 802719CC 8FA80018 */  lw        $t0, 0x18($sp)
/* 1A02B0 802719D0 0040982D */  daddu     $s3, $v0, $zero
/* 1A02B4 802719D4 16600003 */  bnez      $s3, .L802719E4
/* 1A02B8 802719D8 2512000C */   addiu    $s2, $t0, 0xC
/* 1A02BC 802719DC 0809CC63 */  j         .L8027318C
/* 1A02C0 802719E0 02C0102D */   daddu    $v0, $s6, $zero
.L802719E4:
/* 1A02C4 802719E4 0260202D */  daddu     $a0, $s3, $zero
/* 1A02C8 802719E8 0C099117 */  jal       get_actor_part
/* 1A02CC 802719EC 0200282D */   daddu    $a1, $s0, $zero
/* 1A02D0 802719F0 0040F02D */  daddu     $fp, $v0, $zero
/* 1A02D4 802719F4 57C00003 */  bnel      $fp, $zero, .L80271A04
/* 1A02D8 802719F8 A66001F8 */   sh       $zero, 0x1F8($s3)
.L802719FC:
/* 1A02DC 802719FC 0809C67F */  j         .L802719FC
/* 1A02E0 80271A00 00000000 */   nop
.L80271A04:
/* 1A02E4 80271A04 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A02E8 80271A08 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A02EC 80271A0C 30420800 */  andi      $v0, $v0, 0x800
/* 1A02F0 80271A10 10400003 */  beqz      $v0, .L80271A20
/* 1A02F4 80271A14 24150002 */   addiu    $s5, $zero, 0x2
/* 1A02F8 80271A18 0809C965 */  j         .L80272594
/* 1A02FC 80271A1C 24110017 */   addiu    $s1, $zero, 0x17
.L80271A20:
/* 1A0300 80271A20 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A0304 80271A24 0C099CAB */  jal       player_team_is_ability_active
/* 1A0308 80271A28 2405000D */   addiu    $a1, $zero, 0xD
/* 1A030C 80271A2C 10400006 */  beqz      $v0, .L80271A48
/* 1A0310 80271A30 3C021000 */   lui      $v0, (0x10000000 >> 16)
/* 1A0314 80271A34 8E830188 */  lw        $v1, 0x188($s4)
/* 1A0318 80271A38 00621024 */  and       $v0, $v1, $v0
/* 1A031C 80271A3C 14400002 */  bnez      $v0, .L80271A48
/* 1A0320 80271A40 34620008 */   ori      $v0, $v1, 0x8
/* 1A0324 80271A44 AE820188 */  sw        $v0, 0x188($s4)
.L80271A48:
/* 1A0328 80271A48 8FC4007C */  lw        $a0, 0x7C($fp)
/* 1A032C 80271A4C 30820020 */  andi      $v0, $a0, 0x20
/* 1A0330 80271A50 144005CE */  bnez      $v0, .L8027318C
/* 1A0334 80271A54 24020006 */   addiu    $v0, $zero, 0x6
/* 1A0338 80271A58 82630218 */  lb        $v1, 0x218($s3)
/* 1A033C 80271A5C 2402000E */  addiu     $v0, $zero, 0xE
/* 1A0340 80271A60 10620007 */  beq       $v1, $v0, .L80271A80
/* 1A0344 80271A64 30820800 */   andi     $v0, $a0, 0x800
/* 1A0348 80271A68 10400007 */  beqz      $v0, .L80271A88
/* 1A034C 80271A6C 00000000 */   nop
/* 1A0350 80271A70 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0354 80271A74 30420800 */  andi      $v0, $v0, 0x800
/* 1A0358 80271A78 14400003 */  bnez      $v0, .L80271A88
/* 1A035C 80271A7C 00000000 */   nop
.L80271A80:
/* 1A0360 80271A80 0809CC63 */  j         .L8027318C
/* 1A0364 80271A84 24020006 */   addiu    $v0, $zero, 0x6
.L80271A88:
/* 1A0368 80271A88 82630214 */  lb        $v1, 0x214($s3)
/* 1A036C 80271A8C 2402000C */  addiu     $v0, $zero, 0xC
/* 1A0370 80271A90 14620019 */  bne       $v1, $v0, .L80271AF8
/* 1A0374 80271A94 2404010C */   addiu    $a0, $zero, 0x10C
/* 1A0378 80271A98 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A037C 80271A9C E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A0380 80271AA0 8E46000C */  lw        $a2, 0xC($s2)
/* 1A0384 80271AA4 8E470010 */  lw        $a3, 0x10($s2)
/* 1A0388 80271AA8 0C052757 */  jal       sfx_play_sound_at_position
/* 1A038C 80271AAC 0000282D */   daddu    $a1, $zero, $zero
/* 1A0390 80271AB0 24020001 */  addiu     $v0, $zero, 0x1
/* 1A0394 80271AB4 AFA20010 */  sw        $v0, 0x10($sp)
/* 1A0398 80271AB8 AFA20014 */  sw        $v0, 0x14($sp)
/* 1A039C 80271ABC C64C000C */  lwc1      $f12, 0xC($s2)
/* 1A03A0 80271AC0 C64E0010 */  lwc1      $f14, 0x10($s2)
/* 1A03A4 80271AC4 8E460014 */  lw        $a2, 0x14($s2)
/* 1A03A8 80271AC8 0C093BF8 */  jal       func_8024EFE0
/* 1A03AC 80271ACC 0000382D */   daddu    $a3, $zero, $zero
/* 1A03B0 80271AD0 AFA00010 */  sw        $zero, 0x10($sp)
/* 1A03B4 80271AD4 C64C000C */  lwc1      $f12, 0xC($s2)
/* 1A03B8 80271AD8 C64E0010 */  lwc1      $f14, 0x10($s2)
/* 1A03BC 80271ADC 8E460014 */  lw        $a2, 0x14($s2)
/* 1A03C0 80271AE0 0C09996B */  jal       show_next_damage_popup
/* 1A03C4 80271AE4 0000382D */   daddu    $a3, $zero, $zero
/* 1A03C8 80271AE8 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A03CC 80271AEC 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A03D0 80271AF0 0809C963 */  j         .L8027258C
/* 1A03D4 80271AF4 30420240 */   andi     $v0, $v0, 0x240
.L80271AF8:
/* 1A03D8 80271AF8 8FC20080 */  lw        $v0, 0x80($fp)
/* 1A03DC 80271AFC 8E830188 */  lw        $v1, 0x188($s4)
/* 1A03E0 80271B00 00431024 */  and       $v0, $v0, $v1
/* 1A03E4 80271B04 10400003 */  beqz      $v0, .L80271B14
/* 1A03E8 80271B08 30620080 */   andi     $v0, $v1, 0x80
/* 1A03EC 80271B0C 24080001 */  addiu     $t0, $zero, 0x1
/* 1A03F0 80271B10 AFA8001C */  sw        $t0, 0x1C($sp)
.L80271B14:
/* 1A03F4 80271B14 1040000A */  beqz      $v0, .L80271B40
/* 1A03F8 80271B18 3C031000 */   lui      $v1, (0x10000040 >> 16)
/* 1A03FC 80271B1C 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A0400 80271B20 30420010 */  andi      $v0, $v0, 0x10
/* 1A0404 80271B24 10400006 */  beqz      $v0, .L80271B40
/* 1A0408 80271B28 00000000 */   nop
/* 1A040C 80271B2C 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A0410 80271B30 0C099CAB */  jal       player_team_is_ability_active
/* 1A0414 80271B34 24050002 */   addiu    $a1, $zero, 0x2
/* 1A0418 80271B38 1040005C */  beqz      $v0, .L80271CAC
/* 1A041C 80271B3C 3C031000 */   lui      $v1, (0x10000040 >> 16)
.L80271B40:
/* 1A0420 80271B40 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0424 80271B44 34630040 */  ori       $v1, $v1, (0x10000040 & 0xFFFF)
/* 1A0428 80271B48 00431024 */  and       $v0, $v0, $v1
/* 1A042C 80271B4C 1440002E */  bnez      $v0, .L80271C08
/* 1A0430 80271B50 00000000 */   nop
/* 1A0434 80271B54 8FC3007C */  lw        $v1, 0x7C($fp)
/* 1A0438 80271B58 30628000 */  andi      $v0, $v1, 0x8000
/* 1A043C 80271B5C 1040000D */  beqz      $v0, .L80271B94
/* 1A0440 80271B60 240400E2 */   addiu    $a0, $zero, 0xE2
/* 1A0444 80271B64 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0448 80271B68 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A044C 80271B6C 8E46000C */  lw        $a2, 0xC($s2)
/* 1A0450 80271B70 8E470010 */  lw        $a3, 0x10($s2)
/* 1A0454 80271B74 0C052757 */  jal       sfx_play_sound_at_position
/* 1A0458 80271B78 0000282D */   daddu    $a1, $zero, $zero
/* 1A045C 80271B7C 24040001 */  addiu     $a0, $zero, 0x1
/* 1A0460 80271B80 0C09CCEA */  jal       dispatch_damage_event_player_1
/* 1A0464 80271B84 2405002C */   addiu    $a1, $zero, 0x2C
/* 1A0468 80271B88 0260202D */  daddu     $a0, $s3, $zero
/* 1A046C 80271B8C 0809C737 */  j         .L80271CDC
/* 1A0470 80271B90 24050022 */   addiu    $a1, $zero, 0x22
.L80271B94:
/* 1A0474 80271B94 30620002 */  andi      $v0, $v1, 0x2
/* 1A0478 80271B98 1040001B */  beqz      $v0, .L80271C08
/* 1A047C 80271B9C 00000000 */   nop
/* 1A0480 80271BA0 8E82018C */  lw        $v0, 0x18C($s4)
/* 1A0484 80271BA4 30420010 */  andi      $v0, $v0, 0x10
/* 1A0488 80271BA8 14400017 */  bnez      $v0, .L80271C08
/* 1A048C 80271BAC 00000000 */   nop
/* 1A0490 80271BB0 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A0494 80271BB4 0C099CAB */  jal       player_team_is_ability_active
/* 1A0498 80271BB8 24050007 */   addiu    $a1, $zero, 0x7
/* 1A049C 80271BBC 14400012 */  bnez      $v0, .L80271C08
/* 1A04A0 80271BC0 00000000 */   nop
/* 1A04A4 80271BC4 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A04A8 80271BC8 0C099CAB */  jal       player_team_is_ability_active
/* 1A04AC 80271BCC 2405000D */   addiu    $a1, $zero, 0xD
/* 1A04B0 80271BD0 1440000D */  bnez      $v0, .L80271C08
/* 1A04B4 80271BD4 240400E2 */   addiu    $a0, $zero, 0xE2
/* 1A04B8 80271BD8 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A04BC 80271BDC E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A04C0 80271BE0 8E46000C */  lw        $a2, 0xC($s2)
/* 1A04C4 80271BE4 8E470010 */  lw        $a3, 0x10($s2)
/* 1A04C8 80271BE8 0C052757 */  jal       sfx_play_sound_at_position
/* 1A04CC 80271BEC 0000282D */   daddu    $a1, $zero, $zero
/* 1A04D0 80271BF0 24040001 */  addiu     $a0, $zero, 0x1
/* 1A04D4 80271BF4 0C09CCEA */  jal       dispatch_damage_event_player_1
/* 1A04D8 80271BF8 2405002C */   addiu    $a1, $zero, 0x2C
/* 1A04DC 80271BFC 0260202D */  daddu     $a0, $s3, $zero
/* 1A04E0 80271C00 0809C737 */  j         .L80271CDC
/* 1A04E4 80271C04 2405001C */   addiu    $a1, $zero, 0x1C
.L80271C08:
/* 1A04E8 80271C08 3C10800E */  lui       $s0, %hi(gBattleStatus)
/* 1A04EC 80271C0C 2610C070 */  addiu     $s0, $s0, %lo(gBattleStatus)
/* 1A04F0 80271C10 8E020000 */  lw        $v0, 0x0($s0)
/* 1A04F4 80271C14 30420020 */  andi      $v0, $v0, 0x20
/* 1A04F8 80271C18 10400012 */  beqz      $v0, .L80271C64
/* 1A04FC 80271C1C 3C031000 */   lui      $v1, (0x10000040 >> 16)
/* 1A0500 80271C20 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0504 80271C24 30420002 */  andi      $v0, $v0, 0x2
/* 1A0508 80271C28 1040000E */  beqz      $v0, .L80271C64
/* 1A050C 80271C2C 00000000 */   nop
/* 1A0510 80271C30 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A0514 80271C34 30420600 */  andi      $v0, $v0, 0x600
/* 1A0518 80271C38 1040000A */  beqz      $v0, .L80271C64
/* 1A051C 80271C3C 240400E2 */   addiu    $a0, $zero, 0xE2
/* 1A0520 80271C40 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0524 80271C44 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A0528 80271C48 8E46000C */  lw        $a2, 0xC($s2)
/* 1A052C 80271C4C 8E470010 */  lw        $a3, 0x10($s2)
/* 1A0530 80271C50 0C052757 */  jal       sfx_play_sound_at_position
/* 1A0534 80271C54 0000282D */   daddu    $a1, $zero, $zero
/* 1A0538 80271C58 0260202D */  daddu     $a0, $s3, $zero
/* 1A053C 80271C5C 0809C95F */  j         .L8027257C
/* 1A0540 80271C60 24050022 */   addiu    $a1, $zero, 0x22
.L80271C64:
/* 1A0544 80271C64 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0548 80271C68 34630040 */  ori       $v1, $v1, (0x10000040 & 0xFFFF)
/* 1A054C 80271C6C 00431024 */  and       $v0, $v0, $v1
/* 1A0550 80271C70 1440001E */  bnez      $v0, .L80271CEC
/* 1A0554 80271C74 3C030020 */   lui      $v1, (0x200000 >> 16)
/* 1A0558 80271C78 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A055C 80271C7C 00431024 */  and       $v0, $v0, $v1
/* 1A0560 80271C80 1040001A */  beqz      $v0, .L80271CEC
/* 1A0564 80271C84 00000000 */   nop
/* 1A0568 80271C88 8E82018C */  lw        $v0, 0x18C($s4)
/* 1A056C 80271C8C 30420080 */  andi      $v0, $v0, 0x80
/* 1A0570 80271C90 14400016 */  bnez      $v0, .L80271CEC
/* 1A0574 80271C94 00000000 */   nop
/* 1A0578 80271C98 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A057C 80271C9C 0C099CAB */  jal       player_team_is_ability_active
/* 1A0580 80271CA0 24050002 */   addiu    $a1, $zero, 0x2
/* 1A0584 80271CA4 14400011 */  bnez      $v0, .L80271CEC
/* 1A0588 80271CA8 00000000 */   nop
.L80271CAC:
/* 1A058C 80271CAC C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0590 80271CB0 24040108 */  addiu     $a0, $zero, 0x108
/* 1A0594 80271CB4 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A0598 80271CB8 8E46000C */  lw        $a2, 0xC($s2)
/* 1A059C 80271CBC 8E470010 */  lw        $a3, 0x10($s2)
/* 1A05A0 80271CC0 0C052757 */  jal       sfx_play_sound_at_position
/* 1A05A4 80271CC4 0000282D */   daddu    $a1, $zero, $zero
/* 1A05A8 80271CC8 24040001 */  addiu     $a0, $zero, 0x1
/* 1A05AC 80271CCC 0C09CCEA */  jal       dispatch_damage_event_player_1
/* 1A05B0 80271CD0 2405002A */   addiu    $a1, $zero, 0x2A
/* 1A05B4 80271CD4 0260202D */  daddu     $a0, $s3, $zero
/* 1A05B8 80271CD8 2405001B */  addiu     $a1, $zero, 0x1B
.L80271CDC:
/* 1A05BC 80271CDC 0C09DC58 */  jal       dispatch_event_actor
/* 1A05C0 80271CE0 00000000 */   nop
/* 1A05C4 80271CE4 0809CC63 */  j         .L8027318C
/* 1A05C8 80271CE8 2402FFFF */   addiu    $v0, $zero, -0x1
.L80271CEC:
/* 1A05CC 80271CEC 8E820188 */  lw        $v0, 0x188($s4)
/* 1A05D0 80271CF0 30420002 */  andi      $v0, $v0, 0x2
/* 1A05D4 80271CF4 10400011 */  beqz      $v0, .L80271D3C
/* 1A05D8 80271CF8 0000202D */   daddu    $a0, $zero, $zero
/* 1A05DC 80271CFC 24020018 */  addiu     $v0, $zero, 0x18
/* 1A05E0 80271D00 C6440014 */  lwc1      $f4, 0x14($s2)
/* 1A05E4 80271D04 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 1A05E8 80271D08 44810000 */  mtc1      $at, $f0
/* 1A05EC 80271D0C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1A05F0 80271D10 44811000 */  mtc1      $at, $f2
/* 1A05F4 80271D14 46002102 */  mul.s     $f4, $f4, $f0
/* 1A05F8 80271D18 00000000 */  nop
/* 1A05FC 80271D1C AFA20014 */  sw        $v0, 0x14($sp)
/* 1A0600 80271D20 E7A20010 */  swc1      $f2, 0x10($sp)
/* 1A0604 80271D24 8E45000C */  lw        $a1, 0xC($s2)
/* 1A0608 80271D28 8E460010 */  lw        $a2, 0x10($s2)
/* 1A060C 80271D2C 44072000 */  mfc1      $a3, $f4
/* 1A0610 80271D30 24080001 */  addiu     $t0, $zero, 0x1
/* 1A0614 80271D34 0C01C184 */  jal       fx_ring_blast
/* 1A0618 80271D38 AFA80028 */   sw       $t0, 0x28($sp)
.L80271D3C:
/* 1A061C 80271D3C 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0620 80271D40 30420020 */  andi      $v0, $v0, 0x20
/* 1A0624 80271D44 10400005 */  beqz      $v0, .L80271D5C
/* 1A0628 80271D48 00000000 */   nop
/* 1A062C 80271D4C 0C09451D */  jal       apply_shock_effect
/* 1A0630 80271D50 0260202D */   daddu    $a0, $s3, $zero
/* 1A0634 80271D54 24080001 */  addiu     $t0, $zero, 0x1
/* 1A0638 80271D58 AFA8002C */  sw        $t0, 0x2C($sp)
.L80271D5C:
/* 1A063C 80271D5C 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0640 80271D60 30420004 */  andi      $v0, $v0, 0x4
/* 1A0644 80271D64 1040000E */  beqz      $v0, .L80271DA0
/* 1A0648 80271D68 24020018 */   addiu    $v0, $zero, 0x18
/* 1A064C 80271D6C C6440014 */  lwc1      $f4, 0x14($s2)
/* 1A0650 80271D70 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 1A0654 80271D74 44810000 */  mtc1      $at, $f0
/* 1A0658 80271D78 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1A065C 80271D7C 44811000 */  mtc1      $at, $f2
/* 1A0660 80271D80 AFA20014 */  sw        $v0, 0x14($sp)
/* 1A0664 80271D84 46002100 */  add.s     $f4, $f4, $f0
/* 1A0668 80271D88 E7A20010 */  swc1      $f2, 0x10($sp)
/* 1A066C 80271D8C 8E45000C */  lw        $a1, 0xC($s2)
/* 1A0670 80271D90 8E460010 */  lw        $a2, 0x10($s2)
/* 1A0674 80271D94 44072000 */  mfc1      $a3, $f4
/* 1A0678 80271D98 0C01C70C */  jal       fx_water_splash
/* 1A067C 80271D9C 0000202D */   daddu    $a0, $zero, $zero
.L80271DA0:
/* 1A0680 80271DA0 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0684 80271DA4 30420008 */  andi      $v0, $v0, 0x8
/* 1A0688 80271DA8 1040000C */  beqz      $v0, .L80271DDC
/* 1A068C 80271DAC 0000202D */   daddu    $a0, $zero, $zero
/* 1A0690 80271DB0 C6420014 */  lwc1      $f2, 0x14($s2)
/* 1A0694 80271DB4 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 1A0698 80271DB8 44810000 */  mtc1      $at, $f0
/* 1A069C 80271DBC 00000000 */  nop
/* 1A06A0 80271DC0 46001080 */  add.s     $f2, $f2, $f0
/* 1A06A4 80271DC4 8E45000C */  lw        $a1, 0xC($s2)
/* 1A06A8 80271DC8 8E460010 */  lw        $a2, 0x10($s2)
/* 1A06AC 80271DCC 44071000 */  mfc1      $a3, $f2
/* 1A06B0 80271DD0 24080001 */  addiu     $t0, $zero, 0x1
/* 1A06B4 80271DD4 0C01C2A4 */  jal       fx_big_snowflakes
/* 1A06B8 80271DD8 AFA80030 */   sw       $t0, 0x30($sp)
.L80271DDC:
/* 1A06BC 80271DDC 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A06C0 80271DE0 0C099CAB */  jal       player_team_is_ability_active
/* 1A06C4 80271DE4 2405000F */   addiu    $a1, $zero, 0xF
/* 1A06C8 80271DE8 0040802D */  daddu     $s0, $v0, $zero
/* 1A06CC 80271DEC 1200002D */  beqz      $s0, .L80271EA4
/* 1A06D0 80271DF0 2402001E */   addiu    $v0, $zero, 0x1E
/* 1A06D4 80271DF4 C6440014 */  lwc1      $f4, 0x14($s2)
/* 1A06D8 80271DF8 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 1A06DC 80271DFC 44810000 */  mtc1      $at, $f0
/* 1A06E0 80271E00 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1A06E4 80271E04 44811000 */  mtc1      $at, $f2
/* 1A06E8 80271E08 AFA20014 */  sw        $v0, 0x14($sp)
/* 1A06EC 80271E0C 46002100 */  add.s     $f4, $f4, $f0
/* 1A06F0 80271E10 E7A20010 */  swc1      $f2, 0x10($sp)
/* 1A06F4 80271E14 8E45000C */  lw        $a1, 0xC($s2)
/* 1A06F8 80271E18 8E460010 */  lw        $a2, 0x10($s2)
/* 1A06FC 80271E1C 44072000 */  mfc1      $a3, $f4
/* 1A0700 80271E20 0C01C9F4 */  jal       fx_breaking_junk
/* 1A0704 80271E24 0000202D */   daddu    $a0, $zero, $zero
/* 1A0708 80271E28 2603FFFF */  addiu     $v1, $s0, -0x1
/* 1A070C 80271E2C 2C620006 */  sltiu     $v0, $v1, 0x6
/* 1A0710 80271E30 1040001C */  beqz      $v0, .L80271EA4
/* 1A0714 80271E34 00031080 */   sll      $v0, $v1, 2
/* 1A0718 80271E38 3C01802A */  lui       $at, %hi(jtbl_8029D880)
/* 1A071C 80271E3C 00220821 */  addu      $at, $at, $v0
/* 1A0720 80271E40 8C22D880 */  lw        $v0, %lo(jtbl_8029D880)($at)
/* 1A0724 80271E44 00400008 */  jr        $v0
/* 1A0728 80271E48 00000000 */   nop
glabel .L80271E4C
/* 1A072C 80271E4C C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0730 80271E50 0809C7A4 */  j         .L80271E90
/* 1A0734 80271E54 24040372 */   addiu    $a0, $zero, 0x372
glabel .L80271E58
/* 1A0738 80271E58 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A073C 80271E5C 0809C7A4 */  j         .L80271E90
/* 1A0740 80271E60 240400F1 */   addiu    $a0, $zero, 0xF1
glabel .L80271E64
/* 1A0744 80271E64 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0748 80271E68 0809C7A4 */  j         .L80271E90
/* 1A074C 80271E6C 240400DC */   addiu    $a0, $zero, 0xDC
glabel .L80271E70
/* 1A0750 80271E70 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0754 80271E74 0809C7A4 */  j         .L80271E90
/* 1A0758 80271E78 24042072 */   addiu    $a0, $zero, 0x2072
glabel .L80271E7C
/* 1A075C 80271E7C C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0760 80271E80 0809C7A4 */  j         .L80271E90
/* 1A0764 80271E84 24042073 */   addiu    $a0, $zero, 0x2073
glabel .L80271E88
/* 1A0768 80271E88 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A076C 80271E8C 2404205B */  addiu     $a0, $zero, 0x205B
.L80271E90:
/* 1A0770 80271E90 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A0774 80271E94 8E46000C */  lw        $a2, 0xC($s2)
/* 1A0778 80271E98 8E470010 */  lw        $a3, 0x10($s2)
/* 1A077C 80271E9C 0C052757 */  jal       sfx_play_sound_at_position
/* 1A0780 80271EA0 0000282D */   daddu    $a1, $zero, $zero
.L80271EA4:
/* 1A0784 80271EA4 0C03A752 */  jal       is_ability_active
/* 1A0788 80271EA8 24040013 */   addiu    $a0, $zero, 0x13
/* 1A078C 80271EAC 1440001B */  bnez      $v0, .L80271F1C
/* 1A0790 80271EB0 2403000B */   addiu    $v1, $zero, 0xB
/* 1A0794 80271EB4 8FA80018 */  lw        $t0, 0x18($sp)
/* 1A0798 80271EB8 81020212 */  lb        $v0, 0x212($t0)
/* 1A079C 80271EBC 10430017 */  beq       $v0, $v1, .L80271F1C
/* 1A07A0 80271EC0 00000000 */   nop
/* 1A07A4 80271EC4 82620212 */  lb        $v0, 0x212($s3)
/* 1A07A8 80271EC8 10430005 */  beq       $v0, $v1, .L80271EE0
/* 1A07AC 80271ECC 3C031000 */   lui      $v1, (0x10000020 >> 16)
/* 1A07B0 80271ED0 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A07B4 80271ED4 30420080 */  andi      $v0, $v0, 0x80
/* 1A07B8 80271ED8 10400010 */  beqz      $v0, .L80271F1C
/* 1A07BC 80271EDC 00000000 */   nop
.L80271EE0:
/* 1A07C0 80271EE0 8E820188 */  lw        $v0, 0x188($s4)
/* 1A07C4 80271EE4 34630020 */  ori       $v1, $v1, (0x10000020 & 0xFFFF)
/* 1A07C8 80271EE8 00431024 */  and       $v0, $v0, $v1
/* 1A07CC 80271EEC 1440000B */  bnez      $v0, .L80271F1C
/* 1A07D0 80271EF0 00000000 */   nop
/* 1A07D4 80271EF4 8E82018C */  lw        $v0, 0x18C($s4)
/* 1A07D8 80271EF8 30420008 */  andi      $v0, $v0, 0x8
/* 1A07DC 80271EFC 14400007 */  bnez      $v0, .L80271F1C
/* 1A07E0 80271F00 24080001 */   addiu    $t0, $zero, 0x1
/* 1A07E4 80271F04 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A07E8 80271F08 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A07EC 80271F0C 8C620000 */  lw        $v0, 0x0($v1)
/* 1A07F0 80271F10 AFA80020 */  sw        $t0, 0x20($sp)
/* 1A07F4 80271F14 34420020 */  ori       $v0, $v0, 0x20
/* 1A07F8 80271F18 AC620000 */  sw        $v0, 0x0($v1)
.L80271F1C:
/* 1A07FC 80271F1C 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A0800 80271F20 3C03000C */  lui       $v1, (0xC0000 >> 16)
/* 1A0804 80271F24 00431024 */  and       $v0, $v0, $v1
/* 1A0808 80271F28 10400005 */  beqz      $v0, .L80271F40
/* 1A080C 80271F2C 3C03F7FF */   lui      $v1, (0xF7FFFFFF >> 16)
/* 1A0810 80271F30 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0814 80271F34 3463FFFF */  ori       $v1, $v1, (0xF7FFFFFF & 0xFFFF)
/* 1A0818 80271F38 00431024 */  and       $v0, $v0, $v1
/* 1A081C 80271F3C AE820188 */  sw        $v0, 0x188($s4)
.L80271F40:
/* 1A0820 80271F40 8FC50078 */  lw        $a1, 0x78($fp)
/* 1A0824 80271F44 8E860188 */  lw        $a2, 0x188($s4)
/* 1A0828 80271F48 0C0998AF */  jal       get_defense
/* 1A082C 80271F4C 0260202D */   daddu    $a0, $s3, $zero
/* 1A0830 80271F50 0040A82D */  daddu     $s5, $v0, $zero
/* 1A0834 80271F54 8E840188 */  lw        $a0, 0x188($s4)
/* 1A0838 80271F58 3C020800 */  lui       $v0, (0x8000000 >> 16)
/* 1A083C 80271F5C 00821024 */  and       $v0, $a0, $v0
/* 1A0840 80271F60 14400003 */  bnez      $v0, .L80271F70
/* 1A0844 80271F64 00000000 */   nop
/* 1A0848 80271F68 82620222 */  lb        $v0, 0x222($s3)
/* 1A084C 80271F6C 02A2A821 */  addu      $s5, $s5, $v0
.L80271F70:
/* 1A0850 80271F70 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A0854 80271F74 30422000 */  andi      $v0, $v0, 0x2000
/* 1A0858 80271F78 54400001 */  bnel      $v0, $zero, .L80271F80
/* 1A085C 80271F7C 26B5007F */   addiu    $s5, $s5, 0x7F
.L80271F80:
/* 1A0860 80271F80 8690017E */  lh        $s0, 0x17E($s4)
/* 1A0864 80271F84 0C098EC4 */  jal       count_power_plus
/* 1A0868 80271F88 00000000 */   nop
/* 1A086C 80271F8C 828300AC */  lb        $v1, 0xAC($s4)
/* 1A0870 80271F90 1860000A */  blez      $v1, .L80271FBC
/* 1A0874 80271F94 02028021 */   addu     $s0, $s0, $v0
/* 1A0878 80271F98 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A087C 80271F9C 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A0880 80271FA0 30420010 */  andi      $v0, $v0, 0x10
/* 1A0884 80271FA4 54400005 */  bnel      $v0, $zero, .L80271FBC
/* 1A0888 80271FA8 02038021 */   addu     $s0, $s0, $v1
/* 1A088C 80271FAC 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0890 80271FB0 30420080 */  andi      $v0, $v0, 0x80
/* 1A0894 80271FB4 54400001 */  bnel      $v0, $zero, .L80271FBC
/* 1A0898 80271FB8 02038021 */   addu     $s0, $s0, $v1
.L80271FBC:
/* 1A089C 80271FBC 82830097 */  lb        $v1, 0x97($s4)
/* 1A08A0 80271FC0 1060000C */  beqz      $v1, .L80271FF4
/* 1A08A4 80271FC4 00000000 */   nop
/* 1A08A8 80271FC8 8E820188 */  lw        $v0, 0x188($s4)
/* 1A08AC 80271FCC 30420080 */  andi      $v0, $v0, 0x80
/* 1A08B0 80271FD0 10400008 */  beqz      $v0, .L80271FF4
/* 1A08B4 80271FD4 3C04DFFF */   lui      $a0, (0xDFFFFFFF >> 16)
/* 1A08B8 80271FD8 02038021 */  addu      $s0, $s0, $v1
/* 1A08BC 80271FDC 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A08C0 80271FE0 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A08C4 80271FE4 8C620000 */  lw        $v0, 0x0($v1)
/* 1A08C8 80271FE8 3484FFFF */  ori       $a0, $a0, (0xDFFFFFFF & 0xFFFF)
/* 1A08CC 80271FEC 00441024 */  and       $v0, $v0, $a0
/* 1A08D0 80271FF0 AC620000 */  sw        $v0, 0x0($v1)
.L80271FF4:
/* 1A08D4 80271FF4 82840096 */  lb        $a0, 0x96($s4)
/* 1A08D8 80271FF8 1080000E */  beqz      $a0, .L80272034
/* 1A08DC 80271FFC 3C030024 */   lui      $v1, (0x240040 >> 16)
/* 1A08E0 80272000 8E820188 */  lw        $v0, 0x188($s4)
/* 1A08E4 80272004 34630040 */  ori       $v1, $v1, (0x240040 & 0xFFFF)
/* 1A08E8 80272008 00431024 */  and       $v0, $v0, $v1
/* 1A08EC 8027200C 10400009 */  beqz      $v0, .L80272034
/* 1A08F0 80272010 00000000 */   nop
/* 1A08F4 80272014 02048021 */  addu      $s0, $s0, $a0
/* 1A08F8 80272018 3C04EFFF */  lui       $a0, (0xEFFFFFFF >> 16)
/* 1A08FC 8027201C 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A0900 80272020 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A0904 80272024 8C620000 */  lw        $v0, 0x0($v1)
/* 1A0908 80272028 3484FFFF */  ori       $a0, $a0, (0xEFFFFFFF & 0xFFFF)
/* 1A090C 8027202C 00441024 */  and       $v0, $v0, $a0
/* 1A0910 80272030 AC620000 */  sw        $v0, 0x0($v1)
.L80272034:
/* 1A0914 80272034 82820098 */  lb        $v0, 0x98($s4)
/* 1A0918 80272038 54400001 */  bnel      $v0, $zero, .L80272040
/* 1A091C 8027203C 26100002 */   addiu    $s0, $s0, 0x2
.L80272040:
/* 1A0920 80272040 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A0924 80272044 0C099CAB */  jal       player_team_is_ability_active
/* 1A0928 80272048 24050015 */   addiu    $a1, $zero, 0x15
/* 1A092C 8027204C 54400001 */  bnel      $v0, $zero, .L80272054
/* 1A0930 80272050 26100002 */   addiu    $s0, $s0, 0x2
.L80272054:
/* 1A0934 80272054 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A0938 80272058 0C099CAB */  jal       player_team_is_ability_active
/* 1A093C 8027205C 24050022 */   addiu    $a1, $zero, 0x22
/* 1A0940 80272060 54400001 */  bnel      $v0, $zero, .L80272068
/* 1A0944 80272064 26100001 */   addiu    $s0, $s0, 0x1
.L80272068:
/* 1A0948 80272068 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A094C 8027206C 0C099CAB */  jal       player_team_is_ability_active
/* 1A0950 80272070 24050025 */   addiu    $a1, $zero, 0x25
/* 1A0954 80272074 54400001 */  bnel      $v0, $zero, .L8027207C
/* 1A0958 80272078 2610FFFF */   addiu    $s0, $s0, -0x1
.L8027207C:
/* 1A095C 8027207C 8282009B */  lb        $v0, 0x9B($s4)
/* 1A0960 80272080 54400001 */  bnel      $v0, $zero, .L80272088
/* 1A0964 80272084 26100001 */   addiu    $s0, $s0, 0x1
.L80272088:
/* 1A0968 80272088 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A096C 8027208C 80820221 */  lb        $v0, 0x221($a0)
/* 1A0970 80272090 24050009 */  addiu     $a1, $zero, 0x9
/* 1A0974 80272094 0C099CAB */  jal       player_team_is_ability_active
/* 1A0978 80272098 02028021 */   addu     $s0, $s0, $v0
/* 1A097C 8027209C 10400013 */  beqz      $v0, .L802720EC
/* 1A0980 802720A0 00000000 */   nop
/* 1A0984 802720A4 92820089 */  lbu       $v0, 0x89($s4)
/* 1A0988 802720A8 2610FFFF */  addiu     $s0, $s0, -0x1
/* 1A098C 802720AC 24420001 */  addiu     $v0, $v0, 0x1
/* 1A0990 802720B0 06010003 */  bgez      $s0, .L802720C0
/* 1A0994 802720B4 A2820089 */   sb       $v0, 0x89($s4)
/* 1A0998 802720B8 00501021 */  addu      $v0, $v0, $s0
/* 1A099C 802720BC A2820089 */  sb        $v0, 0x89($s4)
.L802720C0:
/* 1A09A0 802720C0 3C05800E */  lui       $a1, %hi(gBattleStatus)
/* 1A09A4 802720C4 24A5C070 */  addiu     $a1, $a1, %lo(gBattleStatus)
/* 1A09A8 802720C8 3C040400 */  lui       $a0, (0x4000000 >> 16)
/* 1A09AC 802720CC 8CA20004 */  lw        $v0, 0x4($a1)
/* 1A09B0 802720D0 82830089 */  lb        $v1, 0x89($s4)
/* 1A09B4 802720D4 00441025 */  or        $v0, $v0, $a0
/* 1A09B8 802720D8 28630006 */  slti      $v1, $v1, 0x6
/* 1A09BC 802720DC 14600003 */  bnez      $v1, .L802720EC
/* 1A09C0 802720E0 ACA20004 */   sw       $v0, 0x4($a1)
/* 1A09C4 802720E4 24020005 */  addiu     $v0, $zero, 0x5
/* 1A09C8 802720E8 A2820089 */  sb        $v0, 0x89($s4)
.L802720EC:
/* 1A09CC 802720EC 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A09D0 802720F0 0C099CAB */  jal       player_team_is_ability_active
/* 1A09D4 802720F4 24050024 */   addiu    $a1, $zero, 0x24
/* 1A09D8 802720F8 10400013 */  beqz      $v0, .L80272148
/* 1A09DC 802720FC 00000000 */   nop
/* 1A09E0 80272100 92820089 */  lbu       $v0, 0x89($s4)
/* 1A09E4 80272104 2610FFFE */  addiu     $s0, $s0, -0x2
/* 1A09E8 80272108 24420002 */  addiu     $v0, $v0, 0x2
/* 1A09EC 8027210C 06010003 */  bgez      $s0, .L8027211C
/* 1A09F0 80272110 A2820089 */   sb       $v0, 0x89($s4)
/* 1A09F4 80272114 00501021 */  addu      $v0, $v0, $s0
/* 1A09F8 80272118 A2820089 */  sb        $v0, 0x89($s4)
.L8027211C:
/* 1A09FC 8027211C 3C05800E */  lui       $a1, %hi(gBattleStatus)
/* 1A0A00 80272120 24A5C070 */  addiu     $a1, $a1, %lo(gBattleStatus)
/* 1A0A04 80272124 3C040400 */  lui       $a0, (0x4000000 >> 16)
/* 1A0A08 80272128 8CA20004 */  lw        $v0, 0x4($a1)
/* 1A0A0C 8027212C 82830089 */  lb        $v1, 0x89($s4)
/* 1A0A10 80272130 00441025 */  or        $v0, $v0, $a0
/* 1A0A14 80272134 28630006 */  slti      $v1, $v1, 0x6
/* 1A0A18 80272138 14600003 */  bnez      $v1, .L80272148
/* 1A0A1C 8027213C ACA20004 */   sw       $v0, 0x4($a1)
/* 1A0A20 80272140 24020005 */  addiu     $v0, $zero, 0x5
/* 1A0A24 80272144 A2820089 */  sb        $v0, 0x89($s4)
.L80272148:
/* 1A0A28 80272148 3C04800E */  lui       $a0, %hi(gBattleStatus)
/* 1A0A2C 8027214C 2484C070 */  addiu     $a0, $a0, %lo(gBattleStatus)
/* 1A0A30 80272150 8C820004 */  lw        $v0, 0x4($a0)
/* 1A0A34 80272154 3C030800 */  lui       $v1, (0x8000000 >> 16)
/* 1A0A38 80272158 00431024 */  and       $v0, $v0, $v1
/* 1A0A3C 8027215C 1040001A */  beqz      $v0, .L802721C8
/* 1A0A40 80272160 00000000 */   nop
/* 1A0A44 80272164 8C820000 */  lw        $v0, 0x0($a0)
/* 1A0A48 80272168 30420010 */  andi      $v0, $v0, 0x10
/* 1A0A4C 8027216C 14400005 */  bnez      $v0, .L80272184
/* 1A0A50 80272170 00000000 */   nop
/* 1A0A54 80272174 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0A58 80272178 30420080 */  andi      $v0, $v0, 0x80
/* 1A0A5C 8027217C 10400012 */  beqz      $v0, .L802721C8
/* 1A0A60 80272180 00000000 */   nop
.L80272184:
/* 1A0A64 80272184 92830099 */  lbu       $v1, 0x99($s4)
/* 1A0A68 80272188 30620002 */  andi      $v0, $v1, 0x2
/* 1A0A6C 8027218C 54400001 */  bnel      $v0, $zero, .L80272194
/* 1A0A70 80272190 26100002 */   addiu    $s0, $s0, 0x2
.L80272194:
/* 1A0A74 80272194 30620001 */  andi      $v0, $v1, 0x1
/* 1A0A78 80272198 54400001 */  bnel      $v0, $zero, .L802721A0
/* 1A0A7C 8027219C 26100004 */   addiu    $s0, $s0, 0x4
.L802721A0:
/* 1A0A80 802721A0 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 1A0A84 802721A4 44810000 */  mtc1      $at, $f0
/* 1A0A88 802721A8 24020014 */  addiu     $v0, $zero, 0x14
/* 1A0A8C 802721AC AFA20014 */  sw        $v0, 0x14($sp)
/* 1A0A90 802721B0 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A0A94 802721B4 8E45000C */  lw        $a1, 0xC($s2)
/* 1A0A98 802721B8 8E460010 */  lw        $a2, 0x10($s2)
/* 1A0A9C 802721BC 8E470014 */  lw        $a3, 0x14($s2)
/* 1A0AA0 802721C0 0C01C2EC */  jal       fx_radial_shimmer
/* 1A0AA4 802721C4 24040009 */   addiu    $a0, $zero, 0x9
.L802721C8:
/* 1A0AA8 802721C8 3C11800E */  lui       $s1, %hi(gBattleStatus)
/* 1A0AAC 802721CC 2631C070 */  addiu     $s1, $s1, %lo(gBattleStatus)
/* 1A0AB0 802721D0 8E220004 */  lw        $v0, 0x4($s1)
/* 1A0AB4 802721D4 3C030100 */  lui       $v1, (0x1000000 >> 16)
/* 1A0AB8 802721D8 00431024 */  and       $v0, $v0, $v1
/* 1A0ABC 802721DC 14400016 */  bnez      $v0, .L80272238
/* 1A0AC0 802721E0 00000000 */   nop
/* 1A0AC4 802721E4 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A0AC8 802721E8 0C099CAB */  jal       player_team_is_ability_active
/* 1A0ACC 802721EC 2405000A */   addiu    $a1, $zero, 0xA
/* 1A0AD0 802721F0 10400011 */  beqz      $v0, .L80272238
/* 1A0AD4 802721F4 00000000 */   nop
/* 1A0AD8 802721F8 8E230000 */  lw        $v1, 0x0($s1)
/* 1A0ADC 802721FC 30620240 */  andi      $v0, $v1, 0x240
/* 1A0AE0 80272200 1440000D */  bnez      $v0, .L80272238
/* 1A0AE4 80272204 26100001 */   addiu    $s0, $s0, 0x1
/* 1A0AE8 80272208 24080001 */  addiu     $t0, $zero, 0x1
/* 1A0AEC 8027220C 0000802D */  daddu     $s0, $zero, $zero
/* 1A0AF0 80272210 0200A82D */  daddu     $s5, $s0, $zero
/* 1A0AF4 80272214 2402FFBF */  addiu     $v0, $zero, -0x41
/* 1A0AF8 80272218 00621024 */  and       $v0, $v1, $v0
/* 1A0AFC 8027221C 2403FDFF */  addiu     $v1, $zero, -0x201
/* 1A0B00 80272220 00431024 */  and       $v0, $v0, $v1
/* 1A0B04 80272224 2403FFEF */  addiu     $v1, $zero, -0x11
/* 1A0B08 80272228 00431024 */  and       $v0, $v0, $v1
/* 1A0B0C 8027222C 34420020 */  ori       $v0, $v0, 0x20
/* 1A0B10 80272230 AFA80024 */  sw        $t0, 0x24($sp)
/* 1A0B14 80272234 AE220000 */  sw        $v0, 0x0($s1)
.L80272238:
/* 1A0B18 80272238 8FA80018 */  lw        $t0, 0x18($sp)
/* 1A0B1C 8027223C 81030210 */  lb        $v1, 0x210($t0)
/* 1A0B20 80272240 2402000A */  addiu     $v0, $zero, 0xA
/* 1A0B24 80272244 14620007 */  bne       $v1, $v0, .L80272264
/* 1A0B28 80272248 00000000 */   nop
/* 1A0B2C 8027224C 1A000005 */  blez      $s0, .L80272264
/* 1A0B30 80272250 001017C2 */   srl      $v0, $s0, 31
/* 1A0B34 80272254 02021021 */  addu      $v0, $s0, $v0
/* 1A0B38 80272258 00028043 */  sra       $s0, $v0, 1
/* 1A0B3C 8027225C 52000001 */  beql      $s0, $zero, .L80272264
/* 1A0B40 80272260 24100001 */   addiu    $s0, $zero, 0x1
.L80272264:
/* 1A0B44 80272264 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A0B48 80272268 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A0B4C 8027226C 30420020 */  andi      $v0, $v0, 0x20
/* 1A0B50 80272270 1040000B */  beqz      $v0, .L802722A0
/* 1A0B54 80272274 00000000 */   nop
/* 1A0B58 80272278 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0B5C 8027227C 30420200 */  andi      $v0, $v0, 0x200
/* 1A0B60 80272280 10400007 */  beqz      $v0, .L802722A0
/* 1A0B64 80272284 00000000 */   nop
/* 1A0B68 80272288 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A0B6C 8027228C 30420200 */  andi      $v0, $v0, 0x200
/* 1A0B70 80272290 10400003 */  beqz      $v0, .L802722A0
/* 1A0B74 80272294 00000000 */   nop
/* 1A0B78 80272298 0000A82D */  daddu     $s5, $zero, $zero
/* 1A0B7C 8027229C 827001B8 */  lb        $s0, 0x1B8($s3)
.L802722A0:
/* 1A0B80 802722A0 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0B84 802722A4 3C034000 */  lui       $v1, (0x40000000 >> 16)
/* 1A0B88 802722A8 00431024 */  and       $v0, $v0, $v1
/* 1A0B8C 802722AC 10400004 */  beqz      $v0, .L802722C0
/* 1A0B90 802722B0 2A020064 */   slti     $v0, $s0, 0x64
/* 1A0B94 802722B4 0000A82D */  daddu     $s5, $zero, $zero
/* 1A0B98 802722B8 02A0802D */  daddu     $s0, $s5, $zero
/* 1A0B9C 802722BC 2A020064 */  slti      $v0, $s0, 0x64
.L802722C0:
/* 1A0BA0 802722C0 50400001 */  beql      $v0, $zero, .L802722C8
/* 1A0BA4 802722C4 24100063 */   addiu    $s0, $zero, 0x63
.L802722C8:
/* 1A0BA8 802722C8 06020001 */  bltzl     $s0, .L802722D0
/* 1A0BAC 802722CC 0000A82D */   daddu    $s5, $zero, $zero
.L802722D0:
/* 1A0BB0 802722D0 02158023 */  subu      $s0, $s0, $s5
/* 1A0BB4 802722D4 06010002 */  bgez      $s0, .L802722E0
/* 1A0BB8 802722D8 A66001FA */   sh       $zero, 0x1FA($s3)
/* 1A0BBC 802722DC 0000802D */  daddu     $s0, $zero, $zero
.L802722E0:
/* 1A0BC0 802722E0 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0BC4 802722E4 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 1A0BC8 802722E8 00431024 */  and       $v0, $v0, $v1
/* 1A0BCC 802722EC 10400007 */  beqz      $v0, .L8027230C
/* 1A0BD0 802722F0 00000000 */   nop
/* 1A0BD4 802722F4 1A000005 */  blez      $s0, .L8027230C
/* 1A0BD8 802722F8 00000000 */   nop
/* 1A0BDC 802722FC 82820198 */  lb        $v0, 0x198($s4)
/* 1A0BE0 80272300 02028021 */  addu      $s0, $s0, $v0
/* 1A0BE4 80272304 5A000001 */  blezl     $s0, .L8027230C
/* 1A0BE8 80272308 24100001 */   addiu    $s0, $zero, 0x1
.L8027230C:
/* 1A0BEC 8027230C 1E000017 */  bgtz      $s0, .L8027236C
/* 1A0BF0 80272310 A6800180 */   sh       $zero, 0x180($s4)
/* 1A0BF4 80272314 A66001FA */  sh        $zero, 0x1FA($s3)
/* 1A0BF8 80272318 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0BFC 8027231C 3C034000 */  lui       $v1, (0x40000000 >> 16)
/* 1A0C00 80272320 00431024 */  and       $v0, $v0, $v1
/* 1A0C04 80272324 1440000B */  bnez      $v0, .L80272354
/* 1A0C08 80272328 24150002 */   addiu    $s5, $zero, 0x2
/* 1A0C0C 8027232C 24110017 */  addiu     $s1, $zero, 0x17
/* 1A0C10 80272330 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0C14 80272334 2404010C */  addiu     $a0, $zero, 0x10C
/* 1A0C18 80272338 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A0C1C 8027233C 8E46000C */  lw        $a2, 0xC($s2)
/* 1A0C20 80272340 8E470010 */  lw        $a3, 0x10($s2)
/* 1A0C24 80272344 0C052757 */  jal       sfx_play_sound_at_position
/* 1A0C28 80272348 0000282D */   daddu    $a1, $zero, $zero
/* 1A0C2C 8027234C 0809C900 */  j         .L80272400
/* 1A0C30 80272350 A6800180 */   sh       $zero, 0x180($s4)
.L80272354:
/* 1A0C34 80272354 826201B8 */  lb        $v0, 0x1B8($s3)
/* 1A0C38 80272358 1C400002 */  bgtz      $v0, .L80272364
/* 1A0C3C 8027235C 24110017 */   addiu    $s1, $zero, 0x17
/* 1A0C40 80272360 24110020 */  addiu     $s1, $zero, 0x20
.L80272364:
/* 1A0C44 80272364 0809C900 */  j         .L80272400
/* 1A0C48 80272368 A6800180 */   sh       $zero, 0x180($s4)
.L8027236C:
/* 1A0C4C 8027236C 24110009 */  addiu     $s1, $zero, 0x9
/* 1A0C50 80272370 966201FC */  lhu       $v0, 0x1FC($s3)
/* 1A0C54 80272374 966301FA */  lhu       $v1, 0x1FA($s3)
/* 1A0C58 80272378 00501021 */  addu      $v0, $v0, $s0
/* 1A0C5C 8027237C 00701823 */  subu      $v1, $v1, $s0
/* 1A0C60 80272380 A66201FC */  sh        $v0, 0x1FC($s3)
/* 1A0C64 80272384 A66301FA */  sh        $v1, 0x1FA($s3)
/* 1A0C68 80272388 8FC20000 */  lw        $v0, 0x0($fp)
/* 1A0C6C 8027238C 30422000 */  andi      $v0, $v0, 0x2000
/* 1A0C70 80272390 14400016 */  bnez      $v0, .L802723EC
/* 1A0C74 80272394 0000A82D */   daddu    $s5, $zero, $zero
/* 1A0C78 80272398 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A0C7C 8027239C 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A0C80 802723A0 3C030200 */  lui       $v1, (0x2000000 >> 16)
/* 1A0C84 802723A4 00431024 */  and       $v0, $v0, $v1
/* 1A0C88 802723A8 14400010 */  bnez      $v0, .L802723EC
/* 1A0C8C 802723AC 00000000 */   nop
/* 1A0C90 802723B0 8FA8001C */  lw        $t0, 0x1C($sp)
/* 1A0C94 802723B4 1500000D */  bnez      $t0, .L802723EC
/* 1A0C98 802723B8 00000000 */   nop
/* 1A0C9C 802723BC 8FC20004 */  lw        $v0, 0x4($fp)
/* 1A0CA0 802723C0 30420004 */  andi      $v0, $v0, 0x4
/* 1A0CA4 802723C4 14400009 */  bnez      $v0, .L802723EC
/* 1A0CA8 802723C8 00000000 */   nop
/* 1A0CAC 802723CC 926201B8 */  lbu       $v0, 0x1B8($s3)
/* 1A0CB0 802723D0 00501023 */  subu      $v0, $v0, $s0
/* 1A0CB4 802723D4 A26201B8 */  sb        $v0, 0x1B8($s3)
/* 1A0CB8 802723D8 00021600 */  sll       $v0, $v0, 24
/* 1A0CBC 802723DC 1C400003 */  bgtz      $v0, .L802723EC
/* 1A0CC0 802723E0 00000000 */   nop
/* 1A0CC4 802723E4 A26001B8 */  sb        $zero, 0x1B8($s3)
/* 1A0CC8 802723E8 24110020 */  addiu     $s1, $zero, 0x20
.L802723EC:
/* 1A0CCC 802723EC 96820180 */  lhu       $v0, 0x180($s4)
/* 1A0CD0 802723F0 00501021 */  addu      $v0, $v0, $s0
/* 1A0CD4 802723F4 A6820180 */  sh        $v0, 0x180($s4)
/* 1A0CD8 802723F8 A66201F8 */  sh        $v0, 0x1F8($s3)
/* 1A0CDC 802723FC A66001FA */  sh        $zero, 0x1FA($s3)
.L80272400:
/* 1A0CE0 80272400 8FC20000 */  lw        $v0, 0x0($fp)
/* 1A0CE4 80272404 30422000 */  andi      $v0, $v0, 0x2000
/* 1A0CE8 80272408 10400037 */  beqz      $v0, .L802724E8
/* 1A0CEC 8027240C 00000000 */   nop
/* 1A0CF0 80272410 0C03A752 */  jal       is_ability_active
/* 1A0CF4 80272414 24040013 */   addiu    $a0, $zero, 0x13
/* 1A0CF8 80272418 14400017 */  bnez      $v0, .L80272478
/* 1A0CFC 8027241C 2403000B */   addiu    $v1, $zero, 0xB
/* 1A0D00 80272420 8FA80018 */  lw        $t0, 0x18($sp)
/* 1A0D04 80272424 81020212 */  lb        $v0, 0x212($t0)
/* 1A0D08 80272428 10430013 */  beq       $v0, $v1, .L80272478
/* 1A0D0C 8027242C 00000000 */   nop
/* 1A0D10 80272430 82620212 */  lb        $v0, 0x212($s3)
/* 1A0D14 80272434 10430005 */  beq       $v0, $v1, .L8027244C
/* 1A0D18 80272438 00000000 */   nop
/* 1A0D1C 8027243C 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A0D20 80272440 30420080 */  andi      $v0, $v0, 0x80
/* 1A0D24 80272444 1040000C */  beqz      $v0, .L80272478
/* 1A0D28 80272448 00000000 */   nop
.L8027244C:
/* 1A0D2C 8027244C 8E830188 */  lw        $v1, 0x188($s4)
/* 1A0D30 80272450 3C021000 */  lui       $v0, (0x10000000 >> 16)
/* 1A0D34 80272454 00621024 */  and       $v0, $v1, $v0
/* 1A0D38 80272458 14400007 */  bnez      $v0, .L80272478
/* 1A0D3C 8027245C 00000000 */   nop
/* 1A0D40 80272460 8E82018C */  lw        $v0, 0x18C($s4)
/* 1A0D44 80272464 30420008 */  andi      $v0, $v0, 0x8
/* 1A0D48 80272468 14400003 */  bnez      $v0, .L80272478
/* 1A0D4C 8027246C 30620020 */   andi     $v0, $v1, 0x20
/* 1A0D50 80272470 10400338 */  beqz      $v0, .L80273154
/* 1A0D54 80272474 00000000 */   nop
.L80272478:
/* 1A0D58 80272478 3C10800E */  lui       $s0, %hi(gBattleStatus)
/* 1A0D5C 8027247C 2610C070 */  addiu     $s0, $s0, %lo(gBattleStatus)
/* 1A0D60 80272480 8E020000 */  lw        $v0, 0x0($s0)
/* 1A0D64 80272484 30420020 */  andi      $v0, $v0, 0x20
/* 1A0D68 80272488 14400002 */  bnez      $v0, .L80272494
/* 1A0D6C 8027248C 24110019 */   addiu    $s1, $zero, 0x19
/* 1A0D70 80272490 24110017 */  addiu     $s1, $zero, 0x17
.L80272494:
/* 1A0D74 80272494 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A0D78 80272498 2404010C */  addiu     $a0, $zero, 0x10C
/* 1A0D7C 8027249C E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A0D80 802724A0 8E46000C */  lw        $a2, 0xC($s2)
/* 1A0D84 802724A4 8E470010 */  lw        $a3, 0x10($s2)
/* 1A0D88 802724A8 0C052757 */  jal       sfx_play_sound_at_position
/* 1A0D8C 802724AC 0000282D */   daddu    $a1, $zero, $zero
/* 1A0D90 802724B0 0260202D */  daddu     $a0, $s3, $zero
/* 1A0D94 802724B4 0C09DC58 */  jal       dispatch_event_actor
/* 1A0D98 802724B8 0220282D */   daddu    $a1, $s1, $zero
/* 1A0D9C 802724BC 24020001 */  addiu     $v0, $zero, 0x1
/* 1A0DA0 802724C0 AFA20010 */  sw        $v0, 0x10($sp)
/* 1A0DA4 802724C4 24020003 */  addiu     $v0, $zero, 0x3
/* 1A0DA8 802724C8 AFA20014 */  sw        $v0, 0x14($sp)
/* 1A0DAC 802724CC C64C000C */  lwc1      $f12, 0xC($s2)
/* 1A0DB0 802724D0 C64E0010 */  lwc1      $f14, 0x10($s2)
/* 1A0DB4 802724D4 8E460014 */  lw        $a2, 0x14($s2)
/* 1A0DB8 802724D8 0C093BF8 */  jal       func_8024EFE0
/* 1A0DBC 802724DC 0000382D */   daddu    $a3, $zero, $zero
/* 1A0DC0 802724E0 0809C961 */  j         .L80272584
/* 1A0DC4 802724E4 00000000 */   nop
.L802724E8:
/* 1A0DC8 802724E8 3C10800E */  lui       $s0, %hi(gBattleStatus)
/* 1A0DCC 802724EC 2610C070 */  addiu     $s0, $s0, %lo(gBattleStatus)
/* 1A0DD0 802724F0 8E020000 */  lw        $v0, 0x0($s0)
/* 1A0DD4 802724F4 30420020 */  andi      $v0, $v0, 0x20
/* 1A0DD8 802724F8 10400038 */  beqz      $v0, .L802725DC
/* 1A0DDC 802724FC 24020020 */   addiu    $v0, $zero, 0x20
/* 1A0DE0 80272500 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0DE4 80272504 30421000 */  andi      $v0, $v0, 0x1000
/* 1A0DE8 80272508 10400022 */  beqz      $v0, .L80272594
/* 1A0DEC 8027250C 00000000 */   nop
/* 1A0DF0 80272510 0C00A67F */  jal       rand_int
/* 1A0DF4 80272514 24040063 */   addiu    $a0, $zero, 0x63
/* 1A0DF8 80272518 8E630008 */  lw        $v1, 0x8($s3)
/* 1A0DFC 8027251C 90640018 */  lbu       $a0, 0x18($v1)
/* 1A0E00 80272520 92830194 */  lbu       $v1, 0x194($s4)
/* 1A0E04 80272524 00830018 */  mult      $a0, $v1
/* 1A0E08 80272528 00002012 */  mflo      $a0
/* 1A0E0C 8027252C 3C0351EB */  lui       $v1, (0x51EB851F >> 16)
/* 1A0E10 80272530 3463851F */  ori       $v1, $v1, (0x51EB851F & 0xFFFF)
/* 1A0E14 80272534 00830018 */  mult      $a0, $v1
/* 1A0E18 80272538 000427C3 */  sra       $a0, $a0, 31
/* 1A0E1C 8027253C 00001810 */  mfhi      $v1
/* 1A0E20 80272540 00031943 */  sra       $v1, $v1, 5
/* 1A0E24 80272544 00641823 */  subu      $v1, $v1, $a0
/* 1A0E28 80272548 0043102A */  slt       $v0, $v0, $v1
/* 1A0E2C 8027254C 10400011 */  beqz      $v0, .L80272594
/* 1A0E30 80272550 00000000 */   nop
/* 1A0E34 80272554 92620210 */  lbu       $v0, 0x210($s3)
/* 1A0E38 80272558 2442FFFD */  addiu     $v0, $v0, -0x3
/* 1A0E3C 8027255C 2C420006 */  sltiu     $v0, $v0, 0x6
/* 1A0E40 80272560 1440000C */  bnez      $v0, .L80272594
/* 1A0E44 80272564 00000000 */   nop
/* 1A0E48 80272568 8E620000 */  lw        $v0, 0x0($s3)
/* 1A0E4C 8027256C 30420400 */  andi      $v0, $v0, 0x400
/* 1A0E50 80272570 14400008 */  bnez      $v0, .L80272594
/* 1A0E54 80272574 0260202D */   daddu    $a0, $s3, $zero
/* 1A0E58 80272578 24050039 */  addiu     $a1, $zero, 0x39
.L8027257C:
/* 1A0E5C 8027257C 0C09DC58 */  jal       dispatch_event_actor
/* 1A0E60 80272580 00000000 */   nop
.L80272584:
/* 1A0E64 80272584 8E020000 */  lw        $v0, 0x0($s0)
/* 1A0E68 80272588 30420240 */  andi      $v0, $v0, 0x240
.L8027258C:
/* 1A0E6C 8027258C 0809CC63 */  j         .L8027318C
/* 1A0E70 80272590 0002102B */   sltu     $v0, $zero, $v0
.L80272594:
/* 1A0E74 80272594 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A0E78 80272598 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A0E7C 8027259C 30420020 */  andi      $v0, $v0, 0x20
/* 1A0E80 802725A0 1040000D */  beqz      $v0, .L802725D8
/* 1A0E84 802725A4 24020009 */   addiu    $v0, $zero, 0x9
/* 1A0E88 802725A8 52220001 */  beql      $s1, $v0, .L802725B0
/* 1A0E8C 802725AC 2411000A */   addiu    $s1, $zero, 0xA
.L802725B0:
/* 1A0E90 802725B0 24020017 */  addiu     $v0, $zero, 0x17
/* 1A0E94 802725B4 52220001 */  beql      $s1, $v0, .L802725BC
/* 1A0E98 802725B8 24110019 */   addiu    $s1, $zero, 0x19
.L802725BC:
/* 1A0E9C 802725BC 826201B8 */  lb        $v0, 0x1B8($s3)
/* 1A0EA0 802725C0 1C400008 */  bgtz      $v0, .L802725E4
/* 1A0EA4 802725C4 24020019 */   addiu    $v0, $zero, 0x19
/* 1A0EA8 802725C8 52220006 */  beql      $s1, $v0, .L802725E4
/* 1A0EAC 802725CC 24110020 */   addiu    $s1, $zero, 0x20
/* 1A0EB0 802725D0 0809C979 */  j         .L802725E4
/* 1A0EB4 802725D4 00000000 */   nop
.L802725D8:
/* 1A0EB8 802725D8 24020020 */  addiu     $v0, $zero, 0x20
.L802725DC:
/* 1A0EBC 802725DC 52220001 */  beql      $s1, $v0, .L802725E4
/* 1A0EC0 802725E0 24110009 */   addiu    $s1, $zero, 0x9
.L802725E4:
/* 1A0EC4 802725E4 3C10800E */  lui       $s0, %hi(gBattleStatus)
/* 1A0EC8 802725E8 2610C070 */  addiu     $s0, $s0, %lo(gBattleStatus)
/* 1A0ECC 802725EC 8E020000 */  lw        $v0, 0x0($s0)
/* 1A0ED0 802725F0 30420020 */  andi      $v0, $v0, 0x20
/* 1A0ED4 802725F4 14400007 */  bnez      $v0, .L80272614
/* 1A0ED8 802725F8 00000000 */   nop
/* 1A0EDC 802725FC 0C099B85 */  jal       clear_part_pal_adjustment
/* 1A0EE0 80272600 03C0202D */   daddu    $a0, $fp, $zero
/* 1A0EE4 80272604 8E020000 */  lw        $v0, 0x0($s0)
/* 1A0EE8 80272608 30420020 */  andi      $v0, $v0, 0x20
/* 1A0EEC 8027260C 1040006F */  beqz      $v0, .L802727CC
/* 1A0EF0 80272610 00000000 */   nop
.L80272614:
/* 1A0EF4 80272614 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0EF8 80272618 3C030400 */  lui       $v1, (0x4000000 >> 16)
/* 1A0EFC 8027261C 00431024 */  and       $v0, $v0, $v1
/* 1A0F00 80272620 10400021 */  beqz      $v0, .L802726A8
/* 1A0F04 80272624 240200FF */   addiu    $v0, $zero, 0xFF
/* 1A0F08 80272628 8E640008 */  lw        $a0, 0x8($s3)
/* 1A0F0C 8027262C 9083001D */  lbu       $v1, 0x1D($a0)
/* 1A0F10 80272630 1062001D */  beq       $v1, $v0, .L802726A8
/* 1A0F14 80272634 00000000 */   nop
/* 1A0F18 80272638 3C028011 */  lui       $v0, %hi(gPlayerData)
/* 1A0F1C 8027263C 2442F290 */  addiu     $v0, $v0, %lo(gPlayerData)
/* 1A0F20 80272640 80420001 */  lb        $v0, 0x1($v0)
/* 1A0F24 80272644 24420001 */  addiu     $v0, $v0, 0x1
/* 1A0F28 80272648 0043102A */  slt       $v0, $v0, $v1
/* 1A0F2C 8027264C 14400016 */  bnez      $v0, .L802726A8
/* 1A0F30 80272650 00000000 */   nop
/* 1A0F34 80272654 86820180 */  lh        $v0, 0x180($s4)
/* 1A0F38 80272658 18400013 */  blez      $v0, .L802726A8
/* 1A0F3C 8027265C 00000000 */   nop
/* 1A0F40 80272660 8E020000 */  lw        $v0, 0x0($s0)
/* 1A0F44 80272664 30420040 */  andi      $v0, $v0, 0x40
/* 1A0F48 80272668 1040000F */  beqz      $v0, .L802726A8
/* 1A0F4C 8027266C 24020009 */   addiu    $v0, $zero, 0x9
/* 1A0F50 80272670 52220001 */  beql      $s1, $v0, .L80272678
/* 1A0F54 80272674 2411000B */   addiu    $s1, $zero, 0xB
.L80272678:
/* 1A0F58 80272678 2402000A */  addiu     $v0, $zero, 0xA
/* 1A0F5C 8027267C 52220001 */  beql      $s1, $v0, .L80272684
/* 1A0F60 80272680 2411000B */   addiu    $s1, $zero, 0xB
.L80272684:
/* 1A0F64 80272684 24020017 */  addiu     $v0, $zero, 0x17
/* 1A0F68 80272688 52220001 */  beql      $s1, $v0, .L80272690
/* 1A0F6C 8027268C 2411000B */   addiu    $s1, $zero, 0xB
.L80272690:
/* 1A0F70 80272690 24020019 */  addiu     $v0, $zero, 0x19
/* 1A0F74 80272694 52220001 */  beql      $s1, $v0, .L8027269C
/* 1A0F78 80272698 2411000B */   addiu    $s1, $zero, 0xB
.L8027269C:
/* 1A0F7C 8027269C 24020020 */  addiu     $v0, $zero, 0x20
/* 1A0F80 802726A0 52220001 */  beql      $s1, $v0, .L802726A8
/* 1A0F84 802726A4 24110021 */   addiu    $s1, $zero, 0x21
.L802726A8:
/* 1A0F88 802726A8 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A0F8C 802726AC 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A0F90 802726B0 30420020 */  andi      $v0, $v0, 0x20
/* 1A0F94 802726B4 10400045 */  beqz      $v0, .L802727CC
/* 1A0F98 802726B8 3C031000 */   lui      $v1, (0x10000000 >> 16)
/* 1A0F9C 802726BC 8E820188 */  lw        $v0, 0x188($s4)
/* 1A0FA0 802726C0 00431024 */  and       $v0, $v0, $v1
/* 1A0FA4 802726C4 14400013 */  bnez      $v0, .L80272714
/* 1A0FA8 802726C8 3C030010 */   lui      $v1, (0x100000 >> 16)
/* 1A0FAC 802726CC 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A0FB0 802726D0 00431024 */  and       $v0, $v0, $v1
/* 1A0FB4 802726D4 1040000F */  beqz      $v0, .L80272714
/* 1A0FB8 802726D8 24020009 */   addiu    $v0, $zero, 0x9
/* 1A0FBC 802726DC 52220001 */  beql      $s1, $v0, .L802726E4
/* 1A0FC0 802726E0 24110015 */   addiu    $s1, $zero, 0x15
.L802726E4:
/* 1A0FC4 802726E4 2402000A */  addiu     $v0, $zero, 0xA
/* 1A0FC8 802726E8 52220001 */  beql      $s1, $v0, .L802726F0
/* 1A0FCC 802726EC 24110015 */   addiu    $s1, $zero, 0x15
.L802726F0:
/* 1A0FD0 802726F0 24020017 */  addiu     $v0, $zero, 0x17
/* 1A0FD4 802726F4 52220001 */  beql      $s1, $v0, .L802726FC
/* 1A0FD8 802726F8 24110015 */   addiu    $s1, $zero, 0x15
.L802726FC:
/* 1A0FDC 802726FC 24020019 */  addiu     $v0, $zero, 0x19
/* 1A0FE0 80272700 52220001 */  beql      $s1, $v0, .L80272708
/* 1A0FE4 80272704 24110015 */   addiu    $s1, $zero, 0x15
.L80272708:
/* 1A0FE8 80272708 24020020 */  addiu     $v0, $zero, 0x20
/* 1A0FEC 8027270C 52220001 */  beql      $s1, $v0, .L80272714
/* 1A0FF0 80272710 24110028 */   addiu    $s1, $zero, 0x28
.L80272714:
/* 1A0FF4 80272714 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A0FF8 80272718 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A0FFC 8027271C 30420020 */  andi      $v0, $v0, 0x20
/* 1A1000 80272720 1040002A */  beqz      $v0, .L802727CC
/* 1A1004 80272724 00000000 */   nop
/* 1A1008 80272728 8E820188 */  lw        $v0, 0x188($s4)
/* 1A100C 8027272C 30420480 */  andi      $v0, $v0, 0x480
/* 1A1010 80272730 1040000B */  beqz      $v0, .L80272760
/* 1A1014 80272734 00000000 */   nop
/* 1A1018 80272738 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A101C 8027273C 30424000 */  andi      $v0, $v0, 0x4000
/* 1A1020 80272740 10400007 */  beqz      $v0, .L80272760
/* 1A1024 80272744 2402000A */   addiu    $v0, $zero, 0xA
/* 1A1028 80272748 52220001 */  beql      $s1, $v0, .L80272750
/* 1A102C 8027274C 2411000C */   addiu    $s1, $zero, 0xC
.L80272750:
/* 1A1030 80272750 24020019 */  addiu     $v0, $zero, 0x19
/* 1A1034 80272754 52220001 */  beql      $s1, $v0, .L8027275C
/* 1A1038 80272758 2411000C */   addiu    $s1, $zero, 0xC
.L8027275C:
/* 1A103C 8027275C 24160001 */  addiu     $s6, $zero, 0x1
.L80272760:
/* 1A1040 80272760 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A1044 80272764 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A1048 80272768 30420020 */  andi      $v0, $v0, 0x20
/* 1A104C 8027276C 10400017 */  beqz      $v0, .L802727CC
/* 1A1050 80272770 00000000 */   nop
/* 1A1054 80272774 8E820188 */  lw        $v0, 0x188($s4)
/* 1A1058 80272778 30420C80 */  andi      $v0, $v0, 0xC80
/* 1A105C 8027277C 1040000E */  beqz      $v0, .L802727B8
/* 1A1060 80272780 00000000 */   nop
/* 1A1064 80272784 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A1068 80272788 30421000 */  andi      $v0, $v0, 0x1000
/* 1A106C 8027278C 1040000A */  beqz      $v0, .L802727B8
/* 1A1070 80272790 2402000A */   addiu    $v0, $zero, 0xA
/* 1A1074 80272794 52220001 */  beql      $s1, $v0, .L8027279C
/* 1A1078 80272798 2411000D */   addiu    $s1, $zero, 0xD
.L8027279C:
/* 1A107C 8027279C 24020019 */  addiu     $v0, $zero, 0x19
/* 1A1080 802727A0 52220001 */  beql      $s1, $v0, .L802727A8
/* 1A1084 802727A4 2411000D */   addiu    $s1, $zero, 0xD
.L802727A8:
/* 1A1088 802727A8 8E620000 */  lw        $v0, 0x0($s3)
/* 1A108C 802727AC 30420400 */  andi      $v0, $v0, 0x400
/* 1A1090 802727B0 50400001 */  beql      $v0, $zero, .L802727B8
/* 1A1094 802727B4 24160001 */   addiu    $s6, $zero, 0x1
.L802727B8:
/* 1A1098 802727B8 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A109C 802727BC 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A10A0 802727C0 30420020 */  andi      $v0, $v0, 0x20
/* 1A10A4 802727C4 14400017 */  bnez      $v0, .L80272824
/* 1A10A8 802727C8 00000000 */   nop
.L802727CC:
/* 1A10AC 802727CC 8E820188 */  lw        $v0, 0x188($s4)
/* 1A10B0 802727D0 30420C80 */  andi      $v0, $v0, 0xC80
/* 1A10B4 802727D4 1040000E */  beqz      $v0, .L80272810
/* 1A10B8 802727D8 00000000 */   nop
/* 1A10BC 802727DC 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A10C0 802727E0 30421000 */  andi      $v0, $v0, 0x1000
/* 1A10C4 802727E4 1040000A */  beqz      $v0, .L80272810
/* 1A10C8 802727E8 24020009 */   addiu    $v0, $zero, 0x9
/* 1A10CC 802727EC 52220001 */  beql      $s1, $v0, .L802727F4
/* 1A10D0 802727F0 2411000D */   addiu    $s1, $zero, 0xD
.L802727F4:
/* 1A10D4 802727F4 24020017 */  addiu     $v0, $zero, 0x17
/* 1A10D8 802727F8 52220001 */  beql      $s1, $v0, .L80272800
/* 1A10DC 802727FC 2411000D */   addiu    $s1, $zero, 0xD
.L80272800:
/* 1A10E0 80272800 8E620000 */  lw        $v0, 0x0($s3)
/* 1A10E4 80272804 30420400 */  andi      $v0, $v0, 0x400
/* 1A10E8 80272808 50400001 */  beql      $v0, $zero, .L80272810
/* 1A10EC 8027280C 24160001 */   addiu    $s6, $zero, 0x1
.L80272810:
/* 1A10F0 80272810 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A10F4 80272814 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A10F8 80272818 30420020 */  andi      $v0, $v0, 0x20
/* 1A10FC 8027281C 504000A2 */  beql      $v0, $zero, .L80272AA8
/* 1A1100 80272820 0260202D */   daddu    $a0, $s3, $zero
.L80272824:
/* 1A1104 80272824 8E820188 */  lw        $v0, 0x188($s4)
/* 1A1108 80272828 3C030002 */  lui       $v1, (0x20000 >> 16)
/* 1A110C 8027282C 00431024 */  and       $v0, $v0, $v1
/* 1A1110 80272830 1040000B */  beqz      $v0, .L80272860
/* 1A1114 80272834 00000000 */   nop
/* 1A1118 80272838 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A111C 8027283C 30421000 */  andi      $v0, $v0, 0x1000
/* 1A1120 80272840 10400007 */  beqz      $v0, .L80272860
/* 1A1124 80272844 2402000A */   addiu    $v0, $zero, 0xA
/* 1A1128 80272848 52220001 */  beql      $s1, $v0, .L80272850
/* 1A112C 8027284C 24110012 */   addiu    $s1, $zero, 0x12
.L80272850:
/* 1A1130 80272850 24020019 */  addiu     $v0, $zero, 0x19
/* 1A1134 80272854 52220001 */  beql      $s1, $v0, .L8027285C
/* 1A1138 80272858 24110012 */   addiu    $s1, $zero, 0x12
.L8027285C:
/* 1A113C 8027285C 24160001 */  addiu     $s6, $zero, 0x1
.L80272860:
/* 1A1140 80272860 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A1144 80272864 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A1148 80272868 30420020 */  andi      $v0, $v0, 0x20
/* 1A114C 8027286C 5040008E */  beql      $v0, $zero, .L80272AA8
/* 1A1150 80272870 0260202D */   daddu    $a0, $s3, $zero
/* 1A1154 80272874 8E820188 */  lw        $v0, 0x188($s4)
/* 1A1158 80272878 30420202 */  andi      $v0, $v0, 0x202
/* 1A115C 8027287C 10400008 */  beqz      $v0, .L802728A0
/* 1A1160 80272880 2402000A */   addiu    $v0, $zero, 0xA
/* 1A1164 80272884 52220001 */  beql      $s1, $v0, .L8027288C
/* 1A1168 80272888 2411000E */   addiu    $s1, $zero, 0xE
.L8027288C:
/* 1A116C 8027288C 24020020 */  addiu     $v0, $zero, 0x20
/* 1A1170 80272890 52220001 */  beql      $s1, $v0, .L80272898
/* 1A1174 80272894 24110024 */   addiu    $s1, $zero, 0x24
.L80272898:
/* 1A1178 80272898 24080001 */  addiu     $t0, $zero, 0x1
/* 1A117C 8027289C AFA80028 */  sw        $t0, 0x28($sp)
.L802728A0:
/* 1A1180 802728A0 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A1184 802728A4 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A1188 802728A8 30420020 */  andi      $v0, $v0, 0x20
/* 1A118C 802728AC 5040007E */  beql      $v0, $zero, .L80272AA8
/* 1A1190 802728B0 0260202D */   daddu    $a0, $s3, $zero
/* 1A1194 802728B4 86820180 */  lh        $v0, 0x180($s4)
/* 1A1198 802728B8 0440007A */  bltz      $v0, .L80272AA4
/* 1A119C 802728BC 24020020 */   addiu    $v0, $zero, 0x20
/* 1A11A0 802728C0 12220078 */  beq       $s1, $v0, .L80272AA4
/* 1A11A4 802728C4 24020021 */   addiu    $v0, $zero, 0x21
/* 1A11A8 802728C8 12220076 */  beq       $s1, $v0, .L80272AA4
/* 1A11AC 802728CC 24020022 */   addiu    $v0, $zero, 0x22
/* 1A11B0 802728D0 52220075 */  beql      $s1, $v0, .L80272AA8
/* 1A11B4 802728D4 0260202D */   daddu    $a0, $s3, $zero
/* 1A11B8 802728D8 8FC20004 */  lw        $v0, 0x4($fp)
/* 1A11BC 802728DC 30420004 */  andi      $v0, $v0, 0x4
/* 1A11C0 802728E0 14400070 */  bnez      $v0, .L80272AA4
/* 1A11C4 802728E4 3C030008 */   lui      $v1, (0x80000 >> 16)
/* 1A11C8 802728E8 8E820190 */  lw        $v0, 0x190($s4)
/* 1A11CC 802728EC 00431024 */  and       $v0, $v0, $v1
/* 1A11D0 802728F0 10400008 */  beqz      $v0, .L80272914
/* 1A11D4 802728F4 0260202D */   daddu    $a0, $s3, $zero
/* 1A11D8 802728F8 2405000A */  addiu     $a1, $zero, 0xA
/* 1A11DC 802728FC 0C099ADE */  jal       try_inflict_status
/* 1A11E0 80272900 24060027 */   addiu    $a2, $zero, 0x27
/* 1A11E4 80272904 10400003 */  beqz      $v0, .L80272914
/* 1A11E8 80272908 00000000 */   nop
/* 1A11EC 8027290C 24160001 */  addiu     $s6, $zero, 0x1
/* 1A11F0 80272910 02C0B82D */  daddu     $s7, $s6, $zero
.L80272914:
/* 1A11F4 80272914 8E820190 */  lw        $v0, 0x190($s4)
/* 1A11F8 80272918 3C030002 */  lui       $v1, (0x20000 >> 16)
/* 1A11FC 8027291C 00431024 */  and       $v0, $v0, $v1
/* 1A1200 80272920 10400008 */  beqz      $v0, .L80272944
/* 1A1204 80272924 0260202D */   daddu    $a0, $s3, $zero
/* 1A1208 80272928 24050009 */  addiu     $a1, $zero, 0x9
/* 1A120C 8027292C 0C099ADE */  jal       try_inflict_status
/* 1A1210 80272930 24060025 */   addiu    $a2, $zero, 0x25
/* 1A1214 80272934 10400003 */  beqz      $v0, .L80272944
/* 1A1218 80272938 00000000 */   nop
/* 1A121C 8027293C 24160001 */  addiu     $s6, $zero, 0x1
/* 1A1220 80272940 02C0B82D */  daddu     $s7, $s6, $zero
.L80272944:
/* 1A1224 80272944 8E820190 */  lw        $v0, 0x190($s4)
/* 1A1228 80272948 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 1A122C 8027294C 00431024 */  and       $v0, $v0, $v1
/* 1A1230 80272950 10400008 */  beqz      $v0, .L80272974
/* 1A1234 80272954 0260202D */   daddu    $a0, $s3, $zero
/* 1A1238 80272958 2405000C */  addiu     $a1, $zero, 0xC
/* 1A123C 8027295C 0C099ADE */  jal       try_inflict_status
/* 1A1240 80272960 24060028 */   addiu    $a2, $zero, 0x28
/* 1A1244 80272964 10400003 */  beqz      $v0, .L80272974
/* 1A1248 80272968 00000000 */   nop
/* 1A124C 8027296C 24160001 */  addiu     $s6, $zero, 0x1
/* 1A1250 80272970 02C0B82D */  daddu     $s7, $s6, $zero
.L80272974:
/* 1A1254 80272974 8E820190 */  lw        $v0, 0x190($s4)
/* 1A1258 80272978 30421000 */  andi      $v0, $v0, 0x1000
/* 1A125C 8027297C 10400008 */  beqz      $v0, .L802729A0
/* 1A1260 80272980 0260202D */   daddu    $a0, $s3, $zero
/* 1A1264 80272984 24050006 */  addiu     $a1, $zero, 0x6
/* 1A1268 80272988 0C099ADE */  jal       try_inflict_status
/* 1A126C 8027298C 24060020 */   addiu    $a2, $zero, 0x20
/* 1A1270 80272990 10400003 */  beqz      $v0, .L802729A0
/* 1A1274 80272994 00000000 */   nop
/* 1A1278 80272998 24160001 */  addiu     $s6, $zero, 0x1
/* 1A127C 8027299C 02C0B82D */  daddu     $s7, $s6, $zero
.L802729A0:
/* 1A1280 802729A0 8E820190 */  lw        $v0, 0x190($s4)
/* 1A1284 802729A4 3C030020 */  lui       $v1, (0x200000 >> 16)
/* 1A1288 802729A8 00431024 */  and       $v0, $v0, $v1
/* 1A128C 802729AC 10400008 */  beqz      $v0, .L802729D0
/* 1A1290 802729B0 0260202D */   daddu    $a0, $s3, $zero
/* 1A1294 802729B4 24050008 */  addiu     $a1, $zero, 0x8
/* 1A1298 802729B8 0C099ADE */  jal       try_inflict_status
/* 1A129C 802729BC 24060029 */   addiu    $a2, $zero, 0x29
/* 1A12A0 802729C0 10400003 */  beqz      $v0, .L802729D0
/* 1A12A4 802729C4 00000000 */   nop
/* 1A12A8 802729C8 24160001 */  addiu     $s6, $zero, 0x1
/* 1A12AC 802729CC 02C0B82D */  daddu     $s7, $s6, $zero
.L802729D0:
/* 1A12B0 802729D0 8E820190 */  lw        $v0, 0x190($s4)
/* 1A12B4 802729D4 30422000 */  andi      $v0, $v0, 0x2000
/* 1A12B8 802729D8 10400008 */  beqz      $v0, .L802729FC
/* 1A12BC 802729DC 0260202D */   daddu    $a0, $s3, $zero
/* 1A12C0 802729E0 2405000B */  addiu     $a1, $zero, 0xB
/* 1A12C4 802729E4 0C099ADE */  jal       try_inflict_status
/* 1A12C8 802729E8 24060021 */   addiu    $a2, $zero, 0x21
/* 1A12CC 802729EC 10400003 */  beqz      $v0, .L802729FC
/* 1A12D0 802729F0 00000000 */   nop
/* 1A12D4 802729F4 24160001 */  addiu     $s6, $zero, 0x1
/* 1A12D8 802729F8 02C0B82D */  daddu     $s7, $s6, $zero
.L802729FC:
/* 1A12DC 802729FC 8E820190 */  lw        $v0, 0x190($s4)
/* 1A12E0 80272A00 30428000 */  andi      $v0, $v0, 0x8000
/* 1A12E4 80272A04 10400008 */  beqz      $v0, .L80272A28
/* 1A12E8 80272A08 0260202D */   daddu    $a0, $s3, $zero
/* 1A12EC 80272A0C 24050003 */  addiu     $a1, $zero, 0x3
/* 1A12F0 80272A10 0C099ADE */  jal       try_inflict_status
/* 1A12F4 80272A14 24060023 */   addiu    $a2, $zero, 0x23
/* 1A12F8 80272A18 10400003 */  beqz      $v0, .L80272A28
/* 1A12FC 80272A1C 00000000 */   nop
/* 1A1300 80272A20 24160001 */  addiu     $s6, $zero, 0x1
/* 1A1304 80272A24 02C0B82D */  daddu     $s7, $s6, $zero
.L80272A28:
/* 1A1308 80272A28 8E820190 */  lw        $v0, 0x190($s4)
/* 1A130C 80272A2C 3C030001 */  lui       $v1, (0x10000 >> 16)
/* 1A1310 80272A30 00431024 */  and       $v0, $v0, $v1
/* 1A1314 80272A34 10400008 */  beqz      $v0, .L80272A58
/* 1A1318 80272A38 0260202D */   daddu    $a0, $s3, $zero
/* 1A131C 80272A3C 24050005 */  addiu     $a1, $zero, 0x5
/* 1A1320 80272A40 0C099ADE */  jal       try_inflict_status
/* 1A1324 80272A44 24060026 */   addiu    $a2, $zero, 0x26
/* 1A1328 80272A48 10400003 */  beqz      $v0, .L80272A58
/* 1A132C 80272A4C 00000000 */   nop
/* 1A1330 80272A50 24160001 */  addiu     $s6, $zero, 0x1
/* 1A1334 80272A54 02C0B82D */  daddu     $s7, $s6, $zero
.L80272A58:
/* 1A1338 80272A58 8E820190 */  lw        $v0, 0x190($s4)
/* 1A133C 80272A5C 3C030004 */  lui       $v1, (0x40000 >> 16)
/* 1A1340 80272A60 00431024 */  and       $v0, $v0, $v1
/* 1A1344 80272A64 10400008 */  beqz      $v0, .L80272A88
/* 1A1348 80272A68 0260202D */   daddu    $a0, $s3, $zero
/* 1A134C 80272A6C 24050004 */  addiu     $a1, $zero, 0x4
/* 1A1350 80272A70 0C099ADE */  jal       try_inflict_status
/* 1A1354 80272A74 24060024 */   addiu    $a2, $zero, 0x24
/* 1A1358 80272A78 10400003 */  beqz      $v0, .L80272A88
/* 1A135C 80272A7C 00000000 */   nop
/* 1A1360 80272A80 24160001 */  addiu     $s6, $zero, 0x1
/* 1A1364 80272A84 02C0B82D */  daddu     $s7, $s6, $zero
.L80272A88:
/* 1A1368 80272A88 12E00006 */  beqz      $s7, .L80272AA4
/* 1A136C 80272A8C 24020017 */   addiu    $v0, $zero, 0x17
/* 1A1370 80272A90 52220001 */  beql      $s1, $v0, .L80272A98
/* 1A1374 80272A94 24110009 */   addiu    $s1, $zero, 0x9
.L80272A98:
/* 1A1378 80272A98 24020019 */  addiu     $v0, $zero, 0x19
/* 1A137C 80272A9C 52220001 */  beql      $s1, $v0, .L80272AA4
/* 1A1380 80272AA0 2411000A */   addiu    $s1, $zero, 0xA
.L80272AA4:
/* 1A1384 80272AA4 0260202D */  daddu     $a0, $s3, $zero
.L80272AA8:
/* 1A1388 80272AA8 0220282D */  daddu     $a1, $s1, $zero
/* 1A138C 80272AAC 0C09DC58 */  jal       dispatch_event_actor
/* 1A1390 80272AB0 A2970199 */   sb       $s7, 0x199($s4)
/* 1A1394 80272AB4 8E620000 */  lw        $v0, 0x0($s3)
/* 1A1398 80272AB8 3C030200 */  lui       $v1, (0x2000000 >> 16)
/* 1A139C 80272ABC 00431024 */  and       $v0, $v0, $v1
/* 1A13A0 80272AC0 1440002F */  bnez      $v0, .L80272B80
/* 1A13A4 80272AC4 00000000 */   nop
/* 1A13A8 80272AC8 86870180 */  lh        $a3, 0x180($s4)
/* 1A13AC 80272ACC 14E0000F */  bnez      $a3, .L80272B0C
/* 1A13B0 80272AD0 00000000 */   nop
/* 1A13B4 80272AD4 16C0002C */  bnez      $s6, .L80272B88
/* 1A13B8 80272AD8 00000000 */   nop
/* 1A13BC 80272ADC 16E00028 */  bnez      $s7, .L80272B80
/* 1A13C0 80272AE0 24020001 */   addiu    $v0, $zero, 0x1
/* 1A13C4 80272AE4 AFA20010 */  sw        $v0, 0x10($sp)
/* 1A13C8 80272AE8 24020003 */  addiu     $v0, $zero, 0x3
/* 1A13CC 80272AEC AFA20014 */  sw        $v0, 0x14($sp)
/* 1A13D0 80272AF0 C64C000C */  lwc1      $f12, 0xC($s2)
/* 1A13D4 80272AF4 C64E0010 */  lwc1      $f14, 0x10($s2)
/* 1A13D8 80272AF8 8E460014 */  lw        $a2, 0x14($s2)
/* 1A13DC 80272AFC 0C093BF8 */  jal       func_8024EFE0
/* 1A13E0 80272B00 0000382D */   daddu    $a3, $zero, $zero
/* 1A13E4 80272B04 0809CAE0 */  j         .L80272B80
/* 1A13E8 80272B08 00000000 */   nop
.L80272B0C:
/* 1A13EC 80272B0C 8FA8001C */  lw        $t0, 0x1C($sp)
/* 1A13F0 80272B10 1500001B */  bnez      $t0, .L80272B80
/* 1A13F4 80272B14 3C032000 */   lui      $v1, (0x20000040 >> 16)
/* 1A13F8 80272B18 8E820188 */  lw        $v0, 0x188($s4)
/* 1A13FC 80272B1C 34630040 */  ori       $v1, $v1, (0x20000040 & 0xFFFF)
/* 1A1400 80272B20 00431024 */  and       $v0, $v0, $v1
/* 1A1404 80272B24 10400007 */  beqz      $v0, .L80272B44
/* 1A1408 80272B28 AFA00010 */   sw       $zero, 0x10($sp)
/* 1A140C 80272B2C C64C000C */  lwc1      $f12, 0xC($s2)
/* 1A1410 80272B30 C64E0010 */  lwc1      $f14, 0x10($s2)
/* 1A1414 80272B34 0C09996B */  jal       show_next_damage_popup
/* 1A1418 80272B38 8E460014 */   lw       $a2, 0x14($s2)
/* 1A141C 80272B3C 0809CAD5 */  j         .L80272B54
/* 1A1420 80272B40 00000000 */   nop
.L80272B44:
/* 1A1424 80272B44 C64C000C */  lwc1      $f12, 0xC($s2)
/* 1A1428 80272B48 C64E0010 */  lwc1      $f14, 0x10($s2)
/* 1A142C 80272B4C 0C099937 */  jal       show_primary_damage_popup
/* 1A1430 80272B50 8E460014 */   lw       $a2, 0x14($s2)
.L80272B54:
/* 1A1434 80272B54 8FC20004 */  lw        $v0, 0x4($fp)
/* 1A1438 80272B58 30420004 */  andi      $v0, $v0, 0x4
/* 1A143C 80272B5C 14400008 */  bnez      $v0, .L80272B80
/* 1A1440 80272B60 00000000 */   nop
/* 1A1444 80272B64 86820180 */  lh        $v0, 0x180($s4)
/* 1A1448 80272B68 AFA20010 */  sw        $v0, 0x10($sp)
/* 1A144C 80272B6C 8E45000C */  lw        $a1, 0xC($s2)
/* 1A1450 80272B70 8E460010 */  lw        $a2, 0x10($s2)
/* 1A1454 80272B74 8E470014 */  lw        $a3, 0x14($s2)
/* 1A1458 80272B78 0C0999B9 */  jal       show_damage_fx
/* 1A145C 80272B7C 0260202D */   daddu    $a0, $s3, $zero
.L80272B80:
/* 1A1460 80272B80 12C00006 */  beqz      $s6, .L80272B9C
/* 1A1464 80272B84 00000000 */   nop
.L80272B88:
/* 1A1468 80272B88 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A146C 80272B8C 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A1470 80272B90 30420040 */  andi      $v0, $v0, 0x40
/* 1A1474 80272B94 14400006 */  bnez      $v0, .L80272BB0
/* 1A1478 80272B98 00000000 */   nop
.L80272B9C:
/* 1A147C 80272B9C 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A1480 80272BA0 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A1484 80272BA4 30420040 */  andi      $v0, $v0, 0x40
/* 1A1488 80272BA8 1040002E */  beqz      $v0, .L80272C64
/* 1A148C 80272BAC 00000000 */   nop
.L80272BB0:
/* 1A1490 80272BB0 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A1494 80272BB4 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A1498 80272BB8 30420080 */  andi      $v0, $v0, 0x80
/* 1A149C 80272BBC 14400029 */  bnez      $v0, .L80272C64
/* 1A14A0 80272BC0 00000000 */   nop
/* 1A14A4 80272BC4 8FA80018 */  lw        $t0, 0x18($sp)
/* 1A14A8 80272BC8 8D0201B0 */  lw        $v0, 0x1B0($t0)
/* 1A14AC 80272BCC 10400008 */  beqz      $v0, .L80272BF0
/* 1A14B0 80272BD0 00000000 */   nop
/* 1A14B4 80272BD4 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A14B8 80272BD8 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A14BC 80272BDC 8D0401B0 */  lw        $a0, 0x1B0($t0)
/* 1A14C0 80272BE0 8E46000C */  lw        $a2, 0xC($s2)
/* 1A14C4 80272BE4 8E470010 */  lw        $a3, 0x10($s2)
/* 1A14C8 80272BE8 0C052757 */  jal       sfx_play_sound_at_position
/* 1A14CC 80272BEC 0000282D */   daddu    $a1, $zero, $zero
.L80272BF0:
/* 1A14D0 80272BF0 86820180 */  lh        $v0, 0x180($s4)
/* 1A14D4 80272BF4 18400006 */  blez      $v0, .L80272C10
/* 1A14D8 80272BF8 00000000 */   nop
/* 1A14DC 80272BFC 0C05272D */  jal       sfx_play_sound
/* 1A14E0 80272C00 24040231 */   addiu    $a0, $zero, 0x231
/* 1A14E4 80272C04 86820180 */  lh        $v0, 0x180($s4)
/* 1A14E8 80272C08 1C400008 */  bgtz      $v0, .L80272C2C
/* 1A14EC 80272C0C 00000000 */   nop
.L80272C10:
/* 1A14F0 80272C10 8E820188 */  lw        $v0, 0x188($s4)
/* 1A14F4 80272C14 3C034000 */  lui       $v1, (0x40000000 >> 16)
/* 1A14F8 80272C18 00431024 */  and       $v0, $v0, $v1
/* 1A14FC 80272C1C 10400011 */  beqz      $v0, .L80272C64
/* 1A1500 80272C20 00000000 */   nop
/* 1A1504 80272C24 12C0000F */  beqz      $s6, .L80272C64
/* 1A1508 80272C28 00000000 */   nop
.L80272C2C:
/* 1A150C 80272C2C 8E820188 */  lw        $v0, 0x188($s4)
/* 1A1510 80272C30 3C030100 */  lui       $v1, (0x1000000 >> 16)
/* 1A1514 80272C34 00431024 */  and       $v0, $v0, $v1
/* 1A1518 80272C38 14400004 */  bnez      $v0, .L80272C4C
/* 1A151C 80272C3C 24040005 */   addiu    $a0, $zero, 0x5
/* 1A1520 80272C40 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1524 80272C44 0809CB14 */  j         .L80272C50
/* 1A1528 80272C48 0000202D */   daddu    $a0, $zero, $zero
.L80272C4C:
/* 1A152C 80272C4C C6400014 */  lwc1      $f0, 0x14($s2)
.L80272C50:
/* 1A1530 80272C50 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1534 80272C54 8E46000C */  lw        $a2, 0xC($s2)
/* 1A1538 80272C58 8E470010 */  lw        $a3, 0x10($s2)
/* 1A153C 80272C5C 0C0999FC */  jal       show_action_rating
/* 1A1540 80272C60 0260282D */   daddu    $a1, $s3, $zero
.L80272C64:
/* 1A1544 80272C64 8FA80024 */  lw        $t0, 0x24($sp)
/* 1A1548 80272C68 11000007 */  beqz      $t0, .L80272C88
/* 1A154C 80272C6C 24040001 */   addiu    $a0, $zero, 0x1
/* 1A1550 80272C70 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1554 80272C74 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1558 80272C78 8E46000C */  lw        $a2, 0xC($s2)
/* 1A155C 80272C7C 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1560 80272C80 0C0999FC */  jal       show_action_rating
/* 1A1564 80272C84 0260282D */   daddu    $a1, $s3, $zero
.L80272C88:
/* 1A1568 80272C88 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A156C 80272C8C 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A1570 80272C90 30420020 */  andi      $v0, $v0, 0x20
/* 1A1574 80272C94 10400003 */  beqz      $v0, .L80272CA4
/* 1A1578 80272C98 00000000 */   nop
/* 1A157C 80272C9C 0C099A5C */  jal       func_80266970
/* 1A1580 80272CA0 0260202D */   daddu    $a0, $s3, $zero
.L80272CA4:
/* 1A1584 80272CA4 86820180 */  lh        $v0, 0x180($s4)
/* 1A1588 80272CA8 1C400003 */  bgtz      $v0, .L80272CB8
/* 1A158C 80272CAC 00000000 */   nop
/* 1A1590 80272CB0 12C00020 */  beqz      $s6, .L80272D34
/* 1A1594 80272CB4 00000000 */   nop
.L80272CB8:
/* 1A1598 80272CB8 8FA8001C */  lw        $t0, 0x1C($sp)
/* 1A159C 80272CBC 1500001C */  bnez      $t0, .L80272D30
/* 1A15A0 80272CC0 0260202D */   daddu    $a0, $s3, $zero
/* 1A15A4 80272CC4 0C099C06 */  jal       func_80267018
/* 1A15A8 80272CC8 24050001 */   addiu    $a1, $zero, 0x1
/* 1A15AC 80272CCC 8FA80028 */  lw        $t0, 0x28($sp)
/* 1A15B0 80272CD0 11000004 */  beqz      $t0, .L80272CE4
/* 1A15B4 80272CD4 240400EA */   addiu    $a0, $zero, 0xEA
/* 1A15B8 80272CD8 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A15BC 80272CDC 0809CB48 */  j         .L80272D20
/* 1A15C0 80272CE0 E7A00010 */   swc1     $f0, 0x10($sp)
.L80272CE4:
/* 1A15C4 80272CE4 8FA8002C */  lw        $t0, 0x2C($sp)
/* 1A15C8 80272CE8 11000004 */  beqz      $t0, .L80272CFC
/* 1A15CC 80272CEC 2404037B */   addiu    $a0, $zero, 0x37B
/* 1A15D0 80272CF0 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A15D4 80272CF4 0809CB48 */  j         .L80272D20
/* 1A15D8 80272CF8 E7A00010 */   swc1     $f0, 0x10($sp)
.L80272CFC:
/* 1A15DC 80272CFC 8FA80030 */  lw        $t0, 0x30($sp)
/* 1A15E0 80272D00 11000004 */  beqz      $t0, .L80272D14
/* 1A15E4 80272D04 240400EB */   addiu    $a0, $zero, 0xEB
/* 1A15E8 80272D08 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A15EC 80272D0C 0809CB48 */  j         .L80272D20
/* 1A15F0 80272D10 E7A00010 */   swc1     $f0, 0x10($sp)
.L80272D14:
/* 1A15F4 80272D14 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A15F8 80272D18 240400E9 */  addiu     $a0, $zero, 0xE9
/* 1A15FC 80272D1C E7A00010 */  swc1      $f0, 0x10($sp)
.L80272D20:
/* 1A1600 80272D20 8E46000C */  lw        $a2, 0xC($s2)
/* 1A1604 80272D24 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1608 80272D28 0C052757 */  jal       sfx_play_sound_at_position
/* 1A160C 80272D2C 0000282D */   daddu    $a1, $zero, $zero
.L80272D30:
/* 1A1610 80272D30 86820180 */  lh        $v0, 0x180($s4)
.L80272D34:
/* 1A1614 80272D34 1C400006 */  bgtz      $v0, .L80272D50
/* 1A1618 80272D38 00000000 */   nop
/* 1A161C 80272D3C 16C00004 */  bnez      $s6, .L80272D50
/* 1A1620 80272D40 00000000 */   nop
/* 1A1624 80272D44 8FA80020 */  lw        $t0, 0x20($sp)
/* 1A1628 80272D48 11000005 */  beqz      $t0, .L80272D60
/* 1A162C 80272D4C 00000000 */   nop
.L80272D50:
/* 1A1630 80272D50 8FC20000 */  lw        $v0, 0x0($fp)
/* 1A1634 80272D54 30422000 */  andi      $v0, $v0, 0x2000
/* 1A1638 80272D58 10400008 */  beqz      $v0, .L80272D7C
/* 1A163C 80272D5C 00000000 */   nop
.L80272D60:
/* 1A1640 80272D60 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1644 80272D64 2404010C */  addiu     $a0, $zero, 0x10C
/* 1A1648 80272D68 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A164C 80272D6C 8E46000C */  lw        $a2, 0xC($s2)
/* 1A1650 80272D70 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1654 80272D74 0C052757 */  jal       sfx_play_sound_at_position
/* 1A1658 80272D78 0000282D */   daddu    $a1, $zero, $zero
.L80272D7C:
/* 1A165C 80272D7C 8E820190 */  lw        $v0, 0x190($s4)
/* 1A1660 80272D80 30421000 */  andi      $v0, $v0, 0x1000
/* 1A1664 80272D84 10400018 */  beqz      $v0, .L80272DE8
/* 1A1668 80272D88 00000000 */   nop
/* 1A166C 80272D8C 12E00016 */  beqz      $s7, .L80272DE8
/* 1A1670 80272D90 00000000 */   nop
/* 1A1674 80272D94 3C048029 */  lui       $a0, %hi(EVS_PlaySleepHitFX)
/* 1A1678 80272D98 248445E0 */  addiu     $a0, $a0, %lo(EVS_PlaySleepHitFX)
/* 1A167C 80272D9C 2405000A */  addiu     $a1, $zero, 0xA
/* 1A1680 80272DA0 0C0B0CF8 */  jal       start_script
/* 1A1684 80272DA4 0000302D */   daddu    $a2, $zero, $zero
/* 1A1688 80272DA8 C640000C */  lwc1      $f0, 0xC($s2)
/* 1A168C 80272DAC 4600018D */  trunc.w.s $f6, $f0
/* 1A1690 80272DB0 E4460084 */  swc1      $f6, 0x84($v0)
/* 1A1694 80272DB4 C6400010 */  lwc1      $f0, 0x10($s2)
/* 1A1698 80272DB8 4600018D */  trunc.w.s $f6, $f0
/* 1A169C 80272DBC E4460088 */  swc1      $f6, 0x88($v0)
/* 1A16A0 80272DC0 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A16A4 80272DC4 4600018D */  trunc.w.s $f6, $f0
/* 1A16A8 80272DC8 E446008C */  swc1      $f6, 0x8C($v0)
/* 1A16AC 80272DCC C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A16B0 80272DD0 24042031 */  addiu     $a0, $zero, 0x2031
/* 1A16B4 80272DD4 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A16B8 80272DD8 8E46000C */  lw        $a2, 0xC($s2)
/* 1A16BC 80272DDC 8E470010 */  lw        $a3, 0x10($s2)
/* 1A16C0 80272DE0 0C052757 */  jal       sfx_play_sound_at_position
/* 1A16C4 80272DE4 0000282D */   daddu    $a1, $zero, $zero
.L80272DE8:
/* 1A16C8 80272DE8 8E820190 */  lw        $v0, 0x190($s4)
/* 1A16CC 80272DEC 3C030004 */  lui       $v1, (0x40000 >> 16)
/* 1A16D0 80272DF0 00431024 */  and       $v0, $v0, $v1
/* 1A16D4 80272DF4 10400018 */  beqz      $v0, .L80272E58
/* 1A16D8 80272DF8 00000000 */   nop
/* 1A16DC 80272DFC 12E00016 */  beqz      $s7, .L80272E58
/* 1A16E0 80272E00 00000000 */   nop
/* 1A16E4 80272E04 3C048029 */  lui       $a0, %hi(EVS_PlayDizzyHitFX)
/* 1A16E8 80272E08 248445FC */  addiu     $a0, $a0, %lo(EVS_PlayDizzyHitFX)
/* 1A16EC 80272E0C 2405000A */  addiu     $a1, $zero, 0xA
/* 1A16F0 80272E10 0C0B0CF8 */  jal       start_script
/* 1A16F4 80272E14 0000302D */   daddu    $a2, $zero, $zero
/* 1A16F8 80272E18 C640000C */  lwc1      $f0, 0xC($s2)
/* 1A16FC 80272E1C 4600018D */  trunc.w.s $f6, $f0
/* 1A1700 80272E20 E4460084 */  swc1      $f6, 0x84($v0)
/* 1A1704 80272E24 C6400010 */  lwc1      $f0, 0x10($s2)
/* 1A1708 80272E28 4600018D */  trunc.w.s $f6, $f0
/* 1A170C 80272E2C E4460088 */  swc1      $f6, 0x88($v0)
/* 1A1710 80272E30 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1714 80272E34 4600018D */  trunc.w.s $f6, $f0
/* 1A1718 80272E38 E446008C */  swc1      $f6, 0x8C($v0)
/* 1A171C 80272E3C C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1720 80272E40 24042032 */  addiu     $a0, $zero, 0x2032
/* 1A1724 80272E44 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1728 80272E48 8E46000C */  lw        $a2, 0xC($s2)
/* 1A172C 80272E4C 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1730 80272E50 0C052757 */  jal       sfx_play_sound_at_position
/* 1A1734 80272E54 0000282D */   daddu    $a1, $zero, $zero
.L80272E58:
/* 1A1738 80272E58 8E820190 */  lw        $v0, 0x190($s4)
/* 1A173C 80272E5C 3C030001 */  lui       $v1, (0x10000 >> 16)
/* 1A1740 80272E60 00431024 */  and       $v0, $v0, $v1
/* 1A1744 80272E64 10400018 */  beqz      $v0, .L80272EC8
/* 1A1748 80272E68 00000000 */   nop
/* 1A174C 80272E6C 12E00016 */  beqz      $s7, .L80272EC8
/* 1A1750 80272E70 00000000 */   nop
/* 1A1754 80272E74 3C048029 */  lui       $a0, %hi(EVS_PlayParalyzeHitFX)
/* 1A1758 80272E78 24844618 */  addiu     $a0, $a0, %lo(EVS_PlayParalyzeHitFX)
/* 1A175C 80272E7C 2405000A */  addiu     $a1, $zero, 0xA
/* 1A1760 80272E80 0C0B0CF8 */  jal       start_script
/* 1A1764 80272E84 0000302D */   daddu    $a2, $zero, $zero
/* 1A1768 80272E88 C640000C */  lwc1      $f0, 0xC($s2)
/* 1A176C 80272E8C 4600018D */  trunc.w.s $f6, $f0
/* 1A1770 80272E90 E4460084 */  swc1      $f6, 0x84($v0)
/* 1A1774 80272E94 C6400010 */  lwc1      $f0, 0x10($s2)
/* 1A1778 80272E98 4600018D */  trunc.w.s $f6, $f0
/* 1A177C 80272E9C E4460088 */  swc1      $f6, 0x88($v0)
/* 1A1780 80272EA0 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1784 80272EA4 4600018D */  trunc.w.s $f6, $f0
/* 1A1788 80272EA8 E446008C */  swc1      $f6, 0x8C($v0)
/* 1A178C 80272EAC C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1790 80272EB0 24042032 */  addiu     $a0, $zero, 0x2032
/* 1A1794 80272EB4 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1798 80272EB8 8E46000C */  lw        $a2, 0xC($s2)
/* 1A179C 80272EBC 8E470010 */  lw        $a3, 0x10($s2)
/* 1A17A0 80272EC0 0C052757 */  jal       sfx_play_sound_at_position
/* 1A17A4 80272EC4 0000282D */   daddu    $a1, $zero, $zero
.L80272EC8:
/* 1A17A8 80272EC8 8E820190 */  lw        $v0, 0x190($s4)
/* 1A17AC 80272ECC 3C030002 */  lui       $v1, (0x20000 >> 16)
/* 1A17B0 80272ED0 00431024 */  and       $v0, $v0, $v1
/* 1A17B4 80272ED4 10400018 */  beqz      $v0, .L80272F38
/* 1A17B8 80272ED8 00000000 */   nop
/* 1A17BC 80272EDC 12E00016 */  beqz      $s7, .L80272F38
/* 1A17C0 80272EE0 00000000 */   nop
/* 1A17C4 80272EE4 3C048029 */  lui       $a0, %hi(EVS_PlayPoisonHitFX)
/* 1A17C8 80272EE8 24844634 */  addiu     $a0, $a0, %lo(EVS_PlayPoisonHitFX)
/* 1A17CC 80272EEC 2405000A */  addiu     $a1, $zero, 0xA
/* 1A17D0 80272EF0 0C0B0CF8 */  jal       start_script
/* 1A17D4 80272EF4 0000302D */   daddu    $a2, $zero, $zero
/* 1A17D8 80272EF8 C640000C */  lwc1      $f0, 0xC($s2)
/* 1A17DC 80272EFC 4600018D */  trunc.w.s $f6, $f0
/* 1A17E0 80272F00 E4460084 */  swc1      $f6, 0x84($v0)
/* 1A17E4 80272F04 C6400010 */  lwc1      $f0, 0x10($s2)
/* 1A17E8 80272F08 4600018D */  trunc.w.s $f6, $f0
/* 1A17EC 80272F0C E4460088 */  swc1      $f6, 0x88($v0)
/* 1A17F0 80272F10 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A17F4 80272F14 4600018D */  trunc.w.s $f6, $f0
/* 1A17F8 80272F18 E446008C */  swc1      $f6, 0x8C($v0)
/* 1A17FC 80272F1C C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1800 80272F20 24042032 */  addiu     $a0, $zero, 0x2032
/* 1A1804 80272F24 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1808 80272F28 8E46000C */  lw        $a2, 0xC($s2)
/* 1A180C 80272F2C 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1810 80272F30 0C052757 */  jal       sfx_play_sound_at_position
/* 1A1814 80272F34 0000282D */   daddu    $a1, $zero, $zero
.L80272F38:
/* 1A1818 80272F38 8E820190 */  lw        $v0, 0x190($s4)
/* 1A181C 80272F3C 3C030020 */  lui       $v1, (0x200000 >> 16)
/* 1A1820 80272F40 00431024 */  and       $v0, $v0, $v1
/* 1A1824 80272F44 10400018 */  beqz      $v0, .L80272FA8
/* 1A1828 80272F48 00000000 */   nop
/* 1A182C 80272F4C 12E00016 */  beqz      $s7, .L80272FA8
/* 1A1830 80272F50 00000000 */   nop
/* 1A1834 80272F54 3C048029 */  lui       $a0, %hi(EVS_PlayStopHitFX)
/* 1A1838 80272F58 24844650 */  addiu     $a0, $a0, %lo(EVS_PlayStopHitFX)
/* 1A183C 80272F5C 2405000A */  addiu     $a1, $zero, 0xA
/* 1A1840 80272F60 0C0B0CF8 */  jal       start_script
/* 1A1844 80272F64 0000302D */   daddu    $a2, $zero, $zero
/* 1A1848 80272F68 C640000C */  lwc1      $f0, 0xC($s2)
/* 1A184C 80272F6C 4600018D */  trunc.w.s $f6, $f0
/* 1A1850 80272F70 E4460084 */  swc1      $f6, 0x84($v0)
/* 1A1854 80272F74 C6400010 */  lwc1      $f0, 0x10($s2)
/* 1A1858 80272F78 4600018D */  trunc.w.s $f6, $f0
/* 1A185C 80272F7C E4460088 */  swc1      $f6, 0x88($v0)
/* 1A1860 80272F80 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1864 80272F84 4600018D */  trunc.w.s $f6, $f0
/* 1A1868 80272F88 E446008C */  swc1      $f6, 0x8C($v0)
/* 1A186C 80272F8C C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1870 80272F90 24042032 */  addiu     $a0, $zero, 0x2032
/* 1A1874 80272F94 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1878 80272F98 8E46000C */  lw        $a2, 0xC($s2)
/* 1A187C 80272F9C 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1880 80272FA0 0C052757 */  jal       sfx_play_sound_at_position
/* 1A1884 80272FA4 0000282D */   daddu    $a1, $zero, $zero
.L80272FA8:
/* 1A1888 80272FA8 8E820190 */  lw        $v0, 0x190($s4)
/* 1A188C 80272FAC 30424000 */  andi      $v0, $v0, 0x4000
/* 1A1890 80272FB0 10400019 */  beqz      $v0, .L80273018
/* 1A1894 80272FB4 00000000 */   nop
/* 1A1898 80272FB8 12E00017 */  beqz      $s7, .L80273018
/* 1A189C 80272FBC 00000000 */   nop
/* 1A18A0 80272FC0 3C048029 */  lui       $a0, %hi(EVS_PlayFreezeHitFX)
/* 1A18A4 80272FC4 2484466C */  addiu     $a0, $a0, %lo(EVS_PlayFreezeHitFX)
/* 1A18A8 80272FC8 2405000A */  addiu     $a1, $zero, 0xA
/* 1A18AC 80272FCC 0C0B0CF8 */  jal       start_script
/* 1A18B0 80272FD0 0000302D */   daddu    $a2, $zero, $zero
/* 1A18B4 80272FD4 C640000C */  lwc1      $f0, 0xC($s2)
/* 1A18B8 80272FD8 4600018D */  trunc.w.s $f6, $f0
/* 1A18BC 80272FDC E4460084 */  swc1      $f6, 0x84($v0)
/* 1A18C0 80272FE0 C6400010 */  lwc1      $f0, 0x10($s2)
/* 1A18C4 80272FE4 4600018D */  trunc.w.s $f6, $f0
/* 1A18C8 80272FE8 E4460088 */  swc1      $f6, 0x88($v0)
/* 1A18CC 80272FEC C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A18D0 80272FF0 AC530090 */  sw        $s3, 0x90($v0)
/* 1A18D4 80272FF4 4600018D */  trunc.w.s $f6, $f0
/* 1A18D8 80272FF8 E446008C */  swc1      $f6, 0x8C($v0)
/* 1A18DC 80272FFC C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A18E0 80273000 240400E3 */  addiu     $a0, $zero, 0xE3
/* 1A18E4 80273004 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A18E8 80273008 8E46000C */  lw        $a2, 0xC($s2)
/* 1A18EC 8027300C 8E470010 */  lw        $a3, 0x10($s2)
/* 1A18F0 80273010 0C052757 */  jal       sfx_play_sound_at_position
/* 1A18F4 80273014 0000282D */   daddu    $a1, $zero, $zero
.L80273018:
/* 1A18F8 80273018 8E820190 */  lw        $v0, 0x190($s4)
/* 1A18FC 8027301C 3C030008 */  lui       $v1, (0x80000 >> 16)
/* 1A1900 80273020 00431024 */  and       $v0, $v0, $v1
/* 1A1904 80273024 10400019 */  beqz      $v0, .L8027308C
/* 1A1908 80273028 00000000 */   nop
/* 1A190C 8027302C 12E00017 */  beqz      $s7, .L8027308C
/* 1A1910 80273030 00000000 */   nop
/* 1A1914 80273034 3C048029 */  lui       $a0, %hi(EVS_PlayShrinkHitFX)
/* 1A1918 80273038 248446B8 */  addiu     $a0, $a0, %lo(EVS_PlayShrinkHitFX)
/* 1A191C 8027303C 2405000A */  addiu     $a1, $zero, 0xA
/* 1A1920 80273040 0C0B0CF8 */  jal       start_script
/* 1A1924 80273044 0000302D */   daddu    $a2, $zero, $zero
/* 1A1928 80273048 C640000C */  lwc1      $f0, 0xC($s2)
/* 1A192C 8027304C 4600018D */  trunc.w.s $f6, $f0
/* 1A1930 80273050 E4460084 */  swc1      $f6, 0x84($v0)
/* 1A1934 80273054 C6400010 */  lwc1      $f0, 0x10($s2)
/* 1A1938 80273058 4600018D */  trunc.w.s $f6, $f0
/* 1A193C 8027305C E4460088 */  swc1      $f6, 0x88($v0)
/* 1A1940 80273060 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1944 80273064 AC530090 */  sw        $s3, 0x90($v0)
/* 1A1948 80273068 4600018D */  trunc.w.s $f6, $f0
/* 1A194C 8027306C E446008C */  swc1      $f6, 0x8C($v0)
/* 1A1950 80273070 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1954 80273074 24042032 */  addiu     $a0, $zero, 0x2032
/* 1A1958 80273078 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A195C 8027307C 8E46000C */  lw        $a2, 0xC($s2)
/* 1A1960 80273080 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1964 80273084 0C052757 */  jal       sfx_play_sound_at_position
/* 1A1968 80273088 0000282D */   daddu    $a1, $zero, $zero
.L8027308C:
/* 1A196C 8027308C 8E820188 */  lw        $v0, 0x188($s4)
/* 1A1970 80273090 30420040 */  andi      $v0, $v0, 0x40
/* 1A1974 80273094 1040000A */  beqz      $v0, .L802730C0
/* 1A1978 80273098 24020093 */   addiu    $v0, $zero, 0x93
/* 1A197C 8027309C 92630136 */  lbu       $v1, 0x136($s3)
/* 1A1980 802730A0 14620007 */  bne       $v1, $v0, .L802730C0
/* 1A1984 802730A4 24040165 */   addiu    $a0, $zero, 0x165
/* 1A1988 802730A8 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A198C 802730AC E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1990 802730B0 8E46000C */  lw        $a2, 0xC($s2)
/* 1A1994 802730B4 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1998 802730B8 0C052757 */  jal       sfx_play_sound_at_position
/* 1A199C 802730BC 0000282D */   daddu    $a1, $zero, $zero
.L802730C0:
/* 1A19A0 802730C0 0C099AB7 */  jal       show_actor_health_bar
/* 1A19A4 802730C4 0260202D */   daddu    $a0, $s3, $zero
/* 1A19A8 802730C8 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A19AC 802730CC 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 1A19B0 802730D0 30420240 */  andi      $v0, $v0, 0x240
/* 1A19B4 802730D4 10400006 */  beqz      $v0, .L802730F0
/* 1A19B8 802730D8 00000000 */   nop
/* 1A19BC 802730DC 52A00001 */  beql      $s5, $zero, .L802730E4
/* 1A19C0 802730E0 24150001 */   addiu    $s5, $zero, 0x1
.L802730E4:
/* 1A19C4 802730E4 24020002 */  addiu     $v0, $zero, 0x2
/* 1A19C8 802730E8 52A20001 */  beql      $s5, $v0, .L802730F0
/* 1A19CC 802730EC 24150003 */   addiu    $s5, $zero, 0x3
.L802730F0:
/* 1A19D0 802730F0 0C03A752 */  jal       is_ability_active
/* 1A19D4 802730F4 24040013 */   addiu    $a0, $zero, 0x13
/* 1A19D8 802730F8 14400024 */  bnez      $v0, .L8027318C
/* 1A19DC 802730FC 02A0102D */   daddu    $v0, $s5, $zero
/* 1A19E0 80273100 8FA80018 */  lw        $t0, 0x18($sp)
/* 1A19E4 80273104 81020212 */  lb        $v0, 0x212($t0)
/* 1A19E8 80273108 2403000B */  addiu     $v1, $zero, 0xB
/* 1A19EC 8027310C 1043001F */  beq       $v0, $v1, .L8027318C
/* 1A19F0 80273110 02A0102D */   daddu    $v0, $s5, $zero
/* 1A19F4 80273114 82620212 */  lb        $v0, 0x212($s3)
/* 1A19F8 80273118 10430005 */  beq       $v0, $v1, .L80273130
/* 1A19FC 8027311C 3C031000 */   lui      $v1, (0x10000020 >> 16)
/* 1A1A00 80273120 8FC2007C */  lw        $v0, 0x7C($fp)
/* 1A1A04 80273124 30420080 */  andi      $v0, $v0, 0x80
/* 1A1A08 80273128 10400018 */  beqz      $v0, .L8027318C
/* 1A1A0C 8027312C 02A0102D */   daddu    $v0, $s5, $zero
.L80273130:
/* 1A1A10 80273130 8E820188 */  lw        $v0, 0x188($s4)
/* 1A1A14 80273134 34630020 */  ori       $v1, $v1, (0x10000020 & 0xFFFF)
/* 1A1A18 80273138 00431024 */  and       $v0, $v0, $v1
/* 1A1A1C 8027313C 14400013 */  bnez      $v0, .L8027318C
/* 1A1A20 80273140 02A0102D */   daddu    $v0, $s5, $zero
/* 1A1A24 80273144 8E82018C */  lw        $v0, 0x18C($s4)
/* 1A1A28 80273148 30420008 */  andi      $v0, $v0, 0x8
/* 1A1A2C 8027314C 1440000F */  bnez      $v0, .L8027318C
/* 1A1A30 80273150 02A0102D */   daddu    $v0, $s5, $zero
.L80273154:
/* 1A1A34 80273154 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A1A38 80273158 2404037A */  addiu     $a0, $zero, 0x37A
/* 1A1A3C 8027315C E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A1A40 80273160 8E46000C */  lw        $a2, 0xC($s2)
/* 1A1A44 80273164 8E470010 */  lw        $a3, 0x10($s2)
/* 1A1A48 80273168 0C052757 */  jal       sfx_play_sound_at_position
/* 1A1A4C 8027316C 0000282D */   daddu    $a1, $zero, $zero
/* 1A1A50 80273170 8FA40018 */  lw        $a0, 0x18($sp)
/* 1A1A54 80273174 0C09451D */  jal       apply_shock_effect
/* 1A1A58 80273178 00000000 */   nop
/* 1A1A5C 8027317C 24040001 */  addiu     $a0, $zero, 0x1
/* 1A1A60 80273180 0C09CCEA */  jal       dispatch_damage_event_player_1
/* 1A1A64 80273184 2405002F */   addiu    $a1, $zero, 0x2F
/* 1A1A68 80273188 2402FFFF */  addiu     $v0, $zero, -0x1
.L8027318C:
/* 1A1A6C 8027318C 8FBF005C */  lw        $ra, 0x5C($sp)
/* 1A1A70 80273190 8FBE0058 */  lw        $fp, 0x58($sp)
/* 1A1A74 80273194 8FB70054 */  lw        $s7, 0x54($sp)
/* 1A1A78 80273198 8FB60050 */  lw        $s6, 0x50($sp)
/* 1A1A7C 8027319C 8FB5004C */  lw        $s5, 0x4C($sp)
/* 1A1A80 802731A0 8FB40048 */  lw        $s4, 0x48($sp)
/* 1A1A84 802731A4 8FB30044 */  lw        $s3, 0x44($sp)
/* 1A1A88 802731A8 8FB20040 */  lw        $s2, 0x40($sp)
/* 1A1A8C 802731AC 8FB1003C */  lw        $s1, 0x3C($sp)
/* 1A1A90 802731B0 8FB00038 */  lw        $s0, 0x38($sp)
/* 1A1A94 802731B4 03E00008 */  jr        $ra
/* 1A1A98 802731B8 27BD0060 */   addiu    $sp, $sp, 0x60

### DECOMPILED C INSTRUCTIONS:

HitResult calc_player_damage_enemy(void) {
    BattleStatus* battleStatus = &gBattleStatus;
    Actor* player = battleStatus->playerActor;
    s32 currentTargetID = battleStatus->currentTargetID;
    s32 currentTargetPartID = battleStatus->currentTargetPart;
    ActorState* state;
    Evt* evt;
    Actor* target;
    ActorPart* targetPart;
    s32 hitResult;
    s32 currentAttackDamage;
    s32 targetDefense;
    s32 dispatchEvent;
    s32 partImmuneToElement;
    s32 sp20;
    s32 sp24;
    s32 isFireDamage;
    s32 isShockDamage;
    s32 isWaterDamage;
    s32 isIceDamage;
    s32 tempBinary;
    s32 wasStatusInflicted;
    s32 attackFxType;

    sp20 = FALSE;
    isFireDamage = FALSE;
    isWaterDamage = FALSE;
    isShockDamage = FALSE;
    isIceDamage = FALSE;
    tempBinary = FALSE;
    partImmuneToElement = FALSE;
    wasStatusInflicted = FALSE;
    sp24 = FALSE;

    battleStatus->wasStatusInflicted = FALSE;
    battleStatus->lastAttackDamage = 0;
    battleStatus->attackerActorID = player->actorID;
    battleStatus->currentTargetID2 = battleStatus->currentTargetID;
    battleStatus->currentTargetPart2 = battleStatus->currentTargetPart;
    target = get_actor(currentTargetID);
    state = &player->state;

    if (target == NULL) {
        return HIT_RESULT_HIT;
    }

    targetPart = get_actor_part(target, currentTargetPartID);

    ASSERT(targetPart != NULL);

    target->lastDamageTaken = 0;

    if (gBattleStatus.flags1 & BS_FLAGS1_FORCE_HIT_IMMUNE) {
        hitResult = HIT_RESULT_NO_DAMAGE;
        dispatchEvent = EVENT_ZERO_DAMAGE;
    } else {
        if (player_team_is_ability_active(player, ABILITY_ICE_POWER)) {
            if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)) {
                battleStatus->currentAttackElement |= DAMAGE_TYPE_ICE;
            }
        }

        if (targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY
            || (target->transparentStatus == STATUS_KEY_TRANSPARENT
            || targetPart->eventFlags & ACTOR_EVENT_FLAG_800
            && !(battleStatus->currentAttackElement & DAMAGE_TYPE_QUAKE))
        ) {
            return HIT_RESULT_MISS;
        }

        if (target->stoneStatus == STATUS_KEY_STONE) {
            sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
            show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 1);
            show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 0);
            if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
                return HIT_RESULT_1;
            }
            return HIT_RESULT_HIT;
        }

        if (targetPart->elementalImmunities & battleStatus->currentAttackElement) {
            partImmuneToElement = TRUE;
        }

        if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)
            && (targetPart->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP)
            && !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
        {
            sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
            dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
            dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
            return HIT_RESULT_BACKFIRE;
        }

        if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))) {
            if (targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_CONTACT) {
                sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
                dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
                return HIT_RESULT_BACKFIRE;
            }

            if (targetPart->eventFlags & ACTOR_EVENT_FLAG_FIREY
                && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_BURN_CONTACT)
                && !(player_team_is_ability_active(player, ABILITY_FIRE_SHIELD))
                && !(player_team_is_ability_active(player, ABILITY_ICE_POWER))
            ) {
                sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                dispatch_damage_event_player_1(1, EVENT_BURN_CONTACT);
                dispatch_event_actor(target, EVENT_BURN_TAUNT);
                return HIT_RESULT_BACKFIRE;
            }
        }

        if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
            && battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE
            && targetPart->eventFlags & (ACTOR_EVENT_FLAG_FIRE_EXPLODE | ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION)
        ) {
            sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
            dispatch_event_actor(target, EVENT_EXPLODE_TRIGGER);
            if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
                return HIT_RESULT_1;
            }
            return HIT_RESULT_HIT;
        }

        if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SMASH))
            && targetPart->eventFlags & ACTOR_EVENT_FLAG_200000
            && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_FLAG_80)
            && !player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)
        ) {
            sfx_play_sound_at_position(SOUND_108, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
            dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
            dispatch_event_actor(target, EVENT_SPIKE_TAUNT);
            return HIT_RESULT_BACKFIRE;
        }

        if (battleStatus->currentAttackElement & DAMAGE_TYPE_FIRE) {
            fx_ring_blast(0, state->goalPos.x, state->goalPos.y, state->goalPos.z * 5.0f, 1.0f, 24);
            isFireDamage = TRUE;
        }

        if (battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK) {
            apply_shock_effect(target);
            isShockDamage = TRUE;
        }

        if (battleStatus->currentAttackElement & DAMAGE_TYPE_WATER) {
            fx_water_splash(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 24);
            isWaterDamage = TRUE;
        }

        if (battleStatus->currentAttackElement & DAMAGE_TYPE_ICE) {
            fx_big_snowflakes(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f);
            isIceDamage = TRUE;
        }

        attackFxType = player_team_is_ability_active(player, ABILITY_ATTACK_FX);

        if (attackFxType) {
            fx_breaking_junk(0, state->goalPos.x, state->goalPos.y, state->goalPos.z + 5.0f, 1.0f, 30);

            switch (attackFxType) {
                case 1:
                    sfx_play_sound_at_position(SOUND_372, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                    break;
                case 2:
                    sfx_play_sound_at_position(SOUND_F1, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                    break;
                case 3:
                    sfx_play_sound_at_position(SOUND_DC, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                    break;
                case 4:
                    sfx_play_sound_at_position(SOUND_2072, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                    break;
                case 5:
                    sfx_play_sound_at_position(SOUND_2073, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                    break;
                case 6:
                    sfx_play_sound_at_position(SOUND_205B, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                    break;
            }
        }

        if (!is_ability_active(ABILITY_ZAP_TAP)
            && player->staticStatus != STATUS_KEY_STATIC
            && (target->staticStatus == STATUS_KEY_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
            && !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
            && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
        ) {
            gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
            sp20 = TRUE;
        }

        if (targetPart->eventFlags & (ACTOR_EVENT_FLAG_STAR_ROD_ENCHANTED | ACTOR_EVENT_FLAG_ENCHANTED)) {
            battleStatus->currentAttackElement &= ~DAMAGE_TYPE_IGNORE_DEFENSE;
        }

        targetDefense = get_defense(target, targetPart->defenseTable, battleStatus->currentAttackElement);

        if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_IGNORE_DEFENSE)) {
            targetDefense += target->defenseBoost;
        }

        if (targetPart->eventFlags & ACTOR_EVENT_FLAG_2000) {
            targetDefense += 127;
        }

        currentAttackDamage = battleStatus->currentAttackDamage;
        currentAttackDamage += count_power_plus(battleStatus->currentAttackElement);

        if (battleStatus->merleeAttackBoost > 0 && (gBattleStatus.flags1 & BS_FLAGS1_10 || battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)) {
            currentAttackDamage += battleStatus->merleeAttackBoost;
        }

        if (battleStatus->jumpCharge && battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) {
            currentAttackDamage += battleStatus->jumpCharge;
            gBattleStatus.flags1 &= ~BS_FLAGS1_JUMP_CHARGED;
        }

        if (battleStatus->hammerCharge && battleStatus->currentAttackElement & (DAMAGE_TYPE_QUAKE_HAMMER | DAMAGE_TYPE_THROW | DAMAGE_TYPE_SMASH)) {
            currentAttackDamage += battleStatus->hammerCharge;
            gBattleStatus.flags1 &= ~BS_FLAGS1_HAMMER_CHARGED;
        }

        if (battleStatus->unk_98 != 0) {
            currentAttackDamage += 2;
        }

        if (player_team_is_ability_active(player, ABILITY_BERSERKER)) {
            currentAttackDamage += 2;
        }

        if (player_team_is_ability_active(player, ABILITY_P_UP_D_DOWN)) {
            currentAttackDamage++;
        }

        if (player_team_is_ability_active(player, ABILITY_P_DOWN_D_UP)) {
            currentAttackDamage--;
        }

        if (battleStatus->turboChargeTurnsLeft != 0) {
            currentAttackDamage++;
        }

        currentAttackDamage += player->attackBoost;

        if (player_team_is_ability_active(player, ABILITY_HP_DRAIN)) {
            battleStatus->hpDrainCount++;
            currentAttackDamage--;

            if (currentAttackDamage < 0) {
                battleStatus->hpDrainCount += currentAttackDamage;
            }

            gBattleStatus.flags2 |= BS_FLAGS2_HAS_DRAINED_HP;

            if (battleStatus->hpDrainCount > 5) {
                battleStatus->hpDrainCount = 5;
            }
        }

        if (player_team_is_ability_active(player, ABILITY_MEGA_HP_DRAIN)) {
            battleStatus->hpDrainCount += 2;
            currentAttackDamage -= 2;

            if (currentAttackDamage < 0) {
                battleStatus->hpDrainCount += currentAttackDamage;
            }

            gBattleStatus.flags2 |= BS_FLAGS2_HAS_DRAINED_HP;

            if (battleStatus->hpDrainCount > 5) {
                battleStatus->hpDrainCount = 5;
            }
        }

        if (gBattleStatus.flags2 & BS_FLAGS2_HAS_RUSH && (gBattleStatus.flags1 & BS_FLAGS1_10 ||
                battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP)) {
            if (battleStatus->rushFlags & RUSH_FLAG_POWER) {
                currentAttackDamage += 2;
            }

            if (battleStatus->rushFlags & RUSH_FLAG_MEGA) {
                currentAttackDamage += 4;
            }
            fx_radial_shimmer(9, state->goalPos.x, state->goalPos.y, state->goalPos.z, 0.5f, 20);
        }

        if (!(gBattleStatus.flags2 & BS_FLAGS2_1000000) && player_team_is_ability_active(player, ABILITY_ALL_OR_NOTHING)) {
            currentAttackDamage++;

            if (!(gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40))) {
                sp24 = TRUE;
                currentAttackDamage = 0;
                targetDefense = 0;
                gBattleStatus.flags1 &= ~BS_FLAGS1_40;
                gBattleStatus.flags1 &= ~BS_FLAGS1_200;
                gBattleStatus.flags1 &= ~BS_FLAGS1_10;
                gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
            }
        }

        if (player->debuff == STATUS_KEY_SHRINK) {
            if (currentAttackDamage > 0) {
                currentAttackDamage /= 2;

                if (currentAttackDamage == 0) {
                    currentAttackDamage = 1;
                }
            }
        }

        if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
            && battleStatus->currentAttackElement & DAMAGE_TYPE_BLAST
            && targetPart->eventFlags & ACTOR_EVENT_FLAG_EXPLODE_ON_IGNITION
        ) {
            targetDefense = 0;
            currentAttackDamage = target->currentHP;
        }

        if (battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS) {
            targetDefense = 0;
            currentAttackDamage = 0;
        }

        if (currentAttackDamage > 99) {
            currentAttackDamage = 99;
        }

        if (currentAttackDamage < 0) {
            targetDefense = 0;
        }

        target->hpChangeCounter = 0;
        currentAttackDamage -= targetDefense;

        if (currentAttackDamage < 0) {
            currentAttackDamage = 0;
        }

        if (battleStatus->currentAttackElement & DAMAGE_TYPE_POWER_BOUNCE && currentAttackDamage > 0) {
            currentAttackDamage += battleStatus->powerBounceCounter;

            if (currentAttackDamage < 1) {
                currentAttackDamage = 1;
            }
        }

        battleStatus->lastAttackDamage = 0;

        if (currentAttackDamage < 1) {
            target->hpChangeCounter = 0;
            hitResult = HIT_RESULT_NO_DAMAGE;

            if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS)) {
                dispatchEvent = EVENT_ZERO_DAMAGE;
                sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
            } else {
                if (target->currentHP < 1) {
                    dispatchEvent = EVENT_DEATH;
                 } else {
                    dispatchEvent = EVENT_ZERO_DAMAGE;
                }
            }

            battleStatus->lastAttackDamage = 0;
        } else {
            target->damageCounter += currentAttackDamage;
            dispatchEvent = EVENT_HIT_COMBO;
            hitResult = HIT_RESULT_HIT;
            target->hpChangeCounter -= currentAttackDamage;

            if (!(targetPart->flags & ACTOR_PART_FLAG_2000)
                && !(gBattleStatus.flags1 & BS_FLAGS1_TUTORIAL_BATTLE)
                && !partImmuneToElement
                && !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
            ) {
                target->currentHP -= currentAttackDamage;

                if (target->currentHP < 1) {
                    target->currentHP = 0;
                    dispatchEvent = EVENT_DEATH;
                }
            }

            battleStatus->lastAttackDamage += currentAttackDamage;
            target->lastDamageTaken = battleStatus->lastAttackDamage;
            target->hpChangeCounter = 0;
        }

        if (targetPart->flags & ACTOR_PART_FLAG_2000) {
            if (!is_ability_active(ABILITY_ZAP_TAP)
                && player->staticStatus != STATUS_KEY_STATIC
                && (target->staticStatus == STATUS_KEY_STATIC || (targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED))
                && !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
                && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
                && !(battleStatus->currentAttackElement & DAMAGE_TYPE_SHOCK)
            ) {
                sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                apply_shock_effect(player);
                dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
                return HIT_RESULT_BACKFIRE;
            } else {
                dispatchEvent = (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) ? EVENT_ZERO_DAMAGE : EVENT_IMMUNE;
                sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                dispatch_event_actor(target, dispatchEvent);
                show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
                if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
                    return HIT_RESULT_1;
                }
                return HIT_RESULT_HIT;
            }
        }

        if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
            if (battleStatus->currentAttackElement & DAMAGE_TYPE_FEAR
                && rand_int(99) < (target->actorBlueprint->escapeChance * battleStatus->statusChance) / 100
                && (target->debuff != STATUS_KEY_FEAR
                    && target->debuff != STATUS_KEY_DIZZY
                    && target->debuff != STATUS_KEY_PARALYZE
                    && target->debuff != STATUS_KEY_SLEEP
                    && target->debuff != STATUS_KEY_FROZEN
                    && target->debuff != STATUS_KEY_STOP)
                && !(target->flags & ACTOR_FLAG_FLIPPED)
            ) {
                dispatch_event_actor(target, EVENT_SCARE_AWAY);
                if (gBattleStatus.flags1 & (BS_FLAGS1_40 | BS_FLAGS1_200)) {
                    return HIT_RESULT_1;
                }
                return HIT_RESULT_HIT;
            }
        }
    }

    if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
        if (dispatchEvent == EVENT_HIT_COMBO) {
            dispatchEvent = EVENT_HIT;
        }

        if (dispatchEvent == EVENT_ZERO_DAMAGE) {
            dispatchEvent = EVENT_IMMUNE;
        }

        if (target->currentHP < 1) {
            if (dispatchEvent == EVENT_IMMUNE) {
                dispatchEvent = EVENT_DEATH;
            }
        }
    } else if (dispatchEvent == EVENT_DEATH) {
        dispatchEvent = EVENT_HIT_COMBO;
    }

    if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)) {
        clear_part_pal_adjustment(targetPart);
    }

    if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
        if (battleStatus->currentAttackElement & DAMAGE_TYPE_SPIN_SMASH) {
            PlayerData* playerData = &gPlayerData;

            if (target->actorBlueprint->spinSmashReq != 255
                && playerData->hammerLevel + 1 >= target->actorBlueprint->spinSmashReq
                && battleStatus->lastAttackDamage > 0
                && gBattleStatus.flags1 & BS_FLAGS1_40
            ) {
                if (dispatchEvent == EVENT_HIT_COMBO) {
                    dispatchEvent = EVENT_SPIN_SMASH_HIT;
                }

                if (dispatchEvent == EVENT_HIT) {
                    dispatchEvent = EVENT_SPIN_SMASH_HIT;
                }

                if (dispatchEvent == EVENT_ZERO_DAMAGE) {
                    dispatchEvent = EVENT_SPIN_SMASH_HIT;
                }

                if (dispatchEvent == EVENT_IMMUNE) {
                    dispatchEvent = EVENT_SPIN_SMASH_HIT;
                }

                if (dispatchEvent == EVENT_DEATH) {
                    dispatchEvent = EVENT_SPIN_SMASH_DEATH;
                }
            }
        }

        if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
            && !(battleStatus->currentAttackElement & DAMAGE_TYPE_NO_CONTACT)
            && targetPart->eventFlags & ACTOR_EVENT_FLAG_POWER_BOUNCE
        ) {
            if (dispatchEvent == EVENT_HIT_COMBO) {
                dispatchEvent = EVENT_POWER_BOUNCE_HIT;
            }

            if (dispatchEvent == EVENT_HIT) {
                dispatchEvent = EVENT_POWER_BOUNCE_HIT;
            }

            if (dispatchEvent == EVENT_ZERO_DAMAGE) {
                dispatchEvent = EVENT_POWER_BOUNCE_HIT;
            }

            if (dispatchEvent == EVENT_IMMUNE) {
                dispatchEvent = EVENT_POWER_BOUNCE_HIT;
            }

            if (dispatchEvent == EVENT_DEATH) {
                dispatchEvent = EVENT_POWER_BOUNCE_DEATH;
            }
        }

        if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
            && (battleStatus->currentAttackElement & (DAMAGE_TYPE_POW | DAMAGE_TYPE_JUMP))
            && targetPart->eventFlags & ACTOR_EVENT_FLAG_GROUNDABLE
        ) {
            if (dispatchEvent == EVENT_HIT) {
                dispatchEvent = EVENT_FALL_TRIGGER;
            }

            if (dispatchEvent == EVENT_IMMUNE) {
                dispatchEvent = EVENT_FALL_TRIGGER;
            }

            tempBinary = TRUE;
        }

        if ((gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
            && (battleStatus->currentAttackElement & (DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_POW | DAMAGE_TYPE_JUMP))
            && targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
        ) {
            if (dispatchEvent == EVENT_HIT) {
                dispatchEvent = EVENT_FLIP_TRIGGER;
            }

            if (dispatchEvent == EVENT_IMMUNE) {
                dispatchEvent = EVENT_FLIP_TRIGGER;
            }

            if (!(target->flags & ACTOR_FLAG_FLIPPED)) {
                tempBinary = TRUE;
            }
        }
    }

    if (!(gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE)
        && battleStatus->currentAttackElement & (DAMAGE_TYPE_QUAKE | DAMAGE_TYPE_POW | DAMAGE_TYPE_JUMP)
        && targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
    ) {
        if (dispatchEvent == EVENT_HIT_COMBO) {
            dispatchEvent = EVENT_FLIP_TRIGGER;
        }

        if (dispatchEvent == EVENT_ZERO_DAMAGE) {
            dispatchEvent = EVENT_FLIP_TRIGGER;
        }

        if (!(target->flags & ACTOR_FLAG_FLIPPED)) {
            tempBinary = TRUE;
        }
    }

    if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
        && battleStatus->currentAttackElement & DAMAGE_TYPE_SHELL_CRACK
        && targetPart->eventFlags & ACTOR_EVENT_FLAG_FLIPABLE
    ) {
        if (dispatchEvent == EVENT_HIT) {
            dispatchEvent = EVENT_SHELL_CRACK_HIT;
        }

        if (dispatchEvent == EVENT_IMMUNE) {
            dispatchEvent = EVENT_SHELL_CRACK_HIT;
        }
        tempBinary = TRUE;
    }

    if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
        && (battleStatus->currentAttackElement & (DAMAGE_TYPE_BLAST | DAMAGE_TYPE_FIRE))
    ) {
        if (dispatchEvent == EVENT_HIT) {
            dispatchEvent = EVENT_BURN_HIT;
        }

        if (dispatchEvent == EVENT_DEATH) {
            dispatchEvent = EVENT_BURN_DEATH;
        }

        isFireDamage = TRUE;
    }

    do {        // TODO remove this do while
        if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE
            && battleStatus->lastAttackDamage >= 0
            && dispatchEvent != EVENT_DEATH
            && dispatchEvent != EVENT_SPIN_SMASH_DEATH
            && dispatchEvent != EVENT_EXPLODE_TRIGGER
            && !(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)
        ) {
            #define INFLICT_STATUS(STATUS_TYPE) \
                if ((battleStatus->currentAttackStatus & STATUS_FLAG_##STATUS_TYPE) && \
                    try_inflict_status(target, STATUS_KEY_##STATUS_TYPE, STATUS_TURN_MOD_##STATUS_TYPE)) { \
                    tempBinary = TRUE; \
                    wasStatusInflicted = TRUE; \
                } \

            INFLICT_STATUS(SHRINK);
            INFLICT_STATUS(POISON);
            INFLICT_STATUS(STONE);
            INFLICT_STATUS(SLEEP);
            INFLICT_STATUS(STOP);
            INFLICT_STATUS(STATIC);
            INFLICT_STATUS(FEAR);
            INFLICT_STATUS(PARALYZE);
            INFLICT_STATUS(DIZZY);

            #undef INFLICT_STATUS

            if (wasStatusInflicted) {
                if (dispatchEvent == EVENT_ZERO_DAMAGE) {
                    dispatchEvent = EVENT_HIT_COMBO;
                }

                if (dispatchEvent == EVENT_IMMUNE) {
                    dispatchEvent = EVENT_HIT;
                }
            }
        }
    } while (0);

    battleStatus->wasStatusInflicted = wasStatusInflicted;
    dispatch_event_actor(target, dispatchEvent);

    if (!(target->flags & ACTOR_FLAG_NO_DMG_POPUP)) {
        if (battleStatus->lastAttackDamage == 0) {
            if (!tempBinary) {
                if (!wasStatusInflicted) {
                    show_immune_bonk(state->goalPos.x, state->goalPos.y, state->goalPos.z, 0, 1, 3);
                }
            }
        } else if (!partImmuneToElement) {
            if (battleStatus->currentAttackElement & (DAMAGE_TYPE_MULTIPLE_POPUPS | DAMAGE_TYPE_SMASH)) {
                show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
            } else {
                show_primary_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 0);
            }

            if (!(targetPart->targetFlags & ACTOR_PART_TARGET_FLAG_4)) {
                show_damage_fx(target, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage);
            }
        }
    }

    if (tempBinary && gBattleStatus.flags1 & BS_FLAGS1_40 || gBattleStatus.flags1 & BS_FLAGS1_40) {
        if (!(gBattleStatus.flags1 & BS_FLAGS1_80)) {
            if (player->actorTypeData1[5]) {
                sfx_play_sound_at_position(player->actorTypeData1[5], SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
            }

            if (battleStatus->lastAttackDamage > 0) {
                sfx_play_sound(SOUND_231);
            }

            if (battleStatus->lastAttackDamage > 0 || battleStatus->currentAttackElement & DAMAGE_TYPE_STATUS_ALWAYS_HITS && tempBinary) {
                if (!(battleStatus->currentAttackElement & DAMAGE_TYPE_MULTI_BOUNCE)) {
                    show_action_rating(ACTION_RATING_NICE, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                } else {
                    show_action_rating(ACTION_RATING_NICE_SUPER_COMBO, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
                }
            }
        }
    }

    if (sp24) {
        show_action_rating(ACTION_RATING_MISS, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) {
        func_80266970(target);
    }

    if ((battleStatus->lastAttackDamage > 0 || tempBinary) && !partImmuneToElement) {
        func_80267018(target, 1);

        if (isFireDamage) {
            sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
        } else if (isShockDamage) {
            sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
        } else if (isIceDamage) {
            sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
        } else {
            sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
        }
    }

    if (battleStatus->lastAttackDamage < 1 && !tempBinary && !sp20 || targetPart->flags & ACTOR_PART_FLAG_2000) {
        sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackStatus & STATUS_FLAG_SLEEP && wasStatusInflicted) {
        evt = start_script(&EVS_PlaySleepHitFX, EVT_PRIORITY_A, 0);
        evt->varTable[0] = state->goalPos.x;
        evt->varTable[1] = state->goalPos.y;
        evt->varTable[2] = state->goalPos.z;
        sfx_play_sound_at_position(SOUND_INFLICT_SLEEP, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackStatus & STATUS_FLAG_DIZZY && wasStatusInflicted) {
        evt = start_script(&EVS_PlayDizzyHitFX, EVT_PRIORITY_A, 0);
        evt->varTable[0] = state->goalPos.x;
        evt->varTable[1] = state->goalPos.y;
        evt->varTable[2] = state->goalPos.z;
        sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackStatus & STATUS_FLAG_PARALYZE && wasStatusInflicted) {
        evt = start_script(&EVS_PlayParalyzeHitFX, EVT_PRIORITY_A, 0);
        evt->varTable[0] = state->goalPos.x;
        evt->varTable[1] = state->goalPos.y;
        evt->varTable[2] = state->goalPos.z;
        sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackStatus & STATUS_FLAG_POISON && wasStatusInflicted) {
        evt = start_script(&EVS_PlayPoisonHitFX, EVT_PRIORITY_A, 0);
        evt->varTable[0] = state->goalPos.x;
        evt->varTable[1] = state->goalPos.y;
        evt->varTable[2] = state->goalPos.z;
        sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackStatus & STATUS_FLAG_STOP && wasStatusInflicted) {
        evt = start_script(&EVS_PlayStopHitFX, EVT_PRIORITY_A, 0);
        evt->varTable[0] = state->goalPos.x;
        evt->varTable[1] = state->goalPos.y;
        evt->varTable[2] = state->goalPos.z;
        sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackStatus & STATUS_FLAG_FROZEN && wasStatusInflicted) {
        evt = start_script(&EVS_PlayFreezeHitFX, EVT_PRIORITY_A, 0);
        evt->varTable[0] = state->goalPos.x;
        evt->varTable[1] = state->goalPos.y;
        evt->varTable[2] = state->goalPos.z;
        evt->varTablePtr[3] = target;
        sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackStatus & STATUS_FLAG_SHRINK && wasStatusInflicted) {
        evt = start_script(&EVS_PlayShrinkHitFX, EVT_PRIORITY_A, 0);
        evt->varTable[0] = state->goalPos.x;
        evt->varTable[1] = state->goalPos.y;
        evt->varTable[2] = state->goalPos.z;
        evt->varTablePtr[3] = target;
        sfx_play_sound_at_position(SOUND_INFLICT_STATUS, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    if (battleStatus->currentAttackElement & DAMAGE_TYPE_SMASH && target->actorType == ACTOR_TYPE_GOOMNUT_TREE) {
        sfx_play_sound_at_position(SOUND_SMASH_GOOMNUT_TREE, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
    }

    show_actor_health_bar(target);

    if (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) {
        if (hitResult == HIT_RESULT_HIT) {
            hitResult = HIT_RESULT_1;
        }
        if (hitResult == HIT_RESULT_NO_DAMAGE) {
            hitResult = HIT_RESULT_3;
        }
    }

    if (!is_ability_active(ABILITY_ZAP_TAP)
        && (player->staticStatus != STATUS_KEY_STATIC)
        && (target->staticStatus == STATUS_KEY_STATIC || targetPart->eventFlags & ACTOR_EVENT_FLAG_ELECTRIFIED)
        && !(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_SHOCK))
        && !(battleStatus->currentAttackEventSuppression & SUPPRESS_EVENT_SHOCK_CONTACT)
    ) {
        sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
        apply_shock_effect(player);
        dispatch_damage_event_player_1(1, EVENT_SHOCK_HIT);
        return HIT_RESULT_BACKFIRE;
    }

    return hitResult;
}