This commit is contained in:
2026-03-05 17:33:22 +08:00
parent 1d7849fa1d
commit 35005f7bfc
10 changed files with 556 additions and 18 deletions

View File

@@ -3,15 +3,15 @@
<FleckDef Name="WULA_GunTail_Plasma" ParentName="FleckBase">
<defName>WULA_GunTail_Plasma</defName>
<altitudeLayer>Projectile</altitudeLayer>
<fadeInTime>0.50</fadeInTime>
<solidTime>1</solidTime>
<fadeOutTime>1.2</fadeOutTime>
<growthRate>0.025</growthRate>
<fadeInTime>0.2</fadeInTime>
<solidTime>0.1</solidTime>
<fadeOutTime>0.2</fadeOutTime>
<growthRate>5</growthRate>
<graphicData>
<texPath>Wula/Mote/WULA_GunTail_Plasma</texPath>
<shaderType>MoteGlow</shaderType>
<drawSize>4.25</drawSize>
<color>(179,127,67,155)</color>
<drawSize>2.5</drawSize>
<color>(109, 208, 117, 155)</color>
</graphicData>
</FleckDef>

View File

@@ -245,6 +245,43 @@
<li>Wula_AI_Rocket_Panzer_Weapon</li>
</weaponTags>
</PawnKindDef>
<PawnKindDef ParentName="HeavyMechanoidKind">
<defName>Wula_AI_Panzer_Destroyer</defName> <!-- 修改了defName以避免冲突 -->
<label>HDp-1"冥波"</label>
<race>Wula_AI_Panzer_Destroyer</race>
<combatPower>500</combatPower>
<allowInMechClusters>false</allowInMechClusters>
<defaultFactionType>PlayerColony</defaultFactionType>
<canMeleeAttack>false</canMeleeAttack>
<isGoodBreacher>true</isGoodBreacher>
<flyingAnimationFramePathPrefix>Wula/Things/Wula_Mech_Mobile_Factory/Flying/Wula_Mech_Mobile_Factory_Flying_</flyingAnimationFramePathPrefix>
<flyingAnimationDrawSize>1</flyingAnimationDrawSize>
<flyingAnimationFrameCount>1</flyingAnimationFrameCount>
<flyingAnimationTicksPerFrame>2</flyingAnimationTicksPerFrame>
<flyingAnimationInheritColors>false</flyingAnimationInheritColors>
<lifeStages>
<li>
<bodyGraphicData>
<texPath>Wula/Things/Wula_AI_Heavy_Panzer/Bodies/Naked_Thin</texPath>
<maskPath>Wula/Things/WULA_Cat/AllegianceOverlays/None</maskPath>
<shaderType>CutoutWithOverlay</shaderType>
<graphicClass>Graphic_Multi</graphicClass>
<drawSize>9</drawSize>
<shadowData>
<volume>(1.4, 1.8, 1.4)</volume>
</shadowData>
</bodyGraphicData>
</li>
</lifeStages>
<weaponMoney>99999~99999</weaponMoney>
<controlGroupPortraitZoom>0.7</controlGroupPortraitZoom>
<weaponTags>
<li>Wula_AI_Panzer_Destroyer_Weapon</li>
</weaponTags>
</PawnKindDef>
<PawnKindDef ParentName="HeavyMechanoidKind">
<defName>Wula_Mech_Mobile_Shield</defName> <!-- 修改了defName以避免冲突 -->
<label>MSm-8"放射盾"</label>

View File

@@ -367,7 +367,7 @@
<ThingDef ParentName="BaseWeaponTurret">
<defName>Wula_AI_Heavy_Panzer_Turret_Weapon</defName>
<label>ATt-2"青金石"</label>
<description>HAp-6"巨戟"的炮塔,两门可以洞穿护盾的晶化炮就是为打击护盾目标量身定做的</description>
<description>HAp-6"巨戟"的炮塔,两门高射速晶化炮可以在对抗强大装甲目标和大量软目标间取得平衡</description>
<tradeability>None</tradeability>
<destroyOnDrop>true</destroyOnDrop>
<techLevel>Ultra</techLevel>
@@ -391,7 +391,7 @@
<defaultProjectile>Bullet_Wula_AI_Heavy_Panzer_Turret_Weapon</defaultProjectile>
<warmupTime>0</warmupTime>
<minRange>5.9</minRange>
<range>60</range>
<range>52</range>
<defaultCooldownTime>1</defaultCooldownTime>
<burstShotCount>2</burstShotCount>
<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
@@ -649,6 +649,150 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseWeaponTurret">
<defName>Wula_AI_Panzer_Destroyer_Turret_Weapon</defName>
<label>DTt-9"琥珀"</label>
<description>HDp-1"冥波"的炮塔,其粒子炮可以洞穿那些最厚的护甲防御。</description>
<tradeability>None</tradeability>
<destroyOnDrop>true</destroyOnDrop>
<techLevel>Ultra</techLevel>
<graphicData>
<texPath>Wula/Weapon/WULA_WM_Panzer_Turret</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>3</drawSize>
</graphicData>
<uiIconScale>0.33</uiIconScale>
<statBases>
<Mass>150</Mass>
<AccuracyTouch>1</AccuracyTouch>
<AccuracyShort>2</AccuracyShort>
<AccuracyMedium>2</AccuracyMedium>
<AccuracyLong>2</AccuracyLong>
</statBases>
<verbs>
<li>
<verbClass>WulaFallenEmpire.Verb_TurretOffestShoot</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_Wula_AI_Panzer_Destroyer_Turret_Weapon</defaultProjectile>
<warmupTime>0</warmupTime>
<minRange>8.9</minRange>
<range>79</range>
<defaultCooldownTime>8</defaultCooldownTime>
<burstShotCount>1</burstShotCount>
<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
<requireLineOfSight>true</requireLineOfSight>
<soundCast>WULA_MW_Mass_Drivers_Shootingsound</soundCast>
<soundCastTail>GunTail_Heavy</soundCastTail>
<muzzleFlashScale>18</muzzleFlashScale>
<canGoWild>false</canGoWild>
</li>
</verbs>
<modExtensions>
<li Class="WulaFallenEmpire.ModExtension_ShootWithOffset">
<offsets>
<li>(0, -4.1)</li>
</offsets>
</li>
</modExtensions>
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>Bullet_Wula_AI_Panzer_Destroyer_Turret_Weapon</defName>
<label>琥珀等离子弹</label>
<thingClass>WulaFallenEmpire.Projectile_ExplosiveWithDirectHit</thingClass>
<modExtensions>
<li Class="WulaFallenEmpire.ProjectileExtension_DirectHit">
<directDamageDef>Vaporize</directDamageDef>
<directDamageAmount>350</directDamageAmount>
<directArmorPenetration>2</directArmorPenetration>
<directImpactSound>Explosion_Vaporize</directImpactSound>
</li>
<li Class="WulaFallenEmpire.TrackingBulletDef">
<tailFleckDef>WULA_GunTail_Plasma</tailFleckDef>
<fleckMakeFleckTickMax>3</fleckMakeFleckTickMax>
</li>
</modExtensions>
<tickerType>Normal</tickerType>
<neverMultiSelect>True</neverMultiSelect>
<graphicData>
<texPath>Wula/Projectile/WULA_Plasma_Proj</texPath>
<graphicClass>Graphic_Single</graphicClass>
<shaderType>MoteGlow</shaderType>
<color>(109, 208, 117, 255)</color>
<drawSize>(2.5,3)</drawSize>
</graphicData>
<projectile>
<damageDef>WULA_GiantBomb</damageDef>
<damageAmountBase>45</damageAmountBase>
<speed>60</speed>
<explosionRadius>6</explosionRadius>
<armorPenetrationBase>1.5</armorPenetrationBase>
<flyOverhead>true</flyOverhead>
<soundHitThickRoof>Artillery_HitThickRoof</soundHitThickRoof>
<soundExplode>MortarBomb_Explode</soundExplode>
<soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
<soundAmbient>MortarRound_Ambient</soundAmbient>
<stoppingPower>10</stoppingPower>
<preExplosionSpawnSingleThingDef>Filth_BlastMark</preExplosionSpawnSingleThingDef>
</projectile>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>Wula_AI_Panzer_Destroyer_Main_Weapon</defName>
<label>目标标定器</label>
<description>HDp-1"冥波"车体上的测距器,可以确保其炮塔在可以开火的最佳距离,被其瞄准的目标会成为炮塔的优先攻击目标。</description>
<tickerType>Normal</tickerType>
<techLevel>Spacer</techLevel>
<tradeability>None</tradeability>
<destroyOnDrop>true</destroyOnDrop>
<uiIconPath>Wula/Projectile/WULA_Shrapnel</uiIconPath>
<graphicData>
<texPath>Wula/Weapon/WULA_Weapon_Empty</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>1.35</drawSize>
</graphicData>
<soundInteract>Interact_Rifle</soundInteract>
<recipeMaker Inherit="False" IsNull="True"/>
<statBases>
<WorkToMake>2500</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>8</Mass>
<AccuracyTouch>1</AccuracyTouch>
<AccuracyShort>1</AccuracyShort>
<AccuracyMedium>1</AccuracyMedium>
<AccuracyLong>1</AccuracyLong>
<RangedWeapon_Cooldown>0.1</RangedWeapon_Cooldown>
</statBases>
<verbs>
<li>
<verbClass>WulaFallenEmpire.Verb_RangeChecker</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_ChargeRifle</defaultProjectile>
<minRange>8.9</minRange>
<range>79</range>
<warmupTime>0.2</warmupTime>
<burstShotCount>1</burstShotCount>
<noiseRadius>0</noiseRadius>
<!-- <soundCast>RocketswarmLauncher_Fire</soundCast>
<soundCastTail>GunTail_Heavy</soundCastTail> -->
<targetParams>
<canTargetLocations>true</canTargetLocations>
</targetParams>
</li>
</verbs>
<costList Inherit="False">
<Steel>1</Steel>
</costList>
<weaponTags Inherit="False">
<li>Wula_AI_Panzer_Destroyer_Weapon</li>
</weaponTags>
<thingCategories Inherit="False"/>
<comps>
<li Class="WulaFallenEmpire.CompProperties_MechOnlyWeapon">
<allowedMechRaces>
<li>Wula_AI_Panzer_Destroyer</li>
</allowedMechRaces>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>Wula_Psi_Titan_Beam</defName>

View File

@@ -180,7 +180,7 @@
<exitCrewIcon>Wula/UI/Commands/WULA_ExitCrew</exitCrewIcon>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_MechFuel">
<!-- <li Class="WulaFallenEmpire.CompProperties_MechFuel">
<fuelType>Chemfuel</fuelType>
<fuelCapacity>70</fuelCapacity>
<dailyFuelConsumption>35</dailyFuelConsumption>
@@ -194,7 +194,7 @@
<autoRefuelThreshold>1</autoRefuelThreshold>
<shutdownWhenEmpty>true</shutdownWhenEmpty>
</li>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_MechRepairable">
<allowAutoRepair>true</allowAutoRepair>
<healthPercentThreshold>1</healthPercentThreshold>
@@ -448,7 +448,7 @@
<summonPilotIcon>Wula/UI/Commands/WULA_Enter_Mech</summonPilotIcon>
<ejectPilotIcon>Wula/UI/Commands/WULA_Exit_Mech</ejectPilotIcon>
</li>
<li Class="WulaFallenEmpire.CompProperties_MechFuel">
<!-- <li Class="WulaFallenEmpire.CompProperties_MechFuel">
<fuelType>Chemfuel</fuelType>
<fuelCapacity>70</fuelCapacity>
<dailyFuelConsumption>35</dailyFuelConsumption>
@@ -462,7 +462,7 @@
<autoRefuelThreshold>1</autoRefuelThreshold>
<shutdownWhenEmpty>true</shutdownWhenEmpty>
</li>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_MechRepairable">
<allowAutoRepair>true</allowAutoRepair>
<healthPercentThreshold>1</healthPercentThreshold>
@@ -612,6 +612,274 @@
</li>
</comps>
</ThingDef>
<ThingDef ParentName="Wula_MechunitBase">
<defName>Wula_AI_Panzer_Destroyer</defName>
<label>HDp-1"冥波"</label>
<description>乌拉帝国的中型战争机械,以悬浮的方式穿梭于战场之上,拥有一门射速缓慢但射程极远、威力强大的电浆炮,足以威胁那些最厚实的装甲单位。</description>
<statBases>
<MoveSpeed>2</MoveSpeed>
<EnergyShieldEnergyMax>2</EnergyShieldEnergyMax>
<StaggerDurationFactor>0</StaggerDurationFactor>
<MaxFlightTime>9999</MaxFlightTime>
<FlightCooldown>0</FlightCooldown>
<ArmorRating_Sharp>1.25</ArmorRating_Sharp>
<ArmorRating_Blunt>1.25</ArmorRating_Blunt>
<ArmorRating_Heat>2</ArmorRating_Heat>
<WULA_MechArmor>4</WULA_MechArmor>
</statBases>
<costList Inherit="False">
<WULA_Alloy>300</WULA_Alloy>
<WULA_Charge_Cube>18</WULA_Charge_Cube>
<ComponentSpacer>2</ComponentSpacer>
</costList>
<butcherProducts Inherit="False">
<WULA_Alloy>300</WULA_Alloy>
<WULA_Charge_Cube>18</WULA_Charge_Cube>
<ComponentSpacer>2</ComponentSpacer>
</butcherProducts>
<race>
<body>WULA_AI_Heavy_Panzer_Body</body>
<baseBodySize>20</baseBodySize>
<thinkTreeMain>Wula_Battle_Mech_With_1_Pilot</thinkTreeMain>
<baseHealthScale>10</baseHealthScale>
<flightStartChanceOnJobStart>1</flightStartChanceOnJobStart>
</race>
<tools Inherit="False">
<li>
<label>碾压</label>
<capacities>
<li>Blunt</li>
</capacities>
<power>360</power>
<cooldownTime>8</cooldownTime>
<linkedBodyPartsGroup>Torso</linkedBodyPartsGroup>
<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
</li>
</tools>
<comps>
<li Class="WulaFallenEmpire.CompProperties_MultiTurretGun">
<ID>0</ID>
<turretDef>Wula_AI_Panzer_Destroyer_Turret_Weapon</turretDef>
<traverseSpeed>20</traverseSpeed>
<aimTicks>0</aimTicks>
<idleRotationSpeed>3</idleRotationSpeed>
<smoothRotation>true</smoothRotation>
<resetCooldownTime>8.2</resetCooldownTime>
<!-- <angleOffset>-90</angleOffset> -->
<!-- <angleOffset>-90</angleOffset> -->
<renderNodeProperties>
<li>
<nodeClass>PawnRenderNode_TurretGun</nodeClass>
<workerClass>PawnRenderNodeWorker_TurretGun</workerClass>
<parentTagDef>Body</parentTagDef>
<overrideMeshSize>(8, 8)</overrideMeshSize>
<baseLayer>20</baseLayer>
<pawnType>Any</pawnType>
<drawData>
<dataNorth>
<rotationOffset>-90</rotationOffset>
</dataNorth>
<dataEast>
<rotationOffset>-90</rotationOffset>
</dataEast>
<dataSouth>
<rotationOffset>-90</rotationOffset>
</dataSouth>
<dataWest>
<rotationOffset>90</rotationOffset>
</dataWest>
</drawData>
</li>
</renderNodeProperties>
</li>
<li Class="WulaFallenEmpire.CompProperties_PawnFlight">
<!-- 飞行触发条件:仅在征召时飞行 -->
<flightCondition>DraftedAndMove</flightCondition>
<!-- 链接到我们刚刚创建的 AnimationDef -->
<flyingAnimationNorth>WULA_Hover_FlyNorth</flyingAnimationNorth>
<flyingAnimationEast>WULA_Hover_FlyEast</flyingAnimationEast>
<flyingAnimationSouth>WULA_Hover_FlySouth</flyingAnimationSouth>
</li>
<li Class="WulaFallenEmpire.CompProperties_MechPilotHolder">
<maxPilots>1</maxPilots>
<pilotWorkTag>MechPilot</pilotWorkTag>
<ejectPilotHealthPercentThreshold>0.1</ejectPilotHealthPercentThreshold>
<summonPilotIcon>Wula/UI/Commands/WULA_Enter_Mech</summonPilotIcon>
<ejectPilotIcon>Wula/UI/Commands/WULA_Exit_Mech</ejectPilotIcon>
</li>
<!-- <li Class="WulaFallenEmpire.CompProperties_MechFuel">
<fuelType>Chemfuel</fuelType>
<fuelCapacity>70</fuelCapacity>
<dailyFuelConsumption>35</dailyFuelConsumption>
<refuelSpeedFactor>1</refuelSpeedFactor>
<refuelDuration>240</refuelDuration>
<fuelBarColor>(0.6, 0.5, 0.4)</fuelBarColor>
<allowAutoRefuel>true</allowAutoRefuel>
<autoRefuelThreshold>1</autoRefuelThreshold>
<shutdownWhenEmpty>true</shutdownWhenEmpty>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_MechRepairable">
<allowAutoRepair>true</allowAutoRepair>
<healthPercentThreshold>1</healthPercentThreshold>
<repairAmountPerCycle>10</repairAmountPerCycle>
<repairSound></repairSound>
<repairEffect>ConstructMetal</repairEffect>
</li>
<li Class="WulaFallenEmpire.CompProperties_MechInherentWeapon">
<weaponDef>Wula_AI_Panzer_Destroyer_Main_Weapon</weaponDef>
</li>
<li Class="WulaFallenEmpire.CompProperties_MechDefaultPilot">
<enableForNonPlayerFaction>true</enableForNonPlayerFaction>
<enableForPlayerFaction>false</enableForPlayerFaction>
<defaultPilotChance>1.0</defaultPilotChance>
<spawnOnlyIfNoPilot>true</spawnOnlyIfNoPilot>
<replaceExistingPilots>false</replaceExistingPilots>
<maxDefaultPilots>3</maxDefaultPilots>
<defaultPilots>
<li>
<pawnKind>Wula_PIA_Light_Unit</pawnKind>
<weight>1</weight>
<required>false</required>
</li>
</defaultPilots>
</li>
<li Class="WulaFallenEmpire.CompProperties_MechSkillInheritance">
<baseSkillLevelWhenNoPilot>0</baseSkillLevelWhenNoPilot>
<skillMultiplierForPilots>1</skillMultiplierForPilots>
</li>
<!-- <li Class="WulaFallenEmpire.CompProperties_MoteEmitterNorthward">
<moteDef>WULA_Mote_MechBlackSmoke</moteDef>
<emitIntervalTicks>30</emitIntervalTicks>
<emitIntervalMovingTicks>20</emitIntervalMovingTicks>
<moveSpeed>1.5</moveSpeed>
<lifetimeTicks>10</lifetimeTicks>
<scale>0.25</scale>
<offset>(0.85,0,2.25)</offset>
</li>
<li Class="WulaFallenEmpire.CompProperties_MoteEmitterNorthward">
<moteDef>WULA_Mote_MechBlackSmoke</moteDef>
<emitIntervalTicks>30</emitIntervalTicks>
<emitIntervalMovingTicks>20</emitIntervalMovingTicks>
<moveSpeed>1.5</moveSpeed>
<lifetimeTicks>10</lifetimeTicks>
<scale>0.25</scale>
<offset>(-0.85,0,2.25)</offset>
</li> -->
<!-- <li Class="WulaFallenEmpire.CompProperties_MechMovementSound">
<movementSound>WULA_DHM70_Rampart_Mech_Moving_Sound</movementSound>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_MechSelfDestruct">
<healthPercentThreshold>0.1</healthPercentThreshold>
<wickTicks>120~180</wickTicks>
<drawWick>true</drawWick>
<explosiveRadius>11.5</explosiveRadius>
<explosiveDamageType>Flame</explosiveDamageType>
<damageAmountBase>5</damageAmountBase>
<armorPenetrationBase>2</armorPenetrationBase>
<chanceToStartFire>0.25</chanceToStartFire>
<damageFalloff>true</damageFalloff>
<doVisualEffects>true</doVisualEffects>
<doSoundEffects>true</doSoundEffects>
<propagationSpeed>1</propagationSpeed>
<explosionSound>Explosion_Bomb</explosionSound>
<triggerOnDeath>true</triggerOnDeath>
<triggerOnHealthThreshold>true</triggerOnHealthThreshold>
<chanceNeverExplode>0</chanceNeverExplode>
</li>
<!-- <li Class="WulaFallenEmpire.CompProperties_HediffGiverByKind">
<debugMode>false</debugMode>
<defaultHediffs>
</defaultHediffs>
<defaultAddChance>1</defaultAddChance>
<defaultAllowDuplicates>false</defaultAllowDuplicates>
<pawnKindHediffs>
<li>
<pawnKind>WULA_DHM70_Rampart_Mech_Prototype</pawnKind>
<hediffs>
<li>WULA_MechPrototype</li>
</hediffs>
<addChance>1.0</addChance>
<allowDuplicates>false</allowDuplicates>
</li>
</pawnKindHediffs>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_HighSpeedCollision">
<!-- 速度阈值 -->
<minSpeedForStage1>1.0</minSpeedForStage1>
<minSpeedForStage2>2.0</minSpeedForStage2>
<speedHistoryFrameCount>15</speedHistoryFrameCount>
<stageTransitionCooldownTicks>3</stageTransitionCooldownTicks>
<!-- 碰撞区域 -->
<collisionAreaRadius>2</collisionAreaRadius>
<!-- 目标过滤 -->
<onlyAffectEnemies>true</onlyAffectEnemies>
<excludeAlliedPawns>true</excludeAlliedPawns>
<!-- 阶段1效果 -->
<stage1DamageDef>Blunt</stage1DamageDef>
<stage1DamageAmount>1</stage1DamageAmount>
<armorPenetration>0.1</armorPenetration>
<!-- <stage1Hediff>Bruise</stage1Hediff>
<stage1HediffDurationTicks>120</stage1HediffDurationTicks>
<stage1HediffPreventsDamage>true</stage1HediffPreventsDamage> -->
<!-- <stage1Effecter>SparkImpact</stage1Effecter> -->
<stage1Sound>MeleeHit_BladelinkZeusHammer</stage1Sound>
<!-- 阶段2效果 -->
<stage2DamageDef>Blunt</stage2DamageDef>
<stage2DamageAmount>15</stage2DamageAmount>
<stage2KnockbackDistance>4</stage2KnockbackDistance>
<requireLineOfSightForKnockback>true</requireLineOfSightForKnockback>
<!-- <stage2Effecter>ExplosionFlash</stage2Effecter> -->
<stage2Sound>MeleeHit_BladelinkZeusHammer</stage2Sound>
<!-- 击飞配置 -->
<knockbackFlyerDef>PawnFlyer</knockbackFlyerDef>
<!-- <flightEffecterDef>FlyerTakeoff</flightEffecterDef> -->
<landingSound>PawnFlyerLand</landingSound>
<!-- 地形阻挡配置 -->
<narrowTerrainBlocked>true</narrowTerrainBlocked>
<maxBlockPenalty>1</maxBlockPenalty>
<terrainCheckInterval>60</terrainCheckInterval>
<blockedHediff>Wula_TerrainBlocked</blockedHediff>
<!-- 调试 -->
<enableDebugLogging>false</enableDebugLogging>
<enableDebugVisuals>false</enableDebugVisuals>
<debugDrawSpeedHistory>false</debugDrawSpeedHistory>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="Wula_MechunitBase">
<defName>Wula_Mech_Mobile_Shield</defName> <!-- 修改了defName以避免冲突 -->
<label>MSm-8"放射盾"</label>
@@ -724,7 +992,7 @@
<summonPilotIcon>Wula/UI/Commands/WULA_Enter_Mech</summonPilotIcon>
<ejectPilotIcon>Wula/UI/Commands/WULA_Exit_Mech</ejectPilotIcon>
</li>
<li Class="WulaFallenEmpire.CompProperties_MechFuel">
<!-- <li Class="WulaFallenEmpire.CompProperties_MechFuel">
<fuelType>Chemfuel</fuelType>
<fuelCapacity>70</fuelCapacity>
<dailyFuelConsumption>35</dailyFuelConsumption>
@@ -738,7 +1006,7 @@
<autoRefuelThreshold>1</autoRefuelThreshold>
<shutdownWhenEmpty>true</shutdownWhenEmpty>
</li>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_MechRepairable">
<allowAutoRepair>true</allowAutoRepair>
<healthPercentThreshold>1</healthPercentThreshold>
@@ -1197,7 +1465,7 @@
<summonPilotIcon>Wula/UI/Commands/WULA_Enter_Mech</summonPilotIcon>
<ejectPilotIcon>Wula/UI/Commands/WULA_Exit_Mech</ejectPilotIcon>
</li>
<li Class="WulaFallenEmpire.CompProperties_MechFuel">
<!-- <li Class="WulaFallenEmpire.CompProperties_MechFuel">
<fuelType>Chemfuel</fuelType>
<fuelCapacity>70</fuelCapacity>
<dailyFuelConsumption>35</dailyFuelConsumption>
@@ -1211,7 +1479,7 @@
<autoRefuelThreshold>1</autoRefuelThreshold>
<shutdownWhenEmpty>true</shutdownWhenEmpty>
</li>
</li> -->
<li Class="WulaFallenEmpire.CompProperties_MechRepairable">
<allowAutoRepair>true</allowAutoRepair>
<healthPercentThreshold>1</healthPercentThreshold>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -1,6 +1,7 @@
using RimWorld;
using System;
using System.Collections.Generic;
using RimWorld;
using UnityEngine;
using Verse;
using Verse.Sound;
@@ -13,7 +14,72 @@ namespace WulaFallenEmpire
{
// 缓存ModExtension
private ProjectileExtension_DirectHit directHitExtension = null;
private TrackingBulletDef trackingDefInt;
private int Fleck_MakeFleckTick;
private Vector3 lastTickPosition;
public TrackingBulletDef TrackingDef
{
get
{
if (trackingDefInt == null)
{
trackingDefInt = def.GetModExtension<TrackingBulletDef>();
if (trackingDefInt == null)
{
Log.ErrorOnce($"TrackingBulletDef for {this.def.defName} is null. Creating a default instance.", this.thingIDNumber ^ 0x12345678);
this.trackingDefInt = new TrackingBulletDef();
}
}
return trackingDefInt;
}
}
public override void Launch(Thing launcher, Vector3 origin, LocalTargetInfo usedTarget, LocalTargetInfo intendedTarget, ProjectileHitFlags hitFlags, bool preventFriendlyFire = false, Thing equipment = null, ThingDef targetCoverDef = null)
{
base.Launch(launcher, origin, usedTarget, intendedTarget, hitFlags, preventFriendlyFire, equipment, targetCoverDef);
lastTickPosition = origin;
}
protected override void Tick()
{
base.Tick();
// 处理拖尾特效
if (TrackingDef != null && TrackingDef.tailFleckDef != null)
{
Fleck_MakeFleckTick++;
if (Fleck_MakeFleckTick >= TrackingDef.fleckDelayTicks)
{
if (Fleck_MakeFleckTick >= (TrackingDef.fleckDelayTicks + TrackingDef.fleckMakeFleckTickMax))
{
Fleck_MakeFleckTick = TrackingDef.fleckDelayTicks;
}
Map map = base.Map;
int randomInRange = TrackingDef.fleckMakeFleckNum.RandomInRange;
Vector3 currentPosition = base.ExactPosition;
Vector3 previousPosition = lastTickPosition;
for (int i = 0; i < randomInRange; i++)
{
float num = (currentPosition - previousPosition).AngleFlat();
float velocityAngle = TrackingDef.fleckAngle.RandomInRange + num;
float randomInRange2 = TrackingDef.fleckScale.RandomInRange;
float randomInRange3 = TrackingDef.fleckSpeed.RandomInRange;
FleckCreationData dataStatic = FleckMaker.GetDataStatic(currentPosition, map, TrackingDef.tailFleckDef, randomInRange2);
dataStatic.rotation = (currentPosition - previousPosition).AngleFlat();
dataStatic.rotationRate = TrackingDef.fleckRotation.RandomInRange;
dataStatic.velocityAngle = velocityAngle;
dataStatic.velocitySpeed = randomInRange3;
map.flecks.CreateFleck(dataStatic);
}
}
}
lastTickPosition = base.ExactPosition;
}
// 标记是否已经应用了直击伤害
private bool directDamageApplied = false;
@@ -21,6 +87,20 @@ namespace WulaFallenEmpire
{
base.ExposeData();
Scribe_Values.Look(ref directDamageApplied, "directDamageApplied", false);
Scribe_Values.Look(ref Fleck_MakeFleckTick, "Fleck_MakeFleckTick", 0);
Scribe_Values.Look(ref lastTickPosition, "lastTickPosition", Vector3.zero);
if (Scribe.mode == LoadSaveMode.PostLoadInit)
{
if (this.trackingDefInt == null)
{
this.trackingDefInt = this.def.GetModExtension<TrackingBulletDef>();
if (this.trackingDefInt == null)
{
Log.ErrorOnce($"TrackingBulletDef is null for projectile {this.def.defName} after PostLoadInit. Creating a default instance.", this.thingIDNumber ^ 0x12345678);
this.trackingDefInt = new TrackingBulletDef();
}
}
}
}
protected override void Impact(Thing hitThing, bool blockedByShield = false)

9
木精灵.ini Normal file
View File

@@ -0,0 +1,9 @@
木精灵
居住在边缘世界的尖耳朵白皮精灵,种族擅长射击、种植、驯兽,不擅长挖矿。
崇尚自然的力量。整个社会停留在中世纪时期,树木会为精灵带来好心情。
厌恶破坏自然(砍树和挖矿),不会去做这些工作。
开局会携带精灵母树种子,这种母树是精灵的核心生产工具,可以升级解锁科技,可以产出多种种子,种下后可以获得持续的矿物、木材产出,获得树人侍从和防御塔等
本家矿物产量很低,但是科技不需要金属
擅长弓箭、标枪和长枪,装备围绕木制装备设计
树人是精灵的伙伴,拥有强大的承伤能力,可以作为前排,但是没什么输出能力,高级树人可以通过镇压大范围敌人来减速拉住敌人。平常不吃东西,受伤会吞噬树木恢复血量