Example #1
0
 public void Hit(Wrestler opponent)
 {
     if (!opponent.Shield)
     {
         opponent.Damage(attackPoint + extraAttack - opponent.extraBlock);
     }
 }
Example #2
0
        public Wrestler SelectWrestler(int index)
        {
            Wrestler selectedWrestler = getWrestlerList(Wrestler._status.Disponible)[index];

            selectedWrestler.isSelected = true;
            return(selectedWrestler);
        }
Example #3
0
 public Match(int iteration, Wrestler firstWrestler, Wrestler secondWrestler, Wrestler winner, Wrestler loser, bool wayOfWinning, int profit)
 {
     Iteration      = iteration;
     FirstWrestler  = firstWrestler;
     SecondWrestler = secondWrestler;
     Winner         = winner;
     Loser          = loser;
     WayOfWinning   = wayOfWinning;
     Profit         = profit;
 }
Example #4
0
 public void SpecialAttack(Wrestler opponent, Round round)
 {
     if (!opponent.Shield)
     {
         Special_attack.AttackList[SpecialAttackIndex](this, opponent, round);
     }
     else
     {
         round.SetActionFromOrder(this, Round.action.Null);
     }
 }
 public static void BB(Wrestler instance, Wrestler opponent, Round round)
 {
     if (Special_attack.GetProbability() <= 8)
     {
         opponent.Damage(opponent.lifePoint);
         Console.WriteLine($"{instance.Name} OS son adversaire, c'est cheaté...");
     }
     else
     {
         Console.WriteLine($"{instance.Name} rate son attaque spéciale");
     }
     round.SetActionFromOrder(instance, Round.action.Null);
 }
        public static void TH(Wrestler instance, Wrestler opponent, Round round)
        {
            if (Special_attack.GetProbability() <= 20)
            {
                instance.attackPoint += 2;
                instance.Damage(1);
                Console.WriteLine($"L'attaque de {instance.Name} augmente de deux points mais il perd 1 point de vie");
            }
            else
            {
                Console.WriteLine($"{instance.Name} rate son attaque spéciale");
            }

            round.SetActionFromOrder(instance, Round.action.Null);
        }
 public static void RM(Wrestler instance, Wrestler opponent, Round round)
 {
     if (Special_attack.GetProbability() <= 40)
     {
         instance.Damage(3);
         Console.WriteLine($"{instance.Name} s'inglige 3 points de dégats");
     }
     else
     {
         instance.attackPoint += 1;
         instance.extraBlock  += 2;
         Console.WriteLine($"{instance.Name} augmente ses dégats de 1 et bloque 2 dégats");
     }
     round.SetActionFromOrder(instance, Round.action.Null);
 }
 public static void M(Wrestler instance, Wrestler opponent, Round round)
 {
     if (Special_attack.GetProbability() <= 40)
     {
         instance.extraBlock  = 4;
         instance.extraAttack = -(instance.attackPoint - 1);
         round.SetActionFromOrder(instance, Round.action.Attack);
         Console.WriteLine($"{instance.Name} se protège de 4 points de dégats et en inflige 1");
     }
     else
     {
         Console.WriteLine($"{instance.Name} rate son attaque spéciale");
         round.SetActionFromOrder(instance, Round.action.Null);
     }
 }
        public static void JS(Wrestler instance, Wrestler opponent, Round round)
        {
            if (Special_attack.GetProbability() <= 40)
            {
                instance.Heal(5);

                Console.WriteLine($"{instance.Name} regagne 5 points de vie");
            }
            if (Special_attack.GetProbability() <= 60)
            {
                instance.defensePoint += 1;
                Console.WriteLine($"La défense de {instance.Name} augmente d'un point");
            }

            round.SetActionFromOrder(instance, Round.action.Null);
        }
Example #10
0
        public Round.action ChooseAction(Wrestler opponent)
        {
            Random rnd  = new Random();
            int    rand = rnd.Next(0, 3);

            switch (rand)
            {
            case 0:
                //Console.WriteLine($"{Name} attaque {opponent.Name}!");
                return(Round.action.Attack);

            case 1:
                //Console.WriteLine($"{Name} se défend!");
                return(Round.action.Block);

            default:
                //Console.WriteLine($"{Name} lance son attaque spéciale!" );
                return(Round.action.Special);
            }
        }
Example #11
0
        public Match(Wrestler wres1, Wrestler wres2, Season currentSeason)
        {
            id = currentSeason.MatchId;
            currentSeason.MatchId++;
            isReady = true;
            isEnd   = false;

            Iteration    = 0;
            IterationMax = 20;


            //RoundId = 1;
            Rounds = new List <Round>();

            MatchSeason = currentSeason.id;
            currentSeason.CurrentMatch = this;
            currentSeason.MatchHistory.Add(this);
            FirstWrestler  = wres1;
            SecondWrestler = wres2;
            timer          = new Timer();
        }
 public static void DP(Wrestler instance, Wrestler opponent, Round round)
 {
     round.SetActionFromOrder(instance, Round.action.Null);
     if (Special_attack.GetProbability() <= 30)
     {
         instance.Heal(2);
         Console.WriteLine($"{instance.Name} se soigne de deux points de vie");
         round.SetActionFromOrder(instance, Round.action.Null);
     }
     if (Special_attack.GetProbability() <= 10)
     {
         instance.extraBlock = -(instance.defensePoint - 1);
         Console.WriteLine($"{instance.Name} rate son attaque spéciale mais effectue une blocage de dernière seconde");
         round.SetActionFromOrder(instance, Round.action.Null);
     }
     if (Special_attack.GetProbability() <= 10)
     {
         opponent.Damage(3);
         instance.Heal(3);
         round.SetActionFromOrder(instance, Round.action.Attack);
         Console.WriteLine($"{instance.Name} vole 3 points de vie à {opponent.Name} et l'attaque");
     }
 }
Example #13
0
 public void Block(Wrestler opponent)
 {
     Damage(opponent.attackPoint - (defensePoint + extraBlock));
 }