存一下
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -51,3 +51,10 @@
|
|||||||
*.log
|
*.log
|
||||||
*.cache
|
*.cache
|
||||||
*.tmp
|
*.tmp
|
||||||
|
|
||||||
|
# Build outputs and debug files
|
||||||
|
**/obj/Debug/
|
||||||
|
**/obj/Release/
|
||||||
|
**/bin/Debug/
|
||||||
|
**/bin/Release/
|
||||||
|
*.csproj.CoreCompileInputs.cache
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
36
1.6/Defs/AbilityDefs/Abilities_WULA_Emergency.xml
Normal file
36
1.6/Defs/AbilityDefs/Abilities_WULA_Emergency.xml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Defs>
|
||||||
|
|
||||||
|
<AbilityDef>
|
||||||
|
<defName>WULA_EmergencyEnergyRestore</defName>
|
||||||
|
<label>后备隐藏能源超载</label>
|
||||||
|
<description>激活紧急能量协议,暂时将能量需求锁定在100%,持续10秒后恢复到原来的能量水平。只能在倒地时使用。</description>
|
||||||
|
<iconPath>UI/Abilities/MetalbloodInjection</iconPath>
|
||||||
|
<cooldownTicksRange>72000</cooldownTicksRange> <!-- 20分钟冷却 -->
|
||||||
|
<aiCanUse>true</aiCanUse>
|
||||||
|
<displayGizmoWhileUndrafted>true</displayGizmoWhileUndrafted>
|
||||||
|
<disableGizmoWhileUndrafted>false</disableGizmoWhileUndrafted>
|
||||||
|
<jobDef>CastAbilityOnThing</jobDef>
|
||||||
|
<targetRequired>false</targetRequired>
|
||||||
|
<canUseAoeToGetTargets>false</canUseAoeToGetTargets>
|
||||||
|
<verbProperties>
|
||||||
|
<verbClass>Verb_CastAbility</verbClass>
|
||||||
|
<range>0</range>
|
||||||
|
<warmupTime>1</warmupTime>
|
||||||
|
<soundCast>Psycast_Skip_Entry</soundCast>
|
||||||
|
<targetParams>
|
||||||
|
<canTargetSelf>true</canTargetSelf>
|
||||||
|
<canTargetPawns>false</canTargetPawns>
|
||||||
|
<canTargetBuildings>false</canTargetBuildings>
|
||||||
|
</targetParams>
|
||||||
|
</verbProperties>
|
||||||
|
<comps>
|
||||||
|
<li Class="WulaFallenEmpire.CompProperties_AbilityEmergencyEnergyRestore">
|
||||||
|
<durationTicks>600</durationTicks> <!-- 10秒 -->
|
||||||
|
<hediffDef>WULA_EmergencyEnergyRestore_Hediff</hediffDef>
|
||||||
|
<requireDowned>true</requireDowned> <!-- 是否需要倒地才能使用 -->
|
||||||
|
</li>
|
||||||
|
</comps>
|
||||||
|
</AbilityDef>
|
||||||
|
|
||||||
|
</Defs>
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
<label>能源炉超载</label>
|
<label>能源炉超载</label>
|
||||||
<description>立刻激活能源炉的超载能力,极大增加近战的命中率和速度,并且不会被敌人的近战减速。</description>
|
<description>立刻激活能源炉的超载能力,极大增加近战的命中率和速度,并且不会被敌人的近战减速。</description>
|
||||||
<iconPath>UI/Abilities/MetalbloodInjection</iconPath>
|
<iconPath>UI/Abilities/MetalbloodInjection</iconPath>
|
||||||
<cooldownTicksRange>1800</cooldownTicksRange> <!-- 30 seconds -->
|
<cooldownTicksRange>1800</cooldownTicksRange> <!-- 30 seconds -->
|
||||||
<hostile>false</hostile>
|
<hostile>false</hostile>
|
||||||
<groupAbility>true</groupAbility>
|
<groupAbility>true</groupAbility>
|
||||||
<displayGizmoWhileUndrafted>false</displayGizmoWhileUndrafted>
|
<displayGizmoWhileUndrafted>false</displayGizmoWhileUndrafted>
|
||||||
@@ -244,10 +244,13 @@
|
|||||||
</addedPartProps>
|
</addedPartProps>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
<statOffsets> <!-- StatOffset 是加法偏移量,正数增加,负数减少 -->
|
<minSeverity>0</minSeverity>
|
||||||
|
<capMods>
|
||||||
|
</capMods>
|
||||||
|
<statOffsets> <!-- StatOffset 是加法偏移量,正数增加,负数减少 -->
|
||||||
<WulaEnergyMaxLevelOffset>0.5</WulaEnergyMaxLevelOffset>
|
<WulaEnergyMaxLevelOffset>0.5</WulaEnergyMaxLevelOffset>
|
||||||
</statOffsets>
|
</statOffsets>
|
||||||
<statFactors> <!-- StatFactor 是乘法因子,小于 1.0 减少,大于 1.0 增加 -->
|
<statFactors> <!-- StatFactor 是乘法因子,小于 1.0 减少,大于 1.0 增加 -->
|
||||||
<WulaEnergyFallRateFactor>0.9</WulaEnergyFallRateFactor>
|
<WulaEnergyFallRateFactor>0.9</WulaEnergyFallRateFactor>
|
||||||
</statFactors>
|
</statFactors>
|
||||||
</li>
|
</li>
|
||||||
@@ -310,7 +313,9 @@
|
|||||||
<defName>WULA_Energy_Furnace_Hediff_DM_Engine</defName>
|
<defName>WULA_Energy_Furnace_Hediff_DM_Engine</defName>
|
||||||
<label>暗物质能源炉</label>
|
<label>暗物质能源炉</label>
|
||||||
<description>一台由暗物质作为能源驱动的合成人能源炉,拥有永不枯竭的动力,合成人安装后将不再需要充电。</description>
|
<description>一台由暗物质作为能源驱动的合成人能源炉,拥有永不枯竭的动力,合成人安装后将不再需要充电。</description>
|
||||||
<descriptionHyperlinks><ThingDef>WULA_Energy_Furnace_DM_Engine</ThingDef></descriptionHyperlinks>
|
<descriptionHyperlinks>
|
||||||
|
<ThingDef>WULA_Energy_Furnace_DM_Engine</ThingDef>
|
||||||
|
</descriptionHyperlinks>
|
||||||
<spawnThingOnRemoved>WULA_Energy_Furnace_DM_Engine</spawnThingOnRemoved>
|
<spawnThingOnRemoved>WULA_Energy_Furnace_DM_Engine</spawnThingOnRemoved>
|
||||||
<addedPartProps>
|
<addedPartProps>
|
||||||
<!-- <partEfficiency>1.5</partEfficiency> -->
|
<!-- <partEfficiency>1.5</partEfficiency> -->
|
||||||
@@ -334,13 +339,17 @@
|
|||||||
<defName>WULA_Energy_Furnace_DM_Engine</defName>
|
<defName>WULA_Energy_Furnace_DM_Engine</defName>
|
||||||
<label>暗物质能源炉</label>
|
<label>暗物质能源炉</label>
|
||||||
<description>一台由暗物质作为能源驱动的合成人能源炉,拥有永不枯竭的动力,合成人安装后将不再需要充电。</description>
|
<description>一台由暗物质作为能源驱动的合成人能源炉,拥有永不枯竭的动力,合成人安装后将不再需要充电。</description>
|
||||||
<descriptionHyperlinks><RecipeDef>Install_WULA_Energy_Furnace_DM_Engine</RecipeDef></descriptionHyperlinks>
|
<descriptionHyperlinks>
|
||||||
|
<RecipeDef>Install_WULA_Energy_Furnace_DM_Engine</RecipeDef>
|
||||||
|
</descriptionHyperlinks>
|
||||||
<costList>
|
<costList>
|
||||||
<Steel>100</Steel>
|
<Steel>100</Steel>
|
||||||
<ComponentSpacer>4</ComponentSpacer>
|
<ComponentSpacer>4</ComponentSpacer>
|
||||||
<WULA_Dark_Matter_Item>1</WULA_Dark_Matter_Item>
|
<WULA_Dark_Matter_Item>1</WULA_Dark_Matter_Item>
|
||||||
</costList>
|
</costList>
|
||||||
<thingSetMakerTags><li>RewardStandardMidFreq</li></thingSetMakerTags>
|
<thingSetMakerTags>
|
||||||
|
<li>RewardStandardMidFreq</li>
|
||||||
|
</thingSetMakerTags>
|
||||||
<recipeMaker>
|
<recipeMaker>
|
||||||
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
|
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
|
||||||
<recipeUsers>
|
<recipeUsers>
|
||||||
@@ -360,7 +369,8 @@
|
|||||||
<HediffDef>WULA_Energy_Furnace_Hediff_DM_Engine</HediffDef>
|
<HediffDef>WULA_Energy_Furnace_Hediff_DM_Engine</HediffDef>
|
||||||
</descriptionHyperlinks>
|
</descriptionHyperlinks>
|
||||||
<jobString>安装暗物质能源炉中</jobString>
|
<jobString>安装暗物质能源炉中</jobString>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<ingredients Inherit="False">
|
<ingredients Inherit="False">
|
||||||
<li>
|
<li>
|
||||||
@@ -393,7 +403,9 @@
|
|||||||
<defName>WULA_Energy_Furnace_Hediff_DM_CPU</defName>
|
<defName>WULA_Energy_Furnace_Hediff_DM_CPU</defName>
|
||||||
<label>暗物质处理器</label>
|
<label>暗物质处理器</label>
|
||||||
<description>由填充非交互性暗物质微粒的卡西米尔共振腔构成的处理器,极大增强合成人的意识。</description>
|
<description>由填充非交互性暗物质微粒的卡西米尔共振腔构成的处理器,极大增强合成人的意识。</description>
|
||||||
<descriptionHyperlinks><ThingDef>WULA_Energy_Furnace_DM_CPU</ThingDef></descriptionHyperlinks>
|
<descriptionHyperlinks>
|
||||||
|
<ThingDef>WULA_Energy_Furnace_DM_CPU</ThingDef>
|
||||||
|
</descriptionHyperlinks>
|
||||||
<spawnThingOnRemoved>WULA_Energy_Furnace_DM_CPU</spawnThingOnRemoved>
|
<spawnThingOnRemoved>WULA_Energy_Furnace_DM_CPU</spawnThingOnRemoved>
|
||||||
<addedPartProps>
|
<addedPartProps>
|
||||||
<!-- <partEfficiency>1.5</partEfficiency> -->
|
<!-- <partEfficiency>1.5</partEfficiency> -->
|
||||||
@@ -414,13 +426,17 @@
|
|||||||
<defName>WULA_Energy_Furnace_DM_CPU</defName>
|
<defName>WULA_Energy_Furnace_DM_CPU</defName>
|
||||||
<label>暗物质处理器</label>
|
<label>暗物质处理器</label>
|
||||||
<description>由填充非交互性暗物质微粒的卡西米尔共振腔构成的处理器,用于替换过时的生物处理器,极大增强合成人的意识。</description>
|
<description>由填充非交互性暗物质微粒的卡西米尔共振腔构成的处理器,用于替换过时的生物处理器,极大增强合成人的意识。</description>
|
||||||
<descriptionHyperlinks><RecipeDef>Install_WULA_Energy_Furnace_DM_CPU</RecipeDef></descriptionHyperlinks>
|
<descriptionHyperlinks>
|
||||||
|
<RecipeDef>Install_WULA_Energy_Furnace_DM_CPU</RecipeDef>
|
||||||
|
</descriptionHyperlinks>
|
||||||
<costList>
|
<costList>
|
||||||
<Steel>100</Steel>
|
<Steel>100</Steel>
|
||||||
<ComponentSpacer>8</ComponentSpacer>
|
<ComponentSpacer>8</ComponentSpacer>
|
||||||
<WULA_Dark_Matter_Item>2</WULA_Dark_Matter_Item>
|
<WULA_Dark_Matter_Item>2</WULA_Dark_Matter_Item>
|
||||||
</costList>
|
</costList>
|
||||||
<thingSetMakerTags><li>RewardStandardMidFreq</li></thingSetMakerTags>
|
<thingSetMakerTags>
|
||||||
|
<li>RewardStandardMidFreq</li>
|
||||||
|
</thingSetMakerTags>
|
||||||
<recipeMaker>
|
<recipeMaker>
|
||||||
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
|
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
|
||||||
<recipeUsers>
|
<recipeUsers>
|
||||||
@@ -440,7 +456,8 @@
|
|||||||
<HediffDef>WULA_Energy_Furnace_Hediff_DM_CPU</HediffDef>
|
<HediffDef>WULA_Energy_Furnace_Hediff_DM_CPU</HediffDef>
|
||||||
</descriptionHyperlinks>
|
</descriptionHyperlinks>
|
||||||
<jobString>安装暗物质处理器中</jobString>
|
<jobString>安装暗物质处理器中</jobString>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<ingredients Inherit="False">
|
<ingredients Inherit="False">
|
||||||
<li>
|
<li>
|
||||||
@@ -474,7 +491,9 @@
|
|||||||
<label>零素骨架</label>
|
<label>零素骨架</label>
|
||||||
<hediffClass>Hediff_Implant</hediffClass>
|
<hediffClass>Hediff_Implant</hediffClass>
|
||||||
<description>利用暗物质压缩而成的内嵌式中子装甲层和结构层,植入机械乌拉的体内时将使得她们获得强大的防御力。</description>
|
<description>利用暗物质压缩而成的内嵌式中子装甲层和结构层,植入机械乌拉的体内时将使得她们获得强大的防御力。</description>
|
||||||
<descriptionHyperlinks><ThingDef>WULA_Skeleton_Neutronium</ThingDef></descriptionHyperlinks>
|
<descriptionHyperlinks>
|
||||||
|
<ThingDef>WULA_Skeleton_Neutronium</ThingDef>
|
||||||
|
</descriptionHyperlinks>
|
||||||
<spawnThingOnRemoved>WULA_Skeleton_Neutronium</spawnThingOnRemoved>
|
<spawnThingOnRemoved>WULA_Skeleton_Neutronium</spawnThingOnRemoved>
|
||||||
<addedPartProps>
|
<addedPartProps>
|
||||||
<!-- <partEfficiency>1.5</partEfficiency> -->
|
<!-- <partEfficiency>1.5</partEfficiency> -->
|
||||||
@@ -502,12 +521,16 @@
|
|||||||
<defName>WULA_Skeleton_Neutronium</defName>
|
<defName>WULA_Skeleton_Neutronium</defName>
|
||||||
<label>零素骨架</label>
|
<label>零素骨架</label>
|
||||||
<description>利用暗物质压缩而成的内嵌式中子装甲层和结构层,植入机械乌拉的体内时将使得她们获得强大的防御力。</description>
|
<description>利用暗物质压缩而成的内嵌式中子装甲层和结构层,植入机械乌拉的体内时将使得她们获得强大的防御力。</description>
|
||||||
<descriptionHyperlinks><RecipeDef>Install_WULA_Energy_Furnace_DM_Engine</RecipeDef></descriptionHyperlinks>
|
<descriptionHyperlinks>
|
||||||
|
<RecipeDef>Install_WULA_Energy_Furnace_DM_Engine</RecipeDef>
|
||||||
|
</descriptionHyperlinks>
|
||||||
<costList>
|
<costList>
|
||||||
<Plasteel>100</Plasteel>
|
<Plasteel>100</Plasteel>
|
||||||
<WULA_Dark_Matter_Item>2</WULA_Dark_Matter_Item>
|
<WULA_Dark_Matter_Item>2</WULA_Dark_Matter_Item>
|
||||||
</costList>
|
</costList>
|
||||||
<thingSetMakerTags><li>RewardStandardMidFreq</li></thingSetMakerTags>
|
<thingSetMakerTags>
|
||||||
|
<li>RewardStandardMidFreq</li>
|
||||||
|
</thingSetMakerTags>
|
||||||
<recipeMaker>
|
<recipeMaker>
|
||||||
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
|
<researchPrerequisite>WULA_Synth_Addons_2_Technology</researchPrerequisite>
|
||||||
<recipeUsers>
|
<recipeUsers>
|
||||||
@@ -527,7 +550,8 @@
|
|||||||
<HediffDef>WULA_Skeleton_Hediff_Neutronium</HediffDef>
|
<HediffDef>WULA_Skeleton_Hediff_Neutronium</HediffDef>
|
||||||
</descriptionHyperlinks>
|
</descriptionHyperlinks>
|
||||||
<jobString>安装零素骨架中</jobString>
|
<jobString>安装零素骨架中</jobString>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<ingredients Inherit="False">
|
<ingredients Inherit="False">
|
||||||
<li>
|
<li>
|
||||||
@@ -639,7 +663,7 @@
|
|||||||
<defaultLabelColor>(0.5, 0.8, 1.0)</defaultLabelColor>
|
<defaultLabelColor>(0.5, 0.8, 1.0)</defaultLabelColor>
|
||||||
<isBad>false</isBad>
|
<isBad>false</isBad>
|
||||||
<priceImpact>true</priceImpact>
|
<priceImpact>true</priceImpact>
|
||||||
<initialSeverity>1</initialSeverity> <!-- Severity is bound to level of implant -->
|
<initialSeverity>1</initialSeverity> <!-- Severity is bound to level of implant -->
|
||||||
<minSeverity>0</minSeverity>
|
<minSeverity>0</minSeverity>
|
||||||
<maxSeverity>3</maxSeverity>
|
<maxSeverity>3</maxSeverity>
|
||||||
<keepOnBodyPartRestoration>True</keepOnBodyPartRestoration>
|
<keepOnBodyPartRestoration>True</keepOnBodyPartRestoration>
|
||||||
@@ -724,7 +748,7 @@
|
|||||||
<defaultLabelColor>(0.5, 0.8, 1.0)</defaultLabelColor>
|
<defaultLabelColor>(0.5, 0.8, 1.0)</defaultLabelColor>
|
||||||
<isBad>false</isBad>
|
<isBad>false</isBad>
|
||||||
<priceImpact>true</priceImpact>
|
<priceImpact>true</priceImpact>
|
||||||
<initialSeverity>1</initialSeverity> <!-- Severity is bound to level of implant -->
|
<initialSeverity>1</initialSeverity> <!-- Severity is bound to level of implant -->
|
||||||
<minSeverity>0</minSeverity>
|
<minSeverity>0</minSeverity>
|
||||||
<maxSeverity>3</maxSeverity>
|
<maxSeverity>3</maxSeverity>
|
||||||
<keepOnBodyPartRestoration>True</keepOnBodyPartRestoration>
|
<keepOnBodyPartRestoration>True</keepOnBodyPartRestoration>
|
||||||
@@ -791,12 +815,13 @@
|
|||||||
</appliedOnFixedBodyParts>
|
</appliedOnFixedBodyParts>
|
||||||
<uiIconThing>Steel</uiIconThing>
|
<uiIconThing>Steel</uiIconThing>
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<addsHediff>WULA_Body_Fixed</addsHediff>
|
<addsHediff>WULA_Body_Fixed</addsHediff>
|
||||||
<recipeUsers Inherit="False">
|
<recipeUsers Inherit="False">
|
||||||
<li>WulaSpecies</li>
|
<li>WulaSpecies</li>
|
||||||
</recipeUsers>
|
</recipeUsers>
|
||||||
|
|
||||||
<workAmount>1500</workAmount>
|
<workAmount>1500</workAmount>
|
||||||
<skillRequirements>
|
<skillRequirements>
|
||||||
<Medicine>3</Medicine>
|
<Medicine>3</Medicine>
|
||||||
@@ -830,12 +855,13 @@
|
|||||||
</appliedOnFixedBodyParts>
|
</appliedOnFixedBodyParts>
|
||||||
<uiIconThing>Steel</uiIconThing>
|
<uiIconThing>Steel</uiIconThing>
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<addsHediff>WULA_Body_Fixed</addsHediff>
|
<addsHediff>WULA_Body_Fixed</addsHediff>
|
||||||
<recipeUsers Inherit="False">
|
<recipeUsers Inherit="False">
|
||||||
<li>WulaSpecies</li>
|
<li>WulaSpecies</li>
|
||||||
</recipeUsers>
|
</recipeUsers>
|
||||||
|
|
||||||
<workAmount>3000</workAmount>
|
<workAmount>3000</workAmount>
|
||||||
<skillRequirements>
|
<skillRequirements>
|
||||||
<Medicine>7</Medicine>
|
<Medicine>7</Medicine>
|
||||||
@@ -869,12 +895,13 @@
|
|||||||
</appliedOnFixedBodyParts>
|
</appliedOnFixedBodyParts>
|
||||||
<uiIconThing>Steel</uiIconThing>
|
<uiIconThing>Steel</uiIconThing>
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<addsHediff>WULA_Body_Fixed</addsHediff>
|
<addsHediff>WULA_Body_Fixed</addsHediff>
|
||||||
<recipeUsers Inherit="False">
|
<recipeUsers Inherit="False">
|
||||||
<li>WulaSpecies</li>
|
<li>WulaSpecies</li>
|
||||||
</recipeUsers>
|
</recipeUsers>
|
||||||
|
|
||||||
<workAmount>3000</workAmount>
|
<workAmount>3000</workAmount>
|
||||||
<skillRequirements>
|
<skillRequirements>
|
||||||
<Medicine>7</Medicine>
|
<Medicine>7</Medicine>
|
||||||
@@ -908,12 +935,13 @@
|
|||||||
</appliedOnFixedBodyParts>
|
</appliedOnFixedBodyParts>
|
||||||
<uiIconThing>Steel</uiIconThing>
|
<uiIconThing>Steel</uiIconThing>
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<addsHediff>WULA_Body_Fixed</addsHediff>
|
<addsHediff>WULA_Body_Fixed</addsHediff>
|
||||||
<recipeUsers Inherit="False">
|
<recipeUsers Inherit="False">
|
||||||
<li>WulaSpecies</li>
|
<li>WulaSpecies</li>
|
||||||
</recipeUsers>
|
</recipeUsers>
|
||||||
|
|
||||||
<workAmount>1500</workAmount>
|
<workAmount>1500</workAmount>
|
||||||
<skillRequirements>
|
<skillRequirements>
|
||||||
<Medicine>3</Medicine>
|
<Medicine>3</Medicine>
|
||||||
@@ -947,12 +975,13 @@
|
|||||||
</appliedOnFixedBodyParts>
|
</appliedOnFixedBodyParts>
|
||||||
<uiIconThing>Steel</uiIconThing>
|
<uiIconThing>Steel</uiIconThing>
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<addsHediff>WULA_Body_Fixed</addsHediff>
|
<addsHediff>WULA_Body_Fixed</addsHediff>
|
||||||
<recipeUsers Inherit="False">
|
<recipeUsers Inherit="False">
|
||||||
<li>WulaSpecies</li>
|
<li>WulaSpecies</li>
|
||||||
</recipeUsers>
|
</recipeUsers>
|
||||||
|
|
||||||
<workAmount>1500</workAmount>
|
<workAmount>1500</workAmount>
|
||||||
<skillRequirements>
|
<skillRequirements>
|
||||||
<Medicine>3</Medicine>
|
<Medicine>3</Medicine>
|
||||||
@@ -994,12 +1023,13 @@
|
|||||||
</appliedOnFixedBodyParts>
|
</appliedOnFixedBodyParts>
|
||||||
<uiIconThing>Steel</uiIconThing>
|
<uiIconThing>Steel</uiIconThing>
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<surgeryOutcomeEffect IsNull="True"/> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True"/>
|
||||||
|
<!-- Always succeeds -->
|
||||||
<addsHediff>WULA_Body_Fixed</addsHediff>
|
<addsHediff>WULA_Body_Fixed</addsHediff>
|
||||||
<recipeUsers Inherit="False">
|
<recipeUsers Inherit="False">
|
||||||
<li>WulaSpecies</li>
|
<li>WulaSpecies</li>
|
||||||
</recipeUsers>
|
</recipeUsers>
|
||||||
|
|
||||||
<workAmount>7000</workAmount>
|
<workAmount>7000</workAmount>
|
||||||
<researchPrerequisites>
|
<researchPrerequisites>
|
||||||
<li>WULA_Repair_All_Technology</li>
|
<li>WULA_Repair_All_Technology</li>
|
||||||
@@ -1039,7 +1069,7 @@
|
|||||||
<descriptionShort>这个合成人的破损已被细致地修复。</descriptionShort>
|
<descriptionShort>这个合成人的破损已被细致地修复。</descriptionShort>
|
||||||
<isBad>false</isBad>
|
<isBad>false</isBad>
|
||||||
<duplicationAllowed>true</duplicationAllowed>
|
<duplicationAllowed>true</duplicationAllowed>
|
||||||
<keepOnBodyPartRestoration>false</keepOnBodyPartRestoration> <!-- true -->
|
<keepOnBodyPartRestoration>false</keepOnBodyPartRestoration> <!-- true -->
|
||||||
<comps>
|
<comps>
|
||||||
<li Class="HediffCompProperties_ChanceToRemove">
|
<li Class="HediffCompProperties_ChanceToRemove">
|
||||||
<intervalTicks>1</intervalTicks>
|
<intervalTicks>1</intervalTicks>
|
||||||
@@ -1066,7 +1096,8 @@
|
|||||||
<li>WULA_Synth_Psi_Technology</li>
|
<li>WULA_Synth_Psi_Technology</li>
|
||||||
</researchPrerequisites>
|
</researchPrerequisites>
|
||||||
<uiIconThing>WULA_Soul_Wedge</uiIconThing>
|
<uiIconThing>WULA_Soul_Wedge</uiIconThing>
|
||||||
<surgeryOutcomeEffect IsNull="True" /> <!-- Always succeeds -->
|
<surgeryOutcomeEffect IsNull="True" />
|
||||||
|
<!-- Always succeeds -->
|
||||||
<anesthetize>false</anesthetize>
|
<anesthetize>false</anesthetize>
|
||||||
<workSkillLearnFactor>2</workSkillLearnFactor>
|
<workSkillLearnFactor>2</workSkillLearnFactor>
|
||||||
<products>
|
<products>
|
||||||
@@ -1089,7 +1120,7 @@
|
|||||||
<alwaysShowSeverity>true</alwaysShowSeverity>
|
<alwaysShowSeverity>true</alwaysShowSeverity>
|
||||||
<isBad>true</isBad>
|
<isBad>true</isBad>
|
||||||
<duplicationAllowed>true</duplicationAllowed>
|
<duplicationAllowed>true</duplicationAllowed>
|
||||||
<keepOnBodyPartRestoration>true</keepOnBodyPartRestoration> <!-- true -->
|
<keepOnBodyPartRestoration>true</keepOnBodyPartRestoration> <!-- true -->
|
||||||
<defaultInstallPart>Brain</defaultInstallPart>
|
<defaultInstallPart>Brain</defaultInstallPart>
|
||||||
<comps>
|
<comps>
|
||||||
<li Class="HediffCompProperties_ChanceToRemove">
|
<li Class="HediffCompProperties_ChanceToRemove">
|
||||||
|
|||||||
35
1.6/Defs/HediffDefs/Hediffs_WULA_Emergency.xml
Normal file
35
1.6/Defs/HediffDefs/Hediffs_WULA_Emergency.xml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Defs>
|
||||||
|
|
||||||
|
<HediffDef>
|
||||||
|
<defName>WULA_EmergencyEnergyRestore_Hediff</defName>
|
||||||
|
<label>紧急能量恢复</label>
|
||||||
|
<description>紧急能量协议激活中,能量需求被暂时锁定在100%。</description>
|
||||||
|
<hediffClass>WulaFallenEmpire.Hediff_EmergencyEnergyRestore</hediffClass>
|
||||||
|
<defaultLabelColor>(0.2, 0.8, 1.0)</defaultLabelColor>
|
||||||
|
<scenarioCanAdd>false</scenarioCanAdd>
|
||||||
|
<maxSeverity>1.0</maxSeverity>
|
||||||
|
<isBad>false</isBad>
|
||||||
|
<comps>
|
||||||
|
<li Class="HediffCompProperties_Disappears">
|
||||||
|
<disappearsAfterTicks>600</disappearsAfterTicks> <!-- 10秒 -->
|
||||||
|
<showRemainingTime>true</showRemainingTime>
|
||||||
|
</li>
|
||||||
|
</comps>
|
||||||
|
<stages>
|
||||||
|
<li>
|
||||||
|
<capMods>
|
||||||
|
<li>
|
||||||
|
<capacity>Consciousness</capacity>
|
||||||
|
<setMax>1.0</setMax>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<capacity>Moving</capacity>
|
||||||
|
<setMax>1.0</setMax>
|
||||||
|
</li>
|
||||||
|
</capMods>
|
||||||
|
</li>
|
||||||
|
</stages>
|
||||||
|
</HediffDef>
|
||||||
|
|
||||||
|
</Defs>
|
||||||
@@ -29,7 +29,9 @@
|
|||||||
<apparelTags>
|
<apparelTags>
|
||||||
<li>Wula_Apparel_Init</li>
|
<li>Wula_Apparel_Init</li>
|
||||||
</apparelTags>
|
</apparelTags>
|
||||||
|
<abilities>
|
||||||
|
<li>WULA_EmergencyEnergyRestore</li>
|
||||||
|
</abilities>
|
||||||
<weaponMoney>0</weaponMoney>
|
<weaponMoney>0</weaponMoney>
|
||||||
<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
|
<apparelAllowHeadgearChance>0</apparelAllowHeadgearChance>
|
||||||
<apparelMoney>1000~2000</apparelMoney>
|
<apparelMoney>1000~2000</apparelMoney>
|
||||||
@@ -71,7 +73,9 @@
|
|||||||
<apparelTags>
|
<apparelTags>
|
||||||
<li>Wula_Apparel_Init</li>
|
<li>Wula_Apparel_Init</li>
|
||||||
</apparelTags>
|
</apparelTags>
|
||||||
|
<abilities>
|
||||||
|
<li>WULA_EmergencyEnergyRestore</li>
|
||||||
|
</abilities>
|
||||||
<apparelRequired Inherit="False" />
|
<apparelRequired Inherit="False" />
|
||||||
|
|
||||||
<weaponMoney>0</weaponMoney>
|
<weaponMoney>0</weaponMoney>
|
||||||
@@ -87,7 +91,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</backstoryFiltersOverride>
|
</backstoryFiltersOverride>
|
||||||
</PawnKindDef>
|
</PawnKindDef>
|
||||||
|
|
||||||
<PawnKindDef ParentName="HeavyMechanoidKind">
|
<PawnKindDef ParentName="HeavyMechanoidKind">
|
||||||
<defName>Wula_AI_Heavy_Panzer_PawnKind</defName>
|
<defName>Wula_AI_Heavy_Panzer_PawnKind</defName>
|
||||||
<label>SMp-38"萨克森"</label>
|
<label>SMp-38"萨克森"</label>
|
||||||
@@ -107,12 +111,12 @@
|
|||||||
</li>
|
</li>
|
||||||
</lifeStages>
|
</lifeStages>
|
||||||
<weaponMoney>99999~99999</weaponMoney>
|
<weaponMoney>99999~99999</weaponMoney>
|
||||||
|
|
||||||
<weaponTags>
|
<weaponTags>
|
||||||
<li>WULA_AI_Heavy_Panzer_AT_Weapon</li>
|
<li>WULA_AI_Heavy_Panzer_AT_Weapon</li>
|
||||||
</weaponTags>
|
</weaponTags>
|
||||||
|
|
||||||
<controlGroupPortraitZoom>1</controlGroupPortraitZoom>
|
<controlGroupPortraitZoom>1</controlGroupPortraitZoom>
|
||||||
</PawnKindDef>
|
</PawnKindDef>
|
||||||
<PawnKindDef ParentName="HeavyMechanoidKind">
|
<PawnKindDef ParentName="HeavyMechanoidKind">
|
||||||
<defName>Wula_AI_Heavy_Panzer_Gunnery_PawnKind</defName>
|
<defName>Wula_AI_Heavy_Panzer_Gunnery_PawnKind</defName>
|
||||||
@@ -133,14 +137,14 @@
|
|||||||
</li>
|
</li>
|
||||||
</lifeStages>
|
</lifeStages>
|
||||||
<weaponMoney>99999~99999</weaponMoney>
|
<weaponMoney>99999~99999</weaponMoney>
|
||||||
|
|
||||||
<weaponTags>
|
<weaponTags>
|
||||||
<li>WULA_AI_Heavy_Panzer_Gunner_Weapon</li>
|
<li>WULA_AI_Heavy_Panzer_Gunner_Weapon</li>
|
||||||
</weaponTags>
|
</weaponTags>
|
||||||
|
|
||||||
<controlGroupPortraitZoom>1</controlGroupPortraitZoom>
|
<controlGroupPortraitZoom>1</controlGroupPortraitZoom>
|
||||||
</PawnKindDef>
|
</PawnKindDef>
|
||||||
|
|
||||||
<PawnKindDef ParentName="NonCombatLightMechanoidKind">
|
<PawnKindDef ParentName="NonCombatLightMechanoidKind">
|
||||||
<defName>Mech_WULA_Cat</defName>
|
<defName>Mech_WULA_Cat</defName>
|
||||||
<label>乌拉猫猫</label>
|
<label>乌拉猫猫</label>
|
||||||
@@ -203,7 +207,7 @@
|
|||||||
<weaponTags>
|
<weaponTags>
|
||||||
<li>Wula_Constructor_Cat_Weapon</li>
|
<li>Wula_Constructor_Cat_Weapon</li>
|
||||||
</weaponTags>
|
</weaponTags>
|
||||||
<lifeStages Inherit="False">
|
<lifeStages Inherit="False">
|
||||||
<li>
|
<li>
|
||||||
<bodyGraphicData>
|
<bodyGraphicData>
|
||||||
<texPath>Wula/Things/WULA_Constructor_Cat/WULA_Cat_Thin</texPath>
|
<texPath>Wula/Things/WULA_Constructor_Cat/WULA_Cat_Thin</texPath>
|
||||||
@@ -219,7 +223,7 @@
|
|||||||
<defName>Mech_WULA_Cat_Assault</defName>
|
<defName>Mech_WULA_Cat_Assault</defName>
|
||||||
<label>突击乌拉猫猫</label>
|
<label>突击乌拉猫猫</label>
|
||||||
<race>Mech_WULA_Cat_Assault</race>
|
<race>Mech_WULA_Cat_Assault</race>
|
||||||
<lifeStages Inherit="False">
|
<lifeStages Inherit="False">
|
||||||
<li>
|
<li>
|
||||||
<bodyGraphicData>
|
<bodyGraphicData>
|
||||||
<texPath>Wula/Things/WULA_Assault_Cat/WULA_Cat_Thin</texPath>
|
<texPath>Wula/Things/WULA_Assault_Cat/WULA_Cat_Thin</texPath>
|
||||||
@@ -238,7 +242,7 @@
|
|||||||
<defName>Mech_WULA_Cat_Bomb</defName>
|
<defName>Mech_WULA_Cat_Bomb</defName>
|
||||||
<label>炸弹乌拉猫猫</label>
|
<label>炸弹乌拉猫猫</label>
|
||||||
<race>Mech_WULA_Cat_Bomb</race>
|
<race>Mech_WULA_Cat_Bomb</race>
|
||||||
<lifeStages Inherit="False">
|
<lifeStages Inherit="False">
|
||||||
<li>
|
<li>
|
||||||
<bodyGraphicData>
|
<bodyGraphicData>
|
||||||
<texPath>Wula/Things/WULA_bomb_Cat/WULA_Cat_Thin</texPath>
|
<texPath>Wula/Things/WULA_bomb_Cat/WULA_Cat_Thin</texPath>
|
||||||
@@ -265,7 +269,7 @@
|
|||||||
<weaponTags>
|
<weaponTags>
|
||||||
<li>Wula_Assault_Cat_Weapon</li>
|
<li>Wula_Assault_Cat_Weapon</li>
|
||||||
</weaponTags>
|
</weaponTags>
|
||||||
<lifeStages Inherit="False">
|
<lifeStages Inherit="False">
|
||||||
<li>
|
<li>
|
||||||
<bodyGraphicData>
|
<bodyGraphicData>
|
||||||
<texPath>Wula/Things/WULA_Commander_Cat/WULA_Cat_Thin</texPath>
|
<texPath>Wula/Things/WULA_Commander_Cat/WULA_Cat_Thin</texPath>
|
||||||
|
|||||||
0
1.6/Defs/ThingDefs_Misc/Apparel/WULA_ShieldBelt.xml
Normal file
0
1.6/Defs/ThingDefs_Misc/Apparel/WULA_ShieldBelt.xml
Normal file
@@ -1,204 +1,205 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Defs>
|
<Defs>
|
||||||
|
|
||||||
<!-- 示例1:轻型爆炸射线武器 - 每发都爆炸 -->
|
<!-- 示例1:轻型爆炸射线武器 - 每发都爆炸 -->
|
||||||
<ThingDef ParentName="BaseHumanMakeableGun">
|
<ThingDef ParentName="BaseHumanMakeableGun">
|
||||||
<defName>WULA_LightExplosiveBeam</defName>
|
<defName>WULA_LightExplosiveBeam</defName>
|
||||||
<label>CLa-15"蓝爆"轻型</label>
|
<label>CLa-15"蓝爆"轻型</label>
|
||||||
<description>乌拉帝国的轻型爆炸射线武器,每发射线都会在目标位置产生小型爆炸。适合对付轻装甲目标。</description>
|
<description>乌拉帝国的轻型爆炸射线武器,每发射线都会在目标位置产生小型爆炸。适合对付轻装甲目标。</description>
|
||||||
<techLevel>Ultra</techLevel>
|
<techLevel>Ultra</techLevel>
|
||||||
<graphicData>
|
<graphicData>
|
||||||
<texPath>Wula/Weapon/WULA_RW_Fractal_AR</texPath>
|
<texPath>Wula/Weapon/WULA_RW_Fractal_AR</texPath>
|
||||||
<graphicClass>Graphic_Single</graphicClass>
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
<drawSize>1.35</drawSize>
|
<drawSize>1.35</drawSize>
|
||||||
</graphicData>
|
</graphicData>
|
||||||
<soundInteract>Interact_ChargeRifle</soundInteract>
|
<soundInteract>Interact_ChargeRifle</soundInteract>
|
||||||
<weaponClasses>
|
<weaponClasses>
|
||||||
<li>LongShots</li>
|
<li>LongShots</li>
|
||||||
<li>RangedHeavy</li>
|
<li>RangedHeavy</li>
|
||||||
</weaponClasses>
|
</weaponClasses>
|
||||||
<statBases>
|
<statBases>
|
||||||
<WorkToMake>15000</WorkToMake>
|
<WorkToMake>15000</WorkToMake>
|
||||||
<Mass>2.8</Mass>
|
<Mass>2.8</Mass>
|
||||||
<AccuracyTouch>0.6</AccuracyTouch>
|
<AccuracyTouch>0.6</AccuracyTouch>
|
||||||
<AccuracyShort>0.85</AccuracyShort>
|
<AccuracyShort>0.85</AccuracyShort>
|
||||||
<AccuracyMedium>0.7</AccuracyMedium>
|
<AccuracyMedium>0.7</AccuracyMedium>
|
||||||
<AccuracyLong>0.45</AccuracyLong>
|
<AccuracyLong>0.45</AccuracyLong>
|
||||||
<RangedWeapon_Cooldown>1.2</RangedWeapon_Cooldown>
|
<RangedWeapon_Cooldown>1.2</RangedWeapon_Cooldown>
|
||||||
</statBases>
|
</statBases>
|
||||||
<costList Inherit="False">
|
<costList Inherit="False">
|
||||||
<Steel>120</Steel>
|
<Steel>120</Steel>
|
||||||
<Plasteel>25</Plasteel>
|
<Plasteel>25</Plasteel>
|
||||||
<ComponentSpacer>2</ComponentSpacer>
|
<ComponentSpacer>2</ComponentSpacer>
|
||||||
</costList>
|
</costList>
|
||||||
<verbs>
|
<verbs>
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<warmupTime>0.3</warmupTime>
|
|
||||||
<range>25</range>
|
|
||||||
<burstShotCount>4</burstShotCount>
|
|
||||||
<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
|
|
||||||
<beamWidth>2</beamWidth>
|
|
||||||
<beamDamageDef>Burn</beamDamageDef>
|
|
||||||
<soundCastBeam>BeamGraser_Shooting</soundCastBeam>
|
|
||||||
<beamMoteDef>Mote_GraserBeamBase</beamMoteDef>
|
|
||||||
|
|
||||||
<!-- 每发都爆炸 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>1</explosionShotInterval>
|
|
||||||
<explosionRadius>1.8</explosionRadius>
|
|
||||||
<explosionDamageDef>Flame</explosionDamageDef>
|
|
||||||
<explosionDamage>15</explosionDamage>
|
|
||||||
<explosionSound>Explosion_Small</explosionSound>
|
|
||||||
<chanceToStartFire>0.6</chanceToStartFire>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
<recipeMaker>
|
|
||||||
<recipeUsers Inherit="False">
|
|
||||||
<li>WULA_Cube_Productor_Energy</li>
|
|
||||||
</recipeUsers>
|
|
||||||
<researchPrerequisite>WULA_Synth_Weapon_2_Stun_Technology</researchPrerequisite>
|
|
||||||
<skillRequirements>
|
|
||||||
<Crafting>4</Crafting>
|
|
||||||
</skillRequirements>
|
|
||||||
</recipeMaker>
|
|
||||||
</ThingDef>
|
|
||||||
|
|
||||||
<!-- 示例2:重型爆炸射线武器 - 每3发爆炸一次,威力更大 -->
|
<!-- 基础射线参数 -->
|
||||||
<ThingDef ParentName="BaseHumanMakeableGun">
|
<hasStandardCommand>true</hasStandardCommand>
|
||||||
<defName>WULA_HeavyExplosiveBeam</defName>
|
<warmupTime>0.3</warmupTime>
|
||||||
<label>CLa-16"蓝爆"重型</label>
|
<range>25</range>
|
||||||
<description>乌拉帝国的重型爆炸射线武器,每三发射线会触发一次大威力爆炸,并在爆炸区域留下燃料污渍。</description>
|
<burstShotCount>4</burstShotCount>
|
||||||
<techLevel>Ultra</techLevel>
|
<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
|
||||||
<graphicData>
|
<beamDamageDef>Burn</beamDamageDef>
|
||||||
<texPath>Wula/Weapon/WULA_RW_Fractal_AR</texPath>
|
|
||||||
<graphicClass>Graphic_Single</graphicClass>
|
|
||||||
<drawSize>1.75</drawSize>
|
|
||||||
</graphicData>
|
|
||||||
<soundInteract>Interact_ChargeRifle</soundInteract>
|
|
||||||
<weaponClasses>
|
|
||||||
<li>LongShots</li>
|
|
||||||
<li>RangedHeavy</li>
|
|
||||||
</weaponClasses>
|
|
||||||
<statBases>
|
|
||||||
<WorkToMake>35000</WorkToMake>
|
|
||||||
<Mass>4.2</Mass>
|
|
||||||
<AccuracyTouch>0.45</AccuracyTouch>
|
|
||||||
<AccuracyShort>0.8</AccuracyShort>
|
|
||||||
<AccuracyMedium>0.65</AccuracyMedium>
|
|
||||||
<AccuracyLong>0.4</AccuracyLong>
|
|
||||||
<RangedWeapon_Cooldown>2.1</RangedWeapon_Cooldown>
|
|
||||||
</statBases>
|
|
||||||
<costList Inherit="False">
|
|
||||||
<Steel>200</Steel>
|
|
||||||
<Plasteel>60</Plasteel>
|
|
||||||
<ComponentSpacer>6</ComponentSpacer>
|
|
||||||
<Uranium>15</Uranium>
|
|
||||||
</costList>
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<warmupTime>0.8</warmupTime>
|
|
||||||
<range>35</range>
|
|
||||||
<burstShotCount>9</burstShotCount>
|
|
||||||
<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
|
|
||||||
<beamWidth>4</beamWidth>
|
|
||||||
<beamDamageDef>Stun</beamDamageDef>
|
|
||||||
<soundCastBeam>BeamGraser_Shooting</soundCastBeam>
|
|
||||||
<beamMoteDef>Mote_GraserBeamBase</beamMoteDef>
|
|
||||||
<beamEndEffecterDef>GraserBeam_End</beamEndEffecterDef>
|
|
||||||
|
|
||||||
<!-- 每3发爆炸一次 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>3</explosionShotInterval>
|
|
||||||
<explosionRadius>3.2</explosionRadius>
|
|
||||||
<explosionDamageDef>Bomb</explosionDamageDef>
|
|
||||||
<explosionDamage>35</explosionDamage>
|
|
||||||
<explosionArmorPenetration>0.4</explosionArmorPenetration>
|
|
||||||
<explosionSound>Explosion_Bomb</explosionSound>
|
|
||||||
<chanceToStartFire>0.4</chanceToStartFire>
|
|
||||||
<postExplosionSpawnThingDef>Filth_Fuel</postExplosionSpawnThingDef>
|
|
||||||
<postExplosionSpawnChance>0.25</postExplosionSpawnChance>
|
|
||||||
<postExplosionSpawnThingCount>2</postExplosionSpawnThingCount>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
<recipeMaker>
|
|
||||||
<recipeUsers Inherit="False">
|
|
||||||
<li>WULA_Cube_Productor_Energy</li>
|
|
||||||
</recipeUsers>
|
|
||||||
<researchPrerequisite>WULA_Synth_Weapon_2_Stun_Technology</researchPrerequisite>
|
|
||||||
<skillRequirements>
|
|
||||||
<Crafting>6</Crafting>
|
|
||||||
</skillRequirements>
|
|
||||||
</recipeMaker>
|
|
||||||
</ThingDef>
|
|
||||||
|
|
||||||
<!-- 示例3:毒气爆炸射线武器 - 产生毒气效果 -->
|
<!-- 消除射线偏移的参数 -->
|
||||||
<ThingDef ParentName="BaseHumanMakeableGun">
|
<beamFullWidthRange>1000</beamFullWidthRange>
|
||||||
<defName>WULA_ToxicExplosiveBeam</defName>
|
<beamWidth>-1</beamWidth>
|
||||||
<label>CLa-17"蓝毒"</label>
|
<beamMaxDeviation>0</beamMaxDeviation>
|
||||||
<description>乌拉帝国的毒气射线武器,每两发射线会触发毒气爆炸,在目标区域释放有毒气体。</description>
|
<beamCurvature>0</beamCurvature>
|
||||||
<techLevel>Ultra</techLevel>
|
<beamStartOffset>0</beamStartOffset>
|
||||||
<graphicData>
|
|
||||||
<texPath>Wula/Weapon/WULA_RW_Fractal_AR</texPath>
|
<!-- 视觉和音效 -->
|
||||||
<graphicClass>Graphic_Single</graphicClass>
|
<muzzleFlashScale>0</muzzleFlashScale>
|
||||||
<drawSize>1.55</drawSize>
|
<soundCastBeam>BeamGraser_Shooting</soundCastBeam>
|
||||||
</graphicData>
|
<beamGroundFleckDef>Fleck_BeamBurn</beamGroundFleckDef>
|
||||||
<soundInteract>Interact_ChargeRifle</soundInteract>
|
<beamFleckChancePerTick>0.32</beamFleckChancePerTick>
|
||||||
<weaponClasses>
|
<beamMoteDef>Mote_GraserBeamBase</beamMoteDef>
|
||||||
<li>LongShots</li>
|
<beamEndEffecterDef>GraserBeam_End</beamEndEffecterDef>
|
||||||
<li>RangedHeavy</li>
|
|
||||||
</weaponClasses>
|
<!-- 火焰效果 -->
|
||||||
<statBases>
|
<beamChanceToStartFire>0</beamChanceToStartFire>
|
||||||
<WorkToMake>28000</WorkToMake>
|
<beamChanceToAttachFire>0</beamChanceToAttachFire>
|
||||||
<Mass>3.6</Mass>
|
<beamFireSizeRange>0</beamFireSizeRange>
|
||||||
<AccuracyTouch>0.55</AccuracyTouch>
|
|
||||||
<AccuracyShort>0.85</AccuracyShort>
|
<!-- 其他射线属性 -->
|
||||||
<AccuracyMedium>0.7</AccuracyMedium>
|
<beamHitsNeighborCells>true</beamHitsNeighborCells>
|
||||||
<AccuracyLong>0.5</AccuracyLong>
|
<beamLineFleckChanceCurve>
|
||||||
<RangedWeapon_Cooldown>1.8</RangedWeapon_Cooldown>
|
<points>
|
||||||
</statBases>
|
<li>(0, 0)</li>
|
||||||
<costList Inherit="False">
|
<li>(0.65, 0.4)</li>
|
||||||
<Steel>150</Steel>
|
<li>(1, 0.75)</li>
|
||||||
<Plasteel>40</Plasteel>
|
</points>
|
||||||
<ComponentSpacer>4</ComponentSpacer>
|
</beamLineFleckChanceCurve>
|
||||||
<Chemfuel>25</Chemfuel>
|
|
||||||
</costList>
|
<!-- 攻击目标设置 -->
|
||||||
<verbs>
|
<targetParams>
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
<canTargetLocations>true</canTargetLocations>
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
</targetParams>
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<warmupTime>0.6</warmupTime>
|
<!-- 每发都爆炸 -->
|
||||||
<range>28</range>
|
<enableExplosion>true</enableExplosion>
|
||||||
<burstShotCount>6</burstShotCount>
|
<explosionShotInterval>1</explosionShotInterval>
|
||||||
<ticksBetweenBurstShots>7</ticksBetweenBurstShots>
|
<explosionRadius>1.8</explosionRadius>
|
||||||
<beamWidth>2.5</beamWidth>
|
<explosionDamageDef>Flame</explosionDamageDef>
|
||||||
<beamDamageDef>ToxGas</beamDamageDef>
|
<explosionDamage>15</explosionDamage>
|
||||||
<soundCastBeam>BeamGraser_Shooting</soundCastBeam>
|
<explosionSound>Explosion_Bomb</explosionSound>
|
||||||
<beamMoteDef>Mote_GraserBeamBase</beamMoteDef>
|
<chanceToStartFire>0.6</chanceToStartFire>
|
||||||
|
</li>
|
||||||
<!-- 每2发爆炸一次,产生毒气 -->
|
</verbs>
|
||||||
<enableExplosion>true</enableExplosion>
|
<recipeMaker>
|
||||||
<explosionShotInterval>2</explosionShotInterval>
|
<recipeUsers Inherit="False">
|
||||||
<explosionRadius>2.8</explosionRadius>
|
<li>WULA_Cube_Productor_Energy</li>
|
||||||
<explosionDamageDef>ToxGas</explosionDamageDef>
|
</recipeUsers>
|
||||||
<explosionDamage>20</explosionDamage>
|
<researchPrerequisite>WULA_Synth_Weapon_2_Stun_Technology</researchPrerequisite>
|
||||||
<explosionSound>Explosion_Gas</explosionSound>
|
<skillRequirements>
|
||||||
<postExplosionGasType>ToxGas</postExplosionGasType>
|
<Crafting>4</Crafting>
|
||||||
<chanceToStartFire>0.1</chanceToStartFire>
|
</skillRequirements>
|
||||||
</li>
|
</recipeMaker>
|
||||||
</verbs>
|
</ThingDef>
|
||||||
<recipeMaker>
|
|
||||||
<recipeUsers Inherit="False">
|
<!-- 示例2:重型爆炸射线武器 - 每3发爆炸一次,威力更大 -->
|
||||||
<li>WULA_Cube_Productor_Energy</li>
|
<ThingDef ParentName="BaseHumanMakeableGun">
|
||||||
</recipeUsers>
|
<defName>WULA_HeavyExplosiveBeam</defName>
|
||||||
<researchPrerequisite>WULA_Synth_Weapon_2_Stun_Technology</researchPrerequisite>
|
<label>CLa-16"蓝爆"重型</label>
|
||||||
<skillRequirements>
|
<description>乌拉帝国的重型爆炸射线武器,每三发射线会触发一次大威力爆炸,并在爆炸区域留下燃料污渍。</description>
|
||||||
<Crafting>5</Crafting>
|
<techLevel>Ultra</techLevel>
|
||||||
</skillRequirements>
|
<graphicData>
|
||||||
</recipeMaker>
|
<texPath>Wula/Weapon/WULA_RW_Fractal_AR</texPath>
|
||||||
</ThingDef>
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
|
<drawSize>1.75</drawSize>
|
||||||
|
</graphicData>
|
||||||
|
<soundInteract>Interact_ChargeRifle</soundInteract>
|
||||||
|
<weaponClasses>
|
||||||
|
<li>LongShots</li>
|
||||||
|
<li>RangedHeavy</li>
|
||||||
|
</weaponClasses>
|
||||||
|
<statBases>
|
||||||
|
<WorkToMake>35000</WorkToMake>
|
||||||
|
<Mass>4.2</Mass>
|
||||||
|
<AccuracyTouch>0.45</AccuracyTouch>
|
||||||
|
<AccuracyShort>0.8</AccuracyShort>
|
||||||
|
<AccuracyMedium>0.65</AccuracyMedium>
|
||||||
|
<AccuracyLong>0.4</AccuracyLong>
|
||||||
|
<RangedWeapon_Cooldown>2.1</RangedWeapon_Cooldown>
|
||||||
|
</statBases>
|
||||||
|
<costList Inherit="False">
|
||||||
|
<Steel>200</Steel>
|
||||||
|
<Plasteel>60</Plasteel>
|
||||||
|
<ComponentSpacer>6</ComponentSpacer>
|
||||||
|
<Uranium>15</Uranium>
|
||||||
|
</costList>
|
||||||
|
<verbs>
|
||||||
|
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
||||||
|
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
||||||
|
|
||||||
|
<!-- 基础射线参数 -->
|
||||||
|
<hasStandardCommand>true</hasStandardCommand>
|
||||||
|
<warmupTime>0.8</warmupTime>
|
||||||
|
<range>35</range>
|
||||||
|
<burstShotCount>9</burstShotCount>
|
||||||
|
<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
|
||||||
|
<beamDamageDef>Stun</beamDamageDef>
|
||||||
|
|
||||||
|
<!-- 消除射线偏移的参数 -->
|
||||||
|
<beamFullWidthRange>1000</beamFullWidthRange>
|
||||||
|
<beamWidth>-1</beamWidth>
|
||||||
|
<beamMaxDeviation>0</beamMaxDeviation>
|
||||||
|
<beamCurvature>0</beamCurvature>
|
||||||
|
<beamStartOffset>0</beamStartOffset>
|
||||||
|
|
||||||
|
<!-- 视觉和音效 -->
|
||||||
|
<muzzleFlashScale>0</muzzleFlashScale>
|
||||||
|
<soundCastBeam>BeamGraser_Shooting</soundCastBeam>
|
||||||
|
<beamGroundFleckDef>Fleck_BeamBurn</beamGroundFleckDef>
|
||||||
|
<beamFleckChancePerTick>0.32</beamFleckChancePerTick>
|
||||||
|
<beamMoteDef>Mote_GraserBeamBase</beamMoteDef>
|
||||||
|
<beamEndEffecterDef>GraserBeam_End</beamEndEffecterDef>
|
||||||
|
|
||||||
|
<!-- 火焰效果 -->
|
||||||
|
<beamChanceToStartFire>0</beamChanceToStartFire>
|
||||||
|
<beamChanceToAttachFire>0</beamChanceToAttachFire>
|
||||||
|
<beamFireSizeRange>0</beamFireSizeRange>
|
||||||
|
|
||||||
|
<!-- 其他射线属性 -->
|
||||||
|
<beamHitsNeighborCells>true</beamHitsNeighborCells>
|
||||||
|
<beamLineFleckChanceCurve>
|
||||||
|
<points>
|
||||||
|
<li>(0, 0)</li>
|
||||||
|
<li>(0.65, 0.4)</li>
|
||||||
|
<li>(1, 0.75)</li>
|
||||||
|
</points>
|
||||||
|
</beamLineFleckChanceCurve>
|
||||||
|
|
||||||
|
<!-- 攻击目标设置 -->
|
||||||
|
<targetParams>
|
||||||
|
<canTargetLocations>true</canTargetLocations>
|
||||||
|
</targetParams>
|
||||||
|
|
||||||
|
<!-- 每3发爆炸一次 -->
|
||||||
|
<enableExplosion>true</enableExplosion>
|
||||||
|
<explosionShotInterval>3</explosionShotInterval>
|
||||||
|
<explosionRadius>3.2</explosionRadius>
|
||||||
|
<explosionDamageDef>Bomb</explosionDamageDef>
|
||||||
|
<explosionDamage>35</explosionDamage>
|
||||||
|
<explosionArmorPenetration>0.4</explosionArmorPenetration>
|
||||||
|
<explosionSound>Explosion_Bomb</explosionSound>
|
||||||
|
<chanceToStartFire>0.4</chanceToStartFire>
|
||||||
|
<postExplosionSpawnThingDef>Filth_Fuel</postExplosionSpawnThingDef>
|
||||||
|
<postExplosionSpawnChance>0.25</postExplosionSpawnChance>
|
||||||
|
<postExplosionSpawnThingCount>2</postExplosionSpawnThingCount>
|
||||||
|
</li>
|
||||||
|
</verbs>
|
||||||
|
<recipeMaker>
|
||||||
|
<recipeUsers Inherit="False">
|
||||||
|
<li>WULA_Cube_Productor_Energy</li>
|
||||||
|
</recipeUsers>
|
||||||
|
<researchPrerequisite>WULA_Synth_Weapon_2_Stun_Technology</researchPrerequisite>
|
||||||
|
<skillRequirements>
|
||||||
|
<Crafting>6</Crafting>
|
||||||
|
</skillRequirements>
|
||||||
|
</recipeMaker>
|
||||||
|
</ThingDef>
|
||||||
|
|
||||||
</Defs>
|
</Defs>
|
||||||
@@ -1,259 +0,0 @@
|
|||||||
# 爆炸射线武器开发指南
|
|
||||||
|
|
||||||
## 架构概述
|
|
||||||
|
|
||||||
爆炸射线武器系统基于RimWorld原版的射线武器系统,通过继承和扩展实现爆炸功能。
|
|
||||||
|
|
||||||
### 核心类结构
|
|
||||||
|
|
||||||
```
|
|
||||||
Verb (RimWorld原版)
|
|
||||||
└── Verb_ShootBeam (RimWorld原版)
|
|
||||||
└── Verb_ShootBeamExplosive (自定义)
|
|
||||||
|
|
||||||
VerbProperties (RimWorld原版)
|
|
||||||
└── VerbPropertiesExplosiveBeam (自定义)
|
|
||||||
```
|
|
||||||
|
|
||||||
## 代码架构
|
|
||||||
|
|
||||||
### 1. Verb_ShootBeamExplosive.cs
|
|
||||||
|
|
||||||
#### 核心字段
|
|
||||||
```csharp
|
|
||||||
private int explosionShotCounter = 0; // 爆炸计数器
|
|
||||||
```
|
|
||||||
|
|
||||||
#### 关键方法
|
|
||||||
- `TryCastShot()`: 重写射击方法,添加爆炸逻辑
|
|
||||||
- `TriggerExplosion()`: 触发爆炸的核心方法
|
|
||||||
- `ExposeData()`: 保存/加载数据
|
|
||||||
|
|
||||||
#### 工作流程
|
|
||||||
1. 调用基类的 `TryCastShot()`
|
|
||||||
2. 如果射击成功且启用爆炸,递增计数器
|
|
||||||
3. 当计数器达到间隔值时,触发爆炸并重置计数器
|
|
||||||
|
|
||||||
### 2. VerbPropertiesExplosiveBeam.cs
|
|
||||||
|
|
||||||
#### 配置属性分类
|
|
||||||
- **基础控制**: `enableExplosion`, `explosionShotInterval`
|
|
||||||
- **伤害属性**: `explosionRadius`, `explosionDamage`, `explosionDamageDef`
|
|
||||||
- **效果属性**: `explosionSound`, `explosionEffecter`
|
|
||||||
- **后续效果**: `postExplosionSpawn*`, `postExplosionGasType`
|
|
||||||
|
|
||||||
## 扩展开发
|
|
||||||
|
|
||||||
### 添加新的爆炸类型
|
|
||||||
|
|
||||||
1. **在VerbPropertiesExplosiveBeam中添加新属性**
|
|
||||||
```csharp
|
|
||||||
public bool enableChainExplosion = false;
|
|
||||||
public int chainExplosionCount = 3;
|
|
||||||
public float chainExplosionDelay = 0.5f;
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **在Verb_ShootBeamExplosive中实现逻辑**
|
|
||||||
```csharp
|
|
||||||
private void TriggerChainExplosion(VerbPropertiesExplosiveBeam props)
|
|
||||||
{
|
|
||||||
// 实现连锁爆炸逻辑
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 添加条件爆炸
|
|
||||||
|
|
||||||
```csharp
|
|
||||||
// 基于目标类型的条件爆炸
|
|
||||||
private bool ShouldExplodeForTarget(Thing target)
|
|
||||||
{
|
|
||||||
if (target is Pawn pawn)
|
|
||||||
{
|
|
||||||
return pawn.RaceProps.Humanlike;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 添加爆炸延迟
|
|
||||||
|
|
||||||
```csharp
|
|
||||||
private void ScheduleDelayedExplosion(IntVec3 pos, float delay)
|
|
||||||
{
|
|
||||||
Find.TickManager.ScheduleCallback(() => {
|
|
||||||
TriggerExplosion(explosiveProps);
|
|
||||||
}, (int)(delay * 60)); // 转换为ticks
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 性能优化
|
|
||||||
|
|
||||||
### 1. 爆炸频率控制
|
|
||||||
- 避免每发都爆炸的设计
|
|
||||||
- 使用合理的 `explosionShotInterval`
|
|
||||||
- 考虑武器的射速和爆炸威力平衡
|
|
||||||
|
|
||||||
### 2. 效果缓存
|
|
||||||
```csharp
|
|
||||||
private static Dictionary<string, Effecter> cachedEffecters = new Dictionary<string, Effecter>();
|
|
||||||
|
|
||||||
private Effecter GetCachedEffecter(EffecterDef def)
|
|
||||||
{
|
|
||||||
string key = def.defName;
|
|
||||||
if (!cachedEffecters.ContainsKey(key))
|
|
||||||
{
|
|
||||||
cachedEffecters[key] = def.Spawn();
|
|
||||||
}
|
|
||||||
return cachedEffecters[key];
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 范围检查优化
|
|
||||||
```csharp
|
|
||||||
private bool IsValidExplosionPosition(IntVec3 pos)
|
|
||||||
{
|
|
||||||
return pos.InBounds(caster.Map) &&
|
|
||||||
pos.GetThingList(caster.Map).Any(t => t.def.category == ThingCategory.Pawn);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 调试技巧
|
|
||||||
|
|
||||||
### 1. 日志输出
|
|
||||||
```csharp
|
|
||||||
if (Prefs.DevMode)
|
|
||||||
{
|
|
||||||
Log.Message($"[ExplosiveBeam] Shot {explosionShotCounter}/{explosiveProps.explosionShotInterval}");
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. 可视化调试
|
|
||||||
```csharp
|
|
||||||
if (DebugSettings.godMode)
|
|
||||||
{
|
|
||||||
// 在爆炸位置显示调试信息
|
|
||||||
MoteMaker.ThrowText(explosionCell.ToVector3(), caster.Map,
|
|
||||||
$"Explosion: {explosiveProps.explosionDamage}", Color.red);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 性能监控
|
|
||||||
```csharp
|
|
||||||
private static Stopwatch explosionTimer = new Stopwatch();
|
|
||||||
|
|
||||||
private void TriggerExplosion(VerbPropertiesExplosiveBeam explosiveProps)
|
|
||||||
{
|
|
||||||
explosionTimer.Start();
|
|
||||||
// ... 爆炸逻辑
|
|
||||||
explosionTimer.Stop();
|
|
||||||
|
|
||||||
if (explosionTimer.ElapsedMilliseconds > 5)
|
|
||||||
{
|
|
||||||
Log.Warning($"Explosion took {explosionTimer.ElapsedMilliseconds}ms");
|
|
||||||
}
|
|
||||||
explosionTimer.Reset();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 兼容性考虑
|
|
||||||
|
|
||||||
### 1. 模组兼容性
|
|
||||||
- 使用命名空间避免冲突
|
|
||||||
- 检查其他模组的Harmony补丁
|
|
||||||
- 提供配置选项禁用功能
|
|
||||||
|
|
||||||
### 2. 版本兼容性
|
|
||||||
```csharp
|
|
||||||
#if VERSION_1_4
|
|
||||||
// 1.4版本特定代码
|
|
||||||
#elif VERSION_1_5
|
|
||||||
// 1.5版本特定代码
|
|
||||||
#endif
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 保存兼容性
|
|
||||||
```csharp
|
|
||||||
public override void ExposeData()
|
|
||||||
{
|
|
||||||
base.ExposeData();
|
|
||||||
|
|
||||||
// 向后兼容的数据保存
|
|
||||||
if (Scribe.mode == LoadSaveMode.LoadingVars)
|
|
||||||
{
|
|
||||||
// 处理旧版本数据
|
|
||||||
}
|
|
||||||
|
|
||||||
Scribe_Values.Look(ref explosionShotCounter, "explosionShotCounter", 0);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 测试框架
|
|
||||||
|
|
||||||
### 单元测试示例
|
|
||||||
```csharp
|
|
||||||
[Test]
|
|
||||||
public void TestExplosionInterval()
|
|
||||||
{
|
|
||||||
var verb = new Verb_ShootBeamExplosive();
|
|
||||||
var props = new VerbPropertiesExplosiveBeam
|
|
||||||
{
|
|
||||||
enableExplosion = true,
|
|
||||||
explosionShotInterval = 3
|
|
||||||
};
|
|
||||||
|
|
||||||
// 模拟3次射击
|
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
{
|
|
||||||
bool shouldExplode = (i == 2); // 第3发应该爆炸
|
|
||||||
Assert.AreEqual(shouldExplode, verb.ShouldTriggerExplosion());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## 最佳实践
|
|
||||||
|
|
||||||
### 1. 配置验证
|
|
||||||
```csharp
|
|
||||||
public override void PostLoad()
|
|
||||||
{
|
|
||||||
base.PostLoad();
|
|
||||||
|
|
||||||
if (explosionShotInterval <= 0)
|
|
||||||
{
|
|
||||||
Log.Error($"Invalid explosionShotInterval: {explosionShotInterval}");
|
|
||||||
explosionShotInterval = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (explosionRadius < 0)
|
|
||||||
{
|
|
||||||
Log.Warning($"Negative explosion radius: {explosionRadius}");
|
|
||||||
explosionRadius = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. 错误处理
|
|
||||||
```csharp
|
|
||||||
private void TriggerExplosion(VerbPropertiesExplosiveBeam explosiveProps)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// 爆炸逻辑
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Log.Error($"Error in explosion: {e}");
|
|
||||||
// 优雅降级,不影响基础射击功能
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 资源管理
|
|
||||||
```csharp
|
|
||||||
public override void Destroy(DestroyMode mode = DestroyMode.Vanish)
|
|
||||||
{
|
|
||||||
// 清理资源
|
|
||||||
cachedEffecters.Clear();
|
|
||||||
base.Destroy(mode);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
@@ -1,157 +0,0 @@
|
|||||||
# 爆炸射线武器测试说明
|
|
||||||
|
|
||||||
## 已实现的功能
|
|
||||||
|
|
||||||
### 1. 核心功能
|
|
||||||
- ✅ 继承自原版 Verb_ShootBeam 的所有功能
|
|
||||||
- ✅ 可配置的爆炸触发间隔
|
|
||||||
- ✅ 可配置的爆炸伤害、范围、类型
|
|
||||||
- ✅ 可配置的音效和特效
|
|
||||||
- ✅ 可配置的爆炸后效果(生成物品、气体等)
|
|
||||||
|
|
||||||
### 2. 配置选项
|
|
||||||
- `enableExplosion`: 爆炸开关
|
|
||||||
- `explosionShotInterval`: 爆炸间隔(每x发触发一次)
|
|
||||||
- `explosionRadius`: 爆炸半径
|
|
||||||
- `explosionDamageDef`: 爆炸伤害类型
|
|
||||||
- `explosionDamage`: 爆炸伤害值
|
|
||||||
- `explosionSound`: 爆炸音效
|
|
||||||
- `chanceToStartFire`: 点燃概率
|
|
||||||
- `postExplosionSpawnThingDef`: 爆炸后生成物品
|
|
||||||
|
|
||||||
### 3. 示例武器
|
|
||||||
已创建三个示例武器:
|
|
||||||
1. **CLa-15"蓝爆"轻型**: 每发都爆炸,火焰伤害
|
|
||||||
2. **CLa-16"蓝爆"重型**: 每3发爆炸,炸弹伤害+燃料污渍
|
|
||||||
3. **CLa-17"蓝毒"**: 每2发爆炸,毒气伤害+毒气云
|
|
||||||
|
|
||||||
## 测试步骤
|
|
||||||
|
|
||||||
### 1. 编译测试
|
|
||||||
```bash
|
|
||||||
dotnet build "Source\WulaFallenEmpire\WulaFallenEmpire.csproj"
|
|
||||||
```
|
|
||||||
✅ 编译成功
|
|
||||||
|
|
||||||
### 2. 游戏内测试准备
|
|
||||||
1. 启动RimWorld
|
|
||||||
2. 启用开发者模式 (Options -> Dev mode)
|
|
||||||
3. 加载包含此模组的存档或创建新游戏
|
|
||||||
4. 按 `~` 键打开开发者控制台
|
|
||||||
|
|
||||||
### 3. 生成测试武器
|
|
||||||
使用以下命令生成测试武器:
|
|
||||||
```
|
|
||||||
Thing.Spawn WULA_RW_Fractal_AR 1
|
|
||||||
Thing.Spawn WULA_LightExplosiveBeam 1
|
|
||||||
Thing.Spawn WULA_HeavyExplosiveBeam 1
|
|
||||||
Thing.Spawn WULA_ToxicExplosiveBeam 1
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. 功能验证清单
|
|
||||||
|
|
||||||
#### 基础射线功能
|
|
||||||
- [ ] 射线正常发射和显示
|
|
||||||
- [ ] 射线宽度和颜色正确
|
|
||||||
- [ ] 射线伤害正常造成
|
|
||||||
- [ ] 音效和视觉效果正常
|
|
||||||
|
|
||||||
#### 爆炸功能
|
|
||||||
- [ ] 爆炸按配置间隔触发
|
|
||||||
- [ ] 爆炸位置在射线命中点
|
|
||||||
- [ ] 爆炸半径和伤害正确
|
|
||||||
- [ ] 爆炸音效正常播放
|
|
||||||
- [ ] 爆炸视觉效果正常
|
|
||||||
|
|
||||||
#### 特殊效果
|
|
||||||
- [ ] 点燃效果正常工作
|
|
||||||
- [ ] 爆炸后生成物品(燃料污渍等)
|
|
||||||
- [ ] 毒气云正常生成和扩散
|
|
||||||
- [ ] 护甲穿透计算正确
|
|
||||||
|
|
||||||
### 5. 性能测试
|
|
||||||
- [ ] 连续射击时帧率稳定
|
|
||||||
- [ ] 多个单位同时使用时无卡顿
|
|
||||||
- [ ] 内存使用正常,无内存泄漏
|
|
||||||
|
|
||||||
### 6. 平衡性测试
|
|
||||||
- [ ] 武器伤害与成本匹配
|
|
||||||
- [ ] 爆炸威力不会过于强大
|
|
||||||
- [ ] AI正确使用武器
|
|
||||||
- [ ] 友伤风险合理
|
|
||||||
|
|
||||||
## 测试场景
|
|
||||||
|
|
||||||
### 场景1:单目标测试
|
|
||||||
1. 生成一个敌对的人形目标
|
|
||||||
2. 装备测试武器
|
|
||||||
3. 射击并观察:
|
|
||||||
- 射线效果
|
|
||||||
- 爆炸触发时机
|
|
||||||
- 伤害数值
|
|
||||||
- 特殊效果
|
|
||||||
|
|
||||||
### 场景2:群体目标测试
|
|
||||||
1. 生成多个敌对目标(5-10个)
|
|
||||||
2. 测试爆炸范围伤害
|
|
||||||
3. 观察连锁效果(点燃、毒气扩散等)
|
|
||||||
|
|
||||||
### 场景3:建筑物测试
|
|
||||||
1. 建造一些墙壁和家具
|
|
||||||
2. 测试爆炸对建筑物的影响
|
|
||||||
3. 验证射线穿透和爆炸破坏
|
|
||||||
|
|
||||||
### 场景4:友军测试
|
|
||||||
1. 在友军附近使用武器
|
|
||||||
2. 验证友伤机制
|
|
||||||
3. 测试AI的使用策略
|
|
||||||
|
|
||||||
## 常见问题排查
|
|
||||||
|
|
||||||
### 问题1:爆炸不触发
|
|
||||||
- 检查 `enableExplosion` 是否为 true
|
|
||||||
- 检查 `explosionShotInterval` 设置
|
|
||||||
- 确认射击确实命中目标
|
|
||||||
|
|
||||||
### 问题2:爆炸位置错误
|
|
||||||
- 检查射线的 `InterpolatedPosition` 计算
|
|
||||||
- 确认目标位置在地图范围内
|
|
||||||
|
|
||||||
### 问题3:音效不播放
|
|
||||||
- 检查 `explosionSound` 定义是否正确
|
|
||||||
- 确认音效文件存在
|
|
||||||
|
|
||||||
### 问题4:特效不显示
|
|
||||||
- 检查 `explosionEffecter` 定义
|
|
||||||
- 确认特效资源文件存在
|
|
||||||
|
|
||||||
## 调试工具
|
|
||||||
|
|
||||||
### 开发者命令
|
|
||||||
```
|
|
||||||
# 生成特定武器
|
|
||||||
Thing.Spawn [武器DefName] [数量]
|
|
||||||
|
|
||||||
# 生成敌对目标
|
|
||||||
Pawn.Spawn Raider 5
|
|
||||||
|
|
||||||
# 治疗所有伤害
|
|
||||||
Heal.All
|
|
||||||
|
|
||||||
# 清除所有火焰
|
|
||||||
Fire.Clear
|
|
||||||
```
|
|
||||||
|
|
||||||
### 日志监控
|
|
||||||
监控游戏日志文件中的错误信息:
|
|
||||||
- `Player.log` (Windows)
|
|
||||||
- 搜索 "WulaFallenEmpire" 相关错误
|
|
||||||
|
|
||||||
## 报告问题
|
|
||||||
|
|
||||||
如果发现问题,请记录:
|
|
||||||
1. 具体的复现步骤
|
|
||||||
2. 预期行为 vs 实际行为
|
|
||||||
3. 相关的日志错误信息
|
|
||||||
4. 游戏版本和模组版本
|
|
||||||
5. 其他加载的模组列表
|
|
||||||
@@ -1,262 +0,0 @@
|
|||||||
# 爆炸射线武器示例
|
|
||||||
|
|
||||||
本文档展示了不同类型的爆炸射线武器配置示例,涵盖各种使用场景。
|
|
||||||
|
|
||||||
## 基础示例
|
|
||||||
|
|
||||||
### 1. 简单爆炸射线
|
|
||||||
最基础的爆炸射线武器配置:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<range>25</range>
|
|
||||||
<burstShotCount>3</burstShotCount>
|
|
||||||
<beamWidth>2</beamWidth>
|
|
||||||
<beamDamageDef>Burn</beamDamageDef>
|
|
||||||
|
|
||||||
<!-- 爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>1</explosionShotInterval>
|
|
||||||
<explosionRadius>2.0</explosionRadius>
|
|
||||||
<explosionDamageDef>Bomb</explosionDamageDef>
|
|
||||||
<explosionDamage>20</explosionDamage>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 进阶示例
|
|
||||||
|
|
||||||
### 2. 延迟爆炸射线
|
|
||||||
每3发触发一次大威力爆炸:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<warmupTime>0.8</warmupTime>
|
|
||||||
<range>30</range>
|
|
||||||
<burstShotCount>9</burstShotCount>
|
|
||||||
<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
|
|
||||||
<beamWidth>3</beamWidth>
|
|
||||||
<beamDamageDef>Stun</beamDamageDef>
|
|
||||||
|
|
||||||
<!-- 延迟爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>3</explosionShotInterval>
|
|
||||||
<explosionRadius>3.5</explosionRadius>
|
|
||||||
<explosionDamageDef>Bomb</explosionDamageDef>
|
|
||||||
<explosionDamage>40</explosionDamage>
|
|
||||||
<explosionArmorPenetration>0.5</explosionArmorPenetration>
|
|
||||||
<explosionSound>Explosion_Bomb</explosionSound>
|
|
||||||
<chanceToStartFire>0.4</chanceToStartFire>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 火焰爆炸射线
|
|
||||||
专注于点燃和火焰伤害:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<range>28</range>
|
|
||||||
<burstShotCount>6</burstShotCount>
|
|
||||||
<beamWidth>2.5</beamWidth>
|
|
||||||
<beamDamageDef>Flame</beamDamageDef>
|
|
||||||
|
|
||||||
<!-- 火焰爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>2</explosionShotInterval>
|
|
||||||
<explosionRadius>2.8</explosionRadius>
|
|
||||||
<explosionDamageDef>Flame</explosionDamageDef>
|
|
||||||
<explosionDamage>25</explosionDamage>
|
|
||||||
<explosionSound>Explosion_Fire</explosionSound>
|
|
||||||
<chanceToStartFire>0.8</chanceToStartFire>
|
|
||||||
<postExplosionSpawnThingDef>Filth_Fuel</postExplosionSpawnThingDef>
|
|
||||||
<postExplosionSpawnChance>0.3</postExplosionSpawnChance>
|
|
||||||
<postExplosionSpawnThingCount>3</postExplosionSpawnThingCount>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 特殊效果示例
|
|
||||||
|
|
||||||
### 4. 毒气爆炸射线
|
|
||||||
产生毒气云的射线武器:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<range>26</range>
|
|
||||||
<burstShotCount>4</burstShotCount>
|
|
||||||
<beamWidth>2</beamWidth>
|
|
||||||
<beamDamageDef>ToxGas</beamDamageDef>
|
|
||||||
|
|
||||||
<!-- 毒气爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>2</explosionShotInterval>
|
|
||||||
<explosionRadius>3.0</explosionRadius>
|
|
||||||
<explosionDamageDef>ToxGas</explosionDamageDef>
|
|
||||||
<explosionDamage>18</explosionDamage>
|
|
||||||
<explosionSound>Explosion_Gas</explosionSound>
|
|
||||||
<postExplosionGasType>ToxGas</postExplosionGasType>
|
|
||||||
<chanceToStartFire>0.1</chanceToStartFire>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 5. 冰冻爆炸射线
|
|
||||||
造成冰冻效果的射线武器:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<range>24</range>
|
|
||||||
<burstShotCount>5</burstShotCount>
|
|
||||||
<beamWidth>2.2</beamWidth>
|
|
||||||
<beamDamageDef>Frostbite</beamDamageDef>
|
|
||||||
|
|
||||||
<!-- 冰冻爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>2</explosionShotInterval>
|
|
||||||
<explosionRadius>2.5</explosionRadius>
|
|
||||||
<explosionDamageDef>Frostbite</explosionDamageDef>
|
|
||||||
<explosionDamage>22</explosionDamage>
|
|
||||||
<explosionSound>Explosion_Ice</explosionSound>
|
|
||||||
<chanceToStartFire>0.0</chanceToStartFire>
|
|
||||||
<postExplosionSpawnThingDef>Filth_Water</postExplosionSpawnThingDef>
|
|
||||||
<postExplosionSpawnChance>0.4</postExplosionSpawnChance>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 高级配置示例
|
|
||||||
|
|
||||||
### 6. 多效果爆炸射线
|
|
||||||
结合多种效果的复杂武器:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<warmupTime>1.2</warmupTime>
|
|
||||||
<range>35</range>
|
|
||||||
<burstShotCount>12</burstShotCount>
|
|
||||||
<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
|
|
||||||
<beamWidth>4</beamWidth>
|
|
||||||
<beamDamageDef>Bomb</beamDamageDef>
|
|
||||||
|
|
||||||
<!-- 复合爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>4</explosionShotInterval>
|
|
||||||
<explosionRadius>4.0</explosionRadius>
|
|
||||||
<explosionDamageDef>Bomb</explosionDamageDef>
|
|
||||||
<explosionDamage>50</explosionDamage>
|
|
||||||
<explosionArmorPenetration>0.6</explosionArmorPenetration>
|
|
||||||
<explosionSound>Explosion_Bomb</explosionSound>
|
|
||||||
|
|
||||||
<!-- 多重后续效果 -->
|
|
||||||
<chanceToStartFire>0.5</chanceToStartFire>
|
|
||||||
<postExplosionSpawnThingDef>Filth_Fuel</postExplosionSpawnThingDef>
|
|
||||||
<postExplosionSpawnChance>0.3</postExplosionSpawnChance>
|
|
||||||
<postExplosionSpawnThingCount>4</postExplosionSpawnThingCount>
|
|
||||||
<preExplosionSpawnThingDef>Mote_ExplosionFlash</preExplosionSpawnThingDef>
|
|
||||||
<preExplosionSpawnChance>1.0</preExplosionSpawnChance>
|
|
||||||
<postExplosionGasType>BlindSmoke</postExplosionGasType>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 7. 精确爆炸射线
|
|
||||||
高精度、低频率爆炸的狙击型武器:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<warmupTime>2.0</warmupTime>
|
|
||||||
<range>45</range>
|
|
||||||
<burstShotCount>1</burstShotCount>
|
|
||||||
<beamWidth>1</beamWidth>
|
|
||||||
<beamDamageDef>Bullet</beamDamageDef>
|
|
||||||
<beamMaxDeviation>0.05</beamMaxDeviation>
|
|
||||||
|
|
||||||
<!-- 精确爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>1</explosionShotInterval>
|
|
||||||
<explosionRadius>2.2</explosionRadius>
|
|
||||||
<explosionDamageDef>Bomb</explosionDamageDef>
|
|
||||||
<explosionDamage>60</explosionDamage>
|
|
||||||
<explosionArmorPenetration>0.8</explosionArmorPenetration>
|
|
||||||
<explosionSound>Explosion_Sharp</explosionSound>
|
|
||||||
<damageFalloff>false</damageFalloff>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 平衡性考虑
|
|
||||||
|
|
||||||
### 轻型武器平衡
|
|
||||||
- 爆炸半径:1.5-2.5
|
|
||||||
- 爆炸伤害:15-25
|
|
||||||
- 射击间隔:1-2发
|
|
||||||
- 成本:低-中等
|
|
||||||
|
|
||||||
### 中型武器平衡
|
|
||||||
- 爆炸半径:2.5-3.5
|
|
||||||
- 爆炸伤害:25-40
|
|
||||||
- 射击间隔:2-3发
|
|
||||||
- 成本:中等-高
|
|
||||||
|
|
||||||
### 重型武器平衡
|
|
||||||
- 爆炸半径:3.5-5.0
|
|
||||||
- 爆炸伤害:40-70
|
|
||||||
- 射击间隔:3-5发
|
|
||||||
- 成本:高-极高
|
|
||||||
|
|
||||||
## 使用建议
|
|
||||||
|
|
||||||
### 1. 近战防御武器
|
|
||||||
```xml
|
|
||||||
<!-- 短射程、高爆炸频率 -->
|
|
||||||
<range>15</range>
|
|
||||||
<explosionShotInterval>1</explosionShotInterval>
|
|
||||||
<explosionRadius>3.0</explosionRadius>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. 中距离支援武器
|
|
||||||
```xml
|
|
||||||
<!-- 中等射程、适中爆炸频率 -->
|
|
||||||
<range>28</range>
|
|
||||||
<explosionShotInterval>2</explosionShotInterval>
|
|
||||||
<explosionRadius>2.5</explosionRadius>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. 远程狙击武器
|
|
||||||
```xml
|
|
||||||
<!-- 长射程、低爆炸频率、高威力 -->
|
|
||||||
<range>40</range>
|
|
||||||
<explosionShotInterval>1</explosionShotInterval>
|
|
||||||
<explosionRadius>2.0</explosionRadius>
|
|
||||||
<explosionDamage>50</explosionDamage>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. 区域控制武器
|
|
||||||
```xml
|
|
||||||
<!-- 大范围、特殊效果 -->
|
|
||||||
<explosionRadius>4.0</explosionRadius>
|
|
||||||
<postExplosionGasType>BlindSmoke</postExplosionGasType>
|
|
||||||
<chanceToStartFire>0.6</chanceToStartFire>
|
|
||||||
```
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
# 爆炸射线武器配置说明
|
|
||||||
|
|
||||||
## 概述
|
|
||||||
新的 `Verb_ShootBeamExplosive` 类扩展了原版的 `Verb_ShootBeam`,添加了可配置的爆炸效果。
|
|
||||||
|
|
||||||
## 配置属性
|
|
||||||
|
|
||||||
### 基础爆炸控制
|
|
||||||
- `enableExplosion` (bool): 是否启用爆炸效果,默认 false
|
|
||||||
- `explosionShotInterval` (int): 每x发射击触发一次爆炸,默认 1
|
|
||||||
|
|
||||||
### 爆炸伤害属性
|
|
||||||
- `explosionRadius` (float): 爆炸半径,默认 2.9
|
|
||||||
- `explosionDamageDef` (DamageDef): 爆炸伤害类型,null时使用 Bomb
|
|
||||||
- `explosionDamage` (int): 爆炸伤害值,-1时使用武器默认伤害
|
|
||||||
- `explosionArmorPenetration` (float): 爆炸护甲穿透,-1时使用武器默认值
|
|
||||||
|
|
||||||
### 音效和特效
|
|
||||||
- `explosionSound` (SoundDef): 爆炸音效
|
|
||||||
- `explosionEffecter` (EffecterDef): 爆炸特效
|
|
||||||
|
|
||||||
### 爆炸后效果
|
|
||||||
- `postExplosionSpawnThingDef` (ThingDef): 爆炸后生成的物品
|
|
||||||
- `postExplosionSpawnChance` (float): 生成概率 (0-1)
|
|
||||||
- `postExplosionSpawnThingCount` (int): 生成数量
|
|
||||||
|
|
||||||
### 爆炸前效果
|
|
||||||
- `preExplosionSpawnThingDef` (ThingDef): 爆炸前生成的物品
|
|
||||||
- `preExplosionSpawnChance` (float): 生成概率 (0-1)
|
|
||||||
- `preExplosionSpawnThingCount` (int): 生成数量
|
|
||||||
|
|
||||||
### 其他属性
|
|
||||||
- `postExplosionGasType` (GasType?): 爆炸后的气体类型
|
|
||||||
- `applyDamageToExplosionCellsNeighbors` (bool): 是否对邻近格子造成伤害
|
|
||||||
- `chanceToStartFire` (float): 点燃概率 (0-1)
|
|
||||||
- `damageFalloff` (bool): 是否有伤害衰减
|
|
||||||
|
|
||||||
## 使用示例
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<verbs>
|
|
||||||
<li Class="WulaFallenEmpire.VerbPropertiesExplosiveBeam">
|
|
||||||
<verbClass>WulaFallenEmpire.Verb_ShootBeamExplosive</verbClass>
|
|
||||||
|
|
||||||
<!-- 基础射线属性 -->
|
|
||||||
<hasStandardCommand>true</hasStandardCommand>
|
|
||||||
<warmupTime>0.5</warmupTime>
|
|
||||||
<range>30</range>
|
|
||||||
<burstShotCount>6</burstShotCount>
|
|
||||||
<beamWidth>3</beamWidth>
|
|
||||||
<beamDamageDef>Stun</beamDamageDef>
|
|
||||||
|
|
||||||
<!-- 爆炸配置 -->
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>3</explosionShotInterval> <!-- 每3发触发一次爆炸 -->
|
|
||||||
<explosionRadius>2.5</explosionRadius>
|
|
||||||
<explosionDamageDef>Bomb</explosionDamageDef>
|
|
||||||
<explosionDamage>25</explosionDamage>
|
|
||||||
<explosionSound>Explosion_Bomb</explosionSound>
|
|
||||||
<chanceToStartFire>0.3</chanceToStartFire>
|
|
||||||
<postExplosionSpawnThingDef>Filth_Fuel</postExplosionSpawnThingDef>
|
|
||||||
<postExplosionSpawnChance>0.15</postExplosionSpawnChance>
|
|
||||||
</li>
|
|
||||||
</verbs>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 工作原理
|
|
||||||
|
|
||||||
1. 武器正常进行射线攻击
|
|
||||||
2. 每次成功射击后,计数器递增
|
|
||||||
3. 当计数器达到 `explosionShotInterval` 时:
|
|
||||||
- 在当前射线位置触发爆炸
|
|
||||||
- 播放爆炸音效和特效
|
|
||||||
- 重置计数器
|
|
||||||
4. 爆炸使用配置的参数进行伤害计算
|
|
||||||
|
|
||||||
## 注意事项
|
|
||||||
|
|
||||||
- 爆炸位置基于射线的插值位置
|
|
||||||
- 如果爆炸位置超出地图边界,爆炸不会触发
|
|
||||||
- 音效和特效是可选的,可以设置为 null
|
|
||||||
- 伤害值为 -1 时会尝试使用武器的默认伤害
|
|
||||||
- 这个功能完全向后兼容,不启用爆炸时行为与原版相同
|
|
||||||
|
|
||||||
## 配置模板
|
|
||||||
|
|
||||||
### 轻型爆炸武器
|
|
||||||
```xml
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>1</explosionShotInterval>
|
|
||||||
<explosionRadius>1.8</explosionRadius>
|
|
||||||
<explosionDamageDef>Flame</explosionDamageDef>
|
|
||||||
<explosionDamage>15</explosionDamage>
|
|
||||||
<chanceToStartFire>0.6</chanceToStartFire>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 重型爆炸武器
|
|
||||||
```xml
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>3</explosionShotInterval>
|
|
||||||
<explosionRadius>3.2</explosionRadius>
|
|
||||||
<explosionDamageDef>Bomb</explosionDamageDef>
|
|
||||||
<explosionDamage>35</explosionDamage>
|
|
||||||
<explosionArmorPenetration>0.4</explosionArmorPenetration>
|
|
||||||
<postExplosionSpawnThingDef>Filth_Fuel</postExplosionSpawnThingDef>
|
|
||||||
<postExplosionSpawnChance>0.25</postExplosionSpawnChance>
|
|
||||||
```
|
|
||||||
|
|
||||||
### 毒气武器
|
|
||||||
```xml
|
|
||||||
<enableExplosion>true</enableExplosion>
|
|
||||||
<explosionShotInterval>2</explosionShotInterval>
|
|
||||||
<explosionRadius>2.8</explosionRadius>
|
|
||||||
<explosionDamageDef>ToxGas</explosionDamageDef>
|
|
||||||
<postExplosionGasType>ToxGas</postExplosionGasType>
|
|
||||||
```
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# 乌拉帝国模组文档
|
|
||||||
|
|
||||||
本文件夹包含乌拉帝国模组的所有技术文档和说明。
|
|
||||||
|
|
||||||
## 文档结构
|
|
||||||
|
|
||||||
### 📁 ExplosiveBeamWeapons/
|
|
||||||
爆炸射线武器系统的相关文档
|
|
||||||
- 配置说明
|
|
||||||
- 测试指南
|
|
||||||
- 使用示例
|
|
||||||
|
|
||||||
### 📁 Features/
|
|
||||||
各种功能特性的文档(未来扩展)
|
|
||||||
|
|
||||||
### 📁 API/
|
|
||||||
API文档和开发者指南(未来扩展)
|
|
||||||
|
|
||||||
## 快速导航
|
|
||||||
|
|
||||||
### 爆炸射线武器系统
|
|
||||||
- [📋 配置说明](ExplosiveBeamWeapons/配置说明.md) - 详细的配置参数说明
|
|
||||||
- [🧪 测试指南](ExplosiveBeamWeapons/测试说明.md) - 测试步骤和验证清单
|
|
||||||
- [👨💻 开发指南](ExplosiveBeamWeapons/开发指南.md) - 代码架构和扩展开发
|
|
||||||
- [⚔️ 示例武器](ExplosiveBeamWeapons/示例武器.md) - 各种类型的武器配置示例
|
|
||||||
|
|
||||||
## 版本历史
|
|
||||||
|
|
||||||
- v1.0: 初始版本,包含基础乌拉帝国内容
|
|
||||||
- v1.1: 添加爆炸射线武器系统
|
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class CompAbilityEffect_EmergencyEnergyRestore : CompAbilityEffect
|
||||||
|
{
|
||||||
|
public new CompProperties_AbilityEmergencyEnergyRestore Props => (CompProperties_AbilityEmergencyEnergyRestore)props;
|
||||||
|
|
||||||
|
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||||
|
{
|
||||||
|
base.Apply(target, dest);
|
||||||
|
|
||||||
|
Pawn caster = parent.pawn;
|
||||||
|
if (caster == null) return;
|
||||||
|
|
||||||
|
// 检查是否是乌拉族
|
||||||
|
if (!IsWulaRace(caster))
|
||||||
|
{
|
||||||
|
Messages.Message("只有乌拉族才能使用紧急能量恢复", MessageTypeDefOf.RejectInput, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否倒地(如果需要的话)
|
||||||
|
if (Props.requireDowned && !caster.Downed)
|
||||||
|
{
|
||||||
|
Messages.Message("只能在倒地时使用紧急能量恢复", MessageTypeDefOf.RejectInput, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加Hediff
|
||||||
|
if (Props.hediffDef != null)
|
||||||
|
{
|
||||||
|
var hediff = HediffMaker.MakeHediff(Props.hediffDef, caster);
|
||||||
|
caster.health.AddHediff(hediff);
|
||||||
|
|
||||||
|
Messages.Message($"{caster.LabelShort}激活了紧急能量恢复协议", MessageTypeDefOf.PositiveEvent, false);
|
||||||
|
|
||||||
|
if (Prefs.DevMode)
|
||||||
|
{
|
||||||
|
Log.Message($"[EmergencyEnergyRestore] Applied to {caster.LabelShort}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CanApplyOn(LocalTargetInfo target, LocalTargetInfo dest)
|
||||||
|
{
|
||||||
|
bool canApply = base.CanApplyOn(target, dest) && IsWulaRace(parent.pawn);
|
||||||
|
|
||||||
|
if (Props.requireDowned)
|
||||||
|
{
|
||||||
|
canApply = canApply && parent.pawn.Downed;
|
||||||
|
}
|
||||||
|
|
||||||
|
return canApply;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsWulaRace(Pawn pawn)
|
||||||
|
{
|
||||||
|
if (pawn?.def == null) return false;
|
||||||
|
return pawn.def.defName == "WulaSpecies";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class CompProperties_AbilityEmergencyEnergyRestore : CompProperties_AbilityEffect
|
||||||
|
{
|
||||||
|
public int durationTicks = 600; // 默认10秒
|
||||||
|
public HediffDef hediffDef;
|
||||||
|
public bool requireDowned = true; // 是否需要倒地才能使用
|
||||||
|
|
||||||
|
public CompProperties_AbilityEmergencyEnergyRestore()
|
||||||
|
{
|
||||||
|
compClass = typeof(CompAbilityEffect_EmergencyEnergyRestore);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
71
Source/WulaFallenEmpire/Hediff_EmergencyEnergyRestore.cs
Normal file
71
Source/WulaFallenEmpire/Hediff_EmergencyEnergyRestore.cs
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class Hediff_EmergencyEnergyRestore : HediffWithComps
|
||||||
|
{
|
||||||
|
private float originalEnergyLevel = 0f;
|
||||||
|
private bool hasStoredOriginalLevel = false;
|
||||||
|
|
||||||
|
public override void PostAdd(DamageInfo? dinfo)
|
||||||
|
{
|
||||||
|
base.PostAdd(dinfo);
|
||||||
|
|
||||||
|
// 存储原始能量水平
|
||||||
|
var energyNeed = pawn.needs?.TryGetNeed<Need_WulaEnergy>();
|
||||||
|
if (energyNeed != null)
|
||||||
|
{
|
||||||
|
originalEnergyLevel = energyNeed.CurLevel;
|
||||||
|
hasStoredOriginalLevel = true;
|
||||||
|
|
||||||
|
// 立即将能量设置为100%
|
||||||
|
energyNeed.CurLevel = 1.0f;
|
||||||
|
|
||||||
|
if (Prefs.DevMode)
|
||||||
|
{
|
||||||
|
Log.Message($"[EmergencyEnergyRestore] Stored original energy: {originalEnergyLevel:F2}, set to 1.0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void PostRemoved()
|
||||||
|
{
|
||||||
|
base.PostRemoved();
|
||||||
|
|
||||||
|
// 恢复原始能量水平
|
||||||
|
if (hasStoredOriginalLevel)
|
||||||
|
{
|
||||||
|
var energyNeed = pawn.needs?.TryGetNeed<Need_WulaEnergy>();
|
||||||
|
if (energyNeed != null)
|
||||||
|
{
|
||||||
|
energyNeed.CurLevel = originalEnergyLevel;
|
||||||
|
|
||||||
|
if (Prefs.DevMode)
|
||||||
|
{
|
||||||
|
Log.Message($"[EmergencyEnergyRestore] Restored energy to: {originalEnergyLevel:F2}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Tick()
|
||||||
|
{
|
||||||
|
base.Tick();
|
||||||
|
|
||||||
|
// 确保能量保持在100%
|
||||||
|
var energyNeed = pawn.needs?.TryGetNeed<Need_WulaEnergy>();
|
||||||
|
if (energyNeed != null && energyNeed.CurLevel < 1.0f)
|
||||||
|
{
|
||||||
|
energyNeed.CurLevel = 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ExposeData()
|
||||||
|
{
|
||||||
|
base.ExposeData();
|
||||||
|
Scribe_Values.Look(ref originalEnergyLevel, "originalEnergyLevel", 0f);
|
||||||
|
Scribe_Values.Look(ref hasStoredOriginalLevel, "hasStoredOriginalLevel", false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -77,6 +77,9 @@
|
|||||||
<Compile Include="CompUseEffect_WulaSkillTrainer.cs" />
|
<Compile Include="CompUseEffect_WulaSkillTrainer.cs" />
|
||||||
<Compile Include="Verb_ShootBeamExplosive.cs" />
|
<Compile Include="Verb_ShootBeamExplosive.cs" />
|
||||||
<Compile Include="VerbPropertiesExplosiveBeam.cs" />
|
<Compile Include="VerbPropertiesExplosiveBeam.cs" />
|
||||||
|
<Compile Include="Hediff_EmergencyEnergyRestore.cs" />
|
||||||
|
<Compile Include="CompProperties_AbilityEmergencyEnergyRestore.cs" />
|
||||||
|
<Compile Include="CompAbilityEffect_EmergencyEnergyRestore.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user