public static bool ApplyAttack(Mobile m) { if (IsUnderAttackEffect(m)) { return(false); } m_AttackTable.Add(m); var timer = new AttackTimer(m); timer.Start(); m.SendLocalizedMessage(1062319); // Your attack chance has been reduced! return(true); }
public void On_Area_Entered(Node body) { if (body.IsInGroup("Enemies")) { Enemy enemy = body.GetOwner <Enemy>(); CloseEnemies.Add(WeakRef(enemy)); enemy.Connect("EnemyDied", this, nameof(this.RemoveEnemy)); if (CloseEnemies.Count > 0 && !Attacking) { Attacking = true; this.Attack(); AttackTimer.Start(AttackDelay); } } }