1 /* 2 This file is part of "Avanor, the Land of Mystery" roguelike game 3 Home page: http://www.avanor.com/ 4 Copyright (C) 2000-2003 Vadim Gaidukevich 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 20 21 #ifndef __DEITY_H 22 #define __DEITY_H 23 24 #include "spelldef.h" 25 #include "xfile.h" 26 #include "effect.h" 27 28 class XCreature; 29 class XItem; 30 31 32 enum DEITY 33 { 34 D_LIFE = 0, D_DEATH = 1, D_UNKNOWN 35 }; 36 37 enum DEITY_RELATION 38 { 39 DR_FALLEN_CHAMPION = 0, //no way up 40 DR_VERY_BAD = 1, //praying can kill 41 DR_BAD = 2, //you dont heared 42 DR_NORMAL = 3, //from zero till litle more 43 DR_ADEPT = 4, //you can ask some help 44 DR_FOLLOWER = 5, //you can ask lot of help 45 DR_MESSIAH = 6, //you can ask much of help 46 DR_CHAMPION = 7, //you can ask all of help 47 }; 48 49 class XDeity 50 { 51 public: 52 static XCreature * life; //Tiamat 53 static XCreature * death; //Murdok 54 /* static XCreature * fire; 55 static XCreature * water; 56 static XCreature * earth; 57 static XCreature * air; 58 */ 59 }; 60 61 enum PRAY 62 { 63 PRAY_CURE_LIGHT_WOUNDS, 64 PRAY_CURE_CRITICAL_WOUNDS, 65 PRAY_RESTORATION, 66 PRAY_IDENTIFY, 67 PRAY_SELF_KNOWLEDGE, 68 PRAY_CURE_POISON, 69 PRAY_HEROISM, 70 PRAY_TELEPORT, 71 72 PRAY_MINOR_PUNISHMENT, 73 PRAY_MINOR_INTERVENTION, 74 PRAY_INTERVENTION, 75 PRAY_MAJOR_INTERVENTION, 76 }; 77 78 struct DEITY_HELP 79 { 80 char * help_name; 81 int help_cost; 82 PRAY pray; 83 }; 84 85 class XReligion 86 { 87 public: XReligion()88 XReligion() : life_act(0), death_act(0) {} 89 int life_act; //killing undeads 90 int death_act; //killing anyone, espicialy with life. 91 void KillCreature(XCreature * killer, XCreature * victim); 92 int SacrificeItem(XCreature * cr, XItem * item, DEITY deity = D_UNKNOWN); 93 DEITY_RELATION GetRelation(DEITY deity); 94 static char * GetRelationName(DEITY_RELATION dr); 95 static char * GetDeityName(DEITY deity); 96 int GetAvailHelp(DEITY deity, DEITY_HELP ** help); 97 int Pray(DEITY deity, DEITY_HELP * pray, XCreature * prayer); 98 99 void Store(XFile * f); 100 void Restore(XFile * f); 101 /* int fire_act; 102 int water_act; 103 int earth_act; 104 int air_act; 105 */ 106 }; 107 108 #endif 109