diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 006a03f..579171b 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants_Configurable.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants_Configurable.xml index 6540a37..66409ee 100644 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants_Configurable.xml +++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Mutants_Configurable.xml @@ -90,11 +90,18 @@ true
  • - - ARA_MimicNematodeShambler 0.7
  • + + +
  • + + ARA_SymbioticStabilizer + + + 0.8 +
  • diff --git a/1.6/1.6/Defs/Thing_Misc/ARA_Drugs.xml b/1.6/1.6/Defs/Thing_Misc/ARA_Drugs.xml new file mode 100644 index 0000000..61e3b7e --- /dev/null +++ b/1.6/1.6/Defs/Thing_Misc/ARA_Drugs.xml @@ -0,0 +1,169 @@ + + + + + + + ARA_PheromoneSolvent + + 一种合成的化学制剂,能够模拟阿拉克涅虫群内部用于区分敌我的信息素。定期注射可以欺骗宿主体内的寄生虫,使其进入休眠的共生状态,从而抑制其致命的增殖行为。 + + ARA_SymbioticStabilizer + ARA_MimicNematode + + + Things/Item/Drug/WakeUp + Graphic_StackCount + (1.0, 0.647, 0.0, 0.5) + + false + + 1000 + 50 + 0.01 + + Industrial + + Medical + +
  • + ARA_SymbioticStabilizer + 1.0 +
  • + + + + MedicineProduction + +
  • DrugLab
  • +
    +
    + + 2 + 5 + + +
  • + ARA_Pheromone + 0.05 + 1 + 1000 +
  • +
    + + + + + + ARA_SymbioticStabilizer + + 一种信息素抑制效果 + 阿拉克涅信息素溶剂的效果正在生效,它模拟了虫群的共生信号,抑制了体内寄生体的活性。 + HediffWithComps + (0.7, 1.0, 0.7) + false + +
  • + -0.34 + true +
  • +
    +
    + + + + + ARA_NematodeEgg + + 一个经过特殊处理的阿拉克涅拟线种虫卵,可以被直接服用。服用后,虫卵会迅速在宿主体内孵化并释放大量阿拉克涅拟线虫,导致极其严重的感染。 + + ARA_MimicNematode + + + Things/Item/Drug/Luciferium + Graphic_StackCount + (100,50,100) + + + 75 + 0.05 + + Industrial + + None + AnimalProduct + +
  • + ARA_MimicNematode + 0.5 +
  • +
    +
    + +
    + + + + + ARA_Pheromone + + ARA_PheromoneAddiction + + + + Chemical_ARA_Pheromone + Need_Chemical + + 由于长期使用阿拉克涅信息素溶剂,此人的身体已经习惯了这种外部信息素的存在。如果中断使用,体内的拟线虫将因为失去抑制而猛烈反扑。 + 0.333 + 50 + + + + ARA_PheromoneAddiction + + 对阿拉克涅信息素溶剂产生了化学依赖。需要定期使用来维持体内的拟线虫生态平衡,否则会产生严重的戒断反应。 + Hediff_Addiction + Chemical_ARA_Pheromone + +
  • + +
  • +
  • + + +
  • + Consciousness + -0.1 +
  • + + + +
  • + ARA_MimicNematode + 1 + 0.1~0.2 +
  • +
    + +
    +
    + + + ARA_PheromoneWithdrawal + ThoughtWorker_Hediff + ARA_PheromoneAddiction + true + +
  • + false +
  • +
  • + + 我感觉很糟糕,体内的某些东西正在变得活跃......我需要信息素溶剂。 + -15 +
  • +
    +
    + + \ No newline at end of file diff --git a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj index cd753c7..4c6332d 100644 --- a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj +++ b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj @@ -191,6 +191,7 @@ + diff --git a/Source/ArachnaeSwarm/HediffGiver_RandomWithSeverity.cs b/Source/ArachnaeSwarm/HediffGiver_RandomWithSeverity.cs new file mode 100644 index 0000000..5c96c00 --- /dev/null +++ b/Source/ArachnaeSwarm/HediffGiver_RandomWithSeverity.cs @@ -0,0 +1,54 @@ +using Verse; + +namespace ArachnaeSwarm +{ + /// + /// A custom HediffGiver that is similar to HediffGiver_Random, + /// but allows specifying a random severity range for the given hediff. + /// + public class HediffGiver_RandomWithSeverity : HediffGiver + { + // XML configurable fields + public float mtbDays; + public FloatRange severityRange = new FloatRange(0.01f, 1f); + + public override void OnIntervalPassed(Pawn pawn, Hediff cause) + { + // Calculate the chance based on Mean Time Between (MTB) days and pawn-specific factors + float mtb = this.mtbDays; + float chanceFactor = ChanceFactor(pawn); + if (chanceFactor != 0f && Rand.MTBEventOccurs(mtb / chanceFactor, 60000f, 60f)) + { + // Try to apply the hediff with our custom logic + if (TryApplyWithCustomSeverity(pawn)) + { + // If successful, send a letter to the player + SendLetter(pawn, cause); + } + } + } + + /// + /// Applies the hediff and then sets its severity to a random value within the specified range. + /// + /// The pawn to apply the hediff to. + /// True if the hediff was successfully applied, false otherwise. + private bool TryApplyWithCustomSeverity(Pawn pawn) + { + // First, apply the hediff using the base class logic. + // This will add the hediff with its default initial severity. + if (base.TryApply(pawn)) + { + // If the hediff was successfully added, find it. + Hediff hediff = pawn.health.hediffSet.GetFirstHediffOfDef(this.hediff); + if (hediff != null) + { + // Set its severity to a random value from our configured range. + hediff.Severity = this.severityRange.RandomInRange; + return true; + } + } + return false; + } + } +} \ No newline at end of file