[
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_HEALTH_POWER_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_vita_health" } },
    "effect": [
      { "u_message": "Your skin prickles and you feel like you're bursting with energy.", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_vita_health", "duration": "PERMANENT" },
      { "u_cast_spell": { "id": "psionic_drained_difficulty_one", "hit_self": true } },
      {
        "queue_eocs": "EOC_VITAKIN_HEALTH_POWER_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_health_power') * 21) + 354) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_health_power') * 298) + 1550) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_VITAKIN_REMOVE_HEALTH_POWER" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_REMOVE_HEALTH_POWER",
    "condition": { "u_has_effect": "effect_vita_health" },
    "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_vita_health" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_HEALTH_POWER_DRAIN",
    "condition": { "u_has_effect": "effect_vita_health" },
    "effect": [
      { "u_cast_spell": { "id": "psionic_maintenance_drained_difficulty_one", "hit_self": true } },
      { "math": [ "u_val('stored_kcal')", "-=", "psionics_kcal_cost(1)" ] },
      { "math": [ "u_spell_exp('vita_health_power')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "queue_eocs": "EOC_VITAKIN_HEALTH_POWER_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_health_power') * 21) + 354) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_health_power') * 298) + 1550) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_CURE_DISEASE_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_vita_cure_disease" } },
    "effect": [
      { "u_message": "No disease is going to keep you down.", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_vita_cure_disease", "duration": "PERMANENT" },
      { "u_cast_spell": { "id": "psionic_drained_difficulty_four", "hit_self": true } },
      {
        "queue_eocs": "EOC_VITAKIN_CURE_DISEASE_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_cure_disease') * 48) + 1148) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_cure_disease') * 311) + 2834) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      },
      {
        "queue_eocs": "EOC_VITAKIN_CURE_DISEASE_CHECKS",
        "time_in_future": [
          { "math": [ "max( ( 600 - (u_spell_level('vita_cure_disease') * 5  ) ), 1)" ] },
          { "math": [ "max( ( 3600 - (u_spell_level('vita_cure_disease') * 30) ), 1)" ] }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_VITAKIN_REMOVE_CURE_DISEASE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_REMOVE_CURE_DISEASE",
    "condition": { "u_has_effect": "effect_vita_cure_disease" },
    "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_vita_cure_disease" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_CURE_DISEASE_DRAIN",
    "condition": { "u_has_effect": "effect_vita_cure_disease" },
    "effect": [
      { "u_cast_spell": { "id": "psionic_maintenance_drained_difficulty_four", "hit_self": true } },
      { "math": [ "u_val('stored_kcal')", "-=", "psionics_kcal_cost(4)" ] },
      { "math": [ "u_spell_exp('vita_cure_disease')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "queue_eocs": "EOC_VITAKIN_CURE_DISEASE_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_cure_disease') * 48) + 1148) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_cure_disease') * 311) + 2834) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_SUPER_HEAL_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_vita_super_heal" } },
    "effect": [
      { "u_message": "You feel a sudden sensation of fatigue and your wounds itch.", "type": "good" },
      { "run_eocs": [ "EOC_POWER_MAINTENANCE_PLUS_ONE", "EOC_POWER_MAINTENANCE_PLUS_ONE" ] },
      { "u_add_effect": "effect_vita_super_heal", "duration": "PERMANENT" },
      { "u_cast_spell": { "id": "psionic_drained_difficulty_nine", "hit_self": true } },
      {
        "queue_eocs": "EOC_VITAKIN_SUPER_HEAL_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_super_heal') * 29) + 146) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_super_heal') * 110) + 372) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_VITAKIN_REMOVE_SUPER_HEAL" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_REMOVE_SUPER_HEAL",
    "condition": { "u_has_effect": "effect_vita_super_heal" },
    "effect": [
      { "run_eocs": [ "EOC_POWER_MAINTENANCE_MINUS_ONE", "EOC_POWER_MAINTENANCE_MINUS_ONE" ] },
      { "u_lose_effect": "effect_vita_super_heal" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_SUPER_HEAL_DRAIN",
    "condition": { "u_has_effect": "effect_vita_super_heal" },
    "effect": [
      { "u_cast_spell": { "id": "psionic_maintenance_drained_difficulty_nine", "hit_self": true } },
      { "math": [ "u_val('stored_kcal')", "-=", "psionics_kcal_cost(9)" ] },
      { "math": [ "u_spell_exp('vita_super_heal')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "queue_eocs": "EOC_VITAKIN_SUPER_HEAL_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_super_heal') * 29) + 146) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_super_heal') * 110) + 372) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_RETURN_FROM_DEATH_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_vita_return_from_death" } },
    "effect": [
      { "u_message": "You prepare yourself to return from near-death.", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "math": [ "u_vitakin_return_from_death_kcal", "=", "u_val('stored_kcal')" ] },
      { "u_add_effect": "effect_vita_return_from_death", "duration": "PERMANENT" },
      { "u_cast_spell": { "id": "psionic_drained_difficulty_ten", "hit_self": true } },
      {
        "queue_eocs": "EOC_VITAKIN_RETURN_FROM_DEATH_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_return_from_death') * 962) + 3978) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_return_from_death') * 2819) + 12360) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_VITAKIN_REMOVE_RETURN_FROM_DEATH" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_REMOVE_RETURN_FROM_DEATH",
    "condition": { "u_has_effect": "effect_vita_return_from_death" },
    "effect": [
      { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" },
      { "queue_eocs": "EOC_VITAKIN_REMOVE_RETURN_FROM_DEATH_2", "time_in_future": [ "2 seconds", "2 seconds" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_REMOVE_RETURN_FROM_DEATH_2",
    "condition": { "u_has_effect": "effect_vita_return_from_death" },
    "effect": [ { "u_lose_effect": "effect_vita_return_from_death" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_RETURN_FROM_DEATH_DRAIN",
    "condition": { "u_has_effect": "effect_vita_return_from_death" },
    "effect": [
      { "u_cast_spell": { "id": "psionic_maintenance_drained_difficulty_ten", "hit_self": true } },
      { "math": [ "u_val('stored_kcal')", "-=", "psionics_kcal_cost(10)" ] },
      { "math": [ "u_vitakin_return_from_death_kcal", "=", "u_val('stored_kcal')" ] },
      { "math": [ "u_spell_exp('vita_return_from_death')", "+=", "(maintenance_exp_factor(u_val('focus')))" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "queue_eocs": "EOC_VITAKIN_RETURN_FROM_DEATH_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('vita_return_from_death') * 962) + 3978) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('vita_return_from_death') * 2819) + 12360) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  }
]
