コード例 #1
0
        public static BankenMagesRetreatHouse GetTownInstance()
        {
            if (_MagesRetreatHouse == null)
            {
                _MagesRetreatHouse = new BankenMagesRetreatHouse();
            }

            return(_MagesRetreatHouse);
        }
コード例 #2
0
        public Location LoadBedroom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Bedroom";
            bool   defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenMagesRetreatHouse.PSYCHOTIC_BANDIT));
            bool   tookTreasure = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenMagesRetreatHouse.TREASURE));
            string before       = "The Psychotic Bandit hears your foot steps and spins around, a crazed look gleaming in his eyes. \nHe laughs hysterically and says, ''Hah! You're too late! We've already captured that puny mage. She fought  but she could not withstand us!''";
            string after        = "You put a knife up to the Psychotic Bandit's throat and growl out, ''Where is the mage? Where is she?''\nHe laughs and coughs up blood. He looks you in the eyes and replies, ''In hell.'' \nThe Psychotic Bandit coughs up blood one last time and then goes limp on the floor";

            List <LocationAction> locationActions = new List <LocationAction>();

            if (!defeatedMobs)
            {
                returnData.Description = "A small bedroom with a bed against the back wall and a desk against a side wall. A Pyschotic Bandit is going through the mage's desk and is throwing papers about everywhere.";

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new PsychoticBandit());
                CombatAction combatAction = new CombatAction("Pyschotic Bandit", mobs, before, after);
                combatAction.PostCombat += PsychoticBandit;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!tookTreasure)
            {
                returnData.Description = "A small bedroom with a bed against the back wall and a desk against a side wall. A treasue chest is sitting under the mage's desk.";
                TreasureChestAction itemAction = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "A small bedroom with a bed against the back wall and a desk against a side wall.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetLivingRoomDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = Banken.GetTownInstance().GetTownCenterDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #3
0
        public Location LoadHallway()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Hallway";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenMagesRetreatHouse.HALLWAY_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A hallway lays just inside the front door of the house. There are summoned spirits left over from some recent battle.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new EvilSpirit());
                mobs.Add(new EvilSpirit());
                mobs.Add(new EvilSpirit());
                CombatAction combatAction = new CombatAction("Evil Spirits", mobs);
                combatAction.PostCombat += HallwaySpirits;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A hallway lays just inside the front door of the house.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetEntranceDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetDiningRoomDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

                locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetLivingRoomDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #4
0
        public Location LoadLivingRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Living Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenMagesRetreatHouse.LIVING_ROOM_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "The living room has a couch and a couple chairs. There is a fireplace in the corner. There are four bandits sitting about, talking about their various adventures.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += LivingRoomBandits;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The living room has a couch and a couple chairs. There is a fireplace in the corner.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetBedroomDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #5
0
        public Location LoadDiningRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Dining Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenMagesRetreatHouse.DINING_ROOM_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A dining room, made to fit a small family or group of friends. There are several bandits sitting at the table laughing as they drink beer, most likely stolen from the mage who lives here.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += DiningRoomBandits;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A dining room, made to fit a small family or group of friends.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetHallwayDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetKitchenDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #6
0
        public Location LoadKitchen()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Kitchen";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenMagesRetreatHouse.KITCHEN_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "A small kitchen. There are cabnits thrown open and boxes of food strewn across the floor. There are two bandits rummaging through the different food stores.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += KitchenBandits;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small kitchen. There are cabnits thrown open and boxes of food strewn across the floor.";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetDiningRoomDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #7
0
        public Location LoadEntrance()
        {
            Location returnData;

            returnData             = new Location();
            returnData.Name        = "Mage's Retreat House";
            returnData.Description = "A small house built just off the Worship Region of Banken's forest.";

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForestWorshipRegion.GetTownInstance().GetReligiousShrineClearingDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetHallwayDefinition();
            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
コード例 #8
0
        public Location LoadReligiousShrineClearing()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Religious Shrine Clearing";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.RELIGIOUS_SHRINE_CLEARING_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "You walk into another clearing full of religious shrines. However these shrines are no longer holy. They've been desecrated by dark, vile, magic. The clearing is full of skeletons, all armed to the teeth and ready to end any foolish enough to trespess on their newly aquired unholy grounds.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                mobs.Add(new Skeleton());
                CombatAction combatAction = new CombatAction("Skeletons", mobs);
                combatAction.PostCombat += ReligiousShrineClearingMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "You walk into another clearing full of religious shrines. However these shrines are no longer holy. They've been desecrated by dark, vile, magic. Skeletal remains litter the ground";
            }

            //Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefintions = new Dictionary <string, LocationDefinition>();

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForestWorshipRegion.GetTownInstance().GetTwistingPathDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BankenAshenForestWorshipRegion.GetTownInstance().GetUndergroundPathDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }


            Accomplishment recruitMage = Banken.GetBankenAccomplishments().Find(x => x.Name.Contains("Recruit Mage"));

            if (GameState.Hero.Accomplishments.Contains(recruitMage))
            {
                locationDefinition = BankenMagesRetreatHouse.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }