MiniQuake2

src/miniquake2/game/ai/monster.ml

Provides miniquake2 game ai monster facilities for this project.

Package
miniquake2.game.ai.monster
Reachable
Yes

Imports

Declarations

AdvanceBossExplosion

function AdvanceBossExplosion(actor, context)

Advance boss explosion.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

AdvanceReaction

function AdvanceReaction(actor, plan, context)

Advance reaction.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
plandynamic—plan value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ApplyWorldDamage

function ApplyWorldDamage(actor, amount, damageFlags, meansOfDeath, context)

Apply world damage.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
amountdynamic—amount value consumed by this operation.
damageFlagsdynamic—damageFlags value consumed by this operation.
meansOfDeathdynamic—meansOfDeath value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

BeginBossExplosion

function BeginBossExplosion(actor, context)

Begin boss explosion.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ClaimMedicPatient

function ClaimMedicPatient(actor, patient, preserveEnemy, context)

Return the claim medic patient value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
patientdynamic—patient value consumed by this operation.
preserveEnemydynamic—preserveEnemy value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

ConfigureStockMoveCallbacks

function ConfigureStockMoveCallbacks(actor, move)

Configure stock move callbacks.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
movedynamic—move value consumed by this operation.

View source

ContinueBossDeath

function ContinueBossDeath(actor, context)

Return the continue boss death value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

CurrentMoveName

function CurrentMoveName(actor)

Move current name.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.

View source

DefaultCheckAttack

function DefaultCheckAttack(actor, context, enemyRange)

Validate default attack.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.
enemyRangedynamic—enemyRange value consumed by this operation.

View source

DispatchDie

function DispatchDie(actor, attacker, damage, context)

Dispatch die.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
attackerdynamic—attacker value consumed by this operation.
damagedynamic—damage value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

DispatchPain

function DispatchPain(actor, attacker, damage, context)

Dispatch pain.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
attackerdynamic—attacker value consumed by this operation.
damagedynamic—damage value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

EmitStockSound

function EmitStockSound(actor, context, soundName, channel, attenuation)

Emit stock sound.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.
soundNamedynamic—soundName value consumed by this operation.
channeldynamic—channel value consumed by this operation.
attenuationdynamic—attenuation value consumed by this operation.

View source

FindMedicPatient

function FindMedicPatient(actor, preserveEnemy, context)

Find medic patient.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
preserveEnemydynamic—preserveEnemy value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FinishFlipperRunTransition

function FinishFlipperRunTransition(actor, context)

Finish flipper run transition.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FinishParasiteFidgetLoop

function FinishParasiteFidgetLoop(actor, context)

Finish parasite fidget loop.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FinishParasiteFidgetStart

function FinishParasiteFidgetStart(actor, context)

Finish parasite fidget start.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FinishReaction

function FinishReaction(actor, plan, context)

Finish reaction.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
plandynamic—plan value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FinishRunStart

function FinishRunStart(actor, context)

Finish run start.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FinishWalkStart

function FinishWalkStart(actor, context)

Finish walk start.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

FlyMonsterStart

function FlyMonsterStart(actor, context)

Start fly monster.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

installDefaultCallbacks

function installDefaultCallbacks(actor, hasAttack, hasMelee)

Install default callbacks.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
hasAttackdynamic—hasAttack value consumed by this operation.
hasMeleedynamic—hasMelee value consumed by this operation.

View source

IsActorMoveActivity

inline function IsActorMoveActivity(activity)

Report whether is actor move activity.

ParameterTypeDefaultDescription
activitydynamic—activity value consumed by this operation.

View source

IsLocomotionActivity

inline function IsLocomotionActivity(activity)

Report whether is locomotion activity.

ParameterTypeDefaultDescription
activitydynamic—activity value consumed by this operation.

View source

M_EndFrame

function M_EndFrame(actor, context)

End m frame.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

M_FliesOff

function M_FliesOff(actor, context)

Report whether m flies off.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

M_FliesOn

function M_FliesOn(actor, context)

Report whether m flies on.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

M_FlyCheck

function M_FlyCheck(actor, context)

Validate m fly.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

M_MoveFrame

function M_MoveFrame(actor, context)

Move m frame.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

M_SetEffects

function M_SetEffects(actor, context)

Set m effects.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

M_WorldEffects

function M_WorldEffects(actor, context)

Return the m world effects value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MedicCheckAttack

function MedicCheckAttack(actor, context, enemyRange)

Validate medic attack.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.
enemyRangedynamic—enemyRange value consumed by this operation.

View source

MonsterDeathUse

function MonsterDeathUse(actor, context)

Use monster death.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterStart

function MonsterStart(actor, context)

Start monster.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterStartGo

function MonsterStartGo(actor, context)

Start monster go.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterTargetUse

function MonsterTargetUse(actor, other, activator, context)

Use monster target.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
otherdynamic—other value consumed by this operation.
activatordynamic—activator value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterThink

function MonsterThink(actor, context)

Run monster.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterTriggeredSpawn

function MonsterTriggeredSpawn(actor, context)

Spawn monster triggered.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterTriggeredSpawnUse

function MonsterTriggeredSpawnUse(actor, other, activator, context)

Spawn monster triggered use.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
otherdynamic—other value consumed by this operation.
activatordynamic—activator value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterTriggeredStart

function MonsterTriggeredStart(actor, context)

Start monster triggered.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MonsterUse

function MonsterUse(actor, other, activator, context)

Use monster.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
otherdynamic—other value consumed by this operation.
activatordynamic—activator value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

MutantCheckAttack

function MutantCheckAttack(actor, context, enemyRange)

Validate mutant attack.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.
enemyRangedynamic—enemyRange value consumed by this operation.

View source

NextStockRandomInteger

function NextStockRandomInteger(context, fallback)

Return the next stock random integer value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
fallbackdynamic—Value returned when no explicit result is available.

View source

NextStockRandomUnit

function NextStockRandomUnit(context, fallback)

Return the next stock random unit value.

ParameterTypeDefaultDescription
contextdynamic—Context that carries state for the operation.
fallbackdynamic—Value returned when no explicit result is available.

View source

NormalizeCombatTarget

function NormalizeCombatTarget(actor, context)

Normalize combat target.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

RunReactionFrameCallbacks

function RunReactionFrameCallbacks(actor, plan, timelineOffset, context)

Run reaction frame callbacks.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
plandynamic—plan value consumed by this operation.
timelineOffsetdynamic—timelineOffset value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

SetStockMove

function SetStockMove(actor, moveKind, endFunction)

Set stock move.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
moveKinddynamic—moveKind value consumed by this operation.
endFunctiondynamic—endFunction value consumed by this operation.

View source

StartReaction

function StartReaction(actor, plan, context)

Start reaction.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
plandynamic—plan value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateAttack

function StateAttack(actor, context)

Performs the StateAttack operation for the miniquake2 game ai monster module.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateDie

function StateDie(actor, attacker, damage, context)

Handle state.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
attackerdynamic—attacker value consumed by this operation.
damagedynamic—damage value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateIdle

function StateIdle(actor, context)

Return the state idle value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateMelee

function StateMelee(actor, context)

Return the state melee value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StatePain

function StatePain(actor, attacker, damage, context)

Handle state.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
attackerdynamic—attacker value consumed by this operation.
damagedynamic—damage value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateRun

function StateRun(actor, context)

Performs the StateRun operation for the miniquake2 game ai monster module.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateSearch

function StateSearch(actor, context)

Return the state search value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateSight

function StateSight(actor, enemy, context)

Return the state sight value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
enemydynamic—enemy value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateStand

function StateStand(actor, context)

Return the state stand value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StateWalk

function StateWalk(actor, context)

Return the state walk value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockFidgetFrameSound

function StockFidgetFrameSound(actor, context)

Return the stock fidget frame sound value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockIdleSoundName

function StockIdleSoundName(className)

Return the stock idle sound name.

ParameterTypeDefaultDescription
classNamedynamic—className value consumed by this operation.

View source

StockJorgIdleSound

function StockJorgIdleSound(actor, context)

Return the stock jorg idle sound value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockJorgStepLeft

function StockJorgStepLeft(actor, context)

Advance stock jorg left.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockJorgStepRight

function StockJorgStepRight(actor, context)

Advance stock jorg right.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockMedicIdleFrame

function StockMedicIdleFrame(actor, context)

Return the stock medic idle frame value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockMutantIdleLoop

function StockMutantIdleLoop(actor, context)

Return the stock mutant idle loop value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockParasiteTapSound

function StockParasiteTapSound(actor, context)

Return the stock parasite tap sound value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockScratchSound

function StockScratchSound(actor, context)

Return the stock scratch sound value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockSoldierCockSound

function StockSoldierCockSound(actor, context)

Return the stock soldier cock sound value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockSoldierIdleFrameSound

function StockSoldierIdleFrameSound(actor, context)

Return the stock soldier idle frame sound value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockSoldierWalkCycle

function StockSoldierWalkCycle(actor, context)

Return the stock soldier walk cycle value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockStandFidgetProbe

function StockStandFidgetProbe(actor, context)

Return the stock stand fidget probe value.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

StockStepSound

function StockStepSound(actor, context)

Advance stock sound.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

SwimMonsterStart

function SwimMonsterStart(actor, context)

Start swim monster.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

WalkMonsterStart

function WalkMonsterStart(actor, context)

Start walk monster.

ParameterTypeDefaultDescription
actordynamic—actor value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source