diff --git a/kod/object/item/passitem/ring/makefile b/kod/object/item/passitem/ring/makefile index 51ea104843..dbe0149b37 100644 --- a/kod/object/item/passitem/ring/makefile +++ b/kod/object/item/passitem/ring/makefile @@ -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 diff --git a/kod/object/item/passitem/ring/shalring.kod b/kod/object/item/passitem/ring/shalring.kod new file mode 100644 index 0000000000..ba146e825e --- /dev/null +++ b/kod/object/item/passitem/ring/shalring.kod @@ -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 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/kod/util/system.kod b/kod/util/system.kod index aa5dd35d88..3965080d12 100644 --- a/kod/util/system.kod +++ b/kod/util/system.kod @@ -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);