1235368Sgnn/* $NetBSD: phantstruct.h,v 1.4 2004/04/07 17:46:47 ross Exp $ */ 2235368Sgnn 3235368Sgnn#define bool char 4235368Sgnn/* phbool is used when we need this version of bool after <curses.h>. */ 5235368Sgnn#define phbool char 6235368Sgnn 7235368Sgnn/* 8235368Sgnn * phantstruct.h - structure definitions for Phantasia 9235368Sgnn */ 10235368Sgnn 11235368Sgnnstruct player /* player statistics */ 12235368Sgnn { 13235368Sgnn double p_experience; /* experience */ 14235368Sgnn double p_level; /* level */ 15235368Sgnn double p_strength; /* strength */ 16235368Sgnn double p_sword; /* sword */ 17235368Sgnn double p_might; /* effect strength */ 18235368Sgnn double p_energy; /* energy */ 19235368Sgnn double p_maxenergy; /* maximum energy */ 20235368Sgnn double p_shield; /* shield */ 21235368Sgnn double p_quickness; /* quickness */ 22235368Sgnn double p_quksilver; /* quicksilver */ 23235368Sgnn double p_speed; /* effective quickness */ 24235368Sgnn double p_magiclvl; /* magic level */ 25235368Sgnn double p_mana; /* mana */ 26235368Sgnn double p_brains; /* brains */ 27235368Sgnn double p_poison; /* poison */ 28235368Sgnn double p_gold; /* gold */ 29235368Sgnn double p_gems; /* gems */ 30235368Sgnn double p_sin; /* sin */ 31235368Sgnn double p_x; /* x coord */ 32235368Sgnn double p_y; /* y coord */ 33235368Sgnn double p_1scratch, 34235368Sgnn p_2scratch; /* variables used for decree, player battle */ 35235368Sgnn 36235368Sgnn struct 37235368Sgnn { 38235368Sgnn short ring_type; /* type of ring */ 39235368Sgnn short ring_duration; /* duration of ring */ 40235368Sgnn bool ring_inuse; /* ring in use flag */ 41235368Sgnn } p_ring; /* ring stuff */ 42235368Sgnn 43235368Sgnn long p_age; /* age of player */ 44235368Sgnn 45235368Sgnn int p_degenerated; /* age/3000 last degenerated */ 46235368Sgnn 47235368Sgnn short p_type; /* character type */ 48235368Sgnn short p_specialtype; /* special character type */ 49235368Sgnn short p_lives; /* multiple lives for council, valar */ 50235368Sgnn short p_crowns; /* crowns */ 51235368Sgnn short p_charms; /* charms */ 52235368Sgnn short p_amulets; /* amulets */ 53235368Sgnn short p_holywater; /* holy water */ 54235368Sgnn short p_lastused; /* day of year last used */ 55235368Sgnn short p_status; /* playing, cloaked, etc. */ 56235368Sgnn short p_tampered; /* decree'd, etc. flag */ 57235368Sgnn short p_istat; /* used for inter-terminal battle */ 58235368Sgnn 59235368Sgnn bool p_palantir; /* palantir */ 60235368Sgnn bool p_blessing; /* blessing */ 61235368Sgnn bool p_virgin; /* virgin */ 62235368Sgnn bool p_blindness; /* blindness */ 63235368Sgnn 64235368Sgnn char p_name[SZ_NAME]; /* name */ 65235368Sgnn char p_password[SZ_PASSWORD];/* password */ 66235368Sgnn char p_login[SZ_LOGIN]; /* login */ 67235368Sgnn }; 68235368Sgnn 69235368Sgnnstruct monster /* monster stats */ 70235368Sgnn { 71235368Sgnn double m_strength; /* strength */ 72235368Sgnn double m_brains; /* brains */ 73235368Sgnn double m_speed; /* speed */ 74235368Sgnn double m_energy; /* energy */ 75235368Sgnn double m_experience; /* experience */ 76235368Sgnn double m_flock; /* % chance of flocking */ 77235368Sgnn 78235368Sgnn double m_o_strength; /* original strength */ 79235368Sgnn double m_o_speed; /* original speed */ 80235368Sgnn double m_maxspeed; /* maximum speed */ 81235368Sgnn double m_o_energy; /* original energy */ 82235368Sgnn double m_melee; /* melee damage */ 83235368Sgnn double m_skirmish; /* skirmish damage */ 84235368Sgnn 85235368Sgnn int m_treasuretype; /* treasure type */ 86235368Sgnn int m_type; /* special type */ 87235368Sgnn 88235368Sgnn char m_name[26]; /* name */ 89235368Sgnn }; 90235368Sgnn 91235368Sgnnstruct energyvoid /* energy void */ 92235368Sgnn { 93235368Sgnn double ev_x; /* x coordinate */ 94235368Sgnn double ev_y; /* y coordinate */ 95235368Sgnn bool ev_active; /* active or not */ 96235368Sgnn }; 97235368Sgnn 98235368Sgnnstruct scoreboard /* scoreboard entry */ 99235368Sgnn { 100235368Sgnn double sb_level; /* level of player */ 101235368Sgnn char sb_type[4]; /* character type of player */ 102235368Sgnn char sb_name[SZ_NAME]; /* name of player */ 103235368Sgnn char sb_login[SZ_LOGIN]; /* login of player */ 104235368Sgnn }; 105235368Sgnn 106235368Sgnnstruct charstats /* character type statistics */ 107235368Sgnn { 108235368Sgnn double c_maxbrains; /* max brains per level */ 109235368Sgnn double c_maxmana; /* max mana per level */ 110235368Sgnn double c_weakness; /* how strongly poison affects player */ 111235368Sgnn double c_goldtote; /* how much gold char can carry */ 112235368Sgnn int c_ringduration; /* bad ring duration */ 113235368Sgnn struct 114 { 115 double base; /* base for roll */ 116 double interval; /* interval for roll */ 117 double increase; /* increment per level */ 118 } c_quickness, /* quickness */ 119 c_strength, /* strength */ 120 c_mana, /* mana */ 121 c_energy, /* energy level */ 122 c_brains, /* brains */ 123 c_magiclvl; /* magic level */ 124 }; 125 126struct menuitem /* menu item for purchase */ 127 { 128 const char *item; /* menu item name */ 129 double cost; /* cost of item */ 130 }; 131