Home · skill · Book_WaterOrbs_Skill2
Properties
- status
- Done
- type
- Weapon Skill
- nature
- Spell
- cooldown
- 15
- steps
Referenced by
item (1)
Raw data
{
"status": "Done",
"gfx": {
"file": "UI/icons/atlas_Book_96PX.png",
"size": 96,
"x": 8,
"y": 0
},
"id": "Book_WaterOrbs_Skill2",
"type": "WeaponSkill",
"nature": "Spell",
"texts": {
"name": "Expulse",
"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.",
"rankDescs": [
{
"rank": 2,
"desc": "Reduces the cooldown by ::dur1:: if this critically strikes.",
"flags": 0
},
{
"rank": 3,
"desc": "Each sphere has a ::chance:: chance to deal its damage to nearby enemies.",
"flags": 0
}
],
"refs": {
"ref": "Book_WaterOrbs_Skill2_Recast"
}
},
"anim": {},
"cooldown": 15,
"steps": [
{
"visuals": {
"playAnims": [
{
"anim": {
"ref": "SelfBuff",
"startFrame": 3,
"speed": 1.3
}
}
],
"fxs": [
{
"set": "Water_Cast_Fast",
"props": {
"offset": {
"x": 0.5,
"y": 0,
"z": 0,
"height": 0
}
},
"space": 0,
"attachName": "B_Wrist_R",
"scale": 0.5
}
]
},
"props": {},
"on": 0,
"type": 3,
"duration": 0.2,
"range": "\n"
},
{
"on": 0,
"props": {
"rotation": {
"direction": 1,
"limiter": 1000
}
},
"type": 13,
"duration": 0.2
},
{
"on": 0,
"props": {},
"type": 11
},
{
"props": {},
"on": 7,
"type": 11,
"delay": 0,
"id": "Trigger"
},
{
"on": 13,
"props": {
"status": {
"ref": "Book_WaterOrbs_Orb_Charge"
}
},
"type": 1,
"id": "Return",
"visuals": {
"fxs": [
{
"set": "Water_Bubble_Splash_Small",
"props": {
"offset": {
"x": 0,
"y": 0,
"z": 0,
"height": 0.5
}
},
"space": 0,
"scale": 1.25
}
]
}
},
{
"on": 13,
"props": {
"position": {
"origin": 4
},
"area": {
"hitFilter": 1,
"ignoreMainTarget": true
}
},
"id": "AreaDamage",
"visuals": {
"fxs": [
{
"set": "Water_AOE_FloorImpact",
"props": {},
"flags": 16
}
]
},
"range": 6,
"effects": [
{
"effect": 0,
"scaling": [],
"flags": 0,
"affinity": "Raw",
"dynVal": 1
}
],
"type": 4
}
],
"flags": [],
"mastery": [],
"props": {
"subskills": [
{
"skill": "Book_WaterOrbs_Skill2_Recast"
}
]
},
"vars": {
"chance": 0.25,
"time": 6,
"dur1": 1,
"damage": 1
},
"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}",
"_xrefs": [
{
"from_sheet": "item",
"from_id": "Book_WaterOrbs",
"via_field": "skills"
}
]
}