Home · skill · Rogue_Talent_CheatDeath

Damage that should kill you leaves you at 5% of your Maximum Health. For 3, you take -85% reduced damage. (120 cooldown).

Properties

status
Done
type
Talent
nature
Passive

Referenced by

Raw data
{
  "status": "Done",
  "gfx": {
    "file": "UI/icons/Rogue_talent.png",
    "size": 48,
    "x": 2,
    "y": 4,
    "width": 2,
    "height": 2
  },
  "id": "Rogue_Talent_CheatDeath",
  "type": "Talent",
  "nature": "Passive",
  "texts": {
    "desc": "Damage that should kill you leaves you at ::var1%:: of your [MaxHealth]. For ::ref_duration::, you take ::ref_val1%:: reduced damage. (::cooldown:: cooldown).",
    "name": "Cheat Death",
    "refs": {
      "ref": "Rogue_Talent_CheatDeath_Status"
    }
  },
  "anim": {},
  "steps": [],
  "flags": [],
  "mastery": [],
  "props": {
    "talent": {
      "maxPoints": 1
    }
  },
  "vars": {
    "var1": 0.05,
    "cooldown": 120
  },
  "script": "function onReceiveDamageEval(dmg) {\n\tif (!hasStatus(owner, Skill.Rogue_Talent_CheatDeath_Cooldown)) {\n\t\tvar threshold = owner.maxHealth * vars.var1;\n\t\tif (owner.health - dmg.amount < threshold) {\n\t\t\tvar effectiveDamage = min(threshold - dmg.amount, dmg.amount);\n\t\t\taddStatus(owner, Skill.Rogue_Talent_CheatDeath_Status);\n\t\t\taddStatusDuration(owner, Skill.Rogue_Talent_CheatDeath_Cooldown, vars.cooldown);\n\t\t\tdmg.amount = 0;\n\t\t\towner.health = threshold;\n\t\t}\n\t}\n}",
  "_xrefs": [
    {
      "from_sheet": "unit",
      "from_id": "Rogue",
      "via_field": "talentTrees"
    }
  ]
}