{
"id": "CleodoraChamp_TornadoArea",
"anim": {},
"vars": {
"range": 3,
"speed": 5,
"wait1": 5
},
"flags": 0,
"props": {},
"steps": [
{
"id": "Begin",
"on": 0,
"type": 11,
"props": {},
"visuals": {
"fxs": [
{
"set": "Honey_Tornado",
"flags": 24,
"props": {},
"space": 0
}
]
},
"duration": 2
},
{
"id": "Telegraph",
"on": 0,
"type": 11,
"props": {},
"visuals": {
"fxs": [
{
"set": "Telegraph_Generic_Circle",
"flags": 56,
"props": {},
"space": 0
}
]
},
"duration": 2
},
{
"on": 0,
"cond": {
"step": "Telegraph"
},
"type": 4,
"delay": 1.9,
"props": {
"area": {
"hitFilter": 1,
"transferFX": "Begin"
},
"loop": {
"tick": 0.5
}
},
"range": 4,
"effects": [
{
"flags": 0,
"effect": 0,
"scaling": [
{
"atb": "FoePower",
"ratio": 0.2
}
],
"affinity": "Honey",
"sideEffects": {
"knockBack": {
"type": 0,
"pushForce": -3,
"knockUpForce": 5
}
}
}
],
"duration": -1
},
{
"on": 1,
"type": 1,
"props": {
"status": {
"ref": "HoneyCovered"
}
}
}
],
"texts": {},
"nature": 6,
"script": "var following = false;\nvar lastPick = -1.;\nvar direction = null;\n\nvar tornado = null;\n\nfunction onStart(ctx) {\n following = false;\n lastPick = -1.;\n direction = null;\n}\n\nfunction onCreateArea(area) {\n\ttornado = area;\n}\n\nfunction onStepEnd(step) {\n if(step.kind == Steps.Telegraph)\n following = true;\n}\n\nfunction onUpdate(dt) {\n if(!following)\n return;\n if(lastPick < 0 || elapsedTime > lastPick + vars.wait1) {\n lastPick = elapsedTime;\n var enemy = owner.getClosestEnemy();\n if(enemy != null) {\n\t\t\tvar pos = getRandomPosInRange(enemy, 0, vars.range);\n direction = p3DSub(pos, tornado.position);\n }\n }\n if(direction != null) {\n moveTowards(tornado, p3DAdd(tornado.position, direction), vars.speed, dt, true);\n\n\t\t// skill.layer.debug.clientsDebugCross(tornado.position, 0xff00ff, 0.2);\n\t\t// skill.layer.debug.clientsDebugLine(tornado.position, p3DAdd(tornado.position, direction), 0x0000ff, 0.2);\n }\n}",
"mastery": [],
"duration": 30
}