protected override bool OnContact(Figure figure) { float damage = Owner.IsEnemy(figure.Owner) ? Damage : 0; figure.OnAttack(this, damage); return true; }
protected override void OnFigureCollided(Figure figure, int bounceHeight, bool forced) { if (figure.Owner.IsAlly(Owner)) { if (forced && ap.CurrValue <= 0) { figure.OnAttack(this, penaltiAllyAttack.Calculate(-bounceHeight)); } } else { figure.OnAttack(this, simpleAttack.Calculate(-bounceHeight)); } }