// priority: 0

console.info('Hello, World! (You will only see this line once in console, during startup)')

onEvent('item.tooltip', tooltip => {
	tooltip.add(['mmorpg:potions/add_reset_perk_points'], 'This will not work - Use the full Talent Reset potion instead.')
	tooltip.add(['mmorpg:potions/reset_all_perks'], 'Resets all nodes on all trees')
	tooltip.add(['tac:rpg7'], 'Does no damage - Useful for boosting or pushing mobs back')
	tooltip.add(['lesraisinsadd:m202'], 'Does no damage - Useful for boosting or pushing mobs back')
	tooltip.add(['quark:bottled_cloud'], 'Cloud height is between 320 and 360')
	tooltip.addAdvanced('dubl:paragon_board_1', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7cVirile'))
		text.add(2, Text.of('Use to unlock a paragon board.'))
		text.add(3, Text.of('Only one board may be active at a time.'))
	  })
	tooltip.addAdvanced('dubl:paragon_board_2', (item, advanced, text) => {
		text.add(1, Text.of('\u00A74Raging'))
		text.add(2, Text.of('Use to unlock a paragon board.'))
		text.add(3, Text.of('Only one board may be active at a time.'))
	  })
	tooltip.addAdvanced('dubl:paragon_board_3', (item, advanced, text) => {
		text.add(1, Text.of('\u00A79Enchanted'))
		text.add(2, Text.of('Use to unlock a paragon board.'))
		text.add(3, Text.of('Only one board may be active at a time.'))
	  })
	tooltip.addAdvanced('dubl:paragon_board_4', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7aNimble'))
		text.add(2, Text.of('Use to unlock a paragon board.'))
		text.add(3, Text.of('Only one board may be active at a time.'))
	  })
	tooltip.addAdvanced('dubl:paragon_board_5', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7eAgile'))
		text.add(2, Text.of('Use to unlock a paragon board.'))
		text.add(3, Text.of('Only one board may be active at a time.'))
	  })
	tooltip.addAdvanced('dubl:paragon_board_6', (item, advanced, text) => {
		text.add(1, Text.of('\u00A76Divine'))
		text.add(2, Text.of('Use to unlock a paragon board.'))
		text.add(3, Text.of('Only one board may be active at a time.'))
	  })
	tooltip.addAdvanced('dubl:energy_0', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7dGives 20% energy regen for 30 seconds'))
		text.add(2, Text.of('\u00A7dTier 0'))
	  })
	tooltip.addAdvanced('dubl:energy_1', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7dGives 25% energy regen for 30 seconds'))
		text.add(2, Text.of('\u00A7dTier 1'))
	  })
	tooltip.addAdvanced('dubl:energy_2', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7dGives 30% energy regen for 30 seconds'))
		text.add(2, Text.of('\u00A7dTier 2'))
	  })
	tooltip.addAdvanced('dubl:energy_3', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7dGives 40% energy regen for 30 seconds'))
		text.add(2, Text.of('\u00A7dTier 3'))
	  })
	tooltip.addAdvanced('dubl:energy_4', (item, advanced, text) => {
		text.add(1, Text.of('\u00A7dGives 50% energy regen for 30 seconds'))
		text.add(2, Text.of('\u00A7dTier 4'))
	  })
	tooltip.add(['tac:db_short'], 'Fires 14 projectiles')
	tooltip.add(['tac:aa_12'], 'Fires 6 projectiles')
	tooltip.add(['tac:m870_classic'], 'Fires 9 projectiles')
	tooltip.add(['tac:m1014'], 'Fires 10 projectiles')
	tooltip.add(['tac:m82a2'], 'Fires 12 projectiles')
	tooltip.add(['tac:ai_awp'], 'Fires 4 projectiles')
	tooltip.add(['tac:mrad'], 'Fires 8 projectiles')
	tooltip.add(['tac:scar_mk20'], 'Fires 3 projectiles')
	tooltip.add(['lesraisinsadd:marlin_1895'], 'Fires 6 projectiles')
	tooltip.add(['lesraisinsadd:crossbow'], 'Fires 3 projectiles')
	tooltip.add(['lesraisinsadd:bulldog'], 'Fires 4 projectiles')
})

onEvent('item.registry', event => {
	event.create('agility')
	event.create('all_attributes')
	event.create('all_earth_damage')
	event.create('all_elemental_damage')
	event.create('all_fire_damage')
	event.create('all_physical_damage')
	event.create('all_water_damage')
	event.create('area_cdr')
	event.create('area_damage')
	event.create('area_spell_damage')
	event.create('armor')
	event.create('armor_penetration')
	event.create('attack_speed')
	event.create('axe_damage')
	event.create('bonus_exp')
	event.create('cast_speed')
	event.create('cdr')
	event.create('craft_suc_chance')
	event.create('crit_dmg_per_attack_speed')
	event.create('critical_damage')
	event.create('critical_hit')
	event.create('critical_per_item_quantity')
	event.create('critical_per_magic_find')
	event.create('curse_duration')
	event.create('damage_per_percent_of_mana')
	event.create('damage_reflected')
	event.create('defensive_duration')
	event.create('defensive_effect')
	event.create('dexterity')
	event.create('dmg_taken_to_mana')
	event.create('dmg_to_living')
	event.create('dmg_to_undead')
	event.create('dmg_when_low_hp')
	event.create('dmg_when_target_full_hp')
	event.create('dmg_when_target_low_hp')
	event.create('dodge')
	event.create('earth_penetration')
	event.create('earth_resist')
	event.create('energy')
	event.create('energy_regen')
	event.create('elemental_resist')
	event.create('favor_gain')
	event.create('fire_penetration')
	event.create('fire_resist')
	event.create('food_duration')
	event.create('food_stats')
	event.create('health')
	event.create('health_on_spell_hit')
	event.create('health_regen')
	event.create('health_to_physical_weapon_damage')
	event.create('increase_healing')
	event.create('increased_aoe')
	event.create('intelligence')
	event.create('item_find')
	event.create('lifesteal')
	event.create('magic_dmg_received')
	event.create('magic_find')
	event.create('mana')
	event.create('mana_cost')
	event.create('mana_on_kill')
	event.create('mana_per_intelligence')
	event.create('mana_regen')
	event.create('mana_shield')
	event.create('melee_dmg_received')
	event.create('move_speed')
	event.create('neg_effect_duration')
	event.create('offensive_effect')
	event.create('piercing_projectiles')
	event.create('pos_effect_duration')
	event.create('proj_damage')
	event.create('proj_dmg_received')
	event.create('projectile_spell_damage')
	event.create('ranged_damage')
	event.create('song_effect')
	event.create('spell_critical_damage')
	event.create('spell_critical_hit')
	event.create('spell_damage')
	event.create('spell_damage_per_percent_increase_healing')
	event.create('spell_lifesteal')
	event.create('strength')
	event.create('sword_damage')
	event.create('vitality')
	event.create('water_penetration')
	event.create('water_resist')
	event.create('wisdom')
	event.create('day_dmg')
	event.create('night_dmg')

  	event.create('common')
	event.create('magic')
	event.create('rare')
	event.create('relic')
	event.create('unique')
	event.create('epic')
	event.create('legendary')
  })

onEvent('block.registry', event => {
	event.create('currencycrate')
	event.create('gemcrate')
	event.create('runecrate')
})

onEvent('item.modification', event => {
	event.modify('minecraft:golden_carrot', item => {
	  item.foodProperties = food => {
		  food.hunger(2)
		  food.saturation(1)
	  }
	})
	event.modify('minecraft:bread', item => {
		item.foodProperties = food => {
			food.hunger(4)
		}
	  })
	event.modify('minecraft:cooked_porkchop', item => {
		item.foodProperties = food => {
			food.hunger(4)
			food.saturation(.6)
		}
	  })
	event.modify('minecraft:cooked_beef', item => {
		item.foodProperties = food => {
			food.hunger(4)
			food.saturation(.6)
		}
	  })
	event.modify('minecraft:cooked_mutton', item => {
		item.foodProperties = food => {
			food.hunger(4)
			food.saturation(.6)
		}
	  })
	event.modify('minecraft:cooked_chicken', item => {
		item.foodProperties = food => {
			food.hunger(4)
			food.saturation(.6)
		}
	  })
	event.modify('minecraft:cooked_rabbit', item => {
		item.foodProperties = food => {
			food.hunger(5)
			food.saturation(.6)
		}
	  })
	event.modify('minecraft:apple', item => {
		item.foodProperties = food => {
			food.hunger(2)
		}
	  })
	event.modify('minecraft:porkchop', item => {
		item.foodProperties = food => {
			food.hunger(2)
		}
	  })
	event.modify('minecraft:beef', item => {
		item.foodProperties = food => {
			food.hunger(2)
		}
	  })
	event.modify('minecraft:golden_apple', item => {
		item.foodProperties = food => {
			food.hunger(2)
			food.saturation(2)
		}
	  })
	event.modify('minecraft:cooked_cod', item => {
		item.foodProperties = food => {
			food.hunger(4)
			food.saturation(.3)
		}
	  })
	event.modify('minecraft:cooked_salmon', item => {
		item.foodProperties = food => {
			food.hunger(4)
			food.saturation(.3)
		}
	  })
	event.modify('minecraft:carrot', item => {
		item.foodProperties = food => {
			food.hunger(1)
		}
	  })
	event.modify('minecraft:baked_potato', item => {
		item.foodProperties = food => {
			food.hunger(3)
		}
	  })
	event.modify('minecraft:pumpkin_pie', item => {
		item.foodProperties = food => {
			food.hunger(5)
		}
	  })
	event.modify('quark:cooked_frog_leg', item => {
		item.foodProperties = food => {
			food.saturation(0.8)
		}
	  })
	event.modify('quark:golden_frog_leg', item => {
		item.foodProperties = food => {
			food.saturation(1)
		}
	  })
  })