Expulse
Book_WaterOrbs_Skill2 in SkillsGrabs all nearby <val>Water Spheres</val>. You can recast this within 6 to throw them in the targeted direction, each dealing 40% Intellect + 40% Faith Magic to the first enemy encountered.
- id
- Book_WaterOrbs_Skill2
- type
- 7
- flags
- 0
- nature
- 3
- script
- var lastCastTime = -1.; function onStep(s) { if (s.kind == Steps.Trigger) { lastCastTime = time.now; var w1Skill = owner.getSkill(Skill.Book_WaterOrbs_Skill1); var waterOrbs = w1Skill?.getSkillObjects() ?? []; var i = 0; waterOrbs = sortByDistance(waterOrbs); for (so in waterOrbs) { delay(i * 0.05, () -> { so.magnetTo(owner, (so) -> { playStep(Steps.Return, owner); so.remove(); }, 50); }); i++; if (i >= 8) { break; } //break; } } } function onInflictDamage(dmg) { if (dmg.skillId == Skill.Book_WaterOrbs_Skill2_Recast ) { if (rank >= 2 && dmg.critical) { reduceCooldown(skill.kind, vars.dur1); } if (rank >= 3) { if (checkProba(vars.chance)) { setDynVal(1, vars.damage * dmg.amount); playStep(Steps.AreaDamage, dmg.target, dmg.target.position); } } } } function onUseSkillClient(ctx) { if (ctx.skillId == Skill.Book_WaterOrbs_Skill2_Recast) { lastCastTime = -1; } } // function onClientUpdate(dt) { // if (!haveWaterOrbs()) { // lastCastTime = -1; // } // } function haveWaterOrbs() { return owner.getStatusCount(Skill.Book_WaterOrbs_Orb_Charge) > 0; } function onClientStep(step) { if (step.kind == Steps.Trigger) { lastCastTime = time.now; } } function shouldHighlightSkill() { return canRecast(); } function getOverrideSkill() { if (canRecast()) { return Skill.Book_WaterOrbs_Skill2_Recast; } return null; } function canRecast() { return lastCastTime > 0 && (time.now - lastCastTime) < vars.time && haveWaterOrbs(); }
- status
- 2
- cooldown
- 15
Raw data
{
"id": "Book_WaterOrbs_Skill2",
"gfx": {
"x": 8,
"y": 0,
"file": "UI/icons/atlas_Book_96PX.png",
"size": 96
},
"anim": {},
"type": 7,
"vars": {
"dur1": 1,
"time": 6,
"chance": 0.25,
"damage": 1
},
"flags": 0,
"props": {
"subskills": [
{
"skill": "Book_WaterOrbs_Skill2_Recast"
}
]
},
"steps": [
{
"on": 0,
"type": 3,
"props": {},
"range": "\n",
"visuals": {
"fxs": [
{
"set": "Water_Cast_Fast",
"props": {
"offset": {
"x": 0.5,
"y": 0,
"z": 0,
"height": 0
}
},
"scale": 0.5,
"space": 0,
"attachName": "B_Wrist_R"
}
],
"playAnims": [
{
"anim": {
"ref": "SelfBuff",
"speed": 1.3,
"startFrame": 3
}
}
]
},
"duration": 0.2
},
{
"on": 0,
"type": 13,
"props": {
"rotation": {
"limiter": 1000,
"direction": 1
}
},
"duration": 0.2
},
{
"on": 0,
"type": 11,
"props": {}
},
{
"id": "Trigger",
"on": 7,
"type": 11,
"delay": 0,
"props": {}
},
{
"id": "Return",
"on": 13,
"type": 1,
"props": {
"status": {
"ref": "Book_WaterOrbs_Orb_Charge"
}
},
"visuals": {
"fxs": [
{
"set": "Water_Bubble_Splash_Small",
"props": {
"offset": {
"x": 0,
"y": 0,
"z": 0,
"height": 0.5
}
},
"scale": 1.25,
"space": 0
}
]
}
},
{
"id": "AreaDamage",
"on": 13,
"type": 4,
"props": {
"area": {
"hitFilter": 1,
"ignoreMainTarget": true
},
"position": {
"origin": 4
}
},
"range": 6,
"effects": [
{
"flags": 0,
"dynVal": 1,
"effect": 0,
"scaling": [],
"affinity": "Raw"
}
],
"visuals": {
"fxs": [
{
"set": "Water_AOE_FloorImpact",
"flags": 16,
"props": {}
}
]
}
}
],
"texts": {
"desc": "Grabs all nearby <val>Water Spheres</val>. You can recast this within ::time:: to throw them in the targeted direction, each dealing ::ref_dmg:: to the first enemy encountered.",
"name": "Expulse",
"refs": {
"ref": "Book_WaterOrbs_Skill2_Recast"
},
"rankDescs": [
{
"desc": "Reduces the cooldown by ::dur1:: if this critically strikes.",
"rank": 2,
"flags": 0
},
{
"desc": "Each sphere has a ::chance:: chance to deal its damage to nearby enemies.",
"rank": 3,
"flags": 0
}
]
},
"nature": 3,
"script": "var lastCastTime = -1.;\n\nfunction onStep(s) {\n\tif (s.kind == Steps.Trigger) {\n\t\tlastCastTime = time.now;\n\t\tvar w1Skill = owner.getSkill(Skill.Book_WaterOrbs_Skill1);\n\t \tvar waterOrbs = w1Skill?.getSkillObjects() ?? [];\n\t\tvar i = 0;\n\t\twaterOrbs = sortByDistance(waterOrbs);\n\t \tfor (so in waterOrbs) {\n\t\t\tdelay(i * 0.05, () -> {\n\t\t\t\tso.magnetTo(owner, (so) -> {\n\t\t\t\t\tplayStep(Steps.Return, owner);\n\t\t\t\t\tso.remove();\n\t\t\t\t}, 50);\n\t\t\t});\n\t\t\ti++;\n\t\t\tif (i >= 8) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//break;\n\t \t}\n\t}\n}\n\nfunction onInflictDamage(dmg) {\n\tif (dmg.skillId == Skill.Book_WaterOrbs_Skill2_Recast ) {\n\t\tif (rank >= 2 && dmg.critical) {\n\t\t\treduceCooldown(skill.kind, vars.dur1);\n\t\t}\n\t\tif (rank >= 3) {\n\t\t\tif (checkProba(vars.chance)) {\n\t\t\t\tsetDynVal(1, vars.damage * dmg.amount);\n\t\t\t\tplayStep(Steps.AreaDamage, dmg.target, dmg.target.position);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction onUseSkillClient(ctx) {\n\tif (ctx.skillId == Skill.Book_WaterOrbs_Skill2_Recast) {\n\t\tlastCastTime = -1;\n\t}\n}\n\n// function onClientUpdate(dt) {\n// \tif (!haveWaterOrbs()) {\n// \t\tlastCastTime = -1;\n// \t}\n// }\n\nfunction haveWaterOrbs() {\n\treturn owner.getStatusCount(Skill.Book_WaterOrbs_Orb_Charge) > 0;\n}\n\nfunction onClientStep(step) {\n\tif (step.kind == Steps.Trigger) {\n\t\tlastCastTime = time.now;\n\t}\n}\n\nfunction shouldHighlightSkill() {\n\treturn canRecast();\n}\n\nfunction getOverrideSkill() {\n\tif (canRecast()) {\n\t\treturn Skill.Book_WaterOrbs_Skill2_Recast;\n\t}\n\treturn null;\n}\n\nfunction canRecast() {\n\treturn lastCastTime > 0 && (time.now - lastCastTime) < vars.time && haveWaterOrbs();\n}",
"status": 2,
"mastery": [],
"cooldown": 15
}