Beispiel #1
0
 public AllyComponent(Game game, int x, int y, int Level, int[,] Map, Vector2 position, SpriteBatch spriteBatch, Texture2D sprite)
     : base(game)
 {
     offsetX          = x;
     Aggro            = false;
     offsetY          = y;
     Strength         = (int)Math.Truncate(Level * 1.6 + 5);
     Endurance        = (int)Math.Truncate(Level * 1.4 + 5);
     Wisdom           = (int)Math.Truncate(5 + Level * 1.2);
     Health[0]        = Endurance * 15;
     Health[1]        = Endurance * 15;
     formation        = 1;
     alive            = true;
     MoveMe           = new pathFinder(Map);
     this.position[0] = ((int)position.X) + 1; //+1 to be in the door of the tent
     this.position[1] = ((int)position.Y) + 1;
     aniSprite        = new AnimatedSprite(game, sprite, spriteBatch);
 }
Beispiel #2
0
        public MobComponent(Game game, int[] mobposition, int Level, int[,] Map, bool Boss, SpriteBatch spriteBatch, Texture2D sprite)
            : base(game)
        {
            isBoss        = Boss;
            iMap          = Map;
            MoveMe        = new pathFinder(iMap);
            isSelected    = false;
            targetAlly    = false;
            this.position = mobposition;
            alive         = true;
            random        = new Random();
            colour        = Color.White;
            if (!isBoss)
            {
                Strength  = (int)Math.Truncate(Level * 1.6 + 5);
                Endurance = (int)Math.Truncate(Level * 1.4 + 5);
                Wisdom    = (int)Math.Truncate(5 + Level * 1.2);
            }
            else
            {
                Strength  = (int)Math.Truncate(Level * 10.2 + 8);
                Endurance = (int)Math.Truncate(Level * 10.6 + 8);
                Wisdom    = (int)Math.Truncate(8 + Level * 9.4);
            }
            aniSprite         = new AnimatedSprite(game, sprite, spriteBatch);
            playerposition[0] = 0;
            playerposition[1] = 0;

            Health[0] = Endurance * 25;
            Health[1] = Endurance * 25;

            this.Level = Level;
            if (isBoss)
            {
                Experience = Level * 500;
            }
            else
            {
                Experience = Level * 100;
            }
        }