tuxemon.event.conditions.npc_exists module

class tuxemon.event.conditions.npc_exists.NPCExistsCondition[source]

Bases: EventCondition

Check to see if a character object exists in the current list of NPCs.

Script usage

is npc_exists <character>
Script parameters:

character – Either “player” or npc slug name (e.g. “npc_maple”).

name: ClassVar[str] = 'npc_exists'
test(session, condition)[source]

Check to see if a particular character exists.

Parameters:
  • session (Session) – The session object

  • condition (MapCondition) – The map condition object.

Returns:

Whether the chosen character exists.

Return type:

bool