progre / lmorandomizer

Randomizer for La-Mulana (Original version).
MIT License
9 stars 3 forks source link

Treasure and Pepper erase Anchor #34

Closed progre closed 3 months ago

progre commented 3 months ago

image

The effects of Treasure and Pepper remain in effect even if overwritten by other items. This is because these effects are performed on flags, not items. But Anchor is different: Anchor's effect is only performed if you own the item.

Thus, if you get Anchor and then Pepper or Treasure, you will get a softlock on Gate of Illusion (you can avoid this by using glitches). More precisely, it is lost when the save data is loaded after acquiring a new item.

I can think of several ways to solve this.

progre commented 3 months ago

I like d idea, but I am not sure if new players will understand how this works. Will the remake have the same problem?

progre commented 3 months ago

Maybe the Amulet or Diary can disable the MuLana Talisman? Need to check.

progre commented 3 months ago

Obj No. 220 The Curse of the Chest is checking the flag on the MuLana Talisman, it says. Probably not causing any problems.

I came up with a new idea.

This may be the best way to go.

Would Anchor have worked anywhere else but here?

progre commented 3 months ago

Recording 2024-08-07 200949

It looks a little bad, but it certainly works as normal water.

However, Anchor has the useful feature of sinking quickly into the water, not just here. It should still provide a way to retrieve the item again.

jeremydk commented 3 months ago

I personally like the idea of having Anchor work as much like a flag as we can. -- but option "C" also works as an easy fallback option to me.

progre commented 3 months ago

I came up with a very good logic.

If Pepper (Treasure) is acquired while holding an Anchor, an additional Anchor will appear in its place. Furthermore, if Pepper (Treasure) is acquired without an Anchor, only the acquisition flag for the additional Anchor will be turned on.

Place this in each of the locations where Pepper and Treasure can be retrieved, and all should be well. As soon as the respective item is acquired while holding the Anchor, the item will be overwritten with the Anchor and both functions will be available.

The script and pseudo-logic are as follows

<OBJECT 94,x,y,0,793,793,6001>
<START 99999,1>
<START 778,1>
<START 6001,1>
</OBJECT>
<OBJECT 1,x,y,778,26,6001,-1>
<START 99999,1>
<START 6001,1>
<START 778,0>
<START 793,0>
</OBJECT>
let has_anchor; // FLAG 778
let has_pepper; // FLAG 793
// let has_treasure; // FLAG 794
let mut put_pepper_down = false; // NEW FLAG 6001
// let mut put_treasure_down = false; // NEW FLAG 6002

// OBJECT 94
if !has_anchor && !put_pepper_down { // START
    if has_pepper {
        put_pepper_down = true;
    }
}
// OBJECT 1
if !put_pepper_down && has_anchor && has_pepper { // START
    chest(Equipment::Anchor, || { put_pepper_down = true; });
}
jeremydk commented 3 months ago

I like that option a lot, very clean, and doesn't require outside knowledge.

progre commented 3 months ago

image

It sucks. After reviewing the recording, I was exploring without getting Anchor; I was looking at spoilerlog and got it wrong.

I actually overwrote Anchor with Pepper and Anchor worked. It didn't matter if I save-loaded it or not.

I'm off to trash the junk.