1 ! Z-Tornado - Two player weather action game
3 ! Tornado is copyright (C) 2000-2002 Oliver Feiler
4 ! http://www.lionking.org/~kiza/linux/tornado
5 ! Inform version copyright (c) 2003 Sophie Frühling (sfruehling@aon.at)
7 ! This program is free software; you can redistribute it and/or modify
8 ! it under the terms of the GNU General Public License as published by
9 ! the Free Software Foundation; either version 3 of the License, or
10 ! (at your option) any later version.
12 ! This program is distributed in the hope that it will be useful,
13 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ! GNU General Public License for more details.
17 ! You should have received a copy of the GNU General Public License
18 ! along with this program. If not, see <https://www.gnu.org/licenses/>.
20 ! Grafix except weather
24 for (i = 0: i < fields: i++) {
25 print (char) snow_world->i;
26 if (i && i%screen_width == 0) new_line;
30 [ DrawUserInterface x;
32 @set_cursor 6 x; print ",___________________________________,";
33 @set_cursor 7 x; print "| Z - Tornado |";
34 @set_cursor 8 x; print "| s = Snow r = Rain |";
35 @set_cursor 9 x; print "| h = Hail l = Lightning |";
36 @set_cursor 10 x; print "| t = Tornado c = Current Scores |";
37 @set_cursor 11 x; print "| q = Quit o = Highscores |";
38 @set_cursor 12 x; print "+-----------------------------------+";
39 @set_cursor screen_height 1;
42 [ ClearUserInterface x y;
44 for (y = 6: y <= 12: y++) {
45 @set_cursor y x; spaces (37);
51 @set_cursor 6 x; print ",___________________________________,";
52 @set_cursor 7 x; print "| |";
53 @set_cursor 8 x; print "| |";
54 @set_cursor 9 x; print "| |";
55 @set_cursor 10 x; print "| |";
56 @set_cursor 11 x; print "+-----------------------------------+";
59 [ ClearDialogWindow x y;
60 x = dialog_x - 2; y = 6;
61 for (y = 6: y <= 11: y++) {
62 @set_cursor y x; spaces (37);
69 PrintPlayerName(player1, player1_name);
70 x = screen_width/2 - 13;
72 if (player1_left < 100) print " ";
73 if (player1_left < 10) print " ";
74 print player1_left; print "%";
75 print " | Windspeed: ";
76 if (windspeed >= 0) print " ";
77 print windspeed; print " | ";
78 if (player2_left < 100) print " ";
79 if (player2_left < 10) print " ";
80 print player2_left; print "%";
81 x = screen_width - 16;
83 PrintPlayerName(player2, player2_name);
84 @set_cursor screen_height 1;
87 [ PrintPlayerName current_player the_array i;
88 if (current_player) print "*";
90 for (i = 2: i <= the_array->1 + 1: i++)
91 print (char) the_array->i;
94 [ DrawCurrentScores x;
98 PrintPlayerName(0, player1_name);
99 @set_cursor 8 dialog_x;
100 print (longnr) player1_score;
102 PrintPlayerName(0, player2_name);
103 @set_cursor 10 dialog_x;
104 print (longnr) player2_score;
107 [ DrawHighScores x y;
109 @set_cursor 5 x; print ",___________________________________,";
110 @set_cursor 6 x; print "| Highscores |";
111 for (y = 7: y < 17: y++) {
113 @set_cursor y x; print "|";
114 @set_cursor y dialog_x;
115 PrintHighScoreName(y - 7);
118 PrintHighScoreNumber(y - 7);
120 @set_cursor y x; print "|";
123 @set_cursor 17 x; print "+-----------------------------------+";
126 [ ClearHighScoreWindow x y;
128 for (y = 5: y <= 17: y++) {
134 [ DrawWinningScreen x;
136 @set_cursor 7 x; print "Player ";
137 if (player1_left) print 1; else print 2;
140 @set_cursor 8 x; print "Your score is ";
141 if (player1_left) print (longnr) player1_score;
142 else print (longnr) player2_score;
145 @set_cursor 9 x; print "Do you want to play again?";
147 @set_cursor 10 x; print "(y/n)";
148 @set_cursor screen_height 1;
151 ! ----------- Extra-game information ---------------
154 @split_window 1; @set_window 1;
155 @set_cursor 1 1; style reverse;
156 spaces (0->33); x = (0->33)/2 - 10;
158 print "Z - T O R N A D O";
159 style roman; @set_window 0;
165 print "^^This is a fairly straight port of the C version of ~Tornado~,",
166 " release 1.2, written by Oliver Feiler and Rene Puls in or about",
167 " 2000, which in turn appears to be the port of a C64 game of the",
169 print "The screen is something between 64 and 80 by 24, instead of 80 x 25.",
170 " There is, of course, no network support, and no demo version. (But",
171 " you can emulate the latter by having the computer play against",
172 " itself. See (I)nstructions for details.)^";
173 print "Apart from that, it should work just like the C version, except that",
174 " it is a little slower, because I can't pause the game for less than",
175 " 1/10 of a second.^^";
176 print "Release 2 features a few cosmetic changes -- it now puts the cursor",
177 " outside the playfield while drawing the weather, which looks a lot",
178 " better -- and bugfixes: most importantly, the tornado used to erase",
179 " completely wrong stuff; there were also a few bugs that crept up when",
180 " piling up snow too high.^^";
181 print "Z-Tornado was written using Inform (http://www.inform-fiction.org),",
182 " and mainly tested on Unix Frotz 2.43.^^";
183 print "Thanks to Kevin Bracey (SameGame.inf), Torbj@:orn Andersson (robots.",
184 "inf) and Julian Arnold (z-life.inf) for inspiration and",
185 " encouragement. (To quote from ~SameGame.inf~, ~Anyone looking at",
186 " this source file for inspiration probably needs their head",
187 " examined.~) Thank you. ;) There are numerous other Z-Machine abuse",
188 " source files, but these were the ones I looked at.^^";
189 print "Thanks to Jim Fisher (http://www.onyxring.org) for the tip on",
190 " randomising random().^^";
191 print "Since the original code was released under GPL, this game is",
192 " released under GPL as well, which means there is ABSOLUTELY NO",
193 " WARRANTY OF ANY KIND, and you can get the messy source code,",
194 " too, from the games/source/inform directory of http://www.",
195 "ifarchive.org or (preferably) one of its mirrors.^^";
196 print "For more information about ~Tornado~, have a look at the webpage at",
197 " http://www.lionking.org/@@126kiza/linux/tornado/.^^";
198 print "[Hit any key]^";
202 ! This is pretty much copy + paste from the man page, plus some more
206 print "^From the "; style bold; print "Tornado"; style roman;
207 print " man page:^^";
208 print "~The object of the game "; style bold; print "tornado"; style roman;
209 print " is to destroy your opponent's house with the powers of rain, snow,",
210 " hail, lightning and the tornado.^^";
211 print "~After the game is started the two players enter their names. If you",
212 " leave the field blank the computer will take the player's part. You",
213 " can see two houses with each player's name in the corner below it and",
214 " a cloud on top of the screen, the sky. The player whose turn it is",
215 " has an asterisk "; style bold; print "*"; style roman;
216 print " next to his name.^^";
217 print "~From the menu in the center of the screen each player now picks a",
218 " weather phenomenon. A second box will appear where you can enter",
219 " the aim you would like to use. You may have noticed the value ";
220 style underline; print "Windspeed"; style roman;
221 print " in the mid bottom of the screen by now. Ideally you would take aim ";
222 style bold; print "2"; style roman;
223 print " if windspeed is "; style bold; print "-2"; style roman;
224 print " for example and then your rain/hail/snow/tornado would go straight",
225 " down the cloud. However, it's chosen randomly if the rain appears on",
226 " the left side of the cloud or the right side, so aiming might be not",
227 " that easy as it looks like.^^";
228 print "~If you hit your opponent's house (or your own) the percentage counter",
229 " will decrease depending on how much damage you did. If the counter is",
230 " down to "; style bold; print "0%"; style roman;
231 print " the player loses the game.^^";
232 print "~The keys you can use in the game are:^";
233 style bold; print "s"; style roman; print " selects snow^";
234 print " Snow is a defensive weapon. If you hit a house with^",
235 " snow, it creates a coating that hail cannot destroy.^",
236 " Only rain can be used to destroy that layer of snow.^",
237 " Lightning and tornado are not effected.^";
238 style bold; print "r"; style roman; print " selects rain^";
239 print " Destroys one row of the house. Can be used to melt a^",
241 style bold; print "h"; style roman; print " selects hail^";
242 print " This will destroy two rows of the house, but cannot^",
243 " destroy a snow coating.^";
244 style bold; print "l"; style roman; print " selects lightning^";
245 print " Splits the house into two pieces. Not influenced by^",
247 style bold; print "t"; style roman; print " selects tornado^";
248 print " Not as effective as lightning but the tornado goes^",
249 " straight to the bottom of the house as well.^";
250 style bold; print "q"; style roman; print " quits the game^";
251 style bold; print "o"; style roman; print " show the highscores^";
252 style bold; print "c"; style roman; print " show current player scores~^";
253 print "[End of quote.]^^";
254 print "To run the game in ~demo~ mode, just don't fill in the players'",
255 " names, so the computer has to play against itself. (It can still",
256 " get a highscore.) There is currently no way to stop it during a",
257 " game, though, short of quitting the interpreter. Sorry for the",
259 print "The ~colour~ referred to by the menu is white on black. If your",
260 " interpreter doesn't support colour like it should (e.g. Unix Frotz",
261 " 2.32) just toggle it off. If your interpreter doesn't support",
262 " colour at all, you won't notice.^^";
263 print "If your interpreter doesn't support timed input properly, I can't",
264 " help you, sorry. You can hit some key repeatedly to make the game",
265 " go on, but it won't be very much fun, I guess.^^";
266 print "Note that you can't change the screen size after starting up, so",
269 print "[Hit any key]^";
275 print "Z - T O R N A D O";
277 print "^A two-player weather action game^";
278 print "Yet another abuse of the Z-Machine^";
279 print "Copyright (c) 2003 by Sophie Fr@:uhling (sfruehling@@64aon.at)^";
280 print "A port of the C port of the C64 game ~Tornado~^";
281 print "The C version is copyright (c) 2000-2002 by Oliver Feiler^";
282 print "Release ", (0-->1) & $03ff, " / Serial number ";
283 for (i = 18: i < 24: i++) print (char) 0->i;
284 print " / Inform v"; inversion; new_line;
289 print "^^^^^^^^^^^^^^^^^^^";
290 i = 0->33; if (i > 30) i = (i - 30)/2;
291 style bold; font off; spaces(i);
292 print " Z - T O R N A D O^";
293 style roman; new_line; spaces(i);
294 print " [Please press a key]^";
297 " ,/+++*++***+****++++++***+@@92, "
298 " (*+++*****+++++***+++****++)"
299 " `@@92++******+*++*++*****+++*/'"
300 " `@{B0}*,.,*@{B0}'`@{B0}*,.,*@{B0}`@{B0}*,.,*@{B0}'"
303 " /-------'|`-@@92 / / / / /"
304 " /'/////////////`@@92 / / / / /"
305 " |---------------| / / / / /"
306 " |-,_____,--,__,-| / / / / /"
307 " |-|__|__|--|++|-| / / / / /"
308 " |-|__|__|--|o+|-| / / / / /"
309 " |__________|__|_| / / / / /";