1
@@ -635,11 +635,12 @@
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
|
||||
<!-- 炮击 -->
|
||||
<AbilityDef>
|
||||
<defName>WULA_Firepower_Minigun_Strafe</defName>
|
||||
<label>链炮扫射</label>
|
||||
<description>以战舰上的自动链炮对目标区域进行可选方向的扫射,射击速度和冷却都很快,对轻甲目标有效,但是威力欠佳。</description>
|
||||
<!-- <iconPath>ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket</iconPath> -->
|
||||
<iconPath>Wula/UI/Abilities/WULA_Firepower_Minigun_Strafe</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
@@ -679,13 +680,16 @@
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>WULA_Firepower_Minigun_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>WULA_Firepower_Cannon_Salvo</defName>
|
||||
<label>轻型舰炮齐射</label>
|
||||
<description>指挥战舰侧弦的副炮,进行一轮共计12发炮弹的齐射,造成中规中矩的毁伤。</description>
|
||||
<!-- <iconPath>ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket</iconPath> -->
|
||||
<iconPath>Wula/UI/Abilities/WULA_Firepower_Cannon_Salvo</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
@@ -710,7 +714,7 @@
|
||||
<radius>10</radius>
|
||||
<simultaneousLaunches>3</simultaneousLaunches>
|
||||
<launchIntervalTicks>90</launchIntervalTicks>
|
||||
<maxLaunches>12</maxLaunches>
|
||||
<maxLaunches>24</maxLaunches>
|
||||
<warmupTicks>120</warmupTicks>
|
||||
|
||||
<!-- 独立间隔模式:组内依次发射 -->
|
||||
@@ -726,13 +730,16 @@
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>WULA_Firepower_Cannon_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>WULA_Firepower_Cannon_Surveillance</defName>
|
||||
<label>轻型舰炮监视</label>
|
||||
<description>指挥战舰侧弦的副炮,监视一个区域0.3小时,对任何进入范围的敌对目标进行炮击。</description>
|
||||
<!-- <iconPath>ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket</iconPath> -->
|
||||
<iconPath>Wula/UI/Abilities/WULA_Firepower_Cannon_Surveillance</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
@@ -764,13 +771,16 @@
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>WULA_Firepower_Cannon_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>WULA_Firepower_EnergyLance_Strafe</defName>
|
||||
<label>光矛扫射</label>
|
||||
<description>指挥战舰侧弦的光矛阵列,发射一道光矛横扫战场,造成大量的热能伤害。</description>
|
||||
<!-- <iconPath>ArachnaeSwarm/UI/Abilities/ARA_Spawn_ARA_HiveCorvette_Rocket</iconPath> -->
|
||||
<iconPath>Wula/UI/Abilities/WULA_Firepower_EnergyLance_Strafe</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
@@ -787,10 +797,10 @@
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<!-- <li Class="WulaFallenEmpire.CompProperties_GlobalFlyOverCooldown">
|
||||
<li Class="WulaFallenEmpire.CompProperties_GlobalFlyOverCooldown">
|
||||
<globalCooldownTicks>1000</globalCooldownTicks>
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
</li> -->
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityEnergyLance">
|
||||
<durationTicks>450</durationTicks>
|
||||
<moveDistance>20</moveDistance>
|
||||
@@ -798,11 +808,145 @@
|
||||
<energyLanceDef>WULA_EnergyLance_Base</energyLanceDef>
|
||||
<firesPerTick>4</firesPerTick>
|
||||
</li>
|
||||
<!-- <li Class="WulaFallenEmpire.CompProperties_RequireFlyOverFacility"> -->
|
||||
<li Class="WulaFallenEmpire.CompProperties_RequireFlyOverFacility">
|
||||
<!-- <flyOverDef></flyOverDef> -->
|
||||
<!-- <requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li> -->
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>WULA_Firepower_EnergyLance_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>WULA_Firepower_EnergyLance_Surveillance</defName>
|
||||
<label>光矛监视</label>
|
||||
<description>指挥战舰侧弦的副炮,监视一个区域1小时,对任何进入范围的敌对目标进行炮击。</description>
|
||||
<iconPath>Wula/UI/Abilities/WULA_Firepower_EnergyLance_Surveillance</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<requireLineOfSight>false</requireLineOfSight>
|
||||
<warmupTime>1</warmupTime>
|
||||
<range>120</range>
|
||||
<targetable>true</targetable>
|
||||
<targetParams>
|
||||
<canTargetSelf>false</canTargetSelf>
|
||||
<canTargetLocations>true</canTargetLocations>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="WulaFallenEmpire.CompProperties_GlobalFlyOverCooldown">
|
||||
<globalCooldownTicks>300</globalCooldownTicks>
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityCallSkyfaller">
|
||||
<delayTicks>180</delayTicks>
|
||||
<skyfallerDef>WULA_Firepower_EnergyLance_Surveillance_Skyfaller</skyfallerDef>
|
||||
<previewRadius>36</previewRadius>
|
||||
<previewColor>(0.85,0.85,0.3,0.5)</previewColor>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_RequireFlyOverFacility">
|
||||
<!-- <flyOverDef></flyOverDef> -->
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>WULA_Firepower_EnergyLance_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>WULA_Firepower_Primary_Cannon_Strafe</defName>
|
||||
<label>主炮齐射</label>
|
||||
<description>以战舰上的主炮对目标区域进行可选方向的扫射,拥有夷平山脉的恐怖威力,但是响应速度、精准度都很差且需要大量时间再装填。</description>
|
||||
<iconPath>Wula/UI/Abilities/WULA_Firepower_Primary_Cannon_Strafe</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<requireLineOfSight>false</requireLineOfSight>
|
||||
<warmupTime>1</warmupTime>
|
||||
<range>120</range>
|
||||
<targetable>true</targetable>
|
||||
<targetParams>
|
||||
<canTargetSelf>false</canTargetSelf>
|
||||
<canTargetLocations>true</canTargetLocations>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="WulaFallenEmpire.CompProperties_GlobalFlyOverCooldown">
|
||||
<globalCooldownTicks>1000</globalCooldownTicks>
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityBombardment">
|
||||
<bombardmentWidth>35</bombardmentWidth>
|
||||
<bombardmentLength>70</bombardmentLength>
|
||||
<targetSelectionChance>0.1</targetSelectionChance>
|
||||
<minTargetCells>16</minTargetCells>
|
||||
<maxTargetCells>16</maxTargetCells>
|
||||
<warmupTicks>240</warmupTicks>
|
||||
<rowDelayTicks>30</rowDelayTicks>
|
||||
<impactDelayTicks>2</impactDelayTicks>
|
||||
<showBombardmentArea>true</showBombardmentArea>
|
||||
<effecterScale>1.5</effecterScale>
|
||||
<areaPreviewColor>1.0,0.3,0.1,0.3</areaPreviewColor>
|
||||
<skyfallerDef>WULA_Firepower_Primary_Cannon_Strafe_Skyfaller</skyfallerDef>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_RequireFlyOverFacility">
|
||||
<!-- <flyOverDef></flyOverDef> -->
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>WULA_Firepower_Primary_Cannon_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
<AbilityDef>
|
||||
<defName>WULA_Firepower_Primary_Cannon_EMP_Surveillance</defName>
|
||||
<label>主炮EMP压制</label>
|
||||
<description>指挥战舰的主炮,监视极大范围3小时,对任何进入范围的敌对目标发射大范围EMP炮弹,蕴含的强大能量能使得机械体长时间地被麻痹。</description>
|
||||
<iconPath>Wula/UI/Abilities/WULA_Firepower_Primary_Cannon_EMP_Surveillance</iconPath>
|
||||
<cooldownTicksRange>1</cooldownTicksRange>
|
||||
<hotKey>Misc12</hotKey>
|
||||
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||
<verbProperties>
|
||||
<verbClass>Verb_CastAbility</verbClass>
|
||||
<drawAimPie>false</drawAimPie>
|
||||
<requireLineOfSight>false</requireLineOfSight>
|
||||
<warmupTime>1</warmupTime>
|
||||
<range>120</range>
|
||||
<targetable>true</targetable>
|
||||
<targetParams>
|
||||
<canTargetSelf>false</canTargetSelf>
|
||||
<canTargetLocations>true</canTargetLocations>
|
||||
</targetParams>
|
||||
</verbProperties>
|
||||
<comps>
|
||||
<li Class="WulaFallenEmpire.CompProperties_GlobalFlyOverCooldown">
|
||||
<globalCooldownTicks>300</globalCooldownTicks>
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityCallSkyfaller">
|
||||
<delayTicks>180</delayTicks>
|
||||
<skyfallerDef>WULA_Firepower_Primary_Cannon_EMP_Surveillance_Skyfaller</skyfallerDef>
|
||||
<previewRadius>100</previewRadius>
|
||||
<previewColor>(0.85,0.85,0.3,0.5)</previewColor>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_RequireFlyOverFacility">
|
||||
<!-- <flyOverDef></flyOverDef> -->
|
||||
<requiredFacility>BombardmentFacility</requiredFacility>
|
||||
<facilityNotFoundMessage>需要拥有<color=#BD2F31><i>武器阵列</i></color>设施的战舰在地图上才能进行轨道炮击支援</facilityNotFoundMessage>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_AbilityResearchPrereq">
|
||||
<requiredResearch>WULA_Firepower_Primary_Cannon_Technology</requiredResearch>
|
||||
</li>
|
||||
</comps>
|
||||
</AbilityDef>
|
||||
</Defs>
|
||||
@@ -43,12 +43,24 @@
|
||||
<buildingDamageFactorPassable>5</buildingDamageFactorPassable>
|
||||
</DamageDef>
|
||||
|
||||
<!-- 不要删掉这个伤害类,有一个C#硬代码正在使用 -->
|
||||
<DamageDef ParentName="Flame">
|
||||
<defName>Wula_Dark_Matter_Flame</defName>
|
||||
<label>暗物质湮灭</label>
|
||||
<deathMessage>{0} 由于暗物质湮灭爆炸而死。</deathMessage>
|
||||
<deathMessage>{0} 被暗物质湮灭带来的高能射流蒸发。</deathMessage>
|
||||
<defaultDamage>15</defaultDamage>
|
||||
<defaultArmorPenetration>2</defaultArmorPenetration>
|
||||
<buildingDamageFactorImpassable>5</buildingDamageFactorImpassable>
|
||||
<buildingDamageFactorPassable>5</buildingDamageFactorPassable>
|
||||
</DamageDef>
|
||||
|
||||
<DamageDef ParentName="Bullet">
|
||||
<defName>WULA_Firepower_Minigun_Strafe_Damage</defName>
|
||||
<label>子弹</label>
|
||||
<defaultDamage>25</defaultDamage>
|
||||
<soundExplosion>Explosion_Bomb</soundExplosion>
|
||||
</DamageDef>
|
||||
|
||||
<DamageDef ParentName="Wula_Dark_Matter_Beam_DMG">
|
||||
<defName>Wula_Psi_Damage</defName>
|
||||
<ignoreShields>true</ignoreShields>
|
||||
@@ -250,4 +262,12 @@
|
||||
<buildingDamageFactorPassable>0</buildingDamageFactorPassable>
|
||||
</DamageDef>
|
||||
|
||||
<DamageDef ParentName="Bomb">
|
||||
<defName>WULA_DarkMatterBomb</defName>
|
||||
<label>暗物质湮灭爆炸</label>
|
||||
<defaultDamage>550</defaultDamage>
|
||||
<defaultStoppingPower>2.0</defaultStoppingPower>
|
||||
<defaultArmorPenetration>1.30</defaultArmorPenetration>
|
||||
<explosionCenterEffecter>WULA_DarkMatterBomb_Shockwave</explosionCenterEffecter>
|
||||
</DamageDef>
|
||||
</Defs>
|
||||
@@ -75,8 +75,11 @@
|
||||
<abilityDefs>
|
||||
<li>WULA_Firepower_Minigun_Strafe</li>
|
||||
<li>WULA_Firepower_Cannon_Salvo</li>
|
||||
<li>WULA_Firepower_Cannon_Surveillance_Beacon</li>
|
||||
<li>WULA_Firepower_Cannon_Surveillance</li>
|
||||
<li>WULA_Firepower_EnergyLance_Strafe</li>
|
||||
<li>WULA_Firepower_EnergyLance_Surveillance</li>
|
||||
<li>WULA_Firepower_Primary_Cannon_Strafe</li>
|
||||
<li>WULA_Firepower_Primary_Cannon_EMP_Surveillance</li>
|
||||
</abilityDefs>
|
||||
</li>
|
||||
</comps>
|
||||
|
||||
@@ -92,6 +92,69 @@
|
||||
<li>WULA_Colony_License_LV3_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
|
||||
<!-- 炮击 -->
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Firepower_Minigun_Technology</defName>
|
||||
<label>链炮打击许可</label>
|
||||
<description>允许殖民地申请来自武器阵列的链炮进行近地支援打击。\n\n链炮是一种射速非常快的大口径机炮,得益于乌拉帝国优秀的材料学,其弹头在穿越大气层后依然保有对轻甲目标的强大杀伤力。\n\n轨道攻击依赖于战舰的<color=#BD2F31><i>武器阵列</i></color>,只有携带此类设施的战舰出现在地图中时,才能呼叫轨道攻击。</description>
|
||||
<baseCost>600</baseCost>
|
||||
<researchViewX>1.00</researchViewX>
|
||||
<researchViewY>5.00</researchViewY>
|
||||
<prerequisites>
|
||||
<li>WULA_Colony_License_LV1_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Battleship_Technology</defName>
|
||||
<label>护航舰调配许可</label>
|
||||
<description>允许殖民地建立信标增加护航舰配额,并使得机械乌拉可以调频天线以申请舰队空中支援。\n\n乌拉帝国边缘开发署的护航舰是近地支援舰队的基础作战单位,它们的体积虽然不如战列巡洋舰那样庞大,但是依然搭载了让地面武装望尘莫及的庞大火炮阵列,可以对地面发起骇人的轰炸。\n\n护航舰拥有以下设施:\n<color=#BD2F31><i>-武器阵列</i></color></description>
|
||||
<baseCost>600</baseCost>
|
||||
<researchViewX>2.00</researchViewX>
|
||||
<researchViewY>5.00</researchViewY>
|
||||
<prerequisites>
|
||||
<li>WULA_Firepower_Minigun_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Firepower_Cannon_Technology</defName>
|
||||
<label>副炮打击许可</label>
|
||||
<description>允许殖民地申请来自武器阵列的轻型舰炮进行近地支援打击。\n\n乌拉帝国的轻型舰炮是用于在太空战中对付中小型舰船的速射炮——当然,对地面目标同样有效。\n\n轨道攻击依赖于战舰的<color=#BD2F31><i>武器阵列</i></color>,只有携带此类设施的战舰出现在地图中时,才能呼叫轨道攻击。</description>
|
||||
<baseCost>600</baseCost>
|
||||
<researchViewX>5.00</researchViewX>
|
||||
<researchViewY>5.00</researchViewY>
|
||||
<hiddenPrerequisites>
|
||||
<li>WULA_Battleship_Technology</li>
|
||||
</hiddenPrerequisites>
|
||||
<prerequisites>
|
||||
<li>WULA_Colony_License_LV2_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Firepower_EnergyLance_Technology</defName>
|
||||
<label>光矛打击许可</label>
|
||||
<description>允许殖民地申请来自武器阵列的光矛进行近地支援打击。\n\n暗物质光矛是乌拉帝国舰队现役的主战装备之一,杀伤力来源是近乎纯净的能量,无论何种装甲防御在其面前都是螳臂当车。\n\n轨道攻击依赖于战舰的<color=#BD2F31><i>武器阵列</i></color>,只有携带此类设施的战舰出现在地图中时,才能呼叫轨道攻击。</description>
|
||||
<baseCost>600</baseCost>
|
||||
<researchViewX>9.00</researchViewX>
|
||||
<researchViewY>5.00</researchViewY>
|
||||
<hiddenPrerequisites>
|
||||
<li>WULA_Firepower_Cannon_Technology</li>
|
||||
</hiddenPrerequisites>
|
||||
<prerequisites>
|
||||
<li>WULA_Colony_License_LV3_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Firepower_Primary_Cannon_Technology</defName>
|
||||
<label>主炮打击许可</label>
|
||||
<description>允许殖民地申请来自武器阵列的主炮进行近地支援打击。\n\n乌拉帝国战舰的主炮被安装在轴线上,充当舰队战中的定音锤。如果把那些足以击碎舰队龙骨的炮弹射到地上的话···\n\n轨道攻击依赖于战舰的<color=#BD2F31><i>武器阵列</i></color>,只有携带此类设施的战舰出现在地图中时,才能呼叫轨道攻击。</description>
|
||||
<baseCost>600</baseCost>
|
||||
<researchViewX>10.00</researchViewX>
|
||||
<researchViewY>5.00</researchViewY>
|
||||
<prerequisites>
|
||||
<li>WULA_Firepower_EnergyLance_Technology</li>
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
|
||||
<!-- 建筑 -->
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
@@ -179,7 +242,7 @@
|
||||
<!-- 防御 -->
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Turret_Base_AT_Technology</defName>
|
||||
<researchViewX>6.00</researchViewX>
|
||||
<researchViewX>7.00</researchViewX>
|
||||
<researchViewY>1.40</researchViewY>
|
||||
<label>反战车磁轨炮许可</label>
|
||||
<description>允许殖民地申请空投反战车磁轨炮台,可以在远距离上击穿拥有厚重装甲的敌人。</description>
|
||||
@@ -194,7 +257,7 @@
|
||||
</ResearchProjectDef>
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Turret_Base_Laser_Technology</defName>
|
||||
<researchViewX>7.00</researchViewX>
|
||||
<researchViewX>6.00</researchViewX>
|
||||
<researchViewY>1.40</researchViewY>
|
||||
<label>涡轮激光炮许可</label>
|
||||
<description>允许殖民地申请空投激光炮台,可以持续定向烧灼敌军,最大限度地击伤对手并留存战利品和俘虏。</description>
|
||||
@@ -208,7 +271,6 @@
|
||||
</prerequisites>
|
||||
</ResearchProjectDef>
|
||||
|
||||
|
||||
<!-- 武器 -->
|
||||
<ResearchProjectDef ParentName="WULAtechBase">
|
||||
<defName>WULA_Synth_Weapon_1_Base_Technology</defName>
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
<uiIconPath>Wula/Building/Linked/WULA_Fortress_Wall_MenuIcon</uiIconPath>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>WulaWall</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
</thingCategories>
|
||||
@@ -173,6 +176,9 @@
|
||||
<defName>WulaDoor_Cleanzone</defName>
|
||||
<label>乌拉帝国大门</label>
|
||||
<description>清理出一块场地并准备好资源,使得乌拉帝国母舰可以向此处投放建筑。建造好的信标可以收起或移至他处,但是必须要有母舰或者工程舰在上空才能投送建筑。\n\n乌拉帝国堡垒的大门不仅能够抵御大量爆炸和震荡伤害,还拥有无需通电即可运转的伺服系统来增加大门通过速度。</description>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>WulaDoor</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingClass>Building_Door</thingClass>
|
||||
<category>Building</category>
|
||||
<altitudeLayer>DoorMoveable</altitudeLayer>
|
||||
@@ -462,6 +468,7 @@
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>WulaSpecies</ThingDef>
|
||||
<ThingDef>WULA_MaintenancePod</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
@@ -655,6 +662,9 @@
|
||||
<uiIconPath>Wula/Building/WULA_WeaponArmor_Productor</uiIconPath>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>WULA_WeaponArmor_Productor</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
</thingCategories>
|
||||
@@ -817,6 +827,9 @@
|
||||
<uiIconPath>Wula/Building/WULA_Machine_Recharger</uiIconPath>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>WULA_Machine_Recharger</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
</thingCategories>
|
||||
@@ -984,6 +997,9 @@
|
||||
<uiIconPath>Wula/Building/WULA_Charging_Station_Synth_south</uiIconPath>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>WULA_Charging_Station_Synth</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
</thingCategories>
|
||||
@@ -1140,6 +1156,9 @@
|
||||
<uiIconPath>Wula/Building/WULA_Cube_Productor_south</uiIconPath>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>WULA_Cube_Productor</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
</thingCategories>
|
||||
@@ -1311,6 +1330,9 @@
|
||||
<uiIconPath>Wula/Building/Wula_DarkEnergy_Generators</uiIconPath>
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>Wula_DarkEnergy_Generators</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
</thingCategories>
|
||||
|
||||
@@ -255,6 +255,7 @@
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>Wula_Base_ATGun_Turret</ThingDef>
|
||||
<ThingDef>Wula_Base_ATGun_Turret_Weapon</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
@@ -529,7 +530,8 @@
|
||||
<minifiedDef>MinifiedThing</minifiedDef>
|
||||
<tickerType>Normal</tickerType>
|
||||
<descriptionHyperlinks>
|
||||
<ThingDef>Wula_Base_ATGun_Turret_Weapon</ThingDef>
|
||||
<ThingDef>Wula_Base_Laser_Turret</ThingDef>
|
||||
<ThingDef>Wula_Base_Laser_Turret_Weapon</ThingDef>
|
||||
</descriptionHyperlinks>
|
||||
<thingCategories Inherit="False">
|
||||
<li>BuildingsMisc</li>
|
||||
@@ -551,7 +553,7 @@
|
||||
<hasInteractionCell>false</hasInteractionCell>
|
||||
<rotatable>false</rotatable>
|
||||
<researchPrerequisites Inherit="False">
|
||||
<li>WULA_Turret_Base_AT_Technology</li>
|
||||
<li>WULA_Turret_Base_Laser_Technology</li>
|
||||
</researchPrerequisites>
|
||||
<statBases>
|
||||
<MaxHitPoints>1</MaxHitPoints>
|
||||
|
||||
@@ -743,21 +743,16 @@
|
||||
<explosionDamageFactor>1</explosionDamageFactor>
|
||||
</skyfaller>
|
||||
</ThingDef>
|
||||
<DamageDef ParentName="Bullet">
|
||||
<defName>WULA_Firepower_Minigun_Strafe_Damage</defName>
|
||||
<label>子弹</label>
|
||||
<defaultDamage>25</defaultDamage>
|
||||
<soundExplosion>Explosion_Bomb</soundExplosion>
|
||||
</DamageDef>
|
||||
<ThingDef ParentName="SkyfallerBase">
|
||||
<defName>WULA_Firepower_Cannon_Salvo_Skyfaller</defName>
|
||||
<label>轻型副炮炮弹</label>
|
||||
<size>(1, 1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Projectile/WULA_Bullet_ChargeLanceShot_Red</texPath>
|
||||
<texPath>Wula/Projectile/WULA_Energy_Shell</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>MoteGlow</shaderType>
|
||||
<drawSize>8</drawSize>
|
||||
<color>(86,66,157,255)</color>
|
||||
</graphicData>
|
||||
<skyfaller>
|
||||
<movementType>Accelerate</movementType>
|
||||
@@ -791,21 +786,25 @@
|
||||
<label>舰炮监视信标</label>
|
||||
<size>(1,1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Building/WULA_WeaponArmor_Productor_Incoming</texPath>
|
||||
<texPath>Wula/Building/WULA_Surveillance_Building</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>CutoutFlying</shaderType>
|
||||
<drawSize>(1,1)</drawSize>
|
||||
<shaderType>TransparentPostLight</shaderType>
|
||||
<drawSize>(24,24)</drawSize>
|
||||
<color>(255,255,255,150)</color>
|
||||
<damageData>
|
||||
<enabled>false</enabled>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<skyfaller>
|
||||
<movementType>Accelerate</movementType>
|
||||
<movementType>Decelerate</movementType>
|
||||
<shadow>Things/Skyfaller/SkyfallerShadowDropPod</shadow>
|
||||
<shadowSize>(5, 5)</shadowSize>
|
||||
<shadowSize>(0, 0)</shadowSize>
|
||||
<anticipationSound>DropPod_Fall</anticipationSound>
|
||||
<anticipationSoundTicks>100</anticipationSoundTicks>
|
||||
<impactSound>Explosion_Vaporize</impactSound>
|
||||
<!-- <impactSound>Explosion_Vaporize</impactSound> -->
|
||||
<moteSpawnTime>0.05</moteSpawnTime>
|
||||
<motesPerCell>1</motesPerCell>
|
||||
<cameraShake>1</cameraShake>
|
||||
<motesPerCell>0</motesPerCell>
|
||||
<cameraShake>0</cameraShake>
|
||||
<angleCurve>
|
||||
<points>
|
||||
<li>(0,0)</li>
|
||||
@@ -819,15 +818,17 @@
|
||||
<defName>WULA_Firepower_Cannon_Surveillance_Beacon</defName>
|
||||
<label>舰炮监视信标</label>
|
||||
<description>一枚标定监视区的轰炸信标,进入此处的敌对势力都会被乌拉帝国舰队的舰炮狠狠打击。</description>
|
||||
<uiIconPath>Wula/Building/WULA_WeaponArmor_Productor</uiIconPath>
|
||||
<!-- <uiIconPath>Wula/Building/WULA_WeaponArmor_Productor</uiIconPath> -->
|
||||
<tickerType>Normal</tickerType>
|
||||
<selectable>true</selectable>
|
||||
<selectable>false</selectable>
|
||||
<useHitPoints>false</useHitPoints>
|
||||
<size>(1,1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Building/WULA_Dropping_Building_Cleanzone</texPath>
|
||||
<graphicClass>Graphic_Multi</graphicClass>
|
||||
<drawSize>(3,3)</drawSize>
|
||||
<texPath>Wula/Building/WULA_Surveillance_Building</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>TransparentPostLight</shaderType>
|
||||
<drawSize>(24,24)</drawSize>
|
||||
<color>(255,255,255,150)</color>
|
||||
<damageData>
|
||||
<enabled>false</enabled>
|
||||
</damageData>
|
||||
@@ -847,22 +848,10 @@
|
||||
</statBases>
|
||||
<resourcesFractionWhenDeconstructed>0</resourcesFractionWhenDeconstructed>
|
||||
<building>
|
||||
<expandHomeArea>false</expandHomeArea>
|
||||
<destroySound>BuildingDestroyed_Metal_Small</destroySound>
|
||||
</building>
|
||||
<comps>
|
||||
<li Class="CompProperties_OrbitalBeam">
|
||||
<width>0.2</width>
|
||||
<color>(255, 20, 20, 242)</color>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_CustomRadius">
|
||||
<radius>12</radius> <!-- 半径大小 -->
|
||||
<color>(0.85,0.85,0.3)</color> <!-- 绿色圆圈 -->
|
||||
<radiusOffset>0</radiusOffset> <!-- 半径偏移 -->
|
||||
<showInGUI>true</showInGUI>
|
||||
<label>射程</label>
|
||||
<description>该信标所标定的舰炮监视范围,进入其中的敌军将遭到炮击</description>
|
||||
<defaultVisible>true</defaultVisible>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_BuildingBombardment">
|
||||
<radius>12</radius>
|
||||
<targetEnemies>true</targetEnemies>
|
||||
@@ -888,6 +877,12 @@
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
<DamageDef ParentName="Bullet">
|
||||
<defName>WULA_Firepower_Minigun_Strafe_Damage</defName>
|
||||
<label>子弹</label>
|
||||
<defaultDamage>25</defaultDamage>
|
||||
<soundExplosion>Explosion_Bomb</soundExplosion>
|
||||
</DamageDef>
|
||||
<ThingDef ParentName="EtherealThingBase">
|
||||
<defName>WULA_EnergyLance_Base</defName>
|
||||
<label>乌拉帝国光矛</label>
|
||||
@@ -900,11 +895,23 @@
|
||||
|
||||
<modExtensions>
|
||||
<li Class="WulaFallenEmpire.EnergyLanceExtension">
|
||||
<moveSmoothing>0.001</moveSmoothing>
|
||||
<moteSpawnInterval>3</moteSpawnInterval>
|
||||
<moteScale>0.8</moteScale>
|
||||
<moteSpawnInterval>9999</moteSpawnInterval>
|
||||
|
||||
<firesPerTick>2</firesPerTick>
|
||||
<effectRadius>8</effectRadius>
|
||||
<effectRadius>15</effectRadius>
|
||||
|
||||
<flightSpeed>3</flightSpeed>
|
||||
<acceleration>2</acceleration>
|
||||
<maxSpeed>5</maxSpeed>
|
||||
<turnSpeed>90</turnSpeed>
|
||||
|
||||
<useDynamicMovement>true</useDynamicMovement>
|
||||
<snapToTarget>false</snapToTarget>
|
||||
<snapDistance>0</snapDistance>
|
||||
|
||||
<hoverOverTarget>true</hoverOverTarget>
|
||||
<attackRange>15</attackRange>
|
||||
<hoverAltitude>20</hoverAltitude>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.AbilityWeaponDefExtension">
|
||||
<weaponDef>WULA_RW_Base_AR</weaponDef>
|
||||
@@ -916,7 +923,7 @@
|
||||
<li Class="CompProperties_OrbitalBeam">
|
||||
<width>6</width>
|
||||
<color>(147, 116, 201, 212)</color>
|
||||
<sound>OrbitalBeam</sound>
|
||||
<!-- <sound>OrbitalBeam</sound> -->
|
||||
</li>
|
||||
|
||||
<!-- 相机震动 -->
|
||||
@@ -926,8 +933,6 @@
|
||||
|
||||
<!-- 天空效果 -->
|
||||
<li Class="CompProperties_AffectsSky">
|
||||
<fadeInTicks>30</fadeInTicks>
|
||||
<fadeOutTicks>15</fadeOutTicks>
|
||||
<skyColors>
|
||||
<sky>(147, 116, 201)</sky>
|
||||
<shadow>(147, 116, 185)</shadow>
|
||||
@@ -947,11 +952,11 @@
|
||||
<children>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_Sustainer</subEffecterClass>
|
||||
<soundDef>VoidStructure_Emerging</soundDef>
|
||||
<soundDef>OrbitalBeam</soundDef>
|
||||
</li>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
|
||||
<fleckDef>EnergyLance_Fleck</fleckDef>
|
||||
<fleckDef>WULA_EnergyLance_Fleck</fleckDef>
|
||||
<chancePerTick>1</chancePerTick>
|
||||
<lifespanMaxTicks>999</lifespanMaxTicks>
|
||||
<chancePeriodTicks>40</chancePeriodTicks>
|
||||
@@ -961,17 +966,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
|
||||
<fleckDef>EnergyLance_Fleck</fleckDef>
|
||||
<chancePerTick>1</chancePerTick>
|
||||
<lifespanMaxTicks>999</lifespanMaxTicks>
|
||||
<chancePeriodTicks>40</chancePeriodTicks>
|
||||
<burstCount>1~1</burstCount>
|
||||
<scale>5</scale>
|
||||
<spawnLocType>OnSource</spawnLocType>
|
||||
</li>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerChance</subEffecterClass>
|
||||
<fleckDef>EnergyLance_Fleck</fleckDef>
|
||||
<fleckDef>WULA_EnergyLance_Fleck</fleckDef>
|
||||
<chancePerTick>1</chancePerTick>
|
||||
<lifespanMaxTicks>999</lifespanMaxTicks>
|
||||
<chancePeriodTicks>40</chancePeriodTicks>
|
||||
@@ -982,7 +977,7 @@
|
||||
</children>
|
||||
</EffecterDef>
|
||||
<FleckDef ParentName="FleckBase">
|
||||
<defName>EnergyLance_Fleck</defName>
|
||||
<defName>WULA_EnergyLance_Fleck</defName>
|
||||
<altitudeLayer>MoteOverhead</altitudeLayer>
|
||||
<fadeInTime>1</fadeInTime>
|
||||
<solidTime>0</solidTime>
|
||||
@@ -1001,4 +996,405 @@
|
||||
<drawSize>10.0</drawSize>
|
||||
</graphicData>
|
||||
</FleckDef>
|
||||
<ThingDef ParentName="SkyfallerBase">
|
||||
<defName>WULA_Firepower_EnergyLance_Surveillance_Skyfaller</defName>
|
||||
<label>光矛监视信标</label>
|
||||
<size>(1,1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Building/WULA_Surveillance_Building</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>TransparentPostLight</shaderType>
|
||||
<drawSize>(72,72)</drawSize>
|
||||
<color>(255,255,255,150)</color>
|
||||
<damageData>
|
||||
<enabled>false</enabled>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<skyfaller>
|
||||
<movementType>Decelerate</movementType>
|
||||
<shadow>Things/Skyfaller/SkyfallerShadowDropPod</shadow>
|
||||
<shadowSize>(0, 0)</shadowSize>
|
||||
<anticipationSound>DropPod_Fall</anticipationSound>
|
||||
<anticipationSoundTicks>100</anticipationSoundTicks>
|
||||
<!-- <impactSound>Explosion_Vaporize</impactSound> -->
|
||||
<moteSpawnTime>0.05</moteSpawnTime>
|
||||
<motesPerCell>0</motesPerCell>
|
||||
<cameraShake>0</cameraShake>
|
||||
<angleCurve>
|
||||
<points>
|
||||
<li>(0,0)</li>
|
||||
<li>(1, 1)</li>
|
||||
</points>
|
||||
</angleCurve>
|
||||
<spawnThing>WULA_Firepower_EnergyLance_Surveillance_Beacon</spawnThing>
|
||||
</skyfaller>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>WULA_Firepower_EnergyLance_Surveillance_Beacon</defName>
|
||||
<label>光矛监视信标</label>
|
||||
<description>一枚标定监视区的轰炸信标,进入此处的敌对势力都会被乌拉帝国舰队的舰炮狠狠打击。</description>
|
||||
<uiIconPath>Wula/Building/WULA_WeaponArmor_Productor</uiIconPath>
|
||||
<tickerType>Normal</tickerType>
|
||||
<selectable>false</selectable>
|
||||
<useHitPoints>false</useHitPoints>
|
||||
<size>(1,1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Building/WULA_Surveillance_Building</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>TransparentPostLight</shaderType>
|
||||
<drawSize>(72,72)</drawSize>
|
||||
<color>(255,255,255,150)</color>
|
||||
<damageData>
|
||||
<enabled>false</enabled>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>Standable</passability>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<fillPercent>0.5</fillPercent>
|
||||
<canOverlapZones>false</canOverlapZones>
|
||||
<pathCost>0</pathCost>
|
||||
<hasInteractionCell>false</hasInteractionCell>
|
||||
<rotatable>false</rotatable>
|
||||
<statBases>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<Mass>0</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
<resourcesFractionWhenDeconstructed>0</resourcesFractionWhenDeconstructed>
|
||||
<building>
|
||||
<expandHomeArea>false</expandHomeArea>
|
||||
<destroySound>BuildingDestroyed_Metal_Small</destroySound>
|
||||
</building>
|
||||
<comps>
|
||||
<li Class="WulaFallenEmpire.CompProperties_EnergyLanceTurret">
|
||||
<energyLanceDef>WULA_EnergyLance_Surveillance</energyLanceDef>
|
||||
<energyLanceDuration>600</energyLanceDuration>
|
||||
<energyLanceMoveDistance>25</energyLanceMoveDistance>
|
||||
<detectionRange>36</detectionRange>
|
||||
<targetUpdateInterval>30</targetUpdateInterval>
|
||||
<targetSwitchRange>20</targetSwitchRange>
|
||||
<warmupTicks>45</warmupTicks>
|
||||
<cooldownTicks>180</cooldownTicks>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_FactionSetter">
|
||||
<!-- <factionDef>Mechanoid</factionDef> 不写默认玩家派系-->
|
||||
<usePlayerFactionIfNull>true</usePlayerFactionIfNull>
|
||||
<overrideExistingFaction>false</overrideExistingFaction>
|
||||
</li>
|
||||
<li Class="CompProperties_Lifespan">
|
||||
<lifespanTicks>4000</lifespanTicks>
|
||||
</li>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(0.85,0.85,0.3,0.5)</glowColor>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="EtherealThingBase">
|
||||
<defName>WULA_EnergyLance_Surveillance</defName>
|
||||
<label>乌拉帝国光矛</label>
|
||||
<description>一束从乌拉帝国战舰上发射的纯净能量光束,将点燃路径上的一切活物。</description>
|
||||
<thingClass>WulaFallenEmpire.EnergyLance</thingClass>
|
||||
<tickerType>Normal</tickerType>
|
||||
<drawerType>RealtimeOnly</drawerType>
|
||||
<drawOffscreen>true</drawOffscreen>
|
||||
<seeThroughFog>true</seeThroughFog>
|
||||
|
||||
<!-- 比扫射用的光束结算更密集范围更小 -->
|
||||
<modExtensions>
|
||||
<li Class="WulaFallenEmpire.EnergyLanceExtension">
|
||||
<moteSpawnInterval>9999</moteSpawnInterval>
|
||||
|
||||
<firesPerTick>1</firesPerTick>
|
||||
<effectRadius>10</effectRadius>
|
||||
|
||||
<flightSpeed>3</flightSpeed>
|
||||
<acceleration>2</acceleration>
|
||||
<maxSpeed>5</maxSpeed>
|
||||
<turnSpeed>90</turnSpeed>
|
||||
|
||||
<useDynamicMovement>true</useDynamicMovement>
|
||||
<snapToTarget>false</snapToTarget>
|
||||
<snapDistance>0</snapDistance>
|
||||
|
||||
<hoverOverTarget>true</hoverOverTarget>
|
||||
<attackRange>15</attackRange>
|
||||
<hoverAltitude>20</hoverAltitude>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.AbilityWeaponDefExtension">
|
||||
<weaponDef>WULA_RW_Base_AR</weaponDef>
|
||||
</li>
|
||||
</modExtensions>
|
||||
|
||||
<comps>
|
||||
<!-- 光束视觉效果 -->
|
||||
<li Class="CompProperties_OrbitalBeam">
|
||||
<width>6</width>
|
||||
<color>(147, 116, 201, 212)</color>
|
||||
<!-- <sound>OrbitalBeam</sound> -->
|
||||
</li>
|
||||
|
||||
<!-- 相机震动 -->
|
||||
<li Class="CompProperties_CameraShaker">
|
||||
<mag>0.02</mag>
|
||||
</li>
|
||||
|
||||
<!-- 天空效果 -->
|
||||
<li Class="CompProperties_AffectsSky">
|
||||
<skyColors>
|
||||
<sky>(147, 116, 201)</sky>
|
||||
<shadow>(147, 116, 185)</shadow>
|
||||
<overlay>(147, 116, 150)</overlay>
|
||||
<saturation>1.5</saturation>
|
||||
</skyColors>
|
||||
</li>
|
||||
|
||||
<li Class="CompProperties_Effecter">
|
||||
<effecterDef>WULA_EnergyLance_Effecter</effecterDef>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="SkyfallerBase">
|
||||
<defName>WULA_Firepower_Primary_Cannon_Strafe_Skyfaller</defName>
|
||||
<label>主炮炮弹</label>
|
||||
<size>(1, 1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Projectile/WULA_Bullet_Plasma_Yellow</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>MoteGlow</shaderType>
|
||||
<drawSize>15</drawSize>
|
||||
</graphicData>
|
||||
<skyfaller>
|
||||
<movementType>Accelerate</movementType>
|
||||
<shadow>Things/Skyfaller/SkyfallerShadowDropPod</shadow>
|
||||
<shadowSize>(5, 5)</shadowSize>
|
||||
<anticipationSound>DropPod_Fall</anticipationSound>
|
||||
<anticipationSoundTicks>100</anticipationSoundTicks>
|
||||
<impactSound>Explosion_Bomb</impactSound>
|
||||
<moteSpawnTime>0.05</moteSpawnTime>
|
||||
<motesPerCell>1</motesPerCell>
|
||||
<cameraShake>1</cameraShake>
|
||||
<rotationCurve>
|
||||
<points>
|
||||
<li>(0,180)</li>
|
||||
<li>(1, 181)</li>
|
||||
</points>
|
||||
</rotationCurve>
|
||||
<angleCurve>
|
||||
<points>
|
||||
<li>(0,0)</li>
|
||||
<li>(1, 1)</li>
|
||||
</points>
|
||||
</angleCurve>
|
||||
<explosionRadius>35</explosionRadius>
|
||||
<explosionDamage>WULA_DarkMatterBomb</explosionDamage>
|
||||
<explosionDamageFactor>1</explosionDamageFactor>
|
||||
<spawnThing>CraterLarge</spawnThing>
|
||||
</skyfaller>
|
||||
</ThingDef>
|
||||
<EffecterDef>
|
||||
<defName>WULA_DarkMatterBomb_Shockwave</defName>
|
||||
<children>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerTriggered</subEffecterClass>
|
||||
<fleckDef>Fleck_BlastMechBandShockwave</fleckDef>
|
||||
<burstCount>1</burstCount>
|
||||
<spawnLocType>OnSource</spawnLocType>
|
||||
<absoluteAngle>true</absoluteAngle>
|
||||
<rotation>0~0</rotation>
|
||||
</li>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerTriggered</subEffecterClass>
|
||||
<fleckDef>WULA_DarkMatterBomb_MechBandRedLine_Fleck</fleckDef>
|
||||
<burstCount>1</burstCount>
|
||||
<spawnLocType>OnSource</spawnLocType>
|
||||
<absoluteAngle>true</absoluteAngle>
|
||||
<rotation>0~0</rotation>
|
||||
</li>
|
||||
<li>
|
||||
<subEffecterClass>SubEffecter_SprayerTriggered</subEffecterClass>
|
||||
<moteDef>WULA_DarkMatterBomb_FlashStrong</moteDef>
|
||||
<burstCount>1</burstCount>
|
||||
<spawnLocType>OnSource</spawnLocType>
|
||||
<scale>24</scale>
|
||||
</li>
|
||||
</children>
|
||||
</EffecterDef>
|
||||
<FleckDef ParentName="FleckBase_Thrown">
|
||||
<defName>WULA_DarkMatterBomb_MechBandRedLine_Fleck</defName>
|
||||
<altitudeLayer>LightingOverlay</altitudeLayer>
|
||||
<fadeInTime>0.1</fadeInTime>
|
||||
<fadeOutTime>0.28</fadeOutTime>
|
||||
<solidTime>0.7</solidTime>
|
||||
<growthRate>11</growthRate>
|
||||
<drawOffscreen>true</drawOffscreen>
|
||||
<graphicData>
|
||||
<texPath>Things/Mote/RedLineGlow</texPath>
|
||||
<graphicClass>Graphic_FleckPulse</graphicClass>
|
||||
<shaderType>MoteMultiplyAddCircular</shaderType>
|
||||
<color>(78,0,106,215)</color>
|
||||
<shaderParameters>
|
||||
<_DistortionTex>/Things/Mote/RadiationDistortion_A</_DistortionTex>
|
||||
<_texAScale>0.5</_texAScale>
|
||||
<_texBScale>2</_texBScale>
|
||||
<_texAScrollSpeed>0</_texAScrollSpeed>
|
||||
<_texBScrollSpeed>-0.4</_texBScrollSpeed>
|
||||
<_Intensity>0.5</_Intensity>
|
||||
<_InnerFadeAmount>0</_InnerFadeAmount>
|
||||
<_DistortionIntensity>0.5</_DistortionIntensity>
|
||||
<_TexAScaleDivisorPerProgress>1.5</_TexAScaleDivisorPerProgress>
|
||||
</shaderParameters>
|
||||
<drawSize>(7, 7)</drawSize>
|
||||
</graphicData>
|
||||
</FleckDef>
|
||||
<ThingDef ParentName="MoteBase">
|
||||
<defName>WULA_DarkMatterBomb_FlashStrong</defName>
|
||||
<thingClass>MoteAttached</thingClass>
|
||||
<altitudeLayer>MoteOverhead</altitudeLayer>
|
||||
<mote>
|
||||
<fadeInTime>0.1</fadeInTime>
|
||||
<fadeOutTime>0.13</fadeOutTime>
|
||||
<solidTime>0.1</solidTime>
|
||||
</mote>
|
||||
<graphicData>
|
||||
<texPath>Things/Mote/BrightFlash</texPath>
|
||||
<shaderType>MoteGlow</shaderType>
|
||||
<color>(78,0,106,215)</color>
|
||||
</graphicData>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="SkyfallerBase">
|
||||
<defName>WULA_Firepower_Primary_Cannon_EMP_Surveillance_Skyfaller</defName>
|
||||
<label>主炮EMP监视信标</label>
|
||||
<size>(1,1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Building/WULA_Surveillance_Building</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>TransparentPostLight</shaderType>
|
||||
<drawSize>(200,200)</drawSize>
|
||||
<color>(255,255,255,150)</color>
|
||||
<damageData>
|
||||
<enabled>false</enabled>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<skyfaller>
|
||||
<movementType>Decelerate</movementType>
|
||||
<shadow>Things/Skyfaller/SkyfallerShadowDropPod</shadow>
|
||||
<shadowSize>(0, 0)</shadowSize>
|
||||
<anticipationSound>DropPod_Fall</anticipationSound>
|
||||
<anticipationSoundTicks>100</anticipationSoundTicks>
|
||||
<!-- <impactSound>Explosion_Vaporize</impactSound> -->
|
||||
<moteSpawnTime>0.05</moteSpawnTime>
|
||||
<motesPerCell>0</motesPerCell>
|
||||
<cameraShake>0</cameraShake>
|
||||
<angleCurve>
|
||||
<points>
|
||||
<li>(0,0)</li>
|
||||
<li>(1, 1)</li>
|
||||
</points>
|
||||
</angleCurve>
|
||||
<spawnThing>WULA_Firepower_Primary_Cannon_EMP_Surveillance_Beacon</spawnThing>
|
||||
</skyfaller>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="BuildingBase">
|
||||
<defName>WULA_Firepower_Primary_Cannon_EMP_Surveillance_Beacon</defName>
|
||||
<label>主炮EMP监视信标</label>
|
||||
<description>一枚标定监视区的轰炸信标,进入此处的敌对势力都会被乌拉帝国舰队的舰炮狠狠打击。</description>
|
||||
<uiIconPath>Wula/Building/WULA_WeaponArmor_Productor</uiIconPath>
|
||||
<tickerType>Normal</tickerType>
|
||||
<selectable>false</selectable>
|
||||
<useHitPoints>false</useHitPoints>
|
||||
<size>(1,1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Building/WULA_Surveillance_Building</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>TransparentPostLight</shaderType>
|
||||
<drawSize>(170,170)</drawSize>
|
||||
<color>(255,255,255,150)</color>
|
||||
<damageData>
|
||||
<enabled>false</enabled>
|
||||
</damageData>
|
||||
</graphicData>
|
||||
<altitudeLayer>Building</altitudeLayer>
|
||||
<passability>Standable</passability>
|
||||
<castEdgeShadows>false</castEdgeShadows>
|
||||
<fillPercent>0.5</fillPercent>
|
||||
<canOverlapZones>false</canOverlapZones>
|
||||
<pathCost>0</pathCost>
|
||||
<hasInteractionCell>false</hasInteractionCell>
|
||||
<rotatable>false</rotatable>
|
||||
<statBases>
|
||||
<WorkToBuild>1</WorkToBuild>
|
||||
<Mass>0</Mass>
|
||||
<Flammability>0</Flammability>
|
||||
</statBases>
|
||||
<resourcesFractionWhenDeconstructed>0</resourcesFractionWhenDeconstructed>
|
||||
<building>
|
||||
<expandHomeArea>false</expandHomeArea>
|
||||
<destroySound>BuildingDestroyed_Metal_Small</destroySound>
|
||||
</building>
|
||||
<comps>
|
||||
<li Class="WulaFallenEmpire.CompProperties_BuildingBombardment">
|
||||
<radius>100</radius>
|
||||
<targetEnemies>true</targetEnemies>
|
||||
<targetNeutrals>false</targetNeutrals>
|
||||
<targetAnimals>false</targetAnimals>
|
||||
<burstCount>1</burstCount>
|
||||
<innerBurstIntervalTicks>15</innerBurstIntervalTicks>
|
||||
<burstIntervalTicks>240</burstIntervalTicks>
|
||||
<randomOffset>6</randomOffset>
|
||||
<skyfallerDef>WULA_Firepower_Primary_Cannon_EMP_Skyfaller</skyfallerDef>
|
||||
</li>
|
||||
<li Class="WulaFallenEmpire.CompProperties_FactionSetter">
|
||||
<!-- <factionDef>Mechanoid</factionDef> 不写默认玩家派系-->
|
||||
<usePlayerFactionIfNull>true</usePlayerFactionIfNull>
|
||||
<overrideExistingFaction>false</overrideExistingFaction>
|
||||
</li>
|
||||
<li Class="CompProperties_Lifespan">
|
||||
<lifespanTicks>12000</lifespanTicks>
|
||||
</li>
|
||||
<li Class="CompProperties_Glower">
|
||||
<glowRadius>6</glowRadius>
|
||||
<glowColor>(0.85,0.85,0.3,0.5)</glowColor>
|
||||
</li>
|
||||
</comps>
|
||||
</ThingDef>
|
||||
<ThingDef ParentName="SkyfallerBase">
|
||||
<defName>WULA_Firepower_Primary_Cannon_EMP_Skyfaller</defName>
|
||||
<label>主炮炮弹</label>
|
||||
<size>(1, 1)</size>
|
||||
<graphicData>
|
||||
<texPath>Wula/Projectile/WULA_Bullet_Plasma_Yellow</texPath>
|
||||
<graphicClass>Graphic_Single</graphicClass>
|
||||
<shaderType>MoteGlow</shaderType>
|
||||
<drawSize>15</drawSize>
|
||||
<color>(13,88,195,255)</color>
|
||||
</graphicData>
|
||||
<skyfaller>
|
||||
<movementType>Accelerate</movementType>
|
||||
<shadow>Things/Skyfaller/SkyfallerShadowDropPod</shadow>
|
||||
<shadowSize>(5, 5)</shadowSize>
|
||||
<anticipationSound>DropPod_Fall</anticipationSound>
|
||||
<anticipationSoundTicks>100</anticipationSoundTicks>
|
||||
<impactSound>Explosion_EMP</impactSound>
|
||||
<moteSpawnTime>0.05</moteSpawnTime>
|
||||
<motesPerCell>1</motesPerCell>
|
||||
<cameraShake>1</cameraShake>
|
||||
<rotationCurve>
|
||||
<points>
|
||||
<li>(0,180)</li>
|
||||
<li>(1, 181)</li>
|
||||
</points>
|
||||
</rotationCurve>
|
||||
<angleCurve>
|
||||
<points>
|
||||
<li>(0,0)</li>
|
||||
<li>(1, 1)</li>
|
||||
</points>
|
||||
</angleCurve>
|
||||
<explosionRadius>35</explosionRadius>
|
||||
<explosionDamage>EMP</explosionDamage>
|
||||
<explosionDamageFactor>10</explosionDamageFactor>
|
||||
</skyfaller>
|
||||
</ThingDef>
|
||||
</Defs>
|
||||
@@ -344,7 +344,7 @@
|
||||
<recipeUsers Inherit="False">
|
||||
<li>WULA_WeaponArmor_Productor</li>
|
||||
</recipeUsers>
|
||||
<researchPrerequisite>WULA_Synth_Weapon_2_Stun_Technology</researchPrerequisite>
|
||||
<researchPrerequisite>WULA_Synth_Weapon_3_Melee_Technology</researchPrerequisite>
|
||||
<skillRequirements>
|
||||
<Crafting>7</Crafting>
|
||||
</skillRequirements>
|
||||
@@ -2006,7 +2006,7 @@
|
||||
<ThingDef ParentName="WULA_ExperienceCore_Weapon_Ranged">
|
||||
<defName>WULA_RW_Auto_GL</defName>
|
||||
<label>SEl-78"角砾岩"</label>
|
||||
<description>乌拉帝国所装备的自动榴弹炮,主要发射用于对抗低护甲集群的杀伤性榴弹,优秀的供弹结构使其射速较同类武器快得多。除此之外,它也能临时装填和发射EMP榴弹或烟雾榴弹,这使其成为了一款多功能的支援型武器。</description>
|
||||
<description>乌拉帝国所装备的自动榴弹炮,主要发射用于对抗低护甲集群的杀伤性榴弹,优秀的供弹结构使其射速较同类武器快得多。除此之外,它也能临时装填和发射烟雾榴弹,这使其成为了一款多功能的支援型武器。</description>
|
||||
<techLevel>Ultra</techLevel>
|
||||
<tradeability>None</tradeability>
|
||||
<!-- <techLevel>Spacer</techLevel> -->
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
<WULA_GlobalFlyOverCooldown.FacilityStatus>武器阵列:{0}个就绪,{1}个冷却中</WULA_GlobalFlyOverCooldown.FacilityStatus>
|
||||
<WULA_GlobalFlyOverCooldown.FacilityStatusError>设施状态错误</WULA_GlobalFlyOverCooldown.FacilityStatusError>
|
||||
<WULA_GlobalFlyOverCooldown.FacilityStatusDetailed>武器阵列:{0}个就绪,{1}个冷却中</WULA_GlobalFlyOverCooldown.FacilityStatusDetailed>
|
||||
<WULA_GlobalFlyOverCooldown.CooldownTime>冷却时间:{0}</WULA_GlobalFlyOverCooldown.CooldownTime>
|
||||
<WULA_GlobalFlyOverCooldown.CooldownTime>使用此支援后,武器阵列的冷却时间:{0}</WULA_GlobalFlyOverCooldown.CooldownTime>
|
||||
<WULA_GlobalFlyOverCooldown.NoAvailableFacilitiesSimple>没有可用的武器阵列</WULA_GlobalFlyOverCooldown.NoAvailableFacilitiesSimple>
|
||||
|
||||
<!-- FlyOverCooldown 翻译 -->
|
||||
|
||||
BIN
Content/Textures/Wula/Building/WULA_Surveillance_Building.png
Normal file
|
After Width: | Height: | Size: 2.9 MiB |
BIN
Content/Textures/Wula/Projectile/WULA_Energy_Shell.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
@@ -15,22 +15,22 @@ namespace WulaFallenEmpire
|
||||
public IntVec3 endPosition;
|
||||
public float moveDistance;
|
||||
public bool useFixedDistance;
|
||||
public float flightSpeed = 1f;
|
||||
public float flightSpeed = 0.5f; // 提高移动速度
|
||||
public float currentProgress = 0f;
|
||||
public float altitude = 20f;
|
||||
|
||||
|
||||
// 伤害配置
|
||||
public int firesPerTick = 4;
|
||||
public float effectRadius = 15f;
|
||||
public int durationTicks = 600;
|
||||
private int ticksPassed = 0;
|
||||
|
||||
|
||||
// 移动状态
|
||||
private Vector3 exactPosition;
|
||||
private Vector3 moveDirection;
|
||||
private bool hasStarted = false;
|
||||
private bool hasCompleted = false;
|
||||
|
||||
|
||||
// 视觉效果
|
||||
private CompOrbitalBeam orbitalBeamComp;
|
||||
private Sustainer sustainer;
|
||||
@@ -42,11 +42,194 @@ namespace WulaFallenEmpire
|
||||
public Thing instigator;
|
||||
public ThingDef weaponDef;
|
||||
|
||||
// 精确位置计算(基于FlyOver的逻辑)
|
||||
// 动态目标追踪支持
|
||||
private IntVec3 currentTargetPosition = IntVec3.Invalid;
|
||||
private bool hasValidTarget = false;
|
||||
private int lastTargetUpdateTick = 0;
|
||||
private int maxIdleTicks = 180; // 3秒无目标更新后自毁
|
||||
|
||||
// 移动模式
|
||||
private bool useDynamicMovement = true; // 使用动态追踪模式
|
||||
|
||||
// 更新目标位置
|
||||
public void UpdateTargetPosition(IntVec3 targetPos)
|
||||
{
|
||||
if (targetPos.IsValid)
|
||||
{
|
||||
currentTargetPosition = targetPos;
|
||||
hasValidTarget = true;
|
||||
lastTargetUpdateTick = Find.TickManager.TicksGame;
|
||||
|
||||
// 如果是首次设置目标,立即移动到目标位置
|
||||
if (!hasStarted)
|
||||
{
|
||||
exactPosition = targetPos.ToVector3();
|
||||
exactPosition.y = altitude;
|
||||
base.Position = targetPos;
|
||||
hasStarted = true;
|
||||
}
|
||||
|
||||
Log.Message($"[EnergyLance] Target updated to: {targetPos}, current position: {base.Position}");
|
||||
}
|
||||
else
|
||||
{
|
||||
hasValidTarget = false;
|
||||
Log.Message("[EnergyLance] Target cleared");
|
||||
}
|
||||
}
|
||||
|
||||
// 动态移动逻辑 - 直接追踪目标
|
||||
private void UpdateDynamicMovement()
|
||||
{
|
||||
if (hasValidTarget && currentTargetPosition.IsValid)
|
||||
{
|
||||
Vector3 targetVector = currentTargetPosition.ToVector3();
|
||||
targetVector.y = altitude; // 保持高度
|
||||
|
||||
Vector3 currentVector = exactPosition;
|
||||
|
||||
// 计算移动方向
|
||||
Vector3 direction = (targetVector - currentVector).normalized;
|
||||
|
||||
// 计算移动距离(基于速度)
|
||||
float moveThisTick = flightSpeed * 0.1f;
|
||||
|
||||
// 更新位置
|
||||
exactPosition += direction * moveThisTick;
|
||||
|
||||
// 更新格子位置
|
||||
IntVec3 newCell = new IntVec3(
|
||||
Mathf.RoundToInt(exactPosition.x),
|
||||
Mathf.RoundToInt(exactPosition.y),
|
||||
Mathf.RoundToInt(exactPosition.z)
|
||||
);
|
||||
|
||||
if (newCell != base.Position && newCell.InBounds(base.Map))
|
||||
{
|
||||
base.Position = newCell;
|
||||
Log.Message($"[EnergyLance] Moved to new cell: {newCell}");
|
||||
}
|
||||
|
||||
// 检查是否接近目标
|
||||
float distanceToTarget = Vector3.Distance(currentVector, targetVector);
|
||||
if (distanceToTarget < 0.5f)
|
||||
{
|
||||
// 非常接近目标,直接设置到目标位置
|
||||
exactPosition = targetVector;
|
||||
base.Position = currentTargetPosition;
|
||||
Log.Message($"[EnergyLance] Reached target position: {currentTargetPosition}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 没有有效目标,使用原始移动逻辑
|
||||
UpdateOriginalMovement();
|
||||
}
|
||||
}
|
||||
|
||||
// 原始移动逻辑(从起点到终点的线性移动)
|
||||
private void UpdateOriginalMovement()
|
||||
{
|
||||
float totalDistance = useFixedDistance ? moveDistance : Vector3.Distance(startPosition.ToVector3(), endPosition.ToVector3());
|
||||
float progressPerTick = 1f / durationTicks;
|
||||
currentProgress += progressPerTick;
|
||||
currentProgress = Mathf.Clamp01(currentProgress);
|
||||
|
||||
exactPosition = Vector3.Lerp(startPosition.ToVector3(), CalculateEndPosition(), currentProgress);
|
||||
exactPosition.y = altitude;
|
||||
|
||||
IntVec3 newCell = new IntVec3(
|
||||
Mathf.RoundToInt(exactPosition.x),
|
||||
Mathf.RoundToInt(exactPosition.y),
|
||||
Mathf.RoundToInt(exactPosition.z)
|
||||
);
|
||||
|
||||
if (newCell != base.Position && newCell.InBounds(base.Map))
|
||||
{
|
||||
base.Position = newCell;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Tick()
|
||||
{
|
||||
base.Tick();
|
||||
|
||||
if (!hasStarted || hasCompleted)
|
||||
return;
|
||||
|
||||
ticksPassed++;
|
||||
|
||||
// 添加保护期检查 - 防止光束立即销毁
|
||||
if (ticksPassed < 5)
|
||||
{
|
||||
// 只更新移动,不检查销毁
|
||||
UpdateDynamicMovement();
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查是否长时间没有收到目标更新
|
||||
if (hasValidTarget && Find.TickManager.TicksGame - lastTargetUpdateTick > maxIdleTicks)
|
||||
{
|
||||
Log.Message("[EnergyLance] No target updates received, self-destructing");
|
||||
CompleteEnergyLance();
|
||||
return;
|
||||
}
|
||||
|
||||
// 更新移动
|
||||
UpdateDynamicMovement();
|
||||
|
||||
// 造成伤害
|
||||
for (int i = 0; i < firesPerTick; i++)
|
||||
{
|
||||
StartRandomFireAndDoFlameDamage();
|
||||
}
|
||||
|
||||
// 更新音效
|
||||
sustainer?.Maintain();
|
||||
|
||||
// 检查是否完成
|
||||
if (ticksPassed >= durationTicks || (!hasValidTarget && currentProgress >= 1f))
|
||||
{
|
||||
CompleteEnergyLance();
|
||||
}
|
||||
}
|
||||
|
||||
private void CompleteEnergyLance()
|
||||
{
|
||||
hasCompleted = true;
|
||||
|
||||
// 停止音效
|
||||
sustainer?.End();
|
||||
sustainer = null;
|
||||
|
||||
Log.Message($"[EnergyLance] 光束完成 at position {base.Position}, ticksPassed: {ticksPassed}, durationTicks: {durationTicks}");
|
||||
|
||||
// 销毁自身
|
||||
Destroy();
|
||||
}
|
||||
|
||||
public override void ExposeData()
|
||||
{
|
||||
base.ExposeData();
|
||||
|
||||
Scribe_Values.Look(ref currentTargetPosition, "currentTargetPosition");
|
||||
Scribe_Values.Look(ref hasValidTarget, "hasValidTarget", false);
|
||||
Scribe_Values.Look(ref lastTargetUpdateTick, "lastTargetUpdateTick", 0);
|
||||
Scribe_Values.Look(ref maxIdleTicks, "maxIdleTicks", 180);
|
||||
Scribe_Values.Look(ref useDynamicMovement, "useDynamicMovement", true);
|
||||
}
|
||||
|
||||
// 精确位置计算
|
||||
public override Vector3 DrawPos
|
||||
{
|
||||
get
|
||||
{
|
||||
if (exactPosition != Vector3.zero)
|
||||
{
|
||||
return exactPosition;
|
||||
}
|
||||
|
||||
// 备用计算
|
||||
Vector3 start = startPosition.ToVector3();
|
||||
Vector3 end = CalculateEndPosition();
|
||||
Vector3 basePos = Vector3.Lerp(start, end, currentProgress);
|
||||
@@ -74,7 +257,15 @@ namespace WulaFallenEmpire
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector3 direction = (CalculateEndPosition() - startPosition.ToVector3()).normalized;
|
||||
Vector3 direction;
|
||||
if (hasValidTarget && currentTargetPosition.IsValid)
|
||||
{
|
||||
direction = (currentTargetPosition.ToVector3() - exactPosition).normalized;
|
||||
}
|
||||
else
|
||||
{
|
||||
direction = (CalculateEndPosition() - startPosition.ToVector3()).normalized;
|
||||
}
|
||||
return Quaternion.LookRotation(direction.Yto0());
|
||||
}
|
||||
}
|
||||
@@ -82,30 +273,42 @@ namespace WulaFallenEmpire
|
||||
public override void SpawnSetup(Map map, bool respawningAfterLoad)
|
||||
{
|
||||
base.SpawnSetup(map, respawningAfterLoad);
|
||||
|
||||
|
||||
orbitalBeamComp = GetComp<CompOrbitalBeam>();
|
||||
|
||||
|
||||
if (!respawningAfterLoad)
|
||||
{
|
||||
base.Position = startPosition;
|
||||
// 初始位置设置为目标位置(如果有效),否则使用起始位置
|
||||
if (endPosition.IsValid)
|
||||
{
|
||||
base.Position = endPosition;
|
||||
exactPosition = endPosition.ToVector3();
|
||||
exactPosition.y = altitude;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.Position = startPosition;
|
||||
exactPosition = startPosition.ToVector3();
|
||||
exactPosition.y = altitude;
|
||||
}
|
||||
|
||||
hasStarted = true;
|
||||
|
||||
|
||||
// 计算移动方向
|
||||
Vector3 endPos = CalculateEndPosition();
|
||||
moveDirection = (endPos - startPosition.ToVector3()).normalized;
|
||||
|
||||
|
||||
// 初始化光束组件
|
||||
if (orbitalBeamComp != null)
|
||||
{
|
||||
// 使用反射调用StartAnimation方法
|
||||
StartOrbitalBeamAnimation();
|
||||
}
|
||||
|
||||
|
||||
// 开始音效
|
||||
StartSound();
|
||||
|
||||
Log.Message($"[EnergyLance] Spawned at {startPosition}, moving to {endPosition}, " +
|
||||
$"distance: {moveDistance}, fixed: {useFixedDistance}");
|
||||
|
||||
Log.Message($"[EnergyLance] Spawned at {base.Position}, target: {endPosition}, " +
|
||||
$"exact position: {exactPosition}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,102 +344,34 @@ namespace WulaFallenEmpire
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Tick()
|
||||
{
|
||||
base.Tick();
|
||||
|
||||
if (!hasStarted || hasCompleted)
|
||||
return;
|
||||
|
||||
ticksPassed++;
|
||||
|
||||
// 更新移动进度
|
||||
UpdateMovement();
|
||||
|
||||
// 造成伤害
|
||||
for (int i = 0; i < firesPerTick; i++)
|
||||
{
|
||||
StartRandomFireAndDoFlameDamage();
|
||||
}
|
||||
|
||||
// 更新音效
|
||||
sustainer?.Maintain();
|
||||
|
||||
// 检查是否完成
|
||||
if (ticksPassed >= durationTicks || currentProgress >= 1f)
|
||||
{
|
||||
CompleteEnergyLance();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateMovement()
|
||||
{
|
||||
// 计算总距离
|
||||
float totalDistance = useFixedDistance ? moveDistance : Vector3.Distance(startPosition.ToVector3(), endPosition.ToVector3());
|
||||
|
||||
// 计算移动速度(基于持续时间和总距离)
|
||||
float progressPerTick = 1f / durationTicks;
|
||||
currentProgress += progressPerTick;
|
||||
currentProgress = Mathf.Clamp01(currentProgress);
|
||||
|
||||
// 更新精确位置
|
||||
exactPosition = Vector3.Lerp(startPosition.ToVector3(), CalculateEndPosition(), currentProgress);
|
||||
|
||||
// 更新格子位置
|
||||
IntVec3 newCell = new IntVec3(
|
||||
Mathf.RoundToInt(exactPosition.x),
|
||||
Mathf.RoundToInt(exactPosition.y),
|
||||
Mathf.RoundToInt(exactPosition.z)
|
||||
);
|
||||
|
||||
if (newCell != base.Position && newCell.InBounds(base.Map))
|
||||
{
|
||||
base.Position = newCell;
|
||||
}
|
||||
}
|
||||
|
||||
private void StartRandomFireAndDoFlameDamage()
|
||||
{
|
||||
IntVec3 targetCell = (from x in GenRadial.RadialCellsAround(base.Position, effectRadius, useCenter: true)
|
||||
where x.InBounds(base.Map)
|
||||
select x).RandomElementByWeight((IntVec3 x) => 1f - Mathf.Min(x.DistanceTo(base.Position) / effectRadius, 1f) + 0.05f);
|
||||
where x.InBounds(base.Map)
|
||||
select x).RandomElementByWeight((IntVec3 x) => 1f - Mathf.Min(x.DistanceTo(base.Position) / effectRadius, 1f) + 0.05f);
|
||||
|
||||
FireUtility.TryStartFireIn(targetCell, base.Map, Rand.Range(0.1f, 0.925f), instigator);
|
||||
|
||||
|
||||
tmpThings.Clear();
|
||||
tmpThings.AddRange(targetCell.GetThingList(base.Map));
|
||||
|
||||
|
||||
for (int i = 0; i < tmpThings.Count; i++)
|
||||
{
|
||||
int num = ((tmpThings[i] is Corpse) ? CorpseFlameDamageAmountRange.RandomInRange : FlameDamageAmountRange.RandomInRange);
|
||||
Pawn pawn = tmpThings[i] as Pawn;
|
||||
BattleLogEntry_DamageTaken battleLogEntry_DamageTaken = null;
|
||||
|
||||
|
||||
if (pawn != null)
|
||||
{
|
||||
battleLogEntry_DamageTaken = new BattleLogEntry_DamageTaken(pawn, RulePackDefOf.DamageEvent_PowerBeam, instigator as Pawn);
|
||||
Find.BattleLog.Add(battleLogEntry_DamageTaken);
|
||||
}
|
||||
|
||||
DamageInfo damageInfo = new DamageInfo(DamageDefOf.Flame, num, 0f, -1f, instigator, null, weaponDef);
|
||||
|
||||
DamageInfo damageInfo = new DamageInfo(WulaDamageDefOf.Wula_Dark_Matter_Flame, num, 2f, -1f, instigator, null, weaponDef);
|
||||
tmpThings[i].TakeDamage(damageInfo).AssociateWithLog(battleLogEntry_DamageTaken);
|
||||
}
|
||||
|
||||
tmpThings.Clear();
|
||||
}
|
||||
|
||||
private void CompleteEnergyLance()
|
||||
{
|
||||
hasCompleted = true;
|
||||
|
||||
// 停止音效
|
||||
sustainer?.End();
|
||||
sustainer = null;
|
||||
|
||||
Log.Message($"[EnergyLance] Completed at position {base.Position}");
|
||||
|
||||
// 销毁自身
|
||||
Destroy();
|
||||
tmpThings.Clear();
|
||||
}
|
||||
|
||||
// 重写绘制方法,确保光束正确显示
|
||||
@@ -246,27 +381,8 @@ namespace WulaFallenEmpire
|
||||
Comps_PostDraw();
|
||||
}
|
||||
|
||||
public override void ExposeData()
|
||||
{
|
||||
base.ExposeData();
|
||||
|
||||
Scribe_Values.Look(ref startPosition, "startPosition");
|
||||
Scribe_Values.Look(ref endPosition, "endPosition");
|
||||
Scribe_Values.Look(ref moveDistance, "moveDistance");
|
||||
Scribe_Values.Look(ref useFixedDistance, "useFixedDistance");
|
||||
Scribe_Values.Look(ref flightSpeed, "flightSpeed", 1f);
|
||||
Scribe_Values.Look(ref currentProgress, "currentProgress", 0f);
|
||||
Scribe_Values.Look(ref altitude, "altitude", 20f);
|
||||
Scribe_Values.Look(ref firesPerTick, "firesPerTick", 4);
|
||||
Scribe_Values.Look(ref effectRadius, "effectRadius", 15f);
|
||||
Scribe_Values.Look(ref durationTicks, "durationTicks", 600);
|
||||
Scribe_Values.Look(ref ticksPassed, "ticksPassed", 0);
|
||||
Scribe_Values.Look(ref hasStarted, "hasStarted", false);
|
||||
Scribe_Values.Look(ref hasCompleted, "hasCompleted", false);
|
||||
}
|
||||
|
||||
// 创建EnergyLance的静态方法
|
||||
public static EnergyLance MakeEnergyLance(ThingDef energyLanceDef, IntVec3 start, IntVec3 end, Map map,
|
||||
public static EnergyLance MakeEnergyLance(ThingDef energyLanceDef, IntVec3 start, IntVec3 end, Map map,
|
||||
float distance = 15f, bool fixedDistance = true, int duration = 600, Pawn instigatorPawn = null)
|
||||
{
|
||||
EnergyLance energyLance = (EnergyLance)ThingMaker.MakeThing(energyLanceDef);
|
||||
@@ -276,10 +392,12 @@ namespace WulaFallenEmpire
|
||||
energyLance.useFixedDistance = fixedDistance;
|
||||
energyLance.durationTicks = duration;
|
||||
energyLance.instigator = instigatorPawn;
|
||||
|
||||
GenSpawn.Spawn(energyLance, start, map);
|
||||
|
||||
Log.Message($"[EnergyLance] Created {energyLanceDef.defName} from {start} to {end}");
|
||||
|
||||
// 直接在目标位置生成光束
|
||||
IntVec3 spawnPosition = end.IsValid ? end : start;
|
||||
GenSpawn.Spawn(energyLance, spawnPosition, map);
|
||||
|
||||
Log.Message($"[EnergyLance] Created {energyLanceDef.defName} at {spawnPosition}, target: {end}");
|
||||
return energyLance;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,25 @@ namespace WulaFallenEmpire
|
||||
public float moveSmoothing = 0.1f; // 移动平滑度 (0-1),值越小越平滑
|
||||
public int moteSpawnInterval = 3; // Mote生成间隔,值越大密度越低
|
||||
public float moteScale = 0.8f; // Mote缩放比例
|
||||
|
||||
|
||||
// 伤害配置
|
||||
public int firesPerTick = 4;
|
||||
public float effectRadius = 15f;
|
||||
|
||||
// 新增:移动速度配置
|
||||
public float flightSpeed = 5f; // 光束移动速度(格/秒)
|
||||
public float acceleration = 2f; // 加速度
|
||||
public float maxSpeed = 10f; // 最大速度
|
||||
public float turnSpeed = 90f; // 转向速度(度/秒)
|
||||
|
||||
// 移动模式配置
|
||||
public bool useDynamicMovement = true; // 使用动态追踪模式
|
||||
public bool snapToTarget = false; // 是否直接瞬移到目标
|
||||
public float snapDistance = 3f; // 瞬移触发距离
|
||||
|
||||
// 行为配置
|
||||
public bool hoverOverTarget = true; // 在目标上空悬停
|
||||
public float hoverAltitude = 20f; // 悬停高度
|
||||
public float attackRange = 15f; // 攻击范围
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,646 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
{
|
||||
public class CompEnergyLanceTurret : ThingComp
|
||||
{
|
||||
public CompProperties_EnergyLanceTurret Props => (CompProperties_EnergyLanceTurret)props;
|
||||
|
||||
// 状态变量
|
||||
private Pawn currentTarget;
|
||||
private EnergyLance activeLance;
|
||||
private int lastTargetUpdateTick;
|
||||
private int warmupTicksRemaining;
|
||||
private int cooldownTicksRemaining;
|
||||
private bool isActive = false;
|
||||
|
||||
// 位置追踪
|
||||
private IntVec3 lastTargetPosition;
|
||||
private int lastPositionUpdateTick;
|
||||
|
||||
// 调试计数器
|
||||
private int debugTickCounter = 0;
|
||||
private const int DEBUG_LOG_INTERVAL = 120; // 每2秒输出一次调试信息
|
||||
|
||||
// 光束创建保护
|
||||
private int lanceCreationTick = -1;
|
||||
private const int LANCE_GRACE_PERIOD = 60; // 光束创建后的保护期(1秒)
|
||||
|
||||
// 目标丢失保护
|
||||
private int targetLostTick = -1;
|
||||
private const int TARGET_LOST_GRACE_PERIOD = 60; // 目标丢失后的保护期(1秒)
|
||||
|
||||
// 状态追踪
|
||||
private TurretState currentState = TurretState.Idle;
|
||||
|
||||
private enum TurretState
|
||||
{
|
||||
Idle, // 待机
|
||||
WarmingUp, // 预热中
|
||||
Firing, // 发射中
|
||||
CoolingDown // 冷却中
|
||||
}
|
||||
|
||||
public override void PostSpawnSetup(bool respawningAfterLoad)
|
||||
{
|
||||
base.PostSpawnSetup(respawningAfterLoad);
|
||||
|
||||
if (!respawningAfterLoad)
|
||||
{
|
||||
ResetState();
|
||||
}
|
||||
|
||||
Log.Message($"[EnergyLanceTurret] 炮塔生成在 {parent.Position}, 检测范围: {Props.detectionRange}");
|
||||
}
|
||||
|
||||
// 在 StartEnergyLance 方法中修复光束创建逻辑
|
||||
private void StartEnergyLance()
|
||||
{
|
||||
// 双重检查目标有效性
|
||||
if (currentTarget == null || !IsTargetValid(currentTarget))
|
||||
{
|
||||
Log.Warning($"[EnergyLanceTurret] 尝试启动能量光束但目标无效: {(currentTarget == null ? "目标为null" : "目标无效")}");
|
||||
|
||||
// 尝试重新寻找目标
|
||||
var potentialTargets = FindPotentialTargets();
|
||||
if (potentialTargets.Count > 0)
|
||||
{
|
||||
currentTarget = potentialTargets
|
||||
.OrderBy(t => t.Position.DistanceTo(parent.Position))
|
||||
.First();
|
||||
Log.Message($"[EnergyLanceTurret] 重新获取目标: {currentTarget.LabelCap}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Message("[EnergyLanceTurret] 无法重新获取目标,进入冷却");
|
||||
StartCooldown();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// 创建能量光束
|
||||
var lanceDef = Props.energyLanceDef ?? ThingDef.Named("EnergyLance");
|
||||
if (lanceDef == null)
|
||||
{
|
||||
Log.Error("[EnergyLanceTurret] 能量光束定义为空!");
|
||||
StartCooldown();
|
||||
return;
|
||||
}
|
||||
|
||||
Log.Message($"[EnergyLanceTurret] 创建能量光束: {lanceDef.defName} 目标: {currentTarget.LabelCap} 在 {currentTarget.Position}");
|
||||
|
||||
// 关键修复:光束直接在目标位置生成,而不是建筑位置
|
||||
activeLance = EnergyLance.MakeEnergyLance(
|
||||
lanceDef,
|
||||
currentTarget.Position, // 起始位置设置为目标位置
|
||||
currentTarget.Position, // 目标位置也设置为目标位置
|
||||
parent.Map,
|
||||
Props.energyLanceMoveDistance,
|
||||
false, // 不使用固定距离
|
||||
Props.energyLanceDuration,
|
||||
instigatorPawn: null // 建筑作为发起者
|
||||
);
|
||||
|
||||
if (activeLance == null)
|
||||
{
|
||||
Log.Error("[EnergyLanceTurret] 能量光束创建失败!");
|
||||
StartCooldown();
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置光束保护期
|
||||
lanceCreationTick = Find.TickManager.TicksGame;
|
||||
|
||||
// 设置建筑引用
|
||||
if (activeLance is EnergyLance lance)
|
||||
{
|
||||
lance.instigator = parent;
|
||||
}
|
||||
|
||||
lastTargetPosition = currentTarget.Position;
|
||||
lastPositionUpdateTick = Find.TickManager.TicksGame;
|
||||
targetLostTick = -1; // 重置目标丢失计时
|
||||
currentState = TurretState.Firing;
|
||||
|
||||
// 立即更新光束位置,确保光束在正确位置开始
|
||||
UpdateEnergyLancePosition();
|
||||
|
||||
Log.Message($"[EnergyLanceTurret] 能量光束启动成功,追踪目标: {currentTarget.LabelCap}");
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
Log.Error($"[EnergyLanceTurret] 启动能量光束错误: {ex}");
|
||||
StartCooldown();
|
||||
}
|
||||
}
|
||||
// 改进更新光束位置的方法
|
||||
private void UpdateEnergyLancePosition()
|
||||
{
|
||||
if (activeLance == null || activeLance.Destroyed)
|
||||
return;
|
||||
|
||||
// 如果有有效目标,更新光束位置
|
||||
if (currentTarget != null && IsTargetValid(currentTarget))
|
||||
{
|
||||
// 向光束传递目标位置
|
||||
UpdateLanceTargetPosition(currentTarget.Position);
|
||||
|
||||
// 添加更多调试信息
|
||||
if (debugTickCounter % 30 == 0) // 每0.5秒输出一次位置信息
|
||||
{
|
||||
Log.Message($"[EnergyLanceTurret] 更新光束位置: 目标在 {currentTarget.Position}, 光束在 {activeLance.Position}");
|
||||
}
|
||||
}
|
||||
else if (lastTargetPosition.IsValid && Find.TickManager.TicksGame - lastPositionUpdateTick <= Props.targetUpdateInterval * 2)
|
||||
{
|
||||
// 使用最后已知位置
|
||||
UpdateLanceTargetPosition(lastTargetPosition);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 传递空位置
|
||||
UpdateLanceTargetPosition(IntVec3.Invalid);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CompTick()
|
||||
{
|
||||
base.CompTick();
|
||||
|
||||
debugTickCounter++;
|
||||
|
||||
if (parent.Destroyed || parent.Map == null)
|
||||
return;
|
||||
|
||||
// 定期输出调试信息
|
||||
if (debugTickCounter % DEBUG_LOG_INTERVAL == 0)
|
||||
{
|
||||
OutputDebugInfo();
|
||||
}
|
||||
|
||||
// 根据状态处理逻辑
|
||||
switch (currentState)
|
||||
{
|
||||
case TurretState.CoolingDown:
|
||||
HandleCoolingDown();
|
||||
break;
|
||||
case TurretState.WarmingUp:
|
||||
HandleWarmingUp();
|
||||
break;
|
||||
case TurretState.Firing:
|
||||
HandleFiring();
|
||||
break;
|
||||
case TurretState.Idle:
|
||||
HandleIdle();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 处理冷却状态
|
||||
private void HandleCoolingDown()
|
||||
{
|
||||
cooldownTicksRemaining--;
|
||||
|
||||
if (debugTickCounter % 30 == 0) // 每0.5秒输出一次冷却信息
|
||||
{
|
||||
Log.Message($"[EnergyLanceTurret] 冷却中: {cooldownTicksRemaining} ticks 剩余");
|
||||
}
|
||||
|
||||
if (cooldownTicksRemaining <= 0)
|
||||
{
|
||||
Log.Message("[EnergyLanceTurret] 冷却完成,返回待机状态");
|
||||
currentState = TurretState.Idle;
|
||||
isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 处理预热状态
|
||||
private void HandleWarmingUp()
|
||||
{
|
||||
// 在预热过程中持续检查目标有效性
|
||||
if (currentTarget == null || !IsTargetValid(currentTarget))
|
||||
{
|
||||
Log.Message($"[EnergyLanceTurret] 预热过程中目标失效,取消预热");
|
||||
ResetState();
|
||||
return;
|
||||
}
|
||||
|
||||
warmupTicksRemaining--;
|
||||
|
||||
if (debugTickCounter % 10 == 0) // 每0.17秒输出一次预热信息
|
||||
{
|
||||
Log.Message($"[EnergyLanceTurret] 预热中: {warmupTicksRemaining} ticks 剩余, 目标: {currentTarget?.LabelCap ?? "无"}");
|
||||
}
|
||||
|
||||
if (warmupTicksRemaining <= 0)
|
||||
{
|
||||
Log.Message("[EnergyLanceTurret] 预热完成,开始发射光束");
|
||||
StartEnergyLance();
|
||||
}
|
||||
}
|
||||
|
||||
// 处理发射状态
|
||||
private void HandleFiring()
|
||||
{
|
||||
// 检查目标状态
|
||||
if (Find.TickManager.TicksGame - lastTargetUpdateTick >= Props.targetUpdateInterval)
|
||||
{
|
||||
UpdateTarget();
|
||||
lastTargetUpdateTick = Find.TickManager.TicksGame;
|
||||
}
|
||||
|
||||
// 更新光束位置
|
||||
if (activeLance != null && !activeLance.Destroyed)
|
||||
{
|
||||
UpdateEnergyLancePosition();
|
||||
}
|
||||
|
||||
// 检查光束有效性
|
||||
CheckEnergyLanceValidity();
|
||||
}
|
||||
|
||||
// 处理待机状态
|
||||
private void HandleIdle()
|
||||
{
|
||||
// 检查目标状态
|
||||
if (Find.TickManager.TicksGame - lastTargetUpdateTick >= Props.targetUpdateInterval)
|
||||
{
|
||||
UpdateTarget();
|
||||
lastTargetUpdateTick = Find.TickManager.TicksGame;
|
||||
}
|
||||
}
|
||||
|
||||
// 输出调试信息
|
||||
private void OutputDebugInfo()
|
||||
{
|
||||
var targets = FindPotentialTargets();
|
||||
Log.Message($"[EnergyLanceTurret] 调试信息:");
|
||||
Log.Message($" - 状态: {currentState}");
|
||||
Log.Message($" - 当前目标: {currentTarget?.LabelCap ?? "无"}");
|
||||
Log.Message($" - 目标位置: {currentTarget?.Position.ToString() ?? "无"}");
|
||||
Log.Message($" - 活跃光束: {(activeLance != null && !activeLance.Destroyed ? "是" : "否")}");
|
||||
Log.Message($" - 检测到目标数: {targets.Count}");
|
||||
Log.Message($" - 冷却剩余: {cooldownTicksRemaining}");
|
||||
Log.Message($" - 预热剩余: {warmupTicksRemaining}");
|
||||
Log.Message($" - 是否活跃: {isActive}");
|
||||
Log.Message($" - 目标丢失保护: {(targetLostTick >= 0 ? (Find.TickManager.TicksGame - targetLostTick) + " ticks前" : "无")}");
|
||||
Log.Message($" - 光束保护期: {(lanceCreationTick >= 0 ? (Find.TickManager.TicksGame - lanceCreationTick) + " ticks前创建" : "无")}");
|
||||
|
||||
// 输出前3个检测到的目标
|
||||
for (int i = 0; i < Mathf.Min(3, targets.Count); i++)
|
||||
{
|
||||
var target = targets[i];
|
||||
Log.Message($" - 目标{i+1}: {target.LabelCap} 在 {target.Position}, 距离: {target.Position.DistanceTo(parent.Position):F1}");
|
||||
}
|
||||
}
|
||||
|
||||
// 重置状态
|
||||
private void ResetState()
|
||||
{
|
||||
currentTarget = null;
|
||||
activeLance = null;
|
||||
lastTargetUpdateTick = Find.TickManager.TicksGame;
|
||||
warmupTicksRemaining = 0;
|
||||
cooldownTicksRemaining = 0;
|
||||
isActive = false;
|
||||
lanceCreationTick = -1;
|
||||
targetLostTick = -1;
|
||||
currentState = TurretState.Idle;
|
||||
}
|
||||
|
||||
// 更新目标
|
||||
private void UpdateTarget()
|
||||
{
|
||||
Log.Message($"[EnergyLanceTurret] 更新目标检查 - 状态: {currentState}, 活跃光束: {(activeLance != null && !activeLance.Destroyed ? "是" : "否")}");
|
||||
|
||||
// 如果没有光束,寻找新目标
|
||||
if (activeLance == null || activeLance.Destroyed)
|
||||
{
|
||||
FindNewTarget();
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查当前目标是否有效
|
||||
if (currentTarget != null && IsTargetValid(currentTarget))
|
||||
{
|
||||
// 更新目标位置
|
||||
lastTargetPosition = currentTarget.Position;
|
||||
lastPositionUpdateTick = Find.TickManager.TicksGame;
|
||||
targetLostTick = -1; // 重置目标丢失计时
|
||||
Log.Message($"[EnergyLanceTurret] 目标仍然有效: {currentTarget.LabelCap}");
|
||||
return;
|
||||
}
|
||||
|
||||
// 当前目标无效,寻找新目标
|
||||
FindNewTargetForExistingLance();
|
||||
}
|
||||
|
||||
// 寻找新目标(首次)
|
||||
private void FindNewTarget()
|
||||
{
|
||||
Log.Message("[EnergyLanceTurret] 寻找新目标...");
|
||||
|
||||
if (currentState != TurretState.Idle)
|
||||
{
|
||||
Log.Message($"[EnergyLanceTurret] 无法寻找目标 - 当前状态: {currentState}");
|
||||
return;
|
||||
}
|
||||
|
||||
var potentialTargets = FindPotentialTargets();
|
||||
|
||||
if (potentialTargets.Count > 0)
|
||||
{
|
||||
// 选择最近的敌人
|
||||
currentTarget = potentialTargets
|
||||
.OrderBy(t => t.Position.DistanceTo(parent.Position))
|
||||
.First();
|
||||
|
||||
Log.Message($"[EnergyLanceTurret] 发现新目标: {currentTarget.LabelCap} 在 {currentTarget.Position}");
|
||||
|
||||
// 开始预热
|
||||
StartWarmup();
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Message("[EnergyLanceTurret] 没有发现有效目标");
|
||||
}
|
||||
}
|
||||
|
||||
// 为现有光束寻找新目标
|
||||
private void FindNewTargetForExistingLance()
|
||||
{
|
||||
if (activeLance == null || activeLance.Destroyed)
|
||||
return;
|
||||
|
||||
Log.Message("[EnergyLanceTurret] 为现有光束寻找新目标...");
|
||||
|
||||
var potentialTargets = FindPotentialTargets();
|
||||
|
||||
if (potentialTargets.Count > 0)
|
||||
{
|
||||
// 选择离光束最近的敌人
|
||||
currentTarget = potentialTargets
|
||||
.OrderBy(t => t.Position.DistanceTo(activeLance.Position))
|
||||
.First();
|
||||
|
||||
lastTargetPosition = currentTarget.Position;
|
||||
lastPositionUpdateTick = Find.TickManager.TicksGame;
|
||||
targetLostTick = -1; // 重置目标丢失计时
|
||||
|
||||
Log.Message($"[EnergyLanceTurret] 切换到新目标: {currentTarget.LabelCap} 在 {currentTarget.Position}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 没有目标,记录目标丢失时间
|
||||
if (targetLostTick < 0)
|
||||
{
|
||||
targetLostTick = Find.TickManager.TicksGame;
|
||||
Log.Message($"[EnergyLanceTurret] 目标丢失,开始保护期: {TARGET_LOST_GRACE_PERIOD} ticks");
|
||||
}
|
||||
|
||||
currentTarget = null;
|
||||
lastTargetPosition = IntVec3.Invalid;
|
||||
Log.Message("[EnergyLanceTurret] 没有有效目标,发送空位置");
|
||||
}
|
||||
}
|
||||
|
||||
// 寻找潜在目标
|
||||
private List<Pawn> FindPotentialTargets()
|
||||
{
|
||||
var targets = new List<Pawn>();
|
||||
var map = parent.Map;
|
||||
|
||||
if (map == null)
|
||||
return targets;
|
||||
|
||||
// 获取所有在范围内的pawn
|
||||
var allPawnsInRange = map.mapPawns.AllPawnsSpawned
|
||||
.Where(p => p.Position.DistanceTo(parent.Position) <= Props.detectionRange)
|
||||
.ToList();
|
||||
|
||||
foreach (var pawn in allPawnsInRange)
|
||||
{
|
||||
if (IsValidTarget(pawn) && CanShootAtTarget(pawn))
|
||||
{
|
||||
targets.Add(pawn);
|
||||
}
|
||||
}
|
||||
|
||||
return targets;
|
||||
}
|
||||
|
||||
// 检查目标是否有效
|
||||
private bool IsValidTarget(Pawn pawn)
|
||||
{
|
||||
if (pawn == null || pawn.Destroyed || !pawn.Spawned)
|
||||
return false;
|
||||
|
||||
if (pawn.Downed || pawn.Dead)
|
||||
return false;
|
||||
|
||||
// 检查派系关系
|
||||
if (pawn.Faction != null)
|
||||
{
|
||||
bool isHostile = pawn.HostileTo(parent.Faction);
|
||||
bool isNeutral = !pawn.HostileTo(parent.Faction) && pawn.Faction != parent.Faction;
|
||||
|
||||
if (Props.targetHostileFactions && isHostile)
|
||||
return true;
|
||||
else if (Props.targetNeutrals && isNeutral)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 无派系的pawn,检查类型
|
||||
if (pawn.RaceProps.Animal && !Props.targetAnimals)
|
||||
return false;
|
||||
|
||||
if (pawn.RaceProps.IsMechanoid && !Props.targetMechs)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// 检查是否可以射击目标
|
||||
private bool CanShootAtTarget(Pawn target)
|
||||
{
|
||||
if (target == null)
|
||||
return false;
|
||||
|
||||
// 检查视线
|
||||
if (Props.requireLineOfSight)
|
||||
{
|
||||
return GenSight.LineOfSight(parent.Position, target.Position, parent.Map, skipFirstCell: true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 检查目标是否仍然有效
|
||||
private bool IsTargetValid(Pawn target)
|
||||
{
|
||||
return IsValidTarget(target) &&
|
||||
target.Position.DistanceTo(parent.Position) <= Props.detectionRange &&
|
||||
(!Props.requireLineOfSight || GenSight.LineOfSight(parent.Position, target.Position, parent.Map, skipFirstCell: true));
|
||||
}
|
||||
|
||||
// 开始预热
|
||||
private void StartWarmup()
|
||||
{
|
||||
if (currentTarget == null)
|
||||
{
|
||||
Log.Warning("[EnergyLanceTurret] 尝试开始预热但没有目标");
|
||||
return;
|
||||
}
|
||||
|
||||
warmupTicksRemaining = Props.warmupTicks;
|
||||
isActive = true;
|
||||
currentState = TurretState.WarmingUp;
|
||||
|
||||
Log.Message($"[EnergyLanceTurret] 开始预热: {warmupTicksRemaining} ticks, 目标: {currentTarget.LabelCap}");
|
||||
}
|
||||
|
||||
// 更新光束目标位置
|
||||
private void UpdateLanceTargetPosition(IntVec3 targetPos)
|
||||
{
|
||||
if (activeLance == null || activeLance.Destroyed)
|
||||
return;
|
||||
|
||||
// 尝试直接转换为EnergyLance并调用方法
|
||||
if (activeLance is EnergyLance energyLance)
|
||||
{
|
||||
energyLance.UpdateTargetPosition(targetPos);
|
||||
Log.Message($"[EnergyLanceTurret] 更新光束目标: {targetPos}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 使用反射调用更新方法
|
||||
var moveMethod = activeLance.GetType().GetMethod("UpdateTargetPosition");
|
||||
if (moveMethod != null)
|
||||
{
|
||||
moveMethod.Invoke(activeLance, new object[] { targetPos });
|
||||
Log.Message($"[EnergyLanceTurret] 通过反射更新光束目标: {targetPos}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Warning("[EnergyLanceTurret] 无法更新光束目标位置");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 检查光束有效性
|
||||
private void CheckEnergyLanceValidity()
|
||||
{
|
||||
if (activeLance == null || activeLance.Destroyed)
|
||||
{
|
||||
// 光束已销毁,进入冷却
|
||||
Log.Message("[EnergyLanceTurret] 光束已销毁,开始冷却");
|
||||
StartCooldown();
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查光束是否在保护期内
|
||||
if (lanceCreationTick >= 0 && Find.TickManager.TicksGame - lanceCreationTick < LANCE_GRACE_PERIOD)
|
||||
{
|
||||
// 光束还在保护期内,不检查销毁条件
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查目标丢失保护期
|
||||
if (targetLostTick >= 0 && Find.TickManager.TicksGame - targetLostTick > TARGET_LOST_GRACE_PERIOD)
|
||||
{
|
||||
Log.Message("[EnergyLanceTurret] 目标丢失保护期结束,销毁光束");
|
||||
activeLance.Destroy();
|
||||
StartCooldown();
|
||||
return;
|
||||
}
|
||||
|
||||
// 检查光束是否长时间没有收到位置更新
|
||||
if (Find.TickManager.TicksGame - lastPositionUpdateTick > Props.targetUpdateInterval * 3)
|
||||
{
|
||||
Log.Message("[EnergyLanceTurret] 光束长时间未收到位置更新,销毁");
|
||||
activeLance.Destroy();
|
||||
StartCooldown();
|
||||
}
|
||||
}
|
||||
|
||||
// 开始冷却
|
||||
private void StartCooldown()
|
||||
{
|
||||
cooldownTicksRemaining = Props.cooldownTicks;
|
||||
isActive = false;
|
||||
currentTarget = null;
|
||||
activeLance = null;
|
||||
lanceCreationTick = -1;
|
||||
targetLostTick = -1;
|
||||
currentState = TurretState.CoolingDown;
|
||||
|
||||
Log.Message($"[EnergyLanceTurret] 开始冷却: {cooldownTicksRemaining} ticks");
|
||||
}
|
||||
|
||||
// 绘制检测范围
|
||||
public override void PostDraw()
|
||||
{
|
||||
base.PostDraw();
|
||||
|
||||
if (Find.Selector.IsSelected(parent))
|
||||
{
|
||||
// 绘制检测范围
|
||||
GenDraw.DrawRadiusRing(parent.Position, Props.detectionRange, Color.red);
|
||||
|
||||
// 绘制当前目标
|
||||
if (currentTarget != null && !currentTarget.Destroyed)
|
||||
{
|
||||
GenDraw.DrawLineBetween(parent.DrawPos, currentTarget.DrawPos, SimpleColor.Red, 0.2f);
|
||||
GenDraw.DrawTargetHighlight(currentTarget.Position);
|
||||
}
|
||||
|
||||
// 绘制光束状态
|
||||
if (activeLance != null && !activeLance.Destroyed)
|
||||
{
|
||||
GenDraw.DrawLineBetween(parent.DrawPos, activeLance.DrawPos, SimpleColor.Yellow, 0.3f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
|
||||
Scribe_References.Look(ref currentTarget, "currentTarget");
|
||||
Scribe_References.Look(ref activeLance, "activeLance");
|
||||
Scribe_Values.Look(ref lastTargetUpdateTick, "lastTargetUpdateTick", 0);
|
||||
Scribe_Values.Look(ref warmupTicksRemaining, "warmupTicksRemaining", 0);
|
||||
Scribe_Values.Look(ref cooldownTicksRemaining, "cooldownTicksRemaining", 0);
|
||||
Scribe_Values.Look(ref isActive, "isActive", false);
|
||||
Scribe_Values.Look(ref lastTargetPosition, "lastTargetPosition");
|
||||
Scribe_Values.Look(ref lastPositionUpdateTick, "lastPositionUpdateTick", 0);
|
||||
Scribe_Values.Look(ref lanceCreationTick, "lanceCreationTick", -1);
|
||||
Scribe_Values.Look(ref targetLostTick, "targetLostTick", -1);
|
||||
Scribe_Values.Look(ref currentState, "currentState", TurretState.Idle);
|
||||
}
|
||||
|
||||
// 调试信息
|
||||
public override string CompInspectStringExtra()
|
||||
{
|
||||
string baseString = base.CompInspectStringExtra();
|
||||
string status = currentState.ToString();
|
||||
|
||||
string targetInfo = currentTarget != null ? $"\n目标: {currentTarget.LabelCap}" : "";
|
||||
string rangeInfo = $"\n检测范围: {Props.detectionRange}";
|
||||
|
||||
return string.IsNullOrEmpty(baseString) ?
|
||||
$"{status}{targetInfo}{rangeInfo}" :
|
||||
$"{baseString}\n{status}{targetInfo}{rangeInfo}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
|
||||
namespace WulaFallenEmpire
|
||||
{
|
||||
public class CompProperties_EnergyLanceTurret : CompProperties
|
||||
{
|
||||
// 光束配置
|
||||
public ThingDef energyLanceDef; // EnergyLance 定义
|
||||
public int energyLanceDuration = 600; // 光束持续时间
|
||||
public float energyLanceMoveDistance = 15f; // 光束移动距离
|
||||
|
||||
// 目标检测配置
|
||||
public float detectionRange = 30f; // 检测范围
|
||||
|
||||
// 使用现有的 RimWorld 目标类型
|
||||
public bool targetHostileFactions = true; // 目标敌对派系
|
||||
public bool targetNeutrals = false; // 目标中立单位
|
||||
public bool targetAnimals = false; // 目标动物
|
||||
public bool targetMechs = true; // 目标机械单位
|
||||
public bool requireLineOfSight = false; // 需要视线
|
||||
|
||||
// 锁定配置
|
||||
public int targetUpdateInterval = 60; // 目标更新间隔(ticks)
|
||||
public float targetSwitchRange = 25f; // 切换目标的最大距离
|
||||
|
||||
// 光束生成配置
|
||||
public int warmupTicks = 30; // 预热时间
|
||||
public int cooldownTicks = 120; // 冷却时间
|
||||
|
||||
public CompProperties_EnergyLanceTurret()
|
||||
{
|
||||
compClass = typeof(CompEnergyLanceTurret);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,4 +63,16 @@ namespace WulaFallenEmpire
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(WulaStatCategoryDefOf));
|
||||
}
|
||||
}
|
||||
|
||||
[DefOf]
|
||||
public static class WulaDamageDefOf
|
||||
{
|
||||
public static DamageDef Wula_Dark_Matter_Flame;
|
||||
|
||||
static WulaDamageDefOf()
|
||||
{
|
||||
DefOfHelper.EnsureInitializedInCtor(typeof(WulaDamageDefOf));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -81,12 +81,14 @@
|
||||
<Compile Include="Ability\WULA_AbilityEnergyLance\CompProperties_AbilityEnergyLance.cs" />
|
||||
<Compile Include="Ability\WULA_AbilityEnergyLance\EnergyLance.cs" />
|
||||
<Compile Include="Ability\WULA_AbilityEnergyLance\EnergyLanceExtension.cs" />
|
||||
<Compile Include="Ability\WULA_AbilitySurveillanceBombardment\CompAbilityEffect_CallSkyfaller.cs" />
|
||||
<Compile Include="Ability\WULA_AbilitySurveillanceBombardment\CompBuildingBombardment.cs" />
|
||||
<Compile Include="Ability\WULA_AbilitySurveillanceBombardment\CompProperties_AbilityCallSkyfaller.cs" />
|
||||
<Compile Include="Ability\WULA_AbilitySurveillanceBombardment\CompProperties_BuildingBombardment.cs" />
|
||||
<Compile Include="Ability\WULA_AbilitySurveillanceBombardment\MapComponent_SkyfallerDelayed.cs" />
|
||||
<Compile Include="Ability\WULA_AbilityCallSkyfaller\CompAbilityEffect_CallSkyfaller.cs" />
|
||||
<Compile Include="BuildingComp\WULA_BuildingBombardment\CompBuildingBombardment.cs" />
|
||||
<Compile Include="Ability\WULA_AbilityCallSkyfaller\CompProperties_AbilityCallSkyfaller.cs" />
|
||||
<Compile Include="BuildingComp\WULA_BuildingBombardment\CompProperties_BuildingBombardment.cs" />
|
||||
<Compile Include="Ability\WULA_AbilityCallSkyfaller\MapComponent_SkyfallerDelayed.cs" />
|
||||
<Compile Include="BuildingComp\Building_TurretGunHasSpeed.cs" />
|
||||
<Compile Include="BuildingComp\WULA_EnergyLanceTurret\CompEnergyLanceTurret.cs" />
|
||||
<Compile Include="BuildingComp\WULA_EnergyLanceTurret\CompProperties_EnergyLanceTurret.cs" />
|
||||
<Compile Include="BuildingComp\WULA_InitialFaction\CompProperties_InitialFaction.cs" />
|
||||
<Compile Include="BuildingComp\WULA_MechanoidRecycler\Building_MechanoidRecycler.cs" />
|
||||
<Compile Include="BuildingComp\WULA_MechanoidRecycler\CompProperties_MechanoidRecycler.cs" />
|
||||
|
||||