;---------------------Event Gray Doors_v1.1--------------------- ;----------------------OmegaDragnet9---------------------------- ;Credits to JAM for already having this functionality ;in his Extra Event Doors patch. ;P.JBoy for the Banklogs. ;MetroidNerd#9001, because the Event based off Room Index ;came from Event Triggers from Killing Enemies. lorom ;-------------------------Defines------------------------------- !AnimalsSaved = $84BE57 !FreeSpace = $84F2C0 !BossDefeated = $84BE4B !NewRoomIndexCode = $84BE30 ;--------------Check Event Based on Room Index------------------ ;In editor, you select "Main Boss for Area is Dead." ;This is the best "set it and forget it" option ;because it automatically sets an event and frees up the door index. ;If you really want a gray door to stay closed forever, the CRE BTS Tiles work perfectly fine. ; org !BossDefeated ; DW #RoomIndex ; org !NewRoomIndexCode ; RoomIndex: ; LDA $079D ;-----------Check Event Based on PLM Argument----------------- ;In editor, you select "Etecoons/Dachora Rescued" ;Uses free space but allows you to check the event ;based off of the door index of this PLM (just like JAM had in his version.) ;With this, you have to pay close attention to what door index you're using. org !AnimalsSaved DW #EventCheck org !FreeSpace EventCheck: PHY LDY $1C27 ;PLM index LDA $1DC7,y ;PLM variable (event # to set) AND #$00FF PLY ;This whole check is just added to Vanilla code. JSL $808233 BCC + JMP $BDB2 + JMP $BDC4 ;------Compatability with Nodever2's Full Door Cap Rewrite------ ;--------------Check Event Based on Room Index------------------ ;As of version 1.01, find line 317 ;!GotoLinkIfBossDead = $BDD4 in Vanilla ;Replace that define with the 16 bit address of !NewRoomIndexCode of this document. ;If this document reads !NewRoomIndexCode = $84BE30 ;Then in Nodever2's Full Door Cap Rewrite the new location for "!GotoLinkIfBossDead" as ;!GotoLinkIfBossDead = $BE30 ;-----------Check Event Based on PLM Argument----------------- ;As of version 1.01, find line 323 ;!GotoLinkIfAnimals = $BE30 ;Replace that define with the 16 bit address of the Bank $84 freespace of this document. ;If this document reads !FreeSpace = $84F2C0 ;Then in Nodever2's Full Door Cap Rewrite the new location for the animals saved is ;!GotoLinkIfAnimals = $F2C0.