tuxemon.event.conditions.variable_set module
- class tuxemon.event.conditions.variable_set.VariableSetCondition[source]
Bases:
EventCondition
Check to see if a player game variable exists and has a particular value.
If the variable does not exist it will return
False
.Script usage
is variable_set <variable>[:value]
- Script parameters:
variable – The variable to check.
value – Optional value to check for.
- name: ClassVar[str] = 'variable_set'
- test(session, condition)[source]
Check to see if a player game variable has a particular value.
- Parameters:
session (Session) – The session object
condition (MapCondition) – The map condition object.
- Returns:
Whether the variable exists and has that value.
- Return type:
bool