Class: MockCAlifeMonsterBrain
Mock of the X-Ray engine CALifeMonsterBrain alife brain.
Implements
CALifeMonsterBrain
Constructors
Constructor
new MockCAlifeMonsterBrain(): MockCAlifeMonsterBrain;Returns
MockCAlifeMonsterBrain
Methods
create()
static create(): MockCAlifeMonsterBrain;Returns
MockCAlifeMonsterBrain
mock()
static mock(): CALifeMonsterBrain;Returns
CALifeMonsterBrain
Properties
action_type
action_type: Mock<() => number>;Get the meet action type for another ALife object.
Param
object
Other ALife schedulable object.
Param
index
Relation index.
Param
mutual_detection
Whether both objects detected each other.
Returns
Meet action type id.
Implementation of
CALifeMonsterBrain.action_typecan_choose_alife_tasks
can_choose_alife_tasks: MockedFunction<{
(): boolean;
(value: boolean): void;
}>;Returns
Whether this brain may choose ALife tasks.
Implementation of
CALifeMonsterBrain.can_choose_alife_taskscanChooseAlifeTasks
canChooseAlifeTasks: boolean = true;default_behaviour
default_behaviour: Mock<UnknownFunction>;Reset the brain to default no-path behavior.
Implementation of
CALifeMonsterBrain.default_behaviourmovement
movement: MockedFunction<() => CALifeMonsterMovementManager>;Returns
Offline movement manager.
Implementation of
CALifeMonsterBrain.movementobject
object: MockedFunction<() => cse_alife_monster_abstract>;Returns
Owning monster server object.
Implementation of
CALifeMonsterBrain.objecton_location_change
on_location_change: Mock<UnknownFunction>;Called when the owning monster changes graph location.
Implementation of
CALifeMonsterBrain.on_location_changeon_register
on_register: Mock<UnknownFunction>;Called when the owning monster is registered.
Remarks
Follows the owning server object's on_register lifecycle. It can run during savegame load or ALife update setup, so treat it as repeatable.
Implementation of
CALifeMonsterBrain.on_registeron_state_read
on_state_read: Mock<UnknownFunction>;Read brain state from a network packet.
Param
packet
Source network packet.
Implementation of
CALifeMonsterBrain.on_state_readon_state_write
on_state_write: Mock<UnknownFunction>;Write brain state to a network packet.
Param
packet
Target network packet.
Implementation of
CALifeMonsterBrain.on_state_writeon_switch_offline
on_switch_offline: Mock<UnknownFunction>;Called when the owning monster switches offline.
Implementation of
CALifeMonsterBrain.on_switch_offlineon_switch_online
on_switch_online: Mock<UnknownFunction>;Called when the owning monster switches online.
Implementation of
CALifeMonsterBrain.on_switch_onlineon_unregister
on_unregister: Mock<UnknownFunction>;Called when the owning monster is unregistered.
Remarks
Pair cleanup here with state installed from on_register.
Implementation of
CALifeMonsterBrain.on_unregisterperform_attack
perform_attack: Mock<() => boolean>;Try to perform an offline attack.
Returns
Whether an attack was performed.
Implementation of
CALifeMonsterBrain.perform_attackprocess_task
process_task: Mock<UnknownFunction>;Process the currently selected ALife task.
Implementation of
CALifeMonsterBrain.process_taskselect_task
select_task: Mock<UnknownFunction>;Select the next ALife task.
Param
forced
Whether task selection should ignore regular throttling.
Implementation of
CALifeMonsterBrain.select_tasksmart_terrain
smart_terrain: MockedFunction<() => cse_alife_smart_zone>;Returns
Smart terrain assigned to the owner.
Implementation of
CALifeMonsterBrain.smart_terrainupdate
update: Mock<UnknownFunction>;Update offline planning.
Param
forced
Whether the update should ignore regular throttling.
Implementation of
CALifeMonsterBrain.updateupdate_script
update_script: Mock<UnknownFunction>;Script-facing update hook.
Implementation of
CALifeMonsterBrain.update_script