Skip to content

Commit

Permalink
Add text to give Dream Ruby sell hint if key items are sellable.
Browse files Browse the repository at this point in the history
Reorder catchange so if invisibleNPCs is selected, it is not overwritten by the cats.
  • Loading branch information
Endymionls committed Apr 27, 2023
1 parent 3808126 commit 4338703
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions DW3Randomizer/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace DW3Randomizer
public partial class Form1 : Form
{
string versionNumber = "2.4.5";
string revisionDate = "4/26/2023";
string revisionDate = "4/27/2023";
string SotWFlags = "ACHMHDMBLABJEBODPPPBADB";
string endyFlags = "ACGMHDPBLACLJDODPPPBADB";

Expand Down Expand Up @@ -309,9 +309,9 @@ private void btnRandomize_Click(object sender, EventArgs e)
if (chk_RandSpriteColor.Checked) randSpriteColors(rni);
if (chk_RandomStartGold.Checked) randStartGold();
if (chk_GhostToCasket.Checked) changeGhostToCasket(rni);
if (chk_changeCats.Checked) changeCats(rni);
if (chk_InvisibleNPCs.Checked) invisibleNPCs();
if (chk_InvisibleShips.Checked) invisbleShips();
if (chk_changeCats.Checked) changeCats(rni);
changeEnd();
saveRom(true);
saveRom(false);
Expand Down Expand Up @@ -2365,6 +2365,7 @@ private void randomizeNames()
Random r1 = new Random(int.Parse(txtSeed.Text));

string[] maleNames = { "Bran", "Glynn", "Talint", "Numor", "Lars", "Orfeo", "Artho", "Esgar", "Ragnar", "Cristo", "Brey",
"Brindar", "Adan", "Glennard", "Theron", "Elucidus", "Harley", "Mathias", "Sartris", "Petrus", "Hiram", "Viron",
"Taloon", "Pankraz", "Parry", "Carver", "Nevan", "Terry", "Amos", "Kiefer", "Gabo", "Melvin", "Angelo", "Yangus", "Erik",
"Sylvando", "Arus", "Luceus", "Lazarel", "Dai", "Alvin", "Ashlay", "Dougie", "Erdwin", "Cobi", "Kendrick", "Hans", "Kiryl",
"Hendrik", "Laurel", "Hybris", "Jasper", "Joker", "Nalasia", "Charmles", "Kameha", "Laguas", "Odisu", "Psaro", "Trode",
Expand Down Expand Up @@ -8457,7 +8458,7 @@ private void forceItemSell(int rni)
{
price = itemPriceAdjust[lnI];
}
// int priceToUse = (romData[0x123b + itemstoAdjust[lnI]] >= 128 ? romData[0x123b + itemstoAdjust[lnI]] - 128 : romData[0x123b + itemstoAdjust[lnI]]);
// int priceToUse = (romData[0x123b + itemstoAdjust[lnI]] >= 128 ? romData[0x123b + itemstoAdjust[lnI]] - 128 : romData[0x123b + itemstoAdjust[lnI]]);
if (price >= 10000)
{
romData[0x11be + itemstoAdjust[lnI]] += 3; // Now multiply by 1000
Expand All @@ -8478,8 +8479,15 @@ private void forceItemSell(int rni)
romData[0x123b + itemstoAdjust[lnI]] = (byte)(romData[0x123b + itemstoAdjust[lnI]] >= 128 ? price + 128 : price);
}
}
}
// Change Dream Ruby Text to give hint to sell
byte[] dreamRubyText = { 0x37, 0x0F, 0x16, 0x16, 0x13, 0x18, 0x11, 0x60, 0x1E, 0x12, 0x13, 0x1D, 0x60, 0x1C, 0x1F, 0x0C, 0x23,
0x60, 0x21, 0x13, 0x16, 0x16, 0x60, 0x0C, 0x1C, 0x13, 0x18, 0x11, 0x60, 0x1D, 0x19, 0x17, 0x0F, 0x19,
0x18, 0x0F, 0x60, 0x10, 0x19, 0x1C, 0x1E, 0x1F, 0x18, 0x0F };

for (int lni = 0; lni < dreamRubyText.Length; lni++)
romData[0x42bc7 + lni] = dreamRubyText[lni];
}

private void changeHeroAge(int rni)
{
Random r1 = new Random(int.Parse(txtSeed.Text));
Expand Down

0 comments on commit 4338703

Please sign in to comment.