dwrandomizer icon indicating copy to clipboard operation
dwrandomizer copied to clipboard

Extremely unlikely soft lock

Open mcgrew opened this issue 6 years ago • 2 comments

If you defeat the dragonlord before learning return AND you have no keys AND you have no wings AND Tantegel and Charlock are on opposite continents AND the entrance to swamp cave on Charlock's side is in the back of Garinham AND there is no cave on Charlock's continent with a non-keylocked magic key or wings, then you can't get back to Tantegel after defeating the Dragonlord.

mcgrew avatar Aug 27 '18 11:08 mcgrew

I have an idea how to resolve this softlock. check for the conditions in the randomizer, and if so, ensure either a key, or a wing is in the single out of way chest in charlock castle, or any other cave on the same contenent charlock castle. In fact, the single chest that can be accessed in charlock without a key is one possible location that is always accessable no matter what.

CaitSith2 avatar Jun 29 '19 09:06 CaitSith2

While it might be the most elegant solution to completely avoid such situations, perhaps an easy fix would simply to fill the hero's key count upon defeating the Dragonlord?

vpatch(rom, 0xe9e8, 2, 0x50, 0xc9); // Hook in place of a JSR WaitForNMI in the post-DL fight
vpatch(rom, 0xc950, 8,
       0xa9, 0x06, // lda 6
       0x85, 0xbf, // sta to keys
       0x20, 0x74, 0xff, // original jsr
       0x60); // rts

juef17 avatar Feb 17 '24 23:02 juef17