<data>
	<items>
		<itemTemplate r_name="'JewelleryTemplate'" r_template="'mainItemTemplate'"
									enhancementBonus="0"
									statPropertyName="''"
									properties="((enhancementBonus>0)?{(statPropertyName+' +'+enhancementBonus)}:{})"
									nameModifiers="((enhancementBonus>0)?{('+'+enhancementBonus)}:{})"
									magicLevel="1+min(length(properties),2)"/>
		<itemTemplate r_name="'RingTemplate'" r_template="'JewelleryTemplate'"
									r_graphic="'bague0.png'"
									slot="'ring'"
									targetSlot="'leftring'"
									targetSlot2="'rightring'"/>
		<itemTemplate r_name="'AmuletTemplate'" r_template="'JewelleryTemplate'"
									r_graphic="'pendent0.png'"
									slot="'neck'"/>
		<itemTemplate r_name="'BookTemplate'" r_template="'JewelleryTemplate'"
									r_graphic="'books.png'"
									equippedGraphic="equippedGraphic='book_'+(1D5-1)+'.png'"
									halfHand="1"
									enhancementBonus="1"
									slot="'offhand'">
		</itemTemplate>

		<!-- Ring -->
		<item r_name="'RingOfStrength'" r_template="'RingTemplate'"
					itemName="text.itemRingOfStrength"
					statPropertyName="text.propertyStr"
					r_graphic="'bague0.png'"
					itemTooltip="relocate(text.tooltipItemRingOfStrength)">
			<modifier r_name="'Strength'" r_template="'mainItemModifier'" r_modifierTarget="'Strength'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'RingOfDexterity'" r_template="'RingTemplate'"
					itemName="text.itemRingOfDexterity"
					statPropertyName="text.propertyDex"
					r_graphic="'bague0.png'"
					itemTooltip="relocate(text.tooltipItemRingOfDexterity)">
			<modifier r_name="'Dexterity'" r_template="'mainItemModifier'" r_modifierTarget="'Dexterity'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'RingOfIntelligence'" r_template="'RingTemplate'"
					itemName="text.itemRingOfIntelligence"
					statPropertyName="text.propertyInt"
					r_graphic="'bague0.png'"
					itemTooltip="relocate(text.tooltipItemRingOfIntelligence)">
			<modifier r_name="'Intelligence'" r_template="'mainItemModifier'" r_modifierTarget="'Intelligence'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'RingOfConstitution'" r_template="'RingTemplate'"
					itemName="text.itemRingOfConstitution"
					statPropertyName="text.propertyCon"
					r_graphic="'bague0.png'"
					itemTooltip="relocate(text.tooltipItemRingOfConstitution)">
			<modifier r_name="'Constitution'" r_template="'mainItemModifier'" r_modifierTarget="'Constitution'" r_modifiedValue="$0+enhancementBonus"/>
		</item>

		<!-- Amulet -->
		<item r_name="'AmuletOfResistance'" r_template="'AmuletTemplate'"
					itemName="text.itemAmuletOfResistance"
					statPropertyName="text.propertyRes"
					r_graphic="'pendent0.png'"
					itemTooltip="relocate(text.tooltipItemAmuletOfResistance)">
			<modifier r_name="'Resistance'" r_template="'mainItemModifier'" r_modifierTarget="'Resistance'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		
		<!-- Book -->
		<item r_name="'BookAir'" r_template="'BookTemplate'"
					itemName="text.itemBookOfAir"
					statPropertyName="text.affinityAir"
					r_graphic="'books.png'"
					enhancementBonus="1"
					itemTooltip="relocate(text.tooltipItemBookOfAir)">
			<modifier r_name="'Air'" r_template="'mainItemModifier'" r_modifierTarget="'Air'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'GreaterBookAir'" r_template="'BookTemplate'"
					itemName="text.itemBookOfAir"
					statPropertyName="text.affinityAir"
					r_graphic="'books.png'"
					enhancementBonus="2"
					itemTooltip="relocate(text.tooltipItemBookOfAir)">
			<modifier r_name="'Air'" r_template="'mainItemModifier'" r_modifierTarget="'Air'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'BookDeath'" r_template="'BookTemplate'"
					itemName="text.itemBookOfDeath"
					statPropertyName="text.affinityDeath"
					r_graphic="'books.png'"
					enhancementBonus="1"
					itemTooltip="relocate(text.tooltipItemBookOfDeath)">
			<modifier r_name="'Death'" r_template="'mainItemModifier'" r_modifierTarget="'Death'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'GreaterBookDeath'" r_template="'BookTemplate'"
					itemName="text.itemGreaterBookOfDeath"
					statPropertyName="text.affinityDeath"
					r_graphic="'books.png'"
					enhancementBonus="2"
					itemTooltip="relocate(text.tooltipItemBookOfDeath)">
			<modifier r_name="'Death'" r_template="'mainItemModifier'" r_modifierTarget="'Death'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'BookEarth'" r_template="'BookTemplate'"
					itemName="text.itemBookOfEarth"
					statPropertyName="text.affinityEarth"
					r_graphic="'books.png'"
					enhancementBonus="1"
					itemTooltip="relocate(text.tooltipItemBookOfEarth)">
			<modifier r_name="'Earth'" r_template="'mainItemModifier'" r_modifierTarget="'Earth'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'GreaterBookEarth'" r_template="'BookTemplate'"
					itemName="text.itemGreaterBookOfEarth"
					statPropertyName="text.affinityEarth"
					r_graphic="'books.png'"
					enhancementBonus="2"
					itemTooltip="relocate(text.tooltipItemBookOfEarth)">
			<modifier r_name="'Earth'" r_template="'mainItemModifier'" r_modifierTarget="'Earth'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'BookFire'" r_template="'BookTemplate'"
					itemName="text.itemBookOfFire"
					statPropertyName="text.affinityFire"
					r_graphic="'books.png'"
					enhancementBonus="1"
					itemTooltip="relocate(text.tooltipItemBookOfFire)">
			<modifier r_name="'Fire'" r_template="'mainItemModifier'" r_modifierTarget="'Fire'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'GreaterBookFire'" r_template="'BookTemplate'"
					itemName="text.itemGreaterBookOfFire"
					statPropertyName="text.affinityFire"
					r_graphic="'books.png'"
					enhancementBonus="2"
					itemTooltip="relocate(text.tooltipItemBookOfFire)">
			<modifier r_name="'Fire'" r_template="'mainItemModifier'" r_modifierTarget="'Fire'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'BookHoly'" r_template="'BookTemplate'"
					itemName="text.itemBookOfHoly"
					statPropertyName="text.affinityHoly"
					r_graphic="'books.png'"
					enhancementBonus="1"
					itemTooltip="relocate(text.tooltipItemBookOfHoly)">
			<modifier r_name="'Holy'" r_template="'mainItemModifier'" r_modifierTarget="'Holy'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'GreaterBookHoly'" r_template="'BookTemplate'"
					itemName="text.itemGreaterBookOfHoly"
					statPropertyName="text.affinityHoly"
					r_graphic="'books.png'"
					enhancementBonus="2"
					itemTooltip="relocate(text.tooltipItemBookOfHoly)">
			<modifier r_name="'Holy'" r_template="'mainItemModifier'" r_modifierTarget="'Holy'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'BookWater'" r_template="'BookTemplate'"
					itemName="text.itemBookOfWater"
					statPropertyName="text.affinityWater"
					r_graphic="'books.png'"
					enhancementBonus="1"
					itemTooltip="relocate(text.tooltipItemBookOfWater)">
			<modifier r_name="'Water'" r_template="'mainItemModifier'" r_modifierTarget="'Water'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		<item r_name="'GreaterBookWater'" r_template="'BookTemplate'"
					itemName="text.itemGreaterBookOfWater"
					statPropertyName="text.affinityWater"
					r_graphic="'books.png'"
					enhancementBonus="2"
					itemTooltip="relocate(text.tooltipItemBookOfWater)">
			<modifier r_name="'Water'" r_template="'mainItemModifier'" r_modifierTarget="'Water'" r_modifiedValue="$0+enhancementBonus"/>
		</item>
		
		<!-- Loot -->
		<item r_name="'randomRing'" r_template="{randomElement({'RingOfStrength','RingOfDexterity','RingOfIntelligence','RingOfConstitution'})}+{'randomEnhancementBonusHigh'}"/>
		<item r_name="'randomAmulet'" r_template="{randomElement({'AmuletOfResistance'})}+{'randomEnhancementBonusHigh'}"/>
		<item r_name="'randomJewellery'" r_template="randomElement({'randomRing','randomRing','randomAmulet'})"/>
		<item r_name="'randomRareJewellery'" r_template="'randomJewellery'"
					enchantments="enchantments=shuffle({'strengthEnchantment','dexterityEnchantment','intelligenceEnchantment','constitutionEnchantment','physicalResistanceEnchantment','mentalResistanceEnchantment','resistanceEnchantment','protectionEnchantment','defensiveEnchantment'})">
			<map r_name="'enchantment0'" r_template="enchantments[0]"/>
			<map r_name="'enchantment1'" r_template="enchantments[1]"/>
		</item>

		<item r_name="'randomTiers1Book'" r_template="randomElement({'BookAir','BookDeath','BookEarth','BookFire','BookHoly','BookWater'})"/>
		<item r_name="'randomTiers2Book'" r_template="randomElement({'GreaterBookAir','GreaterBookDeath','GreaterBookEarth','GreaterBookFire','GreaterBookHoly','GreaterBookWater'})"/>
		<item r_name="'randomBook'" r_template="{'randomTiers1Book','randomTiers2Book'}[eval(gameParameters.lootTiers2,dungeonDepth)]"/>
		<item r_name="'randomRareBook'" r_template="'randomBook'"
					enchantments="enchantments=shuffle({'physicalResistanceEnchantment','mentalResistanceEnchantment','resistanceEnchantment','protectionEnchantment','defensiveEnchantment'})">
			<map r_name="'enchantment0'" r_template="enchantments[0]"/>
			<map r_name="'enchantment1'" r_template="enchantments[1]"/>
		</item>
	</items>
</data>