This commit is contained in:
2025-09-10 11:25:51 +08:00
parent 64fd63796d
commit 54de15873f
5 changed files with 278 additions and 2 deletions

Binary file not shown.

View File

@@ -54,6 +54,16 @@
</additionalHediffsThisPart>
</DamageDef>
<DamageDef ParentName="Bite">
<defName>ARA_MimicNematodeBite</defName>
<additionalHediffs>
<li>
<hediff>ARA_MimicNematode</hediff>
<severityPerDamageDealt>0.001</severityPerDamageDealt>
</li>
</additionalHediffs>
</DamageDef>
<DamageDef>
<defName>ARA_ReinforceGas</defName>
<label>信息素烟雾</label>

View File

@@ -196,4 +196,143 @@
<li Class="HediffCompProperties_DisappearsOnDeath"/>
</comps>
</HediffDef>
<HediffDef>
<defName>ARA_MimicNematode</defName>
<label>拟线种虫族寄生</label>
<description>被阿拉克涅拟线种虫族寄生了,如果不加以干预,拟线虫最终会杀死宿主并将其转化为没有意识的寄生体。拟线虫会通过寄生体的攻击行为感染其他躯体。</description>
<!-- 1. 指向我们创建的包含Comp的Hediff类 -->
<hediffClass>ArachnaeSwarm.Hediff_NecroticVirus</hediffClass>
<defaultLabelColor>(0.6, 0.4, 0.8)</defaultLabelColor>
<isBad>true</isBad>
<maxSeverity>1.0</maxSeverity>
<lethalSeverity>1.0</lethalSeverity>
<minSeverity>0.001</minSeverity>
<initialSeverity>0.001</initialSeverity>
<everCurableByItem>false</everCurableByItem>
<stages>
<li>
<label>潜伏期</label>
<becomeVisible>false</becomeVisible>
<vomitMtbDays>5</vomitMtbDays>
</li>
<li>
<label>活跃期</label>
<minSeverity>0.5</minSeverity>
<vomitMtbDays>1</vomitMtbDays>
<painFactor>0.5</painFactor>
<becomeVisible>false</becomeVisible>
<capMods>
<li>
<capacity>Talking</capacity>
<postFactor>0</postFactor>
</li>
</capMods>
</li>
<li>
<label>终末期</label>
<minSeverity>0.7</minSeverity>
<deathMtbDays>0.5</deathMtbDays>
<painFactor>0</painFactor>
<lifeThreatening>true</lifeThreatening>
<becomeVisible>true</becomeVisible>
<capMods>
<li>
<capacity>Talking</capacity>
<postFactor>0</postFactor>
</li>
<li>
<capacity>Consciousness</capacity>
<postFactor>0.7</postFactor>
</li>
</capMods>
</li>
<li>
<label>即将转化</label>
<minSeverity>0.9</minSeverity>
<deathMtbDays>0.5</deathMtbDays>
<painFactor>2.0</painFactor>
<lifeThreatening>true</lifeThreatening>
<becomeVisible>true</becomeVisible>
<capMods>
<li>
<capacity>Talking</capacity>
<postFactor>0</postFactor>
</li>
<li>
<capacity>Consciousness</capacity>
<setMax>0.1</setMax>
</li>
</capMods>
</li>
</stages>
<tendable>true</tendable>
<!-- 2. 这是最关键的配置部分 -->
<comps>
<li Class="HediffCompProperties_SeverityPerDay">
<severityPerDay>0.3</severityPerDay>
</li>
<li Class="HediffCompProperties_TendDuration">
<severityPerDayTended>-1</severityPerDayTended>
<baseTendDurationHours>24</baseTendDurationHours>
</li>
<li Class="HediffCompProperties_Disappears">
<disappearsAfterTicks>1800000~2400000</disappearsAfterTicks> <!-- 30 ! 45 days -->
<showRemainingTime>true</showRemainingTime>
</li>
<li Class="ArachnaeSwarm.HediffCompProperties_NecroticTransformation">
<!-- 3. 在这里指定你希望转化成的MutantDef的defName -->
<!-- 例如: Shambler, Ghoul, 或者您自己定义的其他变异体 -->
<mutantDef>Shambler</mutantDef>
</li>
</comps>
<modExtensions>
<li Class="ArachnaeSwarm.ProphecyGearEffect">
<!-- 只有当攻击者同时拥有'ARA_MimicNematode'这个仿生体时,以下效果才会触发 -->
<requiredBionicHediff>ARA_MimicNematode</requiredBionicHediff>
<!-- 额外造成5%的'ARA_MimicNematodeBite'伤害 -->
<enableExtraDamage>true</enableExtraDamage>
<extraDamageFactor>0.05</extraDamageFactor>
<extraDamageType>ARA_MimicNematodeBite</extraDamageType>
</li>
</modExtensions>
</HediffDef>
<RecipeDef ParentName="SurgeryFlesh">
<defName>ARA_CureBloodRot</defName>
<label>清除拟线虫感染</label>
<description>通过多种药物联合靶向治疗清除患者体内的阿拉克涅拟线种虫族感染。</description>
<workerClass>Recipe_RemoveHediff</workerClass>
<jobString>清除拟线虫感染.</jobString>
<workAmount>2000</workAmount>
<hideBodyPartNames>true</hideBodyPartNames>
<isViolation>false</isViolation>
<targetsBodyPart>false</targetsBodyPart>
<removesHediff>ARA_MimicNematode</removesHediff>
<successfullyRemovedHediffMessage>{0} 成功清除了 {1} 体内的拟线虫感染.</successfullyRemovedHediffMessage>
<skillRequirements>
<Medicine>5</Medicine>
</skillRequirements>
<ingredients>
<li>
<filter>
<thingDefs>
<li>MedicineUltratech</li>
</thingDefs>
</filter>
<count>10</count>
</li>
</ingredients>
<fixedIngredientFilter>
<categories>
<li>Medicine</li>
</categories>
</fixedIngredientFilter>
</RecipeDef>
</Defs>

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<Defs>
<MutantDef ParentName="BaseMutantEntity">
<defName>ARA_MimicNematodeShambler</defName>
<label>MimicNematode shambler</label>
<description>A creature who has been raised from the dead by corrupted nano-scale archites.\n\nAbout shamblers: Shamblers are corpses which have been reanimated by archotechnology. They attack living creatures relentlessly and their immunity to pain makes them difficult to kill. However, the archites which animate them cannot sustain the rotting body for long, so shamblers expire after a few days of movement.\n\nThere are ways to raise your own shamblers and make yourself invisible to them, so they attack only outsiders.</description>
<hediff>Shambler</hediff>
<thinkTree>Shambler</thinkTree>
<thinkTreeConstant>ShamblerConstant</thinkTreeConstant>
<hideLabel>true</hideLabel>
<namePrefix>shambler </namePrefix>
<useCorpseGraphics>true</useCorpseGraphics>
<isConsideredCorpse>true</isConsideredCorpse>
<bloodDef>Filth_DarkBlood</bloodDef>
<bloodSmearDef>Filth_DarkBloodSmear</bloodSmearDef>
<entitledToMedicalCare>false</entitledToMedicalCare>
<removeAllInjuries>true</removeAllInjuries>
<restoreLegs>true</restoreLegs>
<defaultFaction>Entities</defaultFaction>
<standingAnimation>ShamblerSway</standingAnimation>
<canOpenDoors>false</canOpenDoors>
<makesFootprints>false</makesFootprints>
<tameable>false</tameable>
<clearMutantStatusOnDeath>true</clearMutantStatusOnDeath>
<canTravelInCaravan>false</canTravelInCaravan>
<canAttackWhileCrawling>true</canAttackWhileCrawling>
<respectsAllowedArea>false</respectsAllowedArea>
<disableFlying>true</disableFlying>
<canGainXP>false</canGainXP>
<canBeDrafted>false</canBeDrafted>
<disableHostilityResponse>true</disableHostilityResponse>
<deathOnDownedChance>0.25</deathOnDownedChance>
<woundColor>(0.3, 0.3, 0.0, 1.0)</woundColor>
<anomalyKnowledgeOffset>0</anomalyKnowledgeOffset>
<knowledgeCategory>Basic</knowledgeCategory>
<codexEntry>Shambler</codexEntry>
<!-- Sounds -->
<soundAttackChance>0.25</soundAttackChance>
<soundCall>Pawn_Shambler_Call</soundCall>
<soundAttack>Pawn_Shambler_Attack</soundAttack>
<soundWounded>Pawn_Shambler_Wounded</soundWounded>
<soundDeath>Pawn_Shambler_Killed</soundDeath>
<!-- Rendering -->
<renderNodeProperties>
<li Class="PawnRenderNodeProperties_Overlay">
<debugLabel>Shambler wounds</debugLabel>
<workerClass>PawnRenderNodeWorker_OverlayShambler</workerClass>
<overlayLayer>Body</overlayLayer>
<baseLayer>20</baseLayer>
<pawnType>HumanlikeOnly</pawnType>
</li>
<li>
<debugLabel>Shambler wounds</debugLabel>
<nodeClass>PawnRenderNode_AnimalPart</nodeClass>
<workerClass>PawnRenderNodeWorker_OverlayShambler</workerClass>
<overlayLayer>Body</overlayLayer>
<baseLayer>20</baseLayer>
<pawnType>NonHumanlikeOnly</pawnType>
</li>
</renderNodeProperties>
<tools>
<li>
<label>teeth</label>
<capacities>
<li>Bite</li>
</capacities>
<power>8.2</power>
<cooldownTime>2</cooldownTime>
<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
<chanceFactor>1</chanceFactor>
<soundMeleeHit>Pawn_Melee_HumanBite_Hit</soundMeleeHit>
<soundMeleeMiss>Pawn_Melee_HumanBite_Miss</soundMeleeMiss>
</li>
<li>
<label>left hand</label>
<labelNoLocation>hand</labelNoLocation>
<capacities>
<li>Scratch</li>
</capacities>
<power>7.0</power>
<cooldownTime>2</cooldownTime>
<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
<chanceFactor>1.5</chanceFactor>
<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
</li>
<li>
<label>right hand</label>
<labelNoLocation>hand</labelNoLocation>
<capacities>
<li>Scratch</li>
</capacities>
<power>7.0</power>
<cooldownTime>2</cooldownTime>
<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
<chanceFactor>1.5</chanceFactor>
<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
</li>
</tools>
</MutantDef>
<PawnKindDef ParentName="MutantBase" Name="ARA_ShamblerBase" Abstract="True">
<mutant>Shambler</mutant>
<generateInitialNonFamilyRelations>false</generateInitialNonFamilyRelations>
</PawnKindDef>
<PawnKindDef ParentName="ARA_ShamblerBase">
<defName>ARA_MimicNematodeShamblerSwarmer</defName>
<label>shambler swarmer</label>
<combatPower>40</combatPower>
<gearHealthRange>0.2~0.4</gearHealthRange>
<itemQuality>Poor</itemQuality>
<apparelMoney>0~100</apparelMoney>
<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
<apparelTags>
<li>IndustrialBasic</li>
<li>Neolithic</li>
</apparelTags>
<meleeAttackInfectionPathways>
<li>EntityAttacked</li>
</meleeAttackInfectionPathways>
</PawnKindDef>
</Defs>

View File

@@ -58,8 +58,10 @@ namespace ArachnaeSwarm
pawn.SetFaction(faction);
}
// 立即执行转变
pawn.mutant.Turn(clearLord: true);
// 移除 pawn.mutant.Turn(clearLord: true);
// Turn() 方法应该由 Hediff_Shambler.FinishRising() 在复活过程的最后阶段调用,
// 而不应该由我们在这里手动调用。
// Hediff_Shambler 的 StartRising() 会启动这个流程。
}
}
}