Path: blob/master/Sonic 2/Scripts/DEZ/DeathEggRobot.txt
1482 views
// ----------------------------------1// RSDK Project: Sonic 22// Script Description: Death Egg Robot Object3// Script Author: Christian Whitehead/Simon Thomley4// Unpacked by Rubberduckycooly's script unpacker5// ----------------------------------67// ========================8// Aliases9// ========================1011private alias object.value0 : object.timer1213private alias object.value1 : object.headOffset.x14private alias object.value2 : object.headOffset.y15private alias object.value3 : object.movementCycle16private alias object.value4 : object.subState17private alias object.value5 : object.midpoint18private alias object.value6 : object.health19private alias object.value7 : object.invincibilityTimer20private alias object.value8 : object.exploding21private alias object.value9 : object.bombs // Offset used when spawning bombs2223private alias object.value10 : object.flame.frame24private alias object.value11 : object.flame.timer25private alias object.value12 : object.flame.animSpeed26private alias object.value13 : object.flame.state2728// Values used for the managing the following cutscene29private alias object.value14 : object.screenShake30private alias object.value15 : object.checkpoint // Offset to use for the One Way Doors checkpoints when making Sonic run away31private alias object.value16 : object.fadeValue3233// States34private alias -1 : DERMAIN_STATIC35private alias 0 : DERMAIN_INIT36private alias 1 : DERMAIN_AWAITEGGMAN37private alias 2 : DERMAIN_RAISEHEAD38private alias 3 : DERMAIN_CLOSEHEAD39private alias 4 : DERMAIN_SUBPAUSE40private alias 5 : DERMAIN_RAISE41private alias 6 : DERMAIN_READYPAUSE42private alias 7 : DERMAIN_NEXTPHASE43private alias 8 : DERMAIN_WALKING44private alias 9 : DERMAIN_ASCEND // Includes being in the sky and landing, too45private alias 10 : DERMAIN_ARMSHOOT46private alias 11 : DERMAIN_EXPLODING4748// The Death Egg Robot manages the ending cutscene too49private alias 12 : DERMAIN_SCREENSHAKE50private alias 13 : DERMAIN_CORRDIOREXPLODE51private alias 14 : DERMAIN_FADEOUT5253// Substates used by "complete" states5455// DERMAIN_WALKING substates56private alias 0 : DER_SUB_WALKING_INIT57private alias 1 : DER_SUB_WALKING_WALKAHEAD58private alias 2 : DER_SUB_WALKING_PAUSE59private alias 3 : DER_SUB_WALKING_BACKSTEP6061// DERMAIN_ASCEND substates62private alias 0 : DER_SUB_ASCEND_INIT63private alias 1 : DER_SUB_ASCEND_JUMP64private alias 2 : DER_SUB_ASCEND_RISE65private alias 3 : DER_SUB_ASCEND_CREATETARGET66private alias 4 : DER_SUB_ASCEND_OFFSCREEN67private alias 5 : DER_SUB_ASCEND_FALL68private alias 6 : DER_SUB_ASCEND_LAND69private alias 7 : DER_SUB_ASCEND_BOMBPAUSE7071// DERMAIN_ARMSHOOT substates72private alias 0 : DER_SUB_ARMSHOOT_INIT73private alias 1 : DER_SUB_ARMSHOOT_BENDDOWN74private alias 2 : DER_SUB_ARMSHOOT_LARMSHOT75private alias 3 : DER_SUB_ARMSHOOT_SHOOTRARM76private alias 4 : DER_SUB_ARMSHOOT_RARMSHOT77private alias 5 : DER_SUB_ARMSHOOT_GETUP7879// entityPos offset aliases80// Not directly used, but here for reference81private alias 5 : DER_OFFSET_SHOULDER82private alias 4 : DER_OFFSET_FOOT_FRONT83private alias 3 : DER_OFFSET_HAND_FRONT84private alias 2 : DER_OFFSET_ARM85private alias 1 : DER_OFFSET_LEG_FRONT86private alias 0 : DER_OFFSET_DERMAIN87private alias -1 : DER_OFFSET_FOOT_BACK88private alias -2 : DER_OFFSET_HAND_BACK89private alias -3 : DER_OFFSET_LEG_BACK9091// Player Aliases92private alias object.state : player.state93private alias object.xpos : player.xpos94private alias object.xvel : player.xvel95private alias object.speed : player.speed96private alias object.animation : player.animation97private alias object.collisionRight : player.collisionRight98private alias object.value40 : player.hitboxLeft99private alias object.value38 : player.hitboxTop100private alias object.value41 : player.hitboxRight101private alias object.value39 : player.hitboxBottom102103// Shared DER appendages states104private alias 1 : BODYPART_DESTROYED105private alias 2 : BODYPART_ACTIVE106107// DER Bomb Aliases108private alias object.value1 : DERBomb.originPos.y109110// DER Hand Aliases111private alias object.value0 : DERHand.timer112private alias object.value1 : DERHand.originPos.y113114private alias 3 : DERHAND_FIRE115116// One Way Door Aliases117// (Used in cutscene)118private alias object.state : oneWayDoor.isOpen119120// Game Mode Aliases121private alias 1 : MODE_SAVEGAME122123// Reserved object slot Aliases124private alias 0 : SLOT_PLAYER1125private alias 25 : SLOT_MUSICEVENT_CHANGE126private alias 26 : SLOT_MUSICEVENT_BOSS127128// Music Events129private alias 0 : MUSICEVENT_FADETOBOSS130private alias 2 : MUSICEVENT_TRANSITION131132// Path ID Aliases133private alias 0 : PATH_A134135136// ========================137// Function Declarations138// ========================139140reserve function DeathEggRobot_RestoreBodyParts141reserve function DeathEggRobot_CheckAnimEX142reserve function DeathEggRobot_AnimateBody143reserve function DeathEggRobot_CreateBombs144145146// ========================147// Tables (and lots of them!)148// ========================149150// The cycle DER should follow151private table DeathEggRobot_phaseOrder1528 // DERMAIN_WALKING1539 // DERMAIN_ASCEND15410 // DERMAIN_ARMSHOOT1559 // DERMAIN_ASCEND156end table157158// These DeathEggRobot_anim_* tables are root animation tables, used when calling animateBody159// The first entry in them gets replaced with a table ID, the rest of the numbers in them are animation flags160161private table DeathEggRobot_anim_bendDown1620 // DeathEggRobot_anim_sub_bend gets placed here1630, 1, 2, 3, -1, 0164end table165166private table DeathEggRobot_anim_getUp1670 // DeathEggRobot_anim_sub_bend gets placed here1685, 6, 7, 8, -1, 0169end table170171private table DeathEggRobot_anim_land1720 // DeathEggRobot_anim_sub_bend gets placed here1730, 1, 2, 3, 4, 5, 6, 7, 8, 192174end table175176// This is the anim sub-table used for the above proper anim tables177// (confusing system, I know)178private table DeathEggRobot_anim_sub_bend[9]179180181private table DeathEggRobot_anim_jump1820 // DeathEggRobot_anim_sub_jump gets placed here1830, 1, 2, 192184end table185186187// Also an anim sub-table188private table DeathEggRobot_anim_sub_jump[3]189190191private table DeathEggRobot_anim_stepAhead1920 // DeathEggRobot_anim_sub_walk gets placed here1930, 1, 2, 3, 64, 4, 5, 6, 7, 8, 64, 9, 10, 1, 2, 3, 64, 4, 5, 6, 7, 8, 64, 192194end table195196197private table DeathEggRobot_anim_stepBack1980 // DeathEggRobot_anim_sub_walk gets placed here199136, 135, 134, 133, 11, 64, 192200end table201202203// The last anim sub-table, also placed in a weird spot204private table DeathEggRobot_anim_sub_walk[12]205206207// All the way over here for some reason, this frame was likely added after the entire object had already been completed208private table DeathEggRobot_bend_frame_5209021082110, 0, 0212end table213214// Similar story here to the above215private table DeathEggRobot_jump_frame_22160217162180, 0, 0219end table220221// Holds the base positions of all DER body parts222// Format of the table:223// - First number is how many "entries" there are224// Then each entry consists of225// -> Object entity pos (relative to the current Death Egg Robot object)226// -> X offset (from this object's pos, will automatically get flipped when facing the other way)227// -> Y offset (from this object's pos)228private table DeathEggRobot_bodyPartsOrigin22962304, -0x40000, 0x3C00002313, -0xC0000, 0x0800002322, 0xC0000, -0x0800002331, 0x40000, 0x240000234-1, -0x40000, 0x3C0000235-2, -0xC0000, 0x080000236-3, 0x40000, 0x240000237end table238239240// All these remaining DeathEggRobot_*_frame_* tables are individual animation entries241// The format they follow is pretty similar to the above242// - First number is how many "entries" in the table there are (not counting the next number)243// - Second number is the delay for this frame in the animation244// Then, the rest of the table is individual component entries, each entry comprised of 3 numbers245// All offsets are relative to the main DER object246// - First number is the offset (entityPos-wise) for the target component247// - Second number is X offset for the component to move248// - Third number is the Y offset249250// These first few are for the animations in which the DER bends down, like when jumping or shooting arms251252private table DeathEggRobot_bend_frame_1253525482550, -0x2000, 0x0C002563, -0x2000, 0x0C002572, -0x2000, 0x0C00258-2, -0x2000, 0x0C002591, -0x0800, 0x0400260-3, -0x0800, 0x0400261end table262263private table DeathEggRobot_bend_frame_2264526582660, -0x1400, 0x14002673, -0x1400, 0x14002682, -0x1400, 0x1400269-2, -0x1400, 0x14002701, -0x0600, 0x0600271-3, -0x0600, 0x0600272end table273274private table DeathEggRobot_bend_frame_3275527682770, -0x0800, 0x14002783, -0x0800, 0x14002792, -0x0800, 0x1400280-2, -0x0800, 0x14002811, -0x0200, 0x0400282-3, -0x0200, 0x0400283end table284285private table DeathEggRobot_bend_frame_4286528782880, -0x0400, 0x0C002893, -0x0400, 0x0C002902, -0x0400, 0x0C00291-2, -0x0400, 0x0C002921, 0x0000, 0x0200293-3, 0x0000, 0x0200294end table295296// frame5 is all the way at the top, separate from these for some reason297// Perhaps it was added late in dev or something298299private table DeathEggRobot_bend_frame_6300530183020, 0x0400, -0x18003033, 0x0400, -0x18003042, 0x0400, -0x1800305-2, 0x0400, -0x18003061, 0x0200, -0x0600307-3, 0x0200, -0x0600308end table309310private table DeathEggRobot_bend_frame_7311531283130, 0x0C00, -0x18003143, 0x0C00, -0x18003152, 0x0C00, -0x1800316-2, 0x0C00, -0x18003171, 0x0400, -0x0400318-3, 0x0400, -0x0400319end table320321private table DeathEggRobot_bend_frame_8322532383240, 0x1800, -0x0C003253, 0x1800, -0x0C003262, 0x1800, -0x0C00327-2, 0x1800, -0x0C003281, 0x0400, -0x0400329-3, 0x0400, -0x0400330end table331332private table DeathEggRobot_bend_frame_9333533483350, 0x1800, -0x04003363, 0x1800, -0x04003372, 0x1800, -0x0400338-2, 0x1800, -0x04003391, 0x0600, -0x0200340-3, 0x0600, -0x0200341end table342343// These next couple of tables are frames for the jumping animation344345private table DeathEggRobot_jump_frame_13465347163480, 0x0000, 0x04003493, 0x0000, 0x04003502, 0x0000, 0x0400351-2, 0x0000, 0x04003521, 0x0000, 0x0400353-3, 0x0000, 0x0400354end table355356// frame2 is all the way near the end of the list, it seems it was added in post after everything else was done357358private table DeathEggRobot_jump_frame_3359536083610, 0x0000, -0x08003623, 0x0000, -0x08003632, 0x0000, -0x0800364-2, 0x0000, -0x08003651, 0x0000, -0x0800366-3, 0x0000, -0x0800367end table368369// And finally, these last tables are frames for the walking animation370371private table DeathEggRobot_walk_frame_13726373323741, -0x0800, -0x08003754, -0x0800, -0x08003760, 0x0000, -0x04003773, 0x0400, -0x05003782, 0x0300, -0x0500379-2, -0x0400, -0x0500380-3, 0x0000, -0x0200381end table382383private table DeathEggRobot_walk_frame_23846385163861, -0x1000, -0x04003874, -0x1000, -0x04003880, -0x1000, -0x04003893, -0x0C00, -0x05003902, -0x0D00, -0x0500391-2, -0x1400, -0x0500392-3, -0x0800, 0x0000393end table394395private table DeathEggRobot_walk_frame_33965397163981, -0x0800, 0x04003994, -0x0800, 0x04004000, -0x0800, 0x04004013, -0x0400, 0x03004022, -0x0500, 0x0300403-2, -0x0C00, 0x0300404end table405406private table DeathEggRobot_walk_frame_44076408164091, -0x0400, 0x10004104, -0x0800, 0x10004110, 0x0000, 0x08004123, -0x0800, 0x0A004132, -0x0600, 0x0A00414-2, 0x0800, 0x0A00415-3, 0x0000, 0x0800416end table417418private table DeathEggRobot_walk_frame_54196420324211, -0x0200, -0x02004220, -0x0C00, -0x04004233, -0x1000, -0x03004242, -0x0F00, -0x0300425-2, -0x0800, -0x0300426-3, -0x1400, -0x0600427-1, -0x1800, -0x0400428end table429430private table DeathEggRobot_walk_frame_6431443232433-3, -0x0800, -0x0400434-1, -0x0800, -0x04004353, -0x0400, -0x01004362, -0x0300, -0x0100437-2, 0x0400, -0x0100438end table439440private table DeathEggRobot_walk_frame_7441644216443-3, -0x1000, -0x0400444-1, -0x1000, -0x04004450, -0x1000, -0x04004463, -0x1400, -0x05004472, -0x1300, -0x0500448-2, -0x0C00, -0x05004491, -0x0800, 0x0000450end table451452private table DeathEggRobot_walk_frame_8453545416455-3, -0x0800, 0x0400456-1, -0x0800, 0x04004570, -0x0800, 0x04004583, -0x0C00, 0x03004592, -0x0B00, 0x0300460-2, -0x0400, 0x0300461end table462463private table DeathEggRobot_walk_frame_9464646516466-3, -0x0400, 0x1000467-1, -0x0800, 0x10004680, 0x0000, 0x08004693, 0x0800, 0x0A004702, 0x0600, 0x0A00471-2, -0x0800, 0x0A004721, 0x0000, 0x0800473end table474475private table DeathEggRobot_walk_frame_10476647732478-3, -0x0200, -0x02004790, -0x0C00, -0x04004803, -0x0800, -0x03004812, -0x0900, -0x0300482-2, -0x0F00, -0x03004831, -0x1400, -0x06004844, -0x1800, -0x0400485end table486487private table DeathEggRobot_walk_frame_114884489324901, -0x0800, -0x06004914, -0x0800, -0x04004923, 0x0400, -0x01004932, 0x0300, -0x0100494-2, -0x0400, -0x0100495end table496497private table DeathEggRobot_walk_frame_12498649916500-3, 0x0000, 0x0800501-1, 0x0000, 0x08005020, 0x0000, 0x08005033, 0x0000, 0x08005042, 0x0000, 0x0800505-2, 0x0000, 0x08005061, 0x0000, 0x0800507end table508509510// And now, finally, the actual code starts!511512// ========================513// Function Definitions514// ========================515516private function DeathEggRobot_RestoreBodyParts517// Restores all the body parts back to their normal positions, used for cleanup quite often518519// Preconditions:520// - temp0 is set to the table ID of a DER body part table (always DeathEggRobot_bodyPartsOrigin)521522temp7 = 0523524// First, get entry count525GetTableValue(temp6, temp7, temp0)526temp7++527while temp6 >= 0528529// Get the object's entity pos offset530GetTableValue(temp1, temp7, temp0)531temp7++532arrayPos0 = object.entityPos533arrayPos0 += temp1534535// Object xpos offset536GetTableValue(temp1, temp7, temp0)537temp7++538539// Object ypos offset540GetTableValue(temp2, temp7, temp0)541temp7++542543// Update xpos544object[arrayPos0].xpos = object.xpos545if object.direction == FLIP_NONE546object[arrayPos0].xpos += temp1547else548object[arrayPos0].xpos -= temp1549end if550551// Update ypos552object[arrayPos0].ypos = object.ypos553object[arrayPos0].ypos += temp2554555temp6--556loop557end function558559560private function DeathEggRobot_CheckAnimEX561temp7 = true562while temp7 == true563temp7 = false564temp0 &= 63565temp1 >>= 6566switch temp1567case 1568// Used when the legs are moving569if object.animationTimer == 0570object.frame++571PlaySfx(SfxName[Crusher], false)572GetTableValue(temp0, object.frame, temp6)573temp1 = temp0574temp1 &= 192575if temp1 != 0576temp7 = true577end if578end if579break580581case 2582// Flip flag583temp4 = true584break585586case 3587// Stop the object from animating (for this frame, at least)588object.frame = 1589checkResult = true590break591592end switch593loop594end function595596597private function DeathEggRobot_AnimateBody598// Preconditions:599// - When this function is called, temp6 is holding an animation table600// This table is, itself, holding another table, where that table being held also contains a long string of tables601// Far too many tables to wrap your head around, to say the least...602603// Essentially, what this function itself does is move and animate the body604605GetTableValue(temp5, 0, temp6)606607GetTableValue(temp0, object.frame, temp6)608temp1 = temp0609temp4 = false610temp1 &= 192611612checkResult = false613if temp0 != 0614CallFunction(DeathEggRobot_CheckAnimEX)615end if616617if checkResult == false618GetTableValue(temp2, temp0, temp5)619temp7 = 0620GetTableValue(temp0, temp7, temp2)621temp7++622GetTableValue(temp3, temp7, temp2)623temp7++624object.animationTimer++625if object.animationTimer >= temp3626object.animationTimer = 0627object.frame++628end if629630while temp0 >= 0631GetTableValue(temp5, temp7, temp2)632temp7++633arrayPos0 = object.entityPos634arrayPos0 += temp5635GetTableValue(temp1, temp7, temp2)636temp7++637temp1 <<= 4638if object.direction == FLIP_NONE639if temp4 == false640object[arrayPos0].xpos += temp1641else642object[arrayPos0].xpos -= temp1643end if644else645if temp4 == false646object[arrayPos0].xpos -= temp1647else648object[arrayPos0].xpos += temp1649end if650end if651GetTableValue(temp1, temp7, temp2)652temp7++653temp1 <<= 4654if temp4 == false655object[arrayPos0].ypos += temp1656else657object[arrayPos0].ypos -= temp1658end if659temp0--660loop661end if662end function663664665private function DeathEggRobot_CreateBombs666arrayPos0 = object[-7].entityPos667668// Offset the entity pos based on the last bombs used, in case there's more than one pair active669arrayPos0 += object.bombs670671// Update the value with a cap of 3, there should only ever be 4 bombs (2 pairs) max active at one point672object.bombs += 2673object.bombs &= 3674675// Create bomb 1676object[arrayPos0].type = TypeName[DER Bomb]677object[arrayPos0].xpos = object.xpos678if object.direction == FLIP_NONE679object[arrayPos0].xpos += 0x380000680object[arrayPos0].xvel = 0x6000681else682object[arrayPos0].xpos -= 0x380000683object[arrayPos0].xvel = -0x6000684end if685object[arrayPos0].ypos = object.ypos686object[arrayPos0].ypos -= 0x140000687object[arrayPos0].yvel = -0x80000688DERBomb[arrayPos0].originPos.y = object[arrayPos0].ypos689object[arrayPos0].priority = PRIORITY_ACTIVE690691arrayPos0++692693// And now create bomb 2694object[arrayPos0].type = TypeName[DER Bomb]695object[arrayPos0].xpos = object.xpos696if object.direction == FLIP_NONE697object[arrayPos0].xpos += 0x380000698object[arrayPos0].xvel = 0xC000699else700object[arrayPos0].xpos -= 0x380000701object[arrayPos0].xvel = -0xC000702end if703object[arrayPos0].ypos = object.ypos704object[arrayPos0].ypos -= 0x140000705object[arrayPos0].yvel = -0xA0000706DERBomb[arrayPos0].originPos.y = object[arrayPos0].ypos707object[arrayPos0].priority = PRIORITY_ACTIVE708end function709710711// ========================712// Events713// ========================714715event ObjectUpdate716switch object.state717case DERMAIN_INIT718temp0 = stage.curYBoundary2719temp0 -= screen.ysize720stage.newYBoundary1 = temp0721722temp0 = object.xpos723temp0 >>= 16724temp0 += 68725stage.newXBoundary2 = temp0726727temp0 -= 0x200728stage.newXBoundary1 = temp0729object.priority = PRIORITY_ACTIVE730731// Setup all the body parts732// - Order is important, as it also controls the order the sprites should be drawn733// - Back-most appendages are behind this object in entityPos, frontwise are, well, in-front in terms of both draw order and entityPos too734735object[+5].type = TypeName[DER Shoulder]736object[+5].priority = PRIORITY_ACTIVE737738// Front foot739object[+4].type = TypeName[DER Foot]740object[+4].priority = PRIORITY_ACTIVE741742// Front hand743object[+3].type = TypeName[DER Hand]744object[+3].priority = PRIORITY_ACTIVE745746object[+2].type = TypeName[DER Arm]747object[+2].priority = PRIORITY_ACTIVE748749// Front leg750object[+1].type = TypeName[DER Leg]751object[+1].priority = PRIORITY_ACTIVE752753// Back foot754object[-1].type = TypeName[DER Foot]755object[-1].priority = PRIORITY_ACTIVE756757// Back hand758object[-2].type = TypeName[DER Hand]759object[-2].priority = PRIORITY_ACTIVE760761// Back leg762object[-3].type = TypeName[DER Leg]763object[-3].priority = PRIORITY_ACTIVE764765object.midpoint = object.xpos766object.midpoint -= 0xC00000767768#platform: USE_STANDALONE769object.health = 12770#endplatform771#platform: USE_ORIGINS772if game.bossOneLife == false773object.health = 12774else775object.health = 1776end if777#endplatform778779temp0 = DeathEggRobot_bodyPartsOrigin780CallFunction(DeathEggRobot_RestoreBodyParts)781object.frame = 1782object.flame.frame = 5783SetMusicTrack("FinalBoss.ogg", 4, true)784object.state = DERMAIN_AWAITEGGMAN785break786787case DERMAIN_AWAITEGGMAN788break789790case DERMAIN_RAISEHEAD791object.headOffset.y -= 0x10000792if object.headOffset.y <= -0x240000793object.state = DERMAIN_CLOSEHEAD794end if795break796797case DERMAIN_CLOSEHEAD798object.headOffset.x -= 0x7800799object.rotation -= 4800if object.rotation <= 0801object.state = DERMAIN_SUBPAUSE802end if803break804805case DERMAIN_SUBPAUSE806object.timer++807if object.timer == 112808vs.bossAttack = false809ResetObjectEntity(SLOT_MUSICEVENT_BOSS, TypeName[Music Event], MUSICEVENT_FADETOBOSS, 0, 0)810object[SLOT_MUSICEVENT_BOSS].priority = PRIORITY_ACTIVE811end if812813if object.timer == 180814object.timer = 0815PlaySfx(SfxName[Large Wall], false)816object.flame.frame = 5817object.flame.animSpeed = 4818object.flame.state = 1819object.state = DERMAIN_RAISE820end if821break822823case DERMAIN_RAISE824object.ypos -= 0x10000825object.timer++826if object.timer == 30827PlaySfx(SfxName[Large Wall], false)828end if829830if object.timer == 120831object.timer = 0832833// Tell the rest of the body to get ready834object[+5].state = BODYPART_ACTIVE835object[+4].state = BODYPART_ACTIVE836object[+3].state = BODYPART_ACTIVE837object[+2].state = BODYPART_ACTIVE838object[+1].state = BODYPART_ACTIVE839object[-1].state = BODYPART_ACTIVE840object[-2].state = BODYPART_ACTIVE841object[-3].state = BODYPART_ACTIVE842843object.flame.state = 2844object.state = DERMAIN_READYPAUSE845end if846847temp0 = DeathEggRobot_bodyPartsOrigin848CallFunction(DeathEggRobot_RestoreBodyParts)849break850851case DERMAIN_READYPAUSE852object.timer++853if object.timer == 32854object.timer = 0855object.state = DERMAIN_NEXTPHASE856end if857break858859case DERMAIN_NEXTPHASE860object.timer = 32861object.subState = 0862GetTableValue(object.state, object.movementCycle, DeathEggRobot_phaseOrder)863if object.state == DERMAIN_ASCEND864object.flame.frame = 5865object.flame.animSpeed = 16866object.flame.state = 1867end if868object.movementCycle++869object.movementCycle &= 3870break871872case DERMAIN_WALKING873switch object.subState874case DER_SUB_WALKING_INIT875object.timer--876if object.timer < 0877object.subState = DER_SUB_WALKING_WALKAHEAD878end if879break880881case DER_SUB_WALKING_WALKAHEAD882temp6 = DeathEggRobot_anim_stepAhead883CallFunction(DeathEggRobot_AnimateBody)884if checkResult == true885object.timer = 64886object.subState = DER_SUB_WALKING_PAUSE887end if888break889890case DER_SUB_WALKING_PAUSE891object.timer--892if object.timer < 0893object.subState = DER_SUB_WALKING_BACKSTEP894end if895break896897case DER_SUB_WALKING_BACKSTEP898temp6 = DeathEggRobot_anim_stepBack899CallFunction(DeathEggRobot_AnimateBody)900if checkResult == true901object.timer = 64902object.state = DERMAIN_NEXTPHASE903end if904break905906end switch907break908909case DERMAIN_ASCEND910switch object.subState911case DER_SUB_ASCEND_INIT912object.timer--913if object.timer < 0914object.subState = DER_SUB_ASCEND_JUMP915end if916break917918case DER_SUB_ASCEND_JUMP919temp6 = DeathEggRobot_anim_jump920CallFunction(DeathEggRobot_AnimateBody)921if checkResult == true922object.timer = 128923PlaySfx(SfxName[Thruster], false)924object.subState = DER_SUB_ASCEND_RISE925end if926break927928case DER_SUB_ASCEND_RISE929object.timer--930if object.timer < 0931object.subState = DER_SUB_ASCEND_CREATETARGET932else933object.ypos -= 0x20000934temp0 = oscillation935temp0 &= 31936if temp0 == 0937PlaySfx(SfxName[Thruster], false)938end if939temp0 = DeathEggRobot_bodyPartsOrigin940CallFunction(DeathEggRobot_RestoreBodyParts)941end if942break943944case DER_SUB_ASCEND_CREATETARGET945// Because the timer isn't reset between this and the previous substate, this state only lasts for a single frame946object.timer--947if object.timer < 0948object.timer = 0949object.subState = DER_SUB_ASCEND_OFFSCREEN950object[+6].type = TypeName[DER Target]951object[+6].xpos = object[SLOT_PLAYER1].xpos952object[+6].ypos = object[SLOT_PLAYER1].ypos953end if954break955956case DER_SUB_ASCEND_OFFSCREEN957if object.timer != 0958if object.xpos < object.midpoint959object.direction = FLIP_X960else961object.direction = FLIP_NONE962end if963964object[+5].direction = object.direction965object[+4].direction = object.direction966object[+3].direction = object.direction967object[+2].direction = object.direction968object[+1].direction = object.direction969object[-1].direction = object.direction970object[-2].direction = object.direction971object[-3].direction = object.direction972973object.timer = 32974temp0 = DeathEggRobot_bodyPartsOrigin975CallFunction(DeathEggRobot_RestoreBodyParts)976object.subState = DER_SUB_ASCEND_FALL977end if978break979980case DER_SUB_ASCEND_FALL981object.timer--982if object.timer < 0983object.timer = 64984PlaySfx(SfxName[Ledge Break], false)985object.screenShake = 64986object.flame.state = 2987object.subState = DER_SUB_ASCEND_LAND988else989object.ypos += 0x80000990temp0 = DeathEggRobot_bodyPartsOrigin991CallFunction(DeathEggRobot_RestoreBodyParts)992end if993break994995case DER_SUB_ASCEND_LAND996temp6 = DeathEggRobot_anim_land997CallFunction(DeathEggRobot_AnimateBody)998if checkResult == true999temp0 = DeathEggRobot_bodyPartsOrigin1000CallFunction(DeathEggRobot_RestoreBodyParts)10011002temp0 = false10031004if object.direction == FLIP_NONE1005if object[SLOT_PLAYER1].xpos > object.xpos1006temp0 = true1007end if1008else1009if object[SLOT_PLAYER1].xpos < object.xpos1010temp0 = true1011end if1012end if10131014if temp0 == false1015object.state = DERMAIN_NEXTPHASE1016else1017object.timer = 961018object.subState = DER_SUB_ASCEND_BOMBPAUSE1019CallFunction(DeathEggRobot_CreateBombs)1020end if1021end if1022break10231024case DER_SUB_ASCEND_BOMBPAUSE1025object.timer--1026if object.timer < 01027object.state = DERMAIN_NEXTPHASE1028end if1029break10301031end switch1032break10331034case DERMAIN_ARMSHOOT1035switch object.subState1036case DER_SUB_ARMSHOOT_INIT1037object.timer--1038if object.timer < 01039object.subState = DER_SUB_ARMSHOOT_BENDDOWN1040end if1041break10421043case DER_SUB_ARMSHOOT_BENDDOWN1044temp6 = DeathEggRobot_anim_bendDown1045CallFunction(DeathEggRobot_AnimateBody)1046if checkResult == true1047temp0 = false1048if object.direction == FLIP_NONE1049if object[SLOT_PLAYER1].xpos > object.xpos1050temp0 = true1051end if1052else1053if object[SLOT_PLAYER1].xpos < object.xpos1054temp0 = true1055end if1056end if10571058if temp0 == false1059object.timer = 641060object[+3].state = DERHAND_FIRE1061DERHand[+3].timer = 161062DERHand[+3].originPos.y = object[+3].ypos1063object.subState = DER_SUB_ARMSHOOT_LARMSHOT1064else1065object.timer = 321066object.subState = DER_SUB_ARMSHOOT_RARMSHOT1067CallFunction(DeathEggRobot_CreateBombs)1068end if1069end if1070break10711072case DER_SUB_ARMSHOOT_LARMSHOT1073object.timer--1074if object.timer < 01075object.subState = DER_SUB_ARMSHOOT_SHOOTRARM1076end if1077break10781079case DER_SUB_ARMSHOOT_SHOOTRARM1080object.timer--1081if object.timer < 01082object.timer = 641083object[-2].state = DERHAND_FIRE1084DERHand[-2].timer = 161085DERHand[-2].originPos.y = object[-2].ypos1086object.subState = DER_SUB_ARMSHOOT_RARMSHOT1087end if1088break10891090case DER_SUB_ARMSHOOT_RARMSHOT1091object.timer--1092if object.timer < 01093object.subState = DER_SUB_ARMSHOOT_GETUP1094end if1095break10961097case DER_SUB_ARMSHOOT_GETUP1098temp6 = DeathEggRobot_anim_getUp1099CallFunction(DeathEggRobot_AnimateBody)1100if checkResult == true1101object.state = DERMAIN_NEXTPHASE1102end if1103break11041105end switch1106break11071108case DERMAIN_EXPLODING1109object.timer++1110if object.timer == 1201111object.timer = 01112object.exploding = false1113object.state++1114options.touchControls = false1115object[SLOT_PLAYER1].controlMode = CONTROLMODE_NONE1116object[SLOT_PLAYER1].jumpPress = false1117object[SLOT_PLAYER1].jumpHold = false1118object[SLOT_PLAYER1].up = false1119object[SLOT_PLAYER1].down = false1120object[SLOT_PLAYER1].left = false1121object[SLOT_PLAYER1].right = true1122stage.deathBoundary = 0x7FFF00001123temp0 = tileLayer[0].xsize1124temp0 <<= 71125stage.newXBoundary2 = temp01126end if11271128object.ypos += object.yvel1129object.yvel += 0x38001130ObjectTileCollision(CSIDE_FLOOR, 0, 36, PATH_A)1131if checkResult == true1132object.yvel >>= 21133FlipSign(object.yvel)1134if object.yvel > -0x100001135object.yvel = 01136end if1137end if1138break11391140case DERMAIN_SCREENSHAKE1141object.timer++1142if object.timer == 301143object.screenShake = 0xFFFF1144end if11451146temp0 = object.screenShake1147temp0 %= 401148if temp0 == 81149PlaySfx(SfxName[Rumble], false)1150end if11511152object[SLOT_PLAYER1].right = true1153if object[SLOT_PLAYER1].xpos > object[+7].xpos1154object.timer = -151155object.state = DERMAIN_CORRDIOREXPLODE1156if object.screenShake == 01157object.screenShake = 0xFFFF1158end if1159end if11601161temp0 = object.checkpoint1162arrayPos0 = object[+8].entityPos1163arrayPos0 += object.checkpoint1164temp1 = object[arrayPos0].xpos1165if object[SLOT_PLAYER1].xpos > temp11166object.checkpoint++1167temp0++1168arrayPos0++1169end if11701171while temp0 < 71172oneWayDoor[arrayPos0].isOpen = true1173arrayPos0++1174temp0++1175end if1176break11771178case DERMAIN_CORRDIOREXPLODE1179temp0 = object.screenShake1180temp0 %= 401181if temp0 == 81182PlaySfx(SfxName[Rumble], false)1183end if1184Rand(temp0, 96)1185temp0 -= 481186temp0 <<= 161187temp0 += object[SLOT_PLAYER1].xpos1188temp0 -= 0x4000001189Rand(temp1, 96)1190temp1 -= 481191temp1 <<= 161192temp1 += object[SLOT_PLAYER1].ypos1193CreateTempObject(TypeName[Explosion], 0, temp0, temp1)1194object[tempObjectPos].drawOrder = 51195temp0 = oscillation1196temp0 &= 31197if temp0 == 01198PlaySfx(SfxName[Explosion], false)1199end if1200object.timer++12011202// Death Egg Robots with Property Values of 0 should trigger the ending cutscene after defeat1203if object.propertyValue == 01204switch object.timer1205case 1201206case 1801207case 2401208PlaySfx(SfxName[Large Explosion], false)1209break12101211case 2701212#platform: USE_ORIGINS1213CallNativeFunction2(NotifyCallback, NOTIFY_BOSS_END, true)1214#endplatform1215object.state = DERMAIN_FADEOUT1216break12171218end switch1219else1220if object.timer > 1401221PlaySfx(SfxName[Large Explosion], false)1222ResetObjectEntity(object.entityPos, TypeName[Blank Object], 0, 0, 0)1223end if1224end if12251226object[SLOT_PLAYER1].right = true12271228temp0 = object.checkpoint1229arrayPos0 = object[+8].entityPos1230arrayPos0 += object.checkpoint1231temp1 = object[arrayPos0].xpos1232if object[SLOT_PLAYER1].xpos > temp11233object.checkpoint++1234temp0++1235arrayPos0++1236end if12371238while temp0 < 71239oneWayDoor[arrayPos0].isOpen = true1240arrayPos0++1241temp0++1242end if12431244// [Fallthrough]1245case DERMAIN_FADEOUT1246if object.timer >= 1201247music.volume--1248object.fadeValue += 212491250// The fade value is updated regardless of if the Death Egg Robot should trigger the cutscene or not, it's just that the actual fade isn't applied if it doesn't need to be1251if object.propertyValue == 01252SetScreenFade(255, 255, 255, object.fadeValue)1253end if12541255if object.fadeValue >= 0x3001256#platform: USE_ORIGINS1257if game.playMode != BOOT_PLAYMODE_BOSSRUSH1258temp0 = StageStatsUsabilityParam51259temp0 &= 11260temp1 = StageStatsUsabilityParam51261temp1 &= 21262temp2 = StageStatsUsabilityParam51263temp2 &= 41264CallNativeFunction4(NotifyCallback, NOTIFY_STATS_CHARA_ACTION, temp0, temp1, temp2)1265stage.timeEnabled = false1266CallNativeFunction2(NotifyCallback, NOTIFY_ACT_FINISH, 0)1267StageStatsUsabilityParam1 = 01268StageStatsUsabilityParam2 = 01269StageStatsUsabilityParam3 = 01270StageStatsUsabilityParam4 = 01271StageStatsUsabilityParam5 = 01272StatsUsabilityParam1 = 01273StatsUsabilityParam2 = 01274StatsUsabilityParam3 = 01275StatsUsabilityParam4 = 01276StatsUsabilityParam5 = 01277#endplatform12781279if stage.debugMode == false1280if options.stageSelectFlag == false1281CallNativeFunction2(SetLeaderboard, 22, player.score)1282end if1283end if12841285if options.gameMode == MODE_SAVEGAME1286// Mark the current save as a completed one1287arrayPos1 = options.saveSlot1288arrayPos1 <<= 31289arrayPos1 += 41290saveRAM[arrayPos1] = 221291WriteSaveRAM()1292end if12931294#platform: USE_ORIGINS1295// This is already done earlier in DERMAIN_CORRDIOREXPLODE... but may as well do it again for good measure?1296CallNativeFunction2(NotifyCallback, NOTIFY_BOSS_END, true)12971298if game.oneStageFlag == false1299#endplatform1300// Start the Ending proper1301stage.activeList = PRESENTATION_STAGE1302stage.listPos = 11303LoadStage()1304#platform: USE_ORIGINS1305else1306game.callbackResult = -11307CallNativeFunction4(NotifyCallback, NOTIFY_STAGE_RETRY, 1, stage.listPos, 0)1308object.state = DERMAIN_STATIC1309end if1310end if1311#endplatform1312end if1313end if1314break13151316end switch13171318if object.state > DERMAIN_RAISE1319if object.health != 01320if object.invincibilityTimer > 01321object.invincibilityTimer--1322GetBit(temp0, object.invincibilityTimer, 0)1323if temp0 == true1324SetPaletteEntry(0, 192, 0xE0E0E0)1325else1326SetPaletteEntry(0, 192, 0x000000)1327end if1328end if13291330foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)1331if object.invincibilityTimer == 01332BoxCollisionTest(C_TOUCH, object.entityPos, -32, -60, 32, 32, currentPlayer, player[currentPlayer].hitboxLeft, player[currentPlayer].hitboxTop, player[currentPlayer].hitboxRight, player[currentPlayer].hitboxBottom)13331334if checkResult == true1335CallFunction(Player_CheckHit)13361337if checkResult == true1338object.health--13391340if object.health == 01341#platform: USE_ORIGINS1342CallNativeFunction2(NotifyCallback, NOTIFY_KILL_BOSS, 0)1343#endplatform13441345player.score += 10001346object.exploding = true1347object.state = DERMAIN_EXPLODING1348object.timer = 013491350// Make all the body parts fall off13511352// Shoulder1353object[+5].state = BODYPART_DESTROYED1354object[+5].xvel = 0x200001355object[+5].yvel = -0x4000013561357// Front foot1358object[+4].state = BODYPART_DESTROYED1359object[+4].xvel = -0x100001360object[+4].yvel = -0x1000013611362// Front hand1363object[+3].state = BODYPART_DESTROYED1364object[+3].xvel = 0x300001365object[+3].yvel = -0x3000013661367// Front arm1368object[+2].state = BODYPART_DESTROYED1369object[+2].xvel = -0x100001370object[+2].yvel = -0x4000013711372// Front leg1373object[+1].state = BODYPART_DESTROYED1374object[+1].xvel = 0x180001375object[+1].yvel = -0x2000013761377// Back foot1378object[-1].state = BODYPART_DESTROYED1379object[-1].xvel = -0x200001380object[-1].yvel = -0x3000013811382// Back hand1383object[-2].state = BODYPART_DESTROYED1384object[-2].xvel = 01385object[-2].yvel = -0x4000013861387// Back leg1388object[-3].state = BODYPART_DESTROYED1389object[-3].xvel = 0x100001390object[-3].yvel = -0x3000013911392object.flame.state = 31393else1394object.invincibilityTimer = 601395PlaySfx(SfxName[Boss Hit], false)1396end if1397end if1398else1399if object.direction == FLIP_NONE1400BoxCollisionTest(C_TOUCH, object.entityPos, 48, 16, 64, 32, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)1401else1402BoxCollisionTest(C_TOUCH, object.entityPos, -64, 16, -48, 32, currentPlayer, C_BOX, C_BOX, C_BOX, C_BOX)1403end if14041405if checkResult == true1406CallFunction(Player_FireHit)1407end if1408end if1409end if1410next1411end if1412end if14131414if object.state <= DERMAIN_EXPLODING1415foreach (GROUP_PLAYERS, currentPlayer, ACTIVE_ENTITIES)1416temp0 = player[currentPlayer].collisionRight1417temp0 <<= 161418temp0 += player[currentPlayer].xpos1419temp1 = stage.curXBoundary21420temp1 <<= 161421if temp0 > temp11422player[currentPlayer].xvel = 01423player[currentPlayer].speed = 01424player[currentPlayer].xpos = temp11425temp0 = player[currentPlayer].collisionRight1426temp0 <<= 161427player[currentPlayer].xpos -= temp01428end if1429next1430end if14311432if object.exploding == true1433temp0 = oscillation1434temp0 &= 71435if temp0 == 01436Rand(temp0, 48)1437temp0 -= 241438temp0 <<= 161439temp0 += object.xpos1440Rand(temp1, 48)1441temp1 -= 241442temp1 <<= 161443temp1 += object.ypos1444CreateTempObject(TypeName[Explosion], 0, temp0, temp1)1445object[tempObjectPos].drawOrder = 51446PlaySfx(SfxName[Explosion], false)1447end if1448end if14491450if object.screenShake > 01451object.screenShake--1452temp0 = object.screenShake1453temp0 &= 71454if temp0 == 01455screen.shakeX = 11456end if1457temp0 = object.screenShake1458temp0 &= 31459if temp0 == 01460screen.shakeY = 21461end if1462end if14631464switch object.flame.state1465case 01466object.flame.frame -= 41467object.flame.frame ^= 11468object.flame.frame += 41469break14701471case 11472object.flame.timer += 21473if object.flame.timer >= object.flame.animSpeed1474object.flame.timer = 01475object.flame.frame -= 51476object.flame.frame ^= 11477object.flame.frame += 51478if object.flame.animSpeed > 41479object.flame.animSpeed--1480end if1481end if1482break14831484case 21485object.flame.timer += 21486if object.flame.timer >= object.flame.animSpeed1487object.flame.timer = 01488object.flame.frame -= 51489object.flame.frame ^= 11490object.flame.frame += 51491if object.flame.animSpeed < 161492object.flame.animSpeed++1493if object.flame.animSpeed == 161494object.flame.frame = 51495object.flame.state = 01496end if1497end if1498end if1499break15001501case 31502object.flame.frame = 41503break15041505end switch1506end event150715081509event ObjectDraw1510temp0 = object.xpos1511if object.direction == FLIP_NONE1512temp0 += object.headOffset.x1513else1514temp0 -= object.headOffset.x1515end if1516temp1 = object.ypos1517temp1 += object.headOffset.y1518DrawSpriteFX(2, FX_ROTATE, temp0, temp1)15191520DrawSpriteFX(3, FX_FLIP, object.xpos, object.ypos)1521DrawSpriteFX(object.flame.frame, FX_FLIP, object.xpos, object.ypos)1522end event152315241525event ObjectStartup1526CheckCurrentStageFolder("Zone12")1527if checkResult == true1528LoadSpriteSheet("DEZ/Objects.gif")15291530// These first two are unused pre-rotated Head sprites1531SpriteFrame(12, -16, 23, 32, 487, 150)1532SpriteFrame(-20, -13, 54, 29, 430, 125)15331534// In their place, a engine-rotated single Head sprite is used instead1535SpriteFrame(-32, -24, 71, 24, 414, 158)15361537// Main Body1538SpriteFrame(-44, -36, 112, 72, 399, 183)15391540// Flame Animation Sprites1541SpriteFrame(0, 0, 1, 1, 495, 106)1542SpriteFrame(48, 12, 16, 16, 495, 108)1543SpriteFrame(48, 12, 16, 24, 495, 83)1544else1545LoadSpriteSheet("MBZ/Objects.gif")15461547SpriteFrame(12, -16, 23, 32, 999, 150)1548SpriteFrame(-20, -13, 54, 29, 942, 125)15491550SpriteFrame(-32, -24, 71, 24, 926, 158)15511552SpriteFrame(-44, -36, 112, 72, 911, 183)15531554SpriteFrame(0, 0, 1, 1, 1007, 106)1555SpriteFrame(48, 12, 16, 16, 1007, 108)1556SpriteFrame(48, 12, 16, 24, 1007, 83)1557end if15581559foreach (TypeName[Death Egg Robot], arrayPos0, ALL_ENTITIES)1560object[arrayPos0].rotation = 0x801561object[arrayPos0].headOffset.x = 0xB00001562object[arrayPos0].headOffset.y = -0x400001563next15641565// I sure hope you like tables, the compiler doesn't support putting tables in initial table declarations, so instead we have to manually place every value ourselves15661567SetTableValue(DeathEggRobot_anim_sub_bend, 0, DeathEggRobot_anim_bendDown)15681569SetTableValue(DeathEggRobot_anim_sub_bend, 0, DeathEggRobot_anim_getUp)15701571SetTableValue(DeathEggRobot_anim_sub_bend, 0, DeathEggRobot_anim_land)15721573SetTableValue(DeathEggRobot_anim_sub_jump, 0, DeathEggRobot_anim_jump)15741575SetTableValue(DeathEggRobot_anim_sub_walk, 0, DeathEggRobot_anim_stepAhead)15761577SetTableValue(DeathEggRobot_anim_sub_walk, 0, DeathEggRobot_anim_stepBack)15781579SetTableValue(DeathEggRobot_bend_frame_1, 0, DeathEggRobot_anim_sub_bend)1580SetTableValue(DeathEggRobot_bend_frame_2, 1, DeathEggRobot_anim_sub_bend)1581SetTableValue(DeathEggRobot_bend_frame_3, 2, DeathEggRobot_anim_sub_bend)1582SetTableValue(DeathEggRobot_bend_frame_4, 3, DeathEggRobot_anim_sub_bend)1583SetTableValue(DeathEggRobot_bend_frame_5, 4, DeathEggRobot_anim_sub_bend)1584SetTableValue(DeathEggRobot_bend_frame_6, 5, DeathEggRobot_anim_sub_bend)1585SetTableValue(DeathEggRobot_bend_frame_7, 6, DeathEggRobot_anim_sub_bend)1586SetTableValue(DeathEggRobot_bend_frame_8, 7, DeathEggRobot_anim_sub_bend)1587SetTableValue(DeathEggRobot_bend_frame_9, 8, DeathEggRobot_anim_sub_bend)15881589SetTableValue(DeathEggRobot_jump_frame_1, 0, DeathEggRobot_anim_sub_jump)1590SetTableValue(DeathEggRobot_jump_frame_2, 1, DeathEggRobot_anim_sub_jump)1591SetTableValue(DeathEggRobot_jump_frame_3, 2, DeathEggRobot_anim_sub_jump)15921593SetTableValue(DeathEggRobot_walk_frame_1, 0, DeathEggRobot_anim_sub_walk)1594SetTableValue(DeathEggRobot_walk_frame_2, 1, DeathEggRobot_anim_sub_walk)1595SetTableValue(DeathEggRobot_walk_frame_3, 2, DeathEggRobot_anim_sub_walk)1596SetTableValue(DeathEggRobot_walk_frame_4, 3, DeathEggRobot_anim_sub_walk)1597SetTableValue(DeathEggRobot_walk_frame_5, 4, DeathEggRobot_anim_sub_walk)1598SetTableValue(DeathEggRobot_walk_frame_6, 5, DeathEggRobot_anim_sub_walk)1599SetTableValue(DeathEggRobot_walk_frame_7, 6, DeathEggRobot_anim_sub_walk)1600SetTableValue(DeathEggRobot_walk_frame_8, 7, DeathEggRobot_anim_sub_walk)1601SetTableValue(DeathEggRobot_walk_frame_9, 8, DeathEggRobot_anim_sub_walk)1602SetTableValue(DeathEggRobot_walk_frame_10, 9, DeathEggRobot_anim_sub_walk)1603SetTableValue(DeathEggRobot_walk_frame_11, 10, DeathEggRobot_anim_sub_walk)1604SetTableValue(DeathEggRobot_walk_frame_12, 11, DeathEggRobot_anim_sub_walk)1605end event160616071608// ========================1609// Editor Events1610// ========================16111612event RSDKEdit1613if editor.returnVariable == true1614switch editor.variableID1615case EDIT_VAR_PROPVAL // property value1616checkResult = object.propertyValue1617break16181619case 0 // skipCutscene1620checkResult = object.propertyValue1621break16221623end switch1624else1625switch editor.variableID1626case EDIT_VAR_PROPVAL // property value1627object.propertyValue = editor.variableValue1628break16291630case 0 // skipCutscene1631object.propertyValue = editor.variableValue1632break16331634end switch1635end if1636end event163716381639event RSDKDraw1640DrawSprite(0)1641end event164216431644event RSDKLoad1645CheckCurrentStageFolder("Zone12")1646if checkResult == true1647LoadSpriteSheet("DEZ/Objects.gif")1648SpriteFrame(-44, -36, 112, 72, 399, 183)1649else1650LoadSpriteSheet("MBZ/Objects.gif")1651SpriteFrame(-44, -36, 112, 72, 911, 183)1652end if16531654AddEditorVariable("skipCutscene")1655SetActiveVariable("skipCutscene")1656AddEnumVariable("false", false) // Used in DEZ1657AddEnumVariable("true", true) // Used in MBZ & Boss Rush1658end event165916601661