diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index a5e70d1..c64d117 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/Assemblies/FacialAnimation.dll b/1.6/1.6/Assemblies/FacialAnimation.dll index 9d7d61e..6c7f826 100644 Binary files a/1.6/1.6/Assemblies/FacialAnimation.dll and b/1.6/1.6/Assemblies/FacialAnimation.dll differ diff --git a/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml b/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml index 3a3155d..b617113 100644 --- a/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml +++ b/1.6/1.6/Defs/AbilityDefs/ARA_Abilities.xml @@ -96,7 +96,7 @@ ARA_TumorSpew - 排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动,并阻碍敌军的前进。 + 排出一枚菌瘤,将附近的大片地区转变为菌毯地形,以方便虫群进行活动。 ArachnaeSwarm/UI/Abilities/ARA_TumorSpew 5000 false @@ -134,6 +134,11 @@ ARA_Proj_Tumor + + ArachnaeSwarm/Building/ARA_Tumor + Graphic_Single + 1.2 + ARA_Tumor_Smokepop @@ -571,6 +576,101 @@ --> + + + ARA_Smokepop_Creeper_Ability_On + + 启动该阿拉克涅王虫种的菌毯铺设能力,会每隔一段时间就将附近的地形转变为阿拉克涅菌毯。此外,任何靠近该王虫种的敌军会遭到其菌瘤腔管的自动攻击,菌瘤腔管会发射能够改变地形以铺设菌毯的菌瘤射弹。 + ArachnaeSwarm/UI/Abilities/ARA_Smokepop_Creeper_Ability_On + 601 + false + true + true + false + + Verb_CastAbility + 0 + false + false + false + + true + + + + +
  • + ArachnaeSwarm.CompAbilityEffect_GiveSwitchHediff + ARA_Smokepop_Creeper_Hediff + true +
  • +
    +
    + + ARA_Smokepop_Creeper_Ability_Off + + 关闭该阿拉克涅王虫种的菌毯铺设能力,不再尝试改变附近的地形。 + ArachnaeSwarm/UI/Abilities/ARA_Smokepop_Creeper_Ability_Off + 601 + false + true + true + false + + Verb_CastAbility + 0 + false + false + false + + true + + + +
  • + ArachnaeSwarm.CompAbilityEffect_RemoveSwitchHediff + ARA_Smokepop_Creeper_Hediff + true +
  • +
    +
    + + ARA_Tumorthrow + + 将一枚菌瘤投射到目标地点,将附近的大片地区转变为菌毯地形,以方便虫群进行活动。 + ArachnaeSwarm/UI/Abilities/ARA_TumorSpew + 5000 + false + 300 + true + false + false + AcidSpray_Warmup + + Verb_CastAbility + 36 + 1 + AcidSpray_Resolve + false + false + + True + True + + + +
  • + 饮食 + true + Food + 0.2 + 营养值不足,需要进食 +
  • +
  • + ARA_Proj_Tumor +
  • +
    +
    @@ -1399,7 +1499,7 @@ 601 false true - false + true false Verb_CastAbility @@ -1428,7 +1528,7 @@ 601 false true - false + true false Verb_CastAbility diff --git a/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml b/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml index d7c72ec..0e97ce3 100644 --- a/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml +++ b/1.6/1.6/Defs/EvolutionDefs/ARA_Evolution.xml @@ -947,11 +947,13 @@
  • ARA_Ability_Smokepop
  • ARA_Smokepop_Production_Bacterium
  • +
  • ARA_Smokepop_Creeper
  • ARA_Smokepop_Production_Bacterium
  • +
  • ARA_Smokepop_Creeper
  • @@ -1060,6 +1062,104 @@ + + ARA_Smokepop_Creeper + + 使迷雾种发生内驱性进化,以牺牲喷射信息素为代价,使其获得额外防御力、移动速度和大范围、高速铺设菌毯的能力。\n\n该进化过程不可逆! + ArachnaeSwarm/UI/Abilities/ARA_Smokepop_Production_Bacterium + 1800 + false + true + true + false + false + true + false + CastAbilityOnThing + + Verb_CastAbility + 1 + 12 + AcidSpray_Resolve + false + false + + True + + + +
  • + CompAbilityEffect_GiveHediff + ARA_Smokepop_Creeper + True + true + 1 +
  • +
  • + ARA_Technology_3CRP + 需要科技 节点CRP-3"菌毯铺设" 以解锁进化 +
  • +
    +
    + + ARA_Smokepop_Creeper + + 这只阿拉克涅迷雾种已经获得拔耀,可以一边移动一边在周围铺设菌毯,以改造巢穴周边的地形或建立一条侵略其他定居点的路径。此外,它也获得了向敌方投射菌瘤的能力。 + HediffWithComps + (0.6, 0.4, 0.8) + false + false + 1.0 + +
  • + PawnRenderNode_AttachmentHead + PawnRenderNodeWorker_FlipWhenCrawling + ArachnaeSwarm/Things/ARA_HiveNode/Addons/ArachnaeNode_Race_Addons_Smokepop_Armor + Body + false + false + Fresh, Rotting + 0.85 + + + (0, 0, 0) + -400 + + + (0, 0, 0) + + + (0, 0, 0) + + + (0, 0, 0) + + + 800 + + +
  • +
    + +
  • + 0.01 + + 1 + 0.25 + 0.25 + +
  • +
    + +
  • + +
  • ARA_Smokepop_Creeper_Ability_On
  • +
  • ARA_Smokepop_Creeper_Ability_Off
  • +
  • ARA_Tumorthrow
  • + + +
    +
    diff --git a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Terrain.xml b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Terrain.xml index 40da5d8..e7ed1e6 100644 --- a/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Terrain.xml +++ b/1.6/1.6/Defs/HediffDefs/ARA_Hediffs_Terrain.xml @@ -265,4 +265,28 @@ + + + ARA_Smokepop_Creeper_Hediff + + 阿拉克涅王虫种正在铺设菌毯,每隔一段时间都会改变附近的地形。 + HediffWithComps + (0.6, 0.4, 0.8) + false + false + 1.0 + +
  • + 0 +
  • +
    + +
  • + ARA_InsectCreep + 8 + 60 + true +
  • +
    +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml b/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml index 63dd411..ce6bf65 100644 --- a/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml +++ b/1.6/1.6/Defs/ResearchProjectDefs/ARA_ResearchProjects.xml @@ -711,6 +711,21 @@
  • ARA_Base_Technology
  • + + ARA_Technology_3CRP + + 允许迷雾种进行定向进化,抛弃喷射信息素的能力,以获得防御力、移动速度的增强和大规模铺设菌毯的能力。\n\n阿拉克涅虫群所有需要蓝图的科技,其蓝图只能通过女皇种的基因试验卵获取。 + 300 + 7.50 + 0.90 + ARA_ResearchBench + +
  • ARA_Technology_5KYC
  • +
    + +
  • ARA_Technology_6GUT
  • +
    +
    ARA_Technology_1EVO @@ -837,8 +852,8 @@ 允许实行新的阿拉克涅进化手术,允许阿拉克涅虫族获得更强大的肺部。 1000 - 11.00 - 3.80 + 7.50 + 5.30 ARA_ResearchBench
  • ARA_Technology_5ESS
  • diff --git a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml index ba83265..ce63b00 100644 --- a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml +++ b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon.xml @@ -1948,7 +1948,7 @@ 1 1 1 - 5 + 0
  • diff --git a/1.6/1.6/Defs/Thing_building/ARA_SwarmTurret.xml b/1.6/1.6/Defs/Thing_building/ARA_SwarmTurret.xml index b906213..76639e4 100644 --- a/1.6/1.6/Defs/Thing_building/ARA_SwarmTurret.xml +++ b/1.6/1.6/Defs/Thing_building/ARA_SwarmTurret.xml @@ -120,7 +120,7 @@ -20 0.96 - Rare +
  • @@ -211,7 +211,7 @@ 0.20 false false - Rare + true true diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo index e9ff673..7453a12 100644 Binary files a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo and b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo differ diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json index bfe6e99..19e9424 100644 --- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json +++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json @@ -1,9 +1,13 @@ { "Version": 1, - "WorkspaceRootPath": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", + "WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|e:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\hediffs\\ara_hediffterrainspawn\\comphediffterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:hediffs\\ara_hediffterrainspawn\\comphediffterrainspawn.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\compabilityeffect_randomhediff.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], @@ -23,12 +27,25 @@ { "$type": "Document", "DocumentIndex": 0, + "Title": "CompHediffTerrainSpawn.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs", + "RelativeDocumentMoniker": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs", + "RelativeToolTip": "Hediffs\\ARA_HediffTerrainSpawn\\CompHediffTerrainSpawn.cs", + "ViewState": "AgIAAF4AAAAAAAAAAAAAAG4AAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-23T08:00:28.236Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, "Title": "CompAbilityEffect_RandomHediff.cs", - "DocumentMoniker": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs", "RelativeDocumentMoniker": "Abilities\\CompAbilityEffect_RandomHediff.cs", - "ToolTip": "E:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\CompAbilityEffect_RandomHediff.cs", "RelativeToolTip": "Abilities\\CompAbilityEffect_RandomHediff.cs", - "ViewState": "AgIAAM4AAAAAAAAAAAAswL8AAAA9AAAAAAAAAA==", + "ViewState": "AgIAALoAAAAAAAAAAAAqwNcAAAAZAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-10-22T06:34:08.063Z", "EditorCaption": "" diff --git a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj index eb5a0b7..148246d 100644 --- a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj +++ b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj @@ -132,6 +132,8 @@ + + diff --git a/Source/ArachnaeSwarm/Hediffs/ARA_HediffTerrainSpawn/CompHediffTerrainSpawn.cs b/Source/ArachnaeSwarm/Hediffs/ARA_HediffTerrainSpawn/CompHediffTerrainSpawn.cs new file mode 100644 index 0000000..378e57f --- /dev/null +++ b/Source/ArachnaeSwarm/Hediffs/ARA_HediffTerrainSpawn/CompHediffTerrainSpawn.cs @@ -0,0 +1,126 @@ +using RimWorld; +using Verse; + +namespace ArachnaeSwarm +{ + /// + /// Hediff component that periodically changes terrain around the pawn. + /// Runs at specified intervals while the hediff is active. + /// + public class CompHediffTerrainSpawn : HediffComp + { + private CompProperties_HediffTerrainSpawn Props => (CompProperties_HediffTerrainSpawn)props; + + private int ticksUntilNextSpawn; + private bool initialized = false; + + public override void CompPostTick(ref float severityAdjustment) + { + base.CompPostTick(ref severityAdjustment); + + // 初始化计数器 + if (!initialized) + { + ticksUntilNextSpawn = Props.intervalTicks; + initialized = true; + return; + } + + // 检查条件 + if (!CanSpawnTerrain()) + return; + + // 倒计时 + ticksUntilNextSpawn--; + if (ticksUntilNextSpawn <= 0) + { + DoTerrainSpawn(); + ticksUntilNextSpawn = Props.intervalTicks; // 重置计数器 + } + } + + /// + /// 检查是否满足地形生成条件 + /// + private bool CanSpawnTerrain() + { + // 基本检查 + if (parent.pawn == null || parent.pawn.Destroyed || parent.pawn.Map == null || + Props.terrainToSpawn == null || Props.spawnRadius <= 0) + return false; + + // 检查可选条件 + if (Props.onlyWhenDowned && !parent.pawn.Downed) + return false; + + if (Props.onlyWhenMoving && (parent.pawn.pather == null || !parent.pawn.pather.Moving)) + return false; + + // 确保pawn在地图内 + if (!parent.pawn.Position.InBounds(parent.pawn.Map)) + return false; + + return true; + } + + /// + /// 执行地形生成 + /// + private void DoTerrainSpawn() + { + try + { + Map map = parent.pawn.Map; + IntVec3 center = parent.pawn.Position; + + foreach (IntVec3 current in GenRadial.RadialCellsAround(center, Props.spawnRadius, true)) + { + if (current.InBounds(map) && current.Walkable(map)) + { + // 检查当前地形是否有 ARA_Creep 标签 + TerrainDef currentTerrain = map.terrainGrid.TerrainAt(current); + if (currentTerrain != null && HasCreepTag(currentTerrain)) + { + continue; // 跳过有 ARA_Creep 标签的地面 + } + + map.terrainGrid.SetTerrain(current, Props.terrainToSpawn); + } + } + } + catch (System.Exception ex) + { + Log.Error($"Error in CompHediffTerrainSpawn.DoTerrainSpawn: {ex}"); + } + } + + /// + /// 检查地形是否具有 ARA_Creep 标签 + /// + private bool HasCreepTag(TerrainDef terrain) + { + return terrain.tags != null && terrain.tags.Contains("ARA_Creep"); + } + + public override void CompExposeData() + { + base.CompExposeData(); + Scribe_Values.Look(ref ticksUntilNextSpawn, "ticksUntilNextSpawn", Props.intervalTicks); + Scribe_Values.Look(ref initialized, "initialized", false); + } + + /// + /// 调试信息显示 + /// + public override string CompDebugString() + { + if (!CanSpawnTerrain()) + return "Cannot spawn terrain: conditions not met"; + + return $"Next spawn in: {ticksUntilNextSpawn} ticks\n" + + $"Interval: {Props.intervalTicks} ticks\n" + + $"Radius: {Props.spawnRadius}\n" + + $"Terrain: {Props.terrainToSpawn?.defName ?? "None"}"; + } + } +} diff --git a/Source/ArachnaeSwarm/Hediffs/ARA_HediffTerrainSpawn/CompProperties_HediffTerrainSpawn.cs b/Source/ArachnaeSwarm/Hediffs/ARA_HediffTerrainSpawn/CompProperties_HediffTerrainSpawn.cs new file mode 100644 index 0000000..8038b21 --- /dev/null +++ b/Source/ArachnaeSwarm/Hediffs/ARA_HediffTerrainSpawn/CompProperties_HediffTerrainSpawn.cs @@ -0,0 +1,24 @@ +using Verse; + +namespace ArachnaeSwarm +{ + /// + /// Properties for the CompHediffTerrainSpawn component. + /// Allows a hediff to periodically change terrain around the pawn. + /// + public class CompProperties_HediffTerrainSpawn : HediffCompProperties + { + public TerrainDef terrainToSpawn; + public float spawnRadius = 0f; + public int intervalTicks = 60; // 默认1秒 + + // 可选:是否只在特定条件下生效 + public bool onlyWhenDowned = false; + public bool onlyWhenMoving = false; + + public CompProperties_HediffTerrainSpawn() + { + compClass = typeof(CompHediffTerrainSpawn); + } + } +}