Esempio n. 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)
Esempio n. 2
0
def OwnsGood(good: Good, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Good, good, not negate)
Esempio n. 3
0
def OwnsRing(ring: Ring, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Ring, ring, not negate)
Esempio n. 4
0
def OwnsArmor(armor: Armor, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Armor, armor, not negate)
Esempio n. 5
0
def OwnsWeapon(weapon: Weapon, condition, negate=False):
    return instr.IfPlayerItemStateBox(condition, ItemType.Weapon, weapon, not negate)