View Javadoc

1   /*
2   @See License.txt@
3    */
4   package spellcast.enchantment;
5   
6   import spellcast.beings.Being;
7   import spellcast.beings.IBeing;
8   
9   
10  /***
11   * The Amnesia <code>Enchantment</code>.
12   *
13   * @author Barrie Treloar
14   * @version $Revision: 1.1 $
15   */
16  public class AmnesiaEnchantment extends EnchantmentImpl {
17      /*** Use serialVersionUID for interoperability. */
18      private static final long serialVersionUID = 1L;
19  
20      /*** The duration for <code>AmnesiaEnchantment</code>. */
21      private static final int DURATION = 1;
22  
23      /*** The description for <code>AmnesiaEnchantment</code>. */
24      private static final String DESCRIPTION =
25          "If the subject of this spell is a wizard, next turn he must "
26          + "repeat identically the gestures he made in the current turn,"
27          + "including stabs. If the subject is a monster it will attack "
28          + "whoever it attacked this turn. If the subject is simultaneously "
29          + "the subject of any of 'confusion', 'charm person', "
30          + "'charm monster', 'paralysis' or 'fear' then none of "
31          + "the spells work.";
32  
33      /*** The name for <code>AmnesiaEnchantment</code>. */
34      private static final String NAME = "Amnesia";
35  
36      /***
37       * Provided for serialization, do not use as a constructor.
38       */
39      protected AmnesiaEnchantment() {
40      }
41  
42      /***
43       * Creates a new <code>AmnesiaEnchantment</code> object.
44       *
45       * @param theCaster the <code>Being</code> casting the
46       *        <code>Enchantment</code>.
47       * @param theTarget the <code>Being</code> that is the target of the
48       *        <code>Enchantment</code>.
49       */
50      public AmnesiaEnchantment(final IBeing theCaster, final IBeing theTarget) {
51          super(NAME, theCaster, theTarget);
52          setDuration(DURATION);
53          setDescription(DESCRIPTION);
54      }
55  }