Mercurial > hg > early-roguelike
comparison urogue/status.c @ 256:c495a4f288c6
Import UltraRogue from the Roguelike Restoration Project (r1490)
| author | John "Elwin" Edwards |
|---|---|
| date | Tue, 31 Jan 2017 19:56:04 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 253:d9badb9c0179 | 256:c495a4f288c6 |
|---|---|
| 1 /* | |
| 2 status.c - functions for complex status determination of monsters/objects | |
| 3 | |
| 4 UltraRogue: The Ultimate Adventure in the Dungeons of Doom | |
| 5 Copyright (C) 1992, 1993, 1995 Herb Chong | |
| 6 All rights reserved. | |
| 7 | |
| 8 See the file LICENSE.TXT for full copyright and licensing information. | |
| 9 */ | |
| 10 | |
| 11 #include "rogue.h" | |
| 12 | |
| 13 /* | |
| 14 has_defensive_spell() | |
| 15 has monster cast a defensive spell. | |
| 16 Any flags added here must also be in player_powers[]. | |
| 17 */ | |
| 18 | |
| 19 int | |
| 20 has_defensive_spell(struct thing th) | |
| 21 { | |
| 22 if (on(th, HASOXYGEN)) | |
| 23 return(TRUE); | |
| 24 if (on(th, CANFLY)) | |
| 25 return(TRUE); | |
| 26 if (on(th, CANINWALL)) | |
| 27 return(TRUE); | |
| 28 if (on(th, CANREFLECT)) | |
| 29 return(TRUE); | |
| 30 if (on(th, CANSEE)) | |
| 31 return(TRUE); | |
| 32 if (on(th, HASMSHIELD)) | |
| 33 return(TRUE); | |
| 34 if (on(th, HASSHIELD)) | |
| 35 return(TRUE); | |
| 36 if (on(th, ISHASTE)) | |
| 37 return(TRUE); | |
| 38 if (on(th, ISREGEN)) | |
| 39 return(TRUE); | |
| 40 if (on(th, ISDISGUISE)) | |
| 41 return(TRUE); | |
| 42 if (on(th, ISINVIS)) | |
| 43 return(TRUE); | |
| 44 if (on(th, NOCOLD)) | |
| 45 return(TRUE); | |
| 46 if (on(th, NOFIRE)) | |
| 47 return(TRUE); | |
| 48 if (on(th, ISELECTRIC)) | |
| 49 return(TRUE); | |
| 50 | |
| 51 return(FALSE); | |
| 52 } |
