Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,28 @@
* The random sprite chosen will no longer depend on the seed number
* Added a Ms. Pacman "Sue" sprite

# Build 479x
* Stat build modifier is not locked to 3 if Permanent Repel flag is selected.
* Added "Almost Vanilla" option to flags.
Almost Vanilla turns off all of these patches:
- open the Fairy Water shop in Breconnary
- have the old man take the Token along with Staff & Stones
- move the Golem encounter to Charlock
- make sure all forced encounters are never marked defeated
- changes the enemies summoned by the harp.
- sets the encounter rate of Zone 0 to be the same as other zones.
- set Death Necklace chance to 100%
- adjust MP requirements
- adjust enemy HP values (notable for Golem and Dragonlord)
- buff the HEAL spell
- buff the HURT spell
- lock the stat build modifier at 3
- replace 7-13 GOLD chests with 500-755
Additionally, when "Almost Vanilla" is on:
- GOLD chests are only updated to 500-755 if chests are shuffled
- the "Random Map" flag is disabled


# 2.1.2 - Bug fixes #
* Fixed the slime and red slime sprites

Expand Down
2 changes: 1 addition & 1 deletion common/build.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/* This file is generated by git */
#define BUILD "478"
#define BUILD "479x"
60 changes: 42 additions & 18 deletions common/dwr.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,10 @@ static inline BOOL is_static_chest(dw_chest *chest)
*/
static void no_chest_shuffle(dw_rom *rom)
{

if (VANILLA(rom))
return;

size_t i;
dw_chest *chest;
uint8_t contents[] = {
Expand Down Expand Up @@ -770,6 +774,9 @@ static inline void set_ow_zone(dw_rom *rom, uint8_t x, uint8_t y, uint8_t value)
*/
static void randomize_zone_layout(dw_rom *rom)
{
if(VANILLA(rom))
return;

int i;
dw_warp *tantegel = &rom->map.warps_from[WARP_TANTEGEL];

Expand Down Expand Up @@ -1088,6 +1095,9 @@ static void update_drops(dw_rom *rom)
*/
static void update_mp_reqs(dw_rom *rom)
{
if(VANILLA(rom))
return;

int i;
const uint8_t mp_reqs[10] = {3, 2, 2, 2, 2, 6, 8, 2, 8, 5};

Expand Down Expand Up @@ -1128,16 +1138,18 @@ static void lower_xp_reqs(dw_rom *rom)
*/
static void update_enemy_hp(dw_rom *rom)
{
int i;
const uint8_t remake_hp[DRAGONLORD_2+1] = {
2, 3, 5, 7, 12, 13, 13, 22, 23, 20, 16, 24, 28,
18, 33, 39, 3, 33, 37, 35, 44, 37, 40, 40, 153, 35,
47, 48, 38, 70, 72, 74, 65, 67, 98, 135, 99, 106, 100, 165
};
for (i=SLIME; i <= DRAGONLORD_2; i++) {
rom->enemies[i].hp = remake_hp[i];
if(!VANILLA(rom)){
int i;
const uint8_t remake_hp[DRAGONLORD_2+1] = {
2, 3, 5, 7, 12, 13, 13, 22, 23, 20, 16, 24, 28,
18, 33, 39, 3, 33, 37, 35, 44, 37, 40, 40, 153, 35,
47, 48, 38, 70, 72, 74, 65, 67, 98, 135, 99, 106, 100, 165
};
for (i=SLIME; i <= DRAGONLORD_2; i++) {
rom->enemies[i].hp = remake_hp[i];
}
rom->enemies[DRAGONLORD_2].hp -= mt_rand(0, 15);
}
rom->enemies[DRAGONLORD_2].hp -= mt_rand(0, 15);
}

/**
Expand Down Expand Up @@ -1256,6 +1268,7 @@ static void update_title_screen(dw_rom *rom)
static void dwr_fighters_ring(dw_rom *rom)
{

if(!VANILLA(rom)){
printf("Fixing the fighter's ring...\n");
/* fighter's ring fix */
vpatch(rom, 0xf0fc, 4, 0x20, 0x7d, 0xff, 0xea);
Expand All @@ -1276,6 +1289,7 @@ static void dwr_fighters_ring(dw_rom *rom)
0xa5, 0xcf, /* LDA $00CF ; replaces code removed from $F00E */
0x60 /* RTS */
);
}
}

/**
Expand Down Expand Up @@ -1452,14 +1466,12 @@ static void other_patches(dw_rom *rom)
vpatch(rom, 0x03f9e, 2, 0x37, 0x32);
vpatch(rom, 0x0af6c, 1, 0xef);

if(!VANILLA(rom)){
/* open the fairy water shop in breconnary */
vpatch(rom, 0x0074e, 1, 0x6f);
vpatch(rom, 0x0076c, 1, 0x6f);
vpatch(rom, 0x0077a, 1, 0x46);

/* make search actually open a chest */
vpatch(rom, 0xe1dc, 2, 0xfd, 0xe1);

/* Have the jerk take the token along with staff & stones */
vpatch(rom, 0x0d383, 2, 0xca, 0xbf); /* jump to new code below */
vpatch(rom, 0x03fca, 8,
Expand All @@ -1486,25 +1498,37 @@ static void other_patches(dw_rom *rom)
0xea, /* NOP ; */
0xea /* NOP ; */
);

/* Sets the encounter rate of Zone 0 to be the same as other zones. */
vpatch(rom, 0xcebf, 3, 0x4c, 0x04, 0xcf); /* skip over the zone 0 code */
vpatch(rom, 0xe260, 1, 0); /* set death necklace chance to 100% */
vpatch(rom, 0xe74d, 1, 9); /* buff the hurt spell */
vpatch(rom, 0xdbc1, 1, 18); /* buff the heal spell */
if(!PERMANENT_REPEL(rom)){
vpatch(rom, 0xf131, 2, 0x69, 0x03); /* Lock the stat build modifier at 3 */
}

}

vpatch(rom, 0x42a, 1, 0x47); /* add new stairs to the throne room */
vpatch(rom, 0x2a9, 1, 0x45); /* add new stairs to the 1st floor */
vpatch(rom, 0x2c7, 1, 0x66); /* add a new exit to the first floor */


/* make search actually open a chest */
vpatch(rom, 0xe1dc, 2, 0xfd, 0xe1);

/* replace the usless grave warps with some for tantegel */
vpatch(rom, 0xf44f, 3, 5, 1, 8);
vpatch(rom, 0xf4e8, 3, 4, 1, 7);
vpatch(rom, 0x1288, 1, 0x22); /* remove the top set of stairs for the old warp in the grave */
/* Sets the encounter rate of Zone 0 to be the same as other zones. */
vpatch(rom, 0xcebf, 3, 0x4c, 0x04, 0xcf); /* skip over the zone 0 code */
vpatch(rom, 0xe260, 1, 0); /* set death necklace chance to 100% */
vpatch(rom, 0xe74d, 1, 9); /* buff the hurt spell */
vpatch(rom, 0xdbc1, 1, 18); /* buff the heal spell */

vpatch(rom, 0xea41, 5, 0xad, 0x07, 0x01, 0xea, 0xea); /* I forget what this does */
/* fixing some annoying roaming npcs */
vpatch(rom, 0x18ee, 1, 0xa7); /* move the stupid old man from the item shop */
vpatch(rom, 0x90f, 1, 0x6f); /* quit ignoring the customers */
vpatch(rom, 0x93c, 1, 0x6f); /* quit ignoring the customers */
vpatch(rom, 0x17a2, 3, 0, 0, 0); /* delete roaming throne room guard */
vpatch(rom, 0xf131, 2, 0x69, 0x03); /* Lock the stat build modifier at 3 */

/* I always hated this wording */
dwr_str_replace(rom, "The spell will not work", "The spell had no effect");
Expand Down
1 change: 1 addition & 0 deletions common/dwr.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
#define SHORT_CHARLOCK(x) (x->flags & FLAG_s)
#define FAST_TEXT(x) (x->flags & FLAG_t)
#define NO_HURTMORE(x) (x->flags & FLAG_u)
#define VANILLA(x) (x->flags & FLAG_v)
#define RANDOM_PRICES(x) (x->flags & FLAG_w)
#define RANDOM_XP_REQS(x) (x->flags & FLAG_x)
#define SHUFFLE_CHESTS(x) (x->flags & FLAG_C)
Expand Down
3 changes: 3 additions & 0 deletions common/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,9 @@ BOOL map_generate_terrain(dw_rom *rom)
int i, j, x, y, lm_sizes[256];
int largest, next, total_area;

if (VANILLA(rom)) {
return map_encode(&rom->map);
}
if (!RANDOM_MAP(rom)) {

map_decode(&rom->map);
Expand Down
11 changes: 6 additions & 5 deletions ui/main-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,21 @@ void MainWindow::layout()
/* Gameplay Options */
this->addOption('C', "Shuffle Chests && Searches", GAMEPLAY, 0, 0);
this->addOption('G', "Random Growth", GAMEPLAY, 1, 0);
this->addOption('M', "Random Map", GAMEPLAY, 2, 0);
this->addOption('M', "Random Map", "", "v", GAMEPLAY, 2, 0);
this->addOption('S', "Random Spell Learning", GAMEPLAY, 3, 0);
this->addOption('Y', "Heal/Hurt before \"More\"", "S", "", GAMEPLAY, 4, 0);
this->addOption('Y', "Heal/Hurt Before \"More\"", "S", "", GAMEPLAY, 4, 0);
this->addOption('W', "Random Weapon Shops", GAMEPLAY, 0, 1);
this->addOption('w', "Random Weapon Prices", GAMEPLAY, 1, 1);
this->addOption('x', "Random XP Requirements", GAMEPLAY, 2, 1);
this->addOption('v', "Almost Vanilla", GAMEPLAY, 3, 1);

/* Features */
this->addOption('R', "Enable Menu Wrapping", FEATURES, 0, 0);
this->addOption('D', "Enable Death Necklace", FEATURES, 1, 0);
this->addOption('T', "Enable Torches In Battle", FEATURES, 2, 0);
this->addOption('T', "Enable Torches in Battle", FEATURES, 2, 0);
this->addOption('b', "Big Swamp", "M", "", FEATURES, 0, 1);
this->addOption('r', "Repel in dungeons", FEATURES, 1, 1);
this->addOption('p', "Permanent repel", FEATURES, 2, 1);
this->addOption('r', "Repel in Dungeons", FEATURES, 1, 1);
this->addOption('p', "Permanent Repel", FEATURES, 2, 1);

/* Monster flags */
this->addOption('P', "Random Monster Abilities", MONSTERS, 0, 0);
Expand Down