This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
conditional_expression [2020/02/14 12:35] – justin | conditional_expression [2022/12/16 18:25] (current) – justin | ||
---|---|---|---|
Line 12: | Line 12: | ||
|>=|Left operand is **greater than or equal to** the right operand.| | |>=|Left operand is **greater than or equal to** the right operand.| | ||
|contains|Left operand **contains one or more of** the right operand.| | |contains|Left operand **contains one or more of** the right operand.| | ||
+ | |!contains|Left operand **does not contain one or more of** the right operand.| | ||
|contains[x]|Left operand **contains at least x of** the right operand, where x is a number.| | |contains[x]|Left operand **contains at least x of** the right operand, where x is a number.| | ||
+ | |!contains[x]|Left operand **does not contain at least x of** the right operand, where x is a number.| | ||
====Examples: | ====Examples: | ||
<code bauxite> | <code bauxite> | ||
- | self.property[" | + | global.property[" |
</ | </ | ||
+ | Evaluates to true if the global property " | ||
<code bauxite> | <code bauxite> | ||
- | global.property[" | + | self.property[" |
</ | </ | ||
- | Evaluates | + | Evalutes |
<code bauxite> | <code bauxite> | ||
- | player.inventory contains | + | global.property["gems_collected"] < 5 |
</ | </ | ||
- | Evaluates to true if the player has at least one of "ITEM_0001" in their inventory. | + | Evaluates to true if the global property " |
+ | <code bauxite> | ||
+ | player.inventory contains[3] " | ||
+ | </ | ||
+ | Evaluates to true if the player has at least 3 of "ITEM_0005" in their inventory | ||
<code bauxite> | <code bauxite> | ||
initiator.tags contains " | initiator.tags contains " |