public override void Use(Bunny user, Fighter[] targets)
        {
            // Select a random enemy to damage
            int targetIndex = Random.Range(0, targets.Length);

            user.DoDamage(targets[targetIndex], multiplier);
        }
        public override void Use(Bunny user, Fighter[] targets)
        {
            // Select a random damage multiplier and damage all targets
            float multiplier = Random.Range(minMultiplier, maxMultiplier);

            user.DoDamage(targets, multiplier);
        }
Esempio n. 3
0
        /// <summary>
        /// Insert a standard attack turn during which a bunny attacks a single enemy.
        /// </summary>
        /// <param name="enemyIndex">The index of the enemy to target.</param>
        public void InsertBunnyAttackTurn(int enemyIndex)
        {
            // Create and insert turn
            Bunny user   = SelectedBunny;
            Enemy target = currentEnemies[enemyIndex];
            Turn  turn   = new Turn(user, target, string.Format(attackMessage, user.name, target.name), () => user.DoDamage(target));

            turnCollection.Insert(turn);

            // Move to next input
            NextInput();
        }