Exemple #1
0
        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);
        }
Exemple #2
0
 protected virtual void OnCollision(Minion m)
 {
     DamageRules.DamageMinion(_damage, _type, m);
     DestroyProjectile();
 }
Exemple #3
0
        protected override void Fire(Minion m, Vector2 minionPosition, Vector2 towerPosition)
        {
            DamageRules.DamageMinion(_damage, DamageType.Electric, m);

            base.Fire(m, minionPosition, towerPosition);
        }
Exemple #4
0
 public FireBuff(Minion m)
 {
     _m = m;
     Time = 4000;
 }
Exemple #5
0
 public virtual void Update(float dt, Minion m)
 {
     _timeExisted += dt;
     _secondTick += dt;
     if (_timeExisted >= Time)
         Destroy = true;
     if (_secondTick >= 1000)
     {
         _secondTick = 0;
         SecondTick();
     }
 }
Exemple #6
0
 protected virtual void Fire(Minion minion, Vector2 minionPosition, Vector2 towerPosition)
 {
     Fired();
 }
Exemple #7
0
 public void Attack(Minion d)
 {
     Building b = WorldMap.Instance.GetBuildings(Buildings.BuildingType.Depot)[0];
     _currentTask = new MoveToFortressTask(b);
     _currentBehavior = _currentTask.ActivateBehavior(d);
 }
Exemple #8
0
 public MinionAi(Minion m)
 {
     Attack(m);
 }