static bool Prefix(TwoWeaponFightingDamagePenalty __instance, RuleCalculateWeaponStats evt) { ItemEntityWeapon maybeWeapon1 = evt.Initiator.Body.PrimaryHand.MaybeWeapon; ItemEntityWeapon maybeWeapon2 = evt.Initiator.Body.SecondaryHand.MaybeWeapon; var brawler_part = evt.Initiator?.Get <Brawler.UnitPartBrawler>(); if ((brawler_part?.checkTwoWeapponFlurry()).GetValueOrDefault()) { is_off_hand = false; return(false); } if (evt.Weapon == null || maybeWeapon1 == null || maybeWeapon2 == null || (maybeWeapon1.Blueprint.IsNatural && (!maybeWeapon1.Blueprint.IsUnarmed || Aux.isMainHandUnarmedAndCanBeIgnored(maybeWeapon1.Blueprint, evt.Initiator.Descriptor))) || (maybeWeapon2.Blueprint.IsNatural && (!maybeWeapon2.Blueprint.IsUnarmed || Aux.isOffHandUnarmedAndCanBeIgnored(maybeWeapon2.Blueprint, evt.Initiator.Descriptor))) || maybeWeapon2 != evt.Weapon || (bool)evt.Initiator.Descriptor.State.Features.DoubleSlice || ((evt.Weapon?.Blueprint.IsUnarmed).GetValueOrDefault() && !is_off_hand) ) { is_off_hand = false; return(false); } evt.SecondaryWeapon = true; is_off_hand = false; return(false); }
private static bool considerUnarmedAndIgnoreOffHand(BlueprintItemWeapon weapon, UnitDescriptor unit) { return(Aux.isOffHandUnarmedAndCanBeIgnored(weapon, unit)); }
private static bool considerUnarmedAndIgnoreOffHand(BlueprintItemWeapon weapon, RuleCalculateAttacksCount evt) { return(Aux.isOffHandUnarmedAndCanBeIgnored(weapon, evt.Initiator.Descriptor)); }