Пример #1
0
        /**
         * Output text when used in given manner
         */

        public override bool use(Player player)
        {
            Console.WriteLine(GeneralDataLibrary.I() + "The " + name + " is written with " + keyword + " text:");
            GeneralDataLibrary.Break();
            Console.WriteLine(GeneralDataLibrary.I() + "Granted by: " + author);
            Console.WriteLine(GeneralDataLibrary.I() + date);
            GeneralDataLibrary.Break();
            GeneralDataLibrary.Break();
            Console.WriteLine(GeneralDataLibrary.I() + "Destined to: " + recipient);
            GeneralDataLibrary.Break();
            Console.Write(mainText);
            return(false);
        }
Пример #2
0
        /**
         * Handle the enemies AI needed for this game
         */

        public void HandleAi(Character player)
        {
            Console.WriteLine(GeneralDataLibrary.I() + GeneralDataLibrary.Note() + attackShout);
            GeneralDataLibrary.Break();
            if (attack(this, player))
            {
                Console.WriteLine(GeneralDataLibrary.I() + "You have died!");
            }
            else
            {
                Console.WriteLine(GeneralDataLibrary.I() + "You have: " + player.Health + " health left!");
            }

            GeneralDataLibrary.Break();
        }
Пример #3
0
        /**
         * All things that trigger upon attack an enemy
         */

        public override uint attack(Character character)
        {
            bool canCreate = true;

            for (int i = character.CurrentStatusEffects.Count - 1; i >= 0; i--)
            {
                if (character.CurrentStatusEffects[i].Name == "Heel Cut")
                {
                    canCreate = false;
                }
            }

            if (canCreate)
            {
                Console.WriteLine(GeneralDataLibrary.Note() + "The blade created a heel cut!");
                GeneralDataLibrary.Break();
                character.createStatusEffects(character, 0, 0, 5, 0, 1, 3, "Heel Cut", "A cut your heel that drains you as you go from room to room");
            }

            durability--;
            return(damage);
        }