public Monster(int characterLevel, Room room, Random rand) { Name = "Scary Monster"; MaxHealth = characterLevel / 3; Attack = characterLevel / 3; MoveSpeed = 300; StartPosition = new Position(rand.Next(room.Width), rand.Next(room.Height)); }
public Monster(int characterLevel, Room room, Random rand) { Name = "Slime"; MaxHealth = characterLevel + 2; Attack = characterLevel + 7; MoveSpeed = rand.Next(95, 220); AnimationSpeed = 12; DropItem = GetDropItem(rand); Width = 155; Height = 155; CollisionWidth = 188; CollisionHeight = 52; CollisionX = 62; CollisionY = 120; //boss monster! if (characterLevel > 5 && rand.Next(16) == 3) { Image = @"../Content/GameContent/Images/slime_sprite_green.png"; MoveSpeed = 220; AnimationSpeed = 14; Attack = Attack * 2; Name = "Boss"; DropItem = GetBossDropItem(rand); } else { if (MoveSpeed < 145) { Image = @"../Content/GameContent/Images/slime_sprite4.png"; Attack += (int)(Attack * 1.5); AnimationSpeed -= rand.Next(1, 4); } if (MoveSpeed >= 145) { Image = @"../Content/GameContent/Images/slime_sprite_red.png"; } if (MoveSpeed >= 170) { AnimationSpeed += rand.Next(1, 4); } } StartPosition = new Position(rand.Next(room.Width - Width), rand.Next(room.Height - Height)); while (StartPosition.X < 300 || StartPosition.Y < 300) { StartPosition.X = rand.Next(room.Width - Width); StartPosition.Y = rand.Next(room.Height - Height); } }
public Monster(int characterLevel, Room room, Random rand) { Name = "Scary Monster"; MaxHealth = characterLevel / 3; Attack = characterLevel / 3; MoveSpeed = 300; DropItem = GetDropItem(rand); Image = @"/Content/GameContent/Images/monster_small.png"; Width = 250; Height = 172; CollisionWidth = 188; CollisionHeight = 52; CollisionX = 62; CollisionY = 120; StartPosition = new Position(rand.Next(room.Width), rand.Next(room.Height)); }