Ejemplo n.º 1
0
        public void initialize()
        {
            MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.Five_Armies, "Five_Armies");

            background.model = ModelFactory.loadModel("SuperBattleCave");
            background.Scale = 3.0f;

            TurnList.Add(StateHandler.GetPC(0));
            TurnList.Add(StateHandler.GetPC(1));
            TurnList.Add(StateHandler.GetPC(2));
            for (int i = 0; i < MonsterList.Length; i++)
            {
                TurnList.Add(MonsterList[i]);
            }

            current = StateHandler.GetPC(0);

            cameraTarget = PCBuilder.getPC(0);

            strategy = 0;

            x = 75;
            y = 50;
            z = 10;
        }
Ejemplo n.º 2
0
        internal static PC getPC(string name)
        {
            foreach (PC pc in pcList)
            {
                if (pc.Name == name)
                {
                    return(pc);
                }
            }

            PC temp = new PC();

            temp.Z = -22;
            temp.setLevel(1);
            temp.MaxHealth = 100;
            temp.Health    = temp.MaxHealth;
            temp.setAttack(10);
            temp.setMagic(10);
            temp.setDefense(10);
            temp.setMagicDefense(10);
            temp.Scale = 1.0f;

            if (name == "Jane")
            {
                temp.Name = "Jane";
                temp.setTitle("The Honey Badger Woman");
                temp.model = ModelFactory.loadModel("bodyArcher");
                temp.setCombatLoc(40, 15, 15);
            }
            else if (name == "Bob")
            {
                temp.Name = "Bob";
                temp.setTitle("The Robert");
                temp.model = ModelFactory.loadModel("warior5");
                temp.setCombatLoc(5, 15, 20);
            }
            else if (name == "John")
            {
                temp.Name = "John";
                temp.setTitle("The Intern");
                temp.model = ModelFactory.loadModel("wizzard6");
                temp.setCombatLoc(30, 15, 10);
            }
            else
            {
                return(getPC("John"));
            }


            pcList.Add(temp);

            return(temp);
        }
Ejemplo n.º 3
0
        private static List <Actor> generateModels()
        {
            List <Actor> actorList = null;

            if (map != null)
            {
                actorList = new List <Actor>();

                Actor temp;

                for (int i = 0; i < map.GetLength(0); i++)
                {
                    for (int j = 0; j < map.GetLength(1); j++)
                    {
                        // Tile 1 - Stone, top bottom connect
                        // Tile 3 - Stone, left right connect

                        // Tile 2 - Stone, corner
                        // Tile 4 - Stone, Top right?
                        // Tile 5 - Stone, corner, bottom right
                        // Tile 7 - Stone, corner
                        // Tile 8 - Stone, corner?

                        // Tile 6 - Unusable? No connections
                        temp = new Actor();
                        if (map[i, j] == FSCMInterfaces.Globals.TILE_UNPASSABLE)
                        {
                            temp.model = ModelFactory.loadModel("tile9");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_GRASS_CORNERL)
                        {
                            temp.model = ModelFactory.loadModel("grassWallCornerL");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_GRASS_CORNERR)
                        {
                            temp.model = ModelFactory.loadModel("grassWallCornerR");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_GRASS_CUBE)
                        {
                            temp.model = ModelFactory.loadModel("tile1");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_GRASS_ENDL)
                        {
                            temp.model = ModelFactory.loadModel("grassWallEndL");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_GRASS_ENDR)
                        {
                            temp.model = ModelFactory.loadModel("grassWallEndR");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_GRASS_WALL1)
                        {
                            temp.model = ModelFactory.loadModel("grassWall");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_GRASS_WALL2)
                        {
                            temp.model = ModelFactory.loadModel("grassWall2");
                            temp.X     = (j) * 4;
                            temp.Y     = (i) * 4;
                            temp.Z     = -26;
                            temp.Scale = 2.0f;
                            actorList.Add(temp);
                            temp       = new Actor();
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_EXIT)
                        {
                            temp.model = ModelFactory.loadModel("TileGrass");
                        }
                        else if (map[i, j] == FSCMInterfaces.Globals.TILE_PASSABLE)
                        {
                            temp.model = ModelFactory.loadModel("TileDirt");
                        }
                        else
                        {
                            temp.model = ModelFactory.loadModel("TileGrass");
                        }
                        temp.Scale = 2.0f;
                        temp.X     = (j) * 4;
                        temp.Y     = (i) * 4;
                        temp.Z     = -30;
                        actorList.Add(temp);
                    }
                }
            }

            return(actorList);
        }
Ejemplo n.º 4
0
        private static Monster generateMonster(string name, int level, int element, int specials, bool boss)
        {
            Monster monster = new Monster();

            monster.Quality = specials;

            switch (name)
            {
            case "Eyeball":
                monster.model     = ModelFactory.loadModel("Eyeball");
                monster.Name      = "Eyeball";
                monster.MaxHealth = 100 * level;
                monster.Health    = monster.MaxHealth;
                monster.Element   = Globals.ELEMENT_FIRE;
                monster.setLevel(level);
                monster.setAttack(level * 2);
                monster.setDefense(level * 2);
                monster.setMagic(level * 2);
                monster.setMagicDefense(level * 2);
                monster.Type = Globals.MONSTER_EYEBALL;
                monster.SetBehavior(new BehaviorBasicFire());
                break;

            case "MutatedCroc":
            case "Mutated Croc":
            case "MutatedCrocodile":
            case "Mutated Crocodile":
                monster.model     = ModelFactory.loadModel("MutatedCrocodile");
                monster.Name      = "Mutated Crocodile";
                monster.MaxHealth = 100 * level;
                monster.Health    = monster.MaxHealth;
                monster.Element   = Globals.ELEMENT_WATER;
                monster.setLevel(level);
                monster.setAttack(level * 2);
                monster.setDefense(level * 2);
                monster.setMagic(level * 2);
                monster.setMagicDefense(level * 2);
                monster.Type = Globals.MONSTER_MUTATED_CROCODILE;
                monster.SetBehavior(new BehaviorBasicWater());
                break;

            case "MutatedRat":
            case "Mutated Rat":
                monster.Name      = "Daisy";
                monster.model     = ModelFactory.loadModel("mutantRat34blend");
                monster.MaxHealth = 100 * level;
                monster.Health    = monster.MaxHealth;
                monster.Element   = Globals.ELEMENT_NATURE;
                monster.setLevel(level);
                monster.setAttack(level * 2);
                monster.setDefense(level * 2);
                monster.setMagic(level * 2);
                monster.setMagicDefense(level * 2);
                monster.Type = Globals.MONSTER_MUTATED_RAT;
                monster.SetBehavior(new BehaviorBasicNature());
                break;

            case "MutatedTurtle":
            case "Mutated Turtle":
                monster.model     = ModelFactory.loadModel("MutatedTurtle");
                monster.Name      = "Mutated Turtle";
                monster.MaxHealth = 100 * level;
                monster.Health    = monster.MaxHealth;
                monster.Element   = Globals.ELEMENT_WATER;
                monster.setLevel(level);
                monster.setAttack(level * 2);
                monster.setDefense(level * 2);
                monster.setMagic(level * 2);
                monster.setMagicDefense(level * 2);
                monster.Type = Globals.MONSTER_MUTATED_TURTLE;
                monster.SetBehavior(new BehaviorBasicWater());
                break;

            case "Drone":
            case "SecurityDrone":
                monster.model     = ModelFactory.loadModel("securityDrone");
                monster.Name      = "Security Drone";
                monster.MaxHealth = 100 * level;
                monster.Health    = monster.MaxHealth;
                monster.Element   = Globals.ELEMENT_PHYSICAL;
                monster.setLevel(level);
                monster.setAttack(level * 2);
                monster.setDefense(level * 2);
                monster.setMagic(level * 2);
                monster.setMagicDefense(level * 2);
                monster.Type = Globals.MONSTER_SECURITY_DRONE;
                monster.SetBehavior(new BehaviorAttack());
                break;

            case "SlimeMonster":
            case "MonsterSlime":
            default:
                monster.model     = ModelFactory.loadModel("MonsterSlime");
                monster.Name      = "Slime Monster";
                monster.MaxHealth = 100 * level;
                monster.Health    = monster.MaxHealth;
                monster.Element   = Globals.ELEMENT_WATER;
                monster.setLevel(level);
                monster.setAttack(level * 2);
                monster.setDefense(level * 2);
                monster.setMagic(level * 2);
                monster.setMagicDefense(level * 2);
                monster.Type = Globals.MONSTER_SLIMEMONSTER;
                monster.SetBehavior(new BehaviorBasicWater());
                break;
            }

            monster.Quality = specials;

            switch (specials)
            {
            case Globals.MOB_WEAK:
                monster.Scale    *= 0.75f;
                monster.MaxHealth = monster.MaxHealth / 2;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() / 2);
                monster.setDefense(monster.getDefense() / 2);
                monster.setMagic(monster.getMagic() / 2);
                monster.setMagicDefense(monster.getMagicDefense() / 2);
                break;

            case Globals.MOB_NORMAL:
                monster.Scale *= 1.25f;
                break;

            case Globals.MOB_HARD:
                monster.Scale    *= 1.5f;
                monster.MaxHealth = monster.MaxHealth * 2;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 2);
                monster.setDefense(monster.getDefense() * 2);
                monster.setMagic(monster.getMagic() * 2);
                monster.setMagicDefense(monster.getMagicDefense() * 2);
                break;

            case Globals.MOB_INSANE:
                monster.Scale    *= 2.5f;
                monster.MaxHealth = monster.MaxHealth * 3;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 3);
                monster.setDefense(monster.getDefense() * 3);
                monster.setMagic(monster.getMagic() * 3);
                monster.setMagicDefense(monster.getMagicDefense() * 3);
                break;

            case Globals.MOB_BOSS:
                monster.Scale    *= 4.0f;
                monster.MaxHealth = monster.MaxHealth * 10;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 3);
                monster.setDefense(monster.getDefense() * 3);
                monster.setMagic(monster.getMagic() * 3);
                monster.setMagicDefense(monster.getMagicDefense() * 3);
                break;

            case Globals.MOB_SPECIAL:
                monster.Name      = "The Stumonster";
                monster.Scale    *= 6.0f;
                monster.MaxHealth = monster.MaxHealth * 20;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 4);
                monster.setDefense(monster.getDefense() * 4);
                monster.setMagic(monster.getMagic() * 4);
                monster.setMagicDefense(monster.getMagicDefense() * 4);
                break;
            }

            switch (StateHandler.Difficulty)
            {
            case Globals.DIFFICULTY_VERY_EASY:
                monster.Scale    *= 0.75f;
                monster.MaxHealth = monster.MaxHealth / 2;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() / 2);
                monster.setDefense(monster.getDefense() / 2);
                monster.setMagic(monster.getMagic() / 2);
                monster.setMagicDefense(monster.getMagicDefense() / 2);
                break;

            case Globals.DIFFICULTY_EASY:
                monster.Scale    *= 0.85f;
                monster.MaxHealth = monster.MaxHealth * 3 / 4;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 3 / 4);
                monster.setDefense(monster.getDefense() * 3 / 4);
                monster.setMagic(monster.getMagic() * 3 / 4);
                monster.setMagicDefense(monster.getMagicDefense() * 3 / 4);
                break;

            case Globals.DIFFICULTY_NORMAL:
                break;

            case Globals.DIFFICULTY_HARD:
                monster.Scale    *= 1.15f;
                monster.MaxHealth = monster.MaxHealth * 5 / 4;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 5 / 4);
                monster.setDefense(monster.getDefense() * 5 / 4);
                monster.setMagic(monster.getMagic() * 5 / 4);
                monster.setMagicDefense(monster.getMagicDefense() * 5 / 4);
                break;

            case Globals.DIFFICULTY_VERY_HARD:
                monster.Scale    *= 1.25f;
                monster.MaxHealth = monster.MaxHealth * 3 / 2;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 3 / 2);
                monster.setDefense(monster.getDefense() * 3 / 2);
                monster.setMagic(monster.getMagic() * 3 / 2);
                monster.setMagicDefense(monster.getMagicDefense() * 3 / 2);
                break;

            case Globals.DIFFICULTY_INSANE:
                monster.Scale    *= 1.5f;
                monster.MaxHealth = monster.MaxHealth * 2;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 2);
                monster.setDefense(monster.getDefense() * 2);
                monster.setMagic(monster.getMagic() * 2);
                monster.setMagicDefense(monster.getMagicDefense() * 2);
                break;
            }

            if (boss)
            {
                monster.Boss      = true;
                monster.Scale    *= 1.5f;
                monster.MaxHealth = monster.MaxHealth * 2;
                monster.Health    = monster.MaxHealth;
                monster.setAttack(monster.getAttack() * 2);
                monster.setDefense(monster.getDefense() * 2);
                monster.setMagic(monster.getMagic() * 2);
                monster.setMagicDefense(monster.getMagicDefense() * 2);
            }

            return(monster);
        }