Paste #132915: Durability

Date: 2025/04/23 18:34:29 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11


durabilityMod:
    type: world
    events:
        on player item takes damage:
            - if <context.item.has_flag[durabilityMod]>:
                - inventory flag slot:<context.slot> durabilityMod:++
                - narrate <context.item.flag[durabilityMod]>
                - if <context.item.flag[durabilityMod].mod[2]> == 0:
                    - determine cancelled
        after player item takes damage:
            - narrate <context.item.durability>