Browse Source

Added positive charge to Black Crystal

Amperebot does not attack items without charge.
phspaelti 5 years ago
parent
commit
0de50705dc
1 changed files with 30 additions and 30 deletions
  1. 30
    30
      src/com/droidquest/items/BlackCrystal.java

+ 30
- 30
src/com/droidquest/items/BlackCrystal.java View File

@@ -13,40 +13,40 @@ public class BlackCrystal extends Crystal
13 13
 {
14 14
 public BlackCrystal(int X, int Y, Room r) 
15 15
   {
16
-	super(X,Y,r,0);
16
+ super(X,Y,r,10);
17 17
   }
18 18
 
19 19
 public void GenerateIcons() 
20 20
   {
21
-	icons = new ImageIcon[1];
22
-	icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR));
23
-	Graphics g;
24
-	Graphics2D g2;
25
-	Color transparent = new Color(0,0,0,0);
26
-	
27
-	// 0 = blue
28
-	try
29
-	  {
30
-	     g = icons[0].getImage().getGraphics();
31
-	  }
32
-	catch (NullPointerException e)
33
-	  {
34
-	     System.out.println("Could not get Graphics pointer to " + getClass() + " Image");
35
-	     return;
36
-	  }
37
-	g2 = (Graphics2D) g;
38
-	g2.setBackground(transparent);
39
-	g2.clearRect(0,0,width,height);
40
-	g.setColor(Color.black);
41
-	g.fillRect(12,0,4,24);
42
-	g.fillRect(8,4,12,16);
43
-	g.fillRect(4,6,20,12);
44
-	g.fillRect(0,10,28,4);
45
-	g.fillRect(0,4,4,2);
46
-	g.fillRect(0,18,4,2);
47
-	g.fillRect(24,4,4,2);
48
-	g.fillRect(24,18,4,2);	
49
-	currentIcon = icons[0].getImage();
21
+ icons = new ImageIcon[1];
22
+ icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR));
23
+ Graphics g;
24
+ Graphics2D g2;
25
+ Color transparent = new Color(0,0,0,0);
26
+ 
27
+ // 0 = blue
28
+ try
29
+   {
30
+      g = icons[0].getImage().getGraphics();
31
+   }
32
+ catch (NullPointerException e)
33
+   {
34
+      System.out.println("Could not get Graphics pointer to " + getClass() + " Image");
35
+      return;
36
+   }
37
+ g2 = (Graphics2D) g;
38
+ g2.setBackground(transparent);
39
+ g2.clearRect(0,0,width,height);
40
+ g.setColor(Color.black);
41
+ g.fillRect(12,0,4,24);
42
+ g.fillRect(8,4,12,16);
43
+ g.fillRect(4,6,20,12);
44
+ g.fillRect(0,10,28,4);
45
+ g.fillRect(0,4,4,2);
46
+ g.fillRect(0,18,4,2);
47
+ g.fillRect(24,4,4,2);
48
+ g.fillRect(24,18,4,2); 
49
+ currentIcon = icons[0].getImage();
50 50
   }
51 51
 
52 52
 public void Decorate() {}

Loading…
Cancel
Save