Ejemplo n.º 1
0
 /// <summary>
 /// Sets the built damage action to target the user of the move
 /// containing the action that last affected the user.
 /// </summary>
 /// <param name="builder">The damage action builder.</param>
 /// <param name="actionHistory">The action history.</param>
 public static DamageActionBuilder Retaliates(
     this DamageActionBuilder builder,
     IActionHistory actionHistory)
 {
     return(builder.WithActionTargetCalculator(new RetaliationActionTargetCalculator(actionHistory))
            .WithTag(DamageTags.Retaliation));
 }
Ejemplo n.º 2
0
        public void WithActionTargetCalculator_NullArgument_Throws()
        {
            // Arrange
            var builder = new DamageActionBuilder();

            // Act and Assert
            Assert.Throws <ArgumentNullException>(() => _ = builder.WithActionTargetCalculator(null));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the built damage action to target a single enemy chosen by the user.
 /// </summary>
 /// <param name="builder">The damage action builder.</param>
 /// <param name="userInput">The user input.</param>
 /// <param name="gameOutput">The game output.</param>
 public static DamageActionBuilder UserSelectsSingleEnemy(this DamageActionBuilder builder, IUserInput userInput)
 {
     return(builder.WithActionTargetCalculator(new SingleEnemyActionTargetCalculator(userInput)));
 }