{
"id": "KoboldOverseer_MadRun",
"anim": {
"ref": "Scream"
},
"type": 11,
"vars": {
"range": 20
},
"flags": 8,
"props": {},
"steps": [
{
"id": "Run",
"on": 0,
"type": 3,
"delay": 1.4,
"props": {
"castFlags": 6
},
"visuals": {
"fxs": [
{
"set": "State_Burning",
"flags": 12,
"props": {},
"space": 0,
"attachName": "CoalBag"
}
]
},
"duration": 8
},
{
"on": 0,
"type": 13,
"delay": 1.4,
"props": {},
"duration": -1
},
{
"id": "Loop",
"on": 0,
"delay": 2,
"props": {
"loop": {
"tick": 0.5,
"flags": 2
}
},
"range": 2,
"duration": 7
},
{
"id": "Area",
"on": 13,
"type": 4,
"props": {
"area": {
"telegraph": 0,
"travelTime": 2
},
"position": {
"random": {
"range": 6,
"maxZDiff": 3,
"minRange": 3
}
},
"canRepeat": true
},
"range": 2,
"effects": [
{
"flags": 0,
"effect": 0,
"scaling": [
{
"atb": "FoePower",
"ratio": 0.4
}
],
"affinity": "Fire"
}
],
"visuals": {
"fxs": [
{
"set": "Charcoal_AOE_Ground",
"flags": 16,
"props": {},
"space": 1
}
],
"bellFx": {
"to": 1,
"set": "Projectile_Charcoal",
"from": 0,
"height": 4,
"startObj": "CoalBag"
}
}
},
{
"id": "EndRun",
"on": 7,
"props": {}
}
],
"texts": {},
"nature": 3,
"script": "var chaoticRunStartPos = null;\nvar nextRunPick = -1.;\nvar minRunTime = 0.5;\nvar maxRunTime = 1.5;\nfunction startChaoticRun() {\n chaoticRunStartPos = owner.position;\n nextRunPick = -1.;\n}\n\nfunction endChaoticRun() {\n if(isServer && chaoticRunStartPos != null)\n owner.forceMoveTo(owner.position); // End in place\n chaoticRunStartPos = null;\n}\n\nfunction onStop(ctx) {\n endChaoticRun();\n}\n\nfunction onUpdate(dt) {\n chaoticRunUpdate(dt);\n}\n\nfunction onStepTick(step) {\n\tif(!isServer) return;\n\tif(step.kind == Steps.Loop) {\n\t\tplayStep(Steps.Area);\n\t}\n}\n\nfunction chaoticRunUpdate(dt) {\n if(!isServer || chaoticRunStartPos == null)\n return;\n if(elapsedTime > nextRunPick) {\n var runTime = random(minRunTime, maxRunTime);\n nextRunPick = elapsedTime + runTime;\n var radius = runTime * getAtb(owner, Attribute.SprintSpeed);\n var targetPos = getRandomGroundPos(owner, radius * 1.2, radius * 1.1, 1.6, 0, 360, (pos) -> p3DDist(pos, chaoticRunStartPos) < vars.range);\n owner.forceMoveTo(targetPos, true);\n }\n}\n\nfunction onStep(s) {\n switch(s.kind) {\n case Steps.Run:\n startChaoticRun();\n case Steps.EndRun:\n endChaoticRun();\n default:\n }\n}",
"status": 0,
"aiProps": {
"pickPrio": 1,
"minTimeInCombat": 5
},
"mastery": [],
"cooldown": 15,
"duration": 2.4
}