diff --git a/TypeScript/app/gilded-rose.ts b/TypeScript/app/gilded-rose.ts index 928aa579..d3f9377a 100644 --- a/TypeScript/app/gilded-rose.ts +++ b/TypeScript/app/gilded-rose.ts @@ -21,7 +21,10 @@ export class GildedRose { for (let i = 0; i < this.items.length; i++) { if (this.items[i].name != 'Aged Brie' && this.items[i].name != 'Backstage passes to a TAFKAL80ETC concert') { if (this.items[i].quality > 0) { - if (this.items[i].name != 'Sulfuras, Hand of Ragnaros') { + if (this.items[i].name === 'Conjured') { + const updatedQuality = this.items[i].quality - 2 + this.items[i].quality = updatedQuality < 0 ? 0 : updatedQuality + } else if (this.items[i].name != 'Sulfuras, Hand of Ragnaros') { this.items[i].quality = this.items[i].quality - 1 } } @@ -49,7 +52,10 @@ export class GildedRose { if (this.items[i].name != 'Aged Brie') { if (this.items[i].name != 'Backstage passes to a TAFKAL80ETC concert') { if (this.items[i].quality > 0) { - if (this.items[i].name != 'Sulfuras, Hand of Ragnaros') { + if (this.items[i].name === 'Conjured') { + const updatedQuality = this.items[i].quality - 2 + this.items[i].quality = updatedQuality < 0 ? 0 : updatedQuality + } else if (this.items[i].name != 'Sulfuras, Hand of Ragnaros') { this.items[i].quality = this.items[i].quality - 1 } }