/
lib/banish/
lib/d/coronos/
lib/d/coronos/w/alena/
lib/d/coronos/w/angel/
lib/d/coronos/w/angel/caves/
lib/d/coronos/w/angel/caves/monst/
lib/d/coronos/w/angel/city/chambers/
lib/d/coronos/w/angel/city/monst/
lib/d/coronos/w/angel/city/obj/
lib/d/coronos/w/angel/city/streets/
lib/d/coronos/w/angel/farms/plains/
lib/d/coronos/w/angel/monst/
lib/d/tempus/
lib/d/tempus/w/angel/
lib/d/tempus/w/kingbill/
lib/d/tempus/w/mirak/
lib/d/tempus/w/mirak/monst/
lib/d/tempus/w/mirak/obj/
lib/d/tempus/w/relgar/planes/baat/
lib/d/tempus/w/sarak/
lib/d/tempus/w/serepion/mon/
lib/d/tempus/w/valrejn/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/include/fn_specs/
lib/info/
lib/inherit/base/
lib/log/
lib/log/mailbox/
lib/log/main/
lib/news/
lib/obj/party/
lib/objects/componen/
lib/open/
lib/open/party/
lib/open/paste/
lib/open/spells/
lib/open/valrejn/
lib/players/
lib/players/alena/
lib/players/alena/obj/
lib/players/alena/open/
lib/players/alena/private/
lib/players/angel/
lib/players/angel/obj/
lib/players/ash/
lib/players/biggs/
lib/players/biggs/food/
lib/players/biggs/gobkeep/
lib/players/biggs/mnstr/
lib/players/biggs/town/caves/
lib/players/biggs/town/tower/
lib/players/biggs/wpns/
lib/players/calris/
lib/players/deathurg/
lib/players/deathurg/open/
lib/players/deathurg/private/thief/
lib/players/dogberry/
lib/players/dogberry/library/
lib/players/dogberry/open/
lib/players/epsilon/
lib/players/epsilon/private/
lib/players/farewell/
lib/players/hippo/
lib/players/hippo/open/
lib/players/hippo/tools/
lib/players/jimpa/
lib/players/josh/
lib/players/josh/room/
lib/players/josh/room/mage/dungeon/
lib/players/josh/room/mage/dungeon/obj/
lib/players/josh/wep/
lib/players/kingbill/
lib/players/metatron/
lib/players/miette/
lib/players/mirak/
lib/players/mirak/open/
lib/players/parsilan/
lib/players/relgar/
lib/players/relgar/private/
lib/players/sarak/
lib/players/sarak/bugs/
lib/players/sarak/feelings/
lib/players/sarak/magical/
lib/players/sarak/minotaur/island/
lib/players/sarak/open/
lib/players/sarak/private/
lib/players/serepion/
lib/players/serepion/open/
lib/players/serepion/private/
lib/players/spike/
lib/players/spike/open/
lib/players/spike/private/
lib/players/spike/seaworld/
lib/players/valrejn/
lib/players/valrejn/open/
lib/players/valrejn/private/
lib/players/virus/
lib/players/wrath/
lib/players/wrath/arm/
lib/players/wrath/mon/
lib/players/wrath/room/
lib/players/wrath/room/entry/
lib/players/wrath/room/zolgath/
lib/players/wrath/weap/
lib/players/zil/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/library/
lib/room/city/library/open/books/
lib/room/city/shop/
lib/room/death/
lib/room/death/open/
lib/room/island/
lib/room/keeps/
lib/room/registry/
lib/room/ships/crew/
lib/room/ships/open/
lib/room/ships/open/types/bounty/
lib/room/ships/open/types/nebula/
lib/room/ships/open/types/phoenix/
lib/secure/udp_cmd_/
lib/skills/
lib/skills/fighter/
lib/skills/psionici/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/no_banis/
lib/usr/players/
#ifndef CLERIC_H
#define CLERIC_H

#define HEAL_CLERIC_PERIOD (20 - query_wisdom()/6)

/*** cleric spheres ***/ 

int healing_sphere;           /* healing spells stat */ 
int necromancy_sphere;        /* necromancy spells stat */ 
int combat_sphere;            /* combat spells stat */ 
int stellar_sphere;           /* light/travelling/astral spells stat */ 
int protection_sphere;        /* protection spells stat */ 
int nature_sphere;            /* druid spells stat */ 
int divination_sphere;        /* divining/seer spells stat */ 
 
int healing_sphere_points;    /* current spell points for healing spells */     
int necromancy_sphere_points; /* current spell points for necromancy spells */ 
int combat_sphere_points;     /* current spell points for combat spells */ 
int stellar_sphere_points;    /* current spell points for stellar spells */ 
int protection_sphere_points; /* current spell points for protection spells */ 
int nature_sphere_points;     /* current spell points for nature spells */ 
int divination_sphere_points; /* current spell points for divination spells */ 



/***     Cleric            ***/ 
 
int set_healing_sphere(int i)    { return healing_sphere = i;    } 
int set_necromancy_sphere(int i) { return necromancy_sphere = i; } 
int set_combat_sphere(int i)    { return combat_sphere = i;     } 
int set_stellar_sphere(int i)    { return stellar_sphere = i;    } 
int set_protection_sphere(int i) { return protection_sphere = i; } 
int set_nature_sphere(int i)     { return nature_sphere = i;     } 
int set_divination_sphere(int i) { return divination_sphere = i; } 
 
int query_healing_sphere()    { return healing_sphere;    } 
int query_necromancy_sphere() { return necromancy_sphere; } 
int query_combat_sphere()    { return combat_sphere;     } 
int query_stellar_sphere()    { return stellar_sphere;    } 
int query_protection_sphere() { return protection_sphere; } 
int query_nature_sphere()     { return nature_sphere;     } 
int query_divination_sphere() { return divination_sphere; } 


void clear_cleric() {
  healing_sphere = 0; necromancy_sphere = 0; combat_sphere = 0;
  stellar_sphere = 0; protection_sphere = 0; nature_sphere = 0;
  divination_sphere = 0; healing_sphere_points = 0;
  necromancy_sphere_points = 0; combat_sphere_points = 0;
  stellar_sphere_points = 0; protection_sphere_points = 0;
  nature_sphere_points = 0; divination_sphere_points = 0;
} 
   
int adj_combat_sphere_points(int i) {
    combat_sphere_points = combat_sphere_points + i;
    if(combat_sphere_points > combat_sphere * 2)
       combat_sphere_points = combat_sphere * 2;
    if(combat_sphere_points < 0)
       combat_sphere_points = 0;
    return combat_sphere_points;
}

int adj_healing_sphere_points(int i) { 
  healing_sphere_points = healing_sphere_points + i; 
  if(healing_sphere_points > healing_sphere * 2) 
    healing_sphere_points = healing_sphere * 2; 
  if(healing_sphere_points < 0) 
    healing_sphere_points = 0; 
  return healing_sphere_points; 
} 
 
int adj_necromancy_sphere_points(int i) { 
  necromancy_sphere_points = necromancy_sphere_points + i; 
  if(necromancy_sphere_points > necromancy_sphere * 2) 
    necromancy_sphere_points = necromancy_sphere * 2; 
  if(necromancy_sphere_points < 0) 
    necromancy_sphere_points = 0; 
  return necromancy_sphere_points; 
} 
 
int adj_stellar_sphere_points(int i) { 
  stellar_sphere_points = stellar_sphere_points + i; 
  if(stellar_sphere_points > stellar_sphere * 2) 
    stellar_sphere_points = stellar_sphere * 2; 
  if(stellar_sphere_points < 0) 
    stellar_sphere_points = 0; 
  return stellar_sphere_points; 
} 
 
int adj_protection_sphere_points(int i) { 
  protection_sphere_points = protection_sphere_points + i; 
  if(protection_sphere_points > protection_sphere *  2) 
    protection_sphere_points = protection_sphere * 2; 
  if(protection_sphere_points < 0) 
    protection_sphere_points = 0; 
  return protection_sphere_points; 
} 
 
int adj_nature_sphere_points(int i) { 
  nature_sphere_points = nature_sphere_points + i; 
  if(nature_sphere_points > nature_sphere * 2) 
    nature_sphere_points = nature_sphere * 2; 
  if(nature_sphere_points < 0) 
    nature_sphere_points = 0; 
  return nature_sphere_points; 
} 
 
int adj_divination_sphere_points(int i) { 
  divination_sphere_points = divination_sphere_points + i; 
  if(divination_sphere_points > divination_sphere * 2) 
    divination_sphere_points = divination_sphere * 2; 
  if(divination_sphere_points < 0) 
    divination_sphere_points = 0; 
  return divination_sphere_points; 
} 
 
int query_healing_sphere_points(int i)    { return healing_sphere_points;    } 
int query_necromancy_sphere_points(int i) { return necromancy_sphere_points; } 
int query_combat_sphere_points(int i)    { return combat_sphere_points;     } 
int query_stellar_sphere_points(int i)    { return stellar_sphere_points;    } 
int query_protection_sphere_points(int i) { return protection_sphere_points; } 
int query_nature_sphere_points(int i)     { return nature_sphere_points;     } 
int query_divination_sphere_points(int i) { return divination_sphere_points; } 

void query_cleric_stats() {
  string str;

  write("\n         -=[ Cleric Spheres ]=-\n\n");
  str = " Healing: "+healing_sphere;
  str += "("+healing_sphere_points+" pts)         ";
  str = extract(str,0,25);
  str += " Necromancy: "+necromancy_sphere;
  str += "("+necromancy_sphere_points+" pts)      ";
  str = extract(str,0,50);
  str += " Combat: "+combat_sphere;
  str += "("+combat_sphere_points+" pts)          ";
  str = extract(str,0,75);
  write(str +"\n");

  str = " Stellar: "+stellar_sphere;
  str += "("+stellar_sphere_points+" pts)         ";
  str = extract(str,0,25);
  str += " Protection: "+protection_sphere;
  str += "("+protection_sphere_points+" pts)      ";
  str = extract(str,0,50);
  str += " Nature: "+nature_sphere;
  str += "("+nature_sphere_points+" pts)          ";
  str = extract(str,0,75);
  write(str +"\n");

  str = " Divination: "+divination_sphere;
  str += "("+divination_sphere_points+" pts)      ";
  str = extract(str,0,25);
  write(str +"\n");
}             

void adj_all_cleric(int h) {
  adj_combat_sphere_points(h);
  adj_healing_sphere_points(h);
  adj_necromancy_sphere_points(h);
  adj_stellar_sphere_points(h);
  adj_protection_sphere_points(h);
  adj_nature_sphere_points(h);
  adj_divination_sphere_points(h);
}

void heal_cleric() {
  if(random(HEAL_CLERIC_PERIOD)) return;
  adj_all_cleric(1);
}

#endif /* CLERIC_H */