Home · skill · PrismaticPearl

You alternate between gaining ? Strength or Dexterity every 5 in combat.

Properties

type
Passive
nature
Passive

Referenced by

Raw data
{
  "gfx": {
    "file": "UI/Portraits/Items/GearTrinket/Items_Loot_Trinket_Trinket_pearl_01.prefab.png",
    "size": 256,
    "x": 0,
    "y": 0
  },
  "id": "PrismaticPearl",
  "type": "Passive",
  "nature": "Passive",
  "texts": {
    "name": "Prismatic Pearl",
    "desc": "You alternate between gaining ::ref_val1:: [Strength] or [Dexterity] every ::time:: in combat."
  },
  "anim": {},
  "steps": [],
  "flags": [],
  "mastery": [],
  "props": {},
  "vars": {
    "time": 5
  },
  "script": "var prevTime = -1.;\n\nfunction onUpdate(dt) {\n\tvar curTime = owner.getTimeInCombat();\n\tif (curTime >= 0 && prevTime < 0) {\n\t\tprevTime = 0;\n\t\tif( !hasStatus(owner, Skill.PrismaticPearl_Status) && !hasStatus(owner, Skill.PrismaticPearl_Status2) ) {\n\t\t\taddStatus(owner, Skill.PrismaticPearl_Status);\n\t\t}\n\t}\n\tif (curTime - prevTime >= vars.time) {\n\t\tprevTime += vars.time;\n\t\tif( hasStatus(owner, Skill.PrismaticPearl_Status))  {\n\t\t\taddStatus(owner, Skill.PrismaticPearl_Status2);\n\t\t\tremoveStatus(owner, Skill.PrismaticPearl_Status);\n\t\t}\n\t\telse if ( hasStatus(owner, Skill.PrismaticPearl_Status2)) {\n\t\t\taddStatus(owner, Skill.PrismaticPearl_Status);\n\t\t\tremoveStatus(owner, Skill.PrismaticPearl_Status2);\n\t\t}\n\t}\n\tif (curTime < prevTime)\n\t\tprevTime = curTime;\n}",
  "_xrefs": [
    {
      "from_sheet": "item",
      "from_id": "PrismaticPearl",
      "via_field": "skills"
    },
    {
      "from_sheet": "craft",
      "from_id": "PrismaticPearl",
      "via_field": "item"
    }
  ]
}