3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
8 * See LICENSING which should be included
9 * along with this file for more details
16 #include "ivancommon.h"
26 struct materialdatabase
;
29 typedef god
* (*godspawner
)();
34 godprototype (godspawner
, cchar
*);
35 virtual ~godprototype () {}
37 god
*Spawn () const { return Spawner(); }
38 god
*SpawnAndLoad (inputfile
&) const;
39 cchar
*GetClassID() const { return ClassID
; }
40 int GetIndex() const { return Index
; }
51 virtual void PrayGoodEffect () = 0;
52 virtual void PrayBadEffect () = 0;
55 int Relation
, LastPray
;
60 typedef godprototype prototype
;
68 virtual cchar
*GetName () const = 0;
69 virtual cchar
*GetDescription () const = 0;
70 cchar
*GetPersonalPronoun () const;
71 cchar
*GetObjectPronoun () const;
72 virtual int GetAlignment () const = 0;
73 festring
GetCompleteDescription () const;
74 void ApplyDivineTick ();
75 void AdjustRelation (god
*, int, truth
);
76 void AdjustRelation (int);
77 void AdjustTimer (sLong
);
78 void Save (outputfile
&) const;
79 void Load (inputfile
&);
80 void SetRelation (int Value
) { Relation
= Value
; }
81 void SetTimer (sLong Value
) { Timer
= Value
; }
82 truth
ReceiveOffer (item
*);
83 virtual int GetBasicAlignment () const;
84 int GetRelation () const { return Relation
; }
85 void PrintRelation () const;
86 void SetIsKnown (truth What
) { Known
= What
; }
87 truth
IsKnown () const { return Known
; }
88 void PlayerKickedAltar () { AdjustRelation(-100); }
89 void PlayerKickedFriendsAltar () { AdjustRelation(-50); }
90 virtual truth
PlayerVomitedOnAltar (liquid
*);
91 character
*CreateAngel (team
*, int = 0);
92 virtual col16
GetColor () const = 0;
93 virtual col16
GetEliteColor () const = 0;
94 virtual const prototype
*GetProtoType () const = 0;
95 int GetType () const { return GetProtoType()->GetIndex(); }
96 virtual truth
ForceGiveBodyPart () const { return false; }
97 virtual truth
HealRegeneratingBodyParts () const { return false; }
98 virtual truth
LikesMaterial (const materialdatabase
*, ccharacter
*) const;
99 truth
TryToAttachBodyPart (character
*);
100 truth
TryToHardenBodyPart (character
*);
101 virtual truth
MutatesBodyParts () const { return false; }
102 virtual int GetSex () const = 0;
103 void SignalRandomAltarGeneration (const std::vector
<v2
> &);
104 virtual truth
LikesVomit () const { return false; }
108 #ifdef __FILE_OF_STATIC_GOD_PROTOTYPE_DEFINITIONS__
109 #define GOD_PROTO(name)\
110 template<> const godprototype\
111 name##sysbase::ProtoType((godspawner)(&name##sysbase::Spawn), #name);
113 #define GOD_PROTO(name)
116 #define GOD(name, base)\
118 typedef simplesysbase<name, base, godprototype> name##sysbase;\
120 class name : public name##sysbase