Conditions
Conditions test the current context and return true or false. Entity conditions look at one entity context. Bi-entity conditions compare an actor and a target.
Entity Conditions
Section titled “Entity Conditions”| Family | Registered Types |
|---|---|
| State flags | pheno:alive, pheno:baby, pheno:daytime, pheno:exists, pheno:glowing, pheno:hostile, pheno:invisible, pheno:named, pheno:on_fire, pheno:passenger, pheno:riding, pheno:shearable, pheno:tameable, pheno:tamed, pheno:using_item |
| Numeric checks | pheno:air_supply, pheno:fall_distance, pheno:hunger, pheno:thirst, pheno:energy, pheno:max_health, pheno:saturation_level, pheno:xp_levels, pheno:xp_points, pheno:health, pheno:brightness, pheno:velocity, pheno:dimensions, pheno:fluid_height, pheno:scale, pheno:count, pheno:value, pheno:bond_count |
| Movement and pose | pheno:movement |
| Social interaction | pheno:interaction |
| World, weather, and fluids | pheno:biome, pheno:block, pheno:block_in_radius, pheno:building, pheno:climate, pheno:dimension, pheno:distance_from_coordinates, pheno:environment, pheno:in_fluid, pheno:season, pheno:structure, pheno:submerged_in, pheno:time_of_day, pheno:village |
| Entity identity | pheno:entity_type, pheno:in_tag, pheno:entity_group, pheno:root, pheno:personality, pheno:profession, pheno:life_stage |
| Villager state | pheno:mood (min/max over -15..15, or is with band names depressed/sad/unhappy/passive/fine/happy/overjoyed), pheno:gender (is: male/female/neutral; masculine/feminine aliases). Both evaluate on server and client alike. Mood matches villagers only. Gender matches villagers and players with MCA data; entities without an MCA gender never match, so wrap in pheno:not when unknown bearers should pass. |
| Body | pheno:embodied: true when the entity has its Root’s body. A villager always has it. A player has it only in MCA’s Villager model, because the Player and Vanilla models show a plain player. Use it for looks that show on the Root’s body, such as eye colour. |
| Player and inventory | pheno:gamemode, pheno:inventory, pheno:equipped_item |
| Effects and cooldowns | pheno:on_cooldown, pheno:since_spawn, pheno:status_effect, pheno:status_effect_tag |
| Pheno and Townstead systems | pheno:ability, pheno:compare_resource, pheno:resource, pheno:skill, pheno:career_xp, pheno:chronicle_count, pheno:toggled, pheno:variant, pheno:gene, pheno:heritage, pheno:collection_size, pheno:collection_contains, pheno:collection_count, pheno:config, pheno:reserved, townstead:worksite, townstead:work_signal |
| Logic and selection | pheno:and, pheno:or, pheno:not, pheno:any, pheno:none, pheno:constant, pheno:chance, pheno:entity_in_radius |
State Flags
Section titled “State Flags”pheno:profession accepts one profession ID or an array in profession. Townstead resolves
Career compatibility identities before comparing them. A root alias matches the complete Career;
a Path alias matches only a member of that Career whose foreign profession or learned Skills imply
the mapped Path. For example, when the Chef’s Delight contribution is active,
chefsdelight:cook matches any Cook while chefsdelight:chef matches only a Cook on the Chef Path.
An absent optional mod contributes no aliases.
State flag conditions take no fields beyond type. They read live entity state and return true or false.
| Type | True When |
|---|---|
pheno:alive | The entity is alive. |
pheno:baby | The entity is an ageable mob in its baby state. |
pheno:daytime | The level is currently day. |
pheno:exists | Always true for the current context entity. |
pheno:glowing | The entity is currently glowing. |
pheno:hostile | The entity implements Minecraft’s hostile enemy marker. |
pheno:invisible | The entity is invisible. |
pheno:named | The entity has a custom name. |
pheno:on_fire | The entity is on fire. |
pheno:passenger | The entity has at least one passenger. |
pheno:riding | The entity is riding another entity. |
pheno:shearable | The entity can be sheared now, for example a grown sheep with its wool. Modded mobs that declare themselves shearable to the mod loader also match. |
pheno:tameable | The entity is an ownable or tameable animal, whether or not it is already tamed. |
pheno:tamed | The entity is a tameable animal and is tamed. |
pheno:using_item | The entity is using an item. |
pheno:summoned | The entity is someone’s summon (see Summons). |
pheno:dashing | The entity is in the middle of a pheno:dash. |
pheno:casting | The entity is winding up an active ability. |
Movement And Pose
Section titled “Movement And Pose”pheno:movement checks the entity’s current movement, pose, flight, or collision state.
| Movement | True When |
|---|---|
grounded | The entity is treated as on the ground. |
moving | The entity has horizontal movement. |
sneaking | The entity is sneaking. |
sprinting | The entity is sprinting. |
crawling | The entity is visually crawling. |
swimming | The entity is swimming. |
climbing | The entity is on a climbable block. |
sleeping | The entity is sleeping. |
fall_flying | The entity is fall flying. |
parachuting | The entity has a slow_fall ability in the parachute style and descends after a drop of 2 or more blocks. |
ascending | The entity is airborne and moving upward. |
descending | The entity is airborne and moving downward. |
creative_flying | The entity is a player currently flying in creative-style flight. |
colliding_horizontally | The entity has side collision. |
colliding_vertically | The entity has vertical collision. |
emoting | The entity is currently running a Townstead-triggered emote. |
reacting | The entity is currently playing a locking Townstead reaction. |
pheno:resting is true when the entity sleeps. With spot, a rest spot ID or a list, the entity must also sleep in one of those rest spots.
{ "type": "pheno:resting", "spot": "examplepack:hammock" }Social Interaction
Section titled “Social Interaction”pheno:interaction checks social or UI-driven interaction state.
| Interaction | True When |
|---|---|
in_dialogue | The entity is currently in the Townstead RPG dialogue screen with a player. |
dialogue_just_ended | The entity’s Townstead RPG dialogue closed recently. |
heart_increased | The entity’s MCA relationship hearts with the interacting player went up recently. |
heart_decreased | The entity’s MCA relationship hearts with the interacting player went down recently. |
Numeric Ranges
Section titled “Numeric Ranges”These conditions accept min and max. Missing min means no lower bound; missing max means no upper bound. Player-only values return no match for non-player entities.
| Type | Value Tested |
|---|---|
pheno:air_supply | Current air supply. |
pheno:fall_distance | Current fall distance. |
pheno:hunger | Player food level or Townstead villager hunger. |
pheno:thirst | Townstead villager thirst, or player thirst when the active thirst compatibility bridge can read it. |
pheno:energy | Townstead villager energy, derived from fatigue. |
pheno:max_health | Entity max health. |
pheno:saturation_level | Player saturation. |
pheno:xp_levels | Player experience level. |
pheno:xp_points | Player total experience points. |
pheno:health also accepts min and max. Add "relative": true to compare health as a fraction of max health from 0 to 1; otherwise it compares raw health points. Defaults are min: 0, no practical max, and relative: false.
pheno:brightness tests local raw brightness at the entity position. Defaults are min: 0 and max: 15.
pheno:attack_strength tests how charged the entity’s attack is, from 0 to 1, with min (default 0) and max (default 1). Inside a hurt or attack trigger it reads the swing that landed, so { "type": "pheno:attack_strength", "min": 0.9 } passes only for fully charged hits. Villagers and mobs always count as fully charged.
pheno:warded is true while the entity holds a ward with at least min health left. id limits it to one ward.
pheno:attribute tests a vanilla attribute value. Fields:
| Field | Description |
|---|---|
attribute | Required attribute id, such as minecraft:generic.movement_speed. |
min | Optional lower bound. |
max | Optional upper bound. |
Logic And Random Gates
Section titled “Logic And Random Gates”| Type | Fields | Description |
|---|---|---|
pheno:and | conditions | True when every child condition passes. An empty list is true. |
pheno:or | conditions | True when any child condition passes. An empty list is true. |
pheno:not | condition | Negates one child condition. |
pheno:constant | value | Always returns value; defaults to true. |
pheno:chance | chance | Passes randomly per evaluation. chance defaults to 0.5 and is clamped from 0 to 1. |
Comparisons use comparison strings: ==, !=, <, <=, >, >=, plus word aliases such as equal, less, and greater. Unknown or missing comparisons default to >=.
Selection Tests
Section titled “Selection Tests”| Type | Fields | Description |
|---|---|---|
pheno:any | on | True when the selector returns at least one target. |
pheno:none | on | True when the selector returns no targets. |
pheno:count | on, comparison, compare_to | Compares selector result count. comparison defaults to >=; compare_to defaults to 1. |
pheno:value | value, comparison, compare_to | Compares any two Pheno values. Both operands are required. |
pheno:bond_count | kind, active, comparison, compare_to | Compares the number of bonds of one kind. active defaults to true; compare_to is a Pheno value and defaults to 1. |
pheno:entity_in_radius counts nearby living entities. It accepts radius (default 8), comparison (default >=), compare_to (default 1), and an optional nested entity condition. The bearer itself is not counted.
World And Position
Section titled “World And Position”| Type | Fields | Description |
|---|---|---|
pheno:biome | biome, biome_tag, condition | Tests the biome at the entity position. condition takes priority, then biome_tag, then biome. |
pheno:block | x, y, z, block_condition | Tests a block relative to the entity’s block position. Offsets default to 0; block_condition is required. |
pheno:block_in_radius | radius, block_condition, comparison, compare_to | Counts matching blocks in a cube around the entity. radius defaults to 4 and is clamped from 0 to 8; comparison defaults to >=; compare_to defaults to 1. |
pheno:building | building, building_type, building_prefix, type_prefix, id, village, village_id, min_size, max_size | Tests the Townstead/MCA building at the entity position. With no fields, true when the entity is in any known building. building accepts a full type id or slug, such as mca:tavern or tavern; building_type is an alias. building_prefix matches a family of authored building types, such as every level whose ID begins with compat/example/kitchen_l; type_prefix is an alias. |
pheno:dimension | dimension | Tests the level dimension id, such as minecraft:overworld. |
pheno:distance_from_coordinates | x, y, z, min, max, ignore_y | Tests distance from the entity to fixed coordinates. Coordinates default to 0; min defaults to 0; ignore_y defaults to false. |
pheno:climate | zone, season_kind, wet_dry, year_phase, snowing, snow_cover, underground, air_temperature | Tests the climate at the entity position. All present fields must match. zone is a list of zone ids (townstead namespace by default). wet_dry is "wet" or "dry". It matches only in a wet_dry zone while the season mod reports that season. year_phase and air_temperature take min and max; a year_phase with min above max wraps across the new year and never matches without a season mod. underground is true at full ground cover. Without a temperature mod, air_temperature reads the vanilla biome temperature in °C. |
pheno:season | season | Tests the season from the season mod. season is one id or a list: spring, summer, autumn, winter, wet or dry. wet and dry match only in a wet_dry climate zone. With no season mod, nothing matches. |
pheno:environment | weather, exposure, time, biome, dimension, effects | Convenience condition that combines several world and effect checks. Present categories are ANDed; list values inside a category are ORed. |
pheno:structure | structure | Server-side check for whether the entity is standing inside a generated structure piece with the given id. |
pheno:in_fluid | fluid, fluid_tag | Tests whether the entity is standing in a fluid tag. fluid_tag takes priority; fluid supports minecraft:water, minecraft:lava, or another fluid tag id and defaults to water. |
pheno:submerged_in | fluid, fluid_tag | Tests the fluid at the entity’s eyes. fluid_tag takes priority; fluid supports minecraft:water, minecraft:lava, or another fluid tag id and defaults to water. |
pheno:time_of_day | min, max | Tests day time modulo 24000. Defaults are min: 0, max: 24000. |
pheno:village | id, village, village_id, name, village_name, within_border, home, min_buildings, max_buildings, min_population, max_population, has_building | Tests the MCA/Townstead village resolved at the entity position. With no fields, true when a village is found near the entity. Use within_border: true when the entity must be inside the village border. Use home: true to test a villager’s home village wherever the villager is, for example a quest goal about a building in their town. |
pheno:environment uses weather for level-wide weather state and exposure for what reaches the entity at its position.
| Field | Accepted Values |
|---|---|
weather | rain, thunder, thunderstorm, clear |
exposure | sky, sun, rain, thunder, thunderstorm, snow |
time | day, night |
biome | Biome id values. |
dimension | Dimension id values. |
effects.any | Status effect id, or #tag for a mob-effect tag. effects.count.min sets the tag minimum count. |
| Environment Field | True When |
|---|---|
weather: "rain" | The level is raining. |
weather: "thunder" or weather: "thunderstorm" | The level is thundering. |
weather: "clear" | The level is not raining. |
exposure: "sky" | The entity’s block position can see the sky. |
exposure: "sun" | It is day, the level is not raining, and the entity can see the sky. |
exposure: "rain" | It is raining at the entity’s block position. |
exposure: "thunder" or exposure: "thunderstorm" | The level is thundering and it is raining at the entity’s block position. |
exposure: "snow" | It is precipitating at the entity’s block position, and the local biome precipitation is snow. |
Nested biome condition objects accept pheno:in_tag, pheno:temperature, and pheno:precipitation. pheno:temperature uses optional min and max bounds over the biome’s temperature at the current position. pheno:precipitation uses precipitation: "none", "rain", or "snow". Each nested condition supports inverted: true.
Block Conditions
Section titled “Block Conditions”block_condition objects support "inverted": true on any condition. Names may be written with or without the pheno: namespace.
| Type | Fields | Description |
|---|---|---|
block | block | Tests an exact block id. |
in_tag | tag | Tests a block tag. |
block_state | property, value | Tests a block-state property value. |
fluid | fluid_condition, fluid, tag | Tests the block’s fluid state. A nested fluid_condition takes priority; otherwise fluid supports empty/none, water, lava, or any non-empty fluid, and tag tests a fluid tag. |
exposed_to_sky | none | True when the block position can see the sky. |
air | none | True when the block is air. |
in_rain | none | True when it is raining at that block position. |
raining | none | True when the level is raining. |
thundering | none | True when the level is thundering. |
light_level | min, max | Tests local raw brightness. Defaults are 0 and 15. |
height | min, max | Tests the block Y coordinate. |
hardness | min, max | Tests destroy speed. |
blast_resistance | min, max | Tests explosion resistance. |
slipperiness | min, max | Tests friction/slipperiness. |
replaceable | none | True when the block can be replaced. |
movement_blocking | none | True when the block blocks movement. |
smokey | none | Uses Minecraft’s campfire-smoke test at this position. |
light_blocking | none | True when the block blocks light. |
water_loggable | none | True when the block can hold water. |
block_entity | none | True when a block entity exists at the position. |
block_data | key, value, exists | Tests a scalar persistent-data key on the block entity. Supply value for equality, or exists to test presence. |
value | value, comparison, compare_to | Compares two Pheno values in the block context. Useful for timers and numeric block data. |
config | file, path, equals, default, scope | Tests a scalar TOML config value. path is a string or key array. Global config is the default; scope: server reads the current world’s serverconfig. default is used when the file or key is absent; without it, the condition fails closed. |
distance_from_coordinates | x, y, z, min, max | Tests distance from the block position to fixed coordinates. |
offset | x, y, z, condition | Tests another block position offset from the current one. |
adjacent | condition | True when any adjacent block passes the nested condition. |
block_chain | direction, max, through, end | Walks in one direction until end passes, refusing positions that do not pass through. |
and | conditions | True when every child block condition passes. |
or | conditions | True when any child block condition passes. |
constant | value | Always returns value; defaults to true. |
Fluid Conditions
Section titled “Fluid Conditions”Nested fluid_condition objects support "inverted": true.
| Type | Fields | Description |
|---|---|---|
empty | none | True when the fluid state is empty. |
in_tag | tag | Tests a fluid tag. |
still | none | True when the fluid is a source block. |
and | conditions | True when every child fluid condition passes. |
or | conditions | True when any child fluid condition passes. |
constant | value | Always returns value; defaults to true. |
Size, Movement, And Fluid Height
Section titled “Size, Movement, And Fluid Height”| Type | Fields | Description |
|---|---|---|
pheno:dimensions | which, min, max | Tests live bounding-box width, height, or both. which is width, height, or both; default both. |
pheno:scale | which, min, max | Tests Townstead/MCA scale factors. Non-villager entities read as scale 1.0; which defaults to both. |
pheno:velocity | axis, min, max | Tests velocity. axis is x, y, z, horizontal, or total; default total. |
pheno:fluid_height | fluid, min, max | Tests the entity’s height in a fluid tag. fluid is required and is interpreted as a fluid tag id. |
Identity, Roots, And Abilities
Section titled “Identity, Roots, And Abilities”| Type | Fields | Description |
|---|---|---|
pheno:entity_type | entity_type, tag | Tests an exact entity type or an entity type tag. tag takes priority. |
pheno:in_tag | tag | Alias-style entity type tag check. |
pheno:entity_group | group | Tests the expressed creature group, such as default, undead, arthropod, illager, or aquatic. |
pheno:root | root | Tests the entity’s current root id. |
pheno:costumed | group | True when the entity is the person that a costumed mob shows. With group, the mob replacement must also have that group, such as hunter. |
pheno:regards | is | Tests how the entity regards the other party: hostile, neutral, or friendly. For the person that a costumed mob shows, the mob’s stance counts. Use it in a story conditions entry, where the other party is the player. |
pheno:personality | personality, match | Tests one personality ID or an array. match is exact, base, or either (the default). exact tests a data-pack personality identity; base tests its MCA behaviour personality, so a custom personality extending mca:crabby matches mca:crabby. |
pheno:profession | profession | Tests one villager profession ID or an array of IDs. Non-villagers do not match. |
pheno:wearing_skin | skin | Tests the MCA clothing skin a villager or player wears. Takes an id, a pattern ending in *, or an array of either. |
pheno:life_stage | stage or is, senior_counts_as_adult | Tests baby, toddler, child, teen, adult, or senior using the Root’s life cycle. adult includes seniors by default. |
pheno:ability | ability | True when an innate ability is currently active. |
pheno:skill | skill | True when the entity has learned the named Career Skill. Use the full Skill resource ID outside a Profession-owned document. |
pheno:career_xp | career, at_least, at_most | Server-side Career XP range. Defaults: at_least: 1, no practical maximum. |
pheno:chronicle_count | key, at_least, at_most | Tests the entity’s recorded Chronicle counter. It is server-side for live entities, but also works while Chronicle fabricates a subject’s past. |
pheno:toggled | gene | True while a toggle gene is switched on. |
pheno:variant | gene, variant or is list | True while the entity’s expressed allele of a variant gene carries one of the named variants. Lets a heritable style drive powers: which aura a revealed form fires, or a bonus tied to one tusk style. |
pheno:gene | gene, genes list, or locus | True while the entity shows any of the named genes, or anything at the locus. It reads the allele that Townstead expresses at each locus, including penetrance, but not the other gene’s own condition. Use it in a gene’s condition so one trait needs another, such as a muzzle that only grows over a coat. |
pheno:heritage | ancestry or lineage, min, max | True while the entity’s share of the ancestry or lineage is between min and max (0 to 1; defaults 0 and 1). A player counts as their root’s own heritage. Heritage is server-side, so use it in a gene’s condition, not in an attachment when. On the client it is always false. |
pheno:config | file, path, equals, default, scope | Tests a value in an ordinary TOML file. scope: server reads the current world’s serverconfig; otherwise the global config directory is used. A missing value compares against default. |
pheno:reserved | none | True when a live action execution currently holds an exclusive reservation on the entity. |
townstead:worksite | scope, buildings, block_condition, entity_condition, comparison, compare_to | Counts matching workplaces, blocks, or living entities. scope is assigned, profession, or village; building names may end in *. Supply at most one nested condition. The count comparison defaults to >= 1. See Work Feedback. |
townstead:work_signal | signal | Tests a namespaced, read-only fact exposed by a work engine. This is primarily for Profession feedback; signals describe runtime state and do not contain dialogue policy. |
Known ability keys are climbing, water_breathing, fire_immunity, night_vision, slow_fall, lava_vision, invisibility, swimming, walk_on_fluid, ignore_water, hover, sprinting, aerial_affinity, grounded, elytra_flight, creative_flight, and phasing.
Inventory, Effects, And Resources
Section titled “Inventory, Effects, And Resources”| Type | Fields | Description |
|---|---|---|
pheno:gamemode | gamemode | Player-only. Tests survival, creative, adventure, or spectator. |
pheno:equipped_item | slot, item_condition | Tests an equipment slot. slot defaults to mainhand; valid slots include mainhand, offhand, head, chest, legs, and feet. If item_condition is omitted, the condition only checks that the slot is occupied. |
pheno:inventory | item_condition, min, max | Counts matching items carried by a player, villager, or another inventory-bearing entity. min defaults to 1; max has no practical default limit. |
pheno:on_cooldown | item | Player-only. Tests whether an item is currently on cooldown. |
pheno:status_effect | effect, min_amplifier | Tests an active status effect. min_amplifier defaults to 0. |
pheno:status_effect_tag | tag, min_count | Counts active effects in a mob-effect tag. min_count defaults to 1. |
pheno:since_spawn | comparison, value | Compares ticks since the entity’s first server-side evaluation. The shared first-seen stamp is saved in entity data; defaults are comparison: >=, value: 0. |
pheno:resource | resource, min, max | Tests the value of a resource gene. |
pheno:compare_resource | resource, comparison, compare_to, compared_to_resource | Compares one resource gene to a fixed value or to another resource gene. comparison defaults to >=; compare_to defaults to 0. |
Item Conditions
Section titled “Item Conditions”Nested item_condition objects support "inverted": true. Type names may be written with or without the pheno: namespace; for example, enchantment and pheno:enchantment are the same item condition.
| Type | Fields | Description |
|---|---|---|
amount | min, max | Tests stack count. Defaults are min: 1, no practical max. |
empty | none | True when the stack is empty. |
is_damageable | none | True when the item can take durability damage. |
enchantable | none | True when the item can be enchanted. |
durability | min, max | Tests remaining durability points. |
relative_durability | min, max | Tests remaining durability fraction from 0 to 1; non-damageable items read as 1. |
ingredient | item, tag | Tests an item id or item tag. tag takes priority. |
food | none | True when the item is food. |
fireproof | none | True when the item is fire resistant. |
enchantment | enchantment, min | Tests an enchantment level; without enchantment, tests whether the stack is enchanted at all. min defaults to 1. |
base_enchantment | enchantment, min | Alias-style enchantment check. |
data | key, value, min, max, default, exists | Tests scalar item custom data. Use value for equality, a numeric range for counters, or exists for presence. default lets a missing numeric key participate in a range. |
and | conditions | True when every child item condition passes. |
or | conditions | True when any child item condition passes. |
constant | value | Always returns value; defaults to true. |
Bi-Entity Conditions
Section titled “Bi-Entity Conditions”pheno:actor_condition, pheno:target_condition, pheno:both, pheno:either, pheno:invert, pheno:undirected, pheno:distance, pheno:relative_rotation, pheno:collection_contains, pheno:collection_count, pheno:compare_dimensions, pheno:compare_scales
Bi-entity conditions test an actor and a target.
pheno:and and pheno:or combine a conditions list of bi-entity conditions, and pheno:not negates one condition, so one gate can require “in front of me, in sight, and not my ally”:
{ "type": "pheno:and", "conditions": [ { "type": "pheno:relative_rotation", "max_angle": 22 }, { "type": "pheno:can_see" }, { "type": "pheno:not", "condition": { "type": "pheno:allied" } } ]}Simple Relationships
Section titled “Simple Relationships”These take no fields beyond type.
| Type | True When |
|---|---|
pheno:attack_target | The actor is a mob whose current attack target is the target. |
pheno:attacker | The actor’s last hurt-by mob is the target. |
pheno:summoner | The actor is a summon and the target summoned it. |
pheno:allied | The two fight on the same side: the same entity, teammates, an owner and their summon or pet, or two summons or pets of the same owner. |
pheno:can_see | The actor has line of sight to the target. |
pheno:equal | Actor and target are the same entity. |
pheno:owner | The actor is ownable and its owner is the target. |
pheno:prime_adversary | The target’s kill credit entity is the actor. |
pheno:riding | The actor is directly riding the target. |
pheno:riding_root | The actor’s root vehicle is the target. |
pheno:riding_recursive | The target appears anywhere in the actor’s vehicle chain. |
pheno:hostile | The target is a hostile mob, or a mob currently targeting the actor. |
pheno:same_village | Both entities are inside the same MCA village border. |
Relationship Measurements
Section titled “Relationship Measurements”| Type | Fields | Description |
|---|---|---|
pheno:distance | min, max | True when actor-target distance is within the range. Defaults: min: 0, no practical max. |
pheno:relative_rotation | max_angle | True when the target is within max_angle degrees of the actor’s look direction. Defaults to 90. |
Actor And Target Wrappers
Section titled “Actor And Target Wrappers”These run an entity condition against one or both entities.
| Type | Field | Description |
|---|---|---|
pheno:actor_condition | condition | Applies the condition to the actor. |
pheno:target_condition | condition | Applies the condition to the target. |
pheno:both | condition | True when the condition passes for both actor and target. |
pheno:either | condition | True when the condition passes for either actor or target. |
Directional wrappers take a nested bi-entity condition:
| Type | Description |
|---|---|
pheno:invert | Swaps actor and target before testing the inner condition. |
pheno:undirected | Tests the inner condition both ways and passes if either direction passes. |
Size, Scale, And Collections
Section titled “Size, Scale, And Collections”| Type | Fields | Description |
|---|---|---|
pheno:compare_dimensions | which, comparison | Compares actor bounding-box size against target size. which is width, height, or both; default both. |
pheno:compare_scales | which, comparison | Compares actor scale against target scale. which is width, height, or both; default both. |
pheno:collection_contains | collection | True when the target is present in the actor’s collection store. |
pheno:collection_count | collection, comparison, compare_to | Compares the target’s tally in the actor’s collection. Defaults: comparison: >=, compare_to: 1. |
pheno:passenger_recursive is an entity condition rather than a bi-entity condition. It counts every passenger below the entity, including passengers riding other passengers. comparison defaults to >=, compare_to defaults to 1, and optional where is a bi-entity condition evaluated as (holder, passenger).