import java.awt.*; public class ResearchSpell{ String spellName; WhiteLabel nameLabel; int lvl; ValueBar researchlvl; int pos; public ResearchSpell(String spell,int level){ spellName= spell; lvl=level; researchlvl = new ValueBar("Reasearch",0,false); // investment = räknas ut på lämpligt sätt } public ResearchSpell(ClientThread ct, Event event){ int index = ct.researchList.getSelectedIndex(); String sName = ct.researchList.getItem(((Integer)event.arg).intValue()); System.out.println("You chose the spell: "+sName); spellName = sName; Spell spellObj = (Spell)ct.spellBook.existingSpells.get(sName); if (spellObj != null) { lvl = spellObj.getLevel(); researchlvl = new ValueBar("Research",0,false); nameLabel = new WhiteLabel(spellName,10,10); //Stoppa in där den passar for(int i = 0;i= 100){ ct.message("You have discovered the secret of "+spellName); ct.researchRoom.remove(researchlvl); ct.researchRoom.remove(nameLabel); ct.spellBook.researchSpells[pos] = null; return true; }else{ return false; } } }