<data>
	<items>
		<itemTemplate r_name="'mainWeaponTemplate'" r_template="'mainItemTemplate'"
									actionVerb="text.actionVerbStrikes"
									attackAnimation="(slot=='twohands')?'attack2H':'attackMH'"
									itemTags="{}"
									ranged="0"
									weaponMinRange="1"
									weaponMaxRange="1"
									weaponFatigueCost="2"
									weaponSpeed="100"
									slot="'mainhand'"
									targetSlot2="''"
									mainCombatSkillName="'CloseCombat'"
									mainCombatSkill="CloseCombat"
									weaponSkillName="'ToBeReplaced'"
									weaponSkill="attributeByName(weaponSkillName)"
									baseWeaponHitBonus="0"
									weaponHitBonus="baseWeaponHitBonus+weaponSkill+mainCombatSkill/2-ItemPenalty+enhancementBonus+(ranged?customRangedHitBonus:customCloseCombatHitBonus)"
									baseWeaponDamage="0"
									attributeWeaponDamage="Strength"
									weaponDamage="baseWeaponDamage+attributeWeaponDamage+mainCombatSkill/2+enhancementBonus+(ranged?customRangedDamageBonus:customCloseCombatDamageBonus)"
									weaponAdditionalDamage="0"
									baseWeaponPiercingDamage="0"
									weaponPiercingDamage="baseWeaponPiercingDamage+(ranged?customRangedPiercingBonus:customCloseCombatPiercingBonus)"
									weaponIgnoreArmor="0"
									weaponCriticalPercentage="5"
									weaponCriticalDamage="5+Dexterity"
									enhancementBonus="0"
									properties="((enhancementBonus>0)?{('+'+enhancementBonus)}:{})"
									nameModifiers="((enhancementBonus>0)?{('+'+enhancementBonus)}:{})"
									tooltip="relocate(text.tooltipWeapon)"
									handTooltip="text.handTooltipMainHand"
									weaponAnimationFlag="'1main'">
			<action r_name="'attackAction'" r_template="'mainActionWithFatigueTemplate'"
							actionTags="itemTags"
							canBeInActionList="r_canExecute"
							r_autoAddToActionList="0"
							canTargetFaction="(actor.r_hostileFaction)[target.r_faction]"
							actionEffectTemplate="{'mainTargetEffectTemplate'}+(ranged?{'weaponRangedAttackEffect'}:{'weaponCloseCombatAttackEffect'})"
							actionLogMethod="'logAttackWithDamage'"
							r_minRange="weaponMinRange"
							r_range="min(weaponMaxRange,r_viewRange)"
							timeCost="weaponSpeed"
							fatigueCost="weaponFatigueCost"
							damageDone="0"
							isCritical="0">
				<modifier r_name="'enabled'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_enabled'" r_modifiedValue="$0&&w_equipped"/>
				<modifier r_name="'canExecute'" r_template="'mainModifierTemplate'" r_modifierTarget="'r_canExecute'" r_modifiedValue="$0&&w_equipped"/>
				<effect r_name="'mainEffect'"
								weaponEffectiveAdditionalBonus="0">
					<effect r_name="'evaluateRolls'">
						<effect r_name="'isCritical'" r_template="{'mainActorEffectTemplate','evaluationEffect'}" r_effect="isCritical=((weaponCriticalPercentage>=1D100)&&(target.suffersCritical))"/>
						<effect r_name="'additionalDamage'" r_template="{'mainActorEffectTemplate','evaluationEffect'}" r_effect="weaponEffectiveAdditionalBonus=weaponAdditionalDamage"/>
					</effect>
					<effect r_name="'hitEffect'"
									offensiveDamageBonus="weaponDamage+(isCritical?weaponCriticalDamage:0)+weaponEffectiveAdditionalBonus"
									armorPiercing="weaponPiercingDamage"
									attackIgnoreArmor="weaponIgnoreArmor">
						<effect r_name="'damage'"
										damageAnimation="'effecthit'"
										damageSound="'hit.mp3'"/>
						<effect r_name="'damageDone'" r_template="{'mainActorEffectTemplate','evaluationEffect'}" r_effect="damageDone=resultingDamage"/>
					</effect>
					<effect r_name="'missEffect'">
						<effect r_name="'damageDone'" r_template="{'mainActorEffectTemplate','evaluationEffect'}" r_effect="damageDone=0"/>
					</effect>
					<effect r_name="'anim'" r_template="'mainGraphicEffectTemplate'" r_enabled="isAnimated" r_type="'LaunchAnimation'" r_graphicTarget="actorName" r_animationName="attackAnimation" r_freezeDelay="3"/>
				</effect>
			</action>
		</itemTemplate>
		
		<itemTemplate r_name="'mainOneHandWeaponTemplate'" r_template="'mainWeaponTemplate'"
									slot="'onehand'"
									targetSlot="'mainhand'"
									targetSlot2="'offhand'"
									mainCombatSkill="CloseCombat"
									handTooltip="text.handTooltipOneHand"/>
		
		<itemTemplate r_name="'mainTwoHandsWeaponTemplate'" r_template="'mainWeaponTemplate'"
									slot="'twohands'"
									targetSlot="'mainhand'"
									mainCombatSkill="CloseCombat"
									attributeWeaponDamage="1.5*Strength"
									handTooltip="text.handTooltipTwoHands"/>
		
		<itemTemplate r_name="'mainRangedWeaponTemplate'" r_template="'mainWeaponTemplate'"
									actionVerb="text.actionVerbShoots"
									ranged="1"
									weaponMinRange="2"
									slot="'ranged'"
									missileGraphic="'slimeballRed.png'"
									mainCombatSkillName="'RangedCombat'"
									mainCombatSkill="RangedCombat"
									attributeWeaponDamage="Dexterity"
									handTooltip="text.handTooltipRanged">
			<action r_name="'attackAction'">
				<effect r_name="'mainEffect'">
					<effect r_name="'missileGraphic'" r_template="'missileGraphicTemplate'"/>
				</effect>
			</action>
		</itemTemplate>

		<itemTemplate r_name="'DaggerTemplate'" r_template="'mainOneHandWeaponTemplate'"
									itemTags="{'slashing'}"
									weaponCriticalPercentage="10"
									weaponSpeed="80"
									weaponSkillName="'Dagger'"
									weaponSkill="Dagger"
									itemTooltip="relocate(text.itemTooltipDagger)"/>
		<item r_name="'Knife'" r_template="'DaggerTemplate'"
					itemName="text.itemKnife"
					r_graphic="'knife.png'"
					equippedGraphic="((exists(offhand)&&(self==offhand))?'off_':'mh_')+'knife.png'"
					baseWeaponDamage="5"
					baseWeaponHitBonus="2"/>
		<item r_name="'Dagger'" r_template="'DaggerTemplate'"
					itemName="text.itemDagger"
					r_graphic="'dagger.png'"
					equippedGraphic="((exists(offhand)&&(self==offhand))?'off_':'mh_')+'dagger.png'"
					baseWeaponDamage="7"
					baseWeaponHitBonus="2"/>
		<item r_name="'Stilleto'" r_template="'DaggerTemplate'"
					itemName="text.itemStilleto"
					itemTags="{'piercing'}"
					r_graphic="'stilleto.png'"
					equippedGraphic="((exists(offhand)&&(self==offhand))?'off_':'mh_')+'stilleto.png'"
					baseWeaponDamage="9"
					baseWeaponHitBonus="2"/>
		<itemTemplate r_name="'SwordTemplate'" r_template="'mainWeaponTemplate'"
									slot="'mainhand'"
									itemTags="{'slashing'}"
									weaponSkillName="'Sword'"
									weaponSkill="Sword"
									itemTooltip="relocate(text.itemTooltipSword)"/>
		<item r_name="'ShortSword'" r_template="'SwordTemplate'"
					itemName="text.itemShortSword"
					r_graphic="'shortsword.png'"
					equippedGraphic="'mh_shortsword.png'"
					baseWeaponDamage="7"
					baseWeaponHitBonus="1"/>
		<item r_name="'LongSword'" r_template="'SwordTemplate'"
					itemName="text.itemLongSword"
					r_graphic="'longsword.png'"
					equippedGraphic="'mh_longsword.png'"
					baseWeaponDamage="9"
					baseWeaponHitBonus="1"/>
		<item r_name="'Flamberge'" r_template="'SwordTemplate'"
					itemName="text.itemFlamberge"
					r_graphic="'flamberge.png'"
					equippedGraphic="'mh_flamberge.png'"
					baseWeaponDamage="11"
					baseWeaponHitBonus="1"/>
		<itemTemplate r_name="'GreatSwordTemplate'" r_template="'mainTwoHandsWeaponTemplate'"
									itemTags="{'slashing'}"
									weaponSkillName="'Sword'"
									weaponSkill="Sword"
									weaponSpeed="120"
									itemTooltip="relocate(text.itemTooltipGreatSword)"
									weaponAnimationFlag="'2mains'"
									baseWeaponHitBonus="3"/>
		<item r_name="'GreatSword'" r_template="'GreatSwordTemplate'"
					itemName="text.itemGreatSword"
					r_graphic="'greatsword.png'"
					equippedGraphic="'mh_greatsword.png'"
					baseWeaponDamage="12"/>
		<item r_name="'Espadon'" r_template="'GreatSwordTemplate'"
					itemName="text.itemEspadon"
					r_graphic="'espadon.png'"
					equippedGraphic="'mh_espadon.png'"
					baseWeaponDamage="16"/>
		<item r_name="'Claymore'" r_template="'GreatSwordTemplate'"
					itemName="text.itemClaymore"
					r_graphic="'claymore.png'"
					equippedGraphic="'mh_claymore.png'"
					baseWeaponDamage="20"/>
		<itemTemplate r_name="'AxeTemplate'" r_template="'mainWeaponTemplate'"
									slot="'mainhand'"
									itemTags="{'slashing'}"
									weaponSkillName="'Axe'"
									weaponSkill="Axe"
									itemTooltip="relocate(text.itemTooltipAxe)"/>
		<item r_name="'HandAxe'" r_template="'AxeTemplate'"
					itemName="text.itemHandAxe"
					r_graphic="'handaxe.png'"
					equippedGraphic="'mh_handaxe.png'"
					baseWeaponDamage="8"/>
		<item r_name="'BroadAxe'" r_template="'AxeTemplate'"
					itemName="text.itemBroadAxe"
					r_graphic="'broadaxe.png'"
					equippedGraphic="'mh_broadaxe.png'"
					baseWeaponDamage="10"/>
		<item r_name="'BattleAxe'" r_template="'AxeTemplate'"
					itemName="text.itemBattleAxe"
					r_graphic="'battleaxe.png'"
					equippedGraphic="'mh_battleaxe.png'"
					baseWeaponDamage="12"/>
		<itemTemplate r_name="'GreatAxeTemplate'" r_template="'mainTwoHandsWeaponTemplate'"
									itemTags="{'slashing'}"
									weaponSkillName="'Axe'"
									weaponSkill="Axe"
									weaponSpeed="120"
									itemTooltip="relocate(text.itemTooltipGreatAxe)"
									weaponAnimationFlag="'2mains'"
									baseWeaponHitBonus="2"/>
		<item r_name="'SplittingMaul'" r_template="'GreatAxeTemplate'"
					itemName="text.itemSplittingMaul"
					r_graphic="'splittingmaul.png'"
					equippedGraphic="'mh_splittingmaul.png'"
					baseWeaponDamage="13"/>
		<item r_name="'GreatAxe'" r_template="'GreatAxeTemplate'"
					itemName="text.itemGreatAxe"
					r_graphic="'greataxe.png'"
					equippedGraphic="'mh_greataxe.png'"
					baseWeaponDamage="17"/>
		<item r_name="'Cleaver'" r_template="'GreatAxeTemplate'"
					itemName="text.itemCleaver"
					r_graphic="'cleaver.png'"
					equippedGraphic="'mh_cleaver.png'"
					baseWeaponDamage="21"/>
		<itemTemplate r_name="'MaceTemplate'" r_template="'mainWeaponTemplate'"
									slot="'mainhand'"
									itemTags="{'bludgeoning'}"
									weaponSkillName="'Mace'"
									weaponSkill="Mace"
									itemTooltip="relocate(text.itemTooltipMace)"/>
		<item r_name="'Mace'" r_template="'MaceTemplate'"
					itemName="text.itemMace"
					r_graphic="'mace.png'"
					equippedGraphic="'mh_mace.png'"
					baseWeaponDamage="8"/>
		<item r_name="'MorningStar'" r_template="'MaceTemplate'"
					itemName="text.itemMorningStar"
					r_graphic="'morningstar.png'"
					equippedGraphic="'mh_morningstar.png'"
					baseWeaponDamage="10"/>
		<item r_name="'Flail'" r_template="'MaceTemplate'"
					itemName="text.itemFlail"
					r_graphic="'flail.png'"
					equippedGraphic="'mh_flail.png'"
					baseWeaponDamage="12"/>
		<itemTemplate r_name="'GreatMaceTemplate'" r_template="'mainTwoHandsWeaponTemplate'"
									itemTags="{'bludgeoning'}"
									weaponSkillName="'Mace'"
									weaponSkill="Mace"
									weaponSpeed="120"
									itemTooltip="relocate(text.itemTooltipGreatMace)"
									weaponAnimationFlag="'2mains'"
									baseWeaponHitBonus="2"/>
		<item r_name="'Club'" r_template="'GreatMaceTemplate'"
					itemName="text.itemClub"
					r_graphic="'club.png'"
					equippedGraphic="'mh_club.png'"
					baseWeaponDamage="13"/>
		<item r_name="'HeavyMace'" r_template="'GreatMaceTemplate'"
					itemName="text.itemHeavyMace"
					r_graphic="'heavymace.png'"
					equippedGraphic="'mh_heavymace.png'"
					baseWeaponDamage="17"/>
		<item r_name="'TwoHandedFlail'" r_template="'GreatMaceTemplate'"
					itemName="text.itemTwoHandedFlail"
					r_graphic="'twohandedflail.png'"
					equippedGraphic="'mh_twohandedflail.png'"
					baseWeaponDamage="21"/>
		<itemTemplate r_name="'SpearTemplate'" r_template="'mainTwoHandsWeaponTemplate'"
									halfHand="1"
									itemTags="{'piercing'}"
									weaponSkillName="'Polearm'"
									weaponSkill="Polearm"
									weaponSpeed="120"
									baseWeaponPiercingDamage="3"
									itemTooltip="relocate(text.itemTooltipSpear)"
									weaponAnimationFlag="'2mains'"
									handTooltip="text.handTooltipOneAndHalfHand"/>
		<item r_name="'Spear'" r_template="'SpearTemplate'"
					itemName="text.itemSpear"
					r_graphic="'spear.png'"
					equippedGraphic="'mh_spear.png'"
					baseWeaponDamage="8"
					baseWeaponHitBonus="1"/>
		<item r_name="'Trident'" r_template="'SpearTemplate'"
					itemName="text.itemTrident"
					r_graphic="'trident.png'"
					equippedGraphic="'mh_trident.png'"
					baseWeaponDamage="10"
					baseWeaponHitBonus="1"/>
		<item r_name="'Halberd'" r_template="'SpearTemplate'"
					itemName="text.itemHalberd"
					itemTags="{'slashing'}"
					r_graphic="'halberd.png'"
					equippedGraphic="'mh_halberd.png'"
					baseWeaponDamage="12"
					baseWeaponHitBonus="1"/>
		<itemTemplate r_name="'StaffTemplate'" r_template="'mainTwoHandsWeaponTemplate'"
									halfHand="1"
									itemTags="{'bludgeoning'}"
									weaponSkillName="'Staff'"
									weaponSkill="Staff"
									weaponSpeed="120"
									itemTooltip="relocate(text.itemTooltipStaff)"
									handTooltip="text.handTooltipOneAndHalfHand"/>
		<item r_name="'Staff'" r_template="'StaffTemplate'"
					itemName="text.itemStaff"
					r_graphic="'staff.png'"
					equippedGraphic="'mh_staff.png'"
					baseWeaponDamage="5"/>
		<item r_name="'Quaterstaff'" r_template="'StaffTemplate'"
					itemName="text.itemQuaterstaff"
					r_graphic="'quaterstaff.png'"
					equippedGraphic="'mh_quaterstaff.png'"
					baseWeaponDamage="7"/>
		<itemTemplate r_name="'BowTemplate'" r_template="'mainRangedWeaponTemplate'"
									attackAnimation="'attackBow'"
									weaponSkillName="'Bow'"
									weaponSkill="Bow"
									itemTags="{'piercing'}"
									itemTooltip="relocate(text.itemTooltipBow)"
									weaponAnimationFlag="'arc'"
									missileGraphic="'arrow'+{'Right','Up','Left','Down'}[easyOrientation4(actor.w_xCoord, actor.w_yCoord, target.w_xCoord, target.w_yCoord)]+'.png'"/>
		<item r_name="'Bow'" r_template="'BowTemplate'"
					itemName="text.itemBow"
					r_graphic="'bow.png'"
					equippedGraphic="'mh_bow.png'"
					baseWeaponDamage="7"
					weaponMaxRange="7"/>
		<item r_name="'Longbow'" r_template="'BowTemplate'"
					itemName="text.itemLongbow"
					r_graphic="'longbow.png'"
					equippedGraphic="'mh_longbow.png'"
					baseWeaponDamage="9"
					weaponMaxRange="7"/>
		<item r_name="'CompositeLongbow'" r_template="'BowTemplate'"
					itemName="text.itemCompositeLongbow"
					r_graphic="'compositelongbow.png'"
					equippedGraphic="'mh_compositelongbow.png'"
					baseWeaponDamage="11"
					weaponMaxRange="7"/>
		<itemTemplate r_name="'CrossbowTemplate'" r_template="'mainRangedWeaponTemplate'"
									attackAnimation="'attackCrossbow'"
									weaponSkillName="'Crossbow'"
									weaponSkill="Crossbow"
									itemTags="{'piercing'}"
									weaponSpeed="120"
									baseWeaponPiercingDamage="4"
									itemTooltip="relocate(text.itemTooltipCrossbow)"
									weaponAnimationFlag="'arba'"
									missileGraphic="'arrow'+{'Right','Up','Left','Down'}[easyOrientation4(actor.w_xCoord, actor.w_yCoord, target.w_xCoord, target.w_yCoord)]+'.png'"
									weaponMaxRange="6"/>
		<item r_name="'LightCrossbow'" r_template="'CrossbowTemplate'"
					itemName="text.itemLightCrossbow"
					r_graphic="'lightcrossbow.png'"
					equippedGraphic="'mh_lightcrossbow.png'"
					baseWeaponDamage="7"/>
		<item r_name="'Crossbow'" r_template="'CrossbowTemplate'"
					itemName="text.itemCrossbow"
					r_graphic="'crossbow.png'"
					equippedGraphic="'mh_crossbow.png'"
					baseWeaponDamage="9"/>
		<item r_name="'HeavyCrossbow'" r_template="'CrossbowTemplate'"
					itemName="text.itemHeavyCrossbow"
					r_graphic="'heavycrossbow.png'"
					equippedGraphic="'mh_heavycrossbow.png'"
					baseWeaponDamage="11"/>
		<itemTemplate r_name="'ThrowingWeaponTemplate'" r_template="'mainRangedWeaponTemplate'"
									weaponSkillName="'Throw'"
									weaponSkill="Throw"
									itemTags="{'piercing'}"
									weaponSpeed="80"
									baseWeaponHitBonus="1"
									itemTooltip="relocate(text.itemTooltipThrowingWeapon)"
									missileGraphic="'arrow'+{'Right','Up','Left','Down'}[easyOrientation4(actor.w_xCoord, actor.w_yCoord, target.w_xCoord, target.w_yCoord)]+'.png'"
									weaponMaxRange="6"/>
		<item r_name="'ThrowingDaggers'" r_template="'ThrowingWeaponTemplate'"
					itemName="text.itemThrowingDaggers"
					r_graphic="'throwingdaggers.png'"
					equippedGraphic="'mh_throwingdaggers.png'"
					baseWeaponDamage="7"/>
		<item r_name="'Javelins'" r_template="'ThrowingWeaponTemplate'"
					itemName="text.itemJavelins"
					r_graphic="'javelins.png'"
					equippedGraphic="'mh_javelins.png'"
					baseWeaponDamage="9"/>
		<item r_name="'Franciscas'" r_template="'ThrowingWeaponTemplate'"
					itemName="text.itemFranciscas"
					itemTags="{'slashing'}"
					r_graphic="'francisca.png'"
					equippedGraphic="'mh_francisca.png'"
					baseWeaponDamage="11"/>

		<!-- weapon brands -->
		<itemTemplate r_name="'weaponBrandedTemplate'" brandProperty="''" brandName="''" brandTooltip="''">
			<modifier r_name="'propertyModifier'" r_template="'mainModifierTemplate'" r_modifierTarget="'properties'" r_modifiedValue="$0+{brandProperty}"/>
			<modifier r_name="'nameModifier'" r_template="'mainModifierTemplate'" r_modifierTarget="'nameModifiers'" r_modifiedValue="$0+{brandName}"/>
			<modifier r_name="'tooltipModifier'" r_template="'mainModifierTemplate'" r_modifierTarget="'tooltip'" r_modifiedValue="$0+' '+brandTooltip"/>
		</itemTemplate>

		<itemTemplate r_name="'flamingWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertyFlaming" brandName="text.brandNameFlaming" brandTooltip="text.brandTooltipFlaming">
			<modifier r_name="'flamingWeaponBonus'" r_template="'mainModifierTemplate'" r_modifierTarget="'weaponAdditionalDamage'" r_modifiedValue="$0+1D6"/>
			<modifier r_name="'piercing'" r_template="'mainModifierTemplate'" r_modifierTarget="'weaponPiercingDamage'" r_modifiedValue="$0+1D6"/>
			<modifier r_name="'tagsModifier'" r_template="'mainModifierTemplate'" r_modifierTarget="'itemTags'" r_modifiedValue="$0+{'flaming'}"/>
		</itemTemplate>
		<itemTemplate r_name="'frostWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertyFrost" brandName="text.brandNameFrost" brandTooltip="text.brandTooltipFrost">
			<modifier r_name="'frostWeaponBonus'" r_template="'mainModifierTemplate'" r_modifierTarget="'weaponAdditionalDamage'" r_modifiedValue="$0+1D6"/>
			<modifier r_name="'tagsModifier'" r_template="'mainModifierTemplate'" r_modifierTarget="'itemTags'" r_modifiedValue="$0+{'frost'}"/>
			<action r_name="'attackAction'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'dazeProc'" r_template="'dazeEffect'" dazeValue="1.2" powerDuration="500" powerRecastRule="'fail'" actionLogMethod="'logDebuffEffect'"/>
					</effect>
				</effect>
			</action>
		</itemTemplate>
		<itemTemplate r_name="'shockWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertyShock" brandName="text.brandNameShock" brandTooltip="text.brandTooltipShock">
			<modifier r_name="'shockWeaponBonus'" r_template="'mainModifierTemplate'" r_modifierTarget="'weaponAdditionalDamage'" r_modifiedValue="$0+1D6"/>
			<action r_name="'attackAction'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'stunProc'" r_template="'physicalStunAttack'" r_enabled="1D3==1" powerDuration="100" powerHitBonus="5" powerRecastRule="'fail'" r_displayName="text.brandNameShock"/>
					</effect>
				</effect>
			</action>
		</itemTemplate>
		<itemTemplate r_name="'poisonWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertyPoison" brandName="text.brandNamePoison" brandTooltip="text.brandTooltipPoison">
			<action r_name="'attackAction'">
				<effect r_name="'mainEffect'">
					<effect r_name="'hitEffect'">
						<effect r_name="'poisonProc'" r_template="'poisonEffect'" powerDuration="100" powerTickCount="4" actionLogMethod="'logDebuffEffect'" powerRecastRule="'fail'" poisonDamage="1D3"/>
					</effect>
				</effect>
			</action>
		</itemTemplate>
		<itemTemplate r_name="'holyWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertySacred" brandName="text.brandNameSacred" brandTooltip="text.brandTooltipSacred">
			<modifier r_name="'holyWeaponBonus'" r_template="'mainModifierTemplate'" r_modifierTarget="'weaponAdditionalDamage'" r_modifiedValue="$0+((exists(target)&&contains(target.encounterTags,'unholy'))?(2D6):0)"/>
		</itemTemplate>
		<itemTemplate r_name="'adamantWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertyAdamant" brandName="text.brandNameAdamant" brandTooltip="text.brandTooltipAdamant">
			<modifier r_name="'adamantWeaponBonus'" r_template="'mainModifierTemplate'" r_modifierTarget="'weaponDamage'" r_modifiedValue="$0*1.2"/>
		</itemTemplate>
		<itemTemplate r_name="'keenWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertyKeen" brandName="text.brandNameKeen" brandTooltip="text.brandTooltipKeen">
			<modifier r_name="'keenWeaponBonus'" r_template="'mainModifierTemplate'" r_modifierTarget="'weaponCriticalPercentage'" r_modifiedValue="$0+10"/>
		</itemTemplate>
		<itemTemplate r_name="'accuracyWeaponBrand'" r_template="'weaponBrandedTemplate'" brandProperty="text.brandPropertyAccuracy" brandName="text.brandNameAccuracy" brandTooltip="text.brandTooltipAccuracy">
			<modifier r_name="'accuracyWeaponBonus'" r_template="'mainModifierTemplate'" r_modifierTarget="'baseWeaponHitBonus'" r_modifiedValue="$0+2"/>
		</itemTemplate>
		
		<!-- staff brands -->
		<itemTemplate r_name="'StaffBrandTemplate'" AffinityName="''" enhancementBonus="1" brandProperty="relocate(text.brandPropertyMagicStaff)" brandName="relocate(text.brandNameMagicStaff)">
			<modifier r_name="'AffinityModifier'" r_template="'mainItemModifier'" r_modifierTarget="AffinityName" r_modifiedValue="$0+enhancementBonus"/>
			<modifier r_name="'brandTooltip'" r_template="'mainModifierTemplate'" r_modifierTarget="'brandTooltip'" r_modifiedValue="relocate(text.brandTooltipMagicStaff)+' '+$0"/>
		</itemTemplate>
		<itemTemplate r_name="'airStaffBrand'" r_template="{'shockWeaponBrand','StaffBrandTemplate'}" AffinityName="'Air'"/>
		<itemTemplate r_name="'deathStaffBrand'" r_template="{'poisonWeaponBrand','StaffBrandTemplate'}" AffinityName="'Death'"/>
		<itemTemplate r_name="'earthStaffBrand'" r_template="{'adamantWeaponBrand','StaffBrandTemplate'}" AffinityName="'Earth'"/>
		<itemTemplate r_name="'fireStaffBrand'" r_template="{'flamingWeaponBrand','StaffBrandTemplate'}" AffinityName="'Fire'"/>
		<itemTemplate r_name="'holyStaffBrand'" r_template="{'holyWeaponBrand','StaffBrandTemplate'}" AffinityName="'Holy'"/>
		<itemTemplate r_name="'waterStaffBrand'" r_template="{'frostWeaponBrand','StaffBrandTemplate'}" AffinityName="'Water'"/>

		<!-- LOOT -->
		<item r_name="'randomWeaponBrand'" r_template="randomElement({'flamingWeaponBrand','frostWeaponBrand','shockWeaponBrand','poisonWeaponBrand','adamantWeaponBrand','keenWeaponBrand','accuracyWeaponBrand'})"/>
		<item r_name="'randomStaffBrand'" r_template="randomElement({'airStaffBrand','deathStaffBrand','earthStaffBrand','fireStaffBrand','holyStaffBrand','waterStaffBrand'})"/>
		<itemTemplate r_name="'randomRareWeaponAdditionalTemplate'"
									enchantments="enchantments=shuffle({'strengthEnchantment','dexterityEnchantment','intelligenceEnchantment','constitutionEnchantment','defensiveEnchantment','quicknessEnchantment'})">
			<map r_name="'enchantment0'" r_template="enchantments[0]"/>
			<map r_name="'enchantment1'" r_template="enchantments[1]"/>
		</itemTemplate>

		<item r_name="'randomMagicMonsterWeaponInterface'" r_template="{{},{'randomEnhancementBonusStandard'},{'randomEnhancementBonusStandard','randomWeaponBrand'},{'randomEnhancementBonusStandard','randomWeaponBrand','randomRareWeaponAdditionalTemplate'}}[eval(gameParameters.lootPowerEquipment,dungeonDepth)]"/>
		<item r_name="'randomMonsterBow'" r_template="{{'Bow'},{'Longbow'},{'CompositeLongbow'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterDagger'" r_template="{{'Knife'},{'Dagger'},{'Stilleto'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterSword'" r_template="{{'ShortSword'},{'LongSword'},{'Flamberge'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterGreatSword'" r_template="{{'GreatSword'},{'Espadon'},{'Claymore'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterMace'" r_template="{{'Mace'},{'MorningStar'},{'Flail'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterGreatMace'" r_template="{{'Club'},{'HeavyMace'},{'TwoHandedFlail'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterAxe'" r_template="{{'HandAxe'},{'BroadAxe'},{'BattleAxe'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterGreatAxe'" r_template="{{'SplittingMaul'},{'GreatAxe'},{'Cleaver'}}[eval(gameParameters.lootTiers3,dungeonDepth)]+{'randomMagicMonsterWeaponInterface'}"/>
		<item r_name="'randomMonsterStaff'" r_template="{'Staff'}+{{},{'randomEnhancementBonusStandard'},{'randomEnhancementBonusStandard','randomStaffBrand'},{'randomEnhancementBonusStandard','randomStaffBrand','randomRareWeaponAdditionalTemplate'}}[eval(gameParameters.lootPowerEquipment,dungeonDepth)]"/>
		
		<item r_name="'randomTiers1Weapon'" r_template="randomElement({'Knife','ShortSword','GreatSword','Mace','Club','HandAxe','SplittingMaul','Spear','Bow','LightCrossbow','ThrowingDaggers'})"/>
		<item r_name="'randomTiers2Weapon'" r_template="randomElement({'Dagger','LongSword','Espadon','MorningStar','HeavyMace','BroadAxe','GreatAxe','Trident','Longbow','Crossbow','Javelins'})"/>
		<item r_name="'randomTiers3Weapon'" r_template="randomElement({'Stilleto','Flamberge','Claymore','Flail','TwoHandedFlail','BattleAxe','Cleaver','Halberd','CompositeLongbow','HeavyCrossbow','Franciscas'})"/>
		<item r_name="'randomWeapon'" r_template="{{'randomTiers1Weapon','randomTiers2Weapon','randomTiers3Weapon'}[eval(gameParameters.lootTiers3,dungeonDepth)]}+{'randomEnhancementBonusStandard'}"/>
		<item r_name="'randomBrandedWeapon'" r_template="(1D10==1)?{'Staff','randomStaffBrand'}:{'randomWeapon','randomWeaponBrand'}"/>
		<item r_name="'randomRareWeapon'" r_template="{'randomBrandedWeapon','randomRareWeaponAdditionalTemplate'}"/>
	</items>
</data>