Exemplo n.º 1
0
 public MockActionContext(Character user, CombatAction hitboxAction, ExplosionData explosion, BattleData data)
 {
     User            = user;
     StrikeLandTiles = new List <Loc>();
     HitboxAction    = hitboxAction;
     Explosion       = explosion;
     Data            = data;
 }
Exemplo n.º 2
0
 // todo: export combat filtering class.
 public static bool PassFiltering(TargetFilter filter, CombatAction e)
 {
     return((filter == TargetFilter.Enemies && e.target && e.source.data.alliance != e.target.data.alliance) ||
            (filter == TargetFilter.All) ||
            (filter == TargetFilter.AlliesAll && e.target && e.source.data.alliance == e.target.data.alliance) ||
            (filter == TargetFilter.AlliesOther && e.target && e.target != e.source && e.source.data.alliance == e.target.data.alliance) ||
            (filter == TargetFilter.Self && e.target && e.target == e.source));
 }
Exemplo n.º 3
0
 public BattleAction(string description, CombatAction actionMethod, Unit actionInvokerUnit, Unit actionTargetUnit, Sprite actionIcon)
 {
     this.description = description;
     this.actionInvokerUnit = actionInvokerUnit;
     this.actionTargetUnit = actionTargetUnit;
     this.combatAction = actionMethod;
     this.actionIcon = actionIcon;
 }
Exemplo n.º 4
0
 public Battle(Player currentplayer, Monster monster)
 {
     player = currentplayer;
     this.monster = monster;
     playerTimer = monsterTimer = 0;
     nextAction = CombatAction.Attack;
     nextActionItem = player.EquippedWeapon;
 }
Exemplo n.º 5
0
        public Location LoadRoomTwo()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Eating Room";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestTowerFloorTwo.DEFEATED_ROOM_TWO_GROUP));

            //Actions
            if (!defeatedMobs)
            {
                returnData.Description = "A room filled with tables for eating. There is a group of necromancers and bandits eating";
                // Location Actions
                List <LocationAction> locationActions = new List <LocationAction>();

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Bandits and Necromancers", mobs);
                combatAction.PostCombat += RoomTwoGroup;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A room with dead bodies strewn about the floor.";
            }

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

            // The floor below
            LocationDefinition locationDefinition = WatertownForestTowerFloorTwo.GetTownInstance().GetRoomOneDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            //Room Two
            if (defeatedMobs)
            {
                locationDefinition = WatertownForestTowerFloorTwo.GetTownInstance().GetRoomThreeDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                locationDefinition = WatertownForestTowerFloorTwo.GetTownInstance().GetRoomFourDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

                locationDefinition = WatertownForestTowerFloorTwo.GetTownInstance().GetRoomFiveDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Exemplo n.º 6
0
        public Location LoadBufferRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Buffer Room";
            bool defeatedBandits = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditShack.DEFEATED_BUFFER_ROOM_BANDITS));

            //Actions
            if (!defeatedBandits)
            {
                returnData.Description = "A small room that separates the kitchen from the holding room. Three bandits are guarding the holding room.";

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

                List <Mob> bandit = new List <Mob>();
                bandit.Add(new Bandit());
                bandit.Add(new Bandit());
                bandit.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", bandit);
                combatAction.PostCombat += BufferRoomBandits;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A small room that separates the kitchen from the holding room. Three bandits lay vanquished before the door.";
            }

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

            // Town Center
            LocationDefinition locationDefinition = AnkouBanditShack.GetTownInstance().GetKitchenDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedBandits)
            {
                locationDefinition = AnkouBanditShack.GetTownInstance().GetHoldingRoomDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment scoutUndergroundHideout = Ankou.GetAnkouAccomplishments().Find(x => x.Name.Contains("Scouted Underground Hideout"));

            if (GameState.Hero.Accomplishments.Contains(scoutUndergroundHideout))
            {
                locationDefinition = AnkouUndergroundHideOut.GetTownInstance().GetEntranceDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }


            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Exemplo n.º 7
0
        public Location LoadDarkMastersOffice()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Dark Master's Office";
            bool   defeatedMobs           = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.DARK_MASTER));
            bool   openedChest            = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.DARK_MASTER_TREASURE));
            string darkMasterSpeechBefore = "''Hello, " + GameState.Hero.Identifier + ". '' A deep voice sounds from behind the hood of the cloack. It lacks all compasion and warmth, and instead feels cold and evil sending chills running down your spine.\n''I have to bring myself to wonder, why have you come here and disturbed the clouds that we enjoy so much? I have lived my life hidden in shadows, and I will not let you change that.''";
            string darkMasterSpeechAfter  = "The Dark Master gasp for breath as his hood falls from his face. You can see that his eyes are a pale red, which were most likely a darker shade of red before the fight you just had. He looks up at you, both hatred and resignation seen in his eyes. He gasp out, ''I didn't want to be involved. He made me. I heard stories about,'' *coughs* ''you. Didn't want to fight. But he made me. Make him pay. Spies in the tower. They can... '' *coughs up blood* ''lead you to him. Go. Make him pay.''";

            if (!defeatedMobs)
            {
                returnData.Description = "The office is lit only by a small lamp sitting on the desk in the center of the room. The flames flicker on the walls, briefly illuminating skeletons hanging from them. The flames show a man in a dark cloak sitting at the desk, his face clouded by the darkness.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new DarkMaster());
                CombatAction combatAction = new CombatAction("Dark Master", mobs, darkMasterSpeechBefore, darkMasterSpeechAfter);
                combatAction.PostCombat += DarkMaster;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The office is lit only by a small lamp sitting on the desk in the center of the room. The flames flicker on the walls, briefly illuminating skeletons hanging from them. The Dark Master's body lays collapsed upon his desk.";
            }

            if (defeatedMobs && !openedChest)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += DarkMasterChest;
                returnData.Actions   = locationActions;
            }


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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerMysteriousHouse.GetTownInstance().GetKitchenDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);


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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 8
0
        public Location LoadKitchen()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Kitchen";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerMysteriousHouse.KITCHEN_NECRO));

            if (!defeatedMobs)
            {
                returnData.Description = "The kitchen is dark much like the rest of the house. The air smells a tad better in here due to the smells of fresh cooking food. There are two necromancers moving about the kitchen preparing meals for the rest in the house.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Necromancers", mobs);
                combatAction.PostCombat += KitchenNecro;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The kitchen is dark much like the rest of the house. The air smells a tad better in here due to the smells of fresh cooking food. Two necromancers lay dead on the ground, their blood pouring at your feet.";
            }


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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);


            if (defeatedMobs)
            {
                locationDefinition = BeachTowerMysteriousHouse.GetTownInstance().GetStorageRoomDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

                locationDefinition = BeachTowerMysteriousHouse.GetTownInstance().GetDarkMastersOfficeDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            Accomplishment report = BeachTower.GetBeachTowerAccomplishments().Find(x => x.Name.Contains("Investigate Report"));

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 9
0
    private void OnPostSpell(CombatAction combatAction)
    {
        var spellAction = combatAction as SpellAction;

        if (spellAction.SkillExecution != null)
        {
            AnimationComponent.PlayFade(AnimationComponent.IdleAnimation);
        }
    }
        public Location LoadTinyIsland()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Narrow Creek";
            bool   defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestRangerPaths.GIANT_SHADOW_DEMON));
            bool   tookTreasure = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestRangerPaths.TREASURE_CHEST));
            string before       = "You walk onto the island and the Giant Shadow Demon fixes its gaze upon you. Dread seeps into your body as you clench you weapon tighter, ready for whatever horror you're about to face.";
            string after        = "The shadows seep quickly away from the demon. You walk up to it and ask, 'Where are the rangers? What did you do with them?' \nThe Giant Shadow Demon fixes you with a cold and hateful stare and growls, 'Puppets for my master.' You raise your weapon to strike in anger but the demon slips into the void before you can land a strike.";

            if (!defeatedMobs)
            {
                returnData.Description = "A tiny island resides in the forest. The trees have lost all leaves and the bark is blackened as if burnt. The ground is void of grass and is instead blackened as if scorched. Hovering in the middle of the island is a giant shadow demon. He must be behind the corruption of this part of the forest.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new GiantShadowDemon());
                CombatAction combatAction = new CombatAction("Giant Shadow Demon", mobs, before, after);
                combatAction.PostCombat += TinyIslandGiantShadowDemon;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!tookTreasure)
            {
                returnData.Description = "There is a narrow creek separating the forest paths from a tiny island. The Water Spirits have been laid to rest and the creek is once again peaceful. There is a treasure chest in the middle of the island";

                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "There is a narrow creek separating the forest paths from a tiny island. The Water Spirits have been laid to rest and the creek is once again peaceful.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BankenAshenForestRangerPaths.GetTownInstance().GetNarrowCreekDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 11
0
        public Location LoadEatingArea()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Eating Area";
            bool defeatedNecros = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouNecromancerCamp.DEFEATED_EATING_AREA_MOBS));

            if (!defeatedNecros)
            {
                returnData.Description = "A large area for the necromancers to eat their meals. There are make shift tables, crudely cut from wood. Also, there are several logs that haven been evened off for seats placed in several places. There are ten necromancers eating in the area.";

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

                List <Mob> necro = new List <Mob>();
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Necromancers", necro);
                combatAction.PostCombat += EatingAreaMobs;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            if (defeatedNecros)
            {
                returnData.Description = "A large area for the necromancers to eat their meals. There are make shift tables, crudely cut from wood. Also, there are several logs that haven been evened off for seats placed in several places. The necromancers lay dead with their food growing cold due to no one being there to eat it.";
            }

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

            // Town Center
            LocationDefinition locationDefinition = AnkouNecromancerCamp.GetTownInstance().GetCookingAreaDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedNecros)
            {
                locationDefinition = AnkouNecromancerCamp.GetTownInstance().GetNarrowStairsDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
        public Location LoadDenseWoods()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Dense Woods";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenForestWilderness.DENSE_WOODS_MOBS));

            _collectedWood = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Watertown.LOCATION_STATE_KEY, BankenForestWilderness.COLLECT_WOOD_KEY));
            string action     = "Collect";
            string itemName   = "Wood";
            string actionText = "You chop down several trees to collect wood.";

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

            if (!defeatedMobs)
            {
                returnData.Description = "The trees just off the path are very dense and could be used to collect wood...\nThere are several spiders roaming about the trees.";

                List <Mob> mobs = new List <Mob>();
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                mobs.Add(new GiantSpider());
                CombatAction combatAction = new CombatAction("Giant Spiders", mobs);
                combatAction.PostCombat += DenseWoodMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The trees just off the path are very dense and could be used to collect wood...";
            }

            // Location Actions

            if (!_collectedWood && defeatedMobs)
            {
                TakeItemAction itemAction = new TakeItemAction(action, itemName, actionText);
                locationActions.Add(itemAction);
                itemAction.PostItem += WoodResults;
                returnData.Actions   = locationActions;
            }

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

            //Town Center
            LocationDefinition locationDefinition = BankenForestWilderness.GetTownInstance().GetTrecherousPathTwoDefinintion();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadDesertedRitualGrounds()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Deserted Ritual Grounds";
            bool   defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAncientBurialGrounds.ACKHAN));
            bool   tookTreasure = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAncientBurialGrounds.TREASURE));
            string before       = "You walk into the circular and Ackhan's eyes darken as he fixates on you. He raises his right and and sends a blast of shadow energy straight at you. You dodge and draw your weapon. Prepare to fight!";
            string after        = "Ackhan gasp out, blood splurtting out of his mouth. You draw a hidden dagger and put it up to his throught. You growl down at him, 'Tell me what I want to know and I'll end this quickly for you. Tell me what happened to those rangers?' \nAckhan coughs on his blood and says, 'Gone... tombs... You'll never find them.' \nIn frustration you slice his throat and his dead body crumbles to the ground. There is an explosion of dark energy from the center of his body, sending you flying backwards. You slowly stand up to find his dead body missing and a giant black scorch mark where it used to lay.";

            if (!defeatedMobs)
            {
                returnData.Description = "On the other side of the dense fog is a circular arrea that used to be used as ritual grounds. The grounds have long since been abandoned. However, a new resident has taken up home here and is spewing dark magic into the lands. An evil necromancer, Ackhan, whom is part of the Necromancer Council stands in the middle of the circle chanting in some unknown tongue. Dark wisps leave his body and fly into the forest.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Ackhan());
                CombatAction combatAction = new CombatAction("Ackhan", mobs, before, after);
                combatAction.PostCombat += Ackhan;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!tookTreasure)
            {
                returnData.Description = "On the other side of the dense fog is a circular arrea that used to be used as ritual grounds. The grounds have long since been abandoned. However, a new resident has taken up home here and is spewing dark magic into the lands. There is a black scorch mark where Ackhan used to be. There is an unopened treasure chest on the edge of the circle.";

                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "On the other side of the dense fog is a circular arrea that used to be used as ritual grounds. The grounds have long since been abandoned. There is a black scorch mark where Ackhan used to be.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BankenAncientBurialGrounds.GetTownInstance().GetDenseFogDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadScoutLeaderTent()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Scout Leader's Tent";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerScoutingParty.SCOUT_LEADER));
            bool tookTreasure = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerScoutingParty.TREASURE));

            string before = "The Scout Leader looks up from his maps and smiles evily at you. He walks up to you saying, ''Well, well, well. If it isn't, " + GameState.Hero.Identifier + ". You think you're going to stop the invasion? You're a fool, " + GameState.Hero.Identifier + ". There is no way you are going to stop the storm that is to come. Blood will fall in Asku. And there is nothing you can do to stop it.''";
            string after  = "The Scout Leader collapses to the ground, coughing up blood. With his last breath he looks up to you and gasp out, ''You think... This changes things? We sail toward Asku now. The Beach Head will fall first. Then the whole country. Beware the dawn.''";

            if (!defeatedMobs)
            {
                returnData.Description = "The scout leaders tent is located at the eastern edge of the tent cluster. The Scout Leader is inside pouring over maps of Asku.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new ScoutLeader());
                CombatAction combatAction = new CombatAction("Scout Leader", mobs, before, after);
                combatAction.PostCombat += ScoutLeader;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!tookTreasure)
            {
                returnData.Description = "The scout leaders tent is located at the eastern edge of the tent cluster. The Scout Leader lies dead in the middle of his tent. There is an unopened treasure chest on the side of the tent.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += TreasureChest;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "The scout leaders tent is located at the eastern edge of the tent cluster. The Scout Leader lies dead in the middle of his tent.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerScoutingParty.GetTownInstance().GetTentClusterDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 15
0
        public Location LoadLargeRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Large Room";
            bool defeatedNecro = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.DEFEATED_LARGE_ROOM_NECROS));

            //Actions
            if (!defeatedNecro)
            {
                returnData.Description = "A large room that has ten necromancers mingling about and discussing various things.";

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

                List <Mob> necro = new List <Mob>();
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                necro.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Necromancers", necro);
                combatAction.PostCombat += LargeRoomNecros;

                locationActions.Add(combatAction);

                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large room with ten necromancers slaughtered about the ground.";
            }

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

            // Town Center
            LocationDefinition locationDefinition = AnkouBanditAndNecroCave.GetTownInstance().GetSmallHovelDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedNecro)
            {
                locationDefinition = AnkouBanditAndNecroCave.GetTownInstance().GetDarkRoomDefinition();
                adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Exemplo n.º 16
0
        public Location LoadMainRoad()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Main Road";
            bool defeatedMobs  = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenOldForestRuins.MAIN_ROAD_MOBS));
            bool clearBlockade = Convert.ToBoolean(LocationHandler.GetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenOldForestRuins.CLEAR_ROAD_BLOCK));


            if (!defeatedMobs)
            {
                returnData.Description = "This is the main run that used to connect the city to the outside world. Now the stones are covered in overgrown moss and several are broken. Bandits walk this road. They have set up a blockade preventing further access to the ruins. Probably to enforce a tarrif on traveling through the ruins.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += MainRoadMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (!clearBlockade)
            {
                returnData.Description = "This is the main run that used to connect the city to the outside world. Now the stones are covered in overgrown moss and several are broken. The road is littered with bandit corpses. They have set up a blockade preventing further access to the ruins. Probably to enforce a tarrif on traveling through the ruins.";

                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Clear", "Blockade", "You painstacking clear the blockade that the bandits. Hopefully no one else will fall victim to their evil ways");
                locationActions.Add(itemAction);
                itemAction.PostItem += ClearBlockade;
                returnData.Actions   = locationActions;
            }
            else
            {
                returnData.Description = "This is the main run that used to connect the city to the outside world. Now the stones are covered in overgrown moss and several are broken. The road is littered with bandit corpses. The rocks that blocked the road have been pushed to the side.";
            }

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

            LocationDefinition locationDefinition = BankenOldForestRuins.GetTownInstance().GetEntranceDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 17
0
    public void AnimateEnterWithAction(int index)
    {
        ActionUIButton button = GetButton(index);

        if (button != null)
        {
            CombatAction action = actions.Value[index];
            button.AnimateEnterWithAction(action.GetRepresentation());
        }
    }
Exemplo n.º 18
0
        public bool Equals(CombatAction action)
        {
            bool returnValue = action.ActionValue.Equals(ActionValue);

            if (Parent != null)
            {
                returnValue = returnValue || Parent.Equals(action);
            }
            return(returnValue);
        }
Exemplo n.º 19
0
        // Removes all currently queue'd actions and sets a default
        public void SetAction(CombatAction action)
        {
            foreach (CombatAction queuedAction in actions)
            {
                Destroy(queuedAction);
            }

            actions.Clear();
            actions.Enqueue(action);
        }
Exemplo n.º 20
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);
        }
Exemplo n.º 21
0
        public Location LoadNorthRoom()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Ornate Room";
            bool   defeatedMobs          = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.SPY_MASTER));
            bool   openedChest           = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerSpies.SPY_MASTER_TREASURE));
            string spyMasterSpeechBefore = "''So, " + GameState.Hero.Identifier + "... You have come at last. I must admit, I was curious how long it would take for my little operation here to become compromised. Though this was a little sooner than expected. No matter, I will deal with you and can make my escape then before those idiot guards realize anything has gone wrong. Yes, that should do it. Any last words?'' \nWithout waiting for a reply for a reply he swiftly draws two swords and lunges at you. You narrowly dodge the attack and brace yourself for a fight.";
            string spyMasterSpeechAfter  = "You stand over the Spy Master as the life force leaves his body. He looks up at you and says, ''You'll... pay... you... bastard. This... is... not... the... end... My... masters... have... plans. A... darkness... rises... in... the... east.'' He gasp out the last word and then chokes on the air as he struggles to breathe. After a few seconds he succumbs to his wounds and departs this life.";

            if (!defeatedMobs)
            {
                returnData.Description = "A large ornate room furnished with the best that nobles could afford when they commissioned the building of the tower. A spy master is pacing back and forth in the middle of it, his forhead creased in concentration.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new SpyMaster());
                CombatAction combatAction = new CombatAction("Spy Master", mobs, spyMasterSpeechBefore, spyMasterSpeechAfter);
                combatAction.PostCombat += SpyMaster;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ornate room furnished with the best that nobles could afford when they commissioned the building of the tower. The spy master lies dead in the center of it.";
            }

            if (defeatedMobs && !openedChest)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += SpyMasterChest;
                returnData.Actions   = locationActions;
            }

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

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

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadHouseDistrict()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "House District";
            bool defeatedMobs   = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.HOUSE_DISTRICT_MOBS));
            bool freedVillagers = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.HOUSE_DISTRICT_VILLAGERS));

            if (!defeatedMobs)
            {
                returnData.Description = "The house district showcases the true nature of the locals. The houses are all large but simple, reflecting their life style philosophy. Bandits are rounding up some of the villagers and tying them to a wooden post to burn alive.";

                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());
                mobs.Add(new Bandit());
                CombatAction combatAction = new CombatAction("Bandits", mobs);
                combatAction.PostCombat += HouseDistrictMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else if (defeatedMobs && !freedVillagers)
            {
                returnData.Description = "The house district showcases the true nature of the locals. The houses are all large but simple, reflecting their life style philosophy. There are a lot of villagers tied up to a post.";
                List <LocationAction> locationActions = new List <LocationAction>();
                TakeItemAction        itemAction      = new TakeItemAction("Free", "Villagers", "You free the villagers, and inform them to head to the Beach Tower so they can seek medical attention. They thank you and run off in the distance.");
                itemAction.PostItem += HouseDistrictVillagers;
                locationActions.Add(itemAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The house district showcases the true nature of the locals. The houses are all large but simple, reflecting their life style philosophy.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerCapturedVillage.GetTownInstance().GetTownCenterDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            //Player must defeat bandits and free villagers to advance
            locationDefinition = BeachTowerCapturedVillage.GetTownInstance().GetMayorsHouseDefinition();
            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
Exemplo n.º 23
0
    public void AddSkill(string newSkill)
    {
        if (newSkill == "TankSkill" && SelectedCharacter.GetComponent <Character>().UsingSkill)
        {
            for (int i = 0; i < ActionList.Count; ++i)
            {
                if (ActionList[i].Agent == SelectedCharacter)
                {
                    ActionList[i].Agent.GetComponent <Character>().AvailableStamina += ActionList[i].StaminaCost;
                    ActionList.RemoveAt(i);
                }
            }
            SelectedCharacter.GetComponent <Character>().ActionPoints  += 3;
            SelectedCharacter.GetComponent <Character>().UsingSkill     = false;
            SelectedCharacter.GetComponent <Character>().SkillBeingUsed = "";
            return;
        }


        CombatAction skill = new CombatAction();

        skill.Agent = SelectedCharacter;
        if (SelectedEnemyCharacter != null)
        {
            skill.Target = SelectedEnemyCharacter;
        }
        else
        {
            skill.Target = null;
        }

        skill.Skill = newSkill;

        skill.StaminaCost = StaminaCostSkill(skill.Skill);

        if (skill.Agent.GetComponent <Character>().AvailableStamina < skill.StaminaCost)
        {
            Debug.Log("Not Enough Stamina");
            return;
        }

        skill.Agent.GetComponent <Character>().AvailableStamina   -= skill.StaminaCost;
        SelectedCharacter.GetComponent <Character>().ActionPoints -= 3;
        skill.SkillInUse = true;
        SelectedCharacter.GetComponent <Character>().SkillBeingUsed = newSkill;

        CS.ResetSelection();

        skill.ActionSpeed = SelectedCharacter.GetComponent <Character>().Speed;

        SelectedCharacter.GetComponent <Character>().UsingSkill = true;
        ChoosingSkill = "";

        ActionList.Add(skill);
    }
Exemplo n.º 24
0
    ///<summary>
    /// Ends the current turn by removing it from the turn order completely.
    ///</summary>
    public void EndOneShotTurn()
    {
        CombatAction action = (CombatAction)currentTurn;

        if (currentTurn is CombatAction)
        {
            turnOrder.Remove(currentTurn);
        }

        AdjustTurnOrder();
    }
        public async Task <IActionResult> Create([Bind("Id,Name,Description,OppurtunityAttack,IsFree,IsFullRound")] CombatAction combatAction)
        {
            if (ModelState.IsValid)
            {
                _context.Add(combatAction);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(combatAction));
        }
Exemplo n.º 26
0
 public static string GetActionName(CombatAction action)
 {
     return(action switch
     {
         CombatAction.None => "None",
         CombatAction.Quick => "Quick",
         CombatAction.Counter => "Counter",
         CombatAction.Heavy => "Heavy",
         CombatAction.Flee => "Flee",
         _ => throw new ArgumentOutOfRangeException()
     });
        public Location LoadPirateFleetMastersShip()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Pirate Fleet Master's Ship";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.FLEET_MASTER));
            bool openedChest  = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerPirateShips.FLEET_MASTER_CHEST));

            if (!defeatedMobs)
            {
                returnData.Description = "A large ship belonging to the pirate fleet master. He is standing at the bridge of the ship with one hand on the wheel, observing the shore.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new PirateFleetMaster());
                CombatAction combatAction = new CombatAction("Pirate Fleet Master", mobs);
                combatAction.PostCombat += FleetMaster;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "A large ship belonging to the pirate fleet master. He is standing in the middle of the ship, dead as the victims of Davy Jones.";
            }

            if (defeatedMobs && !openedChest)
            {
                List <LocationAction> locationActions = new List <LocationAction>();
                TreasureChestAction   itemAction      = new TreasureChestAction(5);
                locationActions.Add(itemAction);
                itemAction.PostItem += FleetMasterChest;
                returnData.Actions   = locationActions;
            }


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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerPirateShips.GetTownInstance().GetShipFourDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

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

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
 private void EnemyDecideActions()
 {
     foreach (CombatUnit op in enemy)
     {
         CombatAction ca = op.AIResolveAction();
         if (ca != null)
         {
             turnActions.Add(ca);
         }
     }
 }
Exemplo n.º 29
0
        public Location LoadNecroLivingArea()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Necromancer Living Area";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerHiddenCamp.NECRO_AREA_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "This part of the camp is densly populated with tents. There are necromancers wondering about, preparing for whatever nefarious activities they have planned.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                mobs.Add(new Necromancer());
                CombatAction combatAction = new CombatAction("Necromancer", mobs);
                combatAction.PostCombat += NecroAreaMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "This part of the camp is densly populated with tents. The necromancers lay dead with their remains splattered against the tents they used to call home. You feel better knowing you rid the world of whatever evil they were planning to commit.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerHiddenCamp.GetTownInstance().GetCooksTentsDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTowerHiddenCamp.GetTownInstance().GetLargeClearingDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
        public Location LoadTentCluster()
        {
            Location returnData;

            returnData      = new Location();
            returnData.Name = "Tent Cluster";
            bool defeatedMobs = Convert.ToBoolean(LocationHandler.GetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerScoutingParty.TENT_CLUSTER_MOBS));

            if (!defeatedMobs)
            {
                returnData.Description = "The main group of tents is loosely clustered together. There are scouts mingling about, preparing for whatever activity they have planned.";

                List <LocationAction> locationActions = new List <LocationAction>();
                List <Mob>            mobs            = new List <Mob>();
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                mobs.Add(new Scout());
                CombatAction combatAction = new CombatAction("Scouts", mobs);
                combatAction.PostCombat += TentClusterMobs;
                locationActions.Add(combatAction);
                returnData.Actions = locationActions;
            }
            else
            {
                returnData.Description = "The main group of tents is loosely clustered together. There are dead scouts all over the camp.";
            }

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

            //Town Center
            LocationDefinition locationDefinition = BeachTowerScoutingParty.GetTownInstance().GetTentEntranceDefinition();

            adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);

            if (defeatedMobs)
            {
                locationDefinition = BeachTowerScoutingParty.GetTownInstance().GetScoutLeaderTentDefinition();
                adjacentLocationDefintions.Add(locationDefinition.LocationKey, locationDefinition);
            }

            returnData.AdjacentLocationDefinitions = adjacentLocationDefintions;

            return(returnData);
        }
Exemplo n.º 31
0
    public void OnPreJumpTo(CombatAction action)
    {
        var jumpToAction = action as JumpToAction;
        var targetPoint  = jumpToAction.Target.ModelObject.transform.position + jumpToAction.Target.ModelObject.transform.forward * 2;

        jumpToAction.Creator.ModelObject.transform.DOMove(targetPoint, jumpToAction.Creator.JumpToTime / 1000f).SetEase(Ease.Linear);
        var AnimationComponent = jumpToAction.Creator.ModelObject.GetComponent <CombatObjectData>().AnimationComponent;

        AnimationComponent.Speed = 2f;
        AnimationComponent.PlayFade(AnimationComponent.RunAnimation);
    }
Exemplo n.º 32
0
    private void ReceiveStatus(CombatAction combatAction)
    {
        var action = combatAction as AssignEffectAction;
        var obj    = GameObject.Instantiate(StatusIconPrefab);

        obj.transform.SetParent(StatusSlotsTrm);
        if (action.Effect is AddStatusEffect addStatusEffect)
        {
            obj.GetComponentInChildren <Text>().text = addStatusEffect.AddStatus.Name;
            obj.name = action.Status.Id.ToString();
        }
    }
Exemplo n.º 33
0
 public void SelectNextAction(CombatAction action, Item itemToUse)
 {
     this.nextAction = action;
     this.nextActionItem = itemToUse;
 }
Exemplo n.º 34
0
 public void UseItem(Consumable item)
 {
     this.nextAction = CombatAction.UseItem;
     this.nextActionItem = item;
     this.Wait(1000 / (player.Speed + item.Speed));
 }
Exemplo n.º 35
0
 //Send GameEvent with combatAction method (delegate)
 private void InvokeAction(Unit targetUnit, CombatAction combatAction, Sprite actionIcon)
 {
     battleAction = new BattleAction("Battle Action", combatAction, this, targetUnit, actionIcon);
 }
Exemplo n.º 36
0
 public void SelectNewAction(CombatAction Action, Item Item)
 {
     switch (Action)
     {
         case CombatAction.Attack:
             this.primaryAbility = new WeaponAttack(this, Equipment.RightHandWeapon);
             break;
         case CombatAction.UseItem:
             this.primaryAbility = new ItemAbility(this, Item);
             break;
         default:
             break;
     }
 }