let itemMap = new Map();

const weapons = {

  sword: {
    velocity: 1.6,
    damage: {
      wooden: 4,
      golden: 4.5,
      stone: 5,
      copper: 5.5,
      amethyst: 6.5,
      iron: 6,
      emerald: 7,
      diamond: 7.5,
      netherite: 8,
      echo: 10
    }
  },

  cutlass: {
    velocity: 1.4,
    damage: {
      wooden: 4.2,
      golden: 4.8,
      stone: 5.3,
      copper: 5.8,
      amethyst: 6.8,
      iron: 6.3,
      emerald: 7.4,
      diamond: 7.9,
      netherite: 8.4,
      echo: 10.5
    }
  },

  katana: {
    velocity: 1.5,
    damage: {
      wooden: 4.6,
      golden: 5.2,
      stone: 5.8,
      copper: 6.3,
      amethyst: 7.5,
      iron: 6.9,
      emerald: 8.1,
      diamond: 8.6,
      netherite: 9.2,
      echo: 11.5
    }
  },

  claymore: {
    velocity: 0.8,
    damage: {
      wooden: 8.0,
      golden: 8.7,
      stone: 9.8,
      copper: 10.6,
      amethyst: 12.3,
      iron: 11.2,
      emerald: 13.3,
      diamond: 14.0,
      netherite: 15.1,
      echo: 18.0
    }
  },

  mace: {
    velocity: 1.1,
    damage: {
      wooden: 5.8,
      golden: 6.4,
      stone: 7.3,
      copper: 8.0,
      amethyst: 9.5,
      iron: 8.7,
      emerald: 10.0,
      diamond: 10.5,
      netherite: 11.5,
      echo: 14.5
    }
  },

  hammer: {
    velocity: 0.9,
    damage: {
      wooden: 6.4,
      golden: 6.4,
      stone: 8.0,
      copper: 8.8,
      amethyst: 10.5,
      iron: 9.6,
      emerald: 12.0,
      diamond: 11.2,
      netherite: 12.8,
      echo: 15.9
    }
  },

  greathammer: {
    velocity: 0.6,
    damage: {
      wooden: 7.7,
      golden: 7.7,
      stone: 9.6,
      copper: 10.6,
      amethyst: 12.6,
      iron: 11.5,
      emerald: 14.4,
      diamond: 13.4,
      netherite: 15.4,
      echo: 19.1
    }
  },
  machete: {
    velocity: 1.5,
    damage: {
      wooden: 3.8,
      golden: 4.1,
      stone: 4.5,
      copper: 5.0,
      amethyst: 5.9,
      iron: 5.4,
      emerald: 6.3,
      diamond: 6.8,
      netherite: 7.2,
      echo: 9.0
    }
  },
  scythe: {
    velocity: 1.2,
    damage: {
      wooden: 4.9, //4.9
      golden: 5.3,
      stone: 5.9,
      copper: 6.5,
      amethyst: 7.7,
      iron: 7.0,
      emerald: 8.2,
      diamond: 8.8,
      netherite: 9.4,
      echo: 11.7
    }
  },

  knife: {
    velocity: 2.0,
    damage: {
      wooden: 3.2,
      golden: 3.6,
      stone: 4.0,
      copper: 4.4,
      amethyst: 5.2,
      iron: 4.8,
      emerald: 5.6,
      diamond: 6.0,
      netherite: 6.4,
      echo: 8.0
    }
  },

  dagger: {
    velocity: 2.5,
    damage: {
      wooden: 4.8,
      golden: 5.4,
      stone: 6.0,
      copper: 6.6,
      amethyst: 7.8,
      iron: 7.2,
      emerald: 8.4,
      diamond: 9.0,
      netherite: 9.6,
      echo: 12.0
    }
  },

  sai: {
    velocity: 2.0,
    damage: {
      wooden: 4.8,
      golden: 5.4,
      stone: 6.0,
      copper: 6.6,
      amethyst: 7.8,
      iron: 7.2,
      emerald: 8.4,
      diamond: 9.0,
      netherite: 9.6,
      echo: 12.0
    }
  },

  spear: {
    velocity: 1.1,
    damage: {
      wooden: 4.4,
      golden: 4.9,
      stone: 5.5,
      copper: 6.1,
      amethyst: 7.2,
      iron: 6.6,
      emerald: 7.7,
      diamond: 8.2,
      netherite: 8.8,
      echo: 11.0
    },
    range: 1.2
  },

  glaives: {
    velocity: 0.8,
    damage: {
      wooden: 5.7,
      golden: 6.4,
      stone: 7.2,
      copper: 7.9,
      amethyst: 9.4,
      iron: 8.6,
      emerald: 10.0,
      diamond: 10.7,
      netherite: 11.4,
      echo: 14.3
    },
    range: 1.2
  },

  axe: {
    velocity: 1.2,
    damage: {
      wooden: 5.3,
      golden: 6.0,
      stone: 6.7,
      copper: 7.3,
      amethyst: 8.7,
      iron: 8.0,
      emerald: 10.0,
      diamond: 9.3,
      netherite: 10.7,
      echo: 13.3
    }
  },

  battleaxe: {
    velocity: 1.0,
    damage: {
      wooden: 7.4,
      golden: 8.4,
      stone: 10.2,
      copper: 11.1,
      amethyst: 13.0,
      iron: 12.0,
      emerald: 13.8,
      diamond: 14.9,
      netherite: 16.0,
      echo: 18.9
    }
  },

  boomerang: {
    velocity: 1.0,
    damage: {
      wooden: 4.0,
      golden: 4.5,
      stone: 5.0,
      copper: 5.5,
      amethyst: 6.5,
      iron: 6.0,
      emerald: 7.0,
      diamond: 7.5,
      netherite: 8.0,
      echo: 10.0
    }
  },

  shuriken: {
    velocity: 1.2,
    damage: {
      wooden: 4.8,
      golden: 5.4,
      stone: 6.0,
      copper: 6.6,
      amethyst: 7.8,
      iron: 7.2,
      emerald: 8.4,
      diamond: 9.0,
      netherite: 9.6,
      echo: 12.0
    }
  }
};

for (const [weapon, stats] of Object.entries(weapons)) {
  for (const [material, dmg] of Object.entries(stats.damage)) {

    const key = `msft:${material}_${weapon}`;

    const range = stats.range !== undefined ? stats.range + 3 : 3;
    const entry = { damage: dmg, velocity: stats.velocity, range };
    itemMap.set(key, entry);
  }
}

//console.log(itemMap);
export {itemMap}