Home · skill · R1CrabBoss_ChitinousExoskeleton

Properties

status
Done
type
Passive
nature
Passive

Referenced by

Raw data
{
  "status": "Done",
  "id": "R1CrabBoss_ChitinousExoskeleton",
  "type": "Passive",
  "nature": "Passive",
  "texts": {},
  "anim": {},
  "steps": [],
  "flags": [],
  "mastery": [],
  "props": {},
  "vars": {
    "var1": 0.17
  },
  "script": "var lastDropId = 0;\nfunction onReceiveDamage(dmg) {\n    if(!isServer)\n        return;\n    if(owner.isDead())\n        return;\n    var healthRatio = owner.healthRatio;\n    var newId = floor((1-healthRatio) / vars.var1);\n    if(newId + 1 < lastDropId) { // +1 Allows regenerating without possibility for loop in id change\n        lastDropId = newId +1;\n        return;\n    }\n    if(newId > lastDropId) {\n        for(i in lastDropId...newId){\n            startSkill(Skill.R1CrabBoss_ChitinousExoskeleton_Spike);\n        }\n        lastDropId = newId;\n    }\n}",
  "_xrefs": [
    {
      "from_sheet": "unit",
      "from_id": "Crabgantua",
      "via_field": "skills"
    }
  ]
}