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