예제 #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)