# SPDX-License-Identifier: GPL-3.0
# Copyright (c) 2014-2023 William Edwards <shadowapex@gmail.com>, Benjamin Bean <superman2k5@gmail.com>
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING
from tuxemon.item.itemcondition import ItemCondition
if TYPE_CHECKING:
from tuxemon.monster import Monster
[docs]@dataclass
class WildMonsterCondition(ItemCondition):
"""True if not owned by a trainer."""
name = "wild_monster"
[docs] def test(self, target: Monster) -> bool:
return target.owner is None