public ContagiousMissile(Tower ownerTower, Minion targetMinion) : base(ownerTower, targetMinion) { movementSpeed = 5; damageList.Add(new Damage(0, DamageType.FIRE)); movementSpeed = 3.0f; }
protected Missile(Tower ownerTower, Minion targetMinion) { instanceId = idGenerator++; this.ownerTower = ownerTower; this.targetMinion = targetMinion; this.position = ownerTower.getWorldPosition(); }
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)); }
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 TrypanophobiaMissile(Tower ownerTower, Minion targetMinion, float runBackTime) : base(ownerTower, targetMinion) { this.runBackTime = runBackTime; movementSpeed = 5.0f; damageList.Add(new Damage(60, DamageType.PHYSICAL)); }
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 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)); }
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; }
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; }
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)); }
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)); }
public static void sendMessage(ICollection<Player> receiverPlayers, Minion minion) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GMinion_Zombie_Raise))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("iid", minion.instanceId); foreach (var receiverPlayer in receiverPlayers) receiverPlayer.user.session.client.SendMessage(msg); } }
public static void sendMessage(ICollection<Player> receiverPlayers, Minion minion, MinionEffect effect) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GAddEffectOnMinion))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("iid", minion.instanceId); msg.putInt("tid", TypeIdGenerator.getMinionEffectId(effect.GetType())); foreach (var receiverPlayer in receiverPlayers) receiverPlayer.user.session.client.SendMessage(msg); } }
public static void sendMessage(ICollection<Player> receiverPlayers, Minion minion, float runBackTime) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GMinion_Trypanophobia_addEffect))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("iid", minion.instanceId); msg.putFloat("t", runBackTime); foreach (var receiverPlayer in receiverPlayers) receiverPlayer.user.session.client.SendMessage(msg); } }
public static void sendMessage(ICollection<Player> receiverPlayers, LaserTower tower, Minion targetedMinion) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GTower_LaserTower_untarget))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("tiob", tower.indexOnBoard); msg.putInt("tbid", tower.board.instanceId); msg.putInt("miid", targetedMinion.instanceId); foreach (var receiverPlayer in receiverPlayers) receiverPlayer.user.session.client.SendMessage(msg); } }
public static void sendMessage(ICollection<Player> receiverPlayers, Minion minion) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GMinionPositionInfo))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("iid", minion.instanceId); msg.putInt("bid", minion.position.board.instanceId); msg.putInt("cid", minion.position.pathPosition.pointIndex); msg.putFloat("t", minion.position.pathPosition.ratio); foreach (var receiverPlayer in receiverPlayers) receiverPlayer.user.session.client.SendMessage(msg); } }
public static void sendMessage(ICollection<Player> receiverPlayers, Minion minion, ICollection<Minion> otherMinions) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GMinion_QuantumSoldier_teleport))); if (receiverPlayers != null && receiverPlayers.Count != 0) { msg.putInt("iid", minion.instanceId); msg.putFloat("ds", 1.3f); int [] minionInstanceIDs = new int[otherMinions.Count]; int index = 0; foreach (var minionTarget in otherMinions) { minionInstanceIDs[index++] = minionTarget.instanceId; } msg.putIntArray("mids", minionInstanceIDs); foreach (var receiverPlayer in receiverPlayers) receiverPlayer.user.session.client.SendMessage(msg); } }
protected virtual Missile createMissile(Minion m) { return new BallistaMissile(this, m); }
public AcidMissile(Tower ownerTower, Minion targetMinion) : base(ownerTower, targetMinion) { movementSpeed = 5.0f; damageList.Add(new Damage(0, DamageType.POISON)); }
public TeslaMissile(Tower ownerTower, Minion targetMinion) : base(ownerTower, targetMinion) { movementSpeed = 3.0f; damageList.Add(new Damage(120, DamageType.FIRE)); }
/// <summary> /// Verilen minionu boarda ekler. 2.Parametrede verilen noktaya goturur. /// </summary> /// <param name="minion">boarda yerlestirilecek minion</param> /// <returns>Bu islem her zaman basarili oldugu icin bir return degeri yoktur.</returns> public void AddMinionSpecificPosition(Minion minion, PathPosition position, bool notifyPlayers = true) { if (boardState != BoardState.COLLAPSING) { try { toBeAddedMinions.Add(minion); } catch (Exception e) { Console.WriteLine(e.StackTrace + " : " + e.Message); } if (minion.position == null) minion.position = new MinionPosition(); minion.position.board = this; minion.position.pathPosition = new PathPosition(position.pointIndex, position.ratio); if(notifyPlayers) Messages.OutgoingMessages.Game.GMinionPositionInfo.sendMessage(player.game.players, minion); } else { minion.destroyable = true; Messages.OutgoingMessages.Game.GDestroyMinionInfo.sendMessage(player.game.players, minion); } }
/// <summary> /// Verilen minionu boarda ekler. Default olarak minion board'un path'inin ilk noktasina yerlestirilir. /// </summary> /// <param name="minion">boarda yerlestirilecek minion</param> /// <param name="addToEnd">eger bu deger true ise minion board un pathinin son noktasina yerlestirilir (geri yonde ilerleyen minionlar icin).</param> /// <returns>Bu islem her zaman basarili oldugu icin bir return degeri yoktur.</returns> public void AddMinion(Minion minion, bool addToEnd = false, bool tellUsers = true) { if (boardState != BoardState.COLLAPSING) { try { toBeAddedMinions.Add(minion); } catch (Exception e) { Console.WriteLine(e.StackTrace + " : " + e.Message); } if (minion.position == null) minion.position = new MinionPosition(); minion.position.board = this; if (!addToEnd) minion.position.pathPosition = getPath().getStartPoint(); else minion.position.pathPosition = getPath().getEndPoint(); if(tellUsers) Messages.OutgoingMessages.Game.GMinionPositionInfo.sendMessage(player.game.players,minion); } else { minion.destroyable = true; Messages.OutgoingMessages.Game.GDestroyMinionInfo.sendMessage(player.game.players,minion); } }
public ElectricityMissile(Tower ownerTower, Minion targetMinion) : base(ownerTower, targetMinion) { movementSpeed = 6.0f; damageList.Add(new Damage(10, DamageType.PHYSICAL)); }
public abstract void step(Minion minion);
public Contagious_extraMissile(Tower ownerTower, Minion targetMinion) : base(ownerTower, targetMinion) { movementSpeed = 3.0f; }
protected virtual Missile createMissile(Minion m) { return new ContagiousMissile(this, m); }
/// <summary> /// verilen minion'un position.board elemanini 'null'a esitler. Bu minionu iceren liste, iteration sirasinda bu durumu farkedip minionu listeden silecektir. /// </summary> /// <param name="minion">board'dan cikarilacak minion</param> public void RemoveMinion(Minion minion) { minion.position.board = null; // burada hashmap uzerinde herhangi bir islem yapmiyoruz. aksi takdirde minionlari gezen foreach iteration'ini bozabiliriz. bu minion daha sonra iteration tarafindan tespit edilip listeden silinecek, sadece board'i null yapmak yeterli. }
protected virtual Missile createMissile(Minion m) { return new OneToAllMissile(this, m); }