<?xml version="1.0" encoding="utf-8" ?>
<Defs>

  <QuestScriptDef>
    <defName>Beggars</defName>
    <isRootSpecial>true</isRootSpecial>
    <autoAccept>true</autoAccept>
    <defaultCharity>true</defaultCharity>
    <affectedByPopulation>true</affectedByPopulation>
    <hideInvolvedFactionsInfo>true</hideInvolvedFactionsInfo>
    <questNameRules>
      <rulesStrings>

        <!-- quest name single -->
        <li>questName(beggarCount==1)->[beggarSingle] [seekingSingle] [alms]</li>
        <li>questName(beggarCount==1,childCount==1,priority=1)->young [beggarSingle] [seekingSingle] [alms]</li>

        <!-- quest name plural -->
        <li>questName(beggarCount>=2)->[beggarPlural] [seekingPlural] [alms]</li>
        <li>questName(beggarCount>=2,allChildren==true,priority=1)->young [beggarPlural] [seekingPlural] [alms]</li>

        <!-- pieces -->
        <li>beggarSingle->beggar</li>
        <li>beggarSingle->vagabond</li>
        <li>beggarSingle->drifter</li>
        <li>beggarSingle->traveler</li>

        <li>beggarPlural->[beggarSingle]s</li>

        <li>seekingSingle->seeks</li>
        <li>seekingSingle->requests</li>
        <li>seekingSingle->wishes for</li>
        <li>seekingSingle->desires</li>
        <li>seekingSingle->needs</li>
        <li>seekingSingle->hopes for</li>
        <li>seekingPlural->seek</li>
        <li>seekingPlural->request</li>
        <li>seekingPlural->wish for</li>
        <li>seekingPlural->hope for</li>
        <li>seekingPlural->desire</li>
        <li>seekingPlural->need</li>

        <li>alms->alms</li>
        <li>alms->aid</li>
        <li>alms->charity</li>
        <li>alms->resources</li>

      </rulesStrings>
    </questNameRules>
    <questDescriptionRules>
      <rulesStrings>

        <!-- misc -->
        <li>groupLabelPlural->travelers</li>
        <li>groupLabelPlural(allChildren==true,priority=1)->children</li>
        <li>groupLabelSingle->traveler</li>
        <li>groupLabelSingle(childCount>=1,priority=1)->child</li>

        <li>travelerInfo(beggarCount==1)->This [groupLabelSingle] is</li>
        <li>travelerInfo(beggarCount>=2)->These [groupLabelPlural] are</li>

        <li>beggingForInfo->for x[requestedThingCount] [requestedThing_label]</li>

        <li>traverObjective(beggarCount==1)->[beggars0_objective]</li>
        <li>traverObjective(beggarCount>=2)->them</li>
        
        <!-- quest description -->
        <li>questDescription->[approachInfo]. [requestInfo]. [claimInfo].\n\n[interactionInfo].\n\n[moveOnInfo].\n\n[travelerInfo] not part of any faction. If you wish, you can choose to kill, arrest, sell, or harvest [traverObjective], without diplomatic consequences.</li>

        <li>approachInfo(beggarCount==1)->A poor [groupLabelSingle] named [beggars0_nameDef] is approaching looking for help</li>
        <li>approachInfo(beggarCount>=2)->A group of poor [groupLabelPlural] are approaching looking for help</li>
        <li>approachInfo(beggarCount>=2,childCount==1,priority=1)->A group of poor [groupLabelPlural] including a child are approaching looking for help</li>
        <li>approachInfo(beggarCount>=2,childCount>=2,allChildren==false,priority=1)->A group of poor [groupLabelPlural] including some children are approaching looking for help</li>

        <li>requestInfo(beggarCount==1)->[beggars0_nameDef] is begging [beggingForInfo]</li>
        <li>requestInfo(beggarCount>=2)->The [groupLabelPlural] are begging [beggingForInfo]</li>

        <li>claimInfo(beggarCount==1,requestedThingDefName==Silver)->[beggars0_nameDef] wants the silver to pay off a debt to a gang of pirates who are hunting [beggars0_objective]</li>
        <li>claimInfo(beggarCount==1,requestedThingDefName==Silver,childCount==1,priority=1)->[beggars0_nameDef] wants the silver to pay off a butcher who claims he will chop off [beggars0_nameDef]'s arm as recompense for some meat scraps [beggars0_nameDef] stole while on the brink of starvation</li>
        <li>claimInfo(beggarCount==1,requestedThingDefName==MedicineHerbal)->[beggars0_nameDef] needs the medicine to help a traveler who is injured nearby</li>
        <li>claimInfo(beggarCount==1,requestedThingDefName==MedicineHerbal,childCount==1,priority=1)->[beggars0_nameDef] needs the medicine to help [beggars0_possessive] baby brother who is injured nearby</li>
        <li>claimInfo(beggarCount==1,requestedThingDefName==MedicineIndustrial)->[beggars0_nameDef] wants the medicine to save [beggars0_possessive] loyal pet who was injured on the road</li>
        <li>claimInfo(beggarCount==1,requestedThingDefName==Penoxycyline)->[beggars0_nameDef] needs [requestedThing_label] to inoculate a sickly friend against deadly diseases</li>
        <li>claimInfo(beggarCount==1,requestedThingDefName==Beer)->[beggars0_nameDef] wants it to drown [beggars0_possessive] sorrows after losing a fellow traveler in a terrible accident</li>
        <li>claimInfo(beggarCount==1,requestedThingDefName==Beer,childCount==1,priority=1)->[beggars0_nameDef] wants the [requestedThing_label] to placate [beggars0_possessive] drunk father who becomes belligerent if he is unable to satisfy his alcoholic cravings</li>

        <li>claimInfo(beggarCount>=2,requestedThingDefName==Silver)->They want the silver so they can buy back a friend who was recently kidnapped</li>
        <li>claimInfo(beggarCount>=2,requestedThingDefName==MedicineHerbal)->They need the medicine to attempt a life-saving operation on a fellow traveler who was attacked by mechanoids</li>
        <li>claimInfo(beggarCount>=2,requestedThingDefName==MedicineHerbal,allChildren==true,priority=1)->They need the medicine for a remedy that a herbalist said could help a sick friend who has an intense fever and has been coughing up blood</li>
        <li>claimInfo(beggarCount>=2,requestedThingDefName==MedicineIndustrial)->They need the medicine to help their friends at a nearby settlement that was devasted by raiders</li>
        <li>claimInfo(beggarCount>=2,requestedThingDefName==Penoxycyline)->They want [requestedThing_label] so they can travel safely while looking for a new place to call home</li>
        <li>claimInfo(beggarCount>=2,requestedThingDefName==Beer)->They want [requestedThing_label] to help them drown their sorrows after losing their home in a terrible attack</li>
        <li>claimInfo(beggarCount>=2,requestedThingDefName==Beer,allChildren==true,priority=1)->They hope to use the [requestedThing_label] in an elaborate plan to free a member of their group from the captivity of child slavers by getting the slavers intoxicated before staging a break out</li>

        <li>interactionInfo(beggarCount==1)->You can give items to [beggars0_nameDef] by selecting a colonist and right-clicking on [beggars0_objective]</li>
        <li>interactionInfo(beggarCount>=2)->You can give items to the [groupLabelPlural] by selecting a colonist and right-clicking on [beggars0_nameDef]</li>

        <li>moveOnInfo(beggarCount==1)->[beggars0_nameDef] will move on after [visitDurationTicks_duration]</li>
        <li>moveOnInfo(beggarCount>=2)->The [groupLabelPlural] will move on after [visitDurationTicks_duration]</li>

      </rulesStrings>
    </questDescriptionRules>
    <questContentRules>
      <rulesStrings>
        
        <!-- letters -->
        <li>letterLabelBeggarsBetrayed->[groupLabelSingleOrPlural] betrayed</li>
        <li>letterTextBeggarsBetrayed->The [groupLabelSingleOrPlural] who [wasWere] seeking your charity [hasHave] been betrayed. Colonists with charitable beliefs will be unhappy.</li>

        <!-- pieces -->
        <li>hasHave(beggarCount==1)->has</li>
        <li>hasHave(beggarCount>=2)->have</li>

        <li>wasWere(beggarCount==1)->was</li>
        <li>wasWere(beggarCount>=2)->were</li>

        <li>groupLabelSingleOrPlural(beggarCount==1)->traveler</li>
        <li>groupLabelSingleOrPlural(beggarCount>=2)->travelers</li>

      </rulesStrings>
    </questContentRules>
    <root Class="QuestNode_Root_Beggars" />
  </QuestScriptDef>

</Defs>