diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index 1d5587d1..a214cda7 100644 Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Weapon.xml b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Weapon.xml index 6d69bbb4..893acabf 100644 --- a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Weapon.xml +++ b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Weapon.xml @@ -611,78 +611,7 @@
  • RewardStandardQualitySuper
  • - - - WULA_MW_ChainSword - - 这种嗡嗡作响的乌拉帝国链锯类武器有多条环绕剑脊高速旋转的多层复合锯齿链条,之间嵌有能量传导节点或微型冷却剂喷口,是力量与纯粹疯狂的象征。 - - Wula/Weapon/WULA_MW_ChainSword - Graphic_Single - CutoutComplex - - - Spacer - 60 - -
  • Metallic
  • -
    - - 5 - 3 - - - 20000 - 2.5 - - -
  • - - -
  • Cut
  • - - 0.5 - 25 - 1.2 - Pawn_Melee_PowerClaw_Hit - Pawn_Melee_PowerClaw_Miss - -
  • - - -
  • Blunt
  • -
  • Poke
  • - - 18 - 1.5 - - -
  • - Stun - 5 -
  • -
    -
    - -
    - - -
  • WULA_Cube_Productor_Energy
  • -
    - WULA_Synth_Weapon_2_Melee_Technology - - 7 - - 450 - UnfinishedWeapon -
    - -
  • Wula_Melee_Weapon_T2
  • -
    - -
  • RewardStandardQualitySuper
  • -
    -
    + WULA_MW_Glaive @@ -712,7 +641,7 @@ 30000 - 100 + 5
  • diff --git a/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Weapon_ChainSword.xml b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Weapon_ChainSword.xml new file mode 100644 index 00000000..f94862d7 --- /dev/null +++ b/1.6/1.6/Defs/ThingDefs_Misc/Weapons/WULA_Weapon_ChainSword.xml @@ -0,0 +1,102 @@ + + + + + + WULA_MW_ChainSword + + 这种嗡嗡作响的乌拉帝国链锯类武器有多条环绕剑脊高速旋转的多层复合锯齿链条,之间嵌有能量传导节点或微型冷却剂喷口,是力量与纯粹疯狂的象征。 + + Wula/Weapon/WULA_MW_ChainSword + Graphic_Single + CutoutComplex + + + Spacer + 60 + +
  • Metallic
  • + + + 5 + 3 + + + 20000 + 2.5 + + +
  • + + +
  • WULA_MW_ChainSword_MultiStrike
  • + + 0.5 + 25 + 1.2 + Pawn_Melee_PowerClaw_Hit + Pawn_Melee_PowerClaw_Miss + +
  • + + +
  • Blunt
  • +
  • Poke
  • + + 18 + 1.5 + + +
  • + Stun + 5 +
  • +
    +
    + +
    + + +
  • WULA_Cube_Productor_Energy
  • +
    + WULA_Synth_Weapon_2_Melee_Technology + + 7 + + 450 + UnfinishedWeapon +
    + +
  • Wula_Melee_Weapon_T2
  • +
    + +
  • RewardStandardQualitySuper
  • +
    + +
  • + 5~8 + 0.2 +
  • +
    +
    + + + WULA_MW_ChainSword_MultiStrike + + + + + WULA_MW_ChainSword_Maneuver + WULA_MW_ChainSword_MultiStrike + + WulaFallenEmpire.Verb_MeleeAttack_MultiStrike + Cut + + MeleeAttack + Maneuver_Slash_MeleeHit + Maneuver_Slash_MeleeDeflect + Maneuver_Slash_MeleeMiss + Maneuver_Slash_MeleeDodge + + + \ No newline at end of file diff --git a/Source/WulaFallenEmpire/Verb/CompMultiStrike.cs b/Source/WulaFallenEmpire/Verb/CompMultiStrike.cs new file mode 100644 index 00000000..a0af3870 --- /dev/null +++ b/Source/WulaFallenEmpire/Verb/CompMultiStrike.cs @@ -0,0 +1,20 @@ +using Verse; + +namespace WulaFallenEmpire +{ + public class CompProperties_MultiStrike : CompProperties + { + public IntRange strikeCount = new IntRange(3, 3); + public float damageMultiplierPerStrike = 0.5f; + + public CompProperties_MultiStrike() + { + compClass = typeof(CompMultiStrike); + } + } + + public class CompMultiStrike : ThingComp + { + public CompProperties_MultiStrike Props => (CompProperties_MultiStrike)props; + } +} \ No newline at end of file diff --git a/Source/WulaFallenEmpire/Verb/Verb_MeleeAttack_MultiStrike.cs b/Source/WulaFallenEmpire/Verb/Verb_MeleeAttack_MultiStrike.cs new file mode 100644 index 00000000..de61c31c --- /dev/null +++ b/Source/WulaFallenEmpire/Verb/Verb_MeleeAttack_MultiStrike.cs @@ -0,0 +1,53 @@ +using RimWorld; +using Verse; + +namespace WulaFallenEmpire +{ + public class Verb_MeleeAttack_MultiStrike : Verb_MeleeAttack + { + private CompMultiStrike Comp + { + get + { + return this.EquipmentSource?.GetComp(); + } + } + + protected override DamageWorker.DamageResult ApplyMeleeDamageToTarget(LocalTargetInfo target) + { + DamageWorker.DamageResult result = new DamageWorker.DamageResult(); + if (this.Comp != null && target.HasThing) + { + int strikes = this.Comp.Props.strikeCount.RandomInRange; + for (int i = 0; i < strikes; i++) + { + if (target.ThingDestroyed) + { + break; + } + DamageInfo dinfo = new DamageInfo(this.verbProps.meleeDamageDef, this.verbProps.AdjustedMeleeDamageAmount(this, this.CasterPawn) * this.Comp.Props.damageMultiplierPerStrike, this.verbProps.AdjustedArmorPenetration(this, this.CasterPawn) * this.Comp.Props.damageMultiplierPerStrike, -1f, this.CasterPawn, null, this.EquipmentSource?.def); + dinfo.SetTool(this.tool); + DamageWorker.DamageResult damageResult = target.Thing.TakeDamage(dinfo); + result.totalDamageDealt += damageResult.totalDamageDealt; + result.wounded = (result.wounded || damageResult.wounded); + result.stunned = (result.stunned || damageResult.stunned); + if (damageResult.parts != null) + { + if (result.parts == null) + { + result.parts = new System.Collections.Generic.List(); + } + result.parts.AddRange(damageResult.parts); + } + } + } + else + { + DamageInfo dinfo2 = new DamageInfo(this.verbProps.meleeDamageDef, this.verbProps.AdjustedMeleeDamageAmount(this, this.CasterPawn), this.verbProps.AdjustedArmorPenetration(this, this.CasterPawn), -1f, this.CasterPawn, null, this.EquipmentSource?.def); + dinfo2.SetTool(this.tool); + result = target.Thing.TakeDamage(dinfo2); + } + return result; + } + } +} \ No newline at end of file diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj index 88f58507..fa7ccff1 100644 --- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj +++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj @@ -156,6 +156,8 @@ + +