Exemplo n.º 1
0
        //Methods

        public void AddGroup(IHackGroups group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("Group cannot be null");
            }

            this.Groups.Add(group);
        }
Exemplo n.º 2
0
 public void CheckIfEffectShouldBeTriggeredTarget(IHackGroups targetGroup)
 {
     if (targetGroup.Health <= targetGroup.InitialHealth / 2)
     {
         targetGroup.TriggerWarEffect = true;
     }
     else
     {
         targetGroup.TriggerWarEffect = false;
     }
 }
Exemplo n.º 3
0
        public void Attack(IHackGroups targetGroup)
        {
            switch (this.GroupAttackType)
            {
            case AttackTypes.Paris:

                targetGroup.Health -= this.Damage;
                this.CheckIfEffectShouldBeTriggeredTarget(targetGroup);
                break;

            case AttackTypes.SU24:

                this.Health -= this.Health / 2;
                this.CheckIfEffectShouldBeTriggered();
                if (this.Health <= 0)
                {
                    this.Health = 1;
                }

                targetGroup.Health -= this.Damage * DefaultDamageBooster;
                this.CheckIfEffectShouldBeTriggeredTarget(targetGroup);
                break;
            }
        }