Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
/* $NetBSD: phantglobs.c,v 1.5 1999/09/08 21:17:54 jsm Exp $ */
|
1995-03-24 06:58:08 +03:00
|
|
|
|
1994-10-22 00:19:39 +03:00
|
|
|
/*
|
|
|
|
* phantglobs.c - globals for Phantasia
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "include.h"
|
|
|
|
|
|
|
|
double Circle; /* which circle player is in */
|
|
|
|
double Shield; /* force field thrown up in monster battle */
|
|
|
|
|
|
|
|
bool Beyond; /* set if player is beyond point of no return */
|
|
|
|
bool Marsh; /* set if player is in dead marshes */
|
|
|
|
bool Throne; /* set if player is on throne */
|
|
|
|
bool Changed; /* set if important player stats have changed */
|
|
|
|
bool Wizard; /* set if player is the 'wizard' of the game */
|
|
|
|
bool Timeout; /* set if short timeout waiting for input */
|
|
|
|
bool Windows; /* set if we are set up for curses stuff */
|
|
|
|
bool Luckout; /* set if we have tried to luck out in fight */
|
|
|
|
bool Foestrikes; /* set if foe gets a chance to hit in battleplayer() */
|
|
|
|
bool Echo; /* set if echo input to terminal */
|
|
|
|
|
|
|
|
int Users; /* number of users currently playing */
|
|
|
|
int Whichmonster; /* which monster we are fighting */
|
|
|
|
int Lines; /* line on screen counter for fight routines */
|
|
|
|
|
|
|
|
jmp_buf Fightenv; /* used to jump into fight routine */
|
|
|
|
jmp_buf Timeoenv; /* used for timing out waiting for input */
|
|
|
|
|
|
|
|
long Fileloc; /* location in file of player statistics */
|
|
|
|
|
1998-07-27 05:12:35 +04:00
|
|
|
const char *Login; /* pointer to login of player */
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const char *Enemyname; /* pointer name of monster/player we are battling*/
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
struct player Player; /* stats for player */
|
|
|
|
struct player Other; /* stats for another player */
|
|
|
|
|
|
|
|
struct monster Curmonster;/* stats for current monster */
|
|
|
|
|
|
|
|
struct energyvoid Enrgyvoid;/* energy void buffer */
|
|
|
|
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const struct charstats *Statptr;/* pointer into Stattable[] */
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* lookup table for character type dependent statistics */
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const struct charstats Stattable[7] = {
|
1994-10-22 00:19:39 +03:00
|
|
|
/* MAGIC USER */
|
1997-10-13 06:18:06 +04:00
|
|
|
{
|
|
|
|
15.0, 200.0, 18.0, 175.0, 10,
|
|
|
|
{30, 6, 0.0}, {10, 6, 2.0}, {50, 51, 75.0},
|
|
|
|
{30, 16, 20.0}, {60, 26, 6.0}, {5, 5, 2.75}
|
|
|
|
},
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* FIGHTER */
|
1997-10-13 06:18:06 +04:00
|
|
|
{
|
|
|
|
10.0, 110.0, 15.0, 220.0, 20,
|
|
|
|
{30, 6, 0.0}, {40, 16, 3.0}, {30, 21, 40.0},
|
|
|
|
{45, 26, 30.0}, {25, 21, 3.0}, {3, 4, 1.5}
|
|
|
|
},
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* ELF */
|
1997-10-13 06:18:06 +04:00
|
|
|
{
|
|
|
|
12.0, 150.0, 17.0, 190.0, 13,
|
|
|
|
{32, 7, 0.0}, {35, 11, 2.5}, {45, 46, 65.0},
|
|
|
|
{30, 21, 25.0}, {40, 26, 4.0}, {4, 4, 2.0}
|
|
|
|
},
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* DWARF */
|
1997-10-13 06:18:06 +04:00
|
|
|
{ 7.0, 80.0, 13.0, 255.0, 25,
|
|
|
|
{25, 6, 0.0}, {50, 21, 5.0}, {25, 21, 30.0},
|
|
|
|
{60, 41, 35.0}, {20, 21, 2.5}, {2, 4, 1.0}
|
|
|
|
},
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* HALFLING */
|
1997-10-13 06:18:06 +04:00
|
|
|
{
|
|
|
|
11.0, 80.0, 10.0, 125.0, 40,
|
|
|
|
{34, 0, 0.0}, {20, 6, 2.0}, {25, 21, 30.0},
|
|
|
|
{55, 36, 30.0}, {40, 36, 4.5}, {1, 4, 1.0}
|
|
|
|
},
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* EXPERIMENTO */
|
1997-10-13 06:18:06 +04:00
|
|
|
{ 9.0, 90.0, 16.0, 160.0, 20,
|
|
|
|
{27, 0, 0.0}, {25, 0, 0.0}, {100, 0, 0.0},
|
|
|
|
{35, 0, 0.0}, {25, 0, 0.0}, {2, 0, 0.0}
|
|
|
|
},
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* SUPER */
|
1997-10-13 06:18:06 +04:00
|
|
|
{
|
|
|
|
15.0, 200.0, 10.0, 225.0, 40,
|
|
|
|
{38, 0, 0.0}, {65, 0, 5.0}, {100, 0, 75.0},
|
|
|
|
{80, 0, 35.0}, {85, 0, 6.0}, {9, 0, 2.75}
|
|
|
|
}
|
|
|
|
};
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
/* menu of items for purchase */
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const struct menuitem Menu[] = {
|
1997-10-13 06:18:06 +04:00
|
|
|
{"Mana", 1},
|
|
|
|
{"Shield", 5},
|
|
|
|
{"Book", 200},
|
|
|
|
{"Sword", 500},
|
|
|
|
{"Charm", 1000},
|
|
|
|
{"Quicksilver", 2500},
|
|
|
|
{"Blessing", 1000},
|
|
|
|
};
|
1994-10-22 00:19:39 +03:00
|
|
|
|
|
|
|
FILE *Playersfp; /* pointer to open player file */
|
|
|
|
FILE *Monstfp; /* pointer to open monster file */
|
|
|
|
FILE *Messagefp; /* pointer to open message file */
|
|
|
|
FILE *Energyvoidfp; /* pointer to open energy void file */
|
|
|
|
|
|
|
|
char Databuf[SZ_DATABUF]; /* a place to read data into */
|
|
|
|
|
|
|
|
/* some canned strings for messages */
|
Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).
Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-09 01:17:44 +04:00
|
|
|
const char Illcmd[] = "Illegal command.\n";
|
|
|
|
const char Illmove[] = "Too far.\n";
|
|
|
|
const char Illspell[] = "Illegal spell.\n";
|
|
|
|
const char Nomana[] = "Not enought mana for that spell.\n";
|
|
|
|
const char Somebetter[] = "But you already have something better.\n";
|
|
|
|
const char Nobetter[] = "That's no better than what you already have.\n";
|