FareverDB

Sparkmaster

Mage_SparkMaster in Skills

Using a [WeaponSkill] or your [ComboAttack] consumes [Spark]. Consuming [Spark] activates your [Conduit]s if your gauge is above the threshold. You can select any combination of [Conduit]s.

id
Mage_SparkMaster
type
10
flags
0
nature
5
script
function onPreSkillProc(ctx) { var s = ctx.skill; if(s.isWeaponSkill() || s.isFinalAttack() ) { var hasChain = false; if (s.isWeaponSkill()) hasChain = owner.tryConsumeStatus(Skill.Mage_Talent_Chaincast_Status) > 0; var isFree = hasChain; if (!isFree) isFree = consumeStatus(owner, Skill.Mage_Foresight_Status) > 0; // if (ownerHero?.mage != null) // ownerHero.mage.triggerAllConduits(); if (hasChain && ownerHero?.mage != null) { ownerHero?.mage.propagateMageChainCast(ctx); } if (!isFree) { var cost = s.getSparkCost(); addResource(Attribute.Spark, -cost); setCustom(ctx, cost); } } }
status
2
Raw data
{
  "id": "Mage_SparkMaster",
  "gfx": {
    "x": 4,
    "y": 0,
    "file": "UI/icons/atlas_class_Mage_96PX.png",
    "size": 96
  },
  "anim": {},
  "type": 10,
  "vars": {},
  "flags": 0,
  "props": {},
  "steps": [],
  "texts": {
    "desc": "Using a [WeaponSkill] or your [ComboAttack] consumes [Spark].\n\nConsuming [Spark] activates your [Conduit]s if your gauge is above the threshold.\n\nYou can select any combination of [Conduit]s.",
    "name": "Sparkmaster"
  },
  "nature": 5,
  "script": "function onPreSkillProc(ctx) {\n\tvar s = ctx.skill;\n\tif(s.isWeaponSkill() || s.isFinalAttack() ) {\n\t\tvar hasChain = false;\n\t\tif (s.isWeaponSkill())\n\t\t\thasChain = owner.tryConsumeStatus(Skill.Mage_Talent_Chaincast_Status) > 0;\n\t\tvar isFree = hasChain;\n\t\tif (!isFree)\n\t\t\tisFree = consumeStatus(owner, Skill.Mage_Foresight_Status) > 0;\n\t\t// if (ownerHero?.mage != null)\n\t\t// \townerHero.mage.triggerAllConduits();\n\t\tif (hasChain && ownerHero?.mage != null) {\n\t\t\townerHero?.mage.propagateMageChainCast(ctx);\n\t\t}\n\t\tif (!isFree) {\n\t\t\tvar cost = s.getSparkCost();\n\t\t\taddResource(Attribute.Spark, -cost);\n\t\t\tsetCustom(ctx, cost);\n\t\t}\n\t}\n}",
  "status": 2,
  "mastery": []
}