"AutomatonItem"
  {
    viewId = { "trap_item" }
    name = "automaton"
    applyMsgFirstPerson = "assemble the automaton"
    applyMsgThirdPerson = "assembles an automaton"
    applySound = "TRAP_ARMING"
    weight = 30
    applyTime = 3
    uses = 1
    price = 60
    effect = SummonEnemy "AUTOMATON" {1} 100
    storageIds = {"automaton_parts" "equipment"}
  }
Def HUMANOID_HEAD(Suffix, Color, Adjective, ResourceId, Defense)
"HumanoidHead" + Suffix
  {
    viewId = { "automaton_head" Rgb Color 255 }
    name = Adjective + " humanoid head"
    shortName = "humanoid head"
    modifiers = {
      DEFENSE Defense
    }
    weight = 4
    craftingCost = ResourceId 5
    upgradeInfo = { AUTOMATONS_UPPER AssembledCreatureEffect
      Name "an " + Adjective + " humanoid head"
      Description "Allows using equipment."
      {
        MakeHumanoid
        AddBodyPart HEAD 1 none
        AddAutomatonPart 2 "humanoid" { "installed_head" Rgb Color 255 }
      }
    }
    upgradeType = {ARMOR}
    storageIds = {"automaton_parts" "equipment"}
  }
End
Def RANGED_HEAD(Suffix, Color, Adjective, ResourceId, Defense, Damage, Spell, SpellShort, SpellLower, SpellId, Attr)
Spell + "Head" + Suffix
  {
    viewId = { "automaton_" + SpellShort Rgb Color 255 }
    name = Adjective + " " + SpellLower + " head"
    shortName = SpellLower
    modifiers = {
      DEFENSE Defense
      Attr Damage
    }
    weight = 4
    craftingCost = ResourceId 5
    upgradeInfo = {
      type = AUTOMATONS_UPPER
      diminishModifier = Spell 0.5
      prefix = AssembledCreatureEffect
        Name Adjective + " head"
        Description "Grants the \"" + SpellId + "\" ability."
        {
          AddBodyPart HEAD 1 none
          GrantAbility SpellId
          AddAutomatonPart 2 SpellShort { "installed_" + SpellShort Rgb Color 255 }
        }
    }
    upgradeType = {ARMOR}
    storageIds = {"automaton_parts" "equipment"}
  }
End
Def SPELL_HEAD(Suffix, Color, Adjective, ResourceId, Defense, ViewId, SpellId, Spell, SpellLower)
Spell + "Head" + Suffix
  {
    viewId = { ViewId Rgb Color 255 }
    name = Adjective + " " + SpellLower + " head"
    shortName = SpellLower
    modifiers = {
      DEFENSE Defense
    }
    weight = 4
    craftingCost = ResourceId 5
    upgradeInfo = { AUTOMATONS_UPPER AssembledCreatureEffect
      Name Adjective + " " + SpellLower + " head"
      Description "Grants the \"" + SpellLower + "\" ability."
      {
        AddBodyPart HEAD 1 none
        GrantAbility SpellId
        AddAutomatonPart 2 SpellLower { "installed_spell" Rgb Color 255 }
      }
    }
    upgradeType = {ARMOR}
    storageIds = {"automaton_parts" "equipment"}
  }
End
Def LEGS(Suffix, Color, Adjective, ResourceId, Defense)
"AutomatonLegs" + Suffix
  {
    viewId = { "automaton_legs" Rgb Color 255 }
    name = "pair of " + Adjective + " legs"
    shortName = Adjective + " legs"
    modifiers = {
      DEFENSE Defense
    }
    weight = 8
    craftingCost = ResourceId 5
    upgradeInfo = { AUTOMATONS_LOWER AssembledCreatureEffect
      Name Adjective + " legs"
      Description "Adds mobility. Second pair grants the \"jump\" ability."
      {
        AddBodyPart LEG 2 none
        FirstSuccessful {
            RemovePermanent IMMOBILE
            GrantAbility "jump"
        }
        AddAutomatonPart 0 "" { "installed_legs" Rgb Color 255 }
      }
    }
    upgradeType = {ARMOR}
    storageIds = {"automaton_parts" "equipment"}
  }
End
Def ARMS(Suffix, Color, Adjective, ResourceId, Damage, Attr)
"AutomatonArms" + Suffix
  {
    viewId = { "automaton_arms" Rgb Color 255 }
    name = "pair of " + Adjective + " arms"
    shortName = Adjective + " arms"
    modifiers = {
      Attr Damage
    }
    weight = 6
    craftingCost = ResourceId 5
    upgradeInfo = {
      type = AUTOMATONS_UPPER
      diminishModifier = "arms" 0.5
      prefix = AssembledCreatureEffect
        Name Adjective + " arms"
        Description "Grants a melee attack."
        {
          AddBodyPart ARM 2 { Intrinsic { "fist_attack" } "fists" 4 {
            attackMsg = SWING
            meleeAttackAttr = Attr
          } }
          AddAutomatonPart 1 "melee" { "installed_arms" Rgb Color 255 }
        }
    }
    upgradeType = {WEAPON}
    storageIds = {"automaton_parts" "equipment"}
  }
End
Def DRILL(Suffix, Color, Adjective, ResourceId, Digging)
"AutomatonDrill" + Suffix
  {
    viewId = { "automaton_drill" Rgb Color 255 }
    name = Adjective + " drill"
    shortName = Adjective + " drill"
    modifiers = {
      DIGGING Digging
    }
    weight = 6
    craftingCost = ResourceId 5
    upgradeInfo = { AUTOMATONS_UPPER AssembledCreatureEffect
      Name "an " + Adjective + " drill"
      Description "A drill for automatons. Enables performing all worker tasks."
      {
        AddMinionTrait WORKER
        AddBodyPart ARM 2 none
        AddAutomatonPart 1 "drill" { "installed_drill" Rgb Color 255 }
      }
    }
    storageIds = {"automaton_parts" "equipment"}
  }
End
Def CRAFTING_ARMS(Suffix, Color, Adjective, ResourceId, Skill)
"AutomatonCrafting" + Suffix
  {
    viewId = { "automaton_crafting" Rgb Color 255 }
    name = Adjective + " crafting arms"
    modifiers = {
      WORKSHOP Skill
      FORGE Skill
      LABORATORY Skill
      JEWELER Skill
    }
    weight = 6
    craftingCost = ResourceId 5
    upgradeInfo = {
      type = AUTOMATONS_UPPER
      prefix = AssembledCreatureEffect
        Name Adjective + " crafting arms"
        Description "Grants the automaton the ability to craft."
        AddAutomatonPart 1 "crafting" { "installed_crafting" Rgb Color 255 }
    }
    storageIds = {"automaton_parts" "equipment"}
  }
End
Def REPAIR_ARMS(Suffix, Color, Adjective, ResourceId, Defense)
"RepairAutomatonArms" + Suffix
  {
    viewId = { "automaton_repair" Rgb Color 255 }
    name = "pair of " + Adjective + " repair arms"
    shortName = "repair arms"
    modifiers = {
      DEFENSE Defense
    }
    weight = 6
    craftingCost = ResourceId 5
    upgradeInfo = { AUTOMATONS_UPPER AssembledCreatureEffect
      Name Adjective + " repair arms"
      Description "Grants the ability to repair other automatons."
      {
        GrantAbility "repair automaton"
        AddBodyPart ARM 2 none
        AddAutomatonPart 1 "repair" { "installed_repair" Rgb Color 255 }
      }
    }
    storageIds = {"automaton_parts" "equipment"}
  }
End

HUMANOID_HEAD("Wood", 180 140 55, "wooden", WOOD, 2)
RANGED_HEAD("Wood", 180 140 55, "wooden", WOOD, 2, 12, "Archer", "arrow", "arrow shooting", "shoot arrow", "RANGED_DAMAGE")
LEGS("Wood", 180 140 55, "wooden", WOOD, 2)
ARMS("Wood", 180 140 55, "wooden", WOOD, 11, DAMAGE)
DRILL("Wood", 180 140 55, "wooden", WOOD, 10)
CRAFTING_ARMS("Wood", 180 140 55, "wooden", WOOD, 10)
HUMANOID_HEAD("Iron", 140 148 148, "iron", IRON, 4)
RANGED_HEAD("Iron", 140 148 148, "iron", IRON, 4, 15, "Archer", "arrow", "arrow shooting", "shoot arrow", "RANGED_DAMAGE")
RANGED_HEAD("Iron", 140 148 148, "iron", IRON, 5, 15, "Fire", "fire", "fire breathing", "fire breath", "FIRE_DAMAGE")
SPELL_HEAD("Iron", 140 148 148, "iron", IRON, 5, "automaton_oil", "oil breath", "Oil", "oil spitting")
RANGED_HEAD("Iron", 140 148 148, "iron", IRON, 5, 15, "Acid", "acid", "acid spitting", "acid stream", "ACID_DAMAGE")
LEGS("Iron", 140 148 148, "iron", IRON, 5)
ARMS("Iron", 140 148 148, "iron", IRON, 16, DAMAGE)
DRILL("Iron", 140 148 148, "iron", IRON, 15)
CRAFTING_ARMS("Iron", 140 148 148, "iron", IRON, 17)
REPAIR_ARMS("Iron", 140 148 148, "iron", IRON, 5)
HUMANOID_HEAD("Ada", 148 189 189, "admantine", ADA, 6)
RANGED_HEAD("Ada", 148 189 189, "adamantine", ADA, 6, 20, "Archer", "arrow", "arrow shooting", "shoot arrow", "RANGED_DAMAGE")
RANGED_HEAD("Ada", 148 189 189, "adamantine", ADA, 8, 20, "Fire", "fire", "fire breathing", "fire breath", "FIRE_DAMAGE")
SPELL_HEAD("Ada", 148 189 189, "adamantine", ADA, 8, "automaton_oil", "oil breath", "Oil", "oil spitting")
RANGED_HEAD("Ada", 148 189 189, "adamantine", ADA, 8, 20, "Acid", "acid", "acid spitting", "acid stream", "ACID_DAMAGE")
LEGS("Ada", 148 189 189, "adamantine", ADA, 8)
ARMS("Ada", 148 189 189, "adamantine", ADA, 24, DAMAGE)
DRILL("Ada", 148 189 189, "adamantine", ADA, 20)
CRAFTING_ARMS("Ada", 148 189 189, "adamantine", ADA, 27)
REPAIR_ARMS("Ada", 148 189 189, "adamantine", ADA, 8)
ARMS("Infernite", 220 148 148, "infernite", INFERNITE, 38, FIRE_DAMAGE)
ARMS("Adoxium", 220 148 220, "adoxium", ADOXIUM, 38, SPELL_DAMAGE)
LEGS("Infernite", 220 148 148, "infernite", INFERNITE, 18)
RANGED_HEAD("Infernite", 220 148 148, "infernite", INFERNITE, 18, 48, "Fire", "fire", "fire breathing", "fire breath", "FIRE_DAMAGE")
LEGS("Adoxium", 220 148 220, "adoxium", ADOXIUM, 18)
SPELL_HEAD("Adoxium", 220 148 220, "adoxium", ADOXIUM, 18, "automaton_spell", "automaton invisibility", "Invisibility", "invisibility")
SPELL_HEAD("Adoxium", 220 148 220, "adoxium", ADOXIUM, 18, "automaton_spell", "automaton teleport", "Teleport", "teleport")

"KaboomHead"
  {
    viewId = { "kaboom_head" }
    name = "kaboom head"
    shortName = "kaboom head"
    weight = 4
    craftingCost = IRON 15
    upgradeInfo = { AUTOMATONS_UPPER AssembledCreatureEffect
      Name "kaboom head"
      Description "Explodes, destroying the equiped automaton and killing the target. Aggravates enemies."
      {
        AddBodyPart HEAD 1 { Intrinsic { "touch_attack" } "self destruct" 1 {
          attackType = HIT
          meleeAttackAttr = FIRE_DAMAGE
          attackMsg = THRUST
          itselfMessage = true
          victimEffect = {1.0 Suicide DIE}
          attackerEffect = {CircularBlast Area 1 Fire{30} Suicide DIE}}}
        AddAutomatonPart 2 "kaboom" { "installed_kaboom_head" }
        Permanent AGGRAVATES
      }
    }
    upgradeType = {ARMOR}
    storageIds = {"automaton_parts" "equipment"}
  }

"Knife"
  {
    viewId = { "knife" }
    equipedViewId = { "knife_v" }
    name = "knife"
    plural = "knives"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 0.3
    modifiers = {
      DAMAGE 5
    }
    price = 1
    weaponInfo = {
      attackType = STAB
      attackMsg = THRUST
    }
    genPrefixes = {
      1 VictimEffect 0.1 Lasting POISON
    }
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "basic equipment"
  }
"AssassinsKnife" inherit "Knife"
  {
    name = "assassin's knife"
    plural = "assassin's knives"
    price = 500
    equipedEffect = {AMBUSH_SKILL}
    specialAttr = {
      DAMAGE 30 Name "against tribe leaders when hidden" And { CreatureStatus LEADER Attacker Hidden }
    }
    equipmentGroup = "artifact equipment"
  }
"UnicornHorn"
  {
    viewId = { "knife" }
    name = "horn"
    plural = "horn"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 0.3
    modifiers = {
      DAMAGE 5
    }
    price = 1
    weaponInfo = {
      attackType = STAB
      attackMsg = THRUST
      victimEffect = { 0.5 Lasting POISON }
    }
    storageIds = {"weapons" "equipment"}
  }
"Spear"
  {
    viewId = { "spear" }
    equipedViewId = { "spear_v" }
    name = "spear"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 1.5
    modifiers = {
      DAMAGE 6
    }
    price = 4
    weaponInfo = {
      attackType = STAB
      attackMsg = THRUST
    }
    specialAttr = {
      DAMAGE 15 Rider
    }
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "basic equipment"
  }
"Sword"
  {
    viewId = { "sword" }
    equipedViewId = { "sword_v" }
    name = "sword"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 1.5
    modifiers = {
      DAMAGE 8
    }
    price = 4
    craftingCost = "IRON" 20
    weaponInfo = {
      attackType = CUT
    }
    genPrefixes = {
      1 VictimEffect 0.3 Fire { 25 }
      1 VictimEffect 0.1 Lasting POISON
      1 LastingEffect RAGE
      1 JoinPrefixes {
        ItemAttrBonus DAMAGE 3
        LastingEffect HALLU
      }
    }
    maxUpgrades = 1
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "iron equipment"
  }
"AdaSword" inherit "Sword"
  {
    viewId = { "sword" Rgb 148 189 189 255 }
    equipedViewId = { "sword_v" Rgb 148 189 189 255 }
    name = "adamantine sword"
    shortName = "adamantine"
    modifiers = {
      DAMAGE 20
    }
    price = 20
    craftingCost = "ADA" 20
    genPrefixes = {
      1 VictimEffect 0.2 Acid{30}
      1 VictimEffect 0.3 Fire{30}
      1 VictimEffect 0.2 Lasting POISON
      1 LastingEffect RAGE
    }
    equipmentGroup = "adamantine equipment"
  }
Def InferniteEffect()
  Filter And { Not LastingEffect FIRE_RESISTANT Not LastingEffect FIRE_IMMUNITY } {
    CreatureMessage {"are burnt by the infernite" "is burnt by the infernite"}
    Bleed 0.01 "infernite"
  }
End
"InferniteSword" inherit "AdaSword"
  {
    viewId = { "infernite_sword" }
    equipedViewId = { "infernite_sword_v" }
    name = "infernite sword"
    shortName = "infernite"
    modifiers = {
      DAMAGE 30
    }
    price = 200
    craftingCost = "INFERNITE" 20
    carriedTickEffect = InferniteEffect()
    autoEquipPredicate = LastingEffect FIRE_RESISTANT
    ownedEffect = LIGHT_SOURCE
    equipedEffect = {FIRE_DAMAGE}
    equipmentGroup = "infernite equipment"
  }
"ElvenSword"
  {
    viewId = { "sword" ColorId LIGHT_GREEN }
    equipedViewId = { "sword_v" ColorId LIGHT_GREEN }
    name = "elven sword"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 1
    modifiers = {
      DAMAGE 9
    }
    price = 8
    craftingCost = "IRON" 20
    weaponInfo = {
      attackType = CUT
    }
    genPrefixes = {
      1 SpecialAttr DAMAGE 10 HatedBy HATE_UNDEAD
    }
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "iron equipment"
  }
"BattleAxe"
  {
    viewId = { "battle_axe" }
    equipedViewId = { "battle_axe_v" }
    name = "battle axe"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 8
    modifiers = {
      DAMAGE 14
    }
    price = 30
    craftingCost = "IRON" 50
    weaponInfo = {
      attackType = CUT
      twoHanded = true
    }
    genPrefixes = {
      1 VictimEffect 0.2 Lasting 50 BLEEDING
      1 LastingEffect RAGE
    }
    maxUpgrades = 1
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "iron equipment"
  }
"AdaBattleAxe" inherit "BattleAxe"
  {
    viewId = { "battle_axe" Rgb 148 189 189 255 }
    equipedViewId = { "battle_axe_v" Rgb 148 189 189 255 }
    shortName = "adamantine"
    name = "adamantine battle axe"
    modifiers = {
      DAMAGE 40
    }
    price = 150
    craftingCost = "ADA" 50
    genPrefixes = {
      1 VictimEffect 0.5 Lasting 50 BLEEDING
    }
    maxUpgrades = 2
    equipmentGroup = "adamantine equipment"
  }
"InferniteBattleAxe" inherit "AdaBattleAxe"
  {
    viewId = { "infernite_battle_axe" }
    equipedViewId = { "infernite_battle_axe_v" }
    shortName = "infernite"
    name = "infernite battle axe"
    modifiers = {
      DAMAGE 60
    }
    price = 1500
    craftingCost = "INFERNITE" 50
    carriedTickEffect = InferniteEffect()
    autoEquipPredicate = LastingEffect FIRE_RESISTANT
    ownedEffect = LIGHT_SOURCE
    equipedEffect = {FIRE_DAMAGE}
    equipmentGroup = "infernite equipment"
  }
"WarHammer"
  {
    viewId = { "war_hammer" }
    equipedViewId = { "war_hammer_v" }
    name = "war hammer"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 8
    modifiers = {
      DAMAGE 12
    }
    price = 20
    craftingCost = "IRON" 40
    weaponInfo = {
      attackType = CRUSH
      twoHanded = true
    }
    genPrefixes = {
      1 VictimEffect 0.3 Lasting COLLAPSED
    }
    maxUpgrades = 1
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "iron equipment"
  }
"AdaWarHammer" inherit "WarHammer"
  {
    viewId = { "war_hammer" Rgb 148 189 189 255 }
    equipedViewId = { "war_hammer_v" Rgb 148 189 189 255 }
    name = "adamantine war hammer"
    modifiers = {
      DAMAGE 35
    }
    price = 100
    craftingCost = "ADA" 40
    genPrefixes = {
      1 VictimEffect 0.5 Lasting COLLAPSED
    }
    maxUpgrades = 2
    equipmentGroup = "adamantine equipment"
  }
"InferniteWarHammer" inherit "AdaWarHammer"
  {
    viewId = { "infernite_war_hammer" }
    equipedViewId = { "infernite_war_hammer_v" }
    shortName = "infernite"
    name = "infernite war hammer"
    modifiers = {
      DAMAGE 55
    }
    price = 1000
    craftingCost = "INFERNITE" 40
    carriedTickEffect = InferniteEffect()
    autoEquipPredicate = LastingEffect FIRE_RESISTANT
    ownedEffect = LIGHT_SOURCE
    equipedEffect = {FIRE_DAMAGE}
    equipmentGroup = "infernite equipment"
  }
"InferniteTrident"
  {
    viewId = { "infernite_trident" }
    equipedViewId = { "infernite_trident_v" }
    shortName = "infernite"
    name = "infernite trident"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 8
    modifiers = {
      DAMAGE 90
    }
    price = 5000
    weaponInfo = {
      attackType = STAB
      attackMsg = THRUST
    }
    craftingCost = "INFERNITE" 100
    maxUpgrades = 10
    autoEquipPredicate = LastingEffect FIRE_RESISTANT
    ownedEffect = LIGHT_SOURCE
    storageIds = {"weapons" "equipment"}
    equipedEffect = {FIRE_DAMAGE}
    equipmentGroup = "infernite equipment"
  }
"Club"
  {
    viewId = { "club" }
    equipedViewId = { "club_v" }
    name = "club"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 2
    modifiers = {
      DAMAGE 4
    }
    price = 2
    weaponInfo = {
      attackType = CRUSH
    }
    maxUpgrades = 0
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "basic equipment"
  }
"HeavyClub"
  {
    viewId = { "heavy_club" }
    equipedViewId = { "heavy_club_v" }
    name = "heavy club"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 8
    modifiers = {
      DAMAGE 10
    }
    price = 4
    weaponInfo = {
      attackType = CRUSH
      twoHanded = true
    }
    maxUpgrades = 0
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "basic equipment"
  }
"WoodenStaff"
  {
    viewId = { "wooden_staff" }
    equipedViewId = { "wooden_staff_v" }
    name = "wooden staff"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 1.5
    modifiers = {
      SPELL_DAMAGE 4
    }
    price = 30
    weaponInfo = {
      attackType = SPELL
      attackMsg = WAVE
      meleeAttackAttr = SPELL_DAMAGE
    }
    genPrefixes = {
      1 VictimEffect 1.0 Escape{}
    }
    maxUpgrades = 1
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "basic equipment"
  }
"ArchwoodStaff" inherit "WoodenStaff"
  {
    viewId = { "archwood_staff" }
    equipedViewId = { "archwood_staff_v" }
    name = "archwood staff"
    modifiers = {
      SPELL_DAMAGE 24
      SPELL_SPEED 24
    }
    price = 400
    genPrefixes = {
      1 VictimEffect 1.0 Escape{}
      1 VictimEffect 0.4 DestroyEquipment
      1 JoinPrefixes {
        ItemAttrBonus SPELL_DAMAGE 20
        AttackerEffect Suicide DIE
      }
    }
    maxUpgrades = 2
    equipmentGroup = "artifact equipment"
  }
"AdoxiumStaff"
  {
    viewId = { "adoxium_staff" }
    equipedViewId = { "adoxium_staff_v" }
    name = "adoxium staff"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    modifiers = {
      SPELL_DAMAGE 33
      SPELL_SPEED 33
    }
    weight = 3
    price = 1800
    weaponInfo = {
      attackType = SPELL
      attackMsg = WAVE
      meleeAttackAttr = SPELL_DAMAGE
    }
    craftingCost = "ADOXIUM" 40
    genPrefixes = {
      1 VictimEffect 0.2 Lasting INSANITY
      1 VictimEffect 0.2 DestroyEquipment
      1 VictimEffect 0.5 Fire{20}
    }
    maxUpgrades = 5
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "adoxium equipment"
  }
"ElvenStaff" inherit "WoodenStaff"
  {
    viewId = { "elven_staff" }
    equipedViewId = { "elven_staff_v" }
    name = "elven staff"
    modifiers = {
      SPELL_SPEED 20
    }
  }
"Sceptre"
  {
    viewId = { "sceptre" }
    equipedViewId = { "sceptre_v" }
    name = "sceptre"
    itemClass = WEAPON
    equipmentSlot = WEAPON
    weight = 20
    modifiers = {
      DAMAGE 15
    }
    price = 2000
    weaponInfo = {
      attackType = HIT
    }
    equipedAbility = { "kings charge" }
    storageIds = {"weapons" "equipment"}
    equipmentGroup = "artifact equipment"
  }
"Bow"
  {
    viewId = { "bow" }
    name = "short bow"
    itemClass = RANGED_WEAPON
    equipmentSlot = RANGED_WEAPON
    equipedAbility = {"shoot arrow"}
    weaponInfo = {
      twoHanded = true
    }
    weight = 1
    modifiers = {
      RANGED_DAMAGE 10
    }
    price = 12
    maxUpgrades = 1
    storageIds = {"bows" "weapons" "equipment"}
    equipmentGroup = "ranged weapons"
  }
"ElvenBow" inherit "Bow"
  {
    viewId = { "elven_bow" }
    modifiers = {
      RANGED_DAMAGE 16
    }
    name = "silver elven bow"
    price = 100
  }
"ArchwoodBow" inherit "Bow"
  {
    viewId = { "archwood_bow" }
    modifiers = {
      RANGED_DAMAGE 25
    }
    name = "archwood bow"
    maxUpgrades = 3
    price = 1000
  }
"Crossbow"
  {
    viewId = { "crossbow" }
    name = "crossbow"
    itemClass = RANGED_WEAPON
    equipmentSlot = RANGED_WEAPON
    equipedAbility = {"shoot bolt"}
    weaponInfo = {
      twoHanded = true
    }
    weight = 1
    modifiers = {
      RANGED_DAMAGE 15
    }
    price = 90
    maxUpgrades = 1
    storageIds = {"bows" "weapons" "equipment"}
    equipmentGroup = "ranged weapons"
  }
"ArchwoodCrossbow" inherit "Crossbow"
  {
    viewId = { "archwood_crossbow" }
    modifiers = {
      RANGED_DAMAGE 32
    }
    name = "archwood crossbow"
    maxUpgrades = 3
    price = 1000
  }
"Torch"
  {
    viewId = { "hand_torch" }
    weight = 1
    ownedEffect = LIGHT_SOURCE
    name = "hand torch"
    plural = "hand torches"
    price = 2
    storageIds = {"equipment"}
    equipmentGroup = "light emitting equipment"
  }
"Robe"
  {
    viewId = { "robe" }
    name = "robe"
    itemClass = ARMOR
    equipmentSlot = BODY_ARMOR
    weight = 2
    price = 10
    modifiers = {
      DEFENSE 1
    }
    genPrefixes = {
      1 LastingEffect MAGIC_RESISTANCE
    }
    storageIds = {"armor" "equipment"}
    equipmentGroup = "basic equipment"
  }
"HalloweenCostume"
  {
    viewId = { "halloween_costume" }
    name = "halloween costume"
    shortName = "halloween costume"
    itemClass = ARMOR
    equipmentSlot = BODY_ARMOR
    weight = 1
    price = 10
    modifiers = {
      DEFENSE 1
    }
    storageIds = {"armor" "equipment"}
  }
"BagOfCandies"
  {
    viewId = { "bag_of_candy" }
    shortName = "candies"
    name = "bag of candies"
    blindName = "bag"
    description = "Really, just a bag of candies."
    itemClass = FOOD
    weight = 0.1
    modifiers = {
      DAMAGE -15
    }
    price = 1
    uses = 1
    storageIds = {"equipment"}
  }
"LeatherGloves"
  {
    viewId = { "leather_gloves" }
    shortName = "gloves"
    name = "pair of leather gloves"
    plural = "pairs of leather gloves"
    itemClass = ARMOR
    equipmentSlot = GLOVES
    weight = 0.3
    price = 2
    modifiers = {
      DEFENSE 1
    }
    maxUpgrades = 0
    storageIds = {"armor" "equipment"}
    equipmentGroup = "basic equipment"
  }
"IronGloves"
  {
    viewId = { "iron_gloves" }
    shortName = "gloves"
    name = "pair of iron gloves"
    plural = "pairs of iron gloves"
    itemClass = ARMOR
    equipmentSlot = GLOVES
    weight = 1
    price = 10
    craftingCost = "IRON" 2
    modifiers = {
      DEFENSE 2
    }
    genPrefixes = {
      1 ItemAttrBonus DAMAGE 3
      1 ItemAttrBonus SPELL_DAMAGE 3
    }
    maxUpgrades = 1
    storageIds = {"armor" "equipment"}
    equipmentGroup = "iron equipment"
  }
"AdaGloves"
  {
    viewId = { "ada_gloves" }
    shortName = "gloves"
    name = "pair of adamantine gloves"
    plural = "pairs of adamantine gloves"
    itemClass = ARMOR
    equipmentSlot = GLOVES
    weight = 0.7
    price = 25
    craftingCost = "ADA" 2
    modifiers = {
      DEFENSE 6
    }
    genPrefixes = {
      1 ItemAttrBonus DAMAGE 3
      1 ItemAttrBonus SPELL_DAMAGE 3
    }
    maxUpgrades = 2
    storageIds = {"armor" "equipment"}
    equipmentGroup = "adamantine equipment"
  }
"AdoxiumGloves" inherit "AdaGloves"
  {
    viewId = { "iron_gloves" ColorId PINK }
    name = "pair of adoxium gloves"
    plural = "pairs of adoxium gloves"
    price = 250
    craftingCost = "ADOXIUM" 2
    modifiers = {
      DEFENSE 10
      SPELL_SPEED 10
    }
    equipmentGroup = "adoxium equipment"
  }
"LeatherArmor"
  {
    viewId = { "leather_armor" }
    shortName = "armor"
    name = "leather armor"
    itemClass = ARMOR
    equipmentSlot = BODY_ARMOR
    weight = 7
    price = 4
    modifiers = {
      DEFENSE 3
    }
    genPrefixes = {
      1 ItemAttrBonus DEFENSE 3
    }
    maxUpgrades = 0
    storageIds = {"armor" "equipment"}
    equipmentGroup = "basic equipment"
  }
"LeatherHelm"
  {
    viewId = { "leather_helm" }
    shortName = "helm"
    name = "leather helm"
    itemClass = ARMOR
    equipmentSlot = HELMET
    weight = 1.5
    price = 1
    modifiers = {
      DEFENSE 1
    }
    genPrefixes = {
      1 LastingEffect TELEPATHY
      1 LastingEffect SLEEP_RESISTANT
      2 ItemAttrBonus DEFENSE 3
    }
    maxUpgrades = 0
    storageIds = {"armor" "equipment"}
    equipmentGroup = "basic equipment"
  }
"WoodenShield"
  {
    viewId = { "wooden_shield" }
    shortName = "wooden"
    name = "wooden shield"
    itemClass = ARMOR
    equipmentSlot = SHIELD
    weight = 2
    price = 1
    modifiers = {
      PARRY 1
    }
    maxUpgrades = 0
    storageIds = {"armor" "equipment"}
    equipmentGroup = "basic equipment"
  }
"IronShield"
  {
    viewId = { "wooden_shield" Rgb 189 189 189 255 }
    shortName = "iron"
    name = "iron shield"
    itemClass = ARMOR
    equipmentSlot = SHIELD
    weight = 2
    price = 10
    craftingCost = "IRON" 24
    modifiers = {
      PARRY 2
      DEFENSE 2
    }
    maxUpgrades = 1
    storageIds = {"armor" "equipment"}
    equipmentGroup = "iron equipment"
  }
"AdaShield"
  {
    viewId = { "wooden_shield" Rgb 148 189 189 255 }
    shortName = "adamantine"
    name = "adamantine shield"
    itemClass = ARMOR
    equipmentSlot = SHIELD
    weight = 1.5
    price = 50
    craftingCost = "ADA" 24
    modifiers = {
      PARRY 4
      DEFENSE 8
    }
    maxUpgrades = 2
    storageIds = {"armor" "equipment"}
    equipmentGroup = "adamantine equipment"
  }
"ChainArmor"
  {
    viewId = { "chain_armor" }
    shortName = "armor"
    name = "chain armor"
    itemClass = ARMOR
    equipmentSlot = BODY_ARMOR
    weight = 15
    price = 25
    craftingCost = "IRON" 40
    modifiers = {
      DEFENSE 5
    }
    genPrefixes = {
      1 ItemAttrBonus DEFENSE 3
    }
    maxUpgrades = 2
    storageIds = {"armor" "equipment"}
    equipmentGroup = "iron equipment"
  }
"RedDragonScales"
  {
    viewId = { "dragon_scales" ColorId RED }
    name = "red dragon scales"
    itemClass = OTHER
    weight = 5
    price = 100
    ingredientType = "red_scales"
    storageIds = {"upgrades" "equipment"}
  }
"RedDragonArmor" inherit "LeatherArmor"
  {
    viewId = { "chain_armor" Rgb 156 58 68 255 }
    shortName = "red dragon"
    name = "red dragon scale armor"
    weight = 10
    price = 250
    modifiers = {
      DEFENSE 40
      SPELL_DAMAGE 2
    }
    equipedEffect = {FIRE_RESISTANT}
    maxUpgrades = 2
    equipmentGroup = "artifact equipment"
  }
"BlackDragonScales"
  {
    viewId = { "dragon_scales" Rgb 80 80 80 255 }
    name = "black dragon scales"
    itemClass = OTHER
    weight = 5
    price = 100
    ingredientType = "black_scales"
    storageIds = {"upgrades" "equipment"}
  }
"BlackDragonArmor" inherit "LeatherArmor"
  {
    viewId = { "chain_armor" Rgb 80 80 80 255 }
    shortName = "black dragon"
    name = "black dragon scale armor"
    weight = 10
    price = 250
    modifiers = {
      DEFENSE 40
      SPELL_DAMAGE 10
    }
    equipedEffect = {DARKNESS_SOURCE TELEPATHY}
    maxUpgrades = 2
    equipmentGroup = "artifact equipment"
  }
"WhiteDragonScales"
  {
    viewId = { "dragon_scales" Rgb 254 254 254 255 }
    name = "white dragon scales"
    itemClass = OTHER
    weight = 5
    price = 100
    ingredientType = "white_scales"
    storageIds = {"upgrades" "equipment"}
  }
"WhiteDragonArmor" inherit "LeatherArmor"
  {
    viewId = { "chain_armor" Rgb 254 254 254 255 }
    shortName = "white dragon"
    name = "white dragon scale armor"
    weight = 10
    price = 250
    modifiers = {
      DEFENSE 40
      SPELL_DAMAGE 10
    }
    equipedEffect = {COLD_RESISTANT}
    maxUpgrades = 2
    equipmentGroup = "artifact equipment"
  }
"YellowDragonScales"
  {
    viewId = { "dragon_scales" Rgb 254 254 10 255 }
    name = "yellow dragon scales"
    itemClass = OTHER
    weight = 5
    price = 100
    ingredientType = "yellow_scales"
    storageIds = {"upgrades" "equipment"}
  }
"YellowDragonArmor" inherit "LeatherArmor"
  {
    viewId = { "chain_armor" Rgb 254 254 10 255 }
    shortName = "yellow dragon"
    name = "yellow dragon scale armor"
    weight = 10
    price = 250
    modifiers = {
      DEFENSE 40
      SPELL_DAMAGE 10
      ACID_DAMAGE 40
    }
    equipedAbility = {"acid stream"}
    maxUpgrades = 2
    equipmentGroup = "artifact equipment"
  }
"GreenDragonScales"
  {
    viewId = { "dragon_scales" }
    name = "green dragon scales"
    itemClass = OTHER
    weight = 5
    price = 100
    ingredientType = "green_scales"
    storageIds = {"upgrades" "equipment"}
  }
"GreenDragonArmor" inherit "LeatherArmor"
  {
    viewId = { "chain_armor" Rgb 151 162 81 255 }
    shortName = "green dragon"
    name = "green dragon scale armor"
    weight = 10
    price = 250
    modifiers = {
      DEFENSE 40
      SPELL_DAMAGE 10
    }
    equipedEffect = {POISON_RESISTANT}
    maxUpgrades = 2
    equipmentGroup = "artifact equipment"
  }
"AdaArmor"
  {
    viewId = { "ada_armor" }
    shortName = "armor"
    name = "adamantine armor"
    itemClass = ARMOR
    equipmentSlot = BODY_ARMOR
    weight = 13
    price = 160
    craftingCost = "ADA" 40
    modifiers = {
      DEFENSE 24
    }
    genPrefixes = {
      1 ItemAttrBonus DEFENSE 3
    }
    maxUpgrades = 4
    storageIds = {"armor" "equipment"}
    equipmentGroup = "adamantine equipment"
  }
"AdoxiumArmor" inherit "AdaArmor"
  {
    viewId = { "chain_armor" ColorId PINK }
    name = "adoxium armor"
    price = 1600
    craftingCost = "ADOXIUM" 40
    modifiers = {
      DEFENSE 35
      SPELL_SPEED 45
    }
    equipmentGroup = "adoxium equipment"
  }
"IronHelm"
  {
    viewId = { "iron_helm" }
    shortName = "helm"
    name = "iron helm"
    itemClass = ARMOR
    equipmentSlot = HELMET
    weight = 4
    price = 8
    craftingCost = "IRON" 16
    modifiers = {
      DEFENSE 2
    }
    genPrefixes = {
      1 LastingEffect WARNING
      1 LastingEffect SLEEP_RESISTANT
      3 ItemAttrBonus DEFENSE 3
    }
    maxUpgrades = 1
    storageIds = {"armor" "equipment"}
    equipmentGroup = "iron equipment"
  }
"Archwood"
  {
    viewId = { "archwood" }
    name = "branch of archwood"
    plural = "branches of archwood"
    itemClass = OTHER
    weight = 15
    price = 200
    ingredientType = "archwood"
    storageIds = {"upgrades" "equipment"}
  }
"HydraTongue"
  {
    viewId = { "tongue" }
    name = "hydra tongue"
    itemClass = OTHER
    weight = 15
    price = 100
    ingredientType = "hydra_tongue"
    storageIds = {"upgrades" "equipment"}
  }
"ZombieBrain"
  {
    viewId = { "brain" }
    name = "zombie brain"
    itemClass = OTHER
    weight = 2
    price = 20
    ingredientType = "zombie_brain"
    storageIds = {"upgrades" "equipment"}
  }
"CyclopsBrain"
  {
    viewId = { "brain" }
    name = "cyclops brain"
    itemClass = OTHER
    weight = 5
    price = 50
    ingredientType = "cyclops_brain"
    storageIds = {"upgrades" "equipment"}
  }
"CyclopsTesticles"
  {
    viewId = { "nuts" }
    shortName = "cyclops"
    name = "cyclops testicles"
    itemClass = OTHER
    weight = 5
    price = 50
    ingredientType = "cyclops_testes"
    storageIds = {"upgrades" "equipment"}
  }
"ProphetRemains"
  {
    viewId = { "prophet_remains" }
    shortName = "prophet Ynnuf Yrewosbe"
    name = "mummified remains of ancient prophet Ynnuf Yrewosbe"
    itemClass = OTHER
    weight = 5
    price = 50
    ingredientType = "prophet_remains"
    storageIds = {"upgrades" "equipment"}
  }
"ProphetSoup"
  {
    viewId = { "potion4" }
    shortName = "prophet soup"
    name = "soup made of mummified prophet remains"
    plural = "soups"
    blindName = "soup"
    applyVerb = "drink" "drinks"
    fragile = true
    weight = 0.3
    effect = NoAutoAssign EquipmentType COMBAT_ITEM AI And {} -1 1 AI And {} 0 1
        Name "Increases experience"
        Description "Increases creature's combat experience" {
      AddExperience 20
      CreatureMessage { "have very bad stomach cramps" "has very bad stomach cramps" }
    }
    price = 10
    burnTime = 1
    uses = 1
    producedStat = POTION_PRODUCED
    storageIds = {"potions" "equipment"}
  }
"CyclopsHelm" inherit "LeatherHelm"
  {
    viewId = { "cyclops_helm" }
    shortName = "cyclops"
    name = "cyclops testicles helmet"
    plural = "cyclops testicles helmet"
    modifiers = {
      DEFENSE 5
    }
    equipedEffect = {ENTERTAINER}
    maxUpgrades = 3
    equipmentGroup = "artifact equipment"
  }
"AdoxieEye"
  {
    name = "Adoxie's eye"
    viewId = { "adoxie_eye" }
    upgradeInfo = { ARMOR SpellId "double trouble" }
    weight = 2
    price = 500
    storageIds = {"upgrades" "equipment"}
  }
"BalrogsWhip"
  {
    viewId = { "balrogs_whip" }
    name = "fiery whip"
    equipmentSlot = RANGED_WEAPON
    equipedAbility = {"balrogs whip"}
    weight = 1
    modifiers = {
      SPELL_DAMAGE 16
    }
    price = 12000
    storageIds = {"bows" "weapons" "equipment"}
    equipmentGroup = "artifact equipment"
  }
"AdoxieScroll"
  {
    name = "religious pamphlet"
    viewId = { "scroll" }
    weight = 1
    price = 1
    applyVerb = "read" "reads"
    applyPredicate = Not LastingEffect BLIND
    effect = Description "Just a cheap pamphlet" Message NORMAL "It predicts the coming of the Evil God Adoxie"
    storageIds = {"scrolls" "equipment"}
  }

Def UnlockMessage(Text, ViewId)
  UI "unlock_message" { "message" Label Text "view_id" ViewIdList {{ViewId}}}
End

"AdoxieScrollVault" inherit "AdoxieScroll"
  {
    effect = Description "Just a cheap pamphlet" Name "message" {
      Message NORMAL "It predicts the coming of the Evil God Adoxie. You feel like this time it is real."
      Unlock "adoxie"
      Analytics "milestone" "adoxieUnlocked"
      UnlockMessage("The Adoxie adventurer has been unlocked!", "adoxie_head")
    }
  }

"ZombieScroll"
  {
    name = "rotten scroll"
    viewId = { "scroll" }
    weight = 1
    price = 1
    uses = 1
    applyVerb = "read" "reads"
    applyPredicate = Not LastingEffect BLIND
    effect = Description "" Name "?" {
      Message NORMAL "The scroll falls apart before you manage to read it"
      Message NORMAL "An image of an unlocking door appears in your mind"
      Unlock "zombies"
      Analytics "milestone" "zombiesUnlocked"
      UnlockMessage("The Zombie faction has been unlocked!", "zombie")
    }
    storageIds = {"scrolls" "equipment"}
  }
"CyclopsScroll"
  {
    name = "strange scroll"
    viewId = { "scroll" }
    applyVerb = "read" "reads"
    applyPredicate = Not LastingEffect BLIND
    weight = 1
    price = 1
    effect = Description "" Name "?" {
      Filter Or{ LastingEffect INSANITY LastingEffect HALLU } {
        Message NORMAL "The strange symbols and arrows describe a door that has been unlocked"
        Unlock "cyclops"
        Analytics "milestone" "cyclopsUnlocked"
        UnlockMessage("The Cyclops faction has been unlocked!", "cyclops")
      }
      Filter Not Or{ LastingEffect INSANITY LastingEffect HALLU } {
        Message NORMAL "It contains strange symbols and arrows"
        Message NORMAL "They don't seem to make any sense"
      }
    }
    storageIds = {"scrolls" "equipment"}
  }
"AdaHelm"
  {
    viewId = { "ada_helm" }
    shortName = "helm"
    name = "adamantine helm"
    itemClass = ARMOR
    equipmentSlot = HELMET
    weight = 3
    price = 40
    craftingCost = "ADA" 16
    modifiers = {
      DEFENSE 6
    }
    genPrefixes = {
      1 LastingEffect TELEPATHY
      1 LastingEffect REGENERATION
    }
    maxUpgrades = 2
    storageIds = {"armor" "equipment"}
    equipmentGroup = "adamantine equipment"
  }
"AdoxiumHelm" inherit "AdaHelm"
  {
    viewId = { "iron_helm" ColorId PINK }
    name = "adoxium helm"
    modifiers = {
      DEFENSE 10
      SPELL_SPEED 25
    }
    price = 400
    craftingCost = "ADOXIUM" 16
    equipmentGroup = "adoxium equipment"
  }
"Cornuthaum1"
  {
    viewId = { "cornuthaum1" }
    name = "cornuthaum"
    itemClass = ARMOR
    equipmentSlot = HELMET
    weight = 1
    price = 30
    modifiers = {
      SPELL_DAMAGE 2
      DAMAGE -2
      SPELL_SPEED 5
    }
    autoEquipPredicate = AttributeAtLeast "SPELL_DAMAGE" 1
    equipWarning = "Cornuthaums are only useful for spellcasters. Continue?"
    maxUpgrades = 1
    storageIds = {"armor" "equipment"}
  }
"Cornuthaum2" inherit "Cornuthaum1"
  {
    viewId = { "cornuthaum2" }
    name = "ornate cornuthaum"
    price = 50
    craftingCost = "GOLD" 20
    modifiers = {
      SPELL_DAMAGE 4
      DAMAGE -4
      SPELL_SPEED 10
    }
    maxUpgrades = 2
  }
"Cornuthaum3" inherit "Cornuthaum1"
  {
    viewId = { "cornuthaum3" }
    name = "sumptuous cornuthaum"
    price = 70
    craftingCost = "GOLD" 40
    modifiers = {
      SPELL_DAMAGE 6
      DAMAGE -6
      SPELL_SPEED 15
    }
    maxUpgrades = 4
  }
"LeatherBoots"
  {
    viewId = { "leather_boots" }
    shortName = "boots"
    name = "pair of leather boots"
    plural = "pairs of leather boots"
    itemClass = ARMOR
    equipmentSlot = BOOTS
    weight = 2
    price = 2
    modifiers = {
      DEFENSE 1
    }
    genPrefixes = {
      1 LastingEffect FLYING
      1 LastingEffect SPEED
      2 ItemAttrBonus DEFENSE 3
    }
    maxUpgrades = 0
    storageIds = {"armor" "equipment"}
    equipmentGroup = "basic equipment"
  }
"IronBoots"
  {
    viewId = { "iron_boots" }
    shortName = "boots"
    name = "pair of iron boots"
    plural = "pairs of iron boots"
    itemClass = ARMOR
    equipmentSlot = BOOTS
    weight = 4
    price = 8
    craftingCost = "IRON" 24
    modifiers = {
      DEFENSE 2
    }
    genPrefixes = {
      1 LastingEffect FLYING
      1 LastingEffect FIRE_RESISTANT
      3 ItemAttrBonus DEFENSE 3
    }
    maxUpgrades = 1
    storageIds = {"armor" "equipment"}
    equipmentGroup = "iron equipment"
  }
"AdaBoots"
  {
    viewId = { "ada_boots" }
    shortName = "boots"
    name = "pair of adamantine boots"
    plural = "pairs of admantine boots"
    itemClass = ARMOR
    equipmentSlot = BOOTS
    weight = 3
    price = 50
    craftingCost = "ADA" 24
    modifiers = {
      DEFENSE 5
    }
    genPrefixes = {
      1 LastingEffect SPEED
    }
    maxUpgrades = 2
    storageIds = {"armor" "equipment"}
    equipmentGroup = "adamantine equipment"
  }
"AdoxiumBoots" inherit "AdaBoots"
  {
    viewId = { "iron_boots" ColorId PINK }
    name = "pair of adoxium boots"
    plural = "pairs of adoxium boots"
    price = 500
    craftingCost = "ADOXIUM" 24
    modifiers = {
      DEFENSE 10
      SPELL_SPEED 10
    }
    equipmentGroup = "adoxium equipment"
  }
"DevilHooves"
  {
    viewId = { "devil_hooves" }
    name = "devil's hooves"
    itemClass = OTHER
    weight = 5
    price = 100
    ingredientType = "devil_hooves"
    storageIds = {"upgrades" "equipment"}
  }
"DevilBoots"
  {
    viewId = { "iron_boots" Rgb 206 58 68 255 }
    shortName = "devil"
    name = "pair of devil boots"
    plural = "pairs of devil boots"
    itemClass = ARMOR
    equipmentSlot = BOOTS
    weight = 4
    price = 800
    modifiers = {
      DEFENSE 8
    }
    equipedEffect = {FLYING SPELL_DAMAGE}
    maxUpgrades = 1
    storageIds = {"armor" "equipment"}
    equipmentGroup = "artifact equipment"
  }
"DevilHorns"
  {
    viewId = { "devil_horns" }
    name = "devil's horns"
    itemClass = OTHER
    weight = 5
    price = 100
    ingredientType = "devil_horns"
    storageIds = {"upgrades" "equipment"}
  }
"DefenseAmulet"
  {
    viewId = { "amulet3" }
    shortName = "defense"
    name = "amulet of defense"
    plural = "amulets of defense"
    description = "Increases the toughness of your skin and flesh, making you harder to wound."
    equipmentSlot = AMULET
    price = 60
    modifiers = {
      DEFENSE 3
    }
    weight = 0.3
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
"DefenseAmulet10" inherit "DefenseAmulet"
  {
    modifiers = {
      DEFENSE 10
    }
  }
"FirstAidKit"
  {
    viewId = { "first_aid" }
    name = "first aid kit"
    weight = 0.5
    description = "Heals your wounds, but requires a few turns to apply."
    applyTime = 3
    uses = 3
    usedUpMsg = true
    displayUses = true
    price = 2
    effect = Heal { FLESH }
    storageIds = {"equipment"}
    equipmentGroup = "consumables"
  }
"MagicLamp"
  {
    viewId = { "lamp" }
    name = "oil lamp"
    applyMsgFirstPerson = "rub the lamp"
    applyMsgThirdPerson = "rubs the lamp"
    weight = 1
    description = "Just an oil lamp"
    uses = 1
    price = 1000
    effect = SummonEnemy "DJINN" {1} none
    effectDescription = false
    ownedEffect = LIGHT_SOURCE
    storageIds = {"equipment"}
    equipmentGroup = "light emitting equipment"
  }
Def PROTECTION_RING(CreatureType, Predicate, Value)
  {
    viewId = { "ring" ColorId WHITE }
    name = "ring of protection from " + CreatureType
    shortName = "from " + CreatureType
    specialAttr = {
      DEFENSE Value Name "against " + CreatureType Attacker Predicate
    }
    weight = 0.05
    equipmentSlot = RINGS
    price = 60
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
End
"UndeadProtectionRing5" PROTECTION_RING("undead", BodyMaterial "UNDEAD_FLESH", 5)
"ElfProtectionRing5" PROTECTION_RING("elves", HatedBy "HATE_ELVES", 5)
"DwarfProtectionRing5" PROTECTION_RING("dwarves", HatedBy "HATE_DWARVES", 5)
"GreenskinProtectionRing5" PROTECTION_RING("dwarves", HatedBy "HATE_GREENSKINS", 5)
"UndeadProtectionRing15" PROTECTION_RING("undead", BodyMaterial "UNDEAD_FLESH", 15)
"ElfProtectionRing15" PROTECTION_RING("elves", HatedBy "HATE_ELVES", 15)
"DwarfProtectionRing15" PROTECTION_RING("dwarves", HatedBy "HATE_DWARVES", 15)
"GreenskinProtectionRing15" PROTECTION_RING("dwarves", HatedBy "HATE_GREENSKINS", 15)
"DragonProtectionRing15" PROTECTION_RING("dragons", HatedBy "HATE_DRAGONS", 15)
"InvisibilityRing"
  {
    viewId = { "gold_ring" }
    name = "gold ring"
    equipedCompanion = {count = 9 statsBase = "DEFENSE" summonFreq = 0.4 creatures = { "WRAITH" } hostile = true}
    equipedEffect = {INVISIBLE}
    weight = 0.05
    equipmentSlot = RINGS
    price = 50
    autoEquipPredicate = Or {}
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
"JumpRing"
  {
    viewId = { "ring" ColorId PINK }
    name = "ring of jumping"
    shortName = "jumping"
    equipedAbility = {"jump"}
    weight = 0.05
    equipmentSlot = RINGS
    price = 50
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
Def TAMING_RING(Creature, Count, Name, Price, Freq)
  {
    viewId = { "ring" ColorId WHITE }
    name = "ring of " + Name + " taming"
    shortName = Name
    equipedCompanion = {
      count = Count
      summonFreq = Freq
      creatures = { Creature }
      getsKillCredit = true
    }
    weight = 0.05
    equipmentSlot = RINGS
    price = Price
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
End
"SpiderRing" TAMING_RING("SPIDER", 5, "spider", 1, 0.01)
"DragonRing" TAMING_RING("RED_DRAGON" "WHITE_DRAGON" "YELLOW_DRAGON" "GREEN_DRAGON", 1, "dragon", 500, 0.001)
"HorseRing" TAMING_RING("HORSE_CAN_TRAIN", 1, "horse", 100, 0.005)
"BatRing" TAMING_RING("BAT", 5, "bat", 5, 0.01)
Def DAMAGE_RING(VALUE)
  {
    viewId = { "ring" ColorId BLUE }
    shortName = "damage"
    name = "ring of damage"
    plural = "rings of damage"
    description = "Increases the force of your physical attacks, making you deal more damage in combat."
    equipmentSlot = RINGS
    price = 60
    modifiers = {
      DAMAGE VALUE
    }
    weight = 0.3
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
End
"DamageRing3" DAMAGE_RING(3)
"DamageRing10" DAMAGE_RING(10)
Def SPELL_DAMAGE_RING(VALUE)
  {
    viewId = { "ring" ColorId GREEN }
    shortName = "spell damage"
    name = "ring of spell damage"
    plural = "rings of spell damage"
    description = "Increases the force of your spell attacks, making you deal more damage in combat."
    equipmentSlot = RINGS
    price = 60
    modifiers = {
      SPELL_DAMAGE VALUE
    }
    weight = 0.3
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
End
"SpellDamageRing3" SPELL_DAMAGE_RING(3)
"SpellDamageRing10" SPELL_DAMAGE_RING(10)
Def RANGED_DAMAGE_RING(VALUE)
  {
    viewId = { "ring" ColorId YELLOW }
    shortName = "ranged damage"
    name = "ring of ranged damage"
    plural = "rings of ranged damage"
    description = "Increases the precision of your ranged attacks, making you deal more damage in combat."
    equipmentSlot = RINGS
    price = 60
    modifiers = {
      RANGED_DAMAGE VALUE
    }
    weight = 0.3
    storageIds = {"jewellery" "equipment"}
    equipmentGroup = "jewellery"
  }
End
"RangedDamageRing3" RANGED_DAMAGE_RING(3)
"RangedDamageRing10" RANGED_DAMAGE_RING(10)
"Rock"
  {
    viewId = { "rock" }
    name = "rock"
    itemClass = OTHER
    price = 0
    resourceId = "STONE"
    weight = 0.3
    wishedCount = { 5 10 }
    storageIds = {"resources"}
  }
"BlackMarketKey"
  {
    name = "key"
    viewId = { "black_market_key" }
    applyMsgFirstPerson = "try to use the key"
    applyMsgThirdPerson = "tries to use the key"
    weight = 0.1
    description = "A key with a strange crystal."
    effect = Name "Unknown" Description "" FirstSuccessful { 
      Area 2 ChainUntilFail {
        RemoveFurniture "INACTIVE_PORTAL"
        {
          Fx { TELEPORT_OUT }
          Message NORMAL "The portal is activated!"
          PlaceFurniture "PORTAL_STAIRS"
          Analytics "milestone" "blackMarketPortal"
        }
      }
      Area 2 Filter Or { FurnitureType "ADOXIE_STATUE_VAULT" FurnitureType "ADOXIE_STATUE_TEMPLE" } {
        Message NORMAL "The statue blinks!"
        Analytics "milestone" "adoxieStatueBlink"
      }
      Message NORMAL "Nothing happens."
    }
    storageIds = {"jewellery" "equipment"}
  }
"IronOre"
  {
    viewId = { "iron_rock" }
    name = "iron ore"
    itemClass = OTHER
    price = 0
    resourceId = "IRON"
    weight = 0.5
    storageIds = {"resources"}
  }
"AdaOre"
  {
    viewId = { "ada_ore" }
    name = "adamantine ore"
    itemClass = OTHER
    price = 2
    resourceId = "ADA"
    weight = 0.5
    storageIds = {"resources"}
  }
"AdoxiumOre"
  {
    viewId = { "adoxium_rock" }
    name = "adoxium ore"
    itemClass = OTHER
    price = 4
    resourceId = "ADOXIUM"
    weight = 0.5
    storageIds = {"resources"}
  }
"InferniteOre"
  {
    viewId = { "infernite_rock" }
    name = "infernite ore"
    itemClass = OTHER
    price = 4
    resourceId = "INFERNITE"
    weight = 0.5
# Turn off as it causes too much frustration with losing workers
#    carriedTickEffect = InferniteEffect()
# With light source on minions will try to use it as a torch.
#    ownedEffect = LIGHT_SOURCE
    storageIds = {"resources"}
  }
"WoodPlank"
  {
    viewId = { "wood_plank" }
    name = "wood plank"
    itemClass = OTHER
    price = 0
    resourceId = "WOOD"
    weight = 5
    storageIds = {"resources"}
  }
"Bone"
  {
    viewId = { "bone" }
    name = "bone"
    itemClass = CORPSE
    price = 0
    weight = 5
    storageIds = {"corpses"}
  }
"Skeleton"
  {
    viewId = { "bone" }
    name = "skeleton"
    itemClass = CORPSE
    price = 0
    weight = 50
    resourceId = "CORPSE"
    storageIds = {"corpses"}
  }
"WizardCorpse"
  {
    viewId = { "bone" }
    name = "wizard corpse"
    itemClass = CORPSE
    price = 0
    weight = 50
    resourceId = "CORPSE"
    storageIds = {"corpses"}
  }
"GnomeCorpse" inherit "WizardCorpse"
  {
    name = "gnome corpse"
  }
"FrozenRemains" inherit "Skeleton"
  {
    viewId = { "frozen_remains" }
    name = "frozen remains"
  }
"GoldPiece"
  {
    viewId = { "gold" }
    name = "gold piece"
    itemClass = GOLD
    price = 1
    resourceId = "GOLD"
    weight = 0.01
    wishedCount = { 500 1000 }
    storageIds = {"gold" "resources"}
  }
"Moonshine"
  {
    viewId = { "potion1" Rgb 0 0 0 0 }
    shortName = "moonshine"
    name = "potion of moonshine"
    plural = "potions of moonshine"
    blindName = "potion"
    applyVerb = "drink" "drinks"
    fragile = true
    weight = 0.3
    effect = { Lasting 150 HIGH_MORALE Lasting DRUNK}
    price = 10
    burnTime = 1
    uses = 1
    producedStat = POTION_PRODUCED
    storageIds = {"potions" "equipment"}
  }
