Beispiel #1
0
def OwnsItem(item: ItemTyping, condition, negate=False):
    try:
        item_type = item.type
    except AttributeError:
        raise ValueError(
            "Can only use OwnsItem() on declared item types (Weapon, Armor, Ring, Good)."
        )
    return instr.IfPlayerItemStateBox(condition, item_type, item, not negate)
Beispiel #2
0
def OwnsGood(good: Good, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Good, good, not negate)
Beispiel #3
0
def OwnsRing(ring: Ring, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Ring, ring, not negate)
Beispiel #4
0
def OwnsArmor(armor: Armor, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Armor, armor, not negate)
Beispiel #5
0
def OwnsWeapon(weapon: Weapon, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Weapon, weapon, not negate)