public static boolean chatCommandManager(String message) { message = message.trim().toLowerCase(); if (message.length() > 1 && message.substring(0, 1).equals(".") && !message.substring(1, 2).equals(".") && !message.equals(".")) { String[] datas = message.split(" "); if (datas.length >= 1) { if (datas[0].equals(".joueur1")) { ChatCommandPlayer.chatCommandPlayer(Mideas.joueur1(), datas); } else if (datas[0].equals(".target")) { ChatCommandPlayer.chatCommandPlayer(Mideas.joueur1().getTarget(), datas); } else if (datas[0].equals(".get")) { ChatCommandGet.chatCommandGet(datas); } else { ChatCommandOther.chatCommandOther(datas); } } return true; } return false; }
@Override public boolean activateCondition() { return Mideas.joueur1().getGuild() != null; }
public static boolean mouseEvent() { hoverLeft1 = false; hoverLeft2 = false; hoverLeft3 = false; hoverLeft4 = false; hoverLeft5 = false; hoverLeft6 = false; hoverLeft7 = false; hoverLeft8 = false; hoverLeft9 = false; hoverLeft10 = false; if (Mideas.mouseX() >= Display.getWidth() / 2 + Talent.getX() + 24 && Mideas.mouseX() <= Display.getWidth() / 2 + Talent.getX() + 24 + 47 && Mideas.mouseY() >= Display.getHeight() / 2 + Talent.getY() + 12 && Mideas.mouseY() <= Display.getHeight() / 2 + Talent.getY() + 12 + 48) { hoverLeft1 = true; } else if (Mideas.mouseX() >= Display.getWidth() / 2 + Talent.getX() + 24 + 66 && Mideas.mouseX() <= Display.getWidth() / 2 + Talent.getX() + 24 + 47 + 66 && Mideas.mouseY() >= Display.getHeight() / 2 + Talent.getY() + 12 && Mideas.mouseY() <= Display.getHeight() / 2 + Talent.getY() + 12 + 48) { hoverLeft2 = true; } else if (Mideas.mouseX() >= Display.getWidth() / 2 + Talent.getX() + 24 + 132 && Mideas.mouseX() <= Display.getWidth() / 2 + Talent.getX() + 24 + 47 + 132 && Mideas.mouseY() >= Display.getHeight() / 2 + Talent.getY() + 12 && Mideas.mouseY() <= Display.getHeight() / 2 + Talent.getY() + 12 + 48) { hoverLeft3 = true; } else if (Mideas.mouseX() >= Display.getWidth() / 2 + Talent.getX() + 24 && Mideas.mouseX() <= Display.getWidth() / 2 + Talent.getX() + 24 + 47 && Mideas.mouseY() >= Display.getHeight() / 2 + Talent.getY() + 12 + 65 && Mideas.mouseY() >= Display.getHeight() / 2 + Talent.getY() + 12 + 65 && Mideas.mouseY() <= Display.getHeight() / 2 + Talent.getY() + 12 + 65 + 48) { hoverLeft4 = true; } else if (Mideas.mouseX() >= Display.getWidth() / 2 + Talent.getX() + 24 + 66 && Mideas.mouseX() <= Display.getWidth() / 2 + Talent.getX() + 24 + 47 + 66 && Mideas.mouseY() >= Display.getHeight() / 2 + Talent.getY() + 12 + 65 && Mideas.mouseY() <= Display.getHeight() / 2 + Talent.getY() + 12 + 65 + 48) { hoverLeft5 = true; } else if (Mideas.mouseX() >= Display.getWidth() / 2 + Talent.getX() + 24 + 132 && Mideas.mouseX() <= Display.getWidth() / 2 + Talent.getX() + 24 + 47 + 132 && Mideas.mouseY() >= Display.getHeight() / 2 + Talent.getY() + 12 + 65 && Mideas.mouseY() <= Display.getHeight() / 2 + Talent.getY() + 12 + 65 + 48) { hoverLeft6 = true; } if (Mouse.getEventButtonState()) { if (Mouse.getEventButton() == 0) { if (numberTalent < Mideas.joueur1().getLevel() + 1) { if (hoverLeft1 && heroicStrikeTalent < 3) { heroicStrikeTalent++; numberArmsTalent++; numberFirstArms++; numberTalent++; // ((SpellShortcut)Mideas.joueur1().getSpells(0)).getSpell().setDamage(((SpellShortcut)Mideas.joueur1().getSpells(0)).getSpell().getDefaultDamage()*0.05f); Talent.setTalent(); } else if (hoverLeft2 && deflectionTalent < 5) { deflectionTalent++; numberArmsTalent++; numberFirstArms++; numberTalent++; Mideas.joueur1().setStuffArmor(5); Talent.setTalent(); } else if (hoverLeft3 && improvedRend < 3) { improvedRend++; numberArmsTalent++; numberFirstArms++; numberTalent++; Talent.setTalent(); } else if (hoverLeft4 && improvedCharge < 2 && numberFirstArms >= 5) { improvedCharge++; numberArmsTalent++; numberTalent++; Talent.setTalent(); } else if (hoverLeft5 && ironWill < 5 && numberFirstArms >= 5) { ironWill++; numberArmsTalent++; numberTalent++; Talent.setTalent(); } else if (hoverLeft6 && improvedThunderClap < 3 && numberFirstArms >= 5) { improvedThunderClap++; numberArmsTalent++; numberTalent++; Talent.setTalent(); } } } if (Mouse.getEventButton() == 1) { if (hoverLeft1 && heroicStrikeTalent > 0 && checkLine(numberFirstArms, improvedCharge, ironWill, improvedThunderClap)) { heroicStrikeTalent--; numberArmsTalent--; numberFirstArms--; numberTalent--; // ((SpellShortcut)Mideas.joueur1().getSpells(0)).getSpell().setDamage(-((SpellShortcut)Mideas.joueur1().getSpells(0)).getSpell().getDefaultDamage()*0.05f); Talent.setTalent(); } else if (hoverLeft2 && deflectionTalent > 0 && checkLine(numberFirstArms, improvedCharge, ironWill, improvedThunderClap)) { deflectionTalent--; numberArmsTalent--; numberFirstArms--; numberTalent--; Mideas.joueur1().setStuffArmor(-5); Talent.setTalent(); } else if (hoverLeft3 && improvedRend > 0 && checkLine(numberFirstArms, improvedCharge, ironWill, improvedThunderClap)) { improvedRend--; numberArmsTalent--; numberFirstArms--; numberTalent--; Talent.setTalent(); } else if (hoverLeft4 && improvedCharge > 0) { improvedCharge--; numberArmsTalent--; numberFirstArms--; numberTalent--; Talent.setTalent(); } else if (hoverLeft5 && ironWill > 0) { ironWill--; numberArmsTalent--; numberFirstArms--; numberTalent--; Talent.setTalent(); } else if (hoverLeft6 && improvedThunderClap > 0) { improvedThunderClap--; numberArmsTalent--; numberFirstArms--; numberTalent--; Talent.setTalent(); } } } return false; }
public static void draw() throws LWJGLException, IOException { int xLeft = -279; int xRight = -114; int y = -275; int yShift = 52; Draw.drawQuad(Sprites.shop_frame, Display.getWidth() / 2 - 300, Display.getHeight() / 2 - 350); drawShopItem(0, xLeft, y); drawShopItem(1, xLeft, y + yShift); drawShopItem(2, xLeft, y + 2 * yShift); drawShopItem(3, xLeft, y + 3 * yShift); drawShopItem(4, xLeft, y + 4 * yShift); drawShopItem(5, xRight, y); drawShopItem(6, xRight, y + yShift); drawShopItem(7, xRight, y + 2 * yShift); drawShopItem(8, xRight, y + 3 * yShift); drawShopItem(9, xRight, y + 4 * yShift); shopHover(0, xLeft, y); shopHover(1, xLeft, y + yShift); shopHover(2, xLeft, y + 2 * yShift); shopHover(3, xLeft, y + 3 * yShift); shopHover(4, xLeft, y + 4 * yShift); shopHover(5, xRight, y); shopHover(6, xRight, y + yShift); shopHover(7, xRight, y + 2 * yShift); shopHover(8, xRight, y + 3 * yShift); shopHover(9, xRight, y + 4 * yShift); drawGoldCoin(0, xLeft, y); drawGoldCoin(1, xLeft, y + yShift); drawGoldCoin(2, xLeft, y + 2 * yShift); drawGoldCoin(3, xLeft, y + 3 * yShift); drawGoldCoin(4, xLeft, y + 4 * yShift); drawGoldCoin(5, xRight, y); drawGoldCoin(6, xRight, y + yShift); drawGoldCoin(7, xRight, y + 2 * yShift); drawGoldCoin(8, xRight, y + 3 * yShift); drawGoldCoin(9, xRight, y + 4 * yShift); calcCoin(Mideas.joueur1().getGold(), xRight, y + 250); if (hover_button) { Draw.drawQuad( Sprites.close_shop_hover, Display.getWidth() / 2 + 27, Display.getHeight() / 2 - 337); } if (page != 0) { Draw.drawQuad( Sprites.left_colored_arrow, Display.getWidth() / 2 + xLeft + 3, Display.getHeight() / 2 + y + 268); } if (page != 2) { Draw.drawQuad( Sprites.right_colored_arrow, Display.getWidth() / 2 + xRight + 125, Display.getHeight() / 2 + y + 268); } if (right_arrow && page != 2) { Draw.drawQuad( Sprites.right_arrow_hover, Display.getWidth() / 2 + xRight + 125, Display.getHeight() / 2 + y + 268); } if (left_arrow && page != 0) { Draw.drawQuad( Sprites.left_arrow_hover, Display.getWidth() / 2 + xLeft + 3, Display.getHeight() / 2 + y + 268); } if (page == 2) { Draw.drawQuad( Sprites.right_uncolored_arrow, Display.getWidth() / 2 + xRight + 125, Display.getHeight() / 2 + y + 268); } }