public EnemyPokemonPanel(Game game)
     : base(game)
 {
     Pokemon = new PokemonWrapper(game);
     Position = new Vector2(10, 10);
     Texture = game.Content.Load<Texture2D>("Resources/Battlesystem/lvlPokemonTop");
     _elementTexture = game.Content.Load<Texture2D>("Resources/Battlesystem/elements");
     _levelFont = game.Content.Load<SpriteFont>("Size7");
     _nameFont = game.Content.Load<SpriteFont>("Size8");
 }
Example #2
0
        public AttackMenu(Game game, AttackChoiceArrow attackChoiceArrow, PokemonInstance pokemonInstance)
            : base(game)
        {
            _pokemon = new PokemonWrapper(game, pokemonInstance);

            _attackChoiceArrow = attackChoiceArrow;
            Position = new Vector2(0, 110);
            Texture = game.Content.Load<Texture2D>("Resources/Battlesystem/attackMenu");
            _moveFont = game.Content.Load<SpriteFont>("Size8");
            _PPFont = game.Content.Load<SpriteFont>("Size10");
        }
Example #3
0
        public Battle(Game1 game, Trainer alliedTrainer, Trainer enemyTrainer, bool trainerBattle)
            : base(game)
        {
            Camera = new Camera(game.ScreenRectangle) {Zoom = 4f};
            Camera.LockToCenter(game.ScreenRectangle);

            _trainerBattle = trainerBattle;
            CurrentPhase = BattlePhase.Starting;

            AlliedTrainer = alliedTrainer;
            AlliedTrainer.PrepareForCombat(RenderingPosition.Ally);

            EnemyTrainer = enemyTrainer;
            EnemyTrainer.PrepareForCombat(RenderingPosition.Enemy);

            foreach (var pokemon in EnemyTrainer.PokemonSet.Where(pokemon => pokemon.CurrentHealth > 0))
            {
                ActiveEnemyPokemon = new PokemonWrapper(game, pokemon);
                break;
            }

            foreach (var pokemon in AlliedTrainer.PokemonSet.Where(pokemon => pokemon.CurrentHealth > 0))
            {
                ActiveAlliedPokemon = new PokemonWrapper(game, pokemon);
                break;
            }

            ActiveAlliedPokemon.PokemonInstance.PrepareForCombat(RenderingPosition.Ally);
            ActiveEnemyPokemon.PokemonInstance.PrepareForCombat(RenderingPosition.Enemy);

            // Initiate state
            BattleConclusion = BattleConclusion.Undecided;
            EndStage = EndStage.DisplayResult;
            CurrentPlayerTurnPhase = PlayerTurnPhase.ChoosingAction;
            RewardState = RewardState.ExperienceToBeAwarded;

            LoadContent();
        }