gt: 								if(tag.getType() == Tag.SMALLPOTION)
context: package base;
  
  import java.awt.AlphaComposite;
  import java.awt.BorderLayout;
  import java.awt.Color;
  import java.awt.Dimension;
  import java.awt.FlowLayout;
  import java.awt.Font;
  import java.awt.FontMetrics;
  import java.awt.Graphics;
  import java.awt.Graphics2D;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  import java.awt.event.MouseEvent;
  import java.awt.event.MouseListener;
  
  import javax.sound.midi.MidiDevice.Info;
  import javax.swing.JButton;
  import javax.swing.JComponent;
  import javax.swing.JOptionPane;
  import javax.swing.JPanel;
  
  import Data.InfoManager;
  import main.Main;
  import render.InventoryTag;
  import render.ShopTag;
  import render.Tag;
  import render.UpgradableTag;
  import res.Resource;
  
  public class ShopScreen extends JComponent{
  	private static double[] xpos = new double[24];
  	private static double[] ypos = new double[24];
  	private static double deltax = (double) 1/24;
  	private static double deltay = (double) 1/18;
  	
  	public static int[] xpos_ = new int[xpos.length];
  	public static int[] ypos_ = new int[ypos.length];
  	public static int deltax_;
  	public static int deltay_;
  	
  	private static Tag[] tags = new Tag[12];
  	public static int counterBuyOrUpgrade =0;
  	
  	private static JButton backButton;
  	private static final Font boldfont = new Font("Tahoma", Font.BOLD, 30);
  	private static final Font font = new Font("Tahoma", Font.PLAIN, 25);
  	//private static String[] label = {"Shop", "Inventory", "Sword", "Shield", "Large Potion", "Small Potion"};
  	private static FontMetrics fm = new FontMetrics(font) {};
  	
  	static{
  		for(int i = 0;i<xpos.length;i++)
  		{
  			xpos[i] = deltax * i;
  		}
  		
  		for(int i = 0;i<ypos.length;i++)
  		{
  			ypos[i] = deltay * i;
  		}
  		
  		for(int i = 0;i<xpos_.length;i++)
  		{
  			xpos_[i] = (int) (GameScreen.WIDTH * xpos[i]);
  		}
  		
  		for(int i = 0;i<ypos_.length;i++)
  		{
  			ypos_[i] = (int) (GameScreen.HEIGHT * ypos[i]);
  		}
  		
  		deltax_ = xpos_[1] - xpos_[0];
  		deltay_ = ypos_[1] - ypos_[0];
  		
  	}
  	
  	public ShopScreen(){
  		super();
  		setLayout(new BorderLayout());
  		JPanel buttomPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
  		buttomPanel.setBackground(new Color(0, 0, 0, 0));
  		setPreferredSize(new Dimension(GameScreen.WIDTH, GameScreen.HEIGHT));
  		backButton = new JButton("Back");
  		backButton.addActionListener(new ActionListener() {
  			@Override
  			public void actionPerformed(ActionEvent e) {
  				Main.changeGameScreen(Main.SELECTSCREEN);
  			}
  		});
  		buttomPanel.add(backButton);
  		add(buttomPanel,BorderLayout.SOUTH);
  		setVisible(true);
  		addMouseListener(new MouseListener() {
  			@Override
  			public void mouseReleased(MouseEvent arg0) {}
  			@Override
  			public void mousePressed(MouseEvent arg0) {}
  			@Override
  			public void mouseExited(MouseEvent arg0) {}
  			@Override
  			public void mouseEntered(MouseEvent arg0) {}
  			@Override
  			public void mouseClicked(MouseEvent arg0) {
  				System.out.println(arg0.getX()+ " " + arg0.getY());
  				for(Tag tag : tags)
  				{
  					if(tag.isWithin(arg0.getX(), arg0.getY()))
  					{
  						System.out.println("Tag Type: " + tag.getType() + " Tag Rarity: " + tag.getRarity() + " is pointed.");
  						if(tag instanceof ShopTag)
  						{
  							if(((ShopTag) tag).isBuyable())
  							{
  								String name = "";
  								counterBuyOrUpgrade++;
  								switch(tag.getRarity())
  								{
  									case Tag.GOLD:
  										name += "Golden ";
  										break;
  									case Tag.SILVER:
  										name += "Silver ";
  										break;
  									case Tag.COPPER:
  										name += "Copper ";
  										break;
  								}
  								
  								switch(tag.getType())
  								{
  									case Tag.SWORD:
  										name += "Sword";
  										break;
  									case Tag.SHIELD:
  										name += "Shield";
  										break;
  								}
  								int choice = JOptionPane.showConfirmDialog(null,"Are you sure that you are going to buy it?", name ,JOptionPane.YES_NO_OPTION);
  								if(choice == JOptionPane.YES_OPTION)
  								{
  									if(((ShopTag) tag).buyTag())
  									{
  										counterBuyOrUpgrade++;
  										for(Tag tag2 : tags)
  										{
  											if(tag2 instanceof InventoryTag && tag2.getType() == tag.getType() && tag2.getRarity() == tag.getRarity())
  											{
  												if(tag2.getType() == Tag.SWORD)
  													InfoManager.LEVEL_WEAPON[InfoManager.SELECTED_SLOT] += Math.pow(2, tag2.getRarity()-1);
  												else if(tag2.getType() == Tag.SHIELD)
  													InfoManager.LEVEL_ARMOR[InfoManager.SELECTED_SLOT] += Math.pow(2, tag2.getRarity()-1);
  												((InventoryTag) tag2).unlock();	
  												
  												InfoManager.saveGame(InfoManager.NORMALSAVE);
  											}
  										}
  									}else
  									{
  										JOptionPane.showMessageDialog(null, "Sorry, Insufficient Money");
  									}
  								}
  							}
  						}else if(tag instanceof InventoryTag)
  						{
  							if(((InventoryTag) tag).isUnlocked())
  							{
  								for(Tag tag2 : tags)
  								{
  									if(tag2 instanceof InventoryTag && tag2.getType() == tag.getType())
  									{
  										((InventoryTag) tag2).setEquipped(false);
  									}
  								}
  								((InventoryTag) tag).setEquipped(true);
  								if(tag.getType() == Tag.SWORD)
  								{
  									InfoManager.SWORDEQUIP[InfoManager.SELECTED_SLOT] = ((InventoryTag) tag).getRarity();
  								}else if(tag.getType() == Tag.SHIELD)
  								{
  									InfoManager.ARMOREQUIP[InfoManager.SELECTED_SLOT] = ((InventoryTag) tag).getRarity();
  								}
  								InfoManager.saveGame(InfoManager.NORMALSAVE);
  							}
  						}else if(tag instanceof UpgradableTag)
  						{
  							String name = "";
  							switch(tag.getType())
  							{
  							case Tag.SMALLPOTION:
  								name = "Small Potion";
  								break;
  							case Tag.LARGEPOTION:
  								name = "Large Potion";
  								break;
  							}
  							int choice = JOptionPane.showConfirmDialog(null,"Are you sure that you are going to upgrade it?", name ,JOptionPane.YES_NO_OPTION);
  							if(choice == JOptionPane.YES_OPTION)
  							{
  							int situation = ((UpgradableTag) tag).upgrade();
  							
  							switch(situation)
  							{
  							case 1:
  