using GlobalClassLib; using ONDServer.Map; using PacketLib; namespace ONDServer.Enemies; public abstract class Enemy : GlobalEnemy { public int Difficulty { get; protected set; } protected Enemy(int difficulty) { Difficulty = difficulty; } public abstract bool BlocksTile { get; set; } public bool Spawned { get; set; } public virtual void SpawnSilent(MapTile location) { Console.WriteLine($"!!! Silent spawn not implemented for enemy {TypeId} ({Name}), reverting to regular spawn"); Spawn(location); } public override void Spawn(MapTile location) { base.Spawn(location); Spawned = true; } public abstract void Reset(); public virtual void Attack(ServerPlayer player) { Server.SendUpdateToAll([GameEvent.ENEMY_ATTACK(Id, player.state.pid)]); GameLogic.DeclareWinner(Server.OtherPlayer(player)); } public abstract void SetDifficulty(int difficulty); }