public SeedTower_7Stack(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 1.1f; targetStrategy = new NearestMinionTargetStrategy(); }
public override void step() { applyEffects(); //attackTimeReduction kendi icerisine Chronos.deltaTime'i ekliyor. applyEffects'e bak. nextAttackTime -= stats.attackTimeReduction; if (nextAttackTime <= 0 && targetStrategy != null && !this.isStunned()) { Collection<Minion> targetMinions = targetStrategy.selectTargetsFromBoard(board, getWorldPosition(), 1, 0, stats.baseRange, MinionStateSelection.ALIVE); if (targetMinions.Count < 1) return; nextAttackTime = TELEPORT_COOLDOWN_DEFAULT; targetMinions = new NearestMinionTargetStrategy().selectTargetsFromBoard(board, targetMinions[0].getWorldPosition(), int.MaxValue, 0, TELEPORT_DIAMETER_DEFAULT, MinionStateSelection.ALIVE); Messages.OutgoingMessages.Game.GTower_BlackHole_teleport.sendMessage(board.player.game.players, this, targetMinions); foreach (Minion m in targetMinions) { m.moveCustomDistance(-TELEPORT_DISTANCE_DEFAULT); } } }
public override void onDeath() { base.onDeath(); NearestMinionTargetStrategy targetSelector = new NearestMinionTargetStrategy(); ICollection<Minion> targets = targetSelector.selectTargetsFromBoard(position.board, this.getWorldPosition(), int.MaxValue, 0, EFFECT_RADIUS, MinionStateSelection.ALIVE); foreach (var minion in targets) { minion.stats.healToMaxHP(); Messages.OutgoingMessages.Game.GMinionHealthInfo.sendMessage(this.game.players, minion); } }