<?xml version="1.0" encoding="utf-8"?>
<Defs>
  <AbilityDef ParentName="AbilityTouchBase">
    <defName>ARA_BindDrone</defName>
    <label>信息素标记</label>
    <description>使用信息素标记一只阿拉克涅督虫，受到标记的督虫和其麾下的辅虫将誓死效忠于女皇种，并与其建立心灵链接。</description>
    <iconPath>UI/Commands/EggSpew</iconPath> <!-- Placeholder: You'll need to create this icon -->
    
    <jobDef>CastAbilityOnThing</jobDef>
    <targetRequired>true</targetRequired>
    <cooldownTicksRange>60</cooldownTicksRange> <!-- 1 second cooldown -->

    <verbProperties>
      <verbClass>Verb_CastAbility</verbClass>
      <warmupTime>0</warmupTime>
      <range>99</range>
      <targetParams>
        <canTargetPawns>true</canTargetPawns>
        <canTargetBuildings>false</canTargetBuildings>
        <canTargetAnimals>true</canTargetAnimals>
        <canTargetMechs>false</canTargetMechs>
        <canTargetCorpses>false</canTargetCorpses>
        <canTargetSelf>false</canTargetSelf>
      </targetParams>
    </verbProperties>

    <comps>
      <li Class="ArachnaeSwarm.CompProperties_AbilityBindDrone">
        <!-- No custom properties needed for now -->
      </li>
    </comps>
  </AbilityDef>

  
  <AbilityDef>
    <defName>ARA_EggSpew</defName>
    <label>生育虫卵</label>
    <description>从卵巢中排出一颗休眠的虫卵，阿拉克涅女皇种可以通过与其交互将其激活，并选择孵化的督虫虫族类型——参阅虫卵的具体信息，了解各个督虫的特点。</description>
    <iconPath>UI/Commands/EggSpew</iconPath>
    <cooldownTicksRange>5000</cooldownTicksRange>
    <aiCanUse>true</aiCanUse>
    <displayOrder>300</displayOrder>
    <displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
    <disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
    <warmupStartSound>AcidSpray_Warmup</warmupStartSound>
    <verbProperties>
      <verbClass>Verb_CastAbility</verbClass>
      <range>1</range>
      <warmupTime>12</warmupTime>
      <soundCast>AcidSpray_Resolve</soundCast>
      <violent>false</violent>
      <targetable>false</targetable>
      <targetParams>
        <canTargetSelf>True</canTargetSelf>
      </targetParams>
    </verbProperties>
    <comps>
      <li Class="CompProperties_AbilityLaunchProjectile">
        <projectileDef>ARA_Proj_EggSac</projectileDef>
      </li>
      <li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
        <needDef>Food</needDef>
        <needCost>4</needCost>
        <failMessage>营养值不足，需要进食</failMessage>
      </li>
      <li Class="ArachnaeSwarm.CompProperties_AbilityBodyPartCheck">
        <requiredPart>ARA_Ovary</requiredPart>
        <failMessage>卵巢受损或缺失，无法生育</failMessage>
      </li>
    </comps>
  </AbilityDef>
  <AbilityDef>
    <defName>ARA_AcidSprayBurst</defName>
    <label>女皇种酸液轰炸</label>
    <description>阿拉克涅女皇种向目标地点喷射大量腐蚀性酸液，喷射将持续数秒以完全覆盖一片区域。</description>
    <iconPath>UI/Abilities/AcidSpray</iconPath>
    <cooldownTicksRange>5000</cooldownTicksRange> <!-- 2 hours -->
    <aiCanUse>true</aiCanUse>
    <displayOrder>300</displayOrder>
    <displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
    <disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
    <warmupStartSound>AcidSpray_Warmup</warmupStartSound>
    <verbProperties>
      <verbClass>Verb_CastAbility</verbClass>
      <range>32.9</range>
      <warmupTime>2</warmupTime>
      <soundCast>AcidSpray_Resolve</soundCast>
      <targetParams>
        <canTargetLocations>true</canTargetLocations>
      </targetParams>
    </verbProperties>
    <comps>
      <li Class="ArachnaeSwarm.CompProperties_AbilitySprayLiquidMulti">
        <!-- CompProperties_AbilitySprayLiquid 的属性 -->
        <projectileDef>ARA_Proj_StrongSludgeSpray</projectileDef>
        <numCellsToHit>13</numCellsToHit>
        <sprayEffecter>AcidSpray_Directional</sprayEffecter>

        <!-- CompProperties_AbilitySprayLiquidMulti 新增的属性 -->
        <shotCount>32</shotCount> <!-- 总共发射5次 -->
        <ticksBetweenShots>3</ticksBetweenShots> <!-- 每次发射间隔12 Ticks (0.2秒) -->
      </li>
       <li Class="ArachnaeSwarm.CompProperties_AbilityNeedCost">
        <needDef>Food</needDef>
        <needCost>0.5</needCost>
        <failMessage>营养值不足，需要进食</failMessage>
      </li>
      <li Class="ArachnaeSwarm.CompProperties_AbilityBodyPartCheck">
        <requiredPart>ARA_Acid_sac</requiredPart>
        <failMessage>酸囊受损或缺失，无法喷射酸液</failMessage>
      </li>
    </comps>
  </AbilityDef>

  <ThingDef>
    <defName>ARA_Proj_StrongSludgeSpray</defName>
    <label>阿拉克涅虫族酸液</label>
    <thingClass>Projectile_Liquid</thingClass>
    <category>Projectile</category>
    <tickerType>Normal</tickerType>
    <altitudeLayer>Projectile</altitudeLayer>
    <useHitPoints>False</useHitPoints>
    <neverMultiSelect>True</neverMultiSelect>
    <graphicData>
      <texPath>Things/Projectile/SludgeSpray</texPath>
      <graphicClass>Graphic_Random</graphicClass>
      <shaderType>MoteGlow</shaderType>
      <drawSize>0.85</drawSize>
    </graphicData>
    <projectile>
      <damageDef>ARA_AcidBurn</damageDef>
      <speed>25</speed>
      <damageAmountBase>2</damageAmountBase>
      <arcHeightFactor>0.4</arcHeightFactor>
      <armorPenetrationBase>0.1</armorPenetrationBase>
      <stoppingPower>1</stoppingPower>
      <shadowSize>0</shadowSize>
      <spawnTerrain>ARA_InsectSludge</spawnTerrain>
      <terrainChance>0.75</terrainChance>
      <filth>Filth_Slime</filth>
      <filthCount>1</filthCount>
      <filthChance>0.25</filthChance>
    </projectile>
  </ThingDef>
  <ThingDef ParentName="BaseGrenadeProjectile">
    <defName>ARA_Proj_EggSac</defName>
    <label>阿拉克涅虫卵</label>
    <thingClass>Projectile_SpawnsThing</thingClass>
    <graphicData>
      <texPath>ArachnaeSwarm/Building/ARA_EggSac</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <projectile>
      <damageDef>Bullet</damageDef>
      <speed>21</speed>
      <damageAmountBase>0</damageAmountBase>
      <spawnsThingDef>ARA_InteractiveEggSac</spawnsThingDef>
      <tryAdjacentFreeSpaces>true</tryAdjacentFreeSpaces>
    </projectile>
  </ThingDef>
</Defs>