1 /* 2 * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. 3 */ 4 5 #ifndef lint 6 static char rcsid[] = "$Id: hack.timeout.c,v 1.2 1993/08/02 17:19:29 mycroft Exp $"; 7 #endif /* not lint */ 8 9 #include "hack.h" 10 11 timeout(){ 12 register struct prop *upp; 13 if(Stoned) stoned_dialogue(); 14 for(upp = u.uprops; upp < u.uprops+SIZE(u.uprops); upp++) 15 if((upp->p_flgs & TIMEOUT) && !--upp->p_flgs) { 16 if(upp->p_tofn) (*upp->p_tofn)(); 17 else switch(upp - u.uprops){ 18 case STONED: 19 killer = "cockatrice"; 20 done("died"); 21 break; 22 case SICK: 23 pline("You die because of food poisoning."); 24 killer = u.usick_cause; 25 done("died"); 26 break; 27 case FAST: 28 pline("You feel yourself slowing down."); 29 break; 30 case CONFUSION: 31 pline("You feel less confused now."); 32 break; 33 case BLIND: 34 pline("You can see again."); 35 setsee(); 36 break; 37 case INVIS: 38 on_scr(u.ux,u.uy); 39 pline("You are no longer invisible."); 40 break; 41 case WOUNDED_LEGS: 42 heal_legs(); 43 break; 44 } 45 } 46 } 47 48 /* He is being petrified - dialogue by inmet!tower */ 49 char *stoned_texts[] = { 50 "You are slowing down.", /* 5 */ 51 "Your limbs are stiffening.", /* 4 */ 52 "Your limbs have turned to stone.", /* 3 */ 53 "You have turned to stone.", /* 2 */ 54 "You are a statue." /* 1 */ 55 }; 56 57 stoned_dialogue() 58 { 59 register long i = (Stoned & TIMEOUT); 60 61 if(i > 0 && i <= SIZE(stoned_texts)) 62 pline(stoned_texts[SIZE(stoned_texts) - i]); 63 if(i == 5) 64 Fast = 0; 65 if(i == 3) 66 nomul(-3); 67 } 68