foes
The arena's non-boss foes, built as primitive rigs with their AI: the gladiator and murmillo duelists (shield block, telegraphed strike, combos), the Numidian lion (prowl, crouch, leaping pounce, paw swipe) and slave-swarm chasers (attack tokens). Each foe registers through `R.re…
game.arena.foes
The arena's non-boss foes, built as primitive rigs with their AI: the gladiator and murmillo duelists (shield block, telegraphed strike, combos), the Numidian lion (prowl, crouch, leaping pounce, paw swipe) and slave-swarm chasers (attack tokens). Each foe registers through R.registerEnemy and hurts the player with R.damagePlayer. Driven by game.arena.Arena.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game/arena/foes.module — the arena's non-boss foes: gladiator and murmillo duelists (shield block, telegraphed overhead strike, combos), the Numidian lion (prowl, crouch telegraph, leaping pounce, paw swipe) and the slave swarm (cheap chasers that take turns to club you). Each foe is a small rig of builtin primitives under one root entity, posed every frame by the update below. Every foe registers through R.registerEnemy so the player's swings find it, hurts the player through R.damagePlayer, and reports its sounds through R.sfx. local Foes = require("game.arena.foes") Foes.spawn("lion", "beast_1_lion_1", { x, z }, { x2, z2 }, parentEntity) Foes.updateAll(dt) -- once per frame from the bout director Foes.alive() -- foes still standing Foes.clear() -- despawn everything (bout over)
rr(a: number, b: number) → number return a
| arg | type | description |
|---|---|---|
| a | number | |
| b | number |
mat(name: string) → void
| arg | type | description |
|---|---|---|
| name | string |
vecxyz(p: any) → void
| arg | type | description |
|---|---|---|
| p | any |
playerPos( ) → void
The player's position as x, y, z (player service first, avatar fallback), or nil.
point(x: number, y: number, z: number) → void
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| z | number |
clamp(x: number, z: number, margin: number) → void
Keep a point inside the sand oval, `margin` metres from the wall.
| arg | type | description |
|---|---|---|
| x | number | |
| z | number | |
| margin | number |
part(parent: ?, name: string, mesh: string?, m: string?, pos: ?, scale: ?, rot: ?, models: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | string | |
| mesh | string? | |
| m | string? | |
| pos | ? | |
| scale | ? | |
| rot | ? | |
| models | ? |
buildHumanoid(root: ?, o: ?) → void
Rigs Humanoid: front is local -Z. o = { size, skin, helmet, hair, tunic, loin, manica, greaves, weapon, shield, shackles, shoulder, beltPlate }
| arg | type | description |
|---|---|---|
| root | ? | |
| o | ? |
M(parent: ?, name: ?, mesh: ?, m: ?, pos: ?, scale: ?, rot: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? | |
| mesh | ? | |
| m | ? | |
| pos | ? | |
| scale | ? | |
| rot | ? |
Gp(parent: ?, name: ?, pos: ?, rot: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? | |
| pos | ? | |
| rot | ? |
buildLion(root: ?) → void
Lion: body along local Z, front -Z.
| arg | type | description |
|---|---|---|
| root | ? |
M(parent: ?, name: ?, mesh: ?, m: ?, pos: ?, scale: ?, rot: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? | |
| mesh | ? | |
| m | ? | |
| pos | ? | |
| scale | ? | |
| rot | ? |
Gp(parent: ?, name: ?, pos: ?, rot: ?) → void
| arg | type | description |
|---|---|---|
| parent | ? | |
| name | ? | |
| pos | ? | |
| rot | ? |
spawn(kind: string, id: string, spawnXZ: ?, entryXZ: ?, parent: ?) → void
Spawn one foe of `kind` (a key of R.ENEMIES) at spawnXZ that walks to entryXZ before it fights.
| arg | type | description |
|---|---|---|
| kind | string | |
| id | string | |
| spawnXZ | ? | |
| entryXZ | ? | |
| parent | ? |
onHit(amount: ?, fromPos: ?, hitKind: ?) → void
| arg | type | description |
|---|---|---|
| amount | ? | |
| fromPos | ? | |
| hitKind | ? |
setState(s: string) → void
| arg | type | description |
|---|---|---|
| s | string |
pos( ) → void
face(tx: number, tz: number, dt: number, rate: number) → void
| arg | type | description |
|---|---|---|
| tx | number | |
| tz | number | |
| dt | number | |
| rate | number |
facingDot(tx: number, tz: number) → number
| arg | type | description |
|---|---|---|
| tx | number | |
| tz | number |
move(dx: number, dz: number, speed: number, dt: number) → void
| arg | type | description |
|---|---|---|
| dx | number | |
| dz | number | |
| speed | number | |
| dt | number |
alive( ) → boolean return self
onHit(amount: number, fromPos: any, hitKind: string?) → void
| arg | type | description |
|---|---|---|
| amount | number | |
| fromPos | any | |
| hitKind | string? |
die( ) → void
strikeAt(px: number, pz: number, reach: number, cone: number, dmg: number) → boolean
Hit the player if they stand within `reach` in front of this foe.
| arg | type | description |
|---|---|---|
| px | number | |
| pz | number | |
| reach | number | |
| cone | number | |
| dmg | number |
enter(dt: number) → boolean
AI per kind
| arg | type | description |
|---|---|---|
| dt | number |
duelist(dt: number, px: number?, pz: number?) → void
| arg | type | description |
|---|---|---|
| dt | number | |
| px | number? | |
| pz | number? |
lion(dt: number, px: number?, pz: number?) → void
| arg | type | description |
|---|---|---|
| dt | number | |
| px | number? | |
| pz | number? |
slave(dt: number, px: number?, pz: number?) → void
| arg | type | description |
|---|---|---|
| dt | number | |
| px | number? | |
| pz | number? |
rot(e: ?, x: ?, y: ?, z: ?) → void
Posing
| arg | type | description |
|---|---|---|
| e | ? | |
| x | ? | |
| y | ? | |
| z | ? |
poseHumanoid(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
poseLion(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
setTint(models: ?, k: number) → void
| arg | type | description |
|---|---|---|
| models | ? | |
| k | number |
update(dt: number, px: number?, pz: number?) → void
| arg | type | description |
|---|---|---|
| dt | number | |
| px | number? | |
| pz | number? |
updateAll(dt: number) → void
Step every live foe; keeps them apart and off the player.
| arg | type | description |
|---|---|---|
| dt | number |
alive( ) → number
Number of foes still standing.
summary( ) → void
A plain summary of every foe (for tests and the debugger).
clear( ) → void
Despawn every foe and drop them from the enemy registry.
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.