# Conditions

List of all conditions available to use in dungeon scripts.

Tests dungeon ticks. In other words, condition will pass every X dungeon ticks (seconds) defined as Interval value.

tickCount\mod interval = 0

Type: tick_interval

Options:

  • Interval - Interval value (in seconds).

Example:

Type: tick_interval
Interval: 5

Rolls a dice to test if Chance value is under it.

Type: chance

Options:

  • Chance - Chance value (from 0.0 to 100.0).

Example:

Type: chance
Chance: 25.0

Tests mob provider and mob identifier.

Available for Mob involved events only!

Type: mob_id

Options:

Example:

Type: mob_id
MobId: 'ada:zombie'

Tests amount of specific mob in the dungeon.

Types:

  • alive_mob_amount - Amount of alive mobs.
  • killed_mob_amount - Amount of killed mobs.
  • spawned_mob_amount - Amount of spawned mobs.

Options:

  • Operator - Comparison operator. Available: >, >= <, <=, =, !=.
  • Value - Amount of dungeon mobs will be compared to this value using the comparasion operator above.
  • MobId - Mob Identifier.
  • StageId - Lookups only mobs that were spawned at specific stage. Set null to ignore.

Example:

Type: alive_mob_amount
MobId: 'ada:zombie'
StageId: 'null'
Operator: <=
Value: 5

Tests amount of all mobs (of specific faction) in the dungeon.

Types:

  • alive_mobs_amount - Amount of alive mobs.
  • killed_mobs_amount - Amount of killed mobs.
  • spawned_mobs_amount - Amount of spawned mobs.

Options:

  • Operator - Comparison operator. Available: >, >= <, <=, =, !=.
  • CheckFaction - Whether to check mob faction or not.
  • Faction - Mob Faction. Available: ENEMY, ALLY.
  • StageId - Lookups only mobs that were spawned at specific stage. Set null to ignore.

Example:

Type: alive_mobs_amount
Operator: <=
Value: 0
CheckFaction: true
Faction: ENEMY
StageId: 'null'

Succeeds if the number of alive mobs in the dungeon meets a certain value and criteria.

Options:

  • Operator - Comparison operator. Available: >, >= <, <=, =, !=.
  • Value - Amount of alive mobs compared to this value using the comparasion operator above.
  • MobCriteria - Lookups only mobs that meets a certain Mob Criteria. If no criteria set, lookups only Enemy mobs.

Example #1:

# Lookups only enemy 'zombie' mobs.
Type: mobs_amount
Operator: '<='
Value: 0
MobCriteria:
  id: zombie
  faction: ENEMY

Example #2:

# Lookups all mobs including allied ones.
Type: mobs_amount
Operator: '<='
Value: 0

Succeeds if the number of killed mobs in the dungeon meets a certain value and criteria.

Options:

  • Operator - Comparison operator. Available: >, >= <, <=, =, !=.
  • Value - Amount of killed mobs compared to this value using the comparasion operator above.
  • MobCriteria - Lookups only mobs that meets a certain Mob Criteria. If no criteria set, lookups only Enemy mobs.
  • StageCriteria - Lookups only mobs that were killed at stage(s) that meets a certain Stage Criteria.

Example #1:

# Lookups only enemy 'zombie' mobs that were killed at any stage.
Type: mobs_killed
Operator: '>='
Value: 10
MobCriteria:
  id: zombie
  faction: ENEMY

Example #2:

# Lookups both, ally and enemy, wolves (because criteria present, but faction is not specified) that were killed at stage_1.
Type: mobs_killed
Operator: '>='
Value: 10
MobCriteria:
  id: wolf
StageCriteria:
  id: stage_1

Example #3:

# Lookups all killed mobs including allied ones.
Type: mobs_killed
Operator: '>='
Value: 10

Succeeds if the number of spawned mobs in the dungeon meets a certain value and criteria.

Options:

  • Operator - Comparison operator. Available: >, >= <, <=, =, !=.
  • Value - Amount of spawned mobs compared to this value using the comparasion operator above.
  • MobCriteria - Lookups only mobs that meets a certain Mob Criteria. If no criteria set, lookups only Enemy mobs.
  • StageCriteria - Lookups only mobs that were spawned at stage(s) that meets a certain Stage Criteria.

Example #1:

# Lookups only enemy 'zombie' mobs that were spawned at any stage.
Type: mobs_spawned
Operator: '>='
Value: 10
MobCriteria:
  id: zombie
  faction: ENEMY

Example #2:

# Lookups both, ally and enemy, wolves (because criteria present, but faction is not specified) that were spawned at stage_1.
Type: mobs_spawned
Operator: '>='
Value: 10
MobCriteria:
  id: wolf
StageCriteria:
  id: stage_1

Example #3:

# Lookups all spawned mobs including allied ones.
Type: mobs_spawned
Operator: '>='
Value: 10

Tests if spot is (not) in a specific state.

Types:

  • spot_in_state - Spot is in a state.
  • spot_not_in_state - Spot is not in a state.

Options:

  • SpotId - Spot identifier of the dungeon.
  • StateId - State identifier of the spot.

Example:

Type: spot_in_state
SpotId: gate
StateId: open

Tests stage identifier.

Available for Stage involved events only!

Type: stage_id

Options:

Example:

Type: stage_id
StageId: 'stage_1'

Tests stage task identifier.

Available for Task involved events only!

Type: task_id

Options:

Example:

Type: task_id
TaskId: 'kill_zombies'

Tests if stage task is (not) completed.

Types:

  • task_completed - Task is present and completed.
  • task_incompleted - Task is not present or not completed.

Options:

  • TaskId - Task identifier (must present in the config of current dungeon stage).

Example:

Type: task_completed
TaskId: kill_mobs

Tests if stage task is (not) present.

Types:

  • task_present - Task is present.
  • task_not_present - Task is not present.

Options:

  • TaskId - Task identifier (must present in the config of current dungeon stage).

Example:

Type: task_present
TaskId: kill_mobs

# Criteria

Criteria allow you to customize the conditions in a more flexible way. Available criteria (if any) specified under condition descriptions.

Criteria are fully optional - you can use one, multiple, or none of them.

# Mob Criteria

  • id - Checks if mob has a specific ID.
  • provider - Checks if mob was spawned by a specific Provider.
  • faction - Checks if mob is of specific Faction.
  • born_stage - Checks if mob was spawned at specific dungeon Stage.

# Stage Criteria

  • id - Checks if dungeon stage has a specific ID.