This commit is contained in:
2025-09-29 14:38:07 +08:00
parent 094211f554
commit a611a400cc
3 changed files with 147 additions and 6 deletions

Binary file not shown.

View File

@@ -13,7 +13,7 @@
<projectile>
<speed>60</speed>
<damageDef>ARA_AcidBurn</damageDef>
<damageAmountBase>5</damageAmountBase>
<damageAmountBase>8</damageAmountBase>
<filth>Filth_SpentAcid</filth>
<filthCount>2</filthCount>
<explosionSpawnsSingleFilth>true</explosionSpawnsSingleFilth>
@@ -44,6 +44,146 @@
</modExtensions>
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>Bullet_RW_Missile_HG_Gun</defName>
<label>小型酸烧导弹</label>
<graphicData>
<graphicClass>Graphic_Single_AgeSecs</graphicClass>
<texPath>ArachnaeSwarm/Mote/ARA_CatastropheMissile_Shell</texPath>
<drawSize>(1.25,1.25)</drawSize>
<shaderType>MoteGlow</shaderType>
</graphicData>
<thingClass>ArachnaeSwarm.Projectile_ExplosiveTrackingBullet</thingClass>
<projectile>
<speed>60</speed>
<damageDef>ARA_AcidBurn</damageDef>
<damageAmountBase>12</damageAmountBase>
<filth>Filth_SpentAcid</filth>
<filthCount>2</filthCount>
<explosionSpawnsSingleFilth>true</explosionSpawnsSingleFilth>
<explosionRadius>2.1</explosionRadius>
<explosionEffect>Shell_AcidSpitImpact</explosionEffect>
<explosionEffectLifetimeTicks>60</explosionEffectLifetimeTicks>
<soundExplode>Explosion_EMP</soundExplode>
<armorPenetrationBase>0.25</armorPenetrationBase>
<screenShakeFactor>0.5</screenShakeFactor>
<flyOverhead>true</flyOverhead>
</projectile>
<modExtensions>
<li Class="ArachnaeSwarm.ExplosiveTrackingBulletDef">
<explosionRadius>2.1</explosionRadius>
<damageDef>ARA_AcidBurn</damageDef>
</li>
<li Class="ArachnaeSwarm.TrackingBulletDef">
<homingSpeed>0.5</homingSpeed>
<initRotateAngle>15</initRotateAngle>
<destroyTicksAfterLosingTrack>
<min>60</min>
<max>120</max>
</destroyTicksAfterLosingTrack>
<tailFleckDef>Fleck_AcidSpitLaunchedDenseMist</tailFleckDef>
<fleckMakeFleckTickMax>3</fleckMakeFleckTickMax>
<impactThreshold>1</impactThreshold>
</li>
<li Class="ArachnaeSwarm.ShotgunExtension">
<pelletCount>2</pelletCount>
</li>
</modExtensions>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Missile_HG_Gun</defName>
<label>武装器官"双发天灾炮"</label>
<description>阿拉克涅虫群督虫使用基础远程武装器官,作为双持手枪形态发射小型酸爆虫导弹。这种武器的特点就是其比迅发天灾炮相比口径较大的导弹和轻便易使用。</description>
<tickerType>Normal</tickerType>
<techLevel>Animal</techLevel>
<descriptionHyperlinks>
<ThingDef>ARA_Cocoon_Weapon</ThingDef>
</descriptionHyperlinks>
<graphicData>
<texPath>ArachnaeSwarm/Weapon/ARA_RW_Basic_Fist_Needle_Gun</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>0.75</drawSize>
</graphicData>
<uiIconScale>1.3</uiIconScale>
<soundInteract>SpitterSpawn</soundInteract>
<recipeMaker>
<recipeUsers Inherit="False" />
<researchPrerequisite>ARA_Technology_5PAV</researchPrerequisite>
<unfinishedThingDef>UnfinishedWeapon</unfinishedThingDef>
</recipeMaker>
<statBases>
<WorkToMake>1300</WorkToMake>
<!-- <MarketValue>370</MarketValue> -->
<Mass>4</Mass>
<AccuracyTouch>0.5</AccuracyTouch>
<AccuracyShort>0.4</AccuracyShort>
<AccuracyMedium>0.35</AccuracyMedium>
<AccuracyLong>0.3</AccuracyLong>
<RangedWeapon_Cooldown>2.5</RangedWeapon_Cooldown>
</statBases>
<verbs>
<li>
<verbClass>ArachnaeSwarm.Verb_ShootShotgun</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
<warmupTime>0.8</warmupTime>
<defaultProjectile>Bullet_RW_Missile_HG_Gun</defaultProjectile>
<range>32</range>
<burstShotCount>2</burstShotCount>
<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
<soundCast>SpitterSpit</soundCast>
<targetParams>
<canTargetLocations>true</canTargetLocations>
</targetParams>
</li>
</verbs>
<costList Inherit="False">
<ARA_Carapace>25</ARA_Carapace>
</costList>
<weaponTags>
<li>ARA_Armed_Organ</li>
<li>ARA_Armed_Organ_Ranged</li>
<li>ARA_Armed_Organ_T1</li>
</weaponTags>
<thingSetMakerTags>
<li>RewardStandardQualitySuper</li>
</thingSetMakerTags>
<tools Inherit="False">
<li>
<label>拳针枪拳击</label>
<capacities>
<li>Poke</li>
</capacities>
<power>10</power>
<armorPenetration>0.25</armorPenetration>
<cooldownTime>1.25</cooldownTime>
<extraMeleeDamages>
<li>
<def>Stun</def>
<amount>12</amount>
</li>
</extraMeleeDamages>
</li>
</tools>
<comps>
<li Class="ArachnaeSwarm.CompProperties_GiveHediffOnShot">
<hediffDef>ARA_ChainReload</hediffDef>
<severityToAdd>0.2</severityToAdd>
</li>
<li Class="ArachnaeSwarm.CompProperties_CustomUniqueWeapon" MayRequire="Ludeon.RimWorld.Odyssey">
<forcedTraits>
<li>ARA_Weapon_Damage_Acid</li>
<li>ARA_Weapon_ChainReload</li>
</forcedTraits>
<numTraitsRange>
<min>2</min>
<max>2</max>
</numTraitsRange>
</li>
</comps>
</ThingDef>
<ThingDef ParentName="BaseHumanMakeableGun">
<defName>ARA_RW_Missile_AR_Gun</defName>
<label>武装器官"迅发天灾炮"</label>
@@ -105,16 +245,17 @@
<comps>
<li Class="ArachnaeSwarm.CompProperties_GiveHediffOnShot">
<hediffDef>ARA_ChainReload</hediffDef>
<severityToAdd>1</severityToAdd>
<severityToAdd>0.1</severityToAdd>
</li>
<li Class="ArachnaeSwarm.CompProperties_CustomUniqueWeapon" MayRequire="Ludeon.RimWorld.Odyssey">
<forcedTraits>
<li>ARA_Huge_Weapon</li>
<li>ARA_Weapon_Damage_Acid</li>
<li>ARA_Weapon_ChainReload</li>
</forcedTraits>
<numTraitsRange>
<min>2</min>
<max>2</max>
<min>3</min>
<max>3</max>
</numTraitsRange>
</li>
</comps>

View File

@@ -23,8 +23,8 @@ namespace ArachnaeSwarm
}
// 3. 创建Harmony补丁
// 补丁目标为 Verb_Shoot.TryCastShot。这是所有射击动作的通用入口。
[HarmonyPatch(typeof(Verb_Shoot), "TryCastShot")]
// 补丁目标为 Verb_LaunchProjectile.TryCastShot。这是所有发射弹丸动作的通用入口。
[HarmonyPatch(typeof(Verb_LaunchProjectile), "TryCastShot")]
public static class Patch_Verb_Shoot_TryCastShot
{
// 使用[HarmonyPostfix]特性来创建一个在原方法执行后运行的补丁