Added positive charge to Black Crystal

Amperebot does not attack items without charge.
This commit is contained in:
phspaelti 2014-03-12 22:13:45 +09:00
parent 642e746efe
commit 0de50705dc

View File

@ -13,40 +13,40 @@ public class BlackCrystal extends Crystal
{
public BlackCrystal(int X, int Y, Room r)
{
super(X,Y,r,0);
super(X,Y,r,10);
}
public void GenerateIcons()
{
icons = new ImageIcon[1];
icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR));
Graphics g;
Graphics2D g2;
Color transparent = new Color(0,0,0,0);
// 0 = blue
try
{
g = icons[0].getImage().getGraphics();
}
catch (NullPointerException e)
{
System.out.println("Could not get Graphics pointer to " + getClass() + " Image");
return;
}
g2 = (Graphics2D) g;
g2.setBackground(transparent);
g2.clearRect(0,0,width,height);
g.setColor(Color.black);
g.fillRect(12,0,4,24);
g.fillRect(8,4,12,16);
g.fillRect(4,6,20,12);
g.fillRect(0,10,28,4);
g.fillRect(0,4,4,2);
g.fillRect(0,18,4,2);
g.fillRect(24,4,4,2);
g.fillRect(24,18,4,2);
currentIcon = icons[0].getImage();
icons = new ImageIcon[1];
icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR));
Graphics g;
Graphics2D g2;
Color transparent = new Color(0,0,0,0);
// 0 = blue
try
{
g = icons[0].getImage().getGraphics();
}
catch (NullPointerException e)
{
System.out.println("Could not get Graphics pointer to " + getClass() + " Image");
return;
}
g2 = (Graphics2D) g;
g2.setBackground(transparent);
g2.clearRect(0,0,width,height);
g.setColor(Color.black);
g.fillRect(12,0,4,24);
g.fillRect(8,4,12,16);
g.fillRect(4,6,20,12);
g.fillRect(0,10,28,4);
g.fillRect(0,4,4,2);
g.fillRect(0,18,4,2);
g.fillRect(24,4,4,2);
g.fillRect(24,18,4,2);
currentIcon = icons[0].getImage();
}
public void Decorate() {}