public static void DamageMinion(float amount, DamageType type, Minion m) { float damage = amount; if (type == DamageType.Soft && m.AmorType == AmorType.Soft && m.IsAmored == false) damage *= 2; else if (type == DamageType.Mechanic && m.AmorType == AmorType.Mechanic && m.IsAmored == false) damage *= 2; else if (type == DamageType.Magic && m.AmorType == AmorType.Magic && m.IsAmored == false) damage *= 3; if (type == DamageType.AntiAmor) m.DamageAmor(damage); if (m.IsAmored == true) damage /= 3; m.DoDamage(damage); }
public MinionAi(Minion m) { Attack(m); }
public void Attack(Minion d) { Building b = WorldMap.Instance.GetBuildings(Buildings.BuildingType.Depot)[0]; _currentTask = new MoveToFortressTask(b); _currentBehavior = _currentTask.ActivateBehavior(d); }
protected virtual void OnCollision(Minion m) { DamageRules.DamageMinion(_damage, _type, m); DestroyProjectile(); }
protected override void Fire(Minion m, Vector2 minionPosition, Vector2 towerPosition) { DamageRules.DamageMinion(_damage, DamageType.Electric, m); base.Fire(m, minionPosition, towerPosition); }
protected virtual void Fire(Minion minion, Vector2 minionPosition, Vector2 towerPosition) { Fired(); }
public FireBuff(Minion m) { _m = m; Time = 4000; }
public virtual void Update(float dt, Minion m) { _timeExisted += dt; _secondTick += dt; if (_timeExisted >= Time) Destroy = true; if (_secondTick >= 1000) { _secondTick = 0; SecondTick(); } }