コード例 #1
0
        public static Adventurer DevPlayer()
        {
            Adventurer adventurer = new Adventurer();

            adventurer.Name                = "Winter";
            adventurer.Age                 = 18;
            adventurer.PlayerRace          = Adventurer.Race.Slime;
            adventurer.PlayerWeapon        = Adventurer.Weapon.Bow;
            adventurer.Health              = 100;
            adventurer.MaxHealth           = 100;
            adventurer.MapLocation         = Adventurer.Location.TutTown;
            adventurer.Xpos                = 55;
            adventurer.Ypos                = 26;
            adventurer.InaHouse            = false;
            adventurer.InHouseName         = House.houseName.None;
            adventurer.QuestCompletion     = Adventurer.InstantiateQuests();
            adventurer.InventoryPageNumber = 0;
            adventurer.Coins               = 9000000;
            adventurer.ItemsDictionary     = Adventurer.InstantiateInventory();

            adventurer.PreviousLocations = new List <Humanoid.Location> {
                Humanoid.Location.TutTown
            };
            adventurer.QuestDone = Adventurer.InstantiateQuestCompletionMessageCheck();

            adventurer.playerWin = false;

            adventurer.Damage = 9;

            adventurer.CurrentQuest = Adventurer.Quest.MeetTheOldMan;

            adventurer.PlayerLevel   = 1;
            adventurer.Experinece    = 95;
            adventurer.MaxExperience = 100;

            adventurer.diedOnFinal = false;


            return(adventurer);
        }
コード例 #2
0
        public static Adventurer GetPlayerInfo(Universe universe)
        {
            Adventurer adventurer = new Adventurer();

            ClearInputBox();

            ReWriteToMessageBox(universe, "Please enter your name young one.", true);
            Console.SetCursorPosition(4, 56);
            adventurer.Name = Console.ReadLine();
            ClearTextBox();
            ClearErrorTextBox();



            ReWriteToMessageBox(universe, "Please enter your age " + adventurer.Name, true);
            adventurer.Age = Validators.ValidInt();
            ClearTextBox();
            ClearErrorTextBox();



            ReWriteToMessageBox(universe, "What race are you?", true);
            Console.SetCursorPosition(6, 47);
            Console.Write(Adventurer.Race.Human);
            Console.SetCursorPosition(6, 48);
            Console.Write(Adventurer.Race.Slime);
            Console.SetCursorPosition(6, 49);
            Console.Write(Adventurer.Race.Elve);
            Console.SetCursorPosition(6, 50);
            Console.Write(Adventurer.Race.Orc);

            adventurer.PlayerRace = Validators.RaceValidation();
            ClearTextBox();
            ClearErrorTextBox();


            ReWriteToMessageBox(universe, "What Weapon will you use?", true);
            Console.SetCursorPosition(6, 47);
            Console.Write(Adventurer.Weapon.Bow);
            Console.SetCursorPosition(6, 48);
            Console.Write(Adventurer.Weapon.Sword);
            Console.SetCursorPosition(6, 49);
            Console.Write(Adventurer.Weapon.Staff);
            Console.SetCursorPosition(6, 50);
            Console.Write(Adventurer.Weapon.BroadSword);
            Console.SetCursorPosition(6, 51);
            Console.Write(Adventurer.Weapon.Dagger);
            Console.SetCursorPosition(6, 52);
            Console.Write(Adventurer.Weapon.Mace);
            adventurer.PlayerWeapon = Validators.WeaponValidation();
            ClearTextBox();
            ClearErrorTextBox();


            adventurer.Health      = 100;
            adventurer.MaxHealth   = 100;
            adventurer.MapLocation = Adventurer.Location.TutTown;
            adventurer.Xpos        = 55;
            adventurer.Ypos        = 26;
            adventurer.InaHouse    = false;
            adventurer.InHouseName = House.houseName.None;



            adventurer.QuestCompletion   = Adventurer.InstantiateQuests();
            adventurer.PreviousLocations = new List <Humanoid.Location> {
                Humanoid.Location.TutTown
            };

            adventurer.Coins           = 20;
            adventurer.ItemsDictionary = Adventurer.InstantiateInventory();
            adventurer.QuestDone       = Adventurer.InstantiateQuestCompletionMessageCheck();

            if ((adventurer.PlayerWeapon == Adventurer.Weapon.BroadSword) || (adventurer.PlayerWeapon == Adventurer.Weapon.Sword))
            {
                adventurer.Damage = 7;
            }
            else if ((adventurer.PlayerWeapon == Adventurer.Weapon.Dagger))
            {
                adventurer.Damage = 5;
            }
            else if ((adventurer.PlayerWeapon == Adventurer.Weapon.Bow))
            {
                adventurer.Damage = 9;
            }
            else if ((adventurer.PlayerWeapon == Adventurer.Weapon.Mace))
            {
                adventurer.Damage = 11;
            }
            else if ((adventurer.PlayerWeapon == Adventurer.Weapon.Staff))
            {
                adventurer.Damage = 10;
            }

            adventurer.playerWin = false;

            adventurer.PlayerLevel   = 1;
            adventurer.Experinece    = 0;
            adventurer.MaxExperience = 100;
            adventurer.CurrentQuest  = Adventurer.Quest.MeetTheOldMan;

            adventurer.diedOnFinal = false;

            RemoveBox(universe, 5);
            return(adventurer);
        }