Beispiel #1
0
        //Feeds the pet a Foodtype
        public void FeedPet(Pet pet, FoodType foodToEat)
        {
            //feed the pet food
            int gainedNuts = pet.food.Eat(foodToEat);

            string text = "";

            if (gainedNuts > 0)
            {
                text = String.Format("{0} just ate {1}, ",
                                        pet.name,
                                        foodToEat.ToString().ToLower());
            }
            //print the
            text = text + "{0} satiation level is: {1}\n";
            string formatted = String.Format(text,
                                            pet.pronoun,
                                            pet.food.satiation);
            Tools.Print(newFG: TextBasedGame.defaultFG,
                        text: formatted,
                        newBG: ConsoleColor.DarkGreen);

            //vals: new object[] {pet.name, foodToEat, pet.food.satiation});
        }
Beispiel #2
0
 public void BattlePet(Pet pet, Creature enemy)
 {
     Tools.Print("RAWR LET'S GO FIGHTING\n");
 }
 public PetFoodComponent(Pet master)
 {
     this.master = master;
 }
Beispiel #4
0
 public void CheckPetStats(Pet pet)
 {
     Tools.Print(newFG: ConsoleColor.Gray,
     text: "Current Pet's name {0}\n" +
                  "Current Satiation {1}\n" +
                  "Current EXP {2}\n"+
                  "HP {3}/{4}\n",
       vals: new object[] {pet.name,
                      pet.food.satiation,
                      pet.exp,
                      pet.battle.currentHP,
                      pet.battle.maxHP});
 }
 public PetBattleComponent(Pet master)
 {
     this.master = master;
     this.currentHP = this.maxHP;
 }
        public PetMoodComponent(Pet master)
        {
            //define the pet which this mood belongs too
            this.master = master;

            //print confirmation.
            //Tools.Print(ConsoleColor.Green, ConsoleColor.DarkYellow, "This general mood belongs to: {0}\n", this.getMaster().ToString());
        }
Beispiel #7
0
 public Status(Pet owner)
 {
     this.owner = owner;
 }
Beispiel #8
0
 public Debuff(Pet owner)
     : base(owner)
 {
     base.owner = owner;
 }
Beispiel #9
0
 public void addPet(string name = "YourFirstPet")
 {
     //Gets the name of the pet.
     //string name = Tools.Prompt("What is the name of your new male Pet?");
     this.pet = new Pet(this.user, name);
 }