[
  {
    "id": "ACT_CRYSTAL_AWAKENING_MEDITATION",
    "type": "activity_type",
    "activity_level": "LIGHT_EXERCISE",
    "verb": "meditating",
    "based_on": "time",
    "interruptable": false,
    "interruptable_with_kb": false
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_BIOKIN_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "BIOKINETIC" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_BIOKIN_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_BIOKIN_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_BIOKIN_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_BIOKIN_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_BIOKIN_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "BIOKINETIC" },
    "effect": [ { "run_eocs": "EOC_BIOKIN_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_BIOKIN_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_BIOKIN_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  As it fills your vision, you become aware of the sound of your heartbeat, of the blood rushing through your veins, of the oxygen fueling your muscles.  You see the connections between them all and, only partially aware of how you're doing it, you reach out and adjust the flow.  Strength and power suddenly fill your body, and as you watch the connections with your inner eye, you see what exactly you did and you know how to do it again.  As the light from the crystal fades, leaving it dull and colorless, your vision clears.",
        "popup": true
      },
      { "u_add_trait": "BIOKINETIC" },
      { "u_add_trait": "BIOKIN_NEEDS" },
      { "u_add_effect": "effect_biokin_physical", "duration": "5 minutes" },
      { "run_eocs": "EOC_TEACH_BIOKIN_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_BIOKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_BIOKIN_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  As it fills your vision, you become aware of the sound of your heartbeat, of the blood rushing through your veins… and then a searing headache crashes through your brain, blotting out all other sensations.  You tear your gaze away from the now-dark crystal but the pounding in your head remains.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_BIOKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_CLAIR_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "CLAIRSENTIENT" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_CLAIR_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_CLAIR_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_CLAIR_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_CLAIR_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_CLAIR_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "CLAIRSENTIENT" },
    "effect": [ { "run_eocs": "EOC_CLAIR_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_CLAIR_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_CLAIR_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  You remember your childhood, before the end of the world, and then the memories diverge.  You see yourself on an aircraft carrier bridge, looking out the window as a colossal tentacle breaches the surface of the ocean; you stand in a clear white room, watching through a reinforced glass window as your colleague reanimates; you are caught up in the riots and shot by soldiers manning a road block; you are on a camping trip with friends when a nest of pig-sized wasps descend from a formerly-clear sky.  Dozens of lives in quick succession, might-have-beens and never-weres, fragments that fade even as you try to grasp each one in succession.  When the last one ends, you can see through the crystal, through your hands, through the ground.  You can see forever.",
        "popup": true
      },
      { "u_add_trait": "CLAIRSENTIENT" },
      { "u_add_trait": "CLAIR_SENSES" },
      { "u_add_effect": "effect_clair_clear_sight", "duration": "1 minutes" },
      { "run_eocs": "EOC_TEACH_CLAIR_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_CLAIR_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_CLAIR_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  You see yourself as you could have been, if you had taken that job, if you had sent that text, if you had moved across the country, but only for a moment before your head starts pounding.  You look down at the crystal as its light fades, but the visions do not return.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 },
      { "queue_eocs": "EOC_CLAIR_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTRO_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "ELECTROKINETIC" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_ELECTRO_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTRO_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_ELECTRO_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_ELECTRO_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTRO_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "ELECTROKINETIC" },
    "effect": [ { "run_eocs": "EOC_ELECTRO_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_ELECTRO_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTRO_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  As it fills your vision, you see thin lines beneath your skin.  They pulse with energy, bright sparks traveling to your fingers as you flex them and a burst of internal lightning when you touch the crystal with your free hand.  You raise your hand and hold up two fingers, and a thunderbolt jumps between them accompanied by a loud crackle.  Your hair stands on end as lightning travels down your arm, filling the air with the scent of ozone.  As the light from the crystal fades, leaving it dull and colorless, your skin tingles.",
        "popup": true
      },
      { "u_add_trait": "ELECTROKINETIC" },
      { "u_add_trait": "ELECTRO_SHIELD" },
      { "u_add_effect": "effect_electrokin_zap_enemies", "duration": "5 minutes" },
      { "run_eocs": "EOC_TEACH_ELECTROKIN_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_ELECTRO_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTRO_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  As it fills your vision, your muscles tremble.  You see bursts of internal lightning traveling down your limbs for a moment, and then your muscles seize up in a sudden shower of internal sparks.  As the crystal's light fades you crash to the floor.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_ELECTRO_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PHOTOKIN_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "PHOTOKINETIC" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 5 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_PHOTOKIN_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PHOTOKIN_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_PHOTOKIN_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_PHOTOKIN_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PHOTOKIN_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "PHOTOKINETIC" },
    "effect": [ { "run_eocs": "EOC_PHOTOKIN_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_PHOTOKIN_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PHOTOKIN_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  The crystal's inner light gradually intensifies, starting by revealing the hidden details of your surroundings and then unveiling the world in vivid clarity.  It's not merely light, but a gentle luminescence that emanates a tranquil warmth.  The air around you becomes suffused with a subtle, almost otherworldly radiance, as if you're witnessing a scene from a dream.  Within this radiant spectacle, subtle patterns of light perform an elegant dance, and you find yourself captivated by their graceful movements.  You reach out your free hand, allowing your fingers to interact with the delicate light which seems to respond to your thoughts, and as the crystal's glow ultimately dissipates into obscurity, you're left with a lingering sense of wonder.",
        "popup": true
      },
      { "u_add_trait": "PHOTOKINETIC" },
      { "u_add_trait": "PHOTO_EYES" },
      { "u_add_effect": "effect_photokin_arms", "duration": "5 minutes" },
      { "u_add_effect": "effect_photokin_invisibility", "duration": "5 minutes" },
      { "queue_eocs": "EOC_PHOTOKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "run_eocs": "EOC_TEACH_PHOTOKIN_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_PHOTOKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PHOTOKIN_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  You start emanating light, but as time progresses, it hardens around your skin and tightens, causing you pain, its brightness leaving your head pounding and your eyes burning.  As the light fades you look once more into the crystal, realizing it is now dark.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 5 },
      { "queue_eocs": "EOC_PHOTOKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PYROKIN_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "PYROKINETIC" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_PYROKIN_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PYROKIN_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_PYROKIN_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_PYROKIN_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PYROKIN_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "PYROKINETIC" },
    "effect": [ { "run_eocs": "EOC_PYROKIN_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_PYROKIN_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PYROKIN_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  The crystal begins glowing, the faint light at its core gradually brightening, first shedding light on your surroundings and then throwing everything into sharp relief.  As it blazes in your hands, it begins growing slowly warmer.  The warmth spreads down your arms and across your entire body, filling it with a comfortable heat, and then the air around you takes on the heat and the light.  The air wavers like a summer haze, but even as it sparks and flames dance on the air, you feel only a comfortable warmth.  You reach out your free hand, letting the fire play between your fingers, and when the crystal's glow dims and fades into nothingness, you don't even notice it.",
        "popup": true
      },
      { "u_add_trait": "PYROKINETIC" },
      { "u_add_trait": "PYROKIN_ADAPTATION" },
      { "u_add_effect": "effect_pyrokinetic_cloak", "duration": "5 minutes" },
      { "u_add_effect": "effect_pyrokinetic_aura", "duration": "5 minutes" },
      { "run_eocs": "EOC_TEACH_PYROKIN_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_PYROKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PYROKIN_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  You feel a pleasant heat in your veins, but as you look down at your hands, the heat turns into a searing pain.  The crystal flashes once, the light drives spikes into your brain, and then goes dark.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 },
      { "queue_eocs": "EOC_PYROKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEKIN_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "TELEKINETIC" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_TELEKIN_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEKIN_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_TELEKIN_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_TELEKIN_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEKIN_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "TELEKINETIC" },
    "effect": [ { "run_eocs": "EOC_TELEKIN_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_TELEKIN_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEKIN_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  You release your grasp on the crystal but it doesn't fall.  It floats, supported on nothingness, and as you watch it you become aware of the connections between objects. Gravity, attraction and repulsion, reveal themselves--you can see the weakened influence of gravity on the crystal, and with a thought you nudge it slightly.  The crystal floats up in the air, stretching the connections between it at the ground, before they adjust to its new place.  You tug on the connections, rotating the crystal, moving it from left to right, and as the light within it slowly fades away, you let go and the crystal drops back to your hand.",
        "popup": true
      },
      { "u_add_trait": "TELEKINETIC" },
      { "u_add_trait": "TELEKINETIC_LIFTER_1" },
      { "u_add_effect": "effect_telekinetic_armor", "duration": "1 minutes" },
      { "run_eocs": "EOC_TEACH_TELEKIN_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_TELEKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEKIN_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It slowly rises in the air, the light pulsing gently, before it freezes in place.  The crystal suddenly starts strobing, each pulse of light a dagger in your brain, and as you grab your temples the now-dark crystal falls to the ground.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 },
      { "queue_eocs": "EOC_TELEKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TEEP_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "TELEPATH" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_TEEP_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TEEP_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_TEEP_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_TEEP_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TEEP_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "TELEPATH" },
    "effect": [ { "run_eocs": "EOC_TEEP_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_TEEP_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TEEP_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  In the light, you can see yourself, standing there holding a glowing crystal, in which you can see another light and a tiny version of yourself in an endless hall of mirrors.  Time slows down--you decide to move your hand and you can feel the thought form in your brain and the signal travel through your nerves to your spine and then on your hands, and you watch as the motion finally occurs.  The light grows brighter as you stand outside yourself observing your own thoughts, and as you feel your attention being drawn to the light, you reach out, nudge your own mind, your awareness of yourself sharpens into laser focus.  As the light and the vision fades, leaving the crystal dull and nearly lifeless, you turn your full attention--FULL attention--to your next task.",
        "popup": true
      },
      { "u_add_trait": "TELEPATH" },
      { "u_add_trait": "TELEPATHIC_SUGGESTION" },
      { "u_add_effect": "effect_telepathic_learning_bonus", "duration": "1 minutes" },
      { "run_eocs": "EOC_TEACH_TELEPATH_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_TELEPATH_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TEEP_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  In the light, you can see yourself, standing there holding a glowing crystal, and then there's a flare of light and you close your eyes against its intensity.  Your head pounds, and when you manage to open your eyes again, the crystal is dark.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 5 },
      { "queue_eocs": "EOC_TELEPATH_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEPORT_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "TELEPORTER" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_TELEPORT_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEPORT_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_TELEPORT_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_TELEPORT_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEPORT_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "TELEPORTER" },
    "effect": [ { "run_eocs": "EOC_TELEPORT_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_TELEPORT_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEPORT_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  As the light spreads and illuminates the surrounding terrain, the air shimmers slightly.  You can see your bedroom, in the place you've been holed up after the end of the world; you can see a city, with buildings made of greenish soapstone and people whose bodies are faces are merely indistinct shadows; you can see the cafe you always used to hang out in, empty and ruined, with the door back in back thumping rhythmically as something pounds on it; you can see a point of light, floating in the midst of a starry void, and hear a reedy toneless hum.  You see the paths that link all four of these places and an infinite number of others, glowing paths that you could easy follow in directions you had never previously known existed.  The light in the crystal fades as you set one foot on a path.",
        "popup": true
      },
      { "u_add_trait": "TELEPORTER" },
      { "u_add_trait": "TELEPORTER_PROTECT" },
      {
        "u_cast_spell": { "id": "teleport_blink_monster", "message": "Reality suddenly warps around you and you are somewhere else!" }
      },
      { "run_eocs": "EOC_TEACH_TELEPORT_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_TELEPORT_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_TELEPORT_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  As the light spreads and illuminates the surrounding terrain, the air shimmers slightly.  Images appear, locations and times, all overlapping in a kaleidoscope of color and sound that makes your head throb.  You tear your gaze away from the now-dark crystal but the pounding in your head remains.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 },
      { "queue_eocs": "EOC_TELEPORT_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_MATRIX_AWAKENING",
    "condition": { "u_has_trait": "VITAKINETIC" },
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  It starts pulsing, first slowly and more rapidly, and your head starts pounding in time with the light.  You tear your gaze away but the pounding in your head remains."
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ],
    "false_effect": [
      { "math": [ "u_awakening_reducer", "=", "(matrix_awakening_odds(u_awakening_countup))" ] },
      { "run_eocs": "EOC_VITAKIN_MATRIX_AWAKENING_2" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_MATRIX_AWAKENING_2",
    "condition": { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } },
    "effect": [ { "run_eocs": "EOC_VITAKIN_MATRIX_AWAKENING_SUCCESS" } ],
    "false_effect": [ { "run_eocs": "EOC_VITAKIN_MATRIX_AWAKENING_FAILURE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_MATRIX_AWAKENING_3",
    "condition": { "u_has_trait": "VITAKINETIC" },
    "effect": [ { "run_eocs": "EOC_VITAKIN_MATRIX_AWAKENING_FAILURE" } ],
    "false_effect": [ { "run_eocs": "EOC_VITAKIN_MATRIX_AWAKENING_SUCCESS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_MATRIX_AWAKENING_SUCCESS",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  You become aware of your skin, of every cut and bruise and scrape, of the food sitting in your stomach and the air moving in and out of your lungs.  You can feel the bits of smoke in the air from the all the fires unleashed by the Cataclysm, the bits of dirt and debris in your wounds, of the char in your food.  Not quite knowing how, you reach out and push at it, all the dirt and grime and filth of daily life in the Cataclysm, sealing it away.  You instantly feel better, like a weight you didn't realize you were carrying has been taken off your shoulders, and as the light from the crystal dims and goes dark you stand up straight.  You're going to be alright.",
        "popup": true
      },
      { "u_add_trait": "VITAKINETIC" },
      { "u_add_trait": "VITAKINETIC_HEALTH" },
      { "u_add_effect": "effect_vita_health", "duration": "5 minutes" },
      { "run_eocs": "EOC_TEACH_VITAKIN_CONTEMPLATE_RECIPES" },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_VITAKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_VITAKIN_MATRIX_AWAKENING_FAILURE",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  In the light, you can see yourself, standing there holding a glowing crystal, and then there's a flare of light and you close your eyes against its intensity.  Your head pounds, and when you manage to open your eyes again, the crystal is dark.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 },
      { "queue_eocs": "EOC_VITAKIN_CRYSTAL_DRAINING", "time_in_future": "1 seconds" },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_DRAINED_MATRIX",
    "effect": [
      {
        "u_message": "You gaze into the strange crystal and the light slowly grows brighter.  You become aware of your skin, of every cut and bruise and scrape, of the food sitting in your stomach and the air moving in and out of your lungs.  The sensation grows rapidly until your stomach feels like it will burst and every brush of clothing on your skin is like rasping sandpaper.  As the light fades from the crystal, a searing pains fills your head.",
        "popup": true
      },
      { "u_add_effect": "psionic_overload", "duration": "1 hours" },
      { "u_add_effect": "stunned", "duration": 10 }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_CORUSCATING_MATRIX",
    "effect": [
      {
        "weighted_list_eocs": [
          [ "EOC_BIOKIN_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_CLAIR_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_ELECTRO_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_PHOTOKIN_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_PYROKIN_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_TELEKIN_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_TEEP_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_TELEPORT_MATRIX_AWAKENING_3", 1 ],
          [ "EOC_VITAKIN_MATRIX_AWAKENING_3", 1 ]
        ]
      },
      { "u_assign_activity": "ACT_CRYSTAL_AWAKENING_MEDITATION", "duration": 5 },
      { "queue_eocs": "EOC_CORUSCATING_CRYSTAL_DRAINING", "time_in_future": "1 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_STORM_PSION_AWAKENING_DISTANT",
    "global": true,
    "recurrence": [ "5 minutes", "10 minutes" ],
    "condition": {
      "and": [
        "u_is_outside",
        { "is_weather": "distant_portal_storm" },
        { "not": { "u_has_worn_with_flag": "PORTAL_PROOF" } },
        { "not": { "u_has_effect": "sleep" } }
      ]
    },
    "deactivate_condition": { "not": { "is_weather": "distant_portal_storm" } },
    "effect": [
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] },
      {
        "switch": { "global_val": "var", "var_name": "ps_str" },
        "cases": [
          {
            "case": 1,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 110 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 2,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 90 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 3,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 70 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 4,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 60 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 5,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 45 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 6,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 30 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 8,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 25 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 10,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 20 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 15,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 10 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          }
        ]
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_STORM_PSION_AWAKENING_MEDIUM",
    "global": true,
    "recurrence": [ "2 minutes", "5 minutes" ],
    "condition": {
      "and": [
        "u_is_outside",
        { "is_weather": "portal_storm" },
        { "not": { "u_has_worn_with_flag": "PORTAL_PROOF" } },
        { "not": { "u_has_effect": "sleep" } }
      ]
    },
    "deactivate_condition": { "not": { "is_weather": "portal_storm" } },
    "effect": [
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] },
      {
        "switch": { "global_val": "var", "var_name": "ps_str" },
        "cases": [
          {
            "case": 1,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 120 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 2,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 90 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 3,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 70 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 4,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 60 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 5,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 45 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 6,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 30 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 8,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 25 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 10,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 20 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 15,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 10 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          }
        ]
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_STORM_PSION_AWAKENING_CLOSE",
    "global": true,
    "recurrence": [ "1 minutes", "2 minutes" ],
    "condition": {
      "and": [
        "u_is_outside",
        { "is_weather": "close_portal_storm" },
        { "not": { "u_has_worn_with_flag": "PORTAL_PROOF" } },
        { "not": { "u_has_effect": "sleep" } }
      ]
    },
    "deactivate_condition": { "not": { "is_weather": "close_portal_storm" } },
    "effect": [
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] },
      {
        "switch": { "global_val": "var", "var_name": "ps_str" },
        "cases": [
          {
            "case": 1,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 120 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 2,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 90 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 3,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 70 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 4,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 60 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 5,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 45 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 6,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 30 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 8,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 25 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 10,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 20 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          },
          {
            "case": 15,
            "effect": {
              "weighted_list_eocs": [
                [ "EOC_PORTAL_NULL_AWAKENING", { "const": 10 } ],
                [ "EOC_PORTAL_BIOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_CLAIR_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_ELECTRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PHOTOKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PYRO_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TELEKIN_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_TEEP_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_PORTER_AWAKENING", { "const": 1 } ],
                [ "EOC_PORTAL_VITA_AWAKENING", { "const": 1 } ]
              ]
            }
          }
        ]
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_NULL_AWAKENING",
    "effect": [ { "u_message": "" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_BIOKIN_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "BIOKINETIC" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  New strength and vigor suddenly fill you.  You stand up straight and tall, heedless of the wind and the kaleidoscoping sky, and clench your fists.  You feel like you could take on the world, like you could sprint for an hour without stopping, like you could wrestle one of those giant insects to the ground and pin it, like you could dodge bullets.  You unclench your fists and shake your head, but the sense of strength remains.",
        "popup": true
      },
      { "u_add_trait": "BIOKINETIC" },
      { "u_add_trait": "BIOKIN_NEEDS" },
      { "run_eocs": "EOC_TEACH_BIOKIN_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as your muscles begin cramping uncontrollably.  They suddenly seize up and you collapse to the ground, staring up at the sky, unable to move."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "effect_biokin_overload", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "u_add_effect": "downed", "duration": { "math": [ "ps_str * u_val('time: 5 s')" ] } },
      { "u_add_effect": "motor_seizure", "duration": { "math": [ "ps_str * u_val('time: 5 s')" ] } },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_CLAIR_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "CLAIRSENTIENT" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  You close your eyes but you can still see--at first just a light against your eyelids, then like a train approaching the end of a tunnel, light expands and reveals your surroundings.  You can see in all directions.  You can see behind and beneath every blade of grass around you, illuminated in the storm's witchlight, for a moment until your awareness snaps back into your body and you reel back with the shock of it.  When you open your eyes again, the colors around you are brighter and the sounds are clearer than before.",
        "popup": true
      },
      { "u_add_trait": "CLAIRSENTIENT" },
      { "u_add_trait": "CLAIR_SENSES" },
      { "run_eocs": "EOC_TEACH_CLAIR_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as your vision wavers.  The sky grows bright, and then dark.  Sounds fade away before roaring in your ears, and then the entire world suddenly vanishes, leaving you in silent darkness."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "hallu", "duration": { "math": [ "ps_str * u_val('time: 3 h')" ] } },
      { "u_add_effect": "blind_clair_overload", "duration": { "math": [ "ps_str * u_val('time: 15 s')" ] } },
      { "u_add_effect": "deaf_clair_overload", "duration": { "math": [ "ps_str * u_val('time: 15 s')" ] } },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_ELECTRO_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "ELECTROKINETIC" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Multi-colored lightning flashes across the sky and then freezes.  The lightning expands in your sight, until you can see individual electrons tracing their paths through the air. You reach out a hand and some of the electrons change their path, and as the world restarts its motion the lightning crashes into you and through you to the ground.  A few sparks remain, dancing across your hand, and as you flex your fingers lightning crackles between them.",
        "popup": true
      },
      { "u_add_trait": "ELECTROKINETIC" },
      { "u_add_trait": "ELECTRO_SHIELD" },
      { "run_eocs": "EOC_TEACH_ELECTROKIN_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Multi-colored lightning flashes across the sky, first once and then again, then faster and faster until the thunder comes *before* the lightning.  Bolts crash into the ground around you and suddenly one strikes the ground right next to you, hurling you off your feet."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "effect_electrokin_overload", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "run_eocs": "EOC_ELECTRO_OVERLOAD_ZAP" },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_PHOTOKIN_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "PHOTOKINETIC" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  As you stand there, a sudden warmth envelops your being, far more radiant than the most brilliant of suns.  It begins as a subtle glow deep within, and then it intensifies, growing brighter and brighter, until your entire consciousness is bathed in the incandescent brilliance.  As the light fades, you notice the world is painted in more colors than you ever noticed before, the light seems to respond to your every thought.",
        "popup": true
      },
      { "u_add_trait": "PHOTOKINETIC" },
      { "u_add_trait": "PHOTO_EYES" },
      { "u_add_effect": "effect_photokin_arms", "duration": "5 minutes" },
      { "u_add_effect": "effect_photokin_invisibility", "duration": "5 minutes" },
      { "run_eocs": "EOC_TEACH_PHOTOKIN_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as your vision blurs.  Your vision is filled with light, twisting distance and making it impossible to judge your surroundings, and you fall to your knees as you struggle to resist the searing headache and disorientation of the ever-shifting light."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "downed", "duration": { "math": [ "ps_str * u_val('time: 3 s')" ] } },
      {
        "u_add_effect": "effect_photokin_myopia_overload",
        "duration": { "math": [ "ps_str * u_val('time: 10 m')" ] }
      },
      {
        "u_add_effect": "effect_photokin_lumination_overload",
        "duration": { "math": [ "ps_str * u_val('time: 20 m')" ] }
      },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_PYRO_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "PYROKINETIC" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  You stretch out your hand toward the shattering sky and a glow gathers around it as the air itself begins to shine.  The glow brightens and then flames arise, dancing on the open area above your palm.  You move your hand and the flames move with it, swirling around you, and with a final wave they scatter into the air.  The glow fades, but the sensation of heat remains.",
        "popup": true
      },
      { "u_add_trait": "PYROKINETIC" },
      { "u_add_trait": "PYROKIN_ADAPTATION" },
      { "run_eocs": "EOC_TEACH_PYROKIN_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as your skin prickles.  The air grows warm, then hot, and sweat springs from every pore.  The air around you takes on a lambent glow as the heat continues to rise, until your muscles give out and you collapse to your knees."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "effect_pyrokin_overload", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "u_add_effect": "downed", "duration": { "math": [ "ps_str * u_val('time: 1 s')" ] } },
      { "u_set_field": "fd_hot_air3", "outdoor_only": true },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_TELEKIN_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "TELEKINETIC" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  You look around for shelter, but you're out in the open.  You reach down toward the ground but the ground starts rising--bits of grass and rock and dirt lifting up and swirling around you.  The roar in your head grows louder as you slowly rise off the ground, the debris around you whirling faster and faster, until the your mind suddenly stills and you collapse back to the earth with a thump.  The pebbles around start to fall--but one catches your eye, and as you look at it, it stops and hovers in the air for a moment.",
        "popup": true
      },
      { "u_add_trait": "TELEKINETIC" },
      { "u_add_trait": "TELEKINETIC_LIFTER_1" },
      { "run_eocs": "EOC_TEACH_TELEKIN_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as you stagger.  The very air seems to press down on you, its weight growing steadily more oppressive.  Every step takes more effort than a sprint.  You concentrate on putting one foot in front of the other but it takes almost all of your concentration to do so."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "effect_telekin_overload", "duration": { "math": [ "ps_str * u_val('time: 30 m')" ] } },
      { "u_add_effect": "downed", "duration": { "math": [ "ps_str * u_val('time: 1 s')" ] } },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_TEEP_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "TELEPATH" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  A babble of voices, male, female, neither, both, and some not human at all, speaking to you.  The world is rapidly dying.  The dead and the fungus and the plants will fight over what remains and there will be nothing left for humanity.  Stay out here, where realities converge and walk into a better tomorrow.  As the voices blend together, the volume rising, you reach inside your own mind somehow and twist--and are greeted with blessed silence.  Though the portal storm still rages, internally you are calm.",
        "popup": true
      },
      { "u_add_trait": "TELEPATH" },
      { "u_add_trait": "TELEPATHIC_SUGGESTION" },
      { "run_eocs": "EOC_TEACH_TELEPATH_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as whispers begin.  First only a murmur, steadily growing louder and louder until they grow into a cacophony of voices.  You hear pleas for mercy, screams of agony, cries of rage and sorrow, all mixed together in an avalache of sound that drives you to your knees as you clutch your ears to shut them out.  It doesn't help."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "nightmares", "duration": { "math": [ "ps_str * u_val('time: 4 h')" ] } },
      { "u_add_effect": "disrupted_sleep", "duration": { "math": [ "ps_str * u_val('time: 4 h')" ] } },
      { "u_add_effect": "downed", "duration": { "math": [ "ps_str * u_val('time: 1 s')" ] } },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_PORTER_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "TELEPORTER" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Reality grows thin--you can see the ground beneath your hand. You can see the spaces between molecules, larger by far than the distances at a macro scale.  You see the paths you could take to slip between them, to traverse space in an instant without any obstacles in your path.  As the distances collapse back and reality grows solid once again, that knowledge remains with you.",
        "popup": true
      },
      { "u_add_trait": "TELEPORTER" },
      { "u_add_trait": "TELEPORTER_PROTECT" },
      { "run_eocs": "EOC_TEACH_TELEPORT_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as your vision wavers.  The world seems to grow far away, then close, and you stumble as your legs can't seem to tell where the ground is.  As you recover and look up, you find yourself somewhere else."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "effect_portal_storm_teleport", "duration": { "math": [ "ps_str * u_val('time: 20 s')" ] } },
      { "u_add_effect": "downed", "duration": { "math": [ "ps_str * u_val('time: 1 s')" ] } },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_PORTAL_VITA_AWAKENING",
    "condition": {
      "and": [
        { "not": { "u_has_trait": "VITAKINETIC" } },
        { "not": { "u_has_effect": "psionic_awakened" } },
        { "x_in_y_chance": { "x": { "math": [ "100 - u_awakening_reducer" ] }, "y": 100 } }
      ]
    },
    "effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  For a moment, you can feel the blood flowing in your veins, every blood cell traveling through your body on its way to your cells.  You can feel the oxygen in your lungs cross through into your blood.  The howling of the portal storm pulses in time with your heartbeat for a moment before your awareness fades, but a lingering trace of it remains in the back of your mind.",
        "popup": true
      },
      { "u_add_trait": "VITAKINETIC" },
      { "u_add_trait": "VITAKINETIC_HEALTH" },
      { "run_eocs": "EOC_TEACH_VITAKIN_CONTEMPLATE_RECIPES" },
      { "u_add_effect": "psionic_awakened", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "math": [ "u_awakening_countup", "+=", "1" ] },
      { "math": [ "u_awakening_reducer", "=", "(portal_storm_awakening_odds(u_awakening_countup))" ] }
    ],
    "false_effect": [
      {
        "u_message": "A roar fills your mind, louder even than the screaming madness of the portal storm.  Your head pounds in time with the kaleidoscoping sky as the beating of your heart thuds in your ears.  You can feel the blood rushing through your veins, warmth slowly spreading through your body, and a sensation of heat that gets stronger and stronger until it becomes an feverish itching across your entire body, driving you to your knees."
      },
      { "u_add_effect": "psionic_overload", "duration": { "math": [ "ps_str * u_val('time: 1 h')" ] } },
      { "u_add_effect": "flu", "duration": { "math": [ "ps_str * u_val('time: 4 h')" ] } },
      { "u_add_effect": "effect_vitakin_overload", "duration": { "math": [ "ps_str * u_val('time: 2 h')" ] } },
      { "u_add_effect": "downed", "duration": { "math": [ "ps_str * u_val('time: 3 s')" ] } },
      { "math": [ "u_val('stamina')", "-=", "4000" ] }
    ]
  }
]
