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
12 changes: 11 additions & 1 deletion kod/object/item/passitem/defmod/helmet.kod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ resources:

include helmet.lkod

Helmet_icon_male_rsc = helm.bgf
Helmet_icon_female_rsc = helmb.bgf
helmet_condition_exc = " is in flawless condition."
helmet_condition_exc_mended = " is in great condition, but has been patched before."
helmet_condition_good = " is stained with blood but otherwise in good condition."
Expand All @@ -43,6 +45,9 @@ classvars:
// Circlets and Ivy Circlets are layer 1, to be worn over helmets and masks.
viLayer = 0

vrMaleIcon = Helmet_icon_male_rsc
vrFemaleIcon = Helmet_icon_female_rsc

properties:


Expand All @@ -66,7 +71,12 @@ messages:

GetOverlay(animation = $)
{
return vrIcon;
if send(poOwner,@GetGender) = GENDER_FEMALE
{
return vrFemaleIcon;
}

return vrMaleIcon;
}

GetOverlayHotspot(animation = $)
Expand Down
142 changes: 142 additions & 0 deletions kod/object/item/passitem/defmod/helmet/knightshelm.kod
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
// 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.


///////////////////////////////////////////////////////////////////////////////
KnightsHelm is Helmet

constants:

include blakston.khd

resources:

KnightsHelm_name_rsc = "knight's helm"
KnightsHelm_icon_male_rsc = khelm.bgf
KnightsHelm_icon_female_rsc = khelmb.bgf
KnightsHelm_desc_rsc = \
"Crafted from solid steel plates, this helm offers far more protection"
" than a padded helmet."

classvars:

vrName = KnightsHelm_name_rsc
vrDesc = KnightsHelm_desc_rsc
vrIcon = KnightsHelm_icon_male_rsc

viHits_init_min = 250
viHits_init_max = 300

viValue_average = 100
viWeight = 70
viBulk = 30

viUse_type = ITEM_USE_HEAD
viUse_amount = 1
viSpell_modifier = -15

viGround_group = 3
viInventory_group = 2
viBroken_group = 4

viDefense_base = 50
viDamage_base = 3

vrMaleIcon = KnightsHelm_icon_male_rsc
vrFemaleIcon = KnightsHelm_icon_female_rsc

properties:

messages:

ReqUseSomething(what = $)
{
if IsClass(what,&DefenseModifier)
AND Send(what,@GetItemUseType) & ITEM_USE_HEAD
{
if Send(poOwner,@TryUnuseItem,#what=self)
{
propagate;
}
else
{
return FALSE;
}
}

propagate;
}

ReqUse()
{
local i;

if IsClass(poOwner,&Player)
{
foreach i in Send(poOwner,@GetPlayerUsing)
{
if IsClass(i,&DefenseModifier)
AND Send(i,@GetItemUseType) & ITEM_USE_HEAD
{
Send(poOwner,@TryUnuseItem,#what=i);
}
}
}

propagate;
}

NewUsed()
{
Send(poOwner,@RemoveHair,#what=self);

propagate;
}

NewUnused()
{
Send(poOwner,@ResetHair,#what=self);

propagate;
}

GetNumberOverlays()
{
return 1;
}

GetOverlayHotspot(animation = $)
{
return HS_HELM;
}

SendOverlayAnimation(animation = $)
{
if (piItem_flags & ITEM_PALETTE_MASK) <> 0
{
AddPacket(1,ANIMATE_TRANSLATION, 1,piItem_flags & ITEM_PALETTE_MASK,
1,ANIMATE_NONE, 2,1);
}
else
{
AddPacket(1,ANIMATE_TRANSLATION, 1,0, 1,ANIMATE_NONE, 2,1);
}

return;
}

GetResistanceModifiers()
{
return [ [ATCK_WEAP_SLASH,5],
[-ATCK_SPELL_FIRE,-10],
[-ATCK_SPELL_SHOCK,-10]
];
}

end
///////////////////////////////////////////////////////////////////////////////
2 changes: 1 addition & 1 deletion kod/object/item/passitem/defmod/helmet/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
!include $(TOPDIR)\common.mak

DEPEND = ..\helmet.bof
BOFS = helm.bof circlet.bof ivycircl.bof simphelm.bof mask.bof
BOFS = helm.bof circlet.bof ivycircl.bof simphelm.bof mask.bof knightshelm.bof

!include $(KODDIR)\kod.mak
10 changes: 0 additions & 10 deletions kod/object/item/passitem/defmod/helmet/mask.kod
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ messages:
return;
}

GetOverlay(animation = $)
{
if Send(poOwner,@GetGender) = GENDER_FEMALE
{
return vrFemaleIcon;
}

return vrMaleIcon;
}

GetMinimapDotFlags()
{
// Special item, add minimap dot.
Expand Down
4 changes: 2 additions & 2 deletions kod/object/item/passitem/defmod/helmet/mask/shrnkmsk.kod
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ messages:

propagate;
}

ReqUse()
{
local i;
Expand Down Expand Up @@ -91,7 +91,7 @@ messages:
// Make all the face overlays invis, and remove hair.
Send(poOwner,@SetEyes,#eyes=admin_icon_blank);
Send(poOwner,@SetNose,#nose=admin_icon_blank);
Send(poOwner,@SetMouth,#mouth=admin_icon_blank);
Send(poOwner,@SetMouth,#mouth=admin_icon_blank);
Send(poOwner,@RemoveHair,#what=self);

if Send(poOwner,@GetGender) = GENDER_FEMALE
Expand Down
10 changes: 7 additions & 3 deletions kod/object/item/passitem/defmod/helmet/simphelm.kod
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ resources:
include simphelm.lkod

SimpleHelm_name_rsc = "helm"
SimpleHelm_icon_rsc = helm.bgf
SimpleHelm_icon_male_rsc = helm.bgf
SimpleHelm_icon_female_rsc = helmb.bgf
SimpleHelm_desc_rsc = \
"Steel and chain links give moderate protection to the wearer of this padded helmet."
"Steel and chain links give moderate protection to the wearer of this padded helmet."

classvars:

vrName = SimpleHelm_name_rsc
vrDesc = SimpleHelm_desc_rsc
vrIcon = SimpleHelm_icon_rsc
vrIcon = SimpleHelm_icon_male_rsc

viHits_init_min = 200
viHits_init_max = 225
Expand All @@ -47,6 +48,9 @@ classvars:
viDefense_base = 20
viDamage_base = 1

vrMaleIcon = SimpleHelm_icon_male_rsc
vrFemaleIcon = SimpleHelm_icon_female_rsc

properties:


Expand Down
1 change: 1 addition & 0 deletions kod/util/system.kod
Original file line number Diff line number Diff line change
Expand Up @@ -5754,6 +5754,7 @@ messages:
// Head
plItemTemplates = cons(create(&Helm),plItemTemplates);
plItemTemplates = cons(create(&SimpleHelm),plItemTemplates);
plItemTemplates = cons(create(&KnightsHelm),plItemTemplates);
plItemTemplates = cons(create(&IvyCirclet),plItemTemplates);
plItemTemplates = cons(create(&Circlet),plItemTemplates);

Expand Down
Binary file added resource/graphics/diggie/bta.bgf
Binary file not shown.
Binary file added resource/graphics/diggie/khelm.bgf
Binary file not shown.
Binary file added resource/graphics/diggie/khelmb.bgf
Binary file not shown.
4 changes: 2 additions & 2 deletions resource/graphics/diggie/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ OUTDIR = .
.SUFFIXES: .bbg

BGFS = neeleme.bgf neelemeX.bgf iunholyt.bgf xeoneru.bgf xeoneruX.bgf \
pear.bgf peartree.bgf orange.bgf orangetree.bgf cookie.bgf \
mmdrat.bgf mfdrat.bgf arrowgold.bgf
pear.bgf peartree.bgf orange.bgf orangetree.bgf cookie.bgf \
mmdrat.bgf mfdrat.bgf arrowgold.bgf khelm.bgf khelmb.bgf

!include $(RESOURCEDIR)\copy.mak

Expand Down