示例#1
0
 public Fighter_3()
 {
     hp         = Klasser.RandInt(minHp, maxHp - 3);
     maxDamage += 2;
     minDamage += 2;
     hitChance  = Klasser.RandInt(minHitChance, maxHitChance + 5);
 }
 public Fighter_2() //Randomises the health points, maxDamage, minDamage and hitchance
 {
     //Hp: Medium, Damage: Medium, Hitchance: Medium
     hp         = Klasser.RandInt(minHp, maxHp);
     maxDamage += 2;
     minDamage += 2;
     hitChance  = Klasser.RandInt(minHitChance, maxHitChance);
 } //Randomises the health points, maxDamage, minDamage and hitchance
示例#3
0
 public Fighter_1() //Randomises the health points, maxDamage, minDamage and hitchance
 {
     //Hp: High, Damage: Medium, Hitchance: Low
     hp         = Klasser.RandInt(minHp, maxHp + 10);
     maxDamage -= 1;
     minDamage -= 1;
     hitChance  = Klasser.RandInt(minHitChance - 1, maxHitChance - 1);
 } //Randomises the health points, maxDamage, minDamage and hitchance
示例#4
0
        } //This code block lets the player choose one of the three fighterklasses

        public string RandomiseChoise() //Randomise a number between 1-3 and convert it to a string
        {
            int i = Klasser.RandInt(1, 3);

            string rand = "" + i;

            return(rand);
        } //Randomise a number between 1-3 and convert it to a string
示例#5
0
 public Fighter_3() //Randomises the health points, maxDamage, minDamage and hitchance
 {
     //Hp: Low, Damage: High, Hitchance: High
     hp         = Klasser.RandInt(minHp - 2, maxHp - 3);
     maxDamage += 2;
     minDamage += 2;
     hitChance  = Klasser.RandInt(minHitChance, maxHitChance + 5);
 } //Randomises the health points, maxDamage, minDamage and hitchance
        } //A variable to see the if the character is defeated

        public bool HitOrMiss() //This block of code checks if the character missesor hit a attack
        {
            bool hit             = false;
            int  hitValueLimiter = Klasser.RandInt(10, 20);
            int  hitValRand      = Klasser.RandInt(3, 7);

            int hitVal = hitValRand * hitChance;

            if (hitVal > hitValueLimiter)
            {
                hit = true;
            }

            return(hit);
        } //This block of code checks if the character missesor hit a attack
示例#7
0
        } //Randomise a number between 1-3 and convert it to a string

        public void AnitiateFight(Fighters player, Fighters enemy) //This code block is for Anitiating the fight by randomise if the playeer or the enemy start the fight
        {
            int  whoWillStart;
            bool playerStartFight;

            Console.Clear();
            Klasser.WriteLine("The fight will now commense! Todays fight is between " + player.Name + " versus " + enemy.Name + ".\n", true);

            whoWillStart = Klasser.RandInt(0, 1);

            if (whoWillStart == 0)
            {
                playerStartFight = true;
                Klasser.WriteLine(player.Name + " will start the fight.\n\n(*Enter*)", false);
            }
            else
            {
                playerStartFight = false;
                Klasser.WriteLine(enemy.Name + " will start the fight.\n\n(*Enter*)", false);
            }

            Fight(playerStartFight, player, enemy);
        } //This code block is for Anitiating the fight by randomise if the playeer or the enemy start the fight
示例#8
0
 public Ritch()
 {
     hp      = Klasser.RandInt(50, 60); //Randomises the health points
     ability = raceAbilityDataBase[2];  //Applies the race ability
     race    = raceDataBase[2];         //Applies the race
 }
示例#9
0
        } //Every TakeDamage method will be special for each subclass because different races are weak and strong towards other races

        public void DealDamage(SuperHero enemy)
        {
            int attack = Klasser.RandInt(1, 6) * charactDataBaseDictionary[charact];

            enemy.TakeDamage(attack, race);
        } //A method to deal damage to enemies
示例#10
0
        public int DealDamage()
        {
            int damage = Klasser.RandInt(minDamage, maxDamage);

            return(damage);
        }
示例#11
0
 public Fighter_2()
 {
     hp        = Klasser.RandInt(minHp, maxHp);
     hitChance = Klasser.RandInt(minHitChance, maxHitChance);
 }
示例#12
0
 public Figher_1()
 {
     hp        = Klasser.RandInt(minHp, maxHp + 10);
     hitChance = Klasser.RandInt(minHitChance, maxHitChance - 5);
 }