diff --git a/kod/object/item/passitem/defmod/helmet.kod b/kod/object/item/passitem/defmod/helmet.kod index 22efbe3a71..de57b37f92 100644 --- a/kod/object/item/passitem/defmod/helmet.kod +++ b/kod/object/item/passitem/defmod/helmet.kod @@ -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." @@ -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: @@ -66,7 +71,12 @@ messages: GetOverlay(animation = $) { - return vrIcon; + if send(poOwner,@GetGender) = GENDER_FEMALE + { + return vrFemaleIcon; + } + + return vrMaleIcon; } GetOverlayHotspot(animation = $) diff --git a/kod/object/item/passitem/defmod/helmet/knightshelm.kod b/kod/object/item/passitem/defmod/helmet/knightshelm.kod new file mode 100644 index 0000000000..9b735861bf --- /dev/null +++ b/kod/object/item/passitem/defmod/helmet/knightshelm.kod @@ -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 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/kod/object/item/passitem/defmod/helmet/makefile b/kod/object/item/passitem/defmod/helmet/makefile index 36378f5275..807d8910a1 100644 --- a/kod/object/item/passitem/defmod/helmet/makefile +++ b/kod/object/item/passitem/defmod/helmet/makefile @@ -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 diff --git a/kod/object/item/passitem/defmod/helmet/mask.kod b/kod/object/item/passitem/defmod/helmet/mask.kod index d4cb70c084..44fcffffeb 100644 --- a/kod/object/item/passitem/defmod/helmet/mask.kod +++ b/kod/object/item/passitem/defmod/helmet/mask.kod @@ -49,16 +49,6 @@ messages: return; } - GetOverlay(animation = $) - { - if Send(poOwner,@GetGender) = GENDER_FEMALE - { - return vrFemaleIcon; - } - - return vrMaleIcon; - } - GetMinimapDotFlags() { // Special item, add minimap dot. diff --git a/kod/object/item/passitem/defmod/helmet/mask/shrnkmsk.kod b/kod/object/item/passitem/defmod/helmet/mask/shrnkmsk.kod index b2a961186d..8d9bfaf1ff 100644 --- a/kod/object/item/passitem/defmod/helmet/mask/shrnkmsk.kod +++ b/kod/object/item/passitem/defmod/helmet/mask/shrnkmsk.kod @@ -61,7 +61,7 @@ messages: propagate; } - + ReqUse() { local i; @@ -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 diff --git a/kod/object/item/passitem/defmod/helmet/simphelm.kod b/kod/object/item/passitem/defmod/helmet/simphelm.kod index dde579ad62..d5a6c34508 100644 --- a/kod/object/item/passitem/defmod/helmet/simphelm.kod +++ b/kod/object/item/passitem/defmod/helmet/simphelm.kod @@ -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 @@ -47,6 +48,9 @@ classvars: viDefense_base = 20 viDamage_base = 1 + vrMaleIcon = SimpleHelm_icon_male_rsc + vrFemaleIcon = SimpleHelm_icon_female_rsc + properties: diff --git a/kod/util/system.kod b/kod/util/system.kod index 1e09d2f6ed..bd3df471ed 100644 --- a/kod/util/system.kod +++ b/kod/util/system.kod @@ -5735,6 +5735,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); diff --git a/resource/graphics/diggie/bta.bgf b/resource/graphics/diggie/bta.bgf new file mode 100644 index 0000000000..2027acd76b Binary files /dev/null and b/resource/graphics/diggie/bta.bgf differ diff --git a/resource/graphics/diggie/khelm.bgf b/resource/graphics/diggie/khelm.bgf new file mode 100644 index 0000000000..6286da58fc Binary files /dev/null and b/resource/graphics/diggie/khelm.bgf differ diff --git a/resource/graphics/diggie/khelmb.bgf b/resource/graphics/diggie/khelmb.bgf new file mode 100644 index 0000000000..d3b754c8fd Binary files /dev/null and b/resource/graphics/diggie/khelmb.bgf differ diff --git a/resource/graphics/diggie/makefile b/resource/graphics/diggie/makefile index 239ac73d0b..b8e6ebc687 100644 --- a/resource/graphics/diggie/makefile +++ b/resource/graphics/diggie/makefile @@ -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