예제 #1
0
        public SpecialAbilityList(SpecialAbility one, SpecialAbility two, SpecialAbility three)
        {
            abilities    = new SpecialAbility[4];
            abilityCount = 3;

            abilities[0] = one;
            abilities[1] = two;
            abilities[2] = three;
            abilities[3] = null;
        }
예제 #2
0
        public SpecialAbilityList(SpecialAbility one, SpecialAbility two, SpecialAbility three, SpecialAbility four)
        {
            abilities    = new SpecialAbility[4];
            abilityCount = 4;

            abilities[0] = one;
            abilities[1] = two;
            abilities[2] = three;
            abilities[3] = four;
        }
예제 #3
0
        public SpecialAbilityList(SpecialAbility one)
        {
            abilities    = new SpecialAbility[4];
            abilityCount = 1;

            abilities[0] = one;
            abilities[1] = null;
            abilities[2] = null;
            abilities[3] = null;
        }
예제 #4
0
        public SpecialAbilityList(SpecialAbility one, SpecialAbility two, SpecialAbility three, SpecialAbility four)
        {
            abilities = new SpecialAbility[4];
            abilityCount = 4;

            abilities[0] = one;
            abilities[1] = two;
            abilities[2] = three;
            abilities[3] = four;
        }
예제 #5
0
        public SpecialAbilityList(SpecialAbility one, SpecialAbility two, SpecialAbility three)
        {
            abilities = new SpecialAbility[4];
            abilityCount = 3;

            abilities[0] = one;
            abilities[1] = two;
            abilities[2] = three;
            abilities[3] = null;
        }
예제 #6
0
        public SpecialAbilityList(SpecialAbility one)
        {
            abilities = new SpecialAbility[4];
            abilityCount = 1;

            abilities[0] = one;
            abilities[1] = null;
            abilities[2] = null;
            abilities[3] = null;
        }
예제 #7
0
        public void addAbility(SpecialAbility newAbility)
        {
            if( abilityCount >= 0 && abilityCount < 4 )
            {
                abilities[abilityCount] = newAbility;
                abilityCount++;
            }
            else
            {
                int removedIndex = removeAbility();

                if(removedIndex >= 0)
                    abilities[removedIndex] = newAbility;
            }
        }
예제 #8
0
        public void addAbility(SpecialAbility newAbility)
        {
            if (abilityCount >= 0 && abilityCount < 4)
            {
                abilities[abilityCount] = newAbility;
                abilityCount++;
            }
            else
            {
                int removedIndex = removeAbility();

                if (removedIndex >= 0)
                {
                    abilities[removedIndex] = newAbility;
                }
            }
        }
예제 #9
0
파일: Player.cs 프로젝트: dmacy5/RPG
        public override void turn(Character enemy)
        {
            Console.WriteLine(Name + "'s turn: ");
            Console.WriteLine("1. Basic attack");
            Console.WriteLine("2. Special abilities");
            Console.WriteLine("3. Inventory");
            Console.WriteLine("4. Run");

            int option = GameManager.getInputBetween(1, 4);

            if (option == 1)
            {
                basicAttack(enemy);
            }
            else if (option == 2)
            {
                SpecialAbility picked = abilities.getAbility();
                picked.useAbility(this, enemy);
            }
            else if (option == 3)
            {
                inventory.useItem(this, enemy);
            }
        }