public void OnEventAboutToTrigger(RuleCheckSoftCover evt)
 {
     if (CheckAttackType(evt))
     {
         evt.IgnoreUnits.Add(Owner.Unit);
     }
 }
 private bool CheckAttackType(RuleCheckSoftCover evt)
 {
     return(!RangedAttacksOnly && !MeleeAttacksOnly && !TouchAttacksOnly ||
            RangedAttacksOnly && TouchAttacksOnly && evt.AttackType == AttackType.RangedTouch ||
            MeleeAttacksOnly && TouchAttacksOnly && evt.AttackType == AttackType.Touch ||
            RangedAttacksOnly && !TouchAttacksOnly && evt.AttackType.IsRanged() ||
            MeleeAttacksOnly && !TouchAttacksOnly && evt.AttackType.IsMelee() ||
            TouchAttacksOnly && !RangedAttacksOnly && !MeleeAttacksOnly && evt.AttackType.IsTouch());
 }
 public void OnEventDidTrigger(RuleCheckSoftCover evt)
 {
 }