// priority: 0

// Visit the wiki for more info - https://kubejs.com/

console.info('Hello, World! (Loaded server scripts)')

ItemEvents.rightClicked('kubejs:portable_pc', e => {
  e.player.runCommandSilent('pc')
})

ItemEvents.rightClicked('kubejs:portable_healer', e => {
  e.player.runCommandSilent('pokeheal')
})

ItemEvents.rightClicked('kubejs:gold_bottle_cap', e => {
  e.player.runCommandSilent('pokeedit 1 hp_iv=31'),
  e.player.runCommandSilent('pokeedit 1 attack_iv=31'),
  e.player.runCommandSilent('pokeedit 1 defence_iv=31'),
  e.player.runCommandSilent('pokeedit 1 special_attack_iv=31'),
  e.player.runCommandSilent('pokeedit 1 special_defence_iv=31'),
  e.player.runCommandSilent('pokeedit 1 speed_iv=31'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:red_bottle_cap', e => {
  e.player.runCommandSilent('pokeedit 1 attack_iv=31'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:blue_bottle_cap', e => {
  e.player.runCommandSilent('pokeedit 1 defence_iv=31'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:cyan_bottle_cap', e => {
  e.player.runCommandSilent('pokeedit 1 special_attack_iv=31'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:pink_bottle_cap', e => {
  e.player.runCommandSilent('pokeedit 1 special_defence_iv=31'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:green_bottle_cap', e => {
  e.player.runCommandSilent('pokeedit 1 speed_iv=31'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:white_bottle_cap', e => {
  e.player.runCommandSilent('pokeedit 1 hp_iv=31'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:perma_weak', e => {
  e.player.runCommandSilent('pokeedit 1 attack_iv=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:perma_slow', e => {
  e.player.runCommandSilent('pokeedit 1 speed_iv=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:hp_max', e => {
  e.player.runCommandSilent('pokeedit 1 hp_ev=252'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:protein_max', e => {
  e.player.runCommandSilent('pokeedit 1 attack_ev=252'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:iron_max', e => {
  e.player.runCommandSilent('pokeedit 1 defence_ev=252'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:calcium_max', e => {
  e.player.runCommandSilent('pokeedit 1 special_attack_ev=252'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:zinc_max', e => {
  e.player.runCommandSilent('pokeedit 1 special_defence_ev=252'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:carbos_max', e => {
  e.player.runCommandSilent('pokeedit 1 speed_ev=252'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:ev_reset', e => {
  e.player.runCommandSilent('pokeedit 1 hp_ev=0'),
  e.player.runCommandSilent('pokeedit 1 attack_ev=0'),
  e.player.runCommandSilent('pokeedit 1 defence_ev=0'),
  e.player.runCommandSilent('pokeedit 1 special_attack_ev=0'),
  e.player.runCommandSilent('pokeedit 1 special_defence_ev=0'),
  e.player.runCommandSilent('pokeedit 1 speed_ev=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:hp_reset', e => {
  e.player.runCommandSilent('pokeedit 1 hp_ev=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:attack_reset', e => {
  e.player.runCommandSilent('pokeedit 1 attack_ev=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:defense_reset', e => {
  e.player.runCommandSilent('pokeedit 1 defence_ev=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:special_attack_reset', e => {
  e.player.runCommandSilent('pokeedit 1 special_attack_ev=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:special_defense_reset', e => {
  e.player.runCommandSilent('pokeedit 1 special_defence_ev=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:speed_reset', e => {
  e.player.runCommandSilent('pokeedit 1 speed_ev=0'),
  e.item.count--
})

ItemEvents.rightClicked('kubejs:shiny_dust', e => {
  e.player.runCommandSilent('pokeedit 1 shiny'),
  e.item.count--
})