瀏覽代碼

added conjured item

ThuyKhong 6 年之前
父節點
當前提交
b26983da80
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. 5
    0
      src/main/java/com/zipcodewilmington/gildedrose/Inventory.java

+ 5
- 0
src/main/java/com/zipcodewilmington/gildedrose/Inventory.java 查看文件

@@ -14,6 +14,9 @@ public class Inventory {
14 14
         this.items = items;
15 15
     }
16 16
 
17
+    Item conjured = new Item("Conjured", 30, 40);
18
+
19
+
17 20
 
18 21
     public void updateQuality() {
19 22
         for (int i = 0; i < items.length; i++) {
@@ -30,6 +33,8 @@ public class Inventory {
30 33
                 updateBackstagePass(item, itemName);
31 34
             } else if (SULFURAS.equals(itemName)){
32 35
                 // do nothing
36
+            } else if ("Conjured".equals(itemName)){
37
+                updateQuality(item,-2,-4);
33 38
             } else {
34 39
                 updateQuality(item, -1, -2);
35 40
             }