tuxemon.event package

class tuxemon.event.EventObject(id, name, x, y, w, h, conds, acts)[source]

Bases: tuple

Parameters:
  • id (int | None) –

  • name (str) –

  • x (int) –

  • y (int) –

  • w (int) –

  • h (int) –

  • conds (Sequence[MapCondition]) –

  • acts (Sequence[MapAction]) –

acts: Sequence[MapAction]

Alias for field number 7

conds: Sequence[MapCondition]

Alias for field number 6

h: int

Alias for field number 5

id: int | None

Alias for field number 0

name: str

Alias for field number 1

w: int

Alias for field number 4

x: int

Alias for field number 2

y: int

Alias for field number 3

class tuxemon.event.MapAction(type, parameters, name)[source]

Bases: tuple

Parameters:
  • type (str) –

  • parameters (Sequence[str]) –

  • name (str | None) –

name: str | None

Alias for field number 2

parameters: Sequence[str]

Alias for field number 1

type: str

Alias for field number 0

class tuxemon.event.MapCondition(type, parameters, x, y, width, height, operator, name)[source]

Bases: tuple

Parameters:
  • type (str) –

  • parameters (Sequence[str]) –

  • x (int) –

  • y (int) –

  • width (int) –

  • height (int) –

  • operator (str) –

  • name (str | None) –

height: int

Alias for field number 5

name: str | None

Alias for field number 7

operator: str

Alias for field number 6

parameters: Sequence[str]

Alias for field number 1

type: str

Alias for field number 0

width: int

Alias for field number 4

x: int

Alias for field number 2

y: int

Alias for field number 3

tuxemon.event.get_npc(session, slug)[source]

Gets an NPC object by slug.

Parameters:
  • session (Session) – The session object.

  • slug (str) – The slug of the NPC that exists on the current map.

Returns:

The NPC object or None if the NPC is not found.

Return type:

Optional[NPC]

Subpackages

Submodules