Skip to content

Commit cc0dd5f

Browse files
committed
Readme plus other fixes.
- Readme update (version 1 release) - Fixed fake Dark World - Fixed Titan's Mitt downgrading - some fixes with item placement - Hammer can now be found in the Light World again! yay! - Red Mail and Mirror Shield can no longer be found in the Light World.
1 parent 77e88e4 commit cc0dd5f

File tree

5 files changed

+38
-33
lines changed

5 files changed

+38
-33
lines changed

AlttpRandomizer/Net/RandomizerVersion.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace AlttpRandomizer.Net
1010
{
1111
public class RandomizerVersion
1212
{
13-
public static string Current = "1P5";
13+
public static string Current = "1";
1414
public static bool Debug = false;
1515

1616
public static string CurrentDisplay
@@ -28,7 +28,7 @@ public static string CurrentDisplay
2828
}
2929
}
3030

31-
private const int checkVersion = 0;
31+
private const int checkVersion = 1;
3232
private static readonly string updateAddress = "http://dessyreqt.github.io/alttprandomizer/?" + DateTime.Now.Ticks;
3333

3434
public static void CheckUpdate()

AlttpRandomizer/Random/Randomizer.cs

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Linq;
5-
using System.Runtime.CompilerServices;
6-
using System.Runtime.InteropServices;
7-
using System.Security.Cryptography.X509Certificates;
8-
using System.Text;
9-
using System.Threading.Tasks;
105
using AlttpRandomizer.IO;
116
using AlttpRandomizer.Net;
127
using AlttpRandomizer.Properties;
138
using AlttpRandomizer.Rom;
149

1510
namespace AlttpRandomizer.Random
1611
{
17-
public enum RandomizerDifficulty
12+
public enum RandomizerDifficulty
1813
{
1914
Casual = 0,
2015
}

AlttpRandomizer/Resources/alttp.sfc

0 Bytes
Binary file not shown.

AlttpRandomizer/Rom/RomLocationsCasual.cs

+22-23
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ public void ResetLocations()
924924
have.Contains(ItemType.OcarinaActive)
925925
&& CanBeInDarkWorld(have)
926926
&& have.Contains(ItemType.TitansMitt),
927-
},
927+
},
928928
new Location
929929
{
930930
LateGameItem = true,
@@ -1007,7 +1007,9 @@ public void ResetLocations()
10071007
have =>
10081008
CanClimbDeathMountain(have)
10091009
&& CanBeInDarkWorld(have)
1010-
&& have.Contains(ItemType.Hammer),
1010+
&& have.Contains(ItemType.Hammer)
1011+
// not actually required here, but stops some deadlocks
1012+
&& have.Contains(ItemType.Quake),
10111013
},
10121014
new Location
10131015
{
@@ -2010,20 +2012,6 @@ public void ResetLocations()
20102012
}
20112013
}
20122014
},
2013-
// To prevent double-item deadlocks
2014-
new Location
2015-
{
2016-
LateGameItem = true,
2017-
Region = Region.Progression,
2018-
Name = "Turtle Rock",
2019-
Item = new Item(ItemType.Progression),
2020-
CanAccess =
2021-
have =>
2022-
CanAccessEastDarkWorldDeathMountain(have)
2023-
&& have.Contains(ItemType.Hammer)
2024-
&& have.Contains(ItemType.Quake),
2025-
},
2026-
20272015
};
20282016
}
20292017

@@ -2243,35 +2231,46 @@ public List<Location> GetUnavailableLocations(List<ItemType> haveItems)
22432231
public void TryInsertCandidateItem(List<Location> currentLocations, List<ItemType> candidateItemList, ItemType candidateItem)
22442232
{
22452233
var uniqueItems = GetUniqueItems();
2246-
var badLateGameItem = (candidateItem == ItemType.TitansMitt || candidateItem == ItemType.Hammer) && !currentLocations.Any(x => x.LateGameItem);
2234+
var badLateGameItem = IsLateGameItem(candidateItem) && !currentLocations.Any(x => x.LateGameItem);
22472235
var needUniqueItem = !uniqueItems.Contains(candidateItem) && currentLocations.All(x => x.UniqueItemOnly);
2248-
var badFirstItem = (candidateItem == ItemType.PowerGlove || candidateItem == ItemType.MirrorShield) && currentLocations.Any(x => x.Name == "[cave-040] Link's House");
2236+
var badFirstItem = IsBadFirstItem(candidateItem) && currentLocations.Any(x => x.Name == "[cave-040] Link's House");
22492237

22502238
if (!badLateGameItem && !needUniqueItem && !badFirstItem)
22512239
{
22522240
candidateItemList.Add(candidateItem);
22532241
}
22542242
}
22552243

2244+
private static bool IsBadFirstItem(ItemType item)
2245+
{
2246+
return (item == ItemType.PowerGlove || item == ItemType.TitansMitt || item == ItemType.RedShield || item == ItemType.MirrorShield);
2247+
}
2248+
22562249
public int GetInsertedLocation(List<Location> currentLocations, ItemType insertedItem, SeedRandom random)
22572250
{
22582251
int retVal;
22592252
var uniqueItems = GetUniqueItems();
22602253
bool badLateGameItemSpot;
22612254
bool badUniqueItemSpot;
2255+
bool unusedUniqueItemSpot;
22622256

22632257
do
22642258
{
22652259
retVal = random.Next(currentLocations.Count);
22662260

2267-
badLateGameItemSpot = (insertedItem == ItemType.TitansMitt || insertedItem == ItemType.Hammer) && !currentLocations[retVal].LateGameItem;
2268-
badUniqueItemSpot = uniqueItems.Contains(insertedItem) && !currentLocations[retVal].UniqueItemOnly && currentLocations.Any(x => x.UniqueItemOnly);
2269-
} while (badLateGameItemSpot || badUniqueItemSpot);
2270-
2261+
badLateGameItemSpot = IsLateGameItem(insertedItem) && !currentLocations[retVal].LateGameItem;
2262+
badUniqueItemSpot = !uniqueItems.Contains(insertedItem) && currentLocations[retVal].UniqueItemOnly;
2263+
unusedUniqueItemSpot = uniqueItems.Contains(insertedItem) && !currentLocations[retVal].UniqueItemOnly && currentLocations.Any(x => x.UniqueItemOnly);
2264+
} while (badLateGameItemSpot || badUniqueItemSpot || unusedUniqueItemSpot);
22712265

22722266
return retVal;
22732267
}
22742268

2269+
private static bool IsLateGameItem(ItemType item)
2270+
{
2271+
return item == ItemType.TitansMitt || item == ItemType.RedMail || item == ItemType.MirrorShield;
2272+
}
2273+
22752274
public ItemType GetInsertedItem(List<Location> currentLocations, List<ItemType> itemPool, SeedRandom random)
22762275
{
22772276
ItemType retVal;
@@ -2283,7 +2282,7 @@ public ItemType GetInsertedItem(List<Location> currentLocations, List<ItemType>
22832282
{
22842283
retVal = itemPool[random.Next(itemPool.Count)];
22852284

2286-
badLateGameItem = (retVal == ItemType.TitansMitt || retVal == ItemType.Hammer) && !currentLocations.Any(x => x.LateGameItem);
2285+
badLateGameItem = IsLateGameItem(retVal) && !currentLocations.Any(x => x.LateGameItem);
22872286
needUniqueItem = !uniqueItems.Contains(retVal) && currentLocations.All(x => x.UniqueItemOnly);
22882287
} while (badLateGameItem || needUniqueItem);
22892288

readme.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Current Version: 0
1+
# Current Version: 1
22

33
# About the Legend of Zelda: A Link to the Past Randomizer (or ALttPRandomizer)
44
This is a simple program that moves around items in the Legend of Zelda: A Link to the Past (ALttP). It is used for racing the game.
@@ -10,11 +10,22 @@ Select a location to save your randomized rom, then select `Create`.
1010

1111
Right now there is only one difficulty, "Casual". There may be other difficulties in the future.
1212

13+
# Differences from the normal game
14+
There are a number of differences from a randomized game to the normal game. Here's a short list:
15+
- The game text is in Japanese _(this obviously isn't different if you are used to playing in Japanese. See below for why.)_
16+
- Chest items and items given to you by the bottle vendor, Sahasrahla, the flute boy, the sick kid, the purple chest, the hobo under the bridge, the catfish, King Zora, and the old mountain man are randomized. Note that this doesn't include chests in the various chest games throughout Hyrule.
17+
18+
Some bugs that wouldn't crop up in normal play have been fixed:
19+
- If you die in a Dark World dungeon and haven't defeated Agahnim, you will end up in what's known as "fake Dark World." This will sometimes cause the Crystal at the end of the dungeon to not spawn, causing a softlock. You cannot spawn in "fake Dark World" in randomizer.
20+
- If you collect Power Gloves after collecting Titan's Mitt, your gloves will downgrade and you will be stuck without a way to lift dark rocks. This will not happen in randomizer.
21+
- If you collect the key in the big chest room in the Swamp Palace _(due to having hookshot earlier than normal)_, then use that key on the top left door of that room, you can cause a soft lock due to being unable to access that key. In randomizer, moving one screen on the overworld away from the entrance to Swamp Palace will reset the water both around Swamp Palace, and the water that would cover those keys.
22+
- If you defeat Agahnim and never found the Magic Mirror, you will be stuck in the Dark World with no way to return to the light world. In randomizer, saving and quitting will cause you to load up in the Light World.
23+
- Occasionally Agahnim will attack you with particles that can't be reflected back at him. In randomizer, this doesn't happen.
24+
1325
# Why is the game in Japanese?
1426
This randomizer uses the 1.0 JP version of the base rom because it is what is primarily used in speedrunning ALttP. Here are some of the features of this version compared to the English version:
1527
- Faster text speed. This is very noticeable during the introduction.
1628
- After getting the Pegasus Boots, pressing `Y` + `A` will allow you to use an item and dash at the same time. For a clear example of this working, try hammer dashing at the bridge leading from Dark Palace to Swamp Palace.
1729
- You can jump down from a wall of which you are partially inside. This is most useful above the section of Turtle Rock that leads to the Mirror Shield.
1830
- In an area where you can't use the Magic Mirror, you can make pushed blocks disappear by trying to use it while pushing the blocks.
1931
- You can enter the Exploration Glitch in Tower of Hera by falling down the rightmost hole on the 3F, then jumping right from the wall.
20-
- If you light Ganon's left torch before the right torch extinguishes, the right torch will never extinguish.

0 commit comments

Comments
 (0)