View Javadoc

1   /*
2   @See License.txt@
3    */
4   package spellcast.enchantment;
5   
6   import spellcast.beings.IBeing;
7   
8   
9   /***
10   * The Haste <code>Enchantment</code>.
11   *
12   * @author Barrie Treloar
13   * @version $Revision: 1.1 $
14   */
15  public class HasteEnchantment extends EnchantmentImpl {
16      /*** Use serialVersionUID for interoperability. */
17      private static final long serialVersionUID = 1L;
18  
19      /*** The duration for <code>HasteEnchantment</code>. */
20      private static final int DURATION = 3;
21  
22      /*** The description for <code>HasteEnchantment</code>. */
23      private static final String DESCRIPTION =
24          "For the next 3 turns, the subject (but not his monsters if a wizard) "
25          + "makes an extra set of gestures due to being speeded up. This "
26          + "takes effect in the following turn so that instead of giving one "
27          + "pair of gestures, 2 are given, the effect of both being taken "
28          + "simultaneously at the end of the turn. Thus a single "
29          + "'counter-spell' from his adversary could cancel 2 spells cast "
30          + "by the hastened wizard on 2 half-turns if the phasing is right. "
31          + "Non-hastened wizards and monsters can see everything the hastened "
32          + "individual is doing. Hastened monsters can change target in the "
33          + "extra turns if desired.";
34  
35      /*** The name for <code>HasteEnchantment</code>. */
36      private static final String NAME = "Haste";
37  
38      /***
39       * Provided for serialization, do not use as a constructor.
40       */
41      protected HasteEnchantment() {
42      }
43  
44      /***
45       * Creates a new <code>HasteEnchantment</code> object.
46       *
47       * @param theCaster the <code>IBeing</code> casting the
48       *        <code>Enchantment</code>.
49       * @param theTarget the <code>IBeing</code> that is the target of the
50       *        <code>Enchantment</code>.
51       */
52      public HasteEnchantment(final IBeing theCaster, final IBeing theTarget) {
53          super(NAME, theCaster, theTarget);
54          setDuration(DURATION);
55          setDescription(DESCRIPTION);
56      }
57  }