Open Rushwind13 opened 2 hours ago
just figured out the "known cursed" thing
item cursed but I don't know yet item flags: ITEM_FLAG_CURSED known: 0
I know the item is cursed item flags: ITEM_FLAG_CURSED known: ITEM_FLAG_CURSED
I know the item is uncursed ("I know the item's cursed status") item flags: 0 known: ITEM_FLAG_CURSED
I don't know if it's cursed, and it is uncursed (it's not cursed, but I don't know it) item flags: 0 known: 0
So the display happens when known is set, and what is displayed is the underlying item flags/values if( known(cursed) ) display(item.cursed?"cursed":"uncursed") else "" if( known(magic)) display("(+x, +y)") else ""
Given I have a dagger And the dagger is cursed And the dagger is unidentified When I display equipment Then the dagger is not labeled as cursed
Given I have a dagger And the dagger is cursed And I have tried to remove it When I display equipment Then the dagger is identified as cursed Then the dagger is labeled as cursed
Given I have a dagger And the dagger is cursed And the dagger is magical And I have tried to remove it When I display equipment Then the dagger is identified as cursed Then the dagger is labeled as cursed Then the dagger is not labeled as magical
Given I have a dagger And the dagger is not cursed And the dagger is magical And the dagger is unidentified When I display equipment Then the dagger is not labeled as cursed Then the dagger is not labeled as magical
Given I have a dagger And the dagger is not cursed And the dagger is magical When I read a Scroll of Identify When I display equipment Then the dagger is not labeled as cursed Then the dagger is labeled as magical
Acceptance Criteria:
Note: might need ITEM_FLAG_KNOWN or something, to be able distinguish between "not known if cursed or uncursed" vs "known to be not cursed"