1
@@ -614,7 +614,7 @@
|
|||||||
<kindDef>Combat</kindDef>
|
<kindDef>Combat</kindDef>
|
||||||
<commonality>100</commonality>
|
<commonality>100</commonality>
|
||||||
<options>
|
<options>
|
||||||
<Wula_PIA_Heavy_Unit>1</Wula_PIA_Heavy_Unit>
|
<Wula_PIA_Heavy_Unit_Melee>1</Wula_PIA_Heavy_Unit_Melee>
|
||||||
</options>
|
</options>
|
||||||
</li>
|
</li>
|
||||||
</pawnGroupMakers>
|
</pawnGroupMakers>
|
||||||
|
|||||||
@@ -45,4 +45,14 @@
|
|||||||
<alwaysShowWeapon>false</alwaysShowWeapon>
|
<alwaysShowWeapon>false</alwaysShowWeapon>
|
||||||
<casualInterruptible>false</casualInterruptible>
|
<casualInterruptible>false</casualInterruptible>
|
||||||
</JobDef>
|
</JobDef>
|
||||||
|
|
||||||
|
<JobDef>
|
||||||
|
<defName>WULA_CastAbilityOnThingMelee_WithWeapon</defName>
|
||||||
|
<driverClass>JobDriver_CastAbilityMelee</driverClass>
|
||||||
|
<casualInterruptible>false</casualInterruptible>
|
||||||
|
<collideWithPawns>true</collideWithPawns>
|
||||||
|
<alwaysShowWeapon>true</alwaysShowWeapon>
|
||||||
|
<tryStartFlying>true</tryStartFlying>
|
||||||
|
<overrideFlyChance>1</overrideFlyChance>
|
||||||
|
</JobDef>
|
||||||
</Defs>
|
</Defs>
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
</PawnKindDef>
|
</PawnKindDef>
|
||||||
<PawnKindDef>
|
<PawnKindDef>
|
||||||
<defName>Wula_PIA_Heavy_Unit</defName>
|
<defName>Wula_PIA_Heavy_Unit</defName>
|
||||||
<label>军团重装步兵</label>
|
<label>军团步兵</label>
|
||||||
<race>WulaSpecies</race>
|
<race>WulaSpecies</race>
|
||||||
<lifeStages>
|
<lifeStages>
|
||||||
<li>
|
<li>
|
||||||
@@ -429,6 +429,119 @@
|
|||||||
</li>
|
</li>
|
||||||
</backstoryFiltersOverride>
|
</backstoryFiltersOverride>
|
||||||
</PawnKindDef>
|
</PawnKindDef>
|
||||||
|
<PawnKindDef>
|
||||||
|
<defName>Wula_PIA_Heavy_Unit_Melee</defName>
|
||||||
|
<label>军团破阵步兵</label>
|
||||||
|
<race>WulaSpecies</race>
|
||||||
|
<lifeStages>
|
||||||
|
<li>
|
||||||
|
<bodyGraphicData>
|
||||||
|
<texPath>Wula/Item/WULA_Species_Icon</texPath>
|
||||||
|
<maskPath>SRA/Pawn/Mechanoid/AllegianceOverlays/None</maskPath>
|
||||||
|
<shaderType>CutoutWithOverlay</shaderType>
|
||||||
|
<graphicClass>Graphic_Multi</graphicClass>
|
||||||
|
<drawSize>1</drawSize>
|
||||||
|
<shadowData>
|
||||||
|
<volume>(0.2, 0.3, 0.2)</volume>
|
||||||
|
</shadowData>
|
||||||
|
</bodyGraphicData>
|
||||||
|
</li>
|
||||||
|
</lifeStages>
|
||||||
|
<minGenerationAge>18</minGenerationAge>
|
||||||
|
<maxGenerationAge>20</maxGenerationAge>
|
||||||
|
<combatPower>500</combatPower>
|
||||||
|
<initialWillRange>10~20</initialWillRange>
|
||||||
|
<initialResistanceRange>10~20</initialResistanceRange>
|
||||||
|
<itemQuality>Poor</itemQuality>
|
||||||
|
<minApparelQuality>Poor</minApparelQuality>
|
||||||
|
<maxApparelQuality>Poor</maxApparelQuality>
|
||||||
|
<isFighter>true</isFighter>
|
||||||
|
<apparelTags>
|
||||||
|
<li>Wula_Armor_Super_Heavy</li>
|
||||||
|
<li>Wula_Armor_Shield</li>
|
||||||
|
</apparelTags>
|
||||||
|
<weaponTags>
|
||||||
|
<li>Wula_Melee_Weapon_T3</li>
|
||||||
|
</weaponTags>
|
||||||
|
<apparelRequired>
|
||||||
|
<li>WULA_Heavy_Infantry_PowerArmor</li>
|
||||||
|
<li>WULA_Heavy_Infantry_Helmet</li>
|
||||||
|
</apparelRequired>
|
||||||
|
<weaponMoney>90000~350000</weaponMoney>
|
||||||
|
<biocodeWeaponChance>1</biocodeWeaponChance>
|
||||||
|
<apparelAllowHeadgearChance>1</apparelAllowHeadgearChance>
|
||||||
|
<techHediffsChance>1</techHediffsChance>
|
||||||
|
<apparelMoney>999999~999999</apparelMoney>
|
||||||
|
<techHediffsMoney>999999~999999</techHediffsMoney>
|
||||||
|
<techHediffsRequired>
|
||||||
|
<li>WULA_AutoJumpdrive</li>
|
||||||
|
<li>DeathAcidifier</li>
|
||||||
|
</techHediffsRequired>
|
||||||
|
|
||||||
|
<backstoryFiltersOverride>
|
||||||
|
<li>
|
||||||
|
<categories>
|
||||||
|
<li>Wula_Backstory_Categories</li>
|
||||||
|
</categories>
|
||||||
|
</li>
|
||||||
|
</backstoryFiltersOverride>
|
||||||
|
</PawnKindDef>
|
||||||
|
<PawnKindDef>
|
||||||
|
<defName>Wula_PIA_Heavy_Unit_Range</defName>
|
||||||
|
<label>军团重装步兵</label>
|
||||||
|
<race>WulaSpecies</race>
|
||||||
|
<lifeStages>
|
||||||
|
<li>
|
||||||
|
<bodyGraphicData>
|
||||||
|
<texPath>Wula/Item/WULA_Species_Icon</texPath>
|
||||||
|
<maskPath>SRA/Pawn/Mechanoid/AllegianceOverlays/None</maskPath>
|
||||||
|
<shaderType>CutoutWithOverlay</shaderType>
|
||||||
|
<graphicClass>Graphic_Multi</graphicClass>
|
||||||
|
<drawSize>1</drawSize>
|
||||||
|
<shadowData>
|
||||||
|
<volume>(0.2, 0.3, 0.2)</volume>
|
||||||
|
</shadowData>
|
||||||
|
</bodyGraphicData>
|
||||||
|
</li>
|
||||||
|
</lifeStages>
|
||||||
|
<minGenerationAge>18</minGenerationAge>
|
||||||
|
<maxGenerationAge>20</maxGenerationAge>
|
||||||
|
<combatPower>500</combatPower>
|
||||||
|
<initialWillRange>10~20</initialWillRange>
|
||||||
|
<initialResistanceRange>10~20</initialResistanceRange>
|
||||||
|
<itemQuality>Poor</itemQuality>
|
||||||
|
<minApparelQuality>Poor</minApparelQuality>
|
||||||
|
<maxApparelQuality>Poor</maxApparelQuality>
|
||||||
|
<isFighter>true</isFighter>
|
||||||
|
<apparelTags>
|
||||||
|
<li>Wula_Armor_Super_Heavy</li>
|
||||||
|
</apparelTags>
|
||||||
|
<weaponTags>
|
||||||
|
<li>Wula_Ranged_Weapon_T3</li>
|
||||||
|
</weaponTags>
|
||||||
|
<apparelRequired>
|
||||||
|
<li>WULA_Heavy_Infantry_PowerArmor</li>
|
||||||
|
<li>WULA_Heavy_Infantry_Helmet</li>
|
||||||
|
</apparelRequired>
|
||||||
|
<weaponMoney>90000~350000</weaponMoney>
|
||||||
|
<biocodeWeaponChance>1</biocodeWeaponChance>
|
||||||
|
<apparelAllowHeadgearChance>1</apparelAllowHeadgearChance>
|
||||||
|
<techHediffsChance>1</techHediffsChance>
|
||||||
|
<apparelMoney>999999~999999</apparelMoney>
|
||||||
|
<techHediffsMoney>999999~999999</techHediffsMoney>
|
||||||
|
<techHediffsRequired>
|
||||||
|
<li>WULA_AutoJumpdrive</li>
|
||||||
|
<li>DeathAcidifier</li>
|
||||||
|
</techHediffsRequired>
|
||||||
|
|
||||||
|
<backstoryFiltersOverride>
|
||||||
|
<li>
|
||||||
|
<categories>
|
||||||
|
<li>Wula_Backstory_Categories</li>
|
||||||
|
</categories>
|
||||||
|
</li>
|
||||||
|
</backstoryFiltersOverride>
|
||||||
|
</PawnKindDef>
|
||||||
|
|
||||||
<!-- 上司 -->
|
<!-- 上司 -->
|
||||||
<PawnKindDef>
|
<PawnKindDef>
|
||||||
|
|||||||
@@ -198,10 +198,21 @@
|
|||||||
<!-- 舰队许可 -->
|
<!-- 舰队许可 -->
|
||||||
<ResearchProjectDef ParentName="WULAtechBase">
|
<ResearchProjectDef ParentName="WULAtechBase">
|
||||||
<defName>WULA_Aircraft_Carrier_Technology</defName>
|
<defName>WULA_Aircraft_Carrier_Technology</defName>
|
||||||
<label>舰队调配许可</label>
|
<label>攻击舰队调配许可</label>
|
||||||
<description>允许殖民地建立信标增加航空舰配额,并使得机械乌拉可以调频天线以申请舰队空中支援,包含2艘可以发起轨道炮击的巡洋舰和1艘可以提供航空器支援的航空舰。</description>
|
<description>允许殖民地建立信标增加攻击舰队配额,并使得机械乌拉可以调频天线以申请舰队空中支援,包含2艘可以发起轨道炮击的巡洋舰和1艘可以提供航空器支援的航空舰。</description>
|
||||||
<baseCost>600</baseCost>
|
<baseCost>600</baseCost>
|
||||||
<researchViewX>5.00</researchViewX>
|
<researchViewX>6.00</researchViewX>
|
||||||
|
<researchViewY>4.40</researchViewY>
|
||||||
|
<prerequisites>
|
||||||
|
<li>WULA_Colony_License_LV2_Technology</li>
|
||||||
|
</prerequisites>
|
||||||
|
</ResearchProjectDef>
|
||||||
|
<ResearchProjectDef ParentName="WULAtechBase">
|
||||||
|
<defName>WULA_ConstructionShip_Technology</defName>
|
||||||
|
<label>拒止舰队调配许可</label>
|
||||||
|
<description>允许殖民地建立信标增加拒止舰队配额,并使得机械乌拉可以调频天线以申请舰队空中支援,包含1艘可以提供轨道支援的拒止舰。</description>
|
||||||
|
<baseCost>600</baseCost>
|
||||||
|
<researchViewX>6.00</researchViewX>
|
||||||
<researchViewY>3.80</researchViewY>
|
<researchViewY>3.80</researchViewY>
|
||||||
<prerequisites>
|
<prerequisites>
|
||||||
<li>WULA_Colony_License_LV2_Technology</li>
|
<li>WULA_Colony_License_LV2_Technology</li>
|
||||||
@@ -336,8 +347,8 @@
|
|||||||
</ResearchProjectDef>
|
</ResearchProjectDef>
|
||||||
<ResearchProjectDef ParentName="WULAtechBase">
|
<ResearchProjectDef ParentName="WULAtechBase">
|
||||||
<defName>WULA_DarkEnergy_Generators_Technology</defName>
|
<defName>WULA_DarkEnergy_Generators_Technology</defName>
|
||||||
<researchViewX>9.00</researchViewX>
|
<researchViewX>10.00</researchViewX>
|
||||||
<researchViewY>3.80</researchViewY>
|
<researchViewY>2.70</researchViewY>
|
||||||
<label>暗物质发电空投许可</label>
|
<label>暗物质发电空投许可</label>
|
||||||
<description>允许殖民地申请空投暗物质发电机,一种输出功率极为恐怖却非常消耗资源的发电机。</description>
|
<description>允许殖民地申请空投暗物质发电机,一种输出功率极为恐怖却非常消耗资源的发电机。</description>
|
||||||
<baseCost>600</baseCost>
|
<baseCost>600</baseCost>
|
||||||
|
|||||||
@@ -2184,7 +2184,7 @@
|
|||||||
<graphicData>
|
<graphicData>
|
||||||
<texPath>Wula/Building/Flag/WULA_Flag_Building_Mount_Incoming</texPath>
|
<texPath>Wula/Building/Flag/WULA_Flag_Building_Mount_Incoming</texPath>
|
||||||
<graphicClass>Graphic_Single</graphicClass>
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
<shaderType>TransparentPostLight</shaderType>
|
<shaderType>MoteGlow</shaderType>
|
||||||
<drawSize>(1,1)</drawSize>
|
<drawSize>(1,1)</drawSize>
|
||||||
<damageData>
|
<damageData>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
@@ -2220,7 +2220,7 @@
|
|||||||
<description>乌拉帝国行星封锁机关的全息旗帜,除了宣誓主权外,也能激励附近的乌拉星人更加凶狠地战斗。</description>
|
<description>乌拉帝国行星封锁机关的全息旗帜,除了宣誓主权外,也能激励附近的乌拉星人更加凶狠地战斗。</description>
|
||||||
<thingClass>WulaFallenEmpire.Building_ExtraGraphics</thingClass>
|
<thingClass>WulaFallenEmpire.Building_ExtraGraphics</thingClass>
|
||||||
<preventDroppingThingsOn>true</preventDroppingThingsOn>
|
<preventDroppingThingsOn>true</preventDroppingThingsOn>
|
||||||
<altitudeLayer>BuildingOnTop</altitudeLayer>
|
<altitudeLayer>Building</altitudeLayer>
|
||||||
<pathCost>50</pathCost>
|
<pathCost>50</pathCost>
|
||||||
<blockWind>true</blockWind>
|
<blockWind>true</blockWind>
|
||||||
<passability>PassThroughOnly</passability>
|
<passability>PassThroughOnly</passability>
|
||||||
@@ -2271,15 +2271,17 @@
|
|||||||
<graphicLayers>
|
<graphicLayers>
|
||||||
<li>
|
<li>
|
||||||
<texturePath>Wula/Building/Flag/WULA_Flag_Building_A</texturePath>
|
<texturePath>Wula/Building/Flag/WULA_Flag_Building_A</texturePath>
|
||||||
|
<shaderName>MoteGlow</shaderName>
|
||||||
<scale>(3,3)</scale>
|
<scale>(3,3)</scale>
|
||||||
<drawOrder>0</drawOrder>
|
<drawOrder>0</drawOrder>
|
||||||
<offset>(0,1,3)</offset>
|
<offset>(0,1,2)</offset>
|
||||||
<hoverSpeed>1.5</hoverSpeed> <!-- 比全局慢 -->
|
<hoverSpeed>1.5</hoverSpeed> <!-- 比全局慢 -->
|
||||||
<hoverIntensity>0.2</hoverIntensity> <!-- 比全局弱 -->
|
<hoverIntensity>0.2</hoverIntensity> <!-- 比全局弱 -->
|
||||||
<hoverPhase>0</hoverPhase>
|
<hoverPhase>0</hoverPhase>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<texturePath>Wula/Building/Flag/WULA_Flag_Building_Mount</texturePath>
|
<texturePath>Wula/Building/Flag/WULA_Flag_Building_Mount</texturePath>
|
||||||
|
<shaderName>Transparent</shaderName>
|
||||||
<scale>(1,1)</scale>
|
<scale>(1,1)</scale>
|
||||||
<drawOrder>1</drawOrder>
|
<drawOrder>1</drawOrder>
|
||||||
<offset>(0,1,0)</offset>
|
<offset>(0,1,0)</offset>
|
||||||
@@ -2327,6 +2329,37 @@
|
|||||||
<defName>WULA_Support_Shield</defName>
|
<defName>WULA_Support_Shield</defName>
|
||||||
<label>P.I.A全息旗帜附拒止护盾</label>
|
<label>P.I.A全息旗帜附拒止护盾</label>
|
||||||
<description>乌拉帝国行星封锁机关的全息旗帜,除了宣誓主权外,也能激励附近的乌拉星人更加凶狠地战斗。这面旗帜的底座附带了一个大型拒止护盾,可以反射所有的敌方射弹,己方的开火不受影响。\n\n在工作一段时间后,该系统将自行烧毁。</description>
|
<description>乌拉帝国行星封锁机关的全息旗帜,除了宣誓主权外,也能激励附近的乌拉星人更加凶狠地战斗。这面旗帜的底座附带了一个大型拒止护盾,可以反射所有的敌方射弹,己方的开火不受影响。\n\n在工作一段时间后,该系统将自行烧毁。</description>
|
||||||
|
|
||||||
|
<modExtensions Inherit="False">
|
||||||
|
<li Class="WulaFallenEmpire.ExtraGraphicsExtension">
|
||||||
|
<globalHoverSpeed>0</globalHoverSpeed>
|
||||||
|
<globalHoverIntensity>0</globalHoverIntensity>
|
||||||
|
|
||||||
|
<graphicLayers>
|
||||||
|
<li>
|
||||||
|
<texturePath>Wula/Building/Flag/WULA_Flag_Building_B</texturePath>
|
||||||
|
<shaderName>MoteGlow</shaderName>
|
||||||
|
<scale>(3,3)</scale>
|
||||||
|
<drawOrder>0</drawOrder>
|
||||||
|
<offset>(0,1,2)</offset>
|
||||||
|
<hoverSpeed>1.5</hoverSpeed> <!-- 比全局慢 -->
|
||||||
|
<hoverIntensity>0.2</hoverIntensity> <!-- 比全局弱 -->
|
||||||
|
<hoverPhase>0</hoverPhase>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<texturePath>Wula/Building/Flag/WULA_Flag_Building_Mount</texturePath>
|
||||||
|
<shaderName>Transparent</shaderName>
|
||||||
|
<scale>(1,1)</scale>
|
||||||
|
<drawOrder>1</drawOrder>
|
||||||
|
<offset>(0,1,0)</offset>
|
||||||
|
<hoverSpeed>0</hoverSpeed> <!-- 比全局慢 -->
|
||||||
|
<hoverIntensity>0</hoverIntensity> <!-- 比全局弱 -->
|
||||||
|
<hoverPhase>0</hoverPhase>
|
||||||
|
</li>
|
||||||
|
</graphicLayers>
|
||||||
|
</li>
|
||||||
|
</modExtensions>
|
||||||
|
|
||||||
<comps>
|
<comps>
|
||||||
<li Class="CompProperties_Lifespan">
|
<li Class="CompProperties_Lifespan">
|
||||||
<lifespanTicks>3600</lifespanTicks>
|
<lifespanTicks>3600</lifespanTicks>
|
||||||
@@ -2371,6 +2404,37 @@
|
|||||||
<defName>WULA_Support_AreaTeleporter</defName>
|
<defName>WULA_Support_AreaTeleporter</defName>
|
||||||
<label>P.I.A全息旗帜附区域传送器</label>
|
<label>P.I.A全息旗帜附区域传送器</label>
|
||||||
<description>乌拉帝国行星封锁机关的全息旗帜,除了宣誓主权外,也能激励附近的乌拉星人更加凶狠地战斗。这面旗帜的底座附带了一个区域传送器,可以使得机械乌拉在旗帜区域内传送。\n\n在工作一段时间后,该系统将自行烧毁。</description>
|
<description>乌拉帝国行星封锁机关的全息旗帜,除了宣誓主权外,也能激励附近的乌拉星人更加凶狠地战斗。这面旗帜的底座附带了一个区域传送器,可以使得机械乌拉在旗帜区域内传送。\n\n在工作一段时间后,该系统将自行烧毁。</description>
|
||||||
|
|
||||||
|
<modExtensions Inherit="False">
|
||||||
|
<li Class="WulaFallenEmpire.ExtraGraphicsExtension">
|
||||||
|
<globalHoverSpeed>0</globalHoverSpeed>
|
||||||
|
<globalHoverIntensity>0</globalHoverIntensity>
|
||||||
|
|
||||||
|
<graphicLayers>
|
||||||
|
<li>
|
||||||
|
<texturePath>Wula/Building/Flag/WULA_Flag_Building_C</texturePath>
|
||||||
|
<shaderName>MoteGlow</shaderName>
|
||||||
|
<scale>(3,3)</scale>
|
||||||
|
<drawOrder>0</drawOrder>
|
||||||
|
<offset>(0,1,2)</offset>
|
||||||
|
<hoverSpeed>1.5</hoverSpeed> <!-- 比全局慢 -->
|
||||||
|
<hoverIntensity>0.2</hoverIntensity> <!-- 比全局弱 -->
|
||||||
|
<hoverPhase>0</hoverPhase>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<texturePath>Wula/Building/Flag/WULA_Flag_Building_Mount</texturePath>
|
||||||
|
<shaderName>Transparent</shaderName>
|
||||||
|
<scale>(1,1)</scale>
|
||||||
|
<drawOrder>1</drawOrder>
|
||||||
|
<offset>(0,1,0)</offset>
|
||||||
|
<hoverSpeed>0</hoverSpeed> <!-- 比全局慢 -->
|
||||||
|
<hoverIntensity>0</hoverIntensity> <!-- 比全局弱 -->
|
||||||
|
<hoverPhase>0</hoverPhase>
|
||||||
|
</li>
|
||||||
|
</graphicLayers>
|
||||||
|
</li>
|
||||||
|
</modExtensions>
|
||||||
|
|
||||||
<comps>
|
<comps>
|
||||||
<li Class="WulaFallenEmpire.CompProperties_CustomRadius">
|
<li Class="WulaFallenEmpire.CompProperties_CustomRadius">
|
||||||
<radius>20</radius> <!-- 半径大小 -->
|
<radius>20</radius> <!-- 半径大小 -->
|
||||||
|
|||||||
@@ -286,6 +286,118 @@
|
|||||||
<combatLogRulesMiss>Maneuver_Slash_MeleeMiss</combatLogRulesMiss>
|
<combatLogRulesMiss>Maneuver_Slash_MeleeMiss</combatLogRulesMiss>
|
||||||
<combatLogRulesDodge>Maneuver_Slash_MeleeDodge</combatLogRulesDodge>
|
<combatLogRulesDodge>Maneuver_Slash_MeleeDodge</combatLogRulesDodge>
|
||||||
</ManeuverDef>
|
</ManeuverDef>
|
||||||
|
<ThingDef ParentName="WULA_ExperienceCore_Weapon_Melee">
|
||||||
|
<defName>WULA_MW_Twohanded_ChainBroadsword</defName>
|
||||||
|
<label>CBs-25"地狱牙"</label>
|
||||||
|
<description>一把需要双手才能拿起的巨型链锯刀,这种恐怖的近战武器一击就可以造成大量伤口,甚至将对手劈成两段。它的刀头装备了一台微型相位引擎,可以挥出斩裂空间的一刀,然后瞬间移动到目标面前。</description>
|
||||||
|
<graphicData>
|
||||||
|
<texPath>Wula/Weapon/WULA_MW_Twohanded_ChainBroadsword/WULA_MW_Twohanded_ChainBroadsword</texPath>
|
||||||
|
<shaderType>CutoutComplex</shaderType>
|
||||||
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
|
<drawSize>1.5</drawSize>
|
||||||
|
</graphicData>
|
||||||
|
<equippedAngleOffset>25</equippedAngleOffset>
|
||||||
|
<weaponTags Inherit="False">
|
||||||
|
<li>Wula_Melee_Weapon_T3</li>
|
||||||
|
</weaponTags>
|
||||||
|
<uiIconScale>0.8</uiIconScale>
|
||||||
|
<techLevel>Spacer</techLevel>
|
||||||
|
<costStuffCount>0</costStuffCount>
|
||||||
|
<stuffCategories>
|
||||||
|
<li>Metallic</li>
|
||||||
|
</stuffCategories>
|
||||||
|
<statBases>
|
||||||
|
<!-- <MarketValue>441</MarketValue> -->
|
||||||
|
<WorkToMake>4000</WorkToMake>
|
||||||
|
<Mass>20</Mass>
|
||||||
|
</statBases>
|
||||||
|
<costList Inherit="False">
|
||||||
|
<WULA_Neutronium>12</WULA_Neutronium>
|
||||||
|
<WULA_Dark_Matter_Item>12</WULA_Dark_Matter_Item>
|
||||||
|
<Plasteel>80</Plasteel>
|
||||||
|
</costList>
|
||||||
|
<tools Inherit="False">
|
||||||
|
<li>
|
||||||
|
<label>链锯</label>
|
||||||
|
<capacities>
|
||||||
|
<li>WULA_MW_ChainSword_MultiStrike</li>
|
||||||
|
</capacities>
|
||||||
|
<armorPenetration>1.75</armorPenetration>
|
||||||
|
<power>35</power>
|
||||||
|
<cooldownTime>2</cooldownTime>
|
||||||
|
<soundMeleeHit>WULA_MW_ChainSword_Hit</soundMeleeHit>
|
||||||
|
<soundMeleeMiss>WULA_MW_ChainSword_Hit</soundMeleeMiss>
|
||||||
|
</li>
|
||||||
|
</tools>
|
||||||
|
<recipeMaker>
|
||||||
|
<recipeUsers Inherit="False">
|
||||||
|
<li>WULA_WeaponArmor_Productor</li>
|
||||||
|
</recipeUsers>
|
||||||
|
<researchPrerequisite>WULA_Synth_Weapon_3_Melee_Technology</researchPrerequisite>
|
||||||
|
<skillRequirements>
|
||||||
|
<Crafting>7</Crafting>
|
||||||
|
</skillRequirements>
|
||||||
|
<displayPriority>450</displayPriority>
|
||||||
|
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
|
||||||
|
</recipeMaker>
|
||||||
|
<comps>
|
||||||
|
<li Class="WulaFallenEmpire.CompProperties_WeaponRenderDynamic">
|
||||||
|
<TexturePath>Wula/Weapon/WULA_MW_Twohanded_ChainBroadsword/WULA_MW_Twohanded_ChainBroadsword_Anim</TexturePath>
|
||||||
|
<totalFrames>8</totalFrames>
|
||||||
|
<ticksPerFrame>8</ticksPerFrame>
|
||||||
|
</li>
|
||||||
|
<li Class="WulaFallenEmpire.CompProperties_MultiStrike">
|
||||||
|
<strikeCount>8~12</strikeCount>
|
||||||
|
<damageMultiplierPerStrike>0.2</damageMultiplierPerStrike>
|
||||||
|
</li>
|
||||||
|
<li Class="CompProperties_EquippableAbilityReloadable">
|
||||||
|
<abilityDef>WULA_MW_Twohanded_ChainBroadsword_Ability</abilityDef>
|
||||||
|
<chargeNoun>传送核心</chargeNoun>
|
||||||
|
</li>
|
||||||
|
</comps>
|
||||||
|
</ThingDef>
|
||||||
|
<AbilityDef>
|
||||||
|
<defName>WULA_MW_Twohanded_ChainBroadsword_Ability</defName>
|
||||||
|
<label>短距离跃迁</label>
|
||||||
|
<description>使用CBs-25"地狱牙"刀头的相位引擎立刻折跃至一个新的位置——这种折跃引擎只能折跃小型目标,如果持刀者体型大于1则无法发起传送。</description>
|
||||||
|
<iconPath>UI/Abilities/Skip</iconPath>
|
||||||
|
<writeCombatLog>True</writeCombatLog>
|
||||||
|
<showPsycastEffects>False</showPsycastEffects>
|
||||||
|
<casterMustBeCapableOfViolence>false</casterMustBeCapableOfViolence>
|
||||||
|
<cooldownTicksRange>200</cooldownTicksRange>
|
||||||
|
<warmupEffecter>HoraxianSpellLight_Warmup</warmupEffecter>
|
||||||
|
<aiCanUse>true</aiCanUse>
|
||||||
|
<verbProperties>
|
||||||
|
<verbClass>Verb_CastAbility</verbClass>
|
||||||
|
<warmupTime>1</warmupTime>
|
||||||
|
<range>30</range>
|
||||||
|
<soundCast>WULA_Psi_Skip_Sound</soundCast>
|
||||||
|
<requireLineOfSight>false</requireLineOfSight>
|
||||||
|
<targetParams>
|
||||||
|
<canTargetLocations>true</canTargetLocations>
|
||||||
|
</targetParams>
|
||||||
|
</verbProperties>
|
||||||
|
<comps>
|
||||||
|
<li Class="WulaFallenEmpire.CompProperties_AbilityTeleportSelf">
|
||||||
|
<range>30</range>
|
||||||
|
<stunTicks>
|
||||||
|
<min>0</min>
|
||||||
|
<max>0</max>
|
||||||
|
</stunTicks>
|
||||||
|
<maxBodySize>1</maxBodySize>
|
||||||
|
<destClamorType>Impact</destClamorType>
|
||||||
|
<destClamorRadius>3</destClamorRadius>
|
||||||
|
<requireLineOfSight>false</requireLineOfSight>
|
||||||
|
<canTeleportToFogged>false</canTeleportToFogged>
|
||||||
|
<canTeleportToRoofed>true</canTeleportToRoofed>
|
||||||
|
|
||||||
|
<customEntryEffecter>Skip_Entry</customEntryEffecter>
|
||||||
|
<customExitEffecter>Skip_Exit</customExitEffecter>
|
||||||
|
<!-- <customEntryFleck>WULA_GiantTeleportFlash</customEntryFleck>
|
||||||
|
<customExitFleck>WULA_GiantTeleportRings</customExitFleck> -->
|
||||||
|
</li>
|
||||||
|
</comps>
|
||||||
|
</AbilityDef>
|
||||||
<ThingDef ParentName="WULA_ExperienceCore_Weapon_Melee">
|
<ThingDef ParentName="WULA_ExperienceCore_Weapon_Melee">
|
||||||
<defName>WULA_MW_Breaker_Bar</defName>
|
<defName>WULA_MW_Breaker_Bar</defName>
|
||||||
<label>PMb-97"破墙槌"</label>
|
<label>PMb-97"破墙槌"</label>
|
||||||
@@ -368,6 +480,10 @@
|
|||||||
<max>1</max>
|
<max>1</max>
|
||||||
</numTraitsRange>
|
</numTraitsRange>
|
||||||
</li>
|
</li>
|
||||||
|
<li Class="CompProperties_EquippableAbilityReloadable">
|
||||||
|
<abilityDef>WULA_MW_Breaker_Bar_Ability</abilityDef>
|
||||||
|
<chargeNoun>助推器</chargeNoun>
|
||||||
|
</li>
|
||||||
</comps>
|
</comps>
|
||||||
</ThingDef>
|
</ThingDef>
|
||||||
<ToolCapacityDef>
|
<ToolCapacityDef>
|
||||||
@@ -387,6 +503,45 @@
|
|||||||
<combatLogRulesMiss>Maneuver_Slash_MeleeMiss</combatLogRulesMiss>
|
<combatLogRulesMiss>Maneuver_Slash_MeleeMiss</combatLogRulesMiss>
|
||||||
<combatLogRulesDodge>Maneuver_Slash_MeleeDodge</combatLogRulesDodge>
|
<combatLogRulesDodge>Maneuver_Slash_MeleeDodge</combatLogRulesDodge>
|
||||||
</ManeuverDef>
|
</ManeuverDef>
|
||||||
|
<AbilityDef ParentName="AbilityTouchBase">
|
||||||
|
<defName>WULA_MW_Breaker_Bar_Ability</defName>
|
||||||
|
<label>全功率上挑</label>
|
||||||
|
<description>将PMb-97"破墙槌"的锤头加到最大压强,随后挥出向上的一击,以突破严密的人墙。即使敌人侥幸存活,也会眩晕并被砸飞出一段距离。</description>
|
||||||
|
<iconPath>UI/Abilities/UnnaturalHealing</iconPath>
|
||||||
|
<cooldownTicksRange>300</cooldownTicksRange> <!-- 6 days -->
|
||||||
|
<showPsycastEffects>false</showPsycastEffects>
|
||||||
|
<stunTargetWhileCasting>true</stunTargetWhileCasting>
|
||||||
|
<aiCanUse>true</aiCanUse>
|
||||||
|
<verbProperties>
|
||||||
|
<verbClass>Verb_CastAbilityTouch</verbClass>
|
||||||
|
<drawAimPie>false</drawAimPie>
|
||||||
|
<range>-1</range>
|
||||||
|
<warmupTime>0.5</warmupTime>
|
||||||
|
<soundCast>WULA_MW_Breaker_Bar_Hit</soundCast>
|
||||||
|
<targetParams>
|
||||||
|
<canTargetLocations>false</canTargetLocations>
|
||||||
|
<canTargetPawns>true</canTargetPawns>
|
||||||
|
<canTargetBuildings>false</canTargetBuildings>
|
||||||
|
</targetParams>
|
||||||
|
</verbProperties>
|
||||||
|
<comps>
|
||||||
|
<li Class="WulaFallenEmpire.CompProperties_StunKnockback">
|
||||||
|
<damageDef>Demolish</damageDef>
|
||||||
|
<damageAmount>80</damageAmount>
|
||||||
|
<armorPenetration>2</armorPenetration>
|
||||||
|
<stunTicks>300</stunTicks>
|
||||||
|
<maxKnockbackDistance>8</maxKnockbackDistance>
|
||||||
|
<requireLineOfSight>true</requireLineOfSight>
|
||||||
|
<canKnockbackIntoWalls>false</canKnockbackIntoWalls>
|
||||||
|
<knockbackFlyerDef>PawnFlyer</knockbackFlyerDef>
|
||||||
|
<!-- <flightEffecterDef>JumpFlight</flightEffecterDef> -->
|
||||||
|
<landingSound>PawnFlyer_Land</landingSound>
|
||||||
|
<!-- <impactEffecter>DamageEffect_Bullet</impactEffecter> -->
|
||||||
|
<!-- <impactSound>WULA_MW_Breaker_Bar_Hit</impactSound> -->
|
||||||
|
</li>
|
||||||
|
</comps>
|
||||||
|
<jobDef>WULA_CastAbilityOnThingMelee_WithWeapon</jobDef>
|
||||||
|
</AbilityDef>
|
||||||
<ThingDef ParentName="BaseMeleeWeapon_Blunt_Quality">
|
<ThingDef ParentName="BaseMeleeWeapon_Blunt_Quality">
|
||||||
<defName>WULA_MW_Constructor_Hammer</defName>
|
<defName>WULA_MW_Constructor_Hammer</defName>
|
||||||
<label>HAm-1"装修锤"</label>
|
<label>HAm-1"装修锤"</label>
|
||||||
@@ -1154,6 +1309,10 @@
|
|||||||
<defName>Bullet_WULA_RW_Penetrating_Beam</defName>
|
<defName>Bullet_WULA_RW_Penetrating_Beam</defName>
|
||||||
<label>穿透光束</label>
|
<label>穿透光束</label>
|
||||||
<thingClass>WulaFallenEmpire.Projectile_WulaPenetratingBeam</thingClass>
|
<thingClass>WulaFallenEmpire.Projectile_WulaPenetratingBeam</thingClass>
|
||||||
|
<graphicData>
|
||||||
|
<texPath>Wula/Weapon/WULA_Weapon_Empty</texPath>
|
||||||
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
|
</graphicData>
|
||||||
<modExtensions>
|
<modExtensions>
|
||||||
<li Class="WulaFallenEmpire.Wula_BeamPierce_Extension">
|
<li Class="WulaFallenEmpire.Wula_BeamPierce_Extension">
|
||||||
<maxHits>2</maxHits> <!-- -1 for infinite hits -->
|
<maxHits>2</maxHits> <!-- -1 for infinite hits -->
|
||||||
@@ -1247,6 +1406,10 @@
|
|||||||
<defName>Bullet_WULA_RW_Penetrating_Beam_Ranged</defName>
|
<defName>Bullet_WULA_RW_Penetrating_Beam_Ranged</defName>
|
||||||
<label>穿透光束</label>
|
<label>穿透光束</label>
|
||||||
<thingClass>WulaFallenEmpire.Projectile_WulaPenetratingBeam</thingClass>
|
<thingClass>WulaFallenEmpire.Projectile_WulaPenetratingBeam</thingClass>
|
||||||
|
<graphicData>
|
||||||
|
<texPath>Wula/Weapon/WULA_Weapon_Empty</texPath>
|
||||||
|
<graphicClass>Graphic_Single</graphicClass>
|
||||||
|
</graphicData>
|
||||||
<modExtensions>
|
<modExtensions>
|
||||||
<li Class="WulaFallenEmpire.Wula_BeamPierce_Extension">
|
<li Class="WulaFallenEmpire.Wula_BeamPierce_Extension">
|
||||||
<maxHits>2</maxHits> <!-- -1 for infinite hits -->
|
<maxHits>2</maxHits> <!-- -1 for infinite hits -->
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 642 KiB After Width: | Height: | Size: 232 KiB |
BIN
Content/Textures/Wula/Building/Flag/WULA_Flag_Building_B.png
Normal file
|
After Width: | Height: | Size: 229 KiB |
BIN
Content/Textures/Wula/Building/Flag/WULA_Flag_Building_C.png
Normal file
|
After Width: | Height: | Size: 658 KiB |
BIN
Content/Textures/Wula/Building/Flag/WULA_Flag_Building_D.png
Normal file
|
After Width: | Height: | Size: 206 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 216 KiB |
@@ -0,0 +1,257 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
using Verse.AI;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Verse.Sound;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class CompAbilityEffect_StunKnockback : CompAbilityEffect
|
||||||
|
{
|
||||||
|
public new CompProperties_StunKnockback Props => (CompProperties_StunKnockback)props;
|
||||||
|
|
||||||
|
public override void Apply(LocalTargetInfo target, LocalTargetInfo dest)
|
||||||
|
{
|
||||||
|
base.Apply(target, dest);
|
||||||
|
|
||||||
|
if (target.HasThing && target.Thing is Pawn targetPawn)
|
||||||
|
{
|
||||||
|
// 第一步:造成伤害和眩晕
|
||||||
|
bool targetDied = ApplyDamageAndStun(targetPawn);
|
||||||
|
|
||||||
|
// 第二步:如果目标仍然存活,执行击退
|
||||||
|
if (!targetDied && targetPawn != null && !targetPawn.Dead && !targetPawn.Downed)
|
||||||
|
{
|
||||||
|
PerformKnockback(targetPawn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 应用伤害和眩晕效果,返回目标是否死亡
|
||||||
|
/// </summary>
|
||||||
|
private bool ApplyDamageAndStun(Pawn targetPawn)
|
||||||
|
{
|
||||||
|
// 记录目标的初始状态(是否存活)
|
||||||
|
bool wasAliveBeforeDamage = !targetPawn.Dead;
|
||||||
|
|
||||||
|
// 创建伤害信息
|
||||||
|
DamageInfo damageInfo = new DamageInfo(
|
||||||
|
Props.damageDef,
|
||||||
|
Props.damageAmount,
|
||||||
|
Props.armorPenetration,
|
||||||
|
-1f,
|
||||||
|
parent.pawn,
|
||||||
|
null
|
||||||
|
);
|
||||||
|
|
||||||
|
// 应用伤害
|
||||||
|
targetPawn.TakeDamage(damageInfo);
|
||||||
|
|
||||||
|
// 检查目标是否死亡
|
||||||
|
bool targetDied = targetPawn.Dead || targetPawn.Destroyed || targetPawn == null;
|
||||||
|
|
||||||
|
if (targetDied)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用施法者的地图而不是目标的地图
|
||||||
|
Map map = parent.pawn.Map;
|
||||||
|
|
||||||
|
// 播放冲击效果
|
||||||
|
if (Props.impactEffecter != null && map != null)
|
||||||
|
{
|
||||||
|
Effecter effect = Props.impactEffecter.Spawn();
|
||||||
|
effect.Trigger(new TargetInfo(targetPawn.Position, map), new TargetInfo(targetPawn.Position, map));
|
||||||
|
effect.Cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 播放冲击音效
|
||||||
|
if (Props.impactSound != null && map != null)
|
||||||
|
{
|
||||||
|
Props.impactSound.PlayOneShot(new TargetInfo(targetPawn.Position, map));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 应用眩晕 - 只在目标存活时应用
|
||||||
|
if (Props.stunTicks > 0 && !targetPawn.Dead)
|
||||||
|
{
|
||||||
|
targetPawn.stances.stunner.StunFor(Props.stunTicks, parent.pawn);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行击退
|
||||||
|
/// </summary>
|
||||||
|
private void PerformKnockback(Pawn targetPawn)
|
||||||
|
{
|
||||||
|
// 再次检查目标是否有效
|
||||||
|
if (targetPawn == null || targetPawn.Destroyed || targetPawn.Dead)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 计算击退方向
|
||||||
|
IntVec3 knockbackDirection = CalculateKnockbackDirection(targetPawn.Position);
|
||||||
|
|
||||||
|
// 寻找最远的可站立击退位置
|
||||||
|
IntVec3 knockbackDestination = FindFarthestStandablePosition(targetPawn, knockbackDirection);
|
||||||
|
|
||||||
|
// 如果找到了有效位置,执行击退飞行
|
||||||
|
if (knockbackDestination.IsValid && knockbackDestination != targetPawn.Position)
|
||||||
|
{
|
||||||
|
CreateKnockbackFlyer(targetPawn, knockbackDestination);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算击退方向(施法者到目标的连线延长线)
|
||||||
|
/// </summary>
|
||||||
|
private IntVec3 CalculateKnockbackDirection(IntVec3 targetPosition)
|
||||||
|
{
|
||||||
|
// 从施法者指向目标的方向
|
||||||
|
IntVec3 direction = targetPosition - parent.pawn.Position;
|
||||||
|
|
||||||
|
// 标准化方向(保持整数坐标)
|
||||||
|
if (direction.x != 0 || direction.z != 0)
|
||||||
|
{
|
||||||
|
// 找到主要方向分量
|
||||||
|
if (Mathf.Abs(direction.x) > Mathf.Abs(direction.z))
|
||||||
|
{
|
||||||
|
return new IntVec3(Mathf.Sign(direction.x) > 0 ? 1 : -1, 0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new IntVec3(0, 0, Mathf.Sign(direction.z) > 0 ? 1 : -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果施法者和目标在同一位置,使用随机方向
|
||||||
|
return new IntVec3(Rand.Value > 0.5f ? 1 : -1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 寻找最远的可站立击退位置(不检查路径通行性,只检查目标格子是否可站立)
|
||||||
|
/// </summary>
|
||||||
|
private IntVec3 FindFarthestStandablePosition(Pawn targetPawn, IntVec3 direction)
|
||||||
|
{
|
||||||
|
Map map = targetPawn.Map;
|
||||||
|
IntVec3 currentPos = targetPawn.Position;
|
||||||
|
IntVec3 farthestValidPos = currentPos;
|
||||||
|
|
||||||
|
// 从最大距离开始向回找,找到第一个可站立的格子
|
||||||
|
for (int distance = Props.maxKnockbackDistance; distance >= 1; distance--)
|
||||||
|
{
|
||||||
|
IntVec3 testPos = currentPos + (direction * distance);
|
||||||
|
|
||||||
|
if (!testPos.InBounds(map))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// 检查格子是否可站立且没有其他Pawn
|
||||||
|
if (IsCellStandableAndEmpty(testPos, map, targetPawn))
|
||||||
|
{
|
||||||
|
farthestValidPos = testPos;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return farthestValidPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查格子是否可站立且没有其他Pawn
|
||||||
|
/// </summary>
|
||||||
|
private bool IsCellStandableAndEmpty(IntVec3 cell, Map map, Pawn targetPawn)
|
||||||
|
{
|
||||||
|
if (!cell.InBounds(map))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// 检查是否可站立
|
||||||
|
if (!cell.Standable(map))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// 检查是否有建筑阻挡(如果配置不允许击退到墙上)
|
||||||
|
if (!Props.canKnockbackIntoWalls)
|
||||||
|
{
|
||||||
|
Building edifice = cell.GetEdifice(map);
|
||||||
|
if (edifice != null && !(edifice is Building_Door))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查视线(如果需要)
|
||||||
|
if (Props.requireLineOfSight && !GenSight.LineOfSight(targetPawn.Position, cell, map))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// 检查是否有其他pawn
|
||||||
|
List<Thing> thingList = cell.GetThingList(map);
|
||||||
|
foreach (Thing thing in thingList)
|
||||||
|
{
|
||||||
|
if (thing is Pawn otherPawn && otherPawn != targetPawn)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建击退飞行器
|
||||||
|
/// </summary>
|
||||||
|
private void CreateKnockbackFlyer(Pawn targetPawn, IntVec3 destination)
|
||||||
|
{
|
||||||
|
Map map = targetPawn.Map;
|
||||||
|
|
||||||
|
// 使用自定义飞行器或默认飞行器
|
||||||
|
ThingDef flyerDef = Props.knockbackFlyerDef ?? ThingDefOf.PawnFlyer;
|
||||||
|
|
||||||
|
// 创建飞行器(参考JumpUtility.DoJump)
|
||||||
|
PawnFlyer flyer = PawnFlyer.MakeFlyer(
|
||||||
|
flyerDef,
|
||||||
|
targetPawn,
|
||||||
|
destination,
|
||||||
|
Props.flightEffecterDef,
|
||||||
|
Props.landingSound,
|
||||||
|
false, // 不携带物品
|
||||||
|
null, // 不覆盖起始位置
|
||||||
|
null, // 传递Ability对象而不是CompAbilityEffect
|
||||||
|
new LocalTargetInfo(destination)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (flyer != null)
|
||||||
|
{
|
||||||
|
// 生成飞行器
|
||||||
|
GenSpawn.Spawn(flyer, destination, map);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Valid(LocalTargetInfo target, bool throwMessages = false)
|
||||||
|
{
|
||||||
|
// 首先调用基类验证
|
||||||
|
if (!base.Valid(target, throwMessages))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// 检查目标是否为Pawn
|
||||||
|
if (!target.HasThing || !(target.Thing is Pawn))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查目标是否存活
|
||||||
|
Pawn targetPawn = target.Thing as Pawn;
|
||||||
|
if (targetPawn.Dead || targetPawn.Downed)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否在同一地图
|
||||||
|
if (targetPawn.Map != parent.pawn.Map)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using RimWorld;
|
||||||
|
using Verse;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace WulaFallenEmpire
|
||||||
|
{
|
||||||
|
public class CompProperties_StunKnockback : CompProperties_AbilityEffect
|
||||||
|
{
|
||||||
|
// 伤害设置
|
||||||
|
public DamageDef damageDef = DamageDefOf.Blunt;
|
||||||
|
public float damageAmount = 15f;
|
||||||
|
public float armorPenetration = 0f;
|
||||||
|
|
||||||
|
// 眩晕设置
|
||||||
|
public int stunTicks = 180; // 3秒眩晕
|
||||||
|
|
||||||
|
// 击退设置
|
||||||
|
public int maxKnockbackDistance = 5; // 最大击退距离
|
||||||
|
public bool requireLineOfSight = true; // 击退路径是否需要视线
|
||||||
|
public bool canKnockbackIntoWalls = false; // 是否可以击退到墙上
|
||||||
|
|
||||||
|
// 飞行效果设置
|
||||||
|
public ThingDef knockbackFlyerDef;
|
||||||
|
public EffecterDef flightEffecterDef;
|
||||||
|
public SoundDef landingSound;
|
||||||
|
|
||||||
|
// 伤害和击退的视觉效果
|
||||||
|
public EffecterDef impactEffecter;
|
||||||
|
public SoundDef impactSound;
|
||||||
|
|
||||||
|
public CompProperties_StunKnockback()
|
||||||
|
{
|
||||||
|
compClass = typeof(CompAbilityEffect_StunKnockback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@ namespace WulaFallenEmpire
|
|||||||
// 通过 ModExtension 配置的图形数据
|
// 通过 ModExtension 配置的图形数据
|
||||||
private ExtraGraphicsExtension modExtension;
|
private ExtraGraphicsExtension modExtension;
|
||||||
|
|
||||||
// 图形缓存
|
// 图形缓存 - 现在包含Shader信息
|
||||||
private Dictionary<string, Graphic> graphicsCache = new Dictionary<string, Graphic>();
|
private Dictionary<string, Graphic> graphicsCache = new Dictionary<string, Graphic>();
|
||||||
|
|
||||||
// 动画状态 - 每个图层的独立浮动
|
// 动画状态 - 每个图层的独立浮动
|
||||||
@@ -41,16 +41,16 @@ namespace WulaFallenEmpire
|
|||||||
// 重写 Graphic 属性返回 null,完全自定义渲染
|
// 重写 Graphic 属性返回 null,完全自定义渲染
|
||||||
public override Graphic Graphic => null;
|
public override Graphic Graphic => null;
|
||||||
|
|
||||||
// 获取缓存的图形
|
// 获取缓存的图形 - 修改后支持自定义Shader
|
||||||
private Graphic GetCachedGraphic(string texturePath, Vector2 scale, Color color)
|
private Graphic GetCachedGraphic(string texturePath, Vector2 scale, Color color, Shader shader)
|
||||||
{
|
{
|
||||||
string cacheKey = $"{texturePath}_{scale.x}_{scale.y}_{color}";
|
string cacheKey = $"{texturePath}_{scale.x}_{scale.y}_{color}_{shader?.name ?? "null"}";
|
||||||
|
|
||||||
if (!graphicsCache.TryGetValue(cacheKey, out Graphic graphic))
|
if (!graphicsCache.TryGetValue(cacheKey, out Graphic graphic))
|
||||||
{
|
{
|
||||||
graphic = GraphicDatabase.Get<Graphic_Single>(
|
graphic = GraphicDatabase.Get<Graphic_Single>(
|
||||||
texturePath,
|
texturePath,
|
||||||
ShaderDatabase.TransparentPostLight,
|
shader ?? ShaderDatabase.TransparentPostLight, // 使用传入的Shader,如果为null则使用默认
|
||||||
scale,
|
scale,
|
||||||
color);
|
color);
|
||||||
graphicsCache[cacheKey] = graphic;
|
graphicsCache[cacheKey] = graphic;
|
||||||
@@ -58,6 +58,66 @@ namespace WulaFallenEmpire
|
|||||||
|
|
||||||
return graphic;
|
return graphic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据Shader名称获取Shader - 修正版本
|
||||||
|
private Shader GetShaderByName(string shaderName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(shaderName))
|
||||||
|
return ShaderDatabase.TransparentPostLight;
|
||||||
|
|
||||||
|
// 使用switch语句匹配实际可用的Shader
|
||||||
|
switch (shaderName.ToLower())
|
||||||
|
{
|
||||||
|
case "transparent":
|
||||||
|
return ShaderDatabase.Transparent;
|
||||||
|
case "transparentpostlight":
|
||||||
|
return ShaderDatabase.TransparentPostLight;
|
||||||
|
case "transparentplant":
|
||||||
|
return ShaderDatabase.TransparentPlant;
|
||||||
|
case "cutout":
|
||||||
|
return ShaderDatabase.Cutout;
|
||||||
|
case "cutoutcomplex":
|
||||||
|
return ShaderDatabase.CutoutComplex;
|
||||||
|
case "cutoutflying":
|
||||||
|
return ShaderDatabase.CutoutFlying;
|
||||||
|
case "cutoutflying01":
|
||||||
|
return ShaderDatabase.CutoutFlying01;
|
||||||
|
case "terrainfade":
|
||||||
|
return ShaderDatabase.TerrainFade;
|
||||||
|
case "terrainfaderough":
|
||||||
|
return ShaderDatabase.TerrainFadeRough;
|
||||||
|
case "mote":
|
||||||
|
return ShaderDatabase.Mote;
|
||||||
|
case "moteglow":
|
||||||
|
return ShaderDatabase.MoteGlow;
|
||||||
|
case "motepulse":
|
||||||
|
return ShaderDatabase.MotePulse;
|
||||||
|
case "moteglowpulse":
|
||||||
|
return ShaderDatabase.MoteGlowPulse;
|
||||||
|
case "motewater":
|
||||||
|
return ShaderDatabase.MoteWater;
|
||||||
|
case "moteglowdistorted":
|
||||||
|
return ShaderDatabase.MoteGlowDistorted;
|
||||||
|
case "solidcolor":
|
||||||
|
return ShaderDatabase.SolidColor;
|
||||||
|
case "vertexcolor":
|
||||||
|
return ShaderDatabase.VertexColor;
|
||||||
|
case "invisible":
|
||||||
|
return ShaderDatabase.Invisible;
|
||||||
|
case "silhouette":
|
||||||
|
return ShaderDatabase.Silhouette;
|
||||||
|
case "worldterrain":
|
||||||
|
return ShaderDatabase.WorldTerrain;
|
||||||
|
case "worldocean":
|
||||||
|
return ShaderDatabase.WorldOcean;
|
||||||
|
case "metaoverlay":
|
||||||
|
return ShaderDatabase.MetaOverlay;
|
||||||
|
default:
|
||||||
|
Log.Warning($"Building_ExtraGraphics: Shader '{shaderName}' not found, using TransparentPostLight as fallback");
|
||||||
|
return ShaderDatabase.TransparentPostLight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override void DrawAt(Vector3 drawLoc, bool flip = false)
|
protected override void DrawAt(Vector3 drawLoc, bool flip = false)
|
||||||
{
|
{
|
||||||
// 不调用基类的 DrawAt,完全自定义渲染
|
// 不调用基类的 DrawAt,完全自定义渲染
|
||||||
@@ -101,8 +161,11 @@ namespace WulaFallenEmpire
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取图形
|
// 获取Shader
|
||||||
Graphic graphic = GetCachedGraphic(layer.texturePath, layer.scale, layer.color);
|
Shader shader = GetShaderByName(layer.shaderName);
|
||||||
|
|
||||||
|
// 获取图形(现在传入Shader)
|
||||||
|
Graphic graphic = GetCachedGraphic(layer.texturePath, layer.scale, layer.color, shader);
|
||||||
|
|
||||||
// 计算图层浮动偏移
|
// 计算图层浮动偏移
|
||||||
float hoverOffset = 0f;
|
float hoverOffset = 0f;
|
||||||
@@ -187,7 +250,7 @@ namespace WulaFallenEmpire
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单个图形层的配置数据
|
// 单个图形层的配置数据 - 添加shaderName字段
|
||||||
public class GraphicLayerData
|
public class GraphicLayerData
|
||||||
{
|
{
|
||||||
// 基础配置
|
// 基础配置
|
||||||
@@ -195,6 +258,7 @@ namespace WulaFallenEmpire
|
|||||||
public Vector2 scale = Vector2.one; // 缩放比例
|
public Vector2 scale = Vector2.one; // 缩放比例
|
||||||
public Color color = Color.white; // 颜色
|
public Color color = Color.white; // 颜色
|
||||||
public int drawOrder = 0; // 绘制顺序(数字小的先绘制)
|
public int drawOrder = 0; // 绘制顺序(数字小的先绘制)
|
||||||
|
public string shaderName = "TransparentPostLight"; // Shader名称(新增)
|
||||||
|
|
||||||
// 位置配置 - 使用环世界坐标系
|
// 位置配置 - 使用环世界坐标系
|
||||||
// X: 左右偏移, Y: 图层深度, Z: 上下偏移
|
// X: 左右偏移, Y: 图层深度, Z: 上下偏移
|
||||||
|
|||||||
@@ -92,6 +92,8 @@
|
|||||||
<Compile Include="Ability\WULA_AbilitySpawnAligned\CompProperties_AbilitySpawnAligned.cs" />
|
<Compile Include="Ability\WULA_AbilitySpawnAligned\CompProperties_AbilitySpawnAligned.cs" />
|
||||||
<Compile Include="Ability\WULA_AbilityTeleportSelf\CompAbilityEffect_TeleportSelf.cs" />
|
<Compile Include="Ability\WULA_AbilityTeleportSelf\CompAbilityEffect_TeleportSelf.cs" />
|
||||||
<Compile Include="Ability\WULA_AbilityTeleportSelf\CompProperties_AbilityTeleportSelf.cs" />
|
<Compile Include="Ability\WULA_AbilityTeleportSelf\CompProperties_AbilityTeleportSelf.cs" />
|
||||||
|
<Compile Include="Ability\WULA_StunKnockback\CompAbilityEffect_StunKnockback.cs" />
|
||||||
|
<Compile Include="Ability\WULA_StunKnockback\CompProperties_StunKnockback.cs" />
|
||||||
<Compile Include="BuildingComp\Building_ExtraGraphics.cs" />
|
<Compile Include="BuildingComp\Building_ExtraGraphics.cs" />
|
||||||
<Compile Include="BuildingComp\Building_MapObserver.cs" />
|
<Compile Include="BuildingComp\Building_MapObserver.cs" />
|
||||||
<Compile Include="BuildingComp\WULA_BuildingBombardment\CompBuildingBombardment.cs" />
|
<Compile Include="BuildingComp\WULA_BuildingBombardment\CompBuildingBombardment.cs" />
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"TextureModID": "tourswen.wulafallenempirev2test",
|
||||||
|
"ItemDefName": "WULA_MW_Breaker_Bar",
|
||||||
|
"ItemType": "ThingDef",
|
||||||
|
"ItemTypeNamespace": "Verse",
|
||||||
|
"OffY": 0.0545980521,
|
||||||
|
"ScaleX": 1.5,
|
||||||
|
"ScaleY": 1.5,
|
||||||
|
"BladeStart": -0.428160578,
|
||||||
|
"MeleeWeaponType": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"TextureModID": "tourswen.wulafallenempirev2test",
|
||||||
|
"ItemDefName": "WULA_MW_ChainSword",
|
||||||
|
"ItemType": "ThingDef",
|
||||||
|
"ItemTypeNamespace": "Verse",
|
||||||
|
"OffX": 0.2614946,
|
||||||
|
"OffY": 0.204023167,
|
||||||
|
"HandsMode": 1,
|
||||||
|
"BladeStart": -0.100574359,
|
||||||
|
"BladeEnd": 0.543103456,
|
||||||
|
"MeleeWeaponType": 48
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"TextureModID": "tourswen.wulafallenempirev2test",
|
||||||
|
"ItemDefName": "WULA_MW_Charge_Mace",
|
||||||
|
"ItemType": "ThingDef",
|
||||||
|
"ItemTypeNamespace": "Verse",
|
||||||
|
"OffY": 0.0201152936,
|
||||||
|
"HandsMode": 1,
|
||||||
|
"BladeStart": -0.318965524,
|
||||||
|
"BladeEnd": 0.336206883,
|
||||||
|
"MeleeWeaponType": 40
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"TextureModID": "tourswen.wulafallenempirev2test",
|
||||||
|
"ItemDefName": "WULA_MW_Constructor_Hammer",
|
||||||
|
"ItemType": "ThingDef",
|
||||||
|
"ItemTypeNamespace": "Verse",
|
||||||
|
"OffY": 0.04885075,
|
||||||
|
"BladeStart": -0.336206883,
|
||||||
|
"BladeEnd": 0.330460131,
|
||||||
|
"MeleeWeaponType": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"TextureModID": "tourswen.wulafallenempirev2test",
|
||||||
|
"ItemDefName": "WULA_MW_Twohanded_ChainBroadsword",
|
||||||
|
"ItemType": "ThingDef",
|
||||||
|
"ItemTypeNamespace": "Verse",
|
||||||
|
"OffX": 0.08908081,
|
||||||
|
"OffY": 0.244253218,
|
||||||
|
"ScaleX": 1.5,
|
||||||
|
"ScaleY": 1.5,
|
||||||
|
"BladeStart": -0.502873361,
|
||||||
|
"BladeEnd": 0.807471454,
|
||||||
|
"MeleeWeaponType": 6
|
||||||
|
}
|
||||||
1
WeaponTweakData/tourswen.wulafallenempirev2test.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Wula Fallen Empire V2
|
||||||