FareverDB

Conduit: Lifebolt

Mage_Talent_ConduitLifebolt_Conduit in Skills

Launches a lifebolt healing the nearest wounded ally for 25% Intellect. Activates when you consume [Spark] above the gauge threshold.

id
Mage_Talent_ConduitLifebolt_Conduit
type
20
flags
0
nature
5
script
function onStartConduit() { var instanceIndex = getSkillInstanceIndex(); if(instanceIndex < 0) return; var fanRadius = 2.5; var fanAmplitude = 240; var shotDelay = 0.1; var targets = getAllyUnitsWithinRange(owner, vars.range); sortByDistance(targets); var target = null; for (t in targets) { if (t != owner && t.health < t.maxHealth) { target = t; break; } } var count = getSkillInstanceCount(); if (target != null) { var projStep = getStepById(Steps.Projectile); var startPos = projStep.getProjectileStart(); var interProgress = 1 / (count+1); var pos = startPos; if (count > 1) { for (i in 0...instanceIndex + 1) { pos = p3DAdd(startPos, getFanFacingPos((i+1) * interProgress, fanAmplitude, fanRadius, p2DTo3D( p2DSub(target.pos2D, owner.pos2D)) ) ); } } wait(instanceIndex * shotDelay, function() { projStep.generateProjectile(target, pos); }); } }
status
0
Raw data
{
  "id": "Mage_Talent_ConduitLifebolt_Conduit",
  "gfx": {
    "x": 16,
    "y": 2,
    "file": "UI/icons/Mage_talent.png",
    "size": 48,
    "width": 2,
    "height": 2
  },
  "anim": {},
  "type": 20,
  "vars": {
    "range": 30
  },
  "flags": 0,
  "props": {},
  "steps": [
    {
      "id": "Projectile",
      "on": 13,
      "type": 7,
      "props": {
        "projectile": {
          "base": "MissileHoming",
          "fxSet": "Projectile_Spark_Heal",
          "variant": 1,
          "hitFilter": 2,
          "appearDelay": 0.3,
          "activationDelay": 0.4
        }
      }
    },
    {
      "on": 2,
      "type": 6,
      "props": {},
      "effects": [
        {
          "flags": 0,
          "effect": 1,
          "scaling": [
            {
              "atb": "Intellect",
              "ratio": 0.25
            }
          ]
        }
      ]
    }
  ],
  "texts": {
    "desc": "Launches a lifebolt healing the nearest wounded ally for ::heal::.\n\nActivates when you consume [Spark] above the gauge threshold.",
    "name": "Conduit: Lifebolt"
  },
  "nature": 5,
  "script": "function onStartConduit() {\n\tvar instanceIndex = getSkillInstanceIndex();\n\tif(instanceIndex < 0) return;\n\n    var fanRadius = 2.5;\n    var fanAmplitude = 240;\n    var shotDelay = 0.1;\n\n\tvar targets = getAllyUnitsWithinRange(owner, vars.range);\n\tsortByDistance(targets);\n\n\tvar target = null;\n\tfor (t in targets) {\n\t\tif (t != owner && t.health < t.maxHealth) {\n\t\t\ttarget = t;\n\t\t\tbreak;\n\t\t}\n\t}\n    var count = getSkillInstanceCount();\n    if (target != null) {\n        var projStep = getStepById(Steps.Projectile);\n        var startPos = projStep.getProjectileStart();\n\n        var interProgress = 1 / (count+1);\n\t\tvar pos = startPos;\n\t\tif (count > 1) {\n\t\t\tfor (i in 0...instanceIndex + 1) {\n\t\t\t\tpos = p3DAdd(startPos, getFanFacingPos((i+1) * interProgress, fanAmplitude, fanRadius, p2DTo3D( p2DSub(target.pos2D, owner.pos2D)) ) );\n\t\t\t}\n\t\t}\n\t\twait(instanceIndex * shotDelay, function() {\n\t\t\tprojStep.generateProjectile(target, pos);\n\t\t});\n    }\n}",
  "status": 0,
  "mastery": []
}