<?xml version="1.0" encoding="utf-8"?>
<ResourceDefinitions>
	<!-- Templates -->
	<Resource>
		<Name>RESOURCE</Name>
		
		<Sprite PlayAll="1"></Sprite>
		<CollisionBox>-8;-8;16;16</CollisionBox>
		<CollisionGroup>items</CollisionGroup>
		<CollideAgainst>tiles;hard_enemies;rocks</CollideAgainst>
		<CanSleep>1</CanSleep>
		<PickupSound>player_pickup_gold</PickupSound>
		<!-- <PickupEffect>hit_light</PickupEffect>--> <!-- todo -->
		<DropOnDeath>1</DropOnDeath>
		<Persistent>1</Persistent>
		<UseVeinTileTexture>true</UseVeinTileTexture>
	</Resource>
	<Resource>
		<Name>ORE</Name>
		<Template>RESOURCE</Template>

		<ResourceType>ore</ResourceType>
		<LandSoft Speed="50" Sound="player_drop_resource_mineral"/>
		<ExtraHitPoints>2</ExtraHitPoints>
		<MaxCountPerStack>4</MaxCountPerStack>
		<MaxCountGroup>resources</MaxCountGroup>
		<Value Constant="1" Linear="1.5" Exponent="1.2"/>
		<PickupEffect RandomRotation="true">pickup_resource</PickupEffect>
	</Resource>
	<Resource>
		<Name>ORE_LOW</Name>
		<Template>ORE</Template>

		<PickupColor>0.65,0.65,0.65</PickupColor>
	</Resource>
	<Resource>
		<Name>ORE_MID</Name>
		<Template>ORE</Template>

		<PickupColor>0.8,0.8,0.8</PickupColor>
	</Resource>
	<Resource>
		<Name>ORE_HI</Name>
		<Template>ORE</Template>

		<PickupColor>0.95,0.95,0.95</PickupColor>
	</Resource>
	<Resource>
		<Name>CRYSTAL</Name>
		<Template>RESOURCE</Template>

		<ResourceType>gem</ResourceType>
		<LandSoft Speed="50" Sound="player_drop_resource_crystal"/>
		<MaxCountPerStack>1</MaxCountPerStack>
		<ExtraHitPoints>4</ExtraHitPoints>
		<MaxCountGroup>resources</MaxCountGroup>
		<PickupColor>0.6,0.7,1</PickupColor>
		<PickupEffect RandomRotation="true">pickup_resource</PickupEffect>
	</Resource>
	<Resource>
		<Name>GEM</Name>
		<Template>RESOURCE</Template>

		<ResourceType>gem</ResourceType>
		<LandSoft Speed="50" Sound="player_drop_resource_crystal"/>
		<MaxCountPerStack>1</MaxCountPerStack>
		<ExtraHitPoints>4</ExtraHitPoints>
		<MaxCountGroup>resources</MaxCountGroup>
		<PickupColor>1,0.92,0.5</PickupColor>
		<PickupEffect RandomRotation="true">pickup_resource</PickupEffect>
	</Resource>
	<Resource>
		<Name>EGG</Name>
		<Template>RESOURCE</Template>

		<ResourceType>egg</ResourceType>
		<LandSoft Speed="50" Sound="player_drop_resource_mineral"/>
		<Light Sprite="orbblob" Scale="1.50" Offset="0,0"/>
		<ExtraHitPoints>6</ExtraHitPoints>
		<UseVeinTileTexture>false</UseVeinTileTexture>
	</Resource>
	<Resource>
		<Name>REFILL</Name>
		
		<Sprite PlayAll="1"></Sprite>
		<CollisionBox>-8;-8;16;16</CollisionBox>
		<CollisionGroup>items</CollisionGroup>
		<CollisionSensor>true</CollisionSensor>
		<GravityFactor>0</GravityFactor>
		<UpdatePhysics>false</UpdatePhysics>
		
		<Light Sprite="blob" Scale="0.80" Offset="0,0"/>
		<PickupSound>player_pickup_refill_small</PickupSound>
		<!-- <PickupEffect>hit_light</PickupEffect>--> <!-- todo -->
		<Persistent>1</Persistent>
		<ResetWithEarth>0</ResetWithEarth> <!-- Permanently consumed. -->
		<LifeTime>10</LifeTime>
	</Resource>
	<Resource>
		<Name>ORB</Name>
		
		<Sprite PlayAll="1"></Sprite>
		<CollisionBox>-6;-6;12;12</CollisionBox>
		<CollisionGroup>items</CollisionGroup>
		<CollideAgainst>tiles;hard_enemies;rocks</CollideAgainst>
		<LinearAirResistance>1.7</LinearAirResistance>
		<QuadraticAirResistance>0</QuadraticAirResistance>
		<HighQualityIntegration>1</HighQualityIntegration>
		<GravityFactor>0</GravityFactor>
		<Bounciness>1</Bounciness>
		<PlayerAttraction Speed="12" Distance="9000"/>
		
		<Light Sprite="orbblob" Scale="2" Offset="0,0"/>
		<PickupSound>player_pickup_orb</PickupSound>
		<PickupEffect RandomRotation="true">orb_pickup</PickupEffect>
		<PickupUIEffect>orb_pickup</PickupUIEffect>
		<Persistent>1</Persistent>
		<MaxCountGroup>orbs</MaxCountGroup>
	</Resource>
	
	<!-- Null res: Not an actual resource, only prevents other resources from spawning at the specified spot. -->
	<Resource>
		<Name>no_res</Name>
	</Resource>
	
	<!-- Resource fields -->
	<Resource>
		<Name>ore+0</Name>
		<SpawnResource DepthBias="0" Type="ore"/>
	</Resource>
	<Resource>
		<Name>ore+1</Name>
		<SpawnResource DepthBias="1" Type="ore"/>
	</Resource>
	<Resource>
		<Name>ore+2</Name>
		<SpawnResource DepthBias="2" Type="ore"/>
	</Resource>
	<Resource>
		<Name>ore+3</Name>
		<SpawnResource DepthBias="3" Type="ore"/>
	</Resource>
	<Resource>
		<Name>ore+5</Name>
		<SpawnResource DepthBias="5" Type="ore"/>
	</Resource>
	<Resource>
		<Name>ore+8</Name>
		<SpawnResource DepthBias="8" Type="ore"/>
	</Resource>
	
	<Resource>
		<Name>gem+0</Name>
		<SpawnResource DepthBias="0" Type="gem"/>
	</Resource>
	<Resource>
		<Name>gem+1</Name>
		<SpawnResource DepthBias="1" Type="gem"/>
	</Resource>
	<Resource>
		<Name>gem+2</Name>
		<SpawnResource DepthBias="2" Type="gem"/>
	</Resource>
	<Resource>
		<Name>gem+3</Name>
		<SpawnResource DepthBias="3" Type="gem"/>
	</Resource>
	<Resource>
		<Name>gem+5</Name>
		<SpawnResource DepthBias="5" Type="gem"/>
	</Resource>
	<Resource>
		<Name>gem+8</Name>
		<SpawnResource DepthBias="8" Type="gem"/>
	</Resource>
	
	<!-- Pickups -->
	<Resource>
		<Name>refill</Name>
		<SpawnRefill>1</SpawnRefill>
	</Resource>
	
	<Resource>
		<Name>refill_health</Name>
		<Template>REFILL</Template>

		<Sprite>Sprites/resources;refill_health</Sprite>
		<PickupIcon>Sprites/resources;health</PickupIcon>
		<GiveHitPoints>1.0</GiveHitPoints>
	</Resource>
	
	<Resource>
		<Name>refill_water</Name>
		<Template>REFILL</Template>

		<Sprite>Sprites/resources;refill_water</Sprite>
		<PickupIcon>Sprites/resources;water</PickupIcon>
		<GiveWater>1.0</GiveWater>
	</Resource>
	
	<Resource>
		<Name>refill_light</Name>
		<Template>REFILL</Template>

		<Sprite>Sprites/resources;refill_light</Sprite>
		<PickupIcon>Sprites/resources;light</PickupIcon>
		<GiveLightFraction>0.2</GiveLightFraction>
	</Resource>
	
	<Resource>
		<Name>refill_all</Name>
		<Template>REFILL</Template>

		<Sprite>Sprites/resources;refill_small</Sprite>
		<PickupIcon>Sprites/resources;all</PickupIcon>
		<Light Sprite="blob" Scale="1" Offset="0,0"/>
		<GiveHitPoints>1</GiveHitPoints>
		<GiveWater>1</GiveWater>
		<GiveLightFraction>0.2</GiveLightFraction>
	</Resource>

	<Resource>
		<Name>refill_all_full</Name>
		<Template>REFILL</Template>

		<Sprite Scale="1">Sprites/resources;refill_big</Sprite>
		<PickupIcon>Sprites/resources;full</PickupIcon>
		<PickupSound>player_pickup_refill</PickupSound>
		<Light Sprite="blob" Scale="2" Offset="0,0"/>
		<GiveHitPoints>9999</GiveHitPoints>
		<GiveWater>9999</GiveWater>
		<GiveLightFraction>1</GiveLightFraction>
	</Resource>

	<!-- Ores -->
	<Resource>
		<Name>ore_00</Name>
		<NameStringId>resource_ore_trashium</NameStringId>
		<DepthTier>0</DepthTier>
		<Template>ORE_LOW</Template>

		<Sprite>Sprites/resources;ore_thrashium_drop</Sprite>
		<TileTexture>resources/ore_thrashium</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_01</Name>
		<NameStringId>resource_ore_copper</NameStringId>
		<DepthTier>1</DepthTier>
		<Template>ORE_LOW</Template>

		<Sprite>Sprites/resources;ore_copper_drop</Sprite>
		<TileTexture>resources/ore_copper</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_02</Name>
		<NameStringId>resource_ore_ironium</NameStringId>
		<DepthTier>2</DepthTier>
		<Template>ORE_LOW</Template>

		<Sprite>Sprites/resources;ore_ironium_drop</Sprite>
		<TileTexture>resources/ore_ironium</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_03</Name>
		<NameStringId>resource_ore_bronzite</NameStringId>
		<DepthTier>3</DepthTier>
		<Template>ORE_LOW</Template>

		<Sprite>Sprites/resources;ore_bronzite_drop</Sprite>
		<TileTexture>resources/ore_bronzite</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_04</Name>
		<NameStringId>resource_ore_silver</NameStringId>
		<DepthTier>4</DepthTier>
		<Template>ORE_MID</Template>

		<Sprite>Sprites/resources;ore_silver_drop</Sprite>
		<TileTexture>resources/ore_silver</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_05</Name>
		<NameStringId>resource_ore_dolomite</NameStringId>
		<DepthTier>5</DepthTier>
		<Template>ORE_MID</Template>

		<Sprite>Sprites/resources;ore_dolomite_drop</Sprite>
		<TileTexture>resources/ore_dolomite</TileTexture>		
	</Resource>	
	<Resource>
		<Name>ore_06</Name>
		<NameStringId>resource_ore_chocolotite</NameStringId>
		<DepthTier>6</DepthTier>
		<Template>ORE_MID</Template>

		<Sprite>Sprites/resources;ore_chocolotite_drop</Sprite>
		<TileTexture>resources/ore_chocolotite</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_07</Name>
		<NameStringId>resource_ore_galena</NameStringId>
		<DepthTier>7</DepthTier>
		<Template>ORE_MID</Template>

		<Sprite>Sprites/resources;ore_galena_drop</Sprite>
		<TileTexture>resources/ore_galena</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_08</Name>
		<NameStringId>resource_ore_gold</NameStringId>
		<DepthTier>8</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_gold_drop</Sprite>
		<TileTexture>resources/ore_gold</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_09</Name>
		<NameStringId>resource_ore_biotite</NameStringId>
		<DepthTier>9</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_biotite_drop</Sprite>
		<TileTexture>resources/ore_biotite</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_10</Name>
		<NameStringId>resource_ore_obsidian</NameStringId>
		<DepthTier>10</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_obsidian_drop</Sprite>
		<TileTexture>resources/ore_obsidian</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_11</Name>
		<NameStringId>resource_ore_lazurite</NameStringId>
		<DepthTier>11</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_lazurite_drop</Sprite>
		<TileTexture>resources/ore_lazurite</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_12</Name>
		<NameStringId>resource_ore_uranium</NameStringId>
		<DepthTier>12</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_uranium_drop</Sprite>
		<TileTexture>resources/ore_uranium</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_13</Name>
		<NameStringId>resource_ore_beryllium</NameStringId>
		<DepthTier>13</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_beryllium_drop</Sprite>
		<TileTexture>resources/ore_beryllium</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_14</Name>
		<NameStringId>resource_ore_red_gold</NameStringId>
		<DepthTier>14</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_redgold_drop</Sprite>
		<TileTexture>resources/ore_redgold</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_15</Name>
		<NameStringId>resource_ore_purpletite</NameStringId>
		<DepthTier>15</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_purpletite_drop</Sprite>
		<TileTexture>resources/ore_purpletite</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_16</Name>
		<NameStringId>resource_ore_ambrium</NameStringId>
		<DepthTier>16</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_ambrium_drop</Sprite>
		<TileTexture>resources/ore_ambrium</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_17</Name>
		<NameStringId>resource_ore_meteorrock</NameStringId>
		<DepthTier>17</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_meteorrock_drop</Sprite>
		<TileTexture>resources/ore_meteorrock</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_18</Name>
		<NameStringId>resource_ore_unobtanium</NameStringId>
		<DepthTier>18</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_unobtanium_drop</Sprite>
		<TileTexture>resources/ore_unobtanium</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_19</Name>
		<NameStringId>resource_ore_gravitonium</NameStringId>
		<DepthTier>19</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_gravitonium_drop</Sprite>
		<TileTexture>resources/ore_gravitonium</TileTexture>		
	</Resource>
	<Resource>
		<Name>ore_20</Name>
		<NameStringId>resource_ore_darkmatter</NameStringId>
		<DepthTier>20</DepthTier>
		<Template>ORE_HI</Template>

		<Sprite>Sprites/resources;ore_darkmatter_drop</Sprite>
		<TileTexture>resources/ore_darkmatter</TileTexture>		
	</Resource>
	
	<!-- Treasure -->
	<Resource>
		<Name>crystal_citrine</Name>
		<NameStringId>resource_crystal_citrine</NameStringId>
		<DepthTier>0</DepthTier>
		<Template>CRYSTAL</Template>

		<Sprite>Sprites/resources;crystal_citrine_drop</Sprite>
		<TileTexture>resources/crystal_citrine</TileTexture>
		<Value>16</Value>
	</Resource>
	<Resource>
		<Name>crystal_avenyurine</Name>
		<NameStringId>resource_crystal_avenyurine</NameStringId>
		<DepthTier>2.5</DepthTier>
		<Template>CRYSTAL</Template>

		<Sprite>Sprites/resources;crystal_avenyurine_drop</Sprite>
		<TileTexture>resources/crystal_avenyurine</TileTexture>
		<Value>25</Value>
	</Resource>
	<Resource>
		<Name>crystal_quartz</Name>
		<NameStringId>resource_crystal_quartz</NameStringId>
		<DepthTier>5</DepthTier>
		<Template>CRYSTAL</Template>

		<Sprite>Sprites/resources;crystal_quartz_drop</Sprite>
		<TileTexture>resources/crystal_quartz</TileTexture>
		<Value>50</Value>
	</Resource>
	<Resource>
		<Name>crystal_amethyst</Name>
		<NameStringId>resource_crystal_amethyst</NameStringId>
		<DepthTier>7.5</DepthTier>
		<Template>CRYSTAL</Template>

		<Sprite>Sprites/resources;crystal_amethyst_drop</Sprite>
		<TileTexture>resources/crystal_amethyst</TileTexture>
		<Value>75</Value>
	</Resource>
	<Resource>
		<Name>gem_zoisite</Name>
		<NameStringId>resource_gem_zoisite</NameStringId>
		<DepthTier>10</DepthTier>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_zoisite_drop</Sprite>
		<TileTexture>resources/gem_zoisite</TileTexture>
		<Value>100</Value>
	</Resource>
	<Resource>
		<Name>gem_topaz</Name>
		<NameStringId>resource_gem_topaz</NameStringId>
		<DepthTier>12.5</DepthTier>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_topaz_drop</Sprite>
		<TileTexture>resources/gem_topaz</TileTexture>
		<Value>150</Value>
	</Resource>
	<Resource>
		<Name>gem_emerald</Name>
		<NameStringId>resource_gem_emerald</NameStringId>
		<DepthTier>15</DepthTier>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_emerald_drop</Sprite>
		<TileTexture>resources/gem_emerald</TileTexture>
		<Value>200</Value>
	</Resource>
	<Resource>
		<Name>gem_ruby</Name>
		<NameStringId>resource_gem_ruby</NameStringId>
		<DepthTier>17.5</DepthTier>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_ruby_drop</Sprite>
		<TileTexture>resources/gem_ruby</TileTexture>
		<Value>300</Value>
	</Resource>
	<Resource>
		<Name>gem_diamond</Name>
		<NameStringId>resource_gem_diamond</NameStringId>
		<DepthTier>20</DepthTier>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_diamond_drop</Sprite>
		<TileTexture>resources/gem_diamond</TileTexture>
		<Value>500</Value>
	</Resource>	
	<!--<Resource>
		<Name>crystal_avenyurine</Name>
		<Template>CRYSTAL</Template>

		<Sprite>Sprites/resources;crystal_avenyurine</Sprite>
		<TileTexture>resources/crystal_avenyurine</TileTexture>
		<ExtraHitPoints>6</ExtraHitPoints>
		<Value>400</Value>
	</Resource>
	<Resource>
		<Name>crystal_amethyst</Name>
		<Template>CRYSTAL</Template>

		<Sprite>Sprites/resources;crystal_amethyst</Sprite>
		<TileTexture>resources/crystal_amethyst</TileTexture>
		<ExtraHitPoints>4</ExtraHitPoints>
		<Value>200</Value>
	</Resource>
	<Resource>
		<Name>gem_zoisite</Name>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_zoisite</Sprite>
		<TileTexture>resources/gem_zoisite</TileTexture>
		<ExtraHitPoints>3</ExtraHitPoints>
		<Value>250</Value>
	</Resource>
	<Resource>
		<Name>gem_topaz</Name>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_topaz</Sprite>
		<TileTexture>resources/gem_topaz</TileTexture>
		<ExtraHitPoints>6</ExtraHitPoints>
		<Value>1300</Value>
	</Resource>
	<Resource>
		<Name>gem_emerald</Name>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_emerald</Sprite>
		<TileTexture>resources/gem_emerald</TileTexture>
		<ExtraHitPoints>9</ExtraHitPoints>
		<Value>1500</Value>
	</Resource>
	<Resource>
		<Name>gem_ruby</Name>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_ruby</Sprite>
		<TileTexture>resources/gem_ruby</TileTexture>
		<Value>4000</Value>
	</Resource>
	<Resource>
		<Name>gem_diamond</Name>
		<Template>GEM</Template>

		<Sprite>Sprites/resources;gem_diamond</Sprite>
		<TileTexture>resources/gem_diamond</TileTexture>
		<Value>15000</Value>
	</Resource>
	-->
		
	<!-- Orbs -->
	<Resource>
		<Name>egg_large</Name>
		<Template>EGG</Template>
		
		<SpawnOrbs Min="7" Max="7"/>
		<SpawnProjectile>egg_large_explode</SpawnProjectile>
		<TileTexture>resources/orbegg</TileTexture>
	</Resource>
	
	<Resource>
		<Name>egg_small</Name>
		<Template>EGG</Template>
		
		<SpawnOrbs Min="3" Max="3"/>
		<SpawnProjectile>egg_small_explode</SpawnProjectile>
		<TileTexture>resources/small_orbegg</TileTexture>
	</Resource>
		
	<Resource>
		<Name>orb</Name>
		<Template>ORB</Template>
		<Sprite Scale="1">Sprites/resources;orb</Sprite>

		<CollideSound>orb_collide</CollideSound>
		<CollideSoundTime>0.2</CollideSoundTime>
		<ValueOrb>1</ValueOrb>
	</Resource>

	<!-- Loot bag -->
	<Resource>
		<Name>loot_bag</Name>
		<MapIcon>loot_map</MapIcon>
		<Sprite PlayAll="1">Sprites/resources;loot_bag</Sprite>
		<RenderPriority>-1105</RenderPriority><!-- to stay behind spikes -->
		<CollisionBox>-10;-10;20;20</CollisionBox>
		<CollisionGroup>items</CollisionGroup>
		<CollideAgainst>tiles;hard_enemies;rocks</CollideAgainst>
		<CanSleep>1</CanSleep>
		<FallSoftSpeed>50</FallSoftSpeed>
		<PickupSound>player_pickup_gold</PickupSound>
		<PickupColor>1,1,1</PickupColor>
		<Persistent>1</Persistent>
		<Light Sprite="blob" Scale="1.20" Offset="0,-10"/>
		<MaxCountGroup>lootsacks</MaxCountGroup>
	</Resource>

</ResourceDefinitions>
