{
  "type" : "tooltenant",
  "baseType" : "merchant",
  "disableWornArmor" : true,

  "damageTeam" : 1,
  "levelVariance" : [0, 0],

  "scripts" : [
    "/npcs/main.lua",
    "/scripts/pathing.lua",
    "/npcs/tenant.lua",
    "/npcs/timers.lua",
    "/scripts/sensors.lua",
    "/scripts/stateMachine.lua",
    "/scripts/actions/merchant.lua",
    "/scripts/util.lua",
    "/scripts/vec2.lua",

    "/npcs/returnHomeState.lua",
    "/npcs/grumbleState.lua",
    "/npcs/chatState.lua",
    "/npcs/fleeState.lua",
    "/npcs/sitState.lua",
    "/npcs/sleepState.lua",
    "/npcs/standingIdleState.lua",
    "/npcs/wanderState.lua",

    "/npcs/merchant/merchantState.lua",
    "/npcs/merchant/returnToStoreState.lua"
  ],

  "scriptConfig" : {
  
	"tenant" : {
      "emoteCooldownTimeRange" : [1.0, 2.0],
      "complaintCooldownTimeRange" : [5.0, 10.0],
      "severeComplaintTime" : 25.0,
      "finalComplaintTime" : 35.0,

      "dialog" : {
        "grumbles" : {
          "tagCriteria" : {
            "default" : [ "Something in my place has changed, I don't like it!" ],
            "human" : [
                "Has something been stolen from my store?",
                "The arrangement of my store has changed, this isn't alright...",
                "How can I sell stuff when my store is being changed?"
            ],
            "floran" : [
                "Have you taken ssstuff from my ssstore?",
                "My store hasss changed, I'm not happy with that!",
                "Can you help me get my ssstore looking like how it usssed to?"    
            ],
            "glitch" : [
                "Confused. My store is different.",
                "Discontent. I liked my store before it was changed.",
                "Wishful. I wish my store was how it used to be."    
            ],
            "avian" : [
                "The arrangement of my store is not the same...",
                "Something is unsettlingly different in here.",
                "Can you restore my store to its original arrangement for me?"    
            ],
            "apex" : [
                "I would appreciate if you could restore my store's original decor.",
                "Can you assist in the restoration of my store's original layout?",
                "I liked how my store was laid out previously. Can you restore it please?"    
            ],
            "hylotl" : [
                "Something is unbalanced in the flow of my store...",
                "This is my store! Why would someone take things from it?",
                "I wish my store was how it was before, it is no doubt turning away customers..."    
            ]
          },
          "enclosedArea" : {
            "default" : [ "My home could use some repairs!" ],
            "human" : [
                "Can you fix the walls? It'll put off new customers like this.",
                "No-one is going to shop here with these damages! Can you help?",
                "My shop needs to be in top condition! Can you help fix it?"
            ],
            "floran" : [
                "There's damagesss to the walls here!",
                "Could you fix my ssstore?",
                "My store could use some fixesss!"    
            ],
            "glitch" : [
                "Unhappy. The damage to my store is going to turn off customers.",
                "Concerned. Broken walls might be turning away potential customers.",
                "Needy. Can you fix my store before it gets worse?"    
            ],
            "avian" : [
                "The damage to my store is causing much concern to me...",
                "The damage to my store is causing much concern to me...",
                "I would appreciate if you could repair the damages to my home.",
                "Hmm, there appears to be a broken wall in my home. Can you fix it?"    
            ],
            "apex" : [
                "Can you assist in the repairs of my store?",
                "There are some damages to my store I wish to report.",
                "The damaged structure of my store is no doubt turning away customers."    
            ],
            "hylotl" : [
                "My store has been damaged. This is unpleasant.",
                "Do you feel something strange with my store? It feels damaged...",
                "I noticed a damaged wall here, perhaps you could assist with repairs?"    
            ]
          },
          "otherDeed" : {
            "default" : [ "I thought this place was for me!" ],
            "human" : [
                "Wasn't this location for me? I can't share the store!",
                "Are you trying to have someone move in to my store?!",
                "Why did you place another deed here?!"
            ],
            "floran" : [
                "Sssomeone else can't move here!",
                "Why isss someone else trying to move in?",
                "I can't ssshare my store space with someone else!"    
            ],
            "glitch" : [
                "Shocked. Are you trying to move another merchant into my store?",
                "Confused. How come someone else is trying to move in?",
                "Sad. I thought I had this shop exclusively for myself."    
            ],
            "avian" : [
                "Why is someone else attempting to move into my store?",
                "Did you put my shop up for rent? This must be a mistake...",
                "There is another deed in my shop - Surely this isn't intentional."    
            ],
            "apex" : [
                "Why is there another deed here? I am meant to have exclusive rights to this store!",
                "Was this home not intended for me? Why is it up for rent again?",
                "I thought this home was exclusively for me. How upsetting."    
            ],
            "hylotl" : [
                "Is a rival merchant trying to move into my shop?",
                "How can I remain calm when another deed is in my shop?",
                "There is another deed in my shop? Surely a mistake has been made?"    
            ]
          },
          "severe" : {
            "default" : [ "I can't sell my wares in these conditions!" ],
            "human" : [
                "I can't sell my wares in these conditions!",
                "These are unacceptable conditions for me to work in...",
                "It is too difficult to sell my products like this!"
            ],
            "floran" : [
                "I can't sssell like thisss!",
                "These conditionsss aren't okay!",
                "You still haven't fixed thingsss in my shop!"    
            ],
            "glitch" : [
                "Annoyed. I wish to sell my wares, but it is difficult under these circumstances.",
                "Frustrated. I wish my requests were listened to.",
                "Unhappy. The fixes to my store haven't been made yet."    
            ],
            "avian" : [
                "This has gone too far, I am greatly discontent with these conditions.",
                "I don't wish to work in these conditions.",
                "Why is my store in the state that it is in?!"    
            ],
            "apex" : [
                "My cries for improvements have gone unanswered...",
                "This shop is not how it was when I moved in...",
                "The condition of my shop is disgraceful, and I feel I am being ignored!"    
            ],
            "hylotl" : [
                "I try to remain calm but it is hard when my requests are left unanswered.",
                "The state of this store is not something I feel is acceptable.",
                "I cannot remain working in a shop with such imperfections..."    
            ]
          },
          "final" : {
            "default" : [ "I've had enough of this!" ],
            "human" : [
                "I've had enough of this!",
                "That's it, I give up. Time to take my business elsewhere!",
                "I give up, I'm going to sell my wares in some other place!"
            ],
            "floran" : [
                "Thisss has gone on long enough!",
                "I am going to sssell somewhere else!",
                "Thisss is unprofessional, I'm going to sssell on another planet!"    
            ],
            "glitch" : [
                "Overwhelmed. Time to find a better shop to sell my wares.",
                "Outraged. I deserve a better shop to do business with.",
                "Upset. With these conditions, it is time that I left to sell somewhere else."    
            ],
            "avian" : [
                "A merchant like myself deserves better. Enough is enough.",
                "It is time I found a better shop.",
                "This store is not how it was when I moved in. It's time I left to find another."    
            ],
            "apex" : [
                "I moved here for a better life, but I can't work like this anymore.",
                "I deserve better working conditions than this!",
                "It saddens me to leave, but my complaints are being ignored."    
            ],
            "hylotl" : [
                "It is time I move on, this shop is not to my standards anymore.",
                "I wished hard that this shop would be good enough, but it simply is not anymore.",
                "Perhaps I shall find another shop that I can sell my beautiful products in."    
            ]
          }
        },
        "arrivedHome" : {
          "beacon" : {
            "default" : [ "I'm home!" ],
            "human" : [
                "You called?",
                "Is there something you need to buy?",
                "Hi! Did you alert because you want to buy something?"
            ],
            "floran" : [
                "You needsss me to sell me sssomething?",
                "Do you need me for sssomething?",
                "Were you sssearching for me?"    
            ],
            "glitch" : [
                "Quizzical. Did you need to buy something, or perhaps sell something?",
                "Friendly. Did you want to chat or buy things from me?",
                "Polite. Did you just come to say hello?"    
            ],
            "avian" : [
                "Did you wish to do business?",
                "Hello again, friend! May Kluex hold you in favour.",
                "I am always glad to see a friendly face."    
            ],
            "apex" : [
                "Did you alert me for business reasons? Perhaps you wished to buy something?",
                "Do you have need of me?",
                "Greetings. Do you have something you wanted to buy?"    
            ],
            "hylotl" : [
                "What would you like to discuss?",
                "Did you wish to trade with me, friend?",
                "Did you need me for my wares?"    
            ]
          },
          "rent" : {
            "default" : [ "Here's a gift for all your help with my shop!" ],
            "human" : [
                "I thought you might like this, friend!",
                "Here's a gift for all your help with my shop!",
                "Take this, for your continued patronage!"
            ],
            "floran" : [
                "Here isss a present for you!",
                "Here'sss something I picked up for you!",
                "Thanksss for your help with my ssstore!"               
            ],
            "glitch" : [
                "Thankful. Here is a gift for your assistance with my business.",
                "Grateful. I got you a gift for helping me with my store.",
                "Hopeful. I hope you like the gift I picked up for you whilst trading!"    
            ],
            "avian" : [
                "Here is a token of my gratitude for your help.",
                "I have brought you a gift.",
                "I hope this offering brings you happiness."    
            ],
            "apex" : [
                "Please accept this gift, for all your assistance.",
                "I have a gift for you for all your help with my business.",
                "For all you have done for my business, take this."    
            ],
            "hylotl" : [
                "My shop is as peaceful as I could hope for. Here is a gift for all you have done.",
                "Accept this as a token of my thanks for your assistance.",
                "I hope this humble gift conveys my appreciation for your help."    
            ]
          }
        }
      }
    },

    "merchant" : {
      "waitTime" : 10,
      "storeRadius" : -1,

      "dialog" : {
        "start" : {
          "default" : [
            "Going spelunking? I've got just the thing!",
            "You'll want some of my supplies if you're going mining.",
            "This stuff is useful for any adventurous cave explorer!"
          ],
          "apex" : {
            "default" : [
              "Hard work pays off, especially with my tools!",
              "Mining, digging, whacking the Miniknog... I've got just the things.",
              "If you need to dig a hole and just get away, I can help!",
              "I've got just the tools for preparing defences against the Miniknog.",
              "Hey pal, how about some tools? Special price, just for you!"
            ]
          },
          "avian" : {
            "default" : [
              "My tools have been blessed by Kluex himself! Maybe!",
              "Be the miner the universe needs. Buy my tools!",
              "All the best tools at all the best prices, that's the Avian way!",
              "Defy the Stargazers. Dig a hole!",
              "Axes, shovels, all sorts of things in my shop."
            ]
          },
          "floran" : {
            "default" : [
              "Floran sssell sssmashy items!",
              "Floran sssell tools, you dig pit, trap beast!",
              "Buy tools, dig hole, find ssshiny!",
              "Floran like ssstabby, but sssmashy sssell well too.",
              "Floran tools best tools. Greenfinger sssay it!"
            ]
          },
          "glitch" : {
            "default" : [
              "Statement. I sell all manner of tools.",
              "Coercive. Buy some tools, go on, you know you want to.",
              "Proud. Glitch tools will never let you down!",
              "Alert. I think I sense gold below, better buy some tools and get digging!",
              "Endearing. My tools are cheap AND useful!"
            ]
          },
          "human" : {
            "default" : [
              "Alright me old mucker? 'Ow's about a pickaxe?",
              "Me tools'll do you right for a spot a' gardenin'.",
              "Get thee down a mine and make yer fortune. Don't ferget to buy me tools!",
              "Only the best tools for me old mate, right?",
              "If it's tools yer want, it's tools I be gettin'."
            ]
          },
          "hylotl" : {
            "default" : [
              "If you insist on filthy pursuits, my tools are superb.",
              "Hylotl tools are a cut above.",
              "Please buy my tools and support my artistic lifestyle.",
              "If you want the best tools, you've come to the right place.",
              "You say tools, I say works of art. Buy some today!"
            ]
          }
        },
        "end" : {
          "default" : [
            "Come on back if you need anything else!",
            "If you need more, you know where to find me!",
            "Be careful now."
          ],
          "apex" : {
            "default" : [
              "Come on back if you need anything else!",
              "If you need more, you know where to find me!",
              "Be careful now."
            ]
          },
          "avian" : {
            "default" : [
              "Come on back soon!",
              "If you need more, I'll be here.",
              "Take care."
            ]
          },
          "floran" : {
            "default" : [
              "Floran hope you not die!",
              "Floran want take more money. Come back sssoon!",
              "Try not get ssstabbed, ssshoppy person!"
            ]
          },
          "glitch" : {
            "default" : [
              "Statement. Return to me if you need more.",
              "Concern. Look after yourself out there.",
              "Opportunistic. Don't forget to stock up regularly."
            ]
          },
          "human" : {
            "default" : [
              "On yer way now, pal.",
              "See yer yon, if'n yer survive!",
              "Godspeed, me little pal."
            ]
          },
          "hylotl" : {
            "default" : [
              "I have no doubt you'll be coming back for more.",
              "Make lots of money out there!",
              "Try not to drop your purse while you're digging!"
            ]
          }
        }
      },

      "categories" : [ "randomguns", "randomswords", "humanarmorblueprints", "humaningredients", "musicalinstruments" ],
      "buyFactorRange" : [ 1.0, 1.0 ],
      "sellFactorRange" : [ 0.2, 0.2 ],
      "numItems" : 15
    },

    "meleeAttack" : {
      "swingDistance" : 5,
      "swingTime" : 0.4,
      "swingCooldownTime" : 0.6,
      "runThreshold" : 9,
      "searchTime" : 10,
      "backoffDistanceRange" : [8.0, 12.0],
      "repositionCooldownTimeRange" : [2.0, 3.0]
    },

    "rangedAttack" : {
      "minDistance" : 10,
      "maxDistance" : 30,
      "coverYOffset" : -1.5,
      "coverYClearanceOffset" : 0.5,
      "coverDistance" : 2.5,
      "coverHideTimeRange" : [0.5, 1.0],
      "coverFireTimeRange" : [1.0, 3.0],
      "attackerSpacing" : 2.5,
      "searchTime" : 10
    }
  },

  "items" : {
    "default" : [
      [0, [
          {
            "chest" : [ "craftsmenchest" ],
            "legs" : [ "craftsmenlegs" ],
            "sheathedprimary" : [ [ "generatedsword", 1, { "definition" : "commondagger" } ] ]
          }
        ] ]
    ]
  },

  "statusControllerSettings" : {
    "statusProperties" : {
      "targetMaterialKind" : "organic"
    },

    "appliesEnvironmentStatusEffects" : false,
    "minimumLiquidStatusEffectPercentage" : 0.1,

    "primaryScriptSources" : [
      "/stats/npc_primary.lua",
      "/scripts/vec2.lua"
    ],
    "primaryScriptDelta" : 5,

    "stats" : {
      "maxHealth" : {
        "baseValue" : 100.0
      },
      "maxEnergy" : {
        "baseValue" : 80.0
      },
      "powerMultiplier" : {
        "baseValue" : 1.0
      },
      "protection" : {
        "baseValue" : 1.0
      },
      "healthRegen" : {
        "baseValue" : 0.0
      },
      "energyRegenPercentageRate" : {
        "baseValue" : 0.585
      },
      "energyRegenBlockDischarge" : {
        "baseValue" : -1.0
      },
      "shieldSuppressed" : {
        "baseValue" : 0.0
      },
      "invulnerable" : {
        "baseValue" : 0.0
      }
    },

    "resources" : {
      "health" : {
        "maxStat" : "maxHealth",
        "deltaStat" : "healthRegen",
        "defaultPercentage" : 1.0
      },
      "energy" : {
        "maxStat" : "maxEnergy",
        "defaultPercentage" : 1.0
      },
      "energyRegenBlock" : {
        "maxValue" : 1.0,
        "deltaStat" : "energyRegenBlockDischarge",
        "initialPercentage" : 0.0
      }
    }
  }
}
