Пример #1
0
 public void SetDefendEffect(Unit defender)
 {
     LogSkill.Target target = this.FindTarget(defender);
     if (target == null)
     {
         return;
     }
     target.hitType |= LogSkill.EHitTypes.Defend;
 }
Пример #2
0
 public LogSkill.Target SetSkillTarget(Unit unit, Unit other)
 {
     LogSkill.Target target = this.FindTarget(other);
     if (target == null)
     {
         target        = new LogSkill.Target();
         target.target = other;
         this.targets.Add(target);
     }
     this.self = unit;
     return(target);
 }
Пример #3
0
        public int GetGainJewel()
        {
            int val1 = 0;

            for (int index = 0; index < this.targets.Count; ++index)
            {
                LogSkill.Target target = this.targets[index];
                if (target.gems != 0 && !target.IsAvoid())
                {
                    val1 = Math.Max(val1, target.gems);
                }
            }
            return(val1);
        }
Пример #4
0
        public void CheckAliveTarget()
        {
            List <LogSkill.Target> targetList = new List <LogSkill.Target>(BattleCore.MAX_UNITS);

            using (List <LogSkill.Target> .Enumerator enumerator = this.targets.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    LogSkill.Target current = enumerator.Current;
                    if (!current.target.IsDead)
                    {
                        targetList.Add(current);
                    }
                }
            }
            if (this.targets.Count == targetList.Count)
            {
                return;
            }
            this.targets = targetList;
        }
Пример #5
0
 public void Hit(Unit unit, Unit other, int hp_damage, int mp_damage, int ch_damage, int ca_damage, int hp_heal, int mp_heal, int ch_heal, int ca_heal, int dropgems, bool is_critical, bool is_avoid, bool is_combination, bool is_guts, int absorbed = 0)
 {
     LogSkill.Target target = this.SetSkillTarget(unit, other);
     if (unit.IsUnitFlag(EUnitFlag.BackAttack) && this.skill.BackAttackDefenseDownRate != 0)
     {
         target.hitType |= LogSkill.EHitTypes.BackAttack;
     }
     if (unit.IsUnitFlag(EUnitFlag.SideAttack) && this.skill.SideAttackDefenseDownRate != 0)
     {
         target.hitType |= LogSkill.EHitTypes.SideAttack;
     }
     if (is_guts)
     {
         target.hitType |= LogSkill.EHitTypes.Guts;
     }
     if (is_combination)
     {
         target.hitType |= LogSkill.EHitTypes.Combination;
     }
     target.shieldDamage += absorbed;
     target.gems         += dropgems;
     target.hits.Add(new BattleCore.HitData(hp_damage, mp_damage, ch_damage, ca_damage, hp_heal, mp_heal, ch_heal, ca_heal, is_critical, is_avoid));
 }