/*

filename    clericguild
password    release
changedby   Darg
EmailAdd    Mark Pringle darg@valhalla.com
request     compile
version     21
END HEADER*/






#define _GUILD_UDGAARD_HEALER

#include

/* ================================================================== */
/*                                ZONE                                */
/* ================================================================== */
%zone clericguild
title "Healers Guild"
creators {"papi","quifael"}

notes
"This is a zone designed to implement the Guild for Clerics. The zone is
not a part of Midgaard, since the zone is already too large. The zone
contains teachers and guards. Large lifespan in order to force players
to defend their own guild.&n
June 4th, 1996 - Silver Torc added as the guild item by Sk(r)ay.&n"

help
"&lHealers Guild

   1 2 3 4 5 6 7 8

A   T-----#-----#      Entrance C7
   |           |      Udgaard C8
B   |   # M     |      Guild Master B4
   |    \|     |      Ability Teacher C4
C   #   T-T-#---E-@    Skill Teacher C3
   |  /  |     |      Dark Spell Teacher D2
D   | T   #     |      Weapon Teacher A1
   |           |      Spell Teacher E4
E   #-----T-----#

&fThis is the Udgaard Healer Guild. It is supposed to teach characters up
to about level 30 - 50. At that point you are expected to leave the guild
and join another, maybe more powerful, guild.&n"

reset RESET_ANYHOW
lifespan 118

/* ================================================================== */
/*                                DIL                                 */
/* ================================================================== */

%dil
/* The DIL programs for Healers - causes the Spiritual Hammer to appear
and vanish after the desired time. Those DILs are copied into the player. */

dilbegin recall hammer_vanish();
var
       blah : integer;
blih : integer;
       ting : unitptr;
code
{
       :start:
interrupt(SFB_DEAD,activator == self,gone);
ting := equipment(self,WEAR_WIELD);
if (ting.nameidx != "sp_hammer") goto gone;
secure(ting,gone);
heartbeat :=
PULSE_SEC*(rnd(30,60)+self.abilities[ABIL_DIV]+self.abilities[ABIL_CHA]);
wait(SFB_TICK,TRUE);
wait(SFB_TICK,TRUE);
act("Your $2n flickers and starts to fade..."
,A_ALWAYS,self,ting,null,TO_CHAR);
act("$1n's $2n flickers and starts to fade..."
,A_ALWAYS,self,ting,null,TO_REST);
heartbeat := PULSE_SEC*10;
pause;
act("Your $2n ceases its brief existence and merges with your soul."
,A_ALWAYS,self,ting,null,TO_CHAR);
act("$1n's $2n ceases its brief existence and merges with $1n's soul."
,A_ALWAYS,self,ting,null,TO_REST);
:gone:
destroy(ting);
unsecure(ting);
blah := dildestroy("hammernosteal@clericguild",self);
blih := dildestroy("hammer_vanish@clericguild",self);
}
dilend


dilbegin hammernosteal();
var
       vict : unitptr;
ting : unitptr;
code
{
       :start:
wait(SFB_CMD,(command("disarm"))and(argument)
and(activator != self));
vict := activator;
secure(vict,start);
ting:=findunit(vict,argument,FIND_UNIT_SURRO,null);
if (ting!=self) goto start;
block;
act("You can't disarm $3n, he's using an etheral weapon!"
,A_SOMEONE,vict,null,self,TO_CHAR);
act("$1n tries to disarm you, but $1s weapon moves straight through yours!"
,A_SOMEONE,vict,null,self,TO_VICT);
act("$1n tries to disarm $3n, but $1s weapon moves straight through $3n's!"
,A_SOMEONE,vict,null,self,TO_NOTVICT);
goto start;
}
dilend


/* The DIL for the Guild Master - gives out the Silver Torc to Healers. */

dilbegin healer_give();
var
pc : unitptr;
item : unitptr;
code
{
heartbeat := PULSE_SEC * 4;

:start:

wait (SFB_DONE,command("worship")and(self ==target));
pc := activator;
secure(pc, lost);
if (GUILD_UDG_CLERIC in pc.guild)
{
pause;
exec("bow"+pc.name,self);pause;
exec("say Hello, "+pc.name+".", self);pause;
exec("say I trust you are in good health?",self);
exec("nudge "+pc.name,self);pause;
exec("say A minor jest. Not a very good one, I fear, but I was told those "+
"can easily break up the ice at parties.",self);pause;
exec("say Not that I do get invited to many...",self);
exec("sigh",self);pause;
exec("say Comes from the line of business, I am afraid. Monks are hardly "+
"the party animal type.",self);
exec("think ",self);pause;
exec("say Never mind. Lets get to the matter at hand.",self);pause;
exec("say As a wandering healer you'll meet many dangers, no doubt.",self);
pause;
exec("say To ease your work and travels, accept this small token of "+
"our Guild.",self);
item := load("heal_torc@clericguild");
       item.height := pc.height;
link(item, self);
exec("give torc "+pc.name, self);pause;
exec("say Beside several small enchantments, this item can also provide "+
"you with means of self-defence.",self);
exec("say Examine it carefully and you will know.", self);pause;
exec("say Our blessings will follow you, young acolyte.", self);pause;
exec("say Let your faith guide your ways.",self);pause;
exec("bow "+pc.name,self);
unsecure(pc);
goto start;
}
else
{
pause;
exec("say Please, not here, "+pc.name+". People are watching.", self);
exec("peer",self);pause;
exec("french "+pc.name,self);
}

unsecure(pc);
goto start;

:lost:
unsecure(pc);
exec("say Oh well, got bored with my speeches, I guess.", self);
goto start;
}
dilend



/* ================================================================== */
/*                               ROOMS                                */
/* ================================================================== */
%rooms
   entrance

names {"monastery gate"}
title "Monastery Gate"
descr
"You are standing just inside the gates to the entrance of the healers guild,
Udgaard's bastion of goodness and righteousness. The large monastery
buildings stand to the west, and Tranquility Path leads away to the east.
A large sign on the wall attracts your attention."
movement SECT_FIELD
east to healers_way3@udgaard;
west to garden1;
ALWAYS_LIGHT
extra {"sign", "wall"}
"&lThe sign says:

  Welcome to the Udgaard Healer guild.

  - Tuck the Guild Master.&n"
end



                             garden1

names {"monastery garden"}
title "Monastery Garden"
descr
"   You are on a small gravel path leading through a well-tended flourishing
garden, encircled by a whitewashed stone wall.  To the east is the monastery
gate and to the west, through an archway, is the entrance to the white
monastery building.  Gravel paths lead north and south around the monastery.
Centered in the middle of the path west is a huge, overflowing oak tree.
Its massive limbs rise across the garden and encase it nearly completely.
You get a great sense of peace from this tree, and also one of near timeless
age. "

extra{"tree", "oak tree"}
"This tree was supposidly a sapling of the Legendary Tree of Life. Although it
doesnt have the massive healing and regenative powers of its forebearer, it
still exudes a sense of peace and goodness."
movement SECT_FIELD
north to garden2;
south to garden8;
west to yard;
east to entrance;
ALWAYS_LIGHT
end

                             garden2

names {"monastery garden"}
title "Monastery Garden"
descr
"You are standing just outside the massive monastery housing the followers of
the 'Way of the Petal', the Udgaard healers. The large monastery rises into
the air, made of a gorgeous white marble. To the east the monastery's large
golden doors stand open, and a small path leads north and south around the
building."

movement SECT_FIELD
south to garden1;
west to garden3;
ALWAYS_LIGHT
end


                             garden3

names {"monastery garden"}
title "Monastery Garden"
descr
"You are walking on a small gravel path, inside the walls of the Udgaard
Healers
Guild Monastery. The monastery itself is to the south-west, and the path
continues west and south. "

movement SECT_FIELD
east to garden2;
west to garden4;
ALWAYS_LIGHT
end

                             garden4

names {"monastery garden"}
title "Monastery Garden"
descr
"You are standing on a small gravel path just inside the walls surrounding the
Udgaard Healers guild Monastery. The path leads around the monastery to the
east and south."

movement SECT_FIELD
south to garden5;
east to garden3;
ALWAYS_LIGHT
end


                             garden5

names {"monastery garden"}
title "Monastery Garden"
descr
"   You are on a small gravel path leading through a well-tended flourishing
garden, encircled by a whitewashed stone wall.  The path leads north and
south around the white monastery building to the east."
movement SECT_FIELD
north to garden4;
south to garden6;
ALWAYS_LIGHT
end


                             garden6

names {"monastery garden"}
title "Monastery Garden"
descr
"   You are on a small gravel path leading through a well-tended flourishing
garden, encircled by a whitewashed stone wall.  The path leads north and east
around the white monastery building to the northeast."
movement SECT_FIELD
north to garden5;
east to garden7;
ALWAYS_LIGHT
end


                             garden7

names {"monastery garden"}
title "Monastery Garden"
descr
"   You are on a small gravel path leading through a well-tended flourishing
garden, encircled by a whitewashed stone wall.  The path leads east and west
around the white monastery building to the north."
movement SECT_FIELD
east to garden8;
west to garden6;
ALWAYS_LIGHT
end


                             garden8

names {"monastery garden"}
title "Monastery Garden"
descr
"   You are on a small gravel path leading through a well-tended flourishing
garden, encircled by a whitewashed stone wall.  The path leads north and west
around the white monastery building to the northwest."
movement SECT_FIELD
north to garden1;
west to garden7;
ALWAYS_LIGHT
end



                               yard

names {"monastery foyer"}
title "Monastery Foyer"
descr
"You have entered the large entry chamber of the Udgaard Healers Guild's
monestary. The room has a tall roof, and a green marbled floor. There are
white marble columns leading across the room, and a spiral staircase leading
upwards into a higher floor. To the north is a sanctuary chamber, to the
south a refectory. The infirmary of the guild is to the west, and large golden
doors lie open to the east."

movement SECT_FIELD
north to sanctuary;
south to refectory;
east to garden1;
west to infirmary;
up to dormitory;
ALWAYS_LIGHT
end


                           sanctuary

names {"monastery sanctuary"}
title "Sanctuary"
descr
"   You are in a rather bare, but peaceful, room.  The heavy wall hangings in
tranquil colours and the stone statue at the north wall seem to be the only
decoration.  You can go south to the monastery yard. There is a big sign on
the wall."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
flags {UNIT_FL_SACRED}
movement SECT_INSIDE
south to yard;
extra {"statue"}
"It is a simple, but beautiful, statue of a man holding his hands out in
benediction."
ALWAYS_LIGHT
extra {"sign", "big sign"}
"&l                            The Healers' Guild

  'join'       - makes you join the guild (if you can).
  'insult'     - with the name of the guild master, it lets you leave.
  'title'      - to get a new title (if you deserve it!).

The Healer guild of Udgaard welcomes all people wishing to join us at
a cost of merely one silver piece.
If you choose to leave this guild and seek your own path of seeing
you must pay five gold pieces. Know that we will not accept you as
a member again if you choose to do so."

end


                           refectory

names {"monastery refectory"}
title "Refectory"
descr
"   You are in a rather bare room with long tables and hard benches made from
wood.  The white walls and the stone floor are scrupulously clean.  You can
go north to the monastery yard."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
movement SECT_INSIDE
north to yard;
ALWAYS_LIGHT
end


                           infirmary

names {"monastery infirmary"}
title "Infirmary"
descr
"  You are in a tranquil room with many soft-looking beds along the white
walls.  By the northern wall stands a statue of a man, holding his hands out
in benediction.  You can go east to the monastery yard, or through the
archway in the southern wall down into the crypt."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
flags {UNIT_FL_SACRED}
movement SECT_INSIDE
east to yard;
down to crypt;
ALWAYS_LIGHT
end

                           crypt

names {"monastery crypt"}
title "The Crypt"
descr
"You are in a dark and humid crypt, underneath the infirmary. A single
holy symbol is placed on the wall and a pair of torches illuminate this
cold place. Stairs lead back up."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
flags {UNIT_FL_SACRED}
movement SECT_INSIDE
up to infirmary;
ALWAYS_LIGHT
end

                           dormitory

names {"monastery dormitory"}
title "Dormitory"
descr
"  You are in a long dark low-celinged room directly below the roof.  Heavy
wooden beams support the countless red tiles and many thin, hard mattresses
lie on the floor, the covers neatly arranged.  A staircase leads down into
the monastery yard."
flags {UNIT_FL_NO_WEATHER, UNIT_FL_INDOORS}
flags {UNIT_FL_SACRED}
movement SECT_INSIDE
down to yard;
ALWAYS_LIGHT
end



/* ================================================================== */
/*                              MOBILES                               */
/* ================================================================== */
%mobiles

/* ---------------------------- TEACHERS ---------------------------- */

                             tuck

names {"tuck", "guild master", "master", "father tuck"}
title "Father Tuck"
descr "Father Tuck is sitting here, chanting softly."
extra {}
"You are in no doubt that Brother Tuck is truly close to divine forces;
he has a fat, peaceful, and loving look. You notice that he is surrounded
by a white aura. Brother Tuck is, as you ought to know, the Guild Master
of the Healers Guild."
flags {UNIT_FL_NO_TELEPORT}
romflags {CHAR_PROTECTED}

M_HUMAN_CLERIC_STAFF(90, SEX_MALE, "cast harm", "cast heal")
alignment 1000
money 2 IRON_PIECE
exp -100

special SFUN_GUILD_BASIS GUILD_UDG_CLERIC

special SFUN_GUILD_MASTER
"&lGuild               = ~"+GUILD_UDG_CLERIC+"~
Guild Enter Quest    = ~~
Guild Enter Cost     = "+(1*SILVER_MULT)+"&n
Guild Leave Quest    = ~~
Guild Leave Cost     = "+(5*GOLD_MULT)+"&n
Guild Exclude Quest  = ~Udgaard Cleric Quitter~"

special SFUN_GUILD_TITLES
GUILD_UDG_CLERIC+"&l
the %s Believer
the %s Believer
the %s Attendant
the %s Attendant
the %s Acolyte
the %s Acolyte
the %s Novice
the %s Novice
the %s Missionary
the %s Missionary
the %s Adept
the %s Adept
the %s Deacon
the %s Deaconess
the %s Vicar
the %s Vicaress
the %s Priest
the %s Priestess
the %s Levite
the %s Levitess
the %s Canon
the %s Canon
the %s Minister
the %s Lady Minister
the %s Curate
the %s Curess
the %s Monk
the %s Nunne
the %s Healer
the %s Healess
the %s Chaplain
the %s Chaplain
the %s Expositor
the %s Expositress
the %s Bishop
the %s Bishop
the %s Arch Bishop
the %s Arch Lady of the Church
the %s Patriarch
the %s Matriarch"

dilcopy healer_give@clericguild();
end


                           isabella

names {"isabella"}
title "Isabella"
descr "Isabella is standing here, practicing her skills."
extra {}
"Isabella is tall, slender and yet muscular, her flaming red hair glitters
when she moves about. Isabella is a skilled warrior, ready to teach Healers
how to defend themselves."

flags {UNIT_FL_NO_TELEPORT}
romflags {CHAR_PROTECTED}

M_HUMAN_CLERIC_HAMMER(80, SEX_FEMALE, "cast harm", "cast heal")
alignment 1000
exp -100

special SFUN_GUILD_BASIS GUILD_UDG_CLERIC
special SFUN_MEMBERS_ONLY GUILD_UDG_CLERIC+"#$1n says, 'I only teach true
believers, begone $3n, you foul atheist.'"

#define _WEAPON
#include "guilddef.h"
#undef _WEAPON

end


                           bartholomew

names {"bartholomew"}
title "Bartholomew"
descr "Bartholomew is here, chanting softly."
extra {}
"Bartholomew is ready to teach you skills that are essential to every
respectable Healer."
flags {UNIT_FL_NO_TELEPORT}
romflags {CHAR_PROTECTED}

M_HUMAN_CLERIC_HAMMER(80, SEX_MALE, "cast harm", "cast heal")
alignment 1000
money 10 IRON_PIECE
exp -100

special SFUN_GUILD_BASIS GUILD_UDG_CLERIC

special SFUN_MEMBERS_ONLY GUILD_UDG_CLERIC+"#$1n says, 'I only teach true
believers, begone $3n, you foul atheist.'"

#define _SKILL
#include "guilddef.h"
#undef _SKILL

end


                          tack
names {"tack"}
title "Tack"
descr "Brother Tack is here, chanting softly."
extra {}
"Brother Tack is ready to improve your abilities."
flags {UNIT_FL_NO_TELEPORT}
romflags {CHAR_PROTECTED}

M_HUMAN_CLERIC_HAMMER(80, SEX_MALE, "cast harm", "cast heal")
alignment 1000
money 2 IRON_PIECE
exp -100

special SFUN_GUILD_BASIS GUILD_UDG_CLERIC

special SFUN_MEMBERS_ONLY GUILD_UDG_CLERIC+"#$1n says, 'I only teach true
believers, begone $3n, you foul atheist.'"

#define _ABILITY
#include "guilddef.h"
#undef _ABILITY

end


                               tick

names {"tick"}
title "Tick"
descr "Brother Tick is here, chanting softly."
extra {}
"You are in no doubt that Brother Tick is truly close to divine forces;
he has a fat, peaceful, and loving look. You notice that he is surrounded
by a white aura."
flags {UNIT_FL_NO_TELEPORT}
romflags {CHAR_PROTECTED}

M_HUMAN_CLERIC_HAMMER(80, SEX_MALE, "cast harm", "cast heal")
alignment 1000
money 2 IRON_PIECE
exp -100

special SFUN_GUILD_BASIS GUILD_UDG_CLERIC

special SFUN_MEMBERS_ONLY GUILD_UDG_CLERIC+"#$1n says, 'I only teach true
believers, begone $3n, you foul atheist.'"

#define _SPELL
#include "guilddef.h"
#undef _SPELL

end

                            morenae

names {"sister Morenae","sister","morenae"}
title "sister Morenae"
descr "Sister Morenae is here, contemplating the evil of her past life."
extra {}
"Once a teacher of the darker side of the divine forces, sister Morenae
has long ago abandoned her evil ways and spends her time praying and
aiding the poor."
flags {UNIT_FL_NO_TELEPORT}
romflags {CHAR_PROTECTED}

M_HUMAN_CLERIC_HAMMER(80, SEX_FEMALE, "cast harm", "cast heal")
alignment 800
money 2 IRON_PIECE
exp -100

special SFUN_GUILD_BASIS GUILD_UDG_CLERIC

end

/* -------------------------- GUILD GUARDS -------------------------- */


                            gate_guard

names {"guard"}
title "the Guard"
descr "A guard is here, guarding the entrance to the Monastery."
extra {} "A fairly heavy duty guard."
flags {UNIT_FL_NO_TELEPORT}
romflags {CHAR_PROTECTED}

M_HUMAN_CLERIC_STAFF(150, SEX_MALE, "cast harm", "cast heal")
alignment 1000
money 5 IRON_PIECE

special SFUN_GUILD_BASIS GUILD_UDG_CLERIC
special SFUN_TEAMWORK "guard"
special SFUN_RESCUE "guard"
/* Guard WEST (3), GUILD_UDG_CLERIC */
special SFUN_GUILD_GUARD_WAY
""+"west"+"#"+GUILD_UDG_CLERIC+"#entrance#guard#$1n stops you and says,
'Healers only!'#$1n stops $3n, and says, 'Healers only!'"
end


/* ================================================================== */
/*                              OBJECTS                               */
/* ================================================================== */
%objects

                             hammer
names {"war hammer","hammer"}
title "a war hammer"
descr "A medium-sized war hammer is here."
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
/* Iron + Craftman ship = + 0% */
WEAPON_DEF(WPN_WAR_HAMMER, 0, 0)
weight 6
cost 1 COPPER_PIECE,4 IRON_PIECE
end

                             staff
names {"white staff","staff"}
title "a white staff"
descr "A white healer's staff lies here."
extra {}
"A white staff of a healer, a snake carved into the wood."
manipulate {MANIPULATE_TAKE, MANIPULATE_WIELD}
WEAPON_DEF(WPN_QUARTERSTAFF,0,0)
weight 2
cost 1 COPPER_PIECE,4 IRON_PIECE
end

robes
names {"white robes","robes","robe"}
title "white robes of a healer"
descr "Some white robes lie here."
extra {}
"White robes of a healer, marked with a holy symbol on the chest."
ARMOUR_CLOTHES(0,0)
manipulate {MANIPULATE_TAKE,MANIPULATE_WEAR_ABOUT}
cost 2 SILVER_PIECE
weight 2
end

sandals
names {"sandals","pair"}
title "a pair of sandals"
descr "A pair of sandals lies here."
extra {}
"A pair of leather-thonged sandals."
ARMOUR_LEATHER(0,-3)
manipulate {MANIPULATE_TAKE,MANIPULATE_WEAR_FEET}
weight 1
cost 2 COPPER_PIECE
end

/* Spiritual Hammer - this weapon appears when a Healer wears his Silver
Torc and types the codeword 'pray'. The hammer will stay in his hand for
a while before flicking to give a warning and then disappearing. It will
also disappear when removed. The weapon has a random Magic Bonus value
(0-3) and cannot be stolen from the player. Activation of the weapon
takes 5-8 Mana points and cannot proceed if the player is already
wielding a weapon. */


sp_hammer
names {"Spiritual Hammer","hammer"}
title "&c+wSpiritual Hammer&cw"
descr "A hammer seems to fade away as you approach."
extra {}
"A weapon of pure magic, this hammer is a personification of your faith,
given shape by the Silver Torc. It seems to be an extension of the hand,
rather than an independant weapon... it flares and radiates warmth,
pleasant to the body. You recognise the magic composing the weapon and
know that it will probably cease to exist after a while."
extra {"$identify"}
"The Spiritual Hammer is is part of one's very being. It will only exist
in physical world for a while and will be gone instantly if if you let
go of it. In case of wielder's death, it will simply fade away into
nothingness, merging once again with the creator's soul.&n
Calling forth the hammer sharpens your combat senses, slightly improving
your strength.&n"
extra {"$improved identify"}
"The strength bonus is +1.The hammer varies in its magic bonus, however,
it never surpasses 3. The craftmanship of the spiritual weapon is 0.&n"
extra {"$wear_s"}
"You wield a $2n.&n
&c+wThis is a bug, Spiritual Hammers should not be wielded in this way!
Please report.&cw"
extra {"$wear_o"}
"&c+wA flare illuminates $1n's body for a second as $1e wields a $2n!&cw"
extra {"$rem_s"}
"As you let go of your $2n, it flickers and starts to fade..."
extra {"$rem_o"}
"$1n lets go of $1s $2n, it flickers and fades away..."
manipulate {MANIPULATE_TAKE,MANIPULATE_WIELD}
WEAPON_DEF(WPN_WAR_HAMMER,0,0)
STR_TRANSFER(+1)
flags {UNIT_FL_MAGIC}
romflags {OBJ_NO_DUAL}
dilcopy guild_restrict@function ({GUILD_UDG_CLERIC},0,25,"");

dilbegin recall hammercopies();
var
blah : integer;
pc : unitptr;
code
{
:start:
pc := self.outside;
secure(pc,gone);
dilcopy("hammernosteal@clericguild",pc);
dilcopy("hammer_vanish@clericguild",pc);
:gone:
blah := dildestroy("hammercopies@clericguild",self);
unsecure(pc);
}
dilend


dilbegin recall hammerremove();
var
pc : unitptr;
blah : integer;
blih : integer;
code
{
wait(SFB_DONE,(command("remove"))and(medium.nameidx == "sp_hammer")and
(activator == self.outside));

pc := activator;
secure(pc,gone);
act("Your $2n fades from the reality and re-joins your soul.",
A_ALWAYS,self.outside,self,null,TO_CHAR);
:gone:
blah := dildestroy("hammernosteal@clericguild",pc);
blih := dildestroy("hammer_vanish@clericguild",pc);
unsecure(pc);
destroy(self);
}
dilend


end


       heal_torc
names {"Silver Torc","torc"}
title "&c+wSilver Torc&cw"
descr "A silvery torc lies on the ground, sparkling brightly."
extra {}
"Torc of white silver, symbol of Udgaard Healers, beautifully ornamented.
Sigla of healing cover the torc. Apparently it is a dedicated item of the
Healers. A small inscription in gold letters borders the torc."
extra {"sigla on the Torc","sigla","sigil","sigils"}
"The sigla form an enchantment to boost your clerical abilities.&n"
extra {"inscription on the torc","inscription"}
"The inscription reads: 'PRAY and you shall receive'.&n"
extra {"$identify"}
"The torc will increase your Divine Contact as well as your skill in
Divine Sphere. It also makes you more proficient and First Aid.&n
By praying while the torc is worn a spiritual weapon is called forth into
your hand.&n"
extra {"$improved identify"}
"Bonuses are +1 Div and +1% Divine Sphere, as well as 3% First Aid.&n
The Spiritual Hammer will last for a short time, partly depending on your
Div and Cha, then disappear. Calling forth the weapon will sharpen your
combat reflexes, increasing your strength by 1.&n"
extra {"$wear_s"}
"You put on the $2n.&n
You feel proud.&n"
extra {"$wear_s"}
"$1n puts on a $2n."
manipulate {MANIPULATE_TAKE,MANIPULATE_WEAR_NECK}
MATERIAL_METAL("This item is made of silver.")
SKILL_TRANSFER(SKI_FIRST_AID,+2)
       
dilcopy guild_restrict@function ({GUILD_UDG_CLERIC},0,25,"");
dilcopy abi_restrict@function (ABIL_DIV,10,0,25,"");
dilcopy abi_restrict@function (ABIL_BRA,8,0,25,"");
dilcopy level_restrict@function (5,0,25,"");
weight 1
rent 57 IRON_PIECE

dilbegin recall aware spirithammer ();
var
item : unitptr;
pc : unitptr;
flux : integer;
masher : unitptr;
code
{
:init:
heartbeat := PULSE_SEC*1;

:start:
wait(SFB_CMD,(command("pray"))and
((self.equip==WEAR_NECK_1)or(self.equip==WEAR_NECK_2)) and
(activator==self.outside));
block;
pc := activator;
flux := rnd(0,3);
secure(pc,gone);
act("You touch your $2n and pray silently for aid."
,A_ALWAYS,pc,self,null,TO_CHAR);
act("$1n touches $1s $2n, $1s lips moving in a silent prayer."
,A_ALWAYS,pc,self,null,TO_REST);
if (pc.mana < 6)
{
act("The magic fades, your magic cannot sustain a weapon!"
,A_ALWAYS,pc,self,null,TO_CHAR);
act("$1n's magic fades away."
,A_ALWAYS,pc,self,null,TO_REST);unsecure(pc);
goto start;
}
masher := (equipment(pc,WEAR_WIELD));
if (masher)
{
act("Your magic fades, you are already wielding a weapon!"
,A_ALWAYS,pc,self,null,TO_CHAR);
act("$1n's magic fades away."
,A_ALWAYS,pc,self,null,TO_REST);
goto gone;
}
else
{
pc.mana := (pc.mana-((flux*2)+4));
act("&c+wYou extend your arm, with a flash of light a hammer forms in your "+
"hand!&cw" ,A_ALWAYS,pc,self,null,TO_CHAR);
act("&c+w$1n extends $1s arm, with a flash of light a hammer forms in $1s "+
"hand!&cw" ,A_ALWAYS,pc,self,null,TO_REST);
item := load("sp_hammer@clericguild");
item.height := pc.height;
item.value[2] := flux;
link(item,pc);
addequip(item,WEAR_WIELD);
unsecure(pc);
goto start;
}
:gone:
unsecure(pc);
goto start;
}
dilend

end


/* ================================================================== */
/*                            ZONE RESET                              */
/* ================================================================== */
%reset

/* Load teachers */

load tuck into sanctuary max 1
{
equip robes position WEAR_ABOUT
equip sandals position WEAR_FEET
   equip staff position WEAR_WIELD
equip udgaard/holybook WEAR_HOLD
}

load isabella into garden4 max 1
{
equip robes position WEAR_ABOUT
equip sandals position WEAR_FEET
   equip hammer position WEAR_WIELD
   equip midgaard/smetal_shield position WEAR_SHIELD
}

load bartholomew into infirmary max 1
{
equip robes position WEAR_ABOUT
equip sandals position WEAR_FEET
   equip udgaard/hand_mace position WEAR_WIELD
}

load tack into yard max 1
{
equip robes position WEAR_ABOUT
equip sandals position WEAR_FEET
   equip udgaard/hand_mace position WEAR_WIELD
}

load tick into garden7 max 1
{
equip robes position WEAR_ABOUT
equip sandals position WEAR_FEET
   equip hammer position WEAR_WIELD
}

load morenae into crypt max 1
{
equip robes position WEAR_ABOUT
equip sandals position WEAR_FEET
equip udgaard/holybook WEAR_HOLD
}

load gate_guard into entrance max 2
{
  equip midgaard/iron_bracers  position WEAR_ARMS
  equip midgaard/iron_plate    position WEAR_BODY
  equip midgaard/iron_leggings position WEAR_LEGS
  equip midgaard/iron_boots    position WEAR_FEET
  equip midgaard/iron_gloves   position WEAR_HANDS
  equip midgaard/iron_helmet   position WEAR_HEAD
  equip midgaard/spear0        position WEAR_WIELD
}

load gate_guard into entrance max 2
{
  equip midgaard/iron_bracers  position WEAR_ARMS
  equip midgaard/iron_plate    position WEAR_BODY
  equip midgaard/iron_leggings position WEAR_LEGS
  equip midgaard/iron_boots    position WEAR_FEET
  equip midgaard/iron_gloves   position WEAR_HANDS
  equip midgaard/iron_helmet   position WEAR_HEAD
  equip midgaard/spear0        position WEAR_WIELD
}

%end