Beispiel #1
0
        /// <summary>
        /// Launch an attack on a creature with a move.
        /// </summary>
        /// <param name="move">The move to attack with.</param>
        /// <param name="target">The target to attack.</param>
        public void LaunchAttack(Move move, Creature target)
        {
            //Stop here if the move or target isn't valid, or if a move already has been set in motion.
            if (move == null || target == null || _BattleState != BattleState.Idle) { return; }

            //Prepare for the attack.
            _BattleState = BattleState.Waiting;
            //Create the activated form of the move.
            BattleMove active = new BattleMove(move, this, target);

            //Attack.
            BattleCoordinator.Instance.QueueMove(active);
        }
Beispiel #2
0
        /// <summary>
        /// Create a move.
        /// </summary>
        /// <param name="name">The name of the move.</param>
        /// <param name="description">The description of the move.</param>
        /// <param name="types">The types of the move.</param>
        /// <param name="powerPhysical">The physical power of the move.</param>
        /// <param name="powerSpecial">The special power of the move.</param>
        /// <param name="accuracy">The accuracy of the move.</param>
        /// <param name="energyConsume">The energy consumed by the move.</param>
        /// <param name="status">The status ailments that the moves afflicts victims with.</param>
        /// <param name="force">The physical force behind the move.</param>
        /// <returns>The move created with the given data.</returns>
        public Move CreateMove(string name, string description, List<PokemonType> types, int powerPhysical, int powerSpecial, int accuracy, int energyConsume,
            Status status, float force)
        {
            //Create the move.
            Move move = new Move();
            move.Initialize();

            //Set the stats accordingly.
            move.Name = name;
            move.Description = description;
            move.Types = types;
            move.PowerPhysical = powerPhysical;
            move.PowerSpecial = powerSpecial;
            move.Accuracy = accuracy;
            move.EnergyConsume = energyConsume;
            move.Status = status;
            move.Force = force;

            //Return the move.
            return move;
        }