-+-+-+-+-+-+-+-+ START OF PART 52 -+-+-+-+-+-+-+-+ X`7B"Shaman. ",`09`09`09`09`09`09`09 99,23,62, 65`7D, X`7B"Clan Chief. ",`09`09`09`09`09`09100,23,62, 80`7D, X`7B"You have dark brown eyes, ",`09`09`09`09`09 20,50,51, 50`7D, X`7B"You have brown eyes, ",`09`09`09`09`09 60,50,51, 50`7D, X`7B"You have hazel eyes, ",`09`09`09`09`09 70,50,51, 50`7D, X`7B"You have green eyes, ",`09`09`09`09`09 80,50,51, 50`7D, X`7B"You have blue eyes, ",`09`09`09`09`09 90,50,51, 50`7D, X`7B"You have blue-gray eyes, ",`09`09`09`09`09100,50,51, 50`7D, X`7B"straight ",`09`09`09`09`09`09`09 70,51,52, 50`7D, X`7B"wavy ",`09`09`09`09`09`09`09 90,51,52, 50`7D, X`7B"curly ",`09`09`09`09`09`09`09100,51,52, 50`7D, X`7B"black hair, ",`09`09`09`09`09`09 30,52,53, 50`7D, X`7B"brown hair, ",`09`09`09`09`09`09 70,52,53, 50`7D, X`7B"auburn hair, ",`09`09`09`09`09`09 80,52,53, 50`7D, X`7B"red hair, ",`09`09`09`09`09`09`09 90,52,53, 50`7D, X`7B"blond hair, ",`09`09`09`09`09`09100,52,53, 50`7D, X`7B"and a very dark complexion.",`09`09`09`09`09 10,53, 0, 50`7D, X`7B"and a dark complexion.",`09`09`09`09`09 30,53, 0, 50`7D, X`7B"and an average complexion.",`09`09`09`09`09 80,53, 0, 50`7D, X`7B"and a fair complexion.",`09`09`09`09`09 90,53, 0, 50`7D, X`7B"and a very fair complexion.",`09`09`09`09`09100,53, 0, 50`7D, X`7B"You have light grey eyes, ",`09`09`09`09`09 85,54,55, 50`7D, X`7B"You have light blue eyes, ",`09`09`09`09`09 95,54,55, 50`7D, X`7B"You have light green eyes, ",`09`09`09`09`09100,54,55, 50`7D, X`7B"straight ",`09`09`09`09`09`09`09 75,55,56, 50`7D, X`7B"wavy ",`09`09`09`09`09`09`09100,55,56, 50`7D, X`7B"black hair, and a fair complexion.",`09`09`09`09 75,56, 0, 50`7D, X`7B"brown hair, and a fair complexion.",`09`09`09`09 85,56, 0, 50`7D, X`7B"blond hair, and a fair complexion.",`09`09`09`09 95,56, 0, 50`7D, X`7B"silver hair, and a fair complexion.",`09`09`09`09100,56, 0, 50`7D, X`7B"You have dark brown eyes, ",`09`09`09`09`09 99,57,58, 50`7D, X`7B"You have glowing red eyes, ",`09`09`09`09`09100,57,58, 60`7D, X`7B"straight ",`09`09`09`09`09`09`09 90,58,59, 50`7D, X`7B"wavy ",`09`09`09`09`09`09`09100,58,59, 50`7D, X`7B"black hair, ",`09`09`09`09`09`09 75,59,60, 50`7D, X`7B"brown hair, ",`09`09`09`09`09`09100,59,60, 50`7D, X`7B"a one foot beard, ",`09`09`09`09`09`09 25,60,61, 50`7D, X`7B"a two foot beard, ",`09`09`09`09`09`09 60,60,61, 51`7D, X`7B"a three foot beard, ",`09`09`09`09`09 90,60,61, 53`7D, X`7B"a four foot beard, ",`09`09`09`09`09`09100,60,61, 55`7D, X`7B"and a dark complexion.",`09`09`09`09`09100,61, 0, 50`7D, X`7B"You have slime green eyes, ",`09`09`09`09`09 60,62,63, 50`7D, X`7B"You have puke yellow eyes, ",`09`09`09`09`09 85,62,63, 50`7D, X`7B"You have blue-bloodshot eyes, ",`09`09`09`09 99,62,63, 50`7D, X`7B"You have glowing red eyes, ",`09`09`09`09`09100,62,63, 55`7D, X`7B"dirty ",`09`09`09`09`09`09`09 33,63,64, 50`7D, X`7B"mangy ",`09`09`09`09`09`09`09 66,63,64, 50`7D, X`7B"oily ",`09`09`09`09`09`09`09100,63,64, 50`7D, X`7B"sea-weed green hair, ",`09`09`09`09`09 33,64,65, 50`7D, X`7B"bright red hair, ",`09`09`09`09`09`09 66,64,65, 50`7D, X`7B"dark purple hair, ",`09`09`09`09`09`09100,64,65, 50`7D, X`7B"and green ",`09`09`09`09`09`09`09 25,65,66, 50`7D, X`7B"and blue ",`09`09`09`09`09`09`09 50,65,66, 50`7D, X`7B"and white ",`09`09`09`09`09`09`09 75,65,66, 50`7D, X`7B"and black ",`09`09`09`09`09`09`09100,65,66, 50`7D, X`7B"ulcerous skin.",`09`09`09`09`09`09 33,66, 0, 50`7D, X`7B"scabby skin.",`09`09`09`09`09`09 66,66, 0, 50`7D, X`7B"leprous skin.",`09`09`09`09`09`09100,66, 0, 50`7D X`7D; X#endif X X/* Classes.`09`09`09`09`09`09`09*/ Xclass_type class`5BMAX_CLASS`5D = `7B X/*`09 HP Dis Src Stl Fos bth btb sve S I W D Co Ch Spell Exp spl */ X`7B"Warrior",9, 25, 14, 1, 38, 70, 55, 18, 5,-2,-2, 2, 2,-1, NONE, 0, 0`7 VD, X`7B"Mage", 0, 30, 16, 2, 20, 34, 20, 36,-5, 3, 0, 1,-2, 1, MAGE, 30, 1`7 VD, X`7B"Priest", 2, 25, 16, 2, 32, 48, 35, 30,-3,-3, 3,-1, 0, 2, PRIEST, 20, 1`7 VD, X`7B"Rogue", 6, 45, 32, 5, 16, 60, 66, 30, 2, 1,-2, 3, 1,-1, MAGE, 0, 5`7 VD, X`7B"Ranger", 4, 30, 24, 3, 24, 56, 72, 30, 2, 2, 0, 1, 1, 1, MAGE, 40, 3`7 VD, X`7B"Paladin",6, 20, 12, 1, 38, 68, 40, 24, 3,-3, 1, 0, 2, 2, PRIEST, 35, 1`7 VD X`7D; X X/* making it 16 bits wastes a little space, but saves much signed/unsigned X headaches in its use */ X/* CLA_MISC_HIT is identical to CLA_SAVE, which takes advantage of X the fact that the save values are independent of the class */ Xint16 class_level_adj`5BMAX_CLASS`5D`5BMAX_LEV_ADJ`5D = `7B X/*`09 bth bthb device disarm save/misc hit */ X/* Warrior */ `7B`094,`094,`092,`092,`093 `7D, X/* Mage */ `7B 2,`092,`094,`093,`093 `7D, X/* Priest */ `7B 2,`092,`094,`093,`093 `7D, X/* Rogue */ `7B 3,`094,`093,`094,`093 `7D, X/* Ranger */ `7B 3,`094,`093,`093,`093 `7D, X/* Paladin */ `7B 3,`093,`093,`092,`093 `7D X`7D; X Xint32u spell_learned = 0;`09/* bit mask of spells learned */ Xint32u spell_worked = 0;`09/* bit mask of spells tried and worked */ Xint32u spell_forgotten = 0;`09/* bit mask of spells learned but forgotten */ Xint8u spell_order`5B32`5D;`09`09/* order spells learned/remembered/forgotten V */ X X/* Warriors don't have spells, so there is no entry for them. Note that X this means you must always subtract one from the py.misc.pclass before X indexing into magic_spell`5B`5D. */ X#ifdef MACGAME Xspell_type (*magic_spell)`5B31`5D; X#else Xspell_type magic_spell`5BMAX_CLASS-1`5D`5B31`5D = `7B X `7B`09`09 /* Mage`09 */ X `7B`091, 1, 22, 1`7D, X `7B`091, 1, 23, 1`7D, X `7B`091, 2, 24, 1`7D, X `7B`091, 2, 26, 1`7D, X `7B`093, 3, 25, 2`7D, X `7B`093, 3, 25, 1`7D, X `7B`093, 3, 27, 2`7D, X `7B`093, 4, 30, 1`7D, X `7B`095, 4, 30, 6`7D, X `7B`095, 5, 30, 8`7D, X `7B`095, 5, 30, 5`7D, X `7B`095, 5, 35, 6`7D, X `7B`097, 6, 35, 9`7D, X `7B`097, 6, 50, 10`7D, X `7B`097, 6, 40, 12`7D, X `7B`099, 7, 44, 19`7D, X `7B`099, 7, 45, 19`7D, X `7B`099, 7, 75, 22`7D, X `7B`099, 7, 45, 19`7D, X `7B 11, 7, 45, 25`7D, X `7B 11, 7, 99, 19`7D, X `7B 13, 7, 50, 22`7D, X `7B 15, 9, 50, 25`7D, X `7B 17, 9, 50, 31`7D, X `7B 19, 12, 55, 38`7D, X `7B 21, 12, 90, 44`7D, X `7B 23, 12, 60, 50`7D, X `7B 25, 12, 65, 63`7D, X `7B 29, 18, 65, 88`7D, X `7B 33, 21, 80, 125`7D, X `7B 37, 25, 95, 200`7D X `7D, X `7B`09`09 /* Priest`09 */ X `7B`091, 1, 10, 1`7D, X `7B`091, 2, 15, 1`7D, X `7B`091, 2, 20, 1`7D, X `7B`091, 2, 25, 1`7D, X `7B`093, 2, 25, 1`7D, X `7B`093, 3, 27, 2`7D, X `7B`093, 3, 27, 2`7D, X `7B`093, 3, 28, 3`7D, X `7B`095, 4, 29, 4`7D, X `7B`095, 4, 30, 5`7D, X `7B`095, 4, 32, 5`7D, X `7B`095, 5, 34, 5`7D, X `7B`097, 5, 36, 6`7D, X `7B`097, 5, 38, 7`7D, X `7B`097, 6, 38, 9`7D, X `7B`097, 7, 38, 9`7D, X `7B`099, 6, 38, 10`7D, X `7B`099, 7, 38, 10`7D, X `7B`099, 7, 40, 10`7D, X `7B 11, 8, 42, 10`7D, X `7B 11, 8, 42, 12`7D, X `7B 11, 9, 55, 15`7D, X `7B 13, 10, 45, 15`7D, X `7B 13, 11, 45, 16`7D, X `7B 15, 12, 50, 20`7D, X `7B 15, 14, 50, 22`7D, X `7B 17, 14, 55, 32`7D, X `7B 21, 16, 60, 38`7D, X `7B 25, 20, 70, 75`7D, X `7B 33, 24, 90, 125`7D, X `7B 39, 32, 99, 200`7D X `7D, X `7B`09`09 /* Rogue`09 */ X `7B 99, 99,`090, 0`7D, X `7B`095, 1, 50, 1`7D, X `7B`097, 2, 55, 1`7D, X `7B`099, 3, 60, 2`7D, X `7B 11, 4, 65, 2`7D, X `7B 13, 5, 70, 3`7D, X `7B 99, 99,`090, 0`7D, X `7B 15, 6, 75, 3`7D, X `7B 99, 99,`090, 0`7D, X `7B 17, 7, 80, 4`7D, X `7B 19, 8, 85, 5`7D, X `7B 21, 9, 90, 6`7D, X `7B 99, 99,`090, 0`7D, X `7B 23, 10, 95, 7`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 25, 12, 95, 9`7D, X `7B 27, 15, 99, 11`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 29, 18, 99, 19`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7B 99, 99,`090, 0`7D, X `7D, X `7B`09`09 /* Ranger`09 */ X `7B`093, 1, 30, 1`7D, X `7B`093, 2, 35, 2`7D, X `7B`093, 2, 35, 2`7D, X `7B`095, 3, 35, 2`7D, X `7B`095, 3, 40, 2`7D, X `7B`095, 4, 45, 3`7D, X `7B`097, 5, 40, 6`7D, X `7B`097, 6, 40, 5`7D, X `7B`099, 7, 40, 7`7D, X `7B`099, 8, 45, 8`7D, X `7B 11, 8, 40, 10`7D, X `7B 11, 9, 45, 10`7D, X `7B 13, 10, 45, 12`7D, X `7B 13, 11, 55, 13`7D, X `7B 15, 12, 50, 15`7D, X `7B 15, 13, 50, 15`7D, X `7B 17, 17, 55, 15`7D, X `7B 17, 17, 90, 17`7D, X `7B 21, 17, 55, 17`7D, X `7B 21, 19, 60, 18`7D, X `7B 23, 25, 95, 20`7D, X `7B 23, 20, 60, 20`7D, X `7B 25, 20, 60, 20`7D, X `7B 25, 21, 65, 20`7D, X `7B 27, 21, 65, 22`7D, X `7B 29, 23, 95, 23`7D, X `7B 31, 25, 70, 25`7D, X `7B 33, 25, 75, 38`7D, X `7B 35, 25, 80, 50`7D, X `7B 37, 30, 95, 100`7D, X `7B 99, 99,`090, 0`7D X `7D, X `7B`09`09 /* Paladin`09 */ X `7B`091, 1, 30, 1`7D, X `7B`092, 2, 35, 2`7D, X `7B`093, 3, 35, 3`7D, X `7B`095, 3, 35, 5`7D, X `7B`095, 4, 35, 5`7D, X `7B`097, 5, 40, 6`7D, X `7B`097, 5, 40, 6`7D, X `7B`099, 7, 40, 7`7D, X `7B`099, 7, 40, 8`7D, X `7B`099, 8, 40, 8`7D, X `7B 11, 9, 40, 10`7D, X `7B 11, 10, 45, 10`7D, X `7B 11, 10, 45, 10`7D, X `7B 13, 10, 45, 12`7D, X `7B 13, 11, 45, 13`7D, X `7B 15, 13, 45, 15`7D, X `7B 15, 15, 50, 15`7D, X `7B 17, 15, 50, 17`7D, X `7B 17, 15, 50, 18`7D, X `7B 19, 15, 50, 19`7D, X `7B 19, 15, 50, 19`7D, X `7B 21, 17, 50, 20`7D, X `7B 23, 17, 50, 20`7D, X `7B 25, 20, 50, 20`7D, X `7B 27, 21, 50, 22`7D, X `7B 29, 22, 50, 24`7D, X `7B 31, 24, 60, 25`7D, X `7B 33, 28, 60, 31`7D, X `7B 35, 32, 70, 38`7D, X `7B 37, 36, 90, 50`7D, X `7B 39, 38, 95, 100`7D X `7D X `7D; X#endif X Xchar *spell_names`5B62`5D = `7B X /* Mage Spells */ X "Magic Missile", "Detect Monsters",`09"Phase Door", "Light Area", X "Cure Light Wounds",`09"Find Hidden Traps/Doors", "Stinking Cloud", X "Confusion",`09"Lightning Bolt", "Trap/Door Destruction", "Sleep I", X "Cure Poison", "Teleport Self", "Remove Curse", "Frost Bolt", X "Turn Stone to Mud",`09"Create Food",`09"Recharge Item I", "Sleep II", X "Polymorph Other", "Identify", "Sleep III",`09 "Fire Bolt", "Slow Monst Ver", X "Frost Ball",`09 "Recharge Item II", "Teleport Other",`09"Haste Self", X "Fire Ball", "Word of Destruction", "Genocide", X /* Priest Spells, start at index 31 */ X "Detect Evil", "Cure Light Wounds",`09"Bless", "Remove Fear", "Call Ligh Vt", X "Find Traps",`09 "Detect Doors/Stairs",`09 "Slow Poison",`09 "Blind Creatu Vre", X "Portal", "Cure Medium Wounds", "Chant", "Sanctuary", "Create Food", X "Remove Curse", "Resist Heat and Cold", "Neutralize Poison", X "Orb of Draining", "Cure Serious Wounds", "Sense Invisible", X "Protection from Evil", "Earthquake", "Sense Surroundings", X "Cure Critical Wounds", "Turn Undead", "Prayer", "Dispel Undead", X "Heal", "Dispel Evil", "Glyph of Warding",`09"Holy Word" X`7D; X X/* Each type of character starts out with a few provisions.`09*/ X/* Note that the entries refer to elements of the object_list`5B`5D array*/ X/* 344 = Food Ration, 365 = Wooden Torch, 123 = Cloak, 318 = Beginners-Majik V, X 103 = Soft Leather Armor, 30 = Stiletto, 322 = Beginners Handbook */ X Xint16u player_init`5BMAX_CLASS`5D`5B5`5D = `7B X`09`09`7B 344, 365, 123, 30, 103`7D,`09/* Warrior`09 */ X`09`09`7B 344, 365, 123, 30, 318`7D,`09/* Mage`09`09 */ X`09`09`7B 344, 365, 123, 30, 322`7D,`09/* Priest`09 */ X`09`09`7B 344, 365, 123, 30, 318`7D,`09/* Rogue`09 */ X`09`09`7B 344, 365, 123, 30, 318`7D,`09/* Ranger`09 */ X`09`09`7B 344, 365, 123, 30, 322`7D`09/* Paladin`09 */ X`7D; $ CALL UNPACK PLAYER.C;1 1333249276 $ create 'f' X/* source/potions.c: code for potions X X Copyright (c) 1989-92 James E. Wilson, Robert A. Koeneke X X This software may be copied and distributed for educational, research, an Vd X not for profit purposes provided that this copyright and statement are X included in all such copies. */ X X#include "config.h" X#include "constant.h" X#include "types.h" X#include "externs.h" X X#ifdef USG X#include X#else X#include X#endif X X/* Potions for the quaffing`09`09`09`09-RAK-`09*/ Xvoid quaff() X`7B X int32u i, l; X int j, k, item_val; X int ident; X register inven_type *i_ptr; X register struct misc *m_ptr; X register struct flags *f_ptr; X#if 0 X /* used by ifdefed out learn_spell potion */ X register class_type *c_ptr; X#endif X X free_turn_flag = TRUE; X if (inven_ctr == 0) X msg_print("But you are not carrying anything."); X else if (!find_range(TV_POTION1, TV_POTION2, &j, &k)) X msg_print("You are not carrying any potions."); X else if (get_item(&item_val, "Quaff which potion?", j, k, CNIL, CNIL)) X `7B X i_ptr = &inventory`5Bitem_val`5D; X i = i_ptr->flags; X free_turn_flag = FALSE; X ident = FALSE; X if (i == 0) X`09`7B X`09 msg_print ("You feel less thirsty."); X`09 ident = TRUE; X`09`7D X else while (i != 0) X`09`7B X`09 j = bit_pos(&i) + 1; X`09 if (i_ptr->tval == TV_POTION2) X`09 j += 32; X`09 /* Potions`09`09`09`09`09`09*/ X`09 switch(j) X`09 `7B X`09 case 1: X`09 if (inc_stat (A_STR)) X`09`09`7B X`09`09 msg_print("Wow! What bulging muscles!"); X`09`09 ident = TRUE; X`09`09`7D X`09 break; X`09 case 2: X`09 ident = TRUE; X`09 lose_str(); X`09 break; X`09 case 3: X`09 if (res_stat (A_STR)) X`09`09`7B X`09`09 msg_print("You feel warm all over."); X`09`09 ident = TRUE; X`09`09`7D X`09 break; X`09 case 4: X`09 if (inc_stat (A_INT)) X`09`09`7B X`09`09 msg_print("Aren't you brilliant!"); X`09`09 ident = TRUE; X`09`09`7D X`09 break; X`09 case 5: X`09 ident = TRUE; +-+-+-+-+-+-+-+- END OF PART 52 +-+-+-+-+-+-+-+-