{ "dm_type": "/datum/ai_controller/basic_controller/rust_walker", "type": "selector", "children": [ { "type": "subtree", "subtype": "/datum/bt_node/subtree/escape_captivity" }, { "type": "parallel", "failure_policy": "BT_PARALLEL_FAILURE_CHILD_ONE", "success_policy": "BT_PARALLEL_SUCCESS_CHILD_ONE", "repeat_secondary": true, "repeat_secondary_delay": "BASIC_MOB_FIND_TARGET_RATE", "finish_on_primary": true, "children": [ { "type": "selector", "children": [ { "type": "decorator", "decorator": "/datum/bt_node/decorator/ability_available", "vars": { "observer_abort": "BT_ABORT_LOWER_PRIORITY" }, "child": { "type": "decorator", "decorator": "/datum/bt_node/decorator/pawn_turf_has_trait", "vars": { "observer_abort": "BT_ABORT_NONE", "trait": "TRAIT_RUSTY" }, "child": { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/use_mob_ability" } } }, { "type": "decorator", "decorator": "/datum/bt_node/decorator/bb_key_set", "vars": { "observer_abort": "BT_ABORT_BOTH", "key": "BB_CURRENT_TARGET" }, "child": { "type": "parallel", "failure_policy": "BT_PARALLEL_FAILURE_ANY", "success_policy": "BT_PARALLEL_SUCCESS_CHILD_ONE", "repeat_secondary": true, "finish_on_primary": true, "children": [ { "type": "subplan", "success_policy": "BT_SUBPLAN_LOOP_ON_SUCCESS", "failure_policy": "BT_SUBPLAN_LOOP_ON_FAILURE", "children": [ { "type": "selector", "children": [ { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/attack_obstructions", "vars": { "target_key": "BB_CURRENT_TARGET" } }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/targeted_mob_ability", "vars": { "ability_key": "BB_TARGETED_ACTION", "target_key": "BB_CURRENT_TARGET" } }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/basic_melee_attack", "vars": { "target_key": "BB_CURRENT_TARGET", "targeting_strategy": "BB_TARGETING_STRATEGY", "hiding_location_key": "BB_CURRENT_TARGET_HIDING_LOCATION" } } ] } ] }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/move_to_target", "vars": { "target_key": "BB_CURRENT_TARGET", "required_dist": 1, "finish_on_arrival": false } } ] } }, { "type": "subplan", "success_policy": "BT_SUBPLAN_LOOP_ON_SUCCESS", "failure_policy": "BT_SUBPLAN_FAIL_ON_FAILURE", "children": [ { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/idle_random_walk/rust" } ] } ] }, { "type": "leaf", "behavior": "/datum/bt_node/ai_behavior/acquire_target/update_combat_targets", "vars": { "target_key": "BB_CURRENT_TARGET", "targeting_strategy": "BB_TARGETING_STRATEGY", "hiding_location_key": "BB_CURRENT_TARGET_HIDING_LOCATION" } } ] } ] }