public static void UseBuff(Battle b, Monster user, Monster receiver) { List<Move> moveList = new List<Move>(); foreach (var move in user.Moves) { if (move.Kind == Kind.NonDamage) { moveList.Add(move); } } if (moveList.Count != 0) { Random r = new Random(); b.Attack(user, receiver, moveList[r.Next(0, moveList.Count)]); } }
public static void EnemyAttack(Battle b, Monster user, Monster receiver) { strongestAttack = Move.Glare(); //user.GetMoves(); foreach (var m in user.Moves.Where(x => x.Uses != 0)) { m.Damage = m.GetDamage(user.Stats.SpecialAttack, receiver.Stats.SpecialDefense, m.GetDamageModifier(receiver), 1); if (m.Damage > strongestAttack.Damage) { strongestAttack = m; } } b.Attack(user, receiver, strongestAttack); }