Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kod/object/item/passitem/ring/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

DEPEND = ..\ring.bof
BOFS = ringinv.bof lethring.bof besring.bof resring.bof \
ringwedd.bof ringsgnt.bof ringreag.bof ringdefense.bof
ringwedd.bof ringsgnt.bof ringreag.bof ringdefense.bof \
shalring.bof

!include $(KODDIR)\kod.mak
92 changes: 92 additions & 0 deletions kod/object/item/passitem/ring/shalring.kod
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
% Meridian 59, Copyright 1994-2012 Andrew Kirmse and Chris Kirmse.
% All rights reserved.
%
% This software is distributed under a license that is described in
% the LICENSE file that accompanies it.
%
% Meridian is a registered trademark.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShalRing is Ring

constants:

include blakston.khd

resources:

ShalRing_name_rsc = "ring of Shal'ille"
ShalRing_icon_rsc = ring02.bgf
ShalRing_desc_rsc = \
"This ring is beautiful and calming. "
"A message inscribed on the inside of this magical "
"device reads \"May you live a long life.\""

ShalRing_cant = "You are not worthy to wear the ring of Shal'ille"

classvars:

viValue_average = 350
viWeight = 10
viBulk = 5

viUse_amount = 1

viGround_group = 1
viInventory_group = 1

properties:

piHealth_change = 0

vrName = ShalRing_name_rsc
vrIcon = ShalRing_icon_rsc
vrDesc = ShalRing_desc_rsc

messages:

NewUsed()
{
local iHealthMod;

iHealthMod = 10;
piHealth_change = Send(poOwner,@GainMaxHealth,#amount=iHealthMod);

propagate;
}

GetHealthChange()
{
return piHealth_change;
}

NewUnused()
{
Send(poOwner,@GainMaxHealth,#amount=-piHealth_change);

piHealth_change = 0;

propagate;
}

ReqUse()
{
if Send(poOwner,@GetKarma) > 30
{
Send(poOwner,@MsgSendUser,#message_rsc=ShalRing_cant);

return FALSE;
}

propagate;
}

AdjustsMaxHealth()
{
return TRUE;
}


end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1 change: 1 addition & 0 deletions kod/util/system.kod
Original file line number Diff line number Diff line change
Expand Up @@ -5564,6 +5564,7 @@ messages:
plItemTemplates = cons(create(&RingInvisibility),plItemTemplates);
plItemTemplates = cons(create(&BerserkerRing),plItemTemplates);
plItemTemplates = cons(create(&RingOfLethargy),plItemTemplates);
plItemTemplates = cons(create(&ShalRing),plItemTemplates);

plItemTemplates = cons(create(&AcidRing),plItemTemplates);
plItemTemplates = cons(create(&ShockRing),plItemTemplates);
Expand Down