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