Všechna monstra, dynamický targeting. Bugfixy u monster.

This commit is contained in:
Perry 2026-03-17 20:14:29 +01:00
parent 55fd052072
commit 4fdff0a0cc
18 changed files with 345 additions and 43 deletions

View file

@ -8,7 +8,8 @@ public class SpotEnemy : Enemy {
public SpotEnemy(int difficulty) : base(difficulty) {
path = [MapManager.Get(10), MapManager.Get(11), MapManager.Get(12), MapManager.Get(13), MapManager.Get(14)];
pathId = 2;
movementOpportunity = new(6000, (2 * Math.Sign(difficulty) + difficulty) / 12.0);
movementOpportunity = new(6000);
SetDifficulty(difficulty);
}
public override string Name{ get; } = "Spot";
@ -30,6 +31,11 @@ public class SpotEnemy : Enemy {
Server.SendUpdateToAll([GameEvent.ENEMY_RESET(Id, Location.Id)]);
}
public override void SetDifficulty(int difficulty) {
Difficulty = difficulty;
movementOpportunity.MovementChance = (2 * Math.Sign(difficulty) + difficulty) / 12.0;
}
public override void Update() {
if (GameLogic.NSecondUpdate){
if(!movementOpportunity.Running)