View Javadoc

1   /*
2   @See License.txt@
3    */
4   package spellcast.enchantment;
5   
6   import spellcast.beings.IBeing;
7   import spellcast.beings.IWizard;
8   
9   
10  /***
11   * The Charm Person <code>Enchantment</code>.
12   *
13   * @author Barrie Treloar
14   * @version $Revision: 1.1 $
15   */
16  public class CharmPersonEnchantment extends EnchantmentImpl {
17      /*** Use serialVersionUID for interoperability. */
18      private static final long serialVersionUID = 1L;
19  
20      /*** The duration for <code>CharmPersonEnchantment</code>. */
21      private static final int DURATION = 1;
22  
23      /*** The description for <code>CharmPersonEnchantment</code>. */
24      private static final String DESCRIPTION =
25          "Except for cancellation with other enchantments, this spell only "
26          + "affects humans. The subject is told which of his hands will be "
27          + "controlled at the time the spell hits, and in the following turn, "
28          + "the caster of the spell writes down the gesture he wants the "
29          + "subject's named hand to perform. If the subject is only so because "
30          + "of a reflection from a 'magic mirror' the subject of the mirror "
31          + "assumes the role of caster and writes down his opponent's gesture. "
32          + "If the subject is also the subject of any of 'amnesia', "
33          + "'confusion', 'charm monster', 'paralysis' or 'fear', "
34          + "none of the spells work.";
35  
36      /*** The name of the <code>CharmPersonEnchantment</code>. */
37      private static final String NAME = "Charm Person";
38  
39      /***
40       * Provided for serialization, do not use as a constructor.
41       */
42      protected CharmPersonEnchantment() {
43      }
44  
45      /***
46       * Creates a new <code>CharmPersonEnchantment</code> object.
47       *
48       * @param theCaster the <code>IBeing</code> casting the
49       *        <code>Enchantment</code>.
50       * @param theTarget the <code>Wizard</code> that is the target of the
51       *        <code>Enchantment</code>.
52       */
53      public CharmPersonEnchantment(
54          final IBeing theCaster, final IWizard theTarget
55      ) {
56          super(NAME, theCaster, theTarget);
57          setDuration(DURATION);
58          setDescription(DESCRIPTION);
59      }
60  }