示例#1
0
 public BadChild(MasterGameControl c, bool wild) : base(c, wild) //Gives the child all their neccessary information
 {
     XpMultiplier = 1f;
     Alignment    = "Bad.";
     HP           = 25;
     maxHP        = HP;
 }
示例#2
0
 public Demon(MasterGameControl c, bool wild) : base(c, wild)
 {
     XpMultiplier = 3.0f;
     Alignment    = "A Demon!";
     HP           = 45;
     maxHP        = HP;
 }
示例#3
0
 public GoodChild(MasterGameControl c, bool wild) : base(c, wild)
 {
     XpMultiplier = 1.5f;
     Alignment    = "Good.";
     HP           = 20;
     maxHP        = HP;
     //sets up basic variables
 }
示例#4
0
 public Hero(MasterGameControl c, bool wild) : base(c, wild)
 {
     XpMultiplier = 3.0f;
     Alignment    = "A Hero!";
     HP           = 35;
     maxHP        = HP;
     //as per usual the basic shizz
 }
示例#5
0
 //^^ sets up a whole bunch of variables
 public Child(MasterGameControl c, bool wild)    //sets up the child
 {
     controller = c;
     Level      = 1;
     //^^ this is just simple variable setting
     Name        = File.ReadAllLines(@"names.txt")[rand.Next(308)]; //this one uses the IO lib to get a string array from a text file and then assign the name to a random line in said text file
     XpThreshold = 10;
     IsWild      = wild;
     Energy      = 10; //and the remaining things are also variable setting
 }
示例#6
0
 public override void Effect(Child c, MasterGameControl controller) //overrides the effect method and checks if the child in question is wild, if so it attempts to catch it.
 {
     if (c.IsWild)
     {
         controller.Catch(c);
     }
     else    //This is mainly a debug thing and if it runs I am the big stupido
     {
         System.Console.WriteLine("Child is somehow not wild and I f****d up somewhere");
     }
 }
示例#7
0
        static void Main(string[] args) //this just sets up the bare necessities for the game and then lets it run in other methods somewhere fare beyond the horizon
        {
            Room.InitializeRooms();
            Player            player      = new Player();
            ChildSpawner      spawner     = new ChildSpawner();
            MasterGameControl gameControl = new MasterGameControl(player);

            player.GetController(gameControl);
            Instructions(player);
            player.ChooseStarter(spawner);
            while (true)
            {
                player.AddInitialChoices();
            }
        }
示例#8
0
        public Child Spawner(MasterGameControl controller, bool wild)   //spawns a child and randomizes if they are good or bad. then randomizes 1/100 if they are either a demon or a hero.
        {
            Random rand = new Random();

            switch (rand.Next(2))
            {
            case 0:
            {
                if (rand.Next(101) == 100)
                {
                    return(new Demon(controller, wild));
                }
                else
                {
                    return(new BadChild(controller, wild));
                }
            }

            case 1:
            {
                if (rand.Next(101) == 100)
                {
                    return(new Hero(controller, wild));
                }
                else
                {
                    return(new GoodChild(controller, wild));
                }
            }

            default:
            {
                System.Console.WriteLine("shits broken");
                return(null);
            }
            }
        }
示例#9
0
 public override void Effect(Child c, MasterGameControl controller)  //this item's effect recovers health by calling the child's Recover method
 {
     c.Recover(recovery);
 }
示例#10
0
 public void GetController(MasterGameControl control) // a simple controller getter
 {
     controller = control;
 }
示例#11
0
 }                                                                 //cost of item
 public virtual void Effect(Child c, MasterGameControl controller) //sets up a virtual effect method that is later overridden
 {
 }