mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
MM: MM1: More map fixes
This commit is contained in:
@@ -1193,7 +1193,7 @@ maps:
|
||||
map17:
|
||||
options: "1) RED THORAC 2) BLUE OGRAM\n3) GREEN BAGAR 4) YELLOW LIMRA\n5) PURPLE SAGRAN 6) ORANGE OOLAK\n7) BLACK DRESIDION 8) WHITE DILITHIUM"
|
||||
bridge: "A WOODEN BRIDGE EXTENDES ACROSS THE\nOCEAN INTO THE MIST. A HOODED FIGURE\nMATERIALIZES, ""TO CROSS YOU MUST EACH\nANSWER A QUESTION, ACCEPT (Y/N)?"""
|
||||
color: "WHAT IS YOUR COLOR(1-8)?"
|
||||
color: "WHAT IS YOUR COLOR (1-8)?"
|
||||
wrong: "WRONG!"
|
||||
correct: "CORRECT!"
|
||||
islands: "ATOP THIS PEAK 5 ISLANDS CAN BE SEEN\nTO THE SOUTHEAST"
|
||||
|
||||
@@ -88,7 +88,7 @@ void Map14::special00() {
|
||||
ks.keycode == Common::KEYCODE_n) {
|
||||
g_events->close();
|
||||
|
||||
// TODO: The original seems to be backwards
|
||||
// Note: The original seems to be backwards
|
||||
if (ks.keycode == Common::KEYCODE_n &&
|
||||
getRandomNumber(3) == 3) {
|
||||
g_maps->_mapPos = Common::Point(15, 10);
|
||||
@@ -122,7 +122,7 @@ void Map14::special02() {
|
||||
} else if (_data[VAL3]) {
|
||||
_data[VAL3] = 0;
|
||||
} else {
|
||||
g_events->findView("View")->redraw();
|
||||
send("View", DrawGraphicMessage(65 + 6));
|
||||
|
||||
send(SoundMessage(
|
||||
STRING["maps.map14.castle"],
|
||||
@@ -130,10 +130,12 @@ void Map14::special02() {
|
||||
Map14 &map = *static_cast<Map14 *>(g_maps->_currentMap);
|
||||
if (ks.keycode == Common::KEYCODE_y) {
|
||||
g_events->close();
|
||||
map[VAL3]++;
|
||||
map[VAL3] = 0xff;
|
||||
map.updateGame();
|
||||
} else if (ks.keycode == Common::KEYCODE_n) {
|
||||
g_events->close();
|
||||
map[VAL3] = 0xff;
|
||||
map[VAL3]++;
|
||||
map.updateGame();
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Maps {
|
||||
|
||||
#define VAL1 350
|
||||
#define VAL2 118
|
||||
#define VAL3 361
|
||||
#define ITEM_ID 361
|
||||
#define GEMS 362
|
||||
|
||||
void Map15::special() {
|
||||
@@ -104,9 +104,15 @@ void Map15::special01() {
|
||||
Game::Encounter &enc = g_globals->_encounters;
|
||||
|
||||
if (_data[VAL2]) {
|
||||
send(SoundMessage(STRING["maps.map15.dragon"]));
|
||||
g_globals->_treasure._items[2] = 244;
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
SoundMessage msg(
|
||||
STRING["maps.map15.body"],
|
||||
[]() {
|
||||
g_globals->_treasure._items[2] = DRAGONS_TOOTH_ID;
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
}
|
||||
);
|
||||
msg._delaySeconds = 5;
|
||||
send(msg);
|
||||
|
||||
} else {
|
||||
_data[VAL2]++;
|
||||
@@ -148,13 +154,13 @@ void Map15::special03() {
|
||||
}
|
||||
|
||||
void Map15::special04() {
|
||||
_data[VAL3] = 250;
|
||||
_data[ITEM_ID] = PIRATES_MAP_A_ID;
|
||||
_data[GEMS] = 100;
|
||||
cove();
|
||||
}
|
||||
|
||||
void Map15::special05() {
|
||||
_data[VAL3] = 251;
|
||||
_data[ITEM_ID] = PIRATES_MAP_B_ID;
|
||||
_data[GEMS] = 200;
|
||||
cove();
|
||||
}
|
||||
@@ -165,12 +171,21 @@ void Map15::special06() {
|
||||
[](const Common::KeyState &ks) {
|
||||
if (ks.keycode == Common::KEYCODE_y) {
|
||||
g_events->close();
|
||||
g_globals->_treasure._items[2] = 233;
|
||||
g_globals->_treasure._items[2] = KINGS_PASS_ID;
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
|
||||
} else if (ks.keycode == Common::KEYCODE_n) {
|
||||
g_events->send(SoundMessage(STRING["maps.map15.percella1"]));
|
||||
g_maps->_mapPos = Common::Point(14, 2);
|
||||
updateGame();
|
||||
g_events->close();
|
||||
|
||||
SoundMessage msg(
|
||||
STRING["maps.map15.percella2"],
|
||||
[]() {
|
||||
g_maps->_mapPos = Common::Point(14, 2);
|
||||
updateGame();
|
||||
}
|
||||
);
|
||||
msg._delaySeconds = 5;
|
||||
g_events->send(msg);
|
||||
}
|
||||
}
|
||||
));
|
||||
@@ -189,7 +204,7 @@ void Map15::cove() {
|
||||
|
||||
for (uint i = 0; i < g_globals->_party.size(); ++i) {
|
||||
Character &c = g_globals->_party[i];
|
||||
int idx = c._backpack.indexOf(map[VAL3]);
|
||||
int idx = c._backpack.indexOf(map[ITEM_ID]);
|
||||
if (idx != -1) {
|
||||
c._backpack.removeAt(idx);
|
||||
g_globals->_treasure.setGold(2000);
|
||||
|
||||
@@ -94,8 +94,8 @@ void Map16::special00() {
|
||||
}
|
||||
|
||||
_data[VAL1]++;
|
||||
send(SoundMessage(STRING["maps.map16.water"],
|
||||
[](const Common::KeyState &ks) {
|
||||
SoundMessage msg(STRING["maps.map16.water"],
|
||||
[]() {
|
||||
Game::Encounter &enc = g_globals->_encounters;
|
||||
|
||||
enc.clearMonsters();
|
||||
@@ -107,15 +107,17 @@ void Map16::special00() {
|
||||
enc._flag = true;
|
||||
enc.execute();
|
||||
}
|
||||
));
|
||||
);
|
||||
msg._delaySeconds = 5;
|
||||
send(msg);
|
||||
}
|
||||
}
|
||||
|
||||
void Map16::special01() {
|
||||
send(SoundMessage(STRING["maps.map16.wheel"],
|
||||
[]() {
|
||||
// Original called sound 1 20 times. This seems excessive
|
||||
Sound::sound(SOUND_1);
|
||||
for (int i = 0; i < 20; ++i)
|
||||
Sound::sound(SOUND_1);
|
||||
|
||||
static_cast<Map16 *>(g_maps->_currentMap)->wheelSpin();
|
||||
}
|
||||
@@ -124,7 +126,7 @@ void Map16::special01() {
|
||||
|
||||
void Map16::special02() {
|
||||
_data[VAL1] = 0;
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
none160();
|
||||
}
|
||||
|
||||
void Map16::special03() {
|
||||
@@ -191,7 +193,7 @@ void Map16::wheelSpin() {
|
||||
}
|
||||
}
|
||||
|
||||
msg._lines.push_back(Line(0, i, line));
|
||||
msg._lines.push_back(Line(0, 1 + i, line));
|
||||
}
|
||||
|
||||
// Display the results
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace MM1 {
|
||||
namespace Maps {
|
||||
|
||||
#define VAL1 509
|
||||
#define VAL2 510
|
||||
#define VAL3 511
|
||||
#define COLOR 510
|
||||
#define CORRECT_ANSWERS 511
|
||||
|
||||
void Map17::special() {
|
||||
Game::Encounter &enc = g_globals->_encounters;
|
||||
@@ -70,28 +70,31 @@ void Map17::special() {
|
||||
updateGame();
|
||||
|
||||
} else {
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
none160();
|
||||
}
|
||||
}
|
||||
|
||||
void Map17::special00() {
|
||||
send(SoundMessage("maps.map17.islands"));
|
||||
send(SoundMessage(STRING["maps.map17.islands"]));
|
||||
}
|
||||
|
||||
void Map17::special01() {
|
||||
send(SoundMessage(STRING["maps.map17.bridge"],
|
||||
SoundMessage msg(STRING["maps.map17.bridge"],
|
||||
[]() {
|
||||
static_cast<Map17 *>(g_maps->_currentMap)->askQuestion();
|
||||
}
|
||||
));
|
||||
);
|
||||
|
||||
msg._largeMessage = true;
|
||||
send(msg);
|
||||
}
|
||||
|
||||
void Map17::special02() {
|
||||
if (_data[VAL3]) {
|
||||
g_globals->_treasure._items[2] = 236;
|
||||
if (_data[CORRECT_ANSWERS]) {
|
||||
g_globals->_treasure._items[2] = CORAL_KEY_ID;
|
||||
g_events->addAction(KEYBIND_SEARCH);
|
||||
} else {
|
||||
g_events->addKeypress((Common::KeyCode)211);
|
||||
none160();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +105,8 @@ void Map17::special03() {
|
||||
|
||||
void Map17::askQuestion(uint partyIndex) {
|
||||
if (partyIndex >= g_globals->_party.size()) {
|
||||
if (_data[VAL3]) {
|
||||
// Entire party has answered the question
|
||||
if (_data[CORRECT_ANSWERS]) {
|
||||
g_maps->_mapPos.y = 2;
|
||||
updateGame();
|
||||
} else {
|
||||
@@ -122,16 +126,19 @@ void Map17::askQuestion(uint partyIndex) {
|
||||
Map17 &map = *static_cast<Map17 *>(g_maps->_currentMap);
|
||||
if (ks.keycode >= Common::KEYCODE_1 &&
|
||||
ks.keycode <= Common::KEYCODE_9) {
|
||||
map[VAL2] = ks.ascii - '1';
|
||||
map[COLOR] = ks.ascii - '1';
|
||||
|
||||
Common::String line;
|
||||
Character &c = *g_globals->_currCharacter;
|
||||
int val = c._flags[2] & 0xf;
|
||||
if (!val || (val & 7) != map[VAL2]) {
|
||||
int color = c._flags[2] & 0xf;
|
||||
|
||||
// If a color hasn't been designated yet from talking to Gypsy,
|
||||
// or it has but the wrong color is selected, eradicate them
|
||||
if (!color || (color & 7) != map[COLOR]) {
|
||||
c._condition = ERADICATED;
|
||||
line = STRING["maps.map17.wrong"];
|
||||
} else {
|
||||
map[VAL3]++;
|
||||
map[CORRECT_ANSWERS]++;
|
||||
c._flags[4] |= CHARFLAG4_80;
|
||||
line = STRING["maps.map17.correct"];
|
||||
}
|
||||
@@ -142,7 +149,7 @@ void Map17::askQuestion(uint partyIndex) {
|
||||
msg2._delaySeconds = 1;
|
||||
msg2._lines.push_back(Line(0, 0, STRING["maps.map17.color"]));
|
||||
msg2._lines.push_back(Line(0, 2, STRING["maps.map17.options"]));
|
||||
msg2._lines.push_back(Line(16, 5, line));
|
||||
msg2._lines.push_back(Line(16, 6, line));
|
||||
msg2._timeoutCallback = []() {
|
||||
Map17 &map17 = *static_cast<Map17 *>(g_maps->_currentMap);
|
||||
map17.askQuestion(map17[VAL1] + 1);
|
||||
|
||||
Reference in New Issue
Block a user