Skip to content

Commit

Permalink
Parry/Fight returns
Browse files Browse the repository at this point in the history
- Added an option to keep or remove the Parry/Fight bug.
- GP was boosted based on the XP combo box.  (FIXED)
- Not all monster's XP and GP rewards were boosted.  (FIXED)
  • Loading branch information
gameboy9 committed Dec 2, 2017
1 parent a269c57 commit d354f1a
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 27 deletions.
Binary file modified DW3Randomizer/.vs/DW3Randomizer/v15/.suo
Binary file not shown.
40 changes: 28 additions & 12 deletions DW3Randomizer/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 15 additions & 11 deletions DW3Randomizer/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,15 @@ private void btnRandomize_Click(object sender, EventArgs e)
romData[0x3fc2 + lnI] = codData2[lnI];

// Fix the "parry/fight" bug(as determined via gamefaqs board), via Zombero's DW3 Hardtype IPS patch.
byte[] parryFightFix1 = { 0xbd, 0x9b, 0x6a, 0x29, 0xdf, 0x9d, 0x9b, 0x6a, 0x60 };
byte[] parryFightFix2 = { 0x20, 0x70, 0xbb };
for (int lnI = 0; lnI < parryFightFix1.Length; lnI++)
romData[0xbb80 + lnI] = parryFightFix1[lnI];
for (int lnI = 0; lnI < parryFightFix2.Length; lnI++)
romData[0xa402 + lnI] = parryFightFix2[lnI];
if (chkRemoveParryFight.Checked)
{
byte[] parryFightFix1 = { 0xbd, 0x9b, 0x6a, 0x29, 0xdf, 0x9d, 0x9b, 0x6a, 0x60 };
byte[] parryFightFix2 = { 0x20, 0x70, 0xbb };
for (int lnI = 0; lnI < parryFightFix1.Length; lnI++)
romData[0xbb80 + lnI] = parryFightFix1[lnI];
for (int lnI = 0; lnI < parryFightFix2.Length; lnI++)
romData[0xa402 + lnI] = parryFightFix2[lnI];
}

// Rename the starting characters.
for (int lnI = 0; lnI < 12; lnI++)
Expand Down Expand Up @@ -1660,12 +1663,12 @@ private void shipPlacement(int byteToUse, int top, int left, int maxLake = 0)
private void boostGP()
{
// Replace monster data
for (int lnI = 0; lnI < 125; lnI++)
for (int lnI = 0; lnI < 139; lnI++)
{
int byteValStart = 0x32e3 + (23 * lnI);

int gp = romData[byteValStart + 4] + ((romData[byteValStart + 18] % 2) * 256);
switch (cboExpGains.SelectedIndex)
switch (cboGoldReq.SelectedIndex)
{
case 0:
gp *= 2;
Expand All @@ -1689,7 +1692,7 @@ private void boostGP()
private void boostXP()
{
// Replace monster data
for (int lnI = 0; lnI < 125; lnI++)
for (int lnI = 0; lnI < 139; lnI++)
{
int byteValStart = 0x32e3 + (23 * lnI);

Expand Down Expand Up @@ -3423,7 +3426,8 @@ private void determineChecks(object sender, EventArgs e)
optMonsterSilly.Checked = (number % 4 == 1);
optMonsterMedium.Checked = (number % 4 == 2);
optMonsterHeavy.Checked = (number % 4 == 3);
chkFourJobFiesta.Checked = (number >= 4);
chkFourJobFiesta.Checked = (number % 8 >= 4);
chkRemoveParryFight.Checked = (number % 16 >= 8);

number = convertChartoInt(Convert.ToChar(flags.Substring(1, 1)));
cboExpGains.SelectedIndex = (number % 8);
Expand Down Expand Up @@ -3459,7 +3463,7 @@ private void determineFlags(object sender, EventArgs e)
if (loading) return;

string flags = "";
flags += convertIntToChar((optMonsterLight.Checked ? 0 : optMonsterSilly.Checked ? 1 : optMonsterMedium.Checked ? 2 : 3) + (chkFourJobFiesta.Checked ? 4 : 0));
flags += convertIntToChar((optMonsterLight.Checked ? 0 : optMonsterSilly.Checked ? 1 : optMonsterMedium.Checked ? 2 : 3) + (chkFourJobFiesta.Checked ? 4 : 0) + (chkRemoveParryFight.Checked ? 8 : 0));
flags += convertIntToChar(cboExpGains.SelectedIndex + (8 * cboEncounterRate.SelectedIndex));
flags += convertIntToChar((cboGoldReq.SelectedIndex) + (chkRandomizeXP.Checked ? 4 : 0) + (chkRandomizeGP.Checked ? 8 : 0) + (chkFasterBattles.Checked ? 16 : 0) + (chkSpeedText.Checked ? 32 : 0));
flags += convertIntToChar((chkRandStores.Checked ? 1 : 0) + (chkRandEnemyPatterns.Checked ? 2 : 0) + (chkRandSpellLearning.Checked ? 4 : 0) + (chkRandStatGains.Checked ? 8 : 0) + (chkRandTreasures.Checked ? 16 : 0) + (chkRandMonsterZones.Checked ? 32 : 0));
Expand Down
3 changes: 0 additions & 3 deletions DW3Randomizer/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,4 @@
<metadata name="adjustments.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="adjustments.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
Binary file modified DW3Randomizer/bin/Debug/DW3Randomizer.exe
Binary file not shown.
Binary file modified DW3Randomizer/bin/Debug/DW3Randomizer.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion DW3Randomizer/bin/Debug/lastFile.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
C:\bizhawk\dw3 test\Dragon Warrior III (U) (PRG0) [!].nes
0ay@z
Fmm@z
Brindar
Ragnar
Adan
Expand Down
Binary file not shown.
Binary file modified DW3Randomizer/obj/Debug/DW3Randomizer.exe
Binary file not shown.
Binary file modified DW3Randomizer/obj/Debug/DW3Randomizer.pdb
Binary file not shown.

0 comments on commit d354f1a

Please sign in to comment.