static bool Prefix(UnitAttack __instance, AttackHandInfo attack) { var combatManeuver = Rulebook.Trigger(new RuleCheckCombatManeuverReplaceAttack(__instance.Executor, __instance.Target, attack)).Result; if (combatManeuver == CombatManeuver.None) { return(true); } var lastAttackRule = new RuleAttackWithWeapon(__instance.Executor, __instance.Target, attack.Weapon, attack.AttackBonusPenalty) { IsRend = __instance.IsRend(__instance.PlannedAttack), IsFirstAttack = (attack.AttackNumber == 0), IsFullAttack = __instance.IsFullAttack, IsCharge = __instance.IsCharge, AttackNumber = attack.AttackNumber, AttacksCount = ((List <AttackHandInfo>)unitattack_get_m_AllAttacks(__instance)).Count }; unitattack_set_LastAttackRule(__instance, lastAttackRule); attack.Target = __instance.Target; attack.IsHit = __instance.Executor.TriggerAttackReplacementCombatManeuver(__instance.Target, attack.Weapon, attack.AttackBonusPenalty, combatManeuver); return(false); }