[
  {
    "id": "masonrysaw_off",
    "type": "ITEM",
    "subtypes": [ "TOOL" ],
    "name": { "str": "masonry saw (off)", "str_pl": "masonry saws (off)" },
    "description": "A construction tool for cutting through concrete or other surfaces.  It runs on gasoline.  Using this item will cause it to turn on, turning it into a very powerful but unwieldy melee weapon or a terrible chainsaw.",
    "weight": "4500 g",
    "volume": "2500 ml",
    "longest_side": "25 cm",
    "price": "80 USD",
    "price_postapoc": "5 USD",
    "to_hit": { "grip": "solid", "length": "long", "surface": "line", "balance": "clumsy" },
    "material": [ "steel", "plastic" ],
    "symbol": "/",
    "color": "blue",
    "pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "gasoline": 450 }, "watertight": true, "rigid": true } ],
    "charges_per_use": 5,
    "techniques": [ "SWEEP" ],
    "use_action": {
      "type": "effect_on_conditions",
      "menu_text": "Turn on",
      "effect_on_conditions": [
        {
          "id": "EOC_toolweapon_activate__masonrysaw",
          "condition": { "math": [ "rng(0, 10) - n_damage_level() > 5" ] },
          "effect": {
            "run_eocs": "EOC_toolweapon_activate",
            "variables": {
              "turn_cost": "0.8",
              "transform_target": "masonrysaw_on",
              "success_message": { "i18n": true, "str": "With a roar, the <npc_name> screams to life!" },
              "volume": "20",
              "failure_message": { "i18n": true, "str": "You yank the cord, but nothing happens." }
            }
          },
          "false_effect": { "u_message": "You yank the cord, but nothing happens." }
        }
      ]
    },
    "flags": [ "NONCONDUCTIVE", "FRAGILE_MELEE" ],
    "melee_damage": { "bash": 4 },
    "tool_ammo": [ "gasoline" ]
  },
  {
    "id": "masonrysaw_on",
    "copy-from": "masonrysaw_off",
    "type": "ITEM",
    "subtypes": [ "TOOL" ],
    "name": { "str": "masonry saw (on)", "str_pl": "masonry saws (on)" },
    "description": "This masonry saw is on and making a lot of noise.  Use it to turn it off.",
    "to_hit": { "grip": "solid", "length": "long", "surface": "line", "balance": "clumsy" },
    "turns_per_charge": 4,
    "charges_per_use": 0,
    "revert_to": "masonrysaw_off",
    "techniques": [ "SWEEP" ],
    "qualities": [ [ "AXE", 3 ], [ "BUTCHER", -100 ] ],
    "use_action": {
      "type": "effect_on_conditions",
      "menu_text": "Turn off",
      "ammo_scale": 0,
      "effect_on_conditions": [
        {
          "id": "EOC_toolweapon_deactivate__masonrysaw",
          "effect": { "run_eocs": "EOC_toolweapon_deactivate", "variables": { "transform_target": "masonrysaw_off" } }
        }
      ]
    },
    "tick_action": {
      "type": "effect_on_conditions",
      "effect_on_conditions": [
        {
          "id": "EOC_toolweapon_running__masonrysaw",
          "effect": {
            "run_eocs": "EOC_toolweapon_running",
            "variables": {
              "sound_chance": "15",
              "sound_message": { "i18n": true, "str": "Your masonry saw buzzes." },
              "volume": "7",
              "revert_to": "masonrysaw_off"
            }
          }
        }
      ]
    },
    "flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE", "POWERED", "FRAGILE_MELEE" ],
    "melee_damage": { "bash": 4, "cut": 10 }
  },
  {
    "id": "electric_masonrysaw_off",
    "type": "ITEM",
    "subtypes": [ "TOOL" ],
    "name": { "str": "electric masonry saw (off)", "str_pl": "electric masonry saws (off)" },
    "description": "A construction tool for cutting through concrete or other surfaces.  It uses electric motor with integrated battery and is compatible with a UPS.  Using this item will cause it to turn on, turning it into a very powerful but unwieldy melee weapon or a terrible chainsaw.",
    "weight": "4500 g",
    "volume": "2500 ml",
    "longest_side": "25 cm",
    "price": "80 USD",
    "price_postapoc": "5 USD",
    "to_hit": { "grip": "solid", "length": "long", "surface": "line", "balance": "clumsy" },
    "material": [ "steel", "plastic" ],
    "symbol": "/",
    "color": "blue",
    "pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "battery": 2970 }, "rigid": true } ],
    "charges_per_use": 5,
    "techniques": [ "SWEEP" ],
    "use_action": [
      { "target": "electric_masonrysaw_on", "msg": "You turn on the masonry saw.", "active": true, "type": "transform" },
      {
        "type": "link_up",
        "menu_text": "Plug in / Unplug",
        "ammo_scale": 0,
        "cable_length": 33,
        "charge_rate": "2200 W"
      }
    ],
    "flags": [ "NONCONDUCTIVE", "FRAGILE_MELEE", "USE_UPS", "NO_UNLOAD", "NO_RELOAD", "WATER_BREAK", "ELECTRONIC" ],
    "faults": [ { "fault_group": "electronic_general" } ],
    "melee_damage": { "bash": 4 },
    "tool_ammo": [ "battery" ]
  },
  {
    "id": "electric_masonrysaw_on",
    "copy-from": "electric_masonrysaw_off",
    "type": "ITEM",
    "subtypes": [ "TOOL" ],
    "name": { "str": "electric masonry saw (on)", "str_pl": "electric masonry saws (on)" },
    "description": "This electric masonry saw is on and making a lot of noise.  Use it to turn it off.",
    "to_hit": { "grip": "solid", "length": "long", "surface": "line", "balance": "clumsy" },
    "//1": "I don't know whether we are allowed to have less than 1 turn per charge. Based on 13.2 to 1 conversion rate between",
    "//2": "epower and gasoline (according to jackhammer tools) it would be 0.3 turns per charge.",
    "turns_per_charge": 1,
    "charges_per_use": 0,
    "revert_to": "electric_masonrysaw_off",
    "techniques": [ "SWEEP" ],
    "qualities": [ [ "AXE", 3 ], [ "BUTCHER", -100 ] ],
    "use_action": [
      {
        "type": "effect_on_conditions",
        "menu_text": "Turn off",
        "ammo_scale": 0,
        "effect_on_conditions": [
          {
            "id": "EOC_toolweapon_deactivate__electric_masonrysaw",
            "effect": { "run_eocs": "EOC_toolweapon_deactivate", "variables": { "transform_target": "electric_masonrysaw_off" } }
          }
        ]
      },
      {
        "type": "link_up",
        "menu_text": "Plug in / Unplug",
        "ammo_scale": 0,
        "cable_length": 33,
        "charge_rate": "2200 W"
      }
    ],
    "tick_action": {
      "type": "effect_on_conditions",
      "effect_on_conditions": [
        {
          "id": "EOC_toolweapon_running__electric_masonrysaw",
          "effect": {
            "run_eocs": "EOC_toolweapon_running",
            "variables": {
              "sound_chance": "15",
              "sound_message": { "i18n": true, "str": "Your electric masonry saw buzzes." },
              "volume": "7",
              "revert_to": "electric_masonrysaw_off"
            }
          }
        }
      ]
    },
    "flags": [
      "MESSY",
      "TRADER_AVOID",
      "NONCONDUCTIVE",
      "POWERED",
      "FRAGILE_MELEE",
      "USE_UPS",
      "NO_UNLOAD",
      "NO_RELOAD",
      "WATER_BREAK",
      "ELECTRONIC"
    ],
    "faults": [ { "fault_group": "electronic_general" } ],
    "melee_damage": { "bash": 4, "cut": 10 }
  },
  {
    "type": "ITEM",
    "id": "grinder_blade",
    "symbol": "/",
    "color": "dark_gray",
    "name": { "str": "grinder blade" },
    "description": "A 125 mm angle grinder blade.  You could make a power tool with it, or throw it.  Wielding it without sturdy gloves is a bad idea.",
    "category": "spare_parts",
    "price": "20 cent",
    "price_postapoc": "5 USD",
    "material": [ "steel" ],
    "weight": "349 g",
    "volume": "250 ml",
    "flags": [ "HURT_WHEN_WIELDED" ],
    "to_hit": { "grip": "bad", "length": "hand", "surface": "line", "balance": "neutral" },
    "melee_damage": { "cut": 14 }
  }
]
