[
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_MAIN",
    "responses": [
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_animist" } }, { "u_has_trait": "ANIMIST" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_animist>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_ANIMIST"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_magus" } }, { "u_has_trait": "MAGUS" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_magus>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_MAGUS"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_stormshaper" } }, { "u_has_trait": "STORMSHAPER" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_stormshaper>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_STORMSHAPER"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_kelvinist" } }, { "u_has_trait": "KELVINIST" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_kelvinist>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_KELVINIST"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_earthshaper" } }, { "u_has_trait": "EARTHSHAPER" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_earthshaper>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_EARTHSHAPER"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_technomancer" } }, { "u_has_trait": "TECHNOMANCER" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_technomancer>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_TECHNOMANCER"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_druid" } }, { "u_has_trait": "DRUID" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_druid>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_DRUID"
      },
      {
        "condition": { "and": [ { "not": { "u_has_trait": "perk_caster_level_up_biomancer" } }, { "u_has_trait": "BIOMANCER" } ] },
        "text": "Gain [<trait_name:perk_caster_level_up_biomancer>]",
        "topic": "TALK_PERK_MENU_CASTER_LEVEL_UP_BIOMANCER"
      }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_ANIMIST",
    "dynamic_line": "<trait_name:perk_caster_level_up_animist>: \"<trait_description:perk_caster_level_up_animist>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_animist" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_MAGUS",
    "dynamic_line": "<trait_name:perk_caster_level_up_magus>: \"<trait_description:perk_caster_level_up_magus>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_magus" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_STORMSHAPER",
    "dynamic_line": "<trait_name:perk_caster_level_up_stormshaper>: \"<trait_description:perk_caster_level_up_stormshaper>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_stormshaper" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_KELVINIST",
    "dynamic_line": "<trait_name:perk_caster_level_up_kelvinist>: \"<trait_description:perk_caster_level_up_kelvinist>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_kelvinist" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_EARTHSHAPER",
    "dynamic_line": "<trait_name:perk_caster_level_up_earthshaper>: \"<trait_description:perk_caster_level_up_earthshaper>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_earthshaper" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_TECHNOMANCER",
    "dynamic_line": "<trait_name:perk_caster_level_up_technomancer>: \"<trait_description:perk_caster_level_up_technomancer>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_technomancer" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_DRUID",
    "dynamic_line": "<trait_name:perk_caster_level_up_druid>: \"<trait_description:perk_caster_level_up_druid>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_druid" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  },
  {
    "type": "talk_topic",
    "id": "TALK_PERK_MENU_CASTER_LEVEL_UP_BIOMANCER",
    "dynamic_line": "<trait_name:perk_caster_level_up_biomancer>: \"<trait_description:perk_caster_level_up_biomancer>\"",
    "responses": [
      {
        "text": "Select Perk.",
        "topic": "TALK_PERK_MENU_MAIN",
        "condition": { "math": [ "u_num_perks > 0" ] },
        "failure_topic": "TALK_PERK_MENU_FAIL",
        "effect": [ { "u_add_trait": "perk_caster_level_up_biomancer" }, { "math": [ "u_num_perks--" ] } ]
      },
      { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" },
      { "text": "Quit.", "topic": "TALK_DONE" }
    ]
  }
]
