public void MoveNorth()
 {
     if (HasLocationToNorth)
     {
         CurrentLocation = CurrentWorld.LocationAt(CurrentLocation.XCoordinate, CurrentLocation.YCoordinate + 1);
     }
 }
 public void MoveWest()
 {
     if (HasLocationToWest)
     {
         CurrentLocation = CurrentWorld.LocationAt(CurrentLocation.XCoordinate - 1, CurrentLocation.YCoordinate);
     }
 }
 public void MoveSouth()
 {
     if (HasLocationToSouth)
     {
         CurrentLocation = CurrentWorld.LocationAt(CurrentLocation.XCoordinate, CurrentLocation.YCoordinate - 1);
     }
 }
Пример #4
0
        public GameSession()
        {
            CurrentPlayer = new Player("Chad", "Magic User?", 0, 20, 20, 10, 10, 101);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1005));
            }

            if (!CurrentPlayer.MagicList.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(7001));
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(7002));
            }

            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(8001));

            // Legendary Sword
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(1));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3000));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3001));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3002));

            // Prison Key
            CurrentPlayer.LearnRecipe(RecipeFactory.RecipeByID(2));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3003));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3004));
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(3005));

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(-3, 1);
        }
Пример #5
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage("");
            RaiseMessage($"The {CurrentMonster.Name} killed you.");

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
            CurrentPlayer.CompletelyHeal();
        }
Пример #6
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage("");
            RaiseMessage($"You have been killed.");

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
            CurrentPlayer.CompletelyHeal();
        }
Пример #7
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage("");
            RaiseMessage($"Something has defeated you. You awaken back at home.");

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
            CurrentPlayer.CompletelyHeal();
        }
Пример #8
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage("");
            RaiseMessage($"You died. Idiot.");

            CurrentPlayer.CompletelyHeal();
            CurrentLocation = CurrentWorld.LocationAt(0, -1);//Player's home
        }
Пример #9
0
 private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
 {
     RaiseMessage("");
     RaiseMessage("You have been defeated.");
     //Idea: Create a variable for home location
     CurrentLocation = CurrentWorld.LocationAt(1, 2);
     CurrentPlayer.CompletelyHeal();
 }
Пример #10
0
        public void OnKilled_CurrentPlayer(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage("");
            RaiseMessage($"You have been killed"); // TODO: Add message to event based on what killed.

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
            CurrentPlayer.CompletelyHeal();
        }
Пример #11
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            _messageBroker.RaiseMessage("");
            _messageBroker.RaiseMessage($"You have been slain");

            CurrentLocation = CurrentWorld.LocationAt(0, 0);
            CurrentPlayer.CompletelyHeal();
        }
Пример #12
0
 public void MoveNorth()
 {
     // guard condition to prevent errors. Check this condition before setting CurrentLocation
     if (HasLocationToNorth)
     {
         CurrentLocation = CurrentWorld.LocationAt(CurrentLocation.XCoordinate, CurrentLocation.YCoordinate + 1);
     }
 }
Пример #13
0
        private void MoveSafely(int deltaX, int deltaY)
        {
            Location nextLocation = CurrentWorld.LocationAt(CurrentLocation.XCoordinate + deltaX, CurrentLocation.YCoordinate + deltaY);

            if (nextLocation != null)
            {
                CurrentLocation = nextLocation;
            }
        }
Пример #14
0
        public GameSession()
        {
            CurrentLocation = CurrentWorld.LocationAt(0, 0);

            CurrentPlayer = new Player("Test", "Fighter", 10, gold: 1000);
            CurrentPlayer.AddToInventory(ItemFactory.NewItem(1001));
            CurrentPlayer.AddToInventory(ItemFactory.NewItem(2001));
            CurrentPlayer.LearnRecipe(RecipeFactory.GetRecipe(1));
        }
Пример #15
0
        public void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage($"");
            RaiseMessage($"{CurrentMonster.Name} te ubio.");
            RaiseMessage("Teleportiram te kuci");

            CurrentLocation = CurrentWorld.LocationAt(0, -1); // Vracas se kuci
            CurrentPlayer.CompletylHeal();
        }
Пример #16
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage("");
            RaiseMessage("Zabili tě.");

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
            CurrentPlayer.CompletelyHeal();
            CurrentPlayer.CompletelyRegainMana();
        }
Пример #17
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs eventArgs)
        {
            RaiseMessage("");
            RaiseMessage("You have been descimated and can no longer go on.");

            CurrentLocation = CurrentWorld.LocationAt(-3, 1);
            CurrentPlayer.CompleteHeal();
            CurrentPlayer.FullManaRestore();
        }
Пример #18
0
        public GameSession()
        {
            CurrentPlayer = new Player {
                Name = "Melvin", CharacterClass = "Knight", ExperiencePoints = 0, Gold = 0, HitPoints = 100, Level = 0
            };

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
Пример #19
0
        private void OnCurrentPlayerKilled(object sender, System.EventArgs e)
        {
            // If player dies, revive at home
            RaiseMessage("");
            //RaiseMessage($"The {CurrentMonster.Name} killed you.");
            RaiseMessage($"You have been killed.");

            CurrentLocation = CurrentWorld.LocationAt(0, -1); // Player home
            CurrentPlayer.CompletelyHeal();
        }
Пример #20
0
 public Tuple <bool, bool, bool, bool> Exits()
 {
     // return a tuple expression which directions the player can travel from the current location
     return(Tuple.Create(
                CurrentWorld.LocationAt(CurrentLocation.X, CurrentLocation.Y + 1) != null, // north
                CurrentWorld.LocationAt(CurrentLocation.X, CurrentLocation.Y - 1) != null, // south
                CurrentWorld.LocationAt(CurrentLocation.X + 1, CurrentLocation.Y) != null, // east
                CurrentWorld.LocationAt(CurrentLocation.X - 1, CurrentLocation.Y) != null  // west
                ));
 }
Пример #21
0
 public void MoveWest()
 {
     if (CurrentWorld.LocationAt(CurrentLocation.XCoordinate - 1, CurrentLocation.YCoordinate) != null)
     {
         CurrentLocation = CurrentWorld.LocationAt(CurrentLocation.XCoordinate - 1, CurrentLocation.YCoordinate);
         if (CurrentLocation.IsCheckpoint)
         {
             Checkpoint = CurrentLocation;
         }
     }
 }
Пример #22
0
        public GameSession()
        {
            //---Player Info---
            CurrentPlayer = new Player {
                Name = "Patrick", CharacterClass = "Fighter", HitPoints = 10, Gold = 100, ExperiencePoints = 0, Level = 1
            };

            //---Location Info---
            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
Пример #23
0
 public void MoveNorth()
 {
     if (CurrentWorld.LocationAt(CurrentLocation.XCoordinate, CurrentLocation.YCoordinate + 1) != null)
     {
         CurrentLocation = CurrentWorld.LocationAt(CurrentLocation.XCoordinate, CurrentLocation.YCoordinate + 1);
         if (CurrentLocation.IsCheckpoint)
         {
             Checkpoint = CurrentLocation;
         }
     }
 }
Пример #24
0
        public GameSession(string characterName)
        {
            CurrentPlayer = new Player(characterName, "Hardcoded", 0, 10, 10, 1000000);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld    = WorldFactory.CreateWorld();    // Stvori world
            CurrentLocation = CurrentWorld.LocationAt(0, 0); // Trenutna lokacija
        }
Пример #25
0
        public GameSession()
        {
            CurrentPlayer = new Player("Vincent", "Azure Administrator", 0, 10, 10, 0, 0);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }
Пример #26
0
        public GameSession()
        {
            CurrentPlayer = new Player(name: "Tahj", characterClass: "Fighter", experiencePoints: 0, maximumHitPoints: 10,
                                       currentHitPoints: 10, strength: 10, dexterity: 10, armorClass: 10, strengthAbilityScore: 0, gold: 10);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
Пример #27
0
        public GameSession()
        {
            CurrentPlayer = new Player("Auston", "Fighter", 0, 10, 10, 1000000);

            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld = WorldFactory.CreateWorld();

            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
Пример #28
0
        public GameSession()
        {
            CurrentPlayer = new Player("Chuyue", "Fighter", 0, 10, 10, 1000000);

            //Player should always have something to fight with
            if (!CurrentPlayer.Weapons.Any())
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateGameItem(1001));
            }

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
Пример #29
0
        public void StartTheGame()
        {
            CurrentPlayer = new Player("John Doe", "Scientist", 0, 10, 10, 10, 100);

            if (CurrentPlayer.Inventory.Weapons.Count == 0)
            {
                CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(1));
            }
            CurrentPlayer.AddItemToInventory(ItemFactory.CreateItem(6));
            CurrentPlayer.LearnScheme(SchemeFactory.GetSchemeById(1));

            CurrentWorld    = WorldFactory.CreateWorld();
            CurrentLocation = CurrentWorld.LocationAt(0, 0);
        }
Пример #30
0
        public GameSession()
        {
            CurrentPlayer = new Player // object literal - improves readability
            {
                Name             = "Eli",
                CharacterClass   = "Monk",
                HitPoints        = 10,
                Gold             = 1000000,
                ExperiencePoints = 0,
                Level            = 1,
            };

            CurrentWorld    = WorldFactory.CreateWorld(); // we only use this once - so we make this static
            CurrentLocation = CurrentWorld.LocationAt(0, -1);
        }