Пример #1
0
def HasItem(item: ItemTyping, condition, negate=False):
    try:
        item_type = item.item_enum
    except AttributeError:
        raise ValueError(
            "Can only use auto-detecting HasItem() on declared item types (Weapon, Armor, Ring, Good)."
        )
    return instr.IfPlayerItemStateNoBox(condition, item_type, item, not negate)
Пример #2
0
def HasGood(good: Good, condition, negate=False):
    return instr.IfPlayerItemStateNoBox(condition, ItemType.Good, good, not negate)
Пример #3
0
def HasRing(ring: Ring, condition, negate=False):
    return instr.IfPlayerItemStateNoBox(condition, ItemType.Ring, ring, not negate)
Пример #4
0
def HasArmor(armor: Armor, condition, negate=False):
    return instr.IfPlayerItemStateNoBox(condition, ItemType.Armor, armor, not negate)
Пример #5
0
def HasWeapon(weapon: Weapon, condition, negate=False):
    return instr.IfPlayerItemStateNoBox(condition, ItemType.Weapon, weapon, not negate)