diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 5cfb952..195a9b4 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/AbilityDefs/ARA_Psy_Abilities.xml b/1.6/1.6/Defs/AbilityDefs/ARA_Psy_Abilities.xml index f89ea50..e4f0ed8 100644 --- a/1.6/1.6/Defs/AbilityDefs/ARA_Psy_Abilities.xml +++ b/1.6/1.6/Defs/AbilityDefs/ARA_Psy_Abilities.xml @@ -72,7 +72,7 @@ ARA_Neurotyrant_Harvest - 灵吸种抽干目标的智识,转化为进化点点数。 + 灵吸种抽干目标的智识,转化为进化点点数,虽然需要一点时间完成吸食,但是会直接杀死目标。 ArachnaeSwarm/UI/Abilities/ARA_Fighter_Invisibility_Execution 30 true @@ -90,8 +90,10 @@ 10 false + false false false + false @@ -127,7 +129,7 @@ - TraumaSavant + Scaria Anesthetic true ARA_SwarmSpell_ResearchHarvest_Message @@ -155,65 +157,65 @@ - - ARA_Neurotyrant_PsychicBrainburn - - 以强大的纯净灵能冲击目标,烧毁目标的中枢神经系统——这会直接杀死目标。 - - - ArachnaeSwarm/UI/Abilities/ARA_PsychicBrainburn - 60 - false - 300 - false - true - true + ARA_Neurotyrant_PsychicLoadDump + + 灵吸种将承受的强大负荷输出到目标身上,如果目标没有灵能能力,这种反冲会立刻杀死目标;拥有灵能能力的个体则可以免除这种死亡性的冲击,但是会累计大量的心灵熵。 + ArachnaeSwarm/UI/Abilities/ARA_Fighter_Invisibility_Execution + 30 + true + false true - 0.5 Mote_HoraxSmallSpellWarmup HoraxianAbilityCasting AnomalyAbilityWarmup - true + CastAbilityOnThingMelee + false - Verb_CastAbility - 1 - 25 + Verb_CastAbilityTouch + false + -1 + 5 - true - false false + false + false + false + false -
  • - - - 2.5 - 7.5 - - true - Psychic Load Cost - true +
  • + + 10 + true + true + + + true + + + 9999 + 9999 + 9999 + 9999 + Burn + Burn - + + + PsycastPsychicEffect + + Scaria - - true - 99999 - ARA_SwarmSpell_Overdrive - true -
  • -
  • - false - - Skip_Entry - - - false + + true + true + true + true + true
  • - + \ No newline at end of file diff --git a/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml b/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml index f312823..67c0dab 100644 --- a/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml +++ b/1.6/1.6/Defs/PawnKindDef/ARA_PawnKinds.xml @@ -169,6 +169,8 @@ 0 +
  • ARA_Neurotyrant_Harvest
  • +
  • ARA_Neurotyrant_PsychicLoadDump
  • diff --git a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml index f886609..4d691d4 100644 --- a/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml +++ b/1.6/1.6/Languages/ChineseSimplified (简体中文)/Keyed/ArachnaeSwarm_Keys.xml @@ -138,4 +138,22 @@ {0} 从 {1} 身上收割了 {2} 虫群进化点 {0} 吸取了 {1} 的精华,获得了 {2} 进化点 + + 释放技能: {0} + 累积神经束负荷: + {0} + {0} ~ {1} + 如果神经束已经进入超负荷状态,释放任意的虫群灵能法术将直接导致死亡! + + + {0} 将 {1} 神经束负荷转化为熵值转储到 {2} 身上 + {0} 将 {1} 神经束负荷以毁灭性能量转储到 {2} 身上 + {0} 向 {1} 转储了 {2} 熵值 + {0} 的大脑被摧毁了 + {0} 承受了 {1} 点伤害 + {0} 解除了超载状态 + + + {0} 没有可转储的神经束负荷 + 无法向 {0} 转储神经束负荷 \ No newline at end of file diff --git a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/.suo index d88f388..74e14a2 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 ee58c26..a23da55 100644 --- a/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json +++ b/Source/ArachnaeSwarm/.vs/ArachnaeSwarm/v17/DocumentLayout.json @@ -3,25 +3,37 @@ "WorkspaceRootPath": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|d:\\steamlibrary\\steamapps\\common\\rimworld\\mods\\arachnaeswarm\\source\\arachnaeswarm\\abilities\\ara_psychicresearchharvest\\compabilityeffect_psychicresearchharvest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicresearchharvest\\compabilityeffect_psychicresearchharvest.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\\ara_psychicloaddump\\compabilityeffect_psychicloaddump.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicloaddump\\compabilityeffect_psychicloaddump.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\\ara_psychicresearchharvest\\compproperties_abilitypsychicresearchharvest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicresearchharvest\\compproperties_abilitypsychicresearchharvest.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\\pawn_comps\\ara_fighter_invisible\\compfighterinvisible.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_fighter_invisible\\compfighterinvisible.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\\pawn_comps\\ara_swarmspellholder\\gizmo_swarmspellstatus.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_swarmspellholder\\gizmo_swarmspellstatus.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\\ara_psychicloaddump\\compproperties_abilitypsychicloaddump.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicloaddump\\compproperties_abilitypsychicloaddump.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\\pawn_comps\\ara_swarmspellholder\\comp_swarmspellholder.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_swarmspellholder\\comp_swarmspellholder.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\\pawn_comps\\ara_swarmspellholder\\gizmo_swarmspellstatus.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_swarmspellholder\\gizmo_swarmspellstatus.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\\ara_psychicloadcost\\compabilityeffect_psychicloadcost.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicloadcost\\compabilityeffect_psychicloadcost.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\\ara_psychicresearchharvest\\compabilityeffect_psychicresearchharvest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicresearchharvest\\compabilityeffect_psychicresearchharvest.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\\ara_psychicresearchharvest\\compproperties_abilitypsychicresearchharvest.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicresearchharvest\\compproperties_abilitypsychicresearchharvest.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\\pawn_comps\\ara_fighter_invisible\\compfighterinvisible.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_fighter_invisible\\compfighterinvisible.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\\pawn_comps\\ara_swarmspellholder\\swarmspellutility.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawn_comps\\ara_swarmspellholder\\swarmspellutility.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -31,27 +43,23 @@ "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicloadcost\\compproperties_abilitypsychicloadcost.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\\ara_hediffgacha\\compabilityeffect_hediffgacha.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\\ara_hediffgacha\\compabilityeffect_hediffgacha.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_hediffgacha\\compabilityeffect_hediffgacha.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\\ara_hediffrestriction\\compabilityeffect_hediffrestriction.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\\ara_hediffrestriction\\compabilityeffect_hediffrestriction.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_hediffrestriction\\compabilityeffect_hediffrestriction.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\\ara_hediffgacha\\window_hediffselection.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\\ara_hediffgacha\\window_hediffselection.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_hediffgacha\\window_hediffselection.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\\ara_psychicloadcost\\compabilityeffect_psychicloadcost.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:abilities\\ara_psychicloadcost\\compabilityeffect_psychicloadcost.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\\powerarmor\\ara_powerarmor.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\\powerarmor\\ara_powerarmor.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:powerarmor\\ara_powerarmor.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\\pawncapacityworker\\pawncapacityworker_psychicstange.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\\pawncapacityworker\\pawncapacityworker_psychicstange.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{EAE0DB6B-E282-C812-7F5A-6D13E9D24581}|ArachnaeSwarm.csproj|solutionrelative:pawncapacityworker\\pawncapacityworker_psychicstange.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { @@ -83,58 +91,45 @@ { "$type": "Document", "DocumentIndex": 1, - "Title": "CompProperties_AbilityPsychicResearchHarvest.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", - "RelativeDocumentMoniker": "Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", - "RelativeToolTip": "Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", - "ViewState": "AgIAAAoAAAAAAAAAAAArwHsAAAAVAAAAAAAAAA==", + "Title": "CompProperties_AbilityPsychicLoadDump.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadDump\\CompProperties_AbilityPsychicLoadDump.cs", + "RelativeDocumentMoniker": "Abilities\\ARA_PsychicLoadDump\\CompProperties_AbilityPsychicLoadDump.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadDump\\CompProperties_AbilityPsychicLoadDump.cs*", + "RelativeToolTip": "Abilities\\ARA_PsychicLoadDump\\CompProperties_AbilityPsychicLoadDump.cs*", + "ViewState": "AgIAACIAAAAAAAAAAAApwH0AAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-02-04T03:35:18.266Z", + "WhenOpened": "2026-02-04T08:36:24.395Z", "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 0, + "Title": "CompAbilityEffect_PsychicLoadDump.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadDump\\CompAbilityEffect_PsychicLoadDump.cs", + "RelativeDocumentMoniker": "Abilities\\ARA_PsychicLoadDump\\CompAbilityEffect_PsychicLoadDump.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadDump\\CompAbilityEffect_PsychicLoadDump.cs*", + "RelativeToolTip": "Abilities\\ARA_PsychicLoadDump\\CompAbilityEffect_PsychicLoadDump.cs*", + "ViewState": "AgIAAGoAAAAAAAAAAAAtwGsAAAAvAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-02-04T08:36:23.647Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, "Title": "CompAbilityEffect_PsychicResearchHarvest.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicResearchHarvest\\CompAbilityEffect_PsychicResearchHarvest.cs", "RelativeDocumentMoniker": "Abilities\\ARA_PsychicResearchHarvest\\CompAbilityEffect_PsychicResearchHarvest.cs", "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicResearchHarvest\\CompAbilityEffect_PsychicResearchHarvest.cs", "RelativeToolTip": "Abilities\\ARA_PsychicResearchHarvest\\CompAbilityEffect_PsychicResearchHarvest.cs", - "ViewState": "AgIAAEwBAAAAAAAAAAAAAHABAAAIAAAAAAAAAA==", + "ViewState": "AgIAAD0AAAAAAAAAAAA7wGkAAAASAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2026-02-04T03:35:17.441Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 2, - "Title": "CompFighterInvisible.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", - "RelativeDocumentMoniker": "Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", - "RelativeToolTip": "Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", - "ViewState": "AgIAACsAAAAAAAAAAAAgwC4AAAARAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-02-04T03:24:18.669Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 7, - "Title": "CompAbilityEffect_HediffGacha.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", - "RelativeDocumentMoniker": "Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", - "RelativeToolTip": "Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAuAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-02-04T02:49:20.179Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 9, "Title": "CompProperties_AbilityPsychicLoadCost.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadCost\\CompProperties_AbilityPsychicLoadCost.cs", "RelativeDocumentMoniker": "Abilities\\ARA_PsychicLoadCost\\CompProperties_AbilityPsychicLoadCost.cs", @@ -142,12 +137,11 @@ "RelativeToolTip": "Abilities\\ARA_PsychicLoadCost\\CompProperties_AbilityPsychicLoadCost.cs", "ViewState": "AgIAAAsAAAAAAAAAAADwvyUAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-01-30T08:22:38.845Z", - "EditorCaption": "" + "WhenOpened": "2026-01-30T08:22:38.845Z" }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 8, "Title": "SwarmSpellUtility.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_SwarmSpellHolder\\SwarmSpellUtility.cs", "RelativeDocumentMoniker": "Pawn_Comps\\ARA_SwarmSpellHolder\\SwarmSpellUtility.cs", @@ -155,18 +149,30 @@ "RelativeToolTip": "Pawn_Comps\\ARA_SwarmSpellHolder\\SwarmSpellUtility.cs", "ViewState": "AgIAANEAAAAAAAAAAAAqwPMAAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-01-30T07:25:10.449Z", - "EditorCaption": "" + "WhenOpened": "2026-01-30T07:25:10.449Z" }, { "$type": "Document", "DocumentIndex": 4, + "Title": "CompAbilityEffect_PsychicLoadCost.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", + "RelativeDocumentMoniker": "Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", + "RelativeToolTip": "Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", + "ViewState": "AgIAAMwAAAAAAAAAAAAawOcAAABZAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-01-30T08:16:09.317Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, "Title": "Comp_SwarmSpellHolder.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_SwarmSpellHolder\\Comp_SwarmSpellHolder.cs", "RelativeDocumentMoniker": "Pawn_Comps\\ARA_SwarmSpellHolder\\Comp_SwarmSpellHolder.cs", "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_SwarmSpellHolder\\Comp_SwarmSpellHolder.cs", "RelativeToolTip": "Pawn_Comps\\ARA_SwarmSpellHolder\\Comp_SwarmSpellHolder.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAACkAAAAkAAAAAAAAAA==", + "ViewState": "AgIAAFgCAAAAAAAAAAAYwGkCAAASAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2026-01-30T07:11:59.797Z", "EditorCaption": "" @@ -186,7 +192,43 @@ }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 10, + "Title": "CompAbilityEffect_HediffGacha.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", + "RelativeDocumentMoniker": "Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", + "RelativeToolTip": "Abilities\\ARA_HediffGacha\\CompAbilityEffect_HediffGacha.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAuAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-02-04T02:49:20.179Z" + }, + { + "$type": "Document", + "DocumentIndex": 7, + "Title": "CompFighterInvisible.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", + "RelativeDocumentMoniker": "Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", + "RelativeToolTip": "Pawn_Comps\\ARA_Fighter_Invisible\\CompFighterInvisible.cs", + "ViewState": "AgIAACsAAAAAAAAAAAAgwC4AAAARAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-02-04T03:24:18.669Z" + }, + { + "$type": "Document", + "DocumentIndex": 6, + "Title": "CompProperties_AbilityPsychicResearchHarvest.cs", + "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", + "RelativeDocumentMoniker": "Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", + "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", + "RelativeToolTip": "Abilities\\ARA_PsychicResearchHarvest\\CompProperties_AbilityPsychicResearchHarvest.cs", + "ViewState": "AgIAAAoAAAAAAAAAAAArwHsAAAAVAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-02-04T03:35:18.266Z" + }, + { + "$type": "Document", + "DocumentIndex": 11, "Title": "CompAbilityEffect_HediffRestriction.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_HediffRestriction\\CompAbilityEffect_HediffRestriction.cs", "RelativeDocumentMoniker": "Abilities\\ARA_HediffRestriction\\CompAbilityEffect_HediffRestriction.cs", @@ -194,12 +236,11 @@ "RelativeToolTip": "Abilities\\ARA_HediffRestriction\\CompAbilityEffect_HediffRestriction.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAXAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-02-04T02:49:22.868Z", - "EditorCaption": "" + "WhenOpened": "2026-02-04T02:49:22.868Z" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 12, "Title": "Window_HediffSelection.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_HediffGacha\\Window_HediffSelection.cs", "RelativeDocumentMoniker": "Abilities\\ARA_HediffGacha\\Window_HediffSelection.cs", @@ -207,25 +248,11 @@ "RelativeToolTip": "Abilities\\ARA_HediffGacha\\Window_HediffSelection.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAVAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-02-04T02:49:27.428Z", - "EditorCaption": "" + "WhenOpened": "2026-02-04T02:49:27.428Z" }, { "$type": "Document", - "DocumentIndex": 10, - "Title": "CompAbilityEffect_PsychicLoadCost.cs", - "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", - "RelativeDocumentMoniker": "Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", - "ToolTip": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", - "RelativeToolTip": "Abilities\\ARA_PsychicLoadCost\\CompAbilityEffect_PsychicLoadCost.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAFkAAABWAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-01-30T08:16:09.317Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 13, "Title": "ARA_PowerArmor.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\PowerArmor\\ARA_PowerArmor.cs", "RelativeDocumentMoniker": "PowerArmor\\ARA_PowerArmor.cs", @@ -233,12 +260,11 @@ "RelativeToolTip": "PowerArmor\\ARA_PowerArmor.cs", "ViewState": "AgIAANsBAAAAAAAAAAAAAOkBAAAWAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-02-04T02:14:33.83Z", - "EditorCaption": "" + "WhenOpened": "2026-02-04T02:14:33.83Z" }, { "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 14, "Title": "PawnCapacityWorker_PsychicStange.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\PawnCapacityWorker\\PawnCapacityWorker_PsychicStange.cs", "RelativeDocumentMoniker": "PawnCapacityWorker\\PawnCapacityWorker_PsychicStange.cs", @@ -246,12 +272,11 @@ "RelativeToolTip": "PawnCapacityWorker\\PawnCapacityWorker_PsychicStange.cs", "ViewState": "AgIAAEEBAAAAAAAAAAAiwAgAAAAkAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2026-02-03T07:42:21.662Z", - "EditorCaption": "" + "WhenOpened": "2026-02-03T07:42:21.662Z" }, { "$type": "Document", - "DocumentIndex": 14, + "DocumentIndex": 16, "Title": "CompAbilityEffect_PsychicBrainburn.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Abilities\\PsychicBrainburn\\CompAbilityEffect_PsychicBrainburn.cs", "RelativeDocumentMoniker": "Abilities\\PsychicBrainburn\\CompAbilityEffect_PsychicBrainburn.cs", @@ -263,7 +288,7 @@ }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 15, "Title": "ARA_DefOf.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\ARA_DefOf.cs", "RelativeDocumentMoniker": "ARA_DefOf.cs", @@ -275,7 +300,7 @@ }, { "$type": "Document", - "DocumentIndex": 15, + "DocumentIndex": 17, "Title": "CompAutoMechCarrier.cs", "DocumentMoniker": "D:\\SteamLibrary\\steamapps\\common\\RimWorld\\Mods\\ArachnaeSwarm\\Source\\ArachnaeSwarm\\Pawn_Comps\\ARA_AutoMechCarrier\\CompAutoMechCarrier.cs", "RelativeDocumentMoniker": "Pawn_Comps\\ARA_AutoMechCarrier\\CompAutoMechCarrier.cs", diff --git a/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadCost/CompAbilityEffect_PsychicLoadCost.cs b/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadCost/CompAbilityEffect_PsychicLoadCost.cs index 9c081ae..2dc5b8f 100644 --- a/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadCost/CompAbilityEffect_PsychicLoadCost.cs +++ b/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadCost/CompAbilityEffect_PsychicLoadCost.cs @@ -56,7 +56,7 @@ namespace ArachnaeSwarm bool wasOverloaded = spellHolder.IsOverloaded; // 添加灵能负载(不检查是否会超载) - spellHolder.AddPsychicLoad(loadCost, $"释放技能: {parent.def.label}"); + spellHolder.AddPsychicLoad(loadCost, $"ARA_UsePsychicLoadSkill".Translate(parent.def.label)); // 检查当前是否超载 bool isNowOverloaded = spellHolder.IsOverloaded; @@ -64,7 +64,7 @@ namespace ArachnaeSwarm // 如果从非超载状态变为超载状态,显示警告 if (!wasOverloaded && isNowOverloaded) { - Messages.Message("ARA_SwarmSpell_Overload_Warning".Translate(caster.LabelShortCap), + Messages.Message("ARA_SwarmSpell_Load_OverloadWarning".Translate(caster.LabelShortCap), caster, MessageTypeDefOf.NegativeEvent); } @@ -224,40 +224,13 @@ namespace ArachnaeSwarm Props.loadCostRange.max.ToString("F1"))); } - // 当前负载状态 - sb.AppendLine(); - sb.AppendLine("ARA_SwarmSpell_CurrentLoad".Translate().Colorize(ColoredText.TipSectionTitleColor)); - sb.AppendLine("ARA_SwarmSpell_Load_Current".Translate( - spellHolder.PsychicLoad.ToString("F1"), - spellHolder.PsychicLoadCapacity.ToString("F1"))); - // 超载警告 if (spellHolder.IsOverloaded) { sb.AppendLine(); - sb.AppendLine("ARA_SwarmSpell_Overload_Warning_Tooltip".Translate().Colorize(Color.red)); + sb.AppendLine("ARA_SwarmSpell_Load_OverloadWarning".Translate().Colorize(Color.red)); sb.AppendLine("ARA_SwarmSpell_Overload_Penalty_Description".Translate()); } - else - { - // 施放后预测负载 - float predictedLoad = spellHolder.PsychicLoad + (Props.useFixedCost ? Props.fixedLoadCost : Props.loadCostRange.Average); - float predictedPercent = spellHolder.PsychicLoadCapacity > 0 ? predictedLoad / spellHolder.PsychicLoadCapacity : 0f; - - sb.AppendLine(); - sb.AppendLine("ARA_SwarmSpell_PredictedLoad".Translate().Colorize(ColoredText.TipSectionTitleColor)); - sb.AppendLine("ARA_SwarmSpell_PredictedLoad_Value".Translate(predictedLoad.ToString("F1"), spellHolder.PsychicLoadCapacity.ToString("F1"))); - - if (predictedPercent > 0.8f) - { - sb.AppendLine("ARA_SwarmSpell_PredictedLoad_Warning".Translate(predictedPercent.ToStringPercent()).Colorize(Color.yellow)); - } - - if (predictedPercent > 1f) - { - sb.AppendLine("ARA_SwarmSpell_PredictedLoad_Overload".Translate().Colorize(Color.red)); - } - } return sb.ToString().TrimEndNewlines(); } diff --git a/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadDump/CompAbilityEffect_PsychicLoadDump.cs b/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadDump/CompAbilityEffect_PsychicLoadDump.cs new file mode 100644 index 0000000..665da6c --- /dev/null +++ b/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadDump/CompAbilityEffect_PsychicLoadDump.cs @@ -0,0 +1,540 @@ +using RimWorld; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using Verse; + +namespace ArachnaeSwarm +{ + /// + /// 灵能负载转储技能效果 + /// 将施法者的灵能负载输出到目标身上,根据目标是否有灵能熵追踪器执行不同效果 + /// + public class CompAbilityEffect_PsychicLoadDump : CompAbilityEffect + { + #region 属性 + public new CompProperties_AbilityPsychicLoadDump Props => + (CompProperties_AbilityPsychicLoadDump)props; + #endregion + + #region 应用效果 + public override void Apply(LocalTargetInfo target, LocalTargetInfo dest) + { + base.Apply(target, dest); + + Pawn caster = parent.pawn; + Pawn targetPawn = target.Pawn; + + if (caster == null || targetPawn == null || targetPawn.Dead || targetPawn.Downed) + { + Log.Warning("[虫群术法] 灵能负载转储: 施法者或目标无效"); + return; + } + + // 获取施法者的术法持有组件 + Comp_SwarmSpellHolder spellHolder = caster.TryGetComp(); + if (spellHolder == null || !spellHolder.IsSystemInitialized) + { + Messages.Message("ARA_SwarmSpell_NoSpellHolder".Translate(caster.LabelShortCap), + MessageTypeDefOf.RejectInput); + return; + } + + // 获取施法者当前的灵能负载 + float currentLoad = spellHolder.PsychicLoad; + if (currentLoad <= 0f) + { + Messages.Message("ARA_SwarmSpell_NoLoadToDump".Translate(caster.LabelShortCap), + MessageTypeDefOf.RejectInput); + return; + } + + // 记录施法者是否超载 + bool casterWasOverloaded = spellHolder.IsOverloaded; + + // 根据目标是否有灵能熵追踪器执行不同效果 + bool hasPsychicTracker = CheckTargetHasPsychicTracker(targetPawn); + + if (hasPsychicTracker) + { + // 有灵能熵追踪器:转化为PsychicEntropy + ApplyPsychicEntropyEffect(caster, targetPawn, currentLoad, spellHolder); + } + else + { + // 没有灵能熵追踪器:摧毁意识来源器官 + ApplyConsciousnessDestruction(caster, targetPawn, currentLoad, spellHolder); + } + + // 无论结果如何,清空施法者的灵能负载 + spellHolder.ReducePsychicLoad(currentLoad, "转储灵能负载"); + + // 显示效果和消息 + ShowEffectsAndMessages(caster, targetPawn, currentLoad, hasPsychicTracker, casterWasOverloaded); + } + #endregion + + #region 检查目标是否有灵能熵追踪器 + /// + /// 检查目标是否有灵能熵追踪器 + /// + private bool CheckTargetHasPsychicTracker(Pawn target) + { + try + { + // 方法1:直接检查psychicEntropy字段 + var entropyField = typeof(Pawn).GetField("psychicEntropy"); + if (entropyField != null) + { + object entropyObj = entropyField.GetValue(target); + if (entropyObj != null) + { + // 检查是否是Pawn_PsychicEntropyTracker类型 + var entropyType = entropyObj.GetType(); + if (entropyType.Name == "Pawn_PsychicEntropyTracker") + { + // 进一步检查是否有TryAddEntropy方法 + var addEntropyMethod = entropyType.GetMethod("TryAddEntropy"); + if (addEntropyMethod != null) + { + return true; + } + } + } + } + + // 方法2:检查是否有PsychicSensitivity属性 + if (target.RaceProps.Humanlike) + { + // 人类类种族通常有灵能熵追踪器 + float psychicSensitivity = target.GetStatValue(StatDefOf.PsychicSensitivity); + if (psychicSensitivity > 0.01f) + { + return true; + } + } + + // 方法3:检查是否有Psylink相关Hediff + Hediff psylink = target.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PsychicAmplifier); + if (psylink != null) + { + return true; + } + + // 方法4:检查是否有PsychicEntropy Hediff + Hediff entropyHediff = target.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PsychicEntropy); + if (entropyHediff != null) + { + return true; + } + + return false; + } + catch (System.Exception ex) + { + Log.Warning($"[虫群术法] 检查目标灵能熵追踪器时出错: {ex.Message}"); + return false; + } + } + + /// + /// 获取目标的灵能熵追踪器(如果存在) + /// + private object GetPsychicEntropyTracker(Pawn target) + { + try + { + var entropyField = typeof(Pawn).GetField("psychicEntropy"); + if (entropyField != null) + { + return entropyField.GetValue(target); + } + return null; + } + catch (System.Exception) + { + return null; + } + } + #endregion + + #region 应用灵能熵效果 + /// + /// 将灵能负载转化为PsychicEntropy应用到目标 + /// + private void ApplyPsychicEntropyEffect(Pawn caster, Pawn target, float loadAmount, Comp_SwarmSpellHolder spellHolder) + { + try + { + // 计算转化的熵值(1:10转化比) + float entropyAmount = loadAmount * Props.conversionRatio; + + // 获取目标的灵能熵追踪器 + object entropyTracker = GetPsychicEntropyTracker(target); + if (entropyTracker != null) + { + // 使用反射调用TryAddEntropy方法 + System.Type entropyType = entropyTracker.GetType(); + var addEntropyMethod = entropyType.GetMethod("TryAddEntropy", + new System.Type[] { typeof(float), typeof(Thing), typeof(bool), typeof(bool) }); + + if (addEntropyMethod != null) + { + bool success = (bool)addEntropyMethod.Invoke(entropyTracker, + new object[] { entropyAmount, caster, Props.scaleBySensitivity, Props.allowOverLimit }); + + if (success) + { + // 成功添加熵值 + ShowEntropyTransferEffect(caster, target, entropyAmount); + } + else + { + // 添加熵值失败(可能达到上限) + Messages.Message("ARA_SwarmSpell_EntropyTransferFailed".Translate(target.LabelShortCap), + target, MessageTypeDefOf.NegativeEvent); + } + } + else + { + // 如果没有TryAddEntropy方法,尝试其他方法 + ApplyFallbackEffect(target, loadAmount); + } + } + else + { + // 没有找到追踪器,使用后备效果 + ApplyFallbackEffect(target, loadAmount); + } + } + catch (System.Exception ex) + { + Log.Error($"[虫群术法] 应用灵能熵效果时出错: {ex.Message}\n{ex.StackTrace}"); + ApplyFallbackEffect(target, loadAmount); + } + } + + /// + /// 后备效果(当无法添加熵值时使用) + /// + private void ApplyFallbackEffect(Pawn target, float loadAmount) + { + // 应用一些伤害作为后备 + float damageAmount = loadAmount * Props.fallbackDamageMultiplier; + DamageInfo damage = new DamageInfo( + Props.fallbackDamageType ?? DamageDefOf.Burn, + damageAmount, + armorPenetration: 999f, + instigator: parent.pawn + ); + target.TakeDamage(damage); + } + + /// + /// 显示熵值转移效果 + /// + private void ShowEntropyTransferEffect(Pawn caster, Pawn target, float entropyAmount) + { + // 显示效果 + if (Props.entropyTransferEffecter != null) + { + Effecter effecter = Props.entropyTransferEffecter.Spawn(); + effecter.Trigger(new TargetInfo(caster.Position, caster.Map), new TargetInfo(target.Position, target.Map)); + effecter.Cleanup(); + } + + // 显示熵值转移消息 + if (Props.showEntropyTransferMessage) + { + Messages.Message("ARA_SwarmSpell_EntropyTransferred".Translate( + caster.LabelShortCap, target.LabelShortCap, entropyAmount.ToString("F1")), + target, MessageTypeDefOf.NegativeEvent); + } + } + #endregion + + #region 应用意识摧毁效果 + /// + /// 摧毁目标的意识来源器官 + /// + private void ApplyConsciousnessDestruction(Pawn caster, Pawn target, float loadAmount, Comp_SwarmSpellHolder spellHolder) + { + try + { + // 获取所有意识来源部位 + var consciousnessParts = target.health.hediffSet.GetNotMissingParts() + .Where(part => part.def.tags?.Contains(BodyPartTagDefOf.ConsciousnessSource) == true) + .ToList(); + + if (consciousnessParts.Count == 0) + { + // 如果没有意识来源器官,应用普通伤害 + ApplyNoConsciousnessFallback(target, loadAmount); + return; + } + + int destroyedCount = 0; + float loadPerPart = loadAmount / consciousnessParts.Count; + + foreach (var part in consciousnessParts) + { + if (TryDestroyConsciousnessPart(target, part, loadPerPart)) + { + destroyedCount++; + + // 显示伤害效果 + if (Props.consciousnessDestroyFleck != null && target.Map != null) + { + FleckMaker.Static(target.Position, target.Map, Props.consciousnessDestroyFleck); + } + } + } + + // 如果摧毁了任何意识来源器官,应用惩罚效果 + if (destroyedCount > 0) + { + ApplyConsciousnessPenalty(target); + + // 显示摧毁消息 + if (Props.showConsciousnessDestroyMessage) + { + Messages.Message("ARA_SwarmSpell_ConsciousnessDestroyed".Translate( + target.LabelShortCap, destroyedCount), + target, MessageTypeDefOf.NegativeHealthEvent); + } + } + } + catch (System.Exception ex) + { + Log.Error($"[虫群术法] 摧毁意识来源器官时出错: {ex.Message}\n{ex.StackTrace}"); + } + } + + /// + /// 尝试摧毁意识来源器官 + /// + private bool TryDestroyConsciousnessPart(Pawn pawn, BodyPartRecord part, float loadPerPart) + { + try + { + // 计算伤害(基于负载和配置的伤害倍数) + float damageAmount = part.def.GetMaxHealth(pawn) * Props.partDestructionDamageMult + + (loadPerPart * Props.loadDamageMultiplier); + + DamageInfo damage = new DamageInfo( + Props.destroyDamageType ?? DamageDefOf.Burn, + damageAmount, + armorPenetration: 999f, + instigator: parent.pawn, + hitPart: part, + category: DamageInfo.SourceCategory.ThingOrUnknown + ); + + pawn.TakeDamage(damage); + + // 确保部位被摧毁 + if (!pawn.health.hediffSet.PartIsMissing(part)) + { + DamageInfo finalDamage = new DamageInfo( + Props.destroyDamageType ?? DamageDefOf.Burn, + 99999f, + armorPenetration: 999f, + instigator: parent.pawn, + hitPart: part + ); + pawn.TakeDamage(finalDamage); + } + + return true; + } + catch (System.Exception ex) + { + Log.Error($"[虫群术法] 摧毁部位 {part.Label} 时出错: {ex.Message}"); + return false; + } + } + + /// + /// 没有意识来源器官时的后备效果 + /// + private void ApplyNoConsciousnessFallback(Pawn target, float loadAmount) + { + // 对核心部位造成伤害 + BodyPartRecord corePart = target.RaceProps.body.corePart; + if (corePart != null) + { + float damageAmount = loadAmount * Props.noConsciousnessDamageMultiplier; + DamageInfo damage = new DamageInfo( + Props.destroyDamageType ?? DamageDefOf.Burn, + damageAmount, + armorPenetration: 999f, + instigator: parent.pawn, + hitPart: corePart + ); + target.TakeDamage(damage); + + if (Props.showNoConsciousnessMessage) + { + Messages.Message("ARA_SwarmSpell_NoConsciousnessFallback".Translate( + target.LabelShortCap, damageAmount.ToString("F0")), + target, MessageTypeDefOf.NegativeEvent); + } + } + } + + /// + /// 应用意识来源器官被摧毁的惩罚 + /// + private void ApplyConsciousnessPenalty(Pawn pawn) + { + // 添加意识惩罚Hediff + if (Props.consciousnessPenaltyHediff != null) + { + try + { + Hediff penalty = HediffMaker.MakeHediff(Props.consciousnessPenaltyHediff, pawn); + pawn.health.AddHediff(penalty); + } + catch (System.Exception ex) + { + Log.Error($"[虫群术法] 添加意识惩罚Hediff时出错: {ex.Message}"); + } + } + + // 显示效果 + if (Props.penaltyEffecter != null) + { + Effecter effecter = Props.penaltyEffecter.Spawn(); + effecter.Trigger(new TargetInfo(pawn.Position, pawn.Map), new TargetInfo(pawn.Position, pawn.Map)); + effecter.Cleanup(); + } + } + #endregion + + #region 视觉效果和消息 + /// + /// 显示效果和消息 + /// + private void ShowEffectsAndMessages(Pawn caster, Pawn target, float loadAmount, bool hasPsychicTracker, bool casterWasOverloaded) + { + // 显示主效果 + if (Props.mainEffecter != null) + { + Effecter effecter = Props.mainEffecter.Spawn(); + effecter.Trigger(new TargetInfo(caster.Position, caster.Map), new TargetInfo(target.Position, target.Map)); + effecter.Cleanup(); + } + + // 显示负载转储消息 + if (Props.showDumpMessage) + { + string messageKey = hasPsychicTracker ? + "ARA_SwarmSpell_LoadDumped_Entropy" : + "ARA_SwarmSpell_LoadDumped_Destruction"; + + string message = messageKey.Translate( + caster.LabelShortCap, + target.LabelShortCap, + loadAmount.ToString("F1")); + + Messages.Message(message, caster, MessageTypeDefOf.PositiveEvent); + } + + // 显示施法者状态消息 + if (casterWasOverloaded && Props.showOverloadReliefMessage) + { + Messages.Message("ARA_SwarmSpell_OverloadRelieved".Translate(caster.LabelShortCap), + caster, MessageTypeDefOf.PositiveEvent); + } + } + #endregion + + #region 验证和工具提示 + public override bool Valid(LocalTargetInfo target, bool throwMessages = false) + { + if (!base.Valid(target, throwMessages)) + return false; + + Pawn targetPawn = target.Pawn; + if (targetPawn == null) + { + if (throwMessages) + Messages.Message("需要选择一个目标单位", MessageTypeDefOf.RejectInput); + return false; + } + + // 检查目标是否活着且没有倒下(如果技能不允许对倒下单位使用) + if (!Props.canTargetDowned && targetPawn.Downed) + { + if (throwMessages) + Messages.Message("目标已经倒下,无法转储负载", MessageTypeDefOf.RejectInput); + return false; + } + + // 检查施法者是否有术法组件且有负载 + Pawn caster = parent.pawn; + if (caster != null) + { + Comp_SwarmSpellHolder spellHolder = caster.TryGetComp(); + if (spellHolder == null) + { + if (throwMessages) + Messages.Message("施法者没有灵能术法系统", MessageTypeDefOf.RejectInput); + return false; + } + + if (!spellHolder.IsSystemInitialized) + { + if (throwMessages) + Messages.Message("灵能术法系统未初始化", MessageTypeDefOf.RejectInput); + return false; + } + + // 检查是否有负载可转储 + if (spellHolder.PsychicLoad <= 0f) + { + if (throwMessages) + Messages.Message("没有可转储的灵能负载", MessageTypeDefOf.RejectInput); + return false; + } + } + + return true; + } + #endregion + + #region AI 行为 + public override bool AICanTargetNow(LocalTargetInfo target) + { + Pawn caster = parent.pawn; + if (caster == null) + return false; + + Pawn targetPawn = target.Pawn; + if (targetPawn == null || targetPawn.Dead || (targetPawn.Downed && !Props.canTargetDowned)) + return false; + + // 检查施法者是否有术法组件 + Comp_SwarmSpellHolder spellHolder = caster.TryGetComp(); + if (spellHolder == null || !spellHolder.IsSystemInitialized) + return false; + + // AI不会在没有负载时使用此技能 + if (spellHolder.PsychicLoad <= 0f) + return false; + + // AI倾向于在超载时使用此技能 + float overloadUrgency = spellHolder.IsOverloaded ? 0.8f : (spellHolder.PsychicLoadPercent * 0.5f); + + // AI考虑目标的威胁程度 + float threatScore = targetPawn.Downed ? 0f : (targetPawn.kindDef.combatPower / 100f); + + // 综合评分:超载越严重、目标威胁越大,越可能使用 + float totalScore = overloadUrgency + (threatScore * 0.5f); + + return totalScore > 0.5f && base.AICanTargetNow(target); + } + #endregion + } +} diff --git a/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadDump/CompProperties_AbilityPsychicLoadDump.cs b/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadDump/CompProperties_AbilityPsychicLoadDump.cs new file mode 100644 index 0000000..3e0e613 --- /dev/null +++ b/Source/ArachnaeSwarm/Abilities/ARA_PsychicLoadDump/CompProperties_AbilityPsychicLoadDump.cs @@ -0,0 +1,127 @@ +using RimWorld; +using UnityEngine; +using Verse; + +namespace ArachnaeSwarm +{ + /// + /// 灵能负载转储技能属性 + /// + public class CompProperties_AbilityPsychicLoadDump : CompProperties_AbilityEffect + { + #region 转化设置 + /// + /// 转化比例(1负载 = X熵值) + /// + public float conversionRatio = 10f; + + /// + /// 是否根据目标的灵能敏感度缩放 + /// + public bool scaleBySensitivity = true; + + /// + /// 是否允许超过目标熵值上限 + /// + public bool allowOverLimit = false; + #endregion + + #region 目标选择 + /// + /// 是否可以对倒下的目标使用 + /// + public bool canTargetDowned = false; + #endregion + + #region 器官摧毁设置 + /// + /// 部位摧毁基础伤害倍数(基于部位最大生命值) + /// + public float partDestructionDamageMult = 1.5f; + + /// + /// 负载伤害倍数(负载 * 此倍数) + /// + public float loadDamageMultiplier = 5f; + + /// + /// 没有意识来源器官时的伤害倍数 + /// + public float noConsciousnessDamageMultiplier = 3f; + + /// + /// 后备效果伤害倍数(当无法添加熵值时) + /// + public float fallbackDamageMultiplier = 2f; + + /// + /// 摧毁部位使用的伤害类型 + /// + public DamageDef destroyDamageType = null; + + /// + /// 后备效果伤害类型 + /// + public DamageDef fallbackDamageType = null; + #endregion + + #region 效果设置 + /// + /// 主效果器 + /// + public EffecterDef mainEffecter = null; + + /// + /// 熵值转移效果器 + /// + public EffecterDef entropyTransferEffecter = null; + + /// + /// 意识摧毁特效 + /// + public FleckDef consciousnessDestroyFleck = null; + + /// + /// 惩罚效果器 + /// + public EffecterDef penaltyEffecter = null; + + /// + /// 意识惩罚Hediff + /// + public HediffDef consciousnessPenaltyHediff = null; + #endregion + + #region 消息设置 + /// + /// 是否显示转储消息 + /// + public bool showDumpMessage = true; + + /// + /// 是否显示熵值转移消息 + /// + public bool showEntropyTransferMessage = true; + + /// + /// 是否显示意识摧毁消息 + /// + public bool showConsciousnessDestroyMessage = true; + + /// + /// 是否显示没有意识来源器官消息 + /// + public bool showNoConsciousnessMessage = true; + + /// + /// 是否显示超载解除消息 + /// + public bool showOverloadReliefMessage = true; + #endregion + + public CompProperties_AbilityPsychicLoadDump() + { + compClass = typeof(CompAbilityEffect_PsychicLoadDump); + } + } +} diff --git a/Source/ArachnaeSwarm/Abilities/ARA_PsychicResearchHarvest/CompAbilityEffect_PsychicResearchHarvest.cs b/Source/ArachnaeSwarm/Abilities/ARA_PsychicResearchHarvest/CompAbilityEffect_PsychicResearchHarvest.cs index 4ac1355..952e81f 100644 --- a/Source/ArachnaeSwarm/Abilities/ARA_PsychicResearchHarvest/CompAbilityEffect_PsychicResearchHarvest.cs +++ b/Source/ArachnaeSwarm/Abilities/ARA_PsychicResearchHarvest/CompAbilityEffect_PsychicResearchHarvest.cs @@ -103,47 +103,6 @@ namespace ArachnaeSwarm return researchPoints; } - /// - /// 获取计算过程的描述(用于工具提示) - /// - private string GetCalculationDescription(Pawn targetPawn) - { - StringBuilder sb = new StringBuilder(); - - // 获取智识技能等级 - float intelligenceValue = 1f; - if (targetPawn.skills != null) - { - SkillRecord intellectualSkill = targetPawn.skills.GetSkill(SkillDefOf.Intellectual); - if (intellectualSkill != null) - { - intelligenceValue = intellectualSkill.Level; - if (intelligenceValue <= 0) intelligenceValue = 1f; - } - } - - // 获取意识能力值 - float consciousnessValue = targetPawn.health.capacities.GetLevel(PawnCapacityDefOf.Consciousness); - if (consciousnessValue < 0) consciousnessValue = 0; - - sb.AppendLine("计算公式:"); - sb.AppendLine($"基础值: {Props.baseAmount:F1}"); - sb.AppendLine($"智识技能等级({intelligenceValue:F1}) × 智识倍率({Props.intelligenceMultiplier:F1}) = {intelligenceValue * Props.intelligenceMultiplier:F1}"); - sb.AppendLine($"意识能力值({consciousnessValue:P0}) × 意识倍率({Props.consciousnessMultiplier:F1}) = {consciousnessValue * Props.consciousnessMultiplier:F1}"); - sb.AppendLine($"总计: {Props.baseAmount + (intelligenceValue * Props.intelligenceMultiplier) + (consciousnessValue * Props.consciousnessMultiplier):F1}"); - - if (Props.useRandomRange) - { - sb.AppendLine($"随机范围: {Props.randomRange.min:F1} - {Props.randomRange.max:F1}"); - } - - if (Props.overallMultiplier != 1f) - { - sb.AppendLine($"全局乘数: ×{Props.overallMultiplier:F1}"); - } - - return sb.ToString(); - } #endregion #region 摧毁意识来源器官 diff --git a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj index 7d60eed..6e56256 100644 --- a/Source/ArachnaeSwarm/ArachnaeSwarm.csproj +++ b/Source/ArachnaeSwarm/ArachnaeSwarm.csproj @@ -38,6 +38,8 @@ + +