feat(WulaFallenEmpire): 优化 Excalibur 武器效果

- 调整武器参数,降低暴击率,提高单次射击威力
- 优化爆炸效果,增加延迟和视觉效果
- 修复部分功能,如毁坏后不产生效果的问题
- 调整伤害计算方式,简化公式
- 移除不必要的代码和注释,提高代码可读性
This commit is contained in:
2025-08-27 21:41:40 +08:00
parent 59726c3a73
commit 0d6151aff5
4 changed files with 86 additions and 46 deletions

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using RimWorld;
using UnityEngine;
using Verse;
@@ -54,12 +53,10 @@ namespace WulaFallenEmpire
{
get
{
// Use the damageAmount from VerbProperties if set, otherwise use the base damage
if (this.ExcaliburProps.damageAmount > 0)
{
return this.ExcaliburProps.damageAmount;
}
// Removed AncotUtility.QualityFactor, using a simple multiplier for now
return 1.0f * this.damageAmountBase;
}
}
@@ -68,27 +65,14 @@ namespace WulaFallenEmpire
{
get
{
// Use the armorPenetration from VerbProperties if set, otherwise use the base value
if (this.ExcaliburProps.armorPenetration >= 0)
{
return this.ExcaliburProps.armorPenetration;
}
// Removed AncotUtility.QualityFactor, using a simple multiplier for now
return 1.0f * this.armorPenetrationBase;
}
}
// Temporarily commented out CompWeaponCharge related code
/*
public CompWeaponCharge compCharge
{
get
{
return this.weapon.TryGetComp<CompWeaponCharge>();
}
}
*/
private VerbProperties_Excalibur ExcaliburProps
{
get
@@ -97,6 +81,14 @@ namespace WulaFallenEmpire
}
}
protected override int ShotsPerBurst
{
get
{
return this.verbProps.burstShotCount;
}
}
protected override bool TryCastShot()
{
// Calculate all affected cells once
@@ -111,14 +103,14 @@ namespace WulaFallenEmpire
beam.pathWidth = this.ExcaliburProps.pathWidth;
beam.weaponDef = this.CasterPawn.equipment.Primary.def;
beam.damageDef = this.ExcaliburProps.damageDef;
beam.StartStrike(allAffectedCells, this.verbProps.burstShotCount, this.verbProps.burstShotCount);
beam.StartStrike(allAffectedCells, this.ShotsPerBurst, this.ShotsPerBurst);
return true;
}
public override void DrawHighlight(LocalTargetInfo target)
{
GenDraw.DrawFieldEdges(this.AffectedCells(target), SimpleColor.Red);
GenDraw.DrawFieldEdges(this.AffectedCells(target));
}
private List<IntVec3> AffectedCells(LocalTargetInfo target)