|
|
1.1 root 1: /*
2: * phantglobs.c - globals for Phantasia
3: */
4:
5: #include "include.h"
6:
7: double Circle; /* which circle player is in */
8: double Shield; /* force field thrown up in monster battle */
9:
10: bool Beyond; /* set if player is beyond point of no return */
11: bool Marsh; /* set if player is in dead marshes */
12: bool Throne; /* set if player is on throne */
13: bool Changed; /* set if important player stats have changed */
14: bool Wizard; /* set if player is the 'wizard' of the game */
15: bool Timeout; /* set if short timeout waiting for input */
16: bool Windows; /* set if we are set up for curses stuff */
17: bool Luckout; /* set if we have tried to luck out in fight */
18: bool Foestrikes; /* set if foe gets a chance to hit in battleplayer() */
19: bool Echo; /* set if echo input to terminal */
20:
21: int Users; /* number of users currently playing */
22: int Whichmonster; /* which monster we are fighting */
23: int Lines; /* line on screen counter for fight routines */
24: #ifdef OK_TO_PLAY
25: int Okcount; /* counter for checking ok_to_play */
26: #endif
27:
28: jmp_buf Fightenv; /* used to jump into fight routine */
29: jmp_buf Timeoenv; /* used for timing out waiting for input */
30:
31: long Fileloc; /* location in file of player statistics */
32:
33: char *Login; /* pointer to login of player */
34: char *Enemyname; /* pointer name of monster/player we are battling*/
35:
36: struct player Player; /* stats for player */
37: struct player Other; /* stats for another player */
38:
39: struct monster Curmonster;/* stats for current monster */
40:
41: struct energyvoid Enrgyvoid;/* energy void buffer */
42:
43: struct charstats *Statptr;/* pointer into Stattable[] */
44:
45: /* lookup table for character type dependent statistics */
46: struct charstats Stattable[7] =
47: {
48: /* MAGIC USER */
49: /* max brains, max mana, weakness, gold tote, ring duration */
50: 15.0, 200.0, 18.0, 175.0, 10,
51: /* quickness strength mana energy brains magic lvl */
52: 30, 6, 0.0, 10, 6, 2.0, 50,51,75.0, 30,16,20.0, 60,26, 6.0, 5, 5,2.75,
53:
54: /* FIGHTER */
55: /* max brains, max mana, weakness, gold tote, ring duration */
56: 10.0, 110.0, 15.0, 220.0, 20,
57: /* quickness strength mana energy brains magic lvl */
58: 30, 6, 0.0, 40,16, 3.0, 30,21,40.0, 45,26,30.0, 25,21, 3.0, 3, 4, 1.5,
59:
60: /* ELF */
61: /* max brains, max mana, weakness, gold tote, ring duration */
62: 12.0, 150.0, 17.0, 190.0, 13,
63: /* quickness strength mana energy brains magic lvl */
64: 32, 7, 0.0, 35,11, 2.5, 45,46,65.0, 30,21,25.0, 40,26, 4.0, 4, 4, 2.0,
65:
66: /* DWARF */
67: /* max brains, max mana, weakness, gold tote, ring duration */
68: 7.0, 80.0, 13.0, 255.0, 25,
69: /* quickness strength mana energy brains magic lvl */
70: 25, 6, 0.0, 50,21, 5.0, 25,21,30.0, 60,41,35.0, 20,21, 2.5, 2, 4, 1.0,
71:
72: /* HALFLING */
73: /* max brains, max mana, weakness, gold tote, ring duration */
74: 11.0, 80.0, 10.0, 125.0, 40,
75: /* quickness strength mana energy brains magic lvl */
76: 34, 0, 0.0, 20, 6, 2.0, 25,21,30.0, 55,36,30.0, 40,36, 4.5, 1, 4, 1.0,
77:
78: /* EXPERIMENTO */
79: /* max brains, max mana, weakness, gold tote, ring duration */
80: 9.0, 90.0, 16.0, 160.0, 20,
81: /* quickness strength mana energy brains magic lvl */
82: 27, 0, 0.0, 25, 0, 0.0, 100,0, 0.0, 35, 0, 0.0, 25, 0, 0.0, 2, 0, 0.0,
83:
84: /* SUPER */
85: /* max brains, max mana, weakness, gold tote, ring duration */
86: 15.0, 200.0, 10.0, 225.0, 40,
87: /* quickness strength mana energy brains magic lvl */
88: 38, 0, 0.0, 65, 0, 5.0, 100,0,75.0, 80, 0,35.0, 85, 0, 6.0, 9, 0,2.75
89: };
90:
91: /* menu of items for purchase */
92: struct menuitem Menu[] =
93: {
94: "Mana", 1,
95: "Shield", 5,
96: "Book", 200,
97: "Sword", 500,
98: "Charm", 1000,
99: "Quicksilver", 2500,
100: "Blessing", 1000,
101: };
102:
103: FILE *Playersfp; /* pointer to open player file */
104: FILE *Monstfp; /* pointer to open monster file */
105: FILE *Messagefp; /* pointer to open message file */
106: FILE *Energyvoidfp; /* pointer to open energy void file */
107:
108: char Databuf[SZ_DATABUF]; /* a place to read data into */
109:
110: /* edit these path definitions to let files reside elsewhere */
111: char Monstfile[] = DEST/monsters"; /* monster database */
112: char Peoplefile[] = DEST/characs"; /* player database */
113: char Gameprog[] = DESTR/phantasia"; /* game binary */
114: char Messfile[] = DEST/mess"; /* player to player messages */
115: char Lastdead[] = DEST/lastdead"; /* data on last player killed */
116: char Helpfile[] = DEST/phant.help"; /* manual pages */
117: char Motdfile[] = DEST/motd"; /* message from 'wizard' */
118: char Goldfile[] = DEST/gold"; /* gold collected in taxes */
119: char Voidfile[] = DEST/void"; /* energy void database */
120: char Scorefile[] = DEST/scoreboard"; /* hi score database */
121: #ifdef ENEMY
122: char Enemyfile[] = DEST/enemy"; /* restricted account database */
123: #endif
124:
125: /* some canned strings for messages */
126: char Illcmd[] = "Illegal command.\n";
127: char Illmove[] = "Too far.\n";
128: char Illspell[] = "Illegal spell.\n";
129: char Nomana[] = "Not enought mana for that spell.\n";
130: char Somebetter[] = "But you already have something better.\n";
131: char Nobetter[] = "That's no better than what you already have.\n";
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.