|
@@ -6,6 +6,7 @@ public class Inventory {
|
6
|
6
|
private final String brie = "Aged Brie";
|
7
|
7
|
private final String pass = "Backstage passes to a TAFKAL80ETC concert";
|
8
|
8
|
private final String hand = "Sulfuras, Hand of Ragnaros";
|
|
9
|
+ private final String conj = "conjured";
|
9
|
10
|
|
10
|
11
|
public Inventory(Item[] items) {
|
11
|
12
|
super();
|
|
@@ -40,10 +41,20 @@ public class Inventory {
|
40
|
41
|
soldOut(items[i]);
|
41
|
42
|
break;
|
42
|
43
|
|
|
44
|
+ case conj :
|
|
45
|
+
|
|
46
|
+ doubleExp(items[i]);
|
|
47
|
+ sellOne(items[i]);
|
|
48
|
+ betterWithAge(items[i]);
|
|
49
|
+ break;
|
|
50
|
+
|
|
51
|
+
|
43
|
52
|
default :
|
44
|
53
|
|
45
|
|
- //soldOut(items[i]);
|
|
54
|
+
|
|
55
|
+ sellOne(items[i]);
|
46
|
56
|
expiring(items[i]);
|
|
57
|
+ betterWithAge(items[i]);
|
47
|
58
|
|
48
|
59
|
}
|
49
|
60
|
|
|
@@ -99,6 +110,11 @@ public class Inventory {
|
99
|
110
|
|
100
|
111
|
}
|
101
|
112
|
|
|
113
|
+ public void doubleExp(Item item) {
|
|
114
|
+ item.setQuality(item.getQuality() - 2);
|
|
115
|
+
|
|
116
|
+ }
|
|
117
|
+
|
102
|
118
|
}
|
103
|
119
|
/*for (int i = 0; i < items.length; i++) {
|
104
|
120
|
if (!items[i].getName().equals("Aged Brie")
|