public Ballista_lavaBoltMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 3.0f;
     damageList.Add(new Damage(25, DamageType.PHYSICAL));
     damageList.Add(new Damage(50, DamageType.FIRE));
 }
Esempio n. 2
0
 protected Missile(Tower ownerTower, Minion targetMinion)
 {
     instanceId = idGenerator++;
     this.ownerTower = ownerTower;
     this.targetMinion = targetMinion;
     this.position = ownerTower.getWorldPosition();
 }
 public SeedTowerAreaEffect(Tower ownerTower, Vector3 worldPosition, int numOfTarget)
     : base(ownerTower.board.player, worldPosition)
 {
     this.ownerTower = ownerTower;
     this.numOfTarget = numOfTarget;
     remainingDuration = DURATION_DEFAUT;
 }
Esempio n. 4
0
        protected float movementSpeed = 5; // TODO Minion statstan al

        #endregion Fields

        #region Constructors

        protected Missile(Vector3 startWorldPosition, Tower ownerTower, Minion targetMinion)
        {
            instanceId = idGenerator++;
            this.targetMinion = targetMinion;
            this.ownerTower = ownerTower;
            this.position = startWorldPosition;
        }
 public SeedTowerPlantMissile(Tower ownerTower, Vector3 startWorldPosition, Minion targetMinion)
     : base(startWorldPosition, ownerTower, targetMinion)
 {
     this.startWorldPosition = startWorldPosition;
     movementSpeed = 5.0f;
     damageList.Add(new Damage(50, DamageType.FIRE));
 }
 public TrypanophobiaMissile(Tower ownerTower, Minion targetMinion, float runBackTime)
     : base(ownerTower, targetMinion)
 {
     this.runBackTime = runBackTime;
     movementSpeed = 5.0f;
     damageList.Add(new Damage(60, DamageType.PHYSICAL));
 }
Esempio n. 7
0
 public ContagiousMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 5;
     damageList.Add(new Damage(0, DamageType.FIRE));
     movementSpeed = 3.0f;
 }
 public OneToAll_toxicMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 3.0f;
     damageList.Add(new Damage(20, DamageType.PHYSICAL));
     damageList.Add(new Damage(40, DamageType.POISON));
 }
Esempio n. 9
0
 public PetrolBombMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 5.0f;
     damageList.Add(new Damage(0, DamageType.POISON));
     targetPosition = targetMinion.getWorldPosition();
     targetBoard = targetMinion.position.board;
 }
Esempio n. 10
0
 public NailTrapMissile(Tower ownerTower, Minion targetMinion,float slowAmount,float dmgPerSecond)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 50.0f;
     damageList.Add(new Damage(0, DamageType.POISON));
     targetPosition = targetMinion.getWorldPosition();
     targetBoard = targetMinion.position.board;
     this.slowAmount = slowAmount;
     this.dmgPerSecond = dmgPerSecond;
 }
Esempio n. 11
0
        public CatapultMissile(Tower ownerTower, Minion targetMinion)
            : base(ownerTower, targetMinion)
        {
            position.y += 0.4f;             // catapult'un atis yuksekligi. Simdilik böyle yazdım.
                                            // İleride bu yükseklik zımbırtısını nası atacaz server'a bakalım

            targetPosition = targetMinion.getWorldPosition();

            calcSpeedDirection();

            damageList.Add(new Damage(20,DamageType.PHYSICAL));
        }
Esempio n. 12
0
 public SeedTowerMissile(Tower ownerTower, Minion targetMinion, int numOfTarget)
     : base(ownerTower, targetMinion)
 {
     Random random = new Random();
     Vector3 offset = new Vector3((float)(random.NextDouble() - 0.5f) / 4.0f,
                                     0.0f,
                                     (float)(random.NextDouble() - 0.5f) / 4.0f);
     this.numOfTarget = numOfTarget;
     targetPosition = targetMinion.getWorldPosition() + offset;
     movementSpeed = 3.0f;
     damageList.Add(new Damage(0, DamageType.FIRE));
 }
Esempio n. 13
0
        public static void sendMessage(ICollection<Player> receiverPlayers, Tower tower)
        {
            RawMessage msg = new RawMessage();
            msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GDestroyTowerInfo)));

            if (receiverPlayers != null && receiverPlayers.Count != 0)
            {
                msg.putInt("bid", tower.board.instanceId);
                msg.putInt("iob", tower.indexOnBoard);

                foreach (var receiverPlayer in receiverPlayers)
                    receiverPlayer.user.session.client.SendMessage(msg);
            }
        }
        public static void sendMessage(ICollection<Player> receiverPlayers,Tower tower, ICollection<Minion> minionsToTeleport)
        {
            if (receiverPlayers != null && receiverPlayers.Count != 0)
            {
                RawMessage msg = new RawMessage();
                msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GTower_BlackHole_teleport)));

                msg.putInt("iid", tower.instanceId);

                int[] ids = new int[minionsToTeleport.Count];

                int index = 0;
                foreach(var minion in minionsToTeleport)
                    ids[index++] = minion.instanceId;

                msg.putIntArray("miid", ids);

                foreach (var receiverPlayer in receiverPlayers)
                    receiverPlayer.user.session.client.SendMessage(msg);
            }
        }
Esempio n. 15
0
 public RegularBoard()
 {
     if (towerSlots != null)
         towers = new Tower[towerSlots.positions.Length];
 }
Esempio n. 16
0
 public TeslaMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 3.0f;
     damageList.Add(new Damage(120, DamageType.FIRE));
 }
Esempio n. 17
0
        /// <summary>
        /// Verilen kuleyi board'dan siler. Oyunculari bu durumdan haberdar "etmez"!
        /// </summary>
        /// <param name="tower">board'dan silinecek kule</param>
        /// <returns>Verilen kulenin indexOnBoard degeri, towerSlots index araliginin disinda olmasi durumunda false return eder.
        /// Verilen kulenin, indexOnBoard ile belirtilen konumda bulunmamasi durumunda false return eder (Bu konumda boyle bir kule yok!). Diger her durum icin return 'true'dur.</returns>
        public bool RemoveTower(Tower tower)
        {
            int slotIndex = tower.indexOnBoard;

            if (slotIndex > 0 && slotIndex < towers.Length && towers[slotIndex] == tower)
            {
                towers[slotIndex] = null;
                return true;
            }
            return false;
        }
Esempio n. 18
0
 /// <summary>
 /// Verilen kuleyi indexi verilen towerSlot a yerlestirir. Oyunculari bu durumdan haberdar "etmez"!
 /// </summary>
 /// <param name="tower">board'a yerlestirilecek kule</param>
 /// <param name="slotIndex">kulenin yerlestirilecegi slotun indexi</param>
 /// <returns>Verilen slot indexin, towerSlots index araliginin disinda olmasi durumunda false return eder. Diger her durum icin return 'true'dur.</returns>
 public bool AddTower(Tower tower, int slotIndex)
 {
     if (slotIndex >= 0 && slotIndex < towers.Length)
     {
         towers[slotIndex] = tower;
         tower.board = this;
         tower.indexOnBoard = slotIndex;
         return true;
     }
     return false;
 }
Esempio n. 19
0
 public ElectricityMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 6.0f;
     damageList.Add(new Damage(10, DamageType.PHYSICAL));
 }
 public Contagious_extraMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 3.0f;
 }
Esempio n. 21
0
 public override void step(Tower tower)
 {
     tower.stats.attackSpeedMult *= 1.2f;                                  //attack speedi %20 arttirir.
     tower.stats.rangeDivider = Math.Min(tower.stats.rangeDivider, 0.3f);         //range'i %30'una dusur.
 }
Esempio n. 22
0
 public AcidMissile(Tower ownerTower, Minion targetMinion)
     : base(ownerTower, targetMinion)
 {
     movementSpeed = 5.0f;
     damageList.Add(new Damage(0, DamageType.POISON));
 }
Esempio n. 23
0
 public abstract void step(Tower tower);