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