package net.uomc.mineshaft.blacksmith; import net.dv8tion.jda.api.entities.Member; import net.uomc.mineshaft.Mineshaft; public class Sword extends Tool { public static final int MAX_SWORD_LEVEL = 5; public Sword(Mineshaft mineshaft, Member member) { super(mineshaft, member, "sword"); } public String getName() { return swordLevelToName(getLevel()); } public String getEmoji() { // TODO add if enchanted return swordToEmoji(getLevel()); } public static String swordToEmoji(int level) { switch ((int) level) { case 0: return ""; case 1: return "<:copper_sword:1432879763193856060>"; case 2: return "<:iron_sword:1432879761268412446>"; case 3: return "<:gold_sword:1432879759385432155>"; case 4: return "<:diamond_sword:1432879757065850941>"; default: return "<:netherite_sword:1432879754712711278>"; } } public static String swordLevelToName(int level) { switch ((int) level) { case 0: return "None"; case 1: return "Copper"; case 2: return "Iron"; case 3: return "Gold"; case 4: return "Diamond"; default: return "Netherite"; } } public int getMaxLevel() { return MAX_SWORD_LEVEL; } public long getDamageBonus() { switch ((int) getLevel()) { case 0: // "None"; return 0; case 1: // "Copper"; return 2; case 2: // "Iron"; return 4; case 3: // "Gold"; return 6; case 4: // "Diamond"; return 8; default: // "Netherite"; return 10; } } }