Home · skill · AddToCollection
Properties
- type
- Action
- nature
- Ability
- cooldown
- 1
- duration
- 0.1
- steps
Referenced by
itemType (1)
Raw data
{
"id": "AddToCollection",
"type": "Action",
"nature": "Ability",
"texts": {
"name": "Add to Collection"
},
"anim": {},
"cooldown": 1,
"duration": 0.1,
"steps": [
{
"props": {},
"on": 0,
"type": 3,
"duration": 1
},
{
"on": 7,
"props": {
"flags": 2
},
"id": "End"
}
],
"flags": [],
"mastery": [],
"props": {},
"vars": {},
"script": "function checkEnabled() {\n\tif( ownerHero.player.progress.checkAddToCollection(skill.originItem) != Ok )\n\t\treturn Reason.ItemAlreadyOwned;\n\treturn Ok;\n}\n\nfunction onStep(s) {\n if(s.kind == Steps.End)\n\t\townerHero.player.progress.addToCollection(skill.originItem);\n}",
"_xrefs": [
{
"from_sheet": "itemType",
"from_id": "Collection",
"via_field": "skills"
}
]
}