List of all event conditions

From VCMI Project Wiki
Revision as of 14:58, 30 December 2013 by Ivan (talk | contribs)
Jump to: navigation, search

Win/Loss conditions

These are event conditions that can be used in triggered events that control win/loss.

haveArtifact

Any player hero must hold an artifact

  • position - N/A
  • type - required artifact ID
  • value - N/A

Possible changes: position that indicates object to which artifact must be transported (town or hero)

haveCreatures

Player must control certain number of creatures

  • position - N/A
  • type - creature ID to collect
  • value - required amount of creatures

haveResources

Player must have certain amount of resources

  • position - N/A
  • type - resource ID
  • value - required amount of resource

haveBuilding

Player must control certain building, also includes H3 "build Grail" condition

  • position - town in which this structure must be built, optional
  • type - building ID to construct
  • value - N/A

Note: if position is not set - building can be built in any town

control

Covers all conditions that require certain object(s) to be controlled by player

  • position - position of object to control, optional
  • type - type of object to control.
  • value - N/A

Note: If position is not set - all objects of this type must be captured

destroy

Covers objections where player must remove from map certain object(s). This covers defeating hero, creature or even something like "collect all treasure chests"

  • position - position of object to destroy, optional
  • type - type of object to destroy
  • value - N/A

Note: If position is not set - all objects of this type must be destroyed

transport

Transport artifact in certain town

  • position - town to which this artifact must be transported
  • type - artifact ID to transport
  • value - N/A

Possible changes: merge transport into haveArtifact

daysPassed

Player must survive or win in certain number of days

  • position - N/A
  • type - N/A
  • value - number of days for this objective to trigger

Note: covers both "win in X days" as well as "survive for X days" conditions, depending on block in which this objective will be placed.

isHuman

Helper condition to allow ai-only or human-only conditions

  • position - N/A
  • type - N/A
  • value - 0 will trigger this objective for AI players, 1 will trigger it for humans

standardWin

Standard win condition - defeat all enemies

  • position - N/A
  • type - N/A
  • value - N/A

daysWithoutTown

Standard lose condition - stay for X days without towns

  • position - N/A
  • type - N/A
  • value - number of days to survive, 0 = player dies on the next day.

Note: if this condition is not present, player can be eliminated only by defeating all his heroes and capturing all his towns.