CombatExtended-Continued / CombatExtended

Combat Extended mod for RimWorld
381 stars 255 forks source link

[Bug]:Mechanoids can't parry or block (edit: only humans can parry) #3360

Open skycrossercat opened 3 months ago

skycrossercat commented 3 months ago

Rimworld version: 1.5.4104 Combat Extended version: 15.6.0.0 Combat Extended source (Steam, GitHub, etc.): Dev Snapshot through discord pinned link (fresh download) Your operating system: Windows11 Your mod list: Harmony Core Royalty Ideology Biotech Vanilla Expanded Framework Combat Extended Dead Man Switch (local test version)

Description Mechs can't parry any kinds of melee attack, they either take them or dodge them, no matter how high the parry chance is. update: with additonal reports, insects and fleshbeasts can't parry either, it's possible that only human can parry attacks

Expected behavior They should be able to parry or block melee attacks occasionally like normal human pawns.

To reproduce Spawn a scyther (you can even bump up its parry chance to extreme value through editing xml), let fully armored pawns, even with bare hands to fight it, it can't parry a single hit. Try it again against human pawns with similar parry chance, they would possiblely parry one or two hits.

Screenshots & log dumps This would be better to present with videos, but the file limit is too small.

Complete the following checklist I hereby verify that I have done the following:

skycrossercat commented 2 months ago

found this block in the source code: if (pawn == null || pawn.Dead || !pawn.RaceProps.Humanlike || pawn.WorkTagIsDisabled(WorkTags.Violent) || !pawn.health.capacities.CapableOf(PawnCapacityDefOf.Manipulation) || IsTargetImmobile(pawn) || pawn.MentalStateDef == MentalStateDefOf.SocialFighting) { return false and the second line states !pawn.RaceProps.Humanlike in this block, does that mean if pawns are not human-like, the parry code would reture to false?