/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
*/
/* [Alternate Name: Level Subsystem/Script Data]
* --- Story File ---
* A story file (as defined in story.h) is a set of ROM
* data that describes the properties of a level. This includes
* the coordinates for each room, the doors in the level,
* the torches, objects, monsters, etc. It also included the string
* data in the source code, but technically it was writing those
* strings to a separate string bank, so they weren't contiguous
* with the story files (sometimes?). These story files are read in when loading
* a new level, and are used to construct the room object, the monster
* objects, and everything in the rooms.
*/
/* These are the UNIVAT for each Story entry
UNIVAT 1024,480, 1152, 464, \-1, -1, zip,level1Ladders, rooma, 704/64, 544/32\
UNIVAT 304, 448, 472+32, 500+16, \-1, -1, zip,level12Ladders, -1, 0, 0\
UNIVAT 600, 450, 560, 598, \-1, r2.b+(16*r2.a), zip,level3Ladders, r2.b, 640/64, 576/32\
UNIVAT 120, 540, 188, 584, \-1, -1, zip,level4Ladders, -1, 0, 0\
UNIVAT 64, 128, 128, 128+32, \-1, -1, zip,level5Ladders, -1, 1088/64, 928/32\
UNIVAT 768, 224, 896, 288-16, \-1, -1, zip,level5Ladders, -1, 1088/64, 928/32\
UNIVAT 896, 672+64, 960, 832-16, \-1, -1, zip,level6Ladders, -1, 0, 0\
UNIVAT 688, 800, 912-64, 888-32, \-1, -1, zip,level7Ladders, -1, 1088/64, 928/32\
UNIVAT 64, 704, 64+96, 704+64, \-1, -1, zip,level8Ladders, -1, 0, 0\
*/
#include "immortal/immortal.h"
namespace Immortal {
void ImmortalEngine::initStoryStatic() {
Common::Array s{"#" + Common::String(kSwordBigFrame) + "sword@",
"You find an Elven sword of&agility. Take it?@",
"Search the bones?%",
"}The sword permanently endows you with Elven agility and quickness in combat.@",
"}You notice something that looks wet and green under the pile. Search further?%",
"#" + Common::String(kBagBigFrame) + " dust@",
"}You find a bag containing Dust of Complaisance.&@",
"}Drop the bait on the ground here?%",
"}To use this dust, you throw it in the air. Do that here?%",
"_}Don+t bother me, I+m cutting a gem. Yes, you need it. No, you can+t have it. I wouldn+t give it to anyone, least of all you. Go away. ]]]]=",
"_}Let me help you. Please take this gem. No, really, I insist. Take it and go with my blessings. Good luck. ]]]]=",
"#" + Common::String(kCarpetBigFrame) + "carpet@",
"#" + Common::String(kBombBigFrame) + " bomb@",
"A gas bomb that goblins&use to paralyze trolls.&@",
"Take it?<>@",
"%",
" other@",
"#" + Common::String(kKeyBigFrame) + " key@",
"#" + Common::String(kKeyBigFrame) + " key@",
"A key to a chest.&@",
"The chest is open. Examine&contents?%",
"Put it on?%",
"Drop it?%",
"It+s unlocked. Open it?%",
"It+s locked but you have&the key. Open it?%",
"It+s locked and you don+t&have the key.@",
"The lock, triggered by a&complicated set of latches,&is unfamiliar to you.@",
"#" + Common::String(kGoldBigFrame) + "$0 gold@",
"You find $0 gold pieces.&&^#" + Common::String(kPileFrame) + "@",
"@",
"You can+t plant them on&stone tiles.@",
"It+s locked but you are&able to unlock it with&the key.@",
"_}The king is not dead, but the poison is taking effect. When he sees you, he attempts to speak:[(Give me water... the fountain... I give you... information... peace...+[Give him water?%",
"_}You dont have any water to give him. He mumbles something. Then silence... You find a key on his body.]]]]=",
"_}He mumbles something. Then silence... You find a key on his body.]]]]=",
"_}I+ll tell you how to... next level... past slime... three jewels... slime... rock becomes... floor... right, left, center of the... [Then silence. His hand opens, releasing a key.]]]]=",
"You find a door key.&@",
"You find a note.&@",
"#" + Common::String(kNoteBigFrame) + "note@",
"He+s dead.&Look for possessions?%",
"You don+t have it. Check&your inventory.@",
"Game Over&&Play again?@",
"Congratulations!&&Play again?@",
"You find a bag of bait.&@",
"#" + Common::String(kBagBigFrame) + " bait@",
"You find a stone. @",
"#" + Common::String(kStoneBigFrame) + " stone@",
"You find a red gem.&@",
"#" + Common::String(kGemBigFrame) + " gem@",
"You find a scroll with&fireball spells.&@",
"#" + Common::String(kScrollBigFrame) + "$ shots@",
"You find a map warning&you about pit traps.&@",
"#" + Common::String(kMapBigFrame) + " map@",
"#" + Common::String(kVaseBigFrame) + " oil@",
"You apply the oil but notice&as you walk that the leather&is drying out quickly.@",
"}You discover a scroll with a charm spell to use on will o+ the wisps.&@",
"#" + Common::String(kScrollBigFrame) + " charm@",
"}This charms the will o+ the wisps to follow you. Read the spell again to turn them against your enemies.@",
"}It looks like water. Drink it?%",
"Drink it?%",
"}It works! You are much stronger.]]]=",
"}It looks like it has green stuff inside. Open it?%",
"Now this will take&effect when you press the&fire button.@",
"You find a potion,&Magic Muscle.&@",
"#" + Common::String(kVaseBigFrame) + " potion@",
"You find a bottle.&@",
"#" + Common::String(kVaseBigFrame) + " bottle@",
"#" + Common::String(kRingBigFrame) + "Protean@",
"You find a Protean Ring.&@",
"You find a troll ritual knife,&used to declare a fight to&the death. @",
"#" + Common::String(kKnifeBigFrame) + " knife@",
"_}It is a fine woman+s garment. Folded inside is a ring with the words,[`To Ana, so harm will never find you. -Your loving father, Dunric.+&@",
"You find a small, well&crafted ring. @",
"#" + Common::String(kRingBigFrame) + " gift@",
"#" + Common::String(kRingBigFrame) + " Ana+s@",
"_}She is hurt and upset when she finds you don+t have her ring or won+t give it to her. She scurries back into the hole. The hole is too small for you to follow.&@",
"_}`Sir, can you help me,+ the girl pleads. `I was kidnapped and dragged down here. All the man would say is `Mordamir+s orders.+[I ~" + Common::String(kStrGive2),
"escaped using a ring my father gave me, but now I+ve lost it. Did you find it?+%",
"_}We have met before, old man. Do you remember? Because you helped me, you may pass. But I warn you, we are at war with the trolls.[Over this ladder, across the spikes, is troll territory. Very dangerous.@",
"_}You are an impostor!]]]]=",
"_}Old man, do you remember me? I am king of the goblins. You didn+t give me the water. You left me to die after you took the key from me. Now you will pay.]]]]=",
"_}You quickly fall into a deep, healing sleep...[Vivid images of a beautiful enchanted city pass by. All the city people are young and glowing. Fountains fill the city, and the splash and ~" + Common::String(kStrDream1P2),
"sparkle of water is everywhere...[Suddenly the images go black. A face appears... Mordamir!]][ ~" + Common::String(kStrDream1P3),
"He is different from how you remember him. His gentle features are now withered. His kind eyes, now cold and sunken, seem to look through you with a dark, penetrating stare. You wake rejuvenated, but disturbed.]]]]]=",
"_}Here, take this ring in return. [I don+t know if it will help, but I heard the unpleasant little dwarf say, (Clockwise, three rings around the triangle.+[Could that be a clue to his exit puzzle? I must go. Goodbye.]]]]=",
"#" + Common::String(kSackBigFrame) + " spores@",
"You find a sack of bad&smelling spores.&@",
"Please insert play disk.@",
"New game?%",
"Enter certificate:&-=",
"Invalid certificate.@",
"End of level!&Here is your certificate:&&=",
"&@",
"\\ Electronic Arts presents&& The Immortal&&&& 1990 Will Harvey|]]]]]]]]\\]=",
" written by&& Will Harvey& Ian Gooding& Michael Marcantel& Brett G. Durrett& Douglas Fulton|]]]]]]]/=",
"_}Greetings, friend! Come, I+ve got something you need. These parts are plagued with slime.[You can+t venture safely without my slime oil for boots, a bargain at only 80 gold pieces.%",
"_}All right, 60 gold pieces for my oil. Rub it on your boots and slime won+t touch you. 60, friend.%",
"This room doesn+t resemble&any part of the map.@",
"This room resembles part&of the map.@"};
_strPtrs = s;
Common::Array cyc0{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1};
Common::Array cyc1{15, 16, 17, 18, 19, 20, 21, 22, -1};
Common::Array cyc2{0, 1, 2, -1};
Common::Array cyc3{3, 4, 5, -1};
Common::Array cyc4{6, 7, 8, 9, 10, -1};
Common::Array cyc5{11, 12, 13, 14, 15, -1};
Common::Array cyc6{16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, -1};
Common::Array cyc7{0, 1, 2, 3, 4, -1};
Common::Array cyc8{5, 1 + 5, 2 + 5, 3 + 5, 4 + 5, -1};
Common::Array cyc9{10, 1 + 10, 2 + 10, 3 + 10, 4 + 10, -1};
Common::Array cyc10{15, 1 + 15, 2 + 15, 3 + 15, 4 + 15, -1};
Common::Array cyc11{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, -1};
Common::Array cyc12{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1};
Common::Array cyc13{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, -1};
Common::Array cyc14{31, 32, 33, 32, 34, 35, 36, 35, 37, 38, 39, 38, 40, 41, 42, 41, 43, 44, 45, 44, 46, 47, 48, 47, 49, 50, 51, 50, 52, 53, 54, 53, -1};
Common::Array cyc15{55, -1};
Common::Array cyc16{63, 64, 65, 66, 63, 64, 65, 66, 63, 64, 65, 66, 63, 64, 65, 66, 63, 64, 65, 66, 63, 64, 65, 66, 63, 64, 65, 66, 63, 64, 65, 66, -1};
Common::Array cyc17{0, 1, 0, -1};
Common::Array cyc18{0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 1, -1};
Common::Array cyc19{0, 0, 1, 2, 13, 14, 15, 16, 4, 2, 3, -1};
Common::Array cyc20{0, 1, 2, 3, 20, 21, 22, 23, 24, 25, 26, 27, 5, 4, 3, -1};
Common::Array cyc21{0, 1, 2, 3, -1};
Common::Array cyc22{0, 17, 18, 19, 3, -1};
Common::Array cyc23{0, 1, -1};
Common::Array cyc24{28, 28, 28, 28, -1};
Common::Array cyc25{15, 16, 15, 16, 15, 1 + 15, 1 + 15, -1};
Common::Array cyc26{10 + 15, 11 + 15, 12 + 15, 13 + 15, 14 + 15, 15 + 15, 16 + 15, -1};
Common::Array cyc27{2 + 15, 3 + 15, 4 + 15, 5 + 15, -1};
Common::Array cyc28{6 + 15, 7 + 15, 8 + 15, 9 + 15, -1};
Common::Array cyc29{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1};
Common::Array cyc30{0, 1, 2, 3, 3, 3, 3, 4, 5, 6, -1};
Common::Array cyc31{0, 1, 2, 3, 4, 5, 6, 7, 8, -1};
Common::Array c{SCycle(kBubble, false, cyc0), SCycle(kBubble, false, cyc1),
SCycle(kSpark, false, cyc2), SCycle(kSpark, false, cyc3),
SCycle(kSpark, false, cyc4), SCycle(kSpark, false, cyc5), SCycle(kSpark, false, cyc6),
SCycle(kPipe, false, cyc7), SCycle(kPipe, false, cyc8),
SCycle(kPipe, false, cyc9), SCycle(kPipe, false, cyc10),
SCycle(kAnaVanish, false, cyc11), SCycle(kAnaGlimpse, false, cyc12),
SCycle(kKnife, true, cyc13),
SCycle(kSpark, true, cyc14), SCycle(kSpark, true, cyc15), SCycle(kSpark, true, cyc16),
SCycle(kBigBurst, false, cyc17),
SCycle(kFlame, false, cyc18), SCycle(kFlame, false, cyc19), SCycle(kFlame, false, cyc20),
SCycle(kFlame, false, cyc21), SCycle(kFlame, false, cyc22), SCycle(kFlame, false, cyc23),
SCycle(kFlame, false, cyc24),
SCycle(kCandle, false, cyc25), SCycle(kCandle, false, cyc26), SCycle(kCandle, false, cyc27),
SCycle(kCandle, false, cyc28), SCycle(kCandle, false, cyc29),
SCycle(kSink, false, cyc30),
SCycle(kNorlacDown, false, cyc31)};
_cycPtrs = c;
Common::Array m{};
_motivePtrs = m;
Common::Array d{};
_damagePtrs = d;
Common::Array