Skip to content

Movement Controllers

Movement controllers define how Titans navigate and position themselves during combat. Titan includes 11 specialized controllers with configurable behavior and per-phase overrides.

Controllers are selected via weighted random based on distance, health, and aggression. Each controller has unique selection criteria and configurable parameters.

Ground Controllers

7 Controllers
  • Hit-and-Run
  • Kiting
  • Berserker
  • Defensive
  • Enraged
  • Zigzag
  • Standard (fallback)

Flying Controllers

3 Controllers
  • Flying Bomber
  • Flying Circler
  • Flying Rush

Special Controllers

2 Controllers
  • Teleport Blink
  • Perched

Best For: Melee strikers (Lucario, Scizor, Weavile)

Three-phase combat pattern: APPROACH → STRIKE → RETREAT.

{
"movementOverrides": {
"hitAndRun": {
"approachSpeed": 1.3,
"retreatSpeed": 1.5,
"strikeRange": 3.0,
"retreatDistance": 8.0,
"cooldownMs": 5000
}
}
}
PropertyDefaultDescription
approachSpeed1.2Speed multiplier during approach
retreatSpeed1.4Speed multiplier during retreat
strikeRange2.5Distance to trigger strike phase
retreatDistance7.0How far to retreat after strike
cooldownMs4000Time before next cycle

High weight at medium range (4-10 blocks), low weight at very close or far range. Increased by aggression multiplier.

Optimal Range: 4-10 blocks Aggression Scaling: ×0.8 to ×1.5


Best For: Psychic/Ghost types (Gengar, Alakazam, Mimikyu, Raichu)

Instant teleportation to tactical positions with safety checks.

{
"movementOverrides": {
"teleport": {
"minRange": 4.0,
"maxRange": 8.0,
"radialCandidates": 12,
"heightVariance": 2.5,
"cooldownMs": 10000
}
}
}
PropertyDefaultDescription
minRange4.0Minimum teleport distance
maxRange8.0Maximum teleport distance
radialCandidates10Number of positions to evaluate
heightVariance±2.5Vertical offset range
cooldownMs12000Time between teleports
  1. Spawn Chunk Check - Ensures chunk is loaded
  2. Water Avoidance - Filters out fluid blocks
  3. EntityBounds Enforcement - Post-teleport collision correction

High weight at medium-long range (6-15 blocks), low weight when very close. Increased when stuck or obstructed.

Optimal Range: 6-15 blocks


Best For: Ranged attackers (Arcanine, Sceptile, Flygon)

Maintains distance while circling target.

{
"movementOverrides": {
"kiting": {
"preferredDistance": 8.0,
"minDistance": 6.0,
"maxDistance": 12.0,
"circleSpeed": 1.1
}
}
}
PropertyDefaultDescription
preferredDistance8.0Ideal range from target
minDistance6.0Too close threshold (retreat)
maxDistance12.0Too far threshold (advance)
circleSpeed1.1Strafing speed multiplier

Optimal Range: 7-11 blocks


Best For: Aerial strikers (Rayquaza, Salamence, Dragonite)

Flies above target, dives to attack, ascends to repeat.

{
"movementOverrides": {
"flyingBomber": {
"cruiseAltitude": 12.0,
"diveSpeed": 1.8,
"ascentSpeed": 1.3,
"attackAltitude": 3.0
}
}
}
PropertyDefaultDescription
cruiseAltitude12.0Height while circling
diveSpeed1.8Speed during dive attack
ascentSpeed1.3Speed climbing back up
attackAltitude3.0Dive endpoint height

Best For: Aerial casters (Togekiss, Articuno)

Maintains constant altitude while circling target.

{
"movementOverrides": {
"flyingCircler": {
"altitude": 10.0,
"orbitRadius": 8.0,
"orbitSpeed": 1.2
}
}
}
PropertyDefaultDescription
altitude10.0Fixed flight height
orbitRadius8.0Circle radius
orbitSpeed1.2Rotation speed

Best For: Aggressive flyers (Dragonite enraged phase)

Direct aerial charges at target.

{
"movementOverrides": {
"flyingRush": {
"rushSpeed": 2.0,
"minAltitude": 4.0,
"maxAltitude": 8.0
}
}
}

Best For: High-aggression melee (Gyarados, Heracross)

Relentless forward aggression with no retreat.

{
"movementOverrides": {
"berserker": {
"chargeSpeed": 1.6,
"ignoreHealth": false
}
}
}

Selection Weight: Increases as health decreases (enrage mechanic).


Best For: Tank Titans (Aggron, Lapras)

Maintains safe distance, retreats when threatened.

{
"movementOverrides": {
"defensive": {
"safeDistance": 10.0,
"retreatThreshold": 0.5
}
}
}

Best For: Final phase berserk mode

Activated when health < 20%, ignores normal behavior.

{
"movementOverrides": {
"enraged": {
"speed": 2.0,
"healthThreshold": 0.2
}
}
}

Best For: Evasive strikers (Weavile, Toxicroak)

Unpredictable lateral movement while advancing.

{
"movementOverrides": {
"zigzag": {
"zigSpeed": 1.4,
"zigInterval": 1000,
"zigAngle": 45
}
}
}

Best For: Flying types that land periodically

Alternates between perched (ground) and flying states.

{
"movementOverrides": {
"perched": {
"perchDuration": 5000,
"flyDuration": 8000
}
}
}

You can change movement behavior per phase in phase configs.

Phase 1 (100% HP): KITING pattern

{
"healthThreshold": 1.0,
"movementPattern": "KITING",
"aggressionLevel": 1.2
}

Phase 2 (60% HP): TELEPORT with faster cooldown

{
"healthThreshold": 0.6,
"movementPattern": "TELEPORT",
"aggressionLevel": 1.5,
"movementOverrides": {
"teleport": {
"minRange": 4.0,
"maxRange": 8.0,
"cooldownMs": 12000
}
}
}

Phase 3 (35% HP): RUSH (berserker mode)

{
"healthThreshold": 0.35,
"movementPattern": "RUSH",
"aggressionLevel": 1.8
}

Use these strings in phase configs:

Pattern NameControllerBest For
STANDARDGround patrolDefault/fallback
HIT_AND_RUNHit-and-runMelee strikers
TELEPORTTeleport blinkPsychic/Ghost
KITINGKitingRanged attackers
FLYING_BOMBERFlying bomberDive attackers
FLYING_CIRCLERFlying circlerAerial casters
FLYING_RUSHFlying rushAggressive flyers
BERSERKERBerserkerHigh aggression
DEFENSIVEDefensiveTanks
ENRAGEDEnragedLow health berserk
ZIGZAGZigzagEvasive
PERCHEDPerchedFlying with landing

Movement controllers use dynamic weighting based on:

  1. Distance to Target - Each controller has optimal range
  2. Current Health - Berserker/Enraged increase when low HP
  3. Aggression Multiplier - From phase aggressionLevel
  4. Obstruction State - Teleport weight increases if stuck

Weight Calculation Example:

fun getSelectionWeight(
distance: Double,
health: Double,
aggression: Double
): Double {
var weight = baseWeight
weight *= distanceModifier(distance) // 0.3-1.5x
weight *= healthModifier(health) // 0.5-2.0x
weight *= aggression // Phase modifier
return weight.coerceIn(0.0, 10.0)
}

Movement controllers are invoked through the task system which manages cooldowns, handles controller selection, and integrates with Cobblemon’s AI goal system.

  1. Start Simple - Use STANDARD or HIT_AND_RUN for first phase
  2. Escalate Complexity - Add TELEPORT or FLYING in later phases
  3. Test Range Values - Adjust min/maxRange based on arena size
  4. Balance Cooldowns - Shorter cooldowns = more chaotic, harder to predict
  5. Match Lore - Psychic types → TELEPORT, Dragons → FLYING, Ghosts → HIT_AND_RUN

Ceruledge (melee ghost type):

{
"phases": [
{
"healthThreshold": 1.0,
"movementPattern": "HIT_AND_RUN",
"movementOverrides": {
"hitAndRun": {
"approachSpeed": 1.2,
"retreatSpeed": 1.3,
"cooldownMs": 5000
}
}
},
{
"healthThreshold": 0.5,
"movementPattern": "TELEPORT",
"movementOverrides": {
"teleport": {
"minRange": 3.0,
"maxRange": 6.0,
"cooldownMs": 8000
}
}
},
{
"healthThreshold": 0.25,
"movementPattern": "BERSERKER",
"movementOverrides": {
"berserker": {
"chargeSpeed": 1.8
}
}
}
]
}

Master movement controllers to create dynamic, engaging boss encounters!