Пример #1
0
        public override void InternalChooseBestTarget(ColossoFighter User)
        {
            if (TargetType == Target.ownAll)
            {
                return;
            }

            var aliveFriends = User.GetTeam().Where(f => f.IsAlive).ToList();

            if (aliveFriends.Count == 0)
            {
                TargetNr = 0;
                return;
            }

            aliveFriends = aliveFriends.OrderBy(s => s.Stats.HP / s.Stats.MaxHP).ThenBy(s => s.Stats.HP).ToList();

            if (User.GetTeam().Any(d => d.Name.Contains("Star")))
            {
                TargetNr = User.GetTeam().IndexOf(User.GetTeam().Where(d => d.Name.Contains("Star")).Random());
            }
            else
            {
                TargetNr = User.GetTeam().IndexOf(aliveFriends.First());
            }
        }
Пример #2
0
        public override List <string> Apply(ColossoFighter User, ColossoFighter Target)
        {
            var log = new List <string>();

            if (Target.IsImmuneToHPtoOne)
            {
                return(log);
            }

            if (Target.IsAlive)
            {
                if (Global.RandomNumber(0, 100) <= Probability)
                {
                    if (Target.GetTeam().Count > 1)
                    {
                        Target.Stats.HP = 1;
                    }
                    else
                    {
                        Target.Stats.HP = Math.Min(Target.Stats.HP, (int)(Target.Stats.MaxHP * 0.15));
                    }
                    log.Add($"<:Exclamatory:549529360604856323> {Target.Name} barely holds on.");
                }
            }
            return(log);
        }
Пример #3
0
 protected override bool InternalValidSelection(ColossoFighter user)
 {
     if (base.InternalValidSelection(user))
     {
         return(user.GetTeam().Count(t => t.IsAlive) > 1);
     }
     return(false);
 }
Пример #4
0
 public override bool InternalValidSelection(ColossoFighter User)
 {
     if (!base.InternalValidSelection(User))
     {
         return(false);
     }
     return(User.battle.turn == 1 ||
            User.GetTeam().Where(f => f.IsAlive).Any(f => (100 * f.Stats.HP) / f.Stats.MaxHP < 85));
 }
Пример #5
0
        public override void InternalChooseBestTarget(ColossoFighter User)
        {
            if (targetType == Target.ownAll)
            {
                return;
            }

            var aliveFriends = User.GetTeam().Where(f => f.IsAlive).ToList();

            if (aliveFriends.Count == 0)
            {
                targetNr = 0;
                return;
            }

            aliveFriends = aliveFriends.OrderBy(s => s.stats.HP / s.stats.MaxHP).ThenBy(s => s.stats.HP).ToList();
            targetNr     = User.GetTeam().IndexOf(aliveFriends.First());
        }
        public override List <string> Apply(ColossoFighter User, ColossoFighter Target)
        {
            var log = new List <string>();

            switch (User.GetTeam().Where(s => s.IsAlive && !s.Equals(User)).Count())
            {
            case 0:
                User.offensiveMult *= 1.25;
                log.Add($"{User.name} charges alone.");
                break;

            default:
                var teamMate = User.GetTeam().Where(s => s.IsAlive).OrderByDescending(p => p.stats.Atk).FirstOrDefault();
                User.addDamage += (uint)(teamMate.stats.Atk * teamMate.MultiplyBuffs("Attack") / 2);
                log.Add($"{teamMate.name} assists the attack.");
                break;
            }
            return(log);
        }
Пример #7
0
 public override void InternalChooseBestTarget(ColossoFighter User)
 {
     if (effects.Count > 0)
     {
         targetNr = effects[0].ChooseBestTarget(OnEnemy ? User.GetEnemies() : User.GetTeam());
     }
     else
     {
         targetNr = 0;
     }
 }
        public override List <string> Apply(ColossoFighter User, ColossoFighter Target)
        {
            var log = new List <string>();

            switch (User.GetTeam().Where(s => s.IsAlive && !s.Equals(User)).Count())
            {
            case 0:
                User.offensiveMult *= 1.25;
                log.Add($"{User.Name} charges alone.");
                break;

            default:
                var teamMate = User.GetTeam().Where(s => s.IsAlive && !s.Equals(User)).OrderByDescending(p => p.Stats.Atk).Take(TeamMates).ToList();
                teamMate.ForEach(m =>
                {
                    User.addDamage += (uint)(m.Stats.Atk * m.MultiplyBuffs("Attack"));
                    log.Add($"{m.Name} assists the attack.");
                });
                break;
            }
            return(log);
        }
Пример #9
0
        public override List <string> Apply(ColossoFighter User, ColossoFighter Target)
        {
            var log = new List <string>();

            if (Target.IsImmuneToOHKO)
            {
                return(log);
            }

            if (Target.GetTeam().Count > 1 && Global.Random.Next(1, 100) <= Probability)
            {
                Target.Kill();
                log.Add($":x: {Target.Name}'s life was taken.");
            }
            return(log);
        }
Пример #10
0
 protected override bool InternalValidSelection(ColossoFighter user)
 {
     return(user.GetTeam().Any(s => !s.IsAlive));
 }
Пример #11
0
 protected override bool InternalValidSelection(ColossoFighter user)
 {
     return(user.GetTeam().Any(s => s.HasCurableCondition()));
 }
Пример #12
0
 protected override bool InternalValidSelection(ColossoFighter user)
 {
     friends ??= EnemyNames.Select(e => EnemiesDatabase.GetEnemy(e)).ToList();
     return(user.GetTeam().Any(s => friends.Any(f => f.Name.Equals(s.Name) && !s.IsAlive)));
 }