FareverDB

Cheat Death

Rogue_Talent_CheatDeath in Skills

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

id
Rogue_Talent_CheatDeath
type
21
flags
0
nature
5
script
function onReceiveDamageEval(dmg) { if (!hasStatus(owner, Skill.Rogue_Talent_CheatDeath_Cooldown)) { var threshold = owner.maxHealth * vars.var1; if (owner.health - dmg.amount < threshold) { var effectiveDamage = min(threshold - dmg.amount, dmg.amount); addStatus(owner, Skill.Rogue_Talent_CheatDeath_Status); addStatusDuration(owner, Skill.Rogue_Talent_CheatDeath_Cooldown, vars.cooldown); dmg.amount = 0; owner.health = threshold; } } }
status
2
Raw data
{
  "id": "Rogue_Talent_CheatDeath",
  "gfx": {
    "x": 2,
    "y": 4,
    "file": "UI/icons/Rogue_talent.png",
    "size": 48,
    "width": 2,
    "height": 2
  },
  "anim": {},
  "type": 21,
  "vars": {
    "var1": 0.05,
    "cooldown": 120
  },
  "flags": 0,
  "props": {
    "talent": {
      "maxPoints": 1
    }
  },
  "steps": [],
  "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"
    }
  },
  "nature": 5,
  "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}",
  "status": 2,
  "mastery": []
}